]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Prevent illegal memory accesses when parsing incorrecctly formated core notes.
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
1d0aa65c
AH
12017-11-16 Alan Hayward <alan.hayward@arm.com>
2
3 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
4
3491a34c
YQ
52017-11-16 Yao Qi <yao.qi@linaro.org>
6
7 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
8 (tic6x_store_gregset): Likewise.
9 (tic6x_usrregs_info): Move it up.
10
a602f924
AH
112017-11-15 Alan Hayward <alan.hayward@arm.com>
12
13 * Makefile.in: Update arch rules.
14 * configure.srv: Explicitly mark arch/ files.
15
5616b6c3
AS
162017-11-13 Andreas Schwab <schwab@suse.de>
17
18 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
19 function.
20 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
21
d1928160
PA
222017-11-06 Pedro Alves <palves@redhat.com>
23
24 * config.in, configure: Regenerate.
25
bac608e7
SM
262017-10-27 Simon Marchi <simon.marchi@ericsson.com>
27
28 * target.c (struct thread_search): Remove.
29 (thread_search_callback): Remove.
30 (prepare_to_access_memory): Use for_each_thread instead of
31 find_inferior. Inline code from thread_search_callback.
32
eaddb425
SM
332017-10-27 Simon Marchi <simon.marchi@ericsson.com>
34
35 * server.c (struct visit_actioned_threads_data): Remove.
36 (visit_actioned_threads): Change prototype to take arguments
37 directly.
38 (resume): Use find_thread instead of find_inferior.
39
99078d34
SM
402017-10-27 Simon Marchi <simon.marchi@ericsson.com>
41
42 * server.c (queue_stop_reply_callback): Change prototype, return
43 void.
44 (find_status_pending_thread_callback): Remove.
45 (handle_status): Replace find_inferior with find_thread and
46 for_each_thread.
47
cc628f3d
AH
482017-10-25 Alan Hayward <alan.hayward@arm.com>
49
50 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
51 with REGNO.
52 (aarch64_store_gregset): Likewise.
53 (aarch64_fill_fpregset): Likewise.
54 (aarch64_store_fpregset): Likewise.
55
4d3bb80e
SM
562017-10-21 Simon Marchi <simon.marchi@ericsson.com>
57
58 * gdbthread.h (find_thread, for_each_thread): New functions.
59 * inferiors.c (thread_of_pid): Remove.
60 (find_any_thread_of_pid): Use find_thread.
61 * linux-low.c (num_lwps): Use for_each_thread.
62
7a7cdfa0
YQ
632017-10-17 Yao Qi <yao.qi@linaro.org>
64
65 * Makefile.in: Remove one rule.
66 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
67
e675d170
YQ
682017-10-17 Yao Qi <yao.qi@linaro.org>
69
70 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
71 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
72
7eb4e0f9
YQ
732017-10-17 Yao Qi <yao.qi@linaro.org>
74
75 * configure.srv: Rename arm.o with arch/arm.o.
76
60d6cfc9
YQ
772017-10-17 Yao Qi <yao.qi@linaro.org>
78
79 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
80 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
81 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
82 (arch-i386.o, arch-amd64.o): Remove rules.
83 (arch/%.o): New rule.
84 Update POSTCOMPILE and COMPILE.pre.
85 * configure.ac: Invoke AC_CONFIG_COMMANDS.
86 * configure: Re-generated.
87 * configure.srv: Replace arch-i386.o with arch/i386.o.
88 Replace arch-amd64.o with arch/amd64.o.
89
5bfda255
YQ
902017-10-16 Yao Qi <yao.qi@linaro.org>
91
92 * configure: Regenerated.
93
9c80ecd6
SM
942017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
95
96 * inferiors.h: (struct inferior_list): Remove.
97 (struct inferior_list_entry); Remove.
98 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
99 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
100 get_first_inferior): Remove.
101 (for_each_inferior, for_each_inferior_with_data, find_inferior,
102 find_inferior_id, find_inferior_in_random): Change signature.
103 * inferiors.c (all_threads): Change type to
104 std::list<thread_info *>.
105 (get_thread): Remove macro.
106 (find_inferior, find_inferior_id): Change signature, implement
107 using find_thread.
108 (find_inferior_in_random): Change signature, implement using
109 find_thread_in_random.
110 (for_each_inferior, for_each_inferior_with_data): Change
111 signature, implement using for_each_thread.
112 (add_inferior_to_list, remove_inferior): Remove.
113 (add_thread, get_first_thread, thread_of_pid,
114 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
115 (get_first_inferior, one_inferior_p, clear_inferior_list):
116 Remove.
117 (clear_inferiors, get_thread_process): Update.
118 * gdbthread.h: Include <list>.
119 (struct thread_info) <entry>: Remove field.
120 <id>: New field.
121 (all_threads): Change type to std::list<thread_info *>.
122 (get_first_inferior): Add doc.
123 (find_thread, for_each_thread, find_thread_in_random): New
124 functions.
125 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
126 * linux-arm-low.c (update_registers_callback): Update.
127 * linux-low.c (second_thread_of_pid_p): Update.
128 (kill_one_lwp_callback, linux_detach_lwp_callback,
129 delete_lwp_callback, status_pending_p_callback, same_lwp,
130 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
131 iterate_over_lwps, not_stopped_callback,
132 resume_stopped_resumed_lwps, count_events_callback,
133 select_singlestep_lwp_callback, select_event_lwp_callback,
134 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
135 suspend_and_send_sigstop_callback, wait_for_sigstop,
136 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
137 lwp_running, linux_set_resume_request, resume_status_pending_p,
138 need_step_over_p, start_step_over, linux_resume_one_thread,
139 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
140 reset_lwp_ptrace_options_callback): Update.
141 * linux-mips-low.c (update_watch_registers_callback): Update.
142 * regcache.c (regcache_invalidate_one, regcache_invalidate):
143 Update.
144 (free_register_cache_thread_one): Remove.
145 (regcache_release): Update.
146 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
147 handle_qxfer_threads_worker): Update.
148 (handle_query): Update, use list iterator.
149 (visit_actioned_threads, handle_pending_status,
150 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
151 clear_pending_status_callback, set_pending_status_callback,
152 find_status_pending_thread_callback, handle_status,
153 process_serial_event): Update.
154 * target.c (thread_search_callback): Update.
155 * thread-db.c (thread_db_get_tls_address): Update.
156 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
157 Update.
158 * win32-i386-low.c (update_debug_registers_callback): Update.
159 * win32-low.c (delete_thread_info, child_delete_thread,
160 continue_one_thread, suspend_one_thread,
161 get_child_debug_event): Adjust.
162
9179355e
SM
1632017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
164
165 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
166 * inferiors.h: Include <list>.
167 (struct process_info) <entry>: Remove field.
168 <pid>: New field.
169 (pid_of): Change macro to function.
170 (ptid_of, lwpid_of): Remove macro.
171 (all_processes): Change type to std::list<process_info *>.
172 (ALL_PROCESSES): Remove macro.
173 (for_each_process, find_process): New function.
174 * inferiors.c (all_processes): Change type to
175 std::list<process_info *>.
176 (find_thread_process): Adjust.
177 (add_process): Likewise.
178 (remove_process): Likewise.
179 (find_process_pid): Likewise.
180 (get_first_process): Likewise.
181 (started_inferior_callback): Remove.
182 (have_started_inferiors_p): Adjust.
183 (attached_inferior_callback): Remove.
184 (have_attached_inferiors_p): Adjust.
185 * linux-low.c (check_zombie_leaders): Likewise.
186 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
187 (x86_linux_update_xmltarget): Adjust.
188 * server.c (handle_query): Likewise.
189 (gdb_reattached_process): Remove.
190 (handle_status): Adjust.
191 (kill_inferior_callback): Likewise.
192 (detach_or_kill_inferior): Remove.
193 (print_started_pid): Likewise.
194 (print_attached_pid): Likewise.
195 (detach_or_kill_for_exit): Update.
196 (process_serial_event): Likewise.
197 * linux-arm-low.c (arm_new_fork): Likewise.
198
c9cb8905
SM
1992017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
200
201 * dll.h: Include <list>.
202 (struct dll_info): Add constructor.
203 <entry>: Remove field.
204 (all_dlls): Change type to std::list<dll_info>.
205 * dll.c: Include <algorithm>.
206 (get_dll): Remove macro.
207 (all_dlls): Change type to std::list<dll_info *>.
208 (free_one_dll): Remove.
209 (match_dll): Likewise.
210 (loaded_dll): Adjust.
211 (unloaded_dll): Adjust to all_dlls type change, use
212 std::find_if. Inline code from match_dll.
213 (clear_dlls): Adjust to all_dlls type change.
214 * server.c (emit_dll_description): Remove.
215 (handle_qxfer_libraries): Adjust to all_dlls type change,
216 integrate emit_dll_description's functionality.
217
04ec7890
SM
2182017-10-12 Simon Marchi <simon.marchi@ericsson.com>
219
220 * linux-low.h (struct linux_target_ops) <delete_process>: New
221 field.
222 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
223 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
224 (struct linux_target_ops): Add delete_process callback.
225 * linux-arm-low.c (arm_delete_process): New.
226 (struct linux_target_ops): Add delete_process callback.
227 * linux-bfin-low.c (struct linux_target_ops): Likewise.
228 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
229 * linux-m32r-low.c (struct linux_target_ops): Likewise.
230 * linux-mips-low.c (mips_linux_delete_process): New.
231 (struct linux_target_ops): Add delete_process callback.
232 * linux-ppc-low.c (struct linux_target_ops): Likewise.
233 * linux-s390-low.c (struct linux_target_ops): Likewise.
234 * linux-sh-low.c (struct linux_target_ops): Likewise.
235 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
236 * linux-tile-low.c (struct linux_target_ops): Likewise.
237 * linux-x86-low.c (x86_linux_delete_process): New.
238 (struct linux_target_ops): Add delete_process callback.
239 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
240
466eecee
SM
2412017-10-12 Simon Marchi <simon.marchi@ericsson.com>
242
243 * linux-aarch64-low.c (the_low_target): Add thread delete
244 callback.
245 * linux-arm-low.c (arm_delete_thread): New function.
246 (the_low_target): Add thread delete callback.
247 * linux-bfin-low.c (the_low_target): Likewise.
248 * linux-crisv32-low.c (the_low_target): Likewise.
249 * linux-low.c (delete_lwp): Invoke delete_thread callback if
250 set.
251 * linux-low.h (struct linux_target_ops) <delete_thread>: New
252 field.
253 * linux-m32r-low.c (the_low_target): Add thread delete callback.
254 * linux-mips-low.c (mips_linux_delete_thread): New function.
255 (the_low_target): Add thread delete callback.
256 * linux-ppc-low.c (the_low_target): Likewise.
257 * linux-s390-low.c (the_low_target): Likewise.
258 * linux-sh-low.c (the_low_target): Likewise.
259 * linux-tic6x-low.c (the_low_target): Likewise.
260 * linux-tile-low.c (the_low_target): Likewise.
261 * linux-x86-low.c (the_low_target): Likewise.
262 * linux-xtensa-low.c (the_low_target): Likewise.
263
b79f7801
YZ
2642017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
265
266 * win32-low.c: Include "common-inferior.h".
267
bc3b087d
SDJ
2682017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
269
270 * inferiors.c (set_inferior_cwd): New function.
271 * server.c (handle_general_set): Handle QSetWorkingDir packet.
272 (handle_query): Inform that QSetWorkingDir is supported.
273 * win32-low.c (create_process): Pass the inferior's cwd to
274 CreateProcess.
275
d092c5a2
SDJ
2762017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
277
278 * inferiors.c (current_inferior_cwd): New global variable.
279 (get_inferior_cwd): New function.
280 * inferiors.h (struct process_info) <cwd>: New field.
281
7da0a886
SDJ
2822017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
283
284 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
285 (OBS): Add gdb_tilde_expand.o.
286
289a6840
SM
2872017-10-02 Simon Marchi <simon.marchi@ericsson.com>
288
289 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
290 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
291
256642e8
PA
2922017-09-29 Pedro Alves <palves@redhat.com>
293
294 * ax.c (gdb_parse_agent_expr): Constify.
295 * ax.h (gdb_parse_agent_expr): Constify.
296 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
297 Constify.
298 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
299 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
300 * remote-utils.h (read_ptid): Constify.
301 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
302 (process_point_options, process_serial_event): Constify.
303 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
304 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
305 (cmd_qtbuffer): Constify.
306
5b9ca4d4
PA
3072017-09-29 Pedro Alves <palves@redhat.com>
308
309 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
310 fails.
311
94c207e0
PA
3122017-09-29 Pedro Alves <palves@redhat.com>
313
314 * linux-low.c (handle_extended_wait): Pass parent thread instead
315 of process to thread_db_notice_clone.
316 * linux-low.h (thread_db_notice_clone): Replace parent process
317 parameter with parent thread parameter.
318 * thread-db.c (find_one_thread): Add comment.
319 (thread_db_notice_clone): Replace parent process parameter with
320 parent thread parameter. Temporarily switch to the parent thread.
321
75352e28
SDJ
3222017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
323
324 * gdbthread.h: Include "common-gdbthread.h".
325 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
326 "if" when validating the ptid.
327 * remote-utils.c: Include "gdbthread.h".
328 (prepare_resume_reply): Use "switch_to_thread".
329 * target.c (done_accessing_memory): Likewise.
330
ad339634
AA
3312017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
332
333 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
334 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
335 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
336 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
337 s390x-gs-linux64-ipa.o to ipa_obj.
338 * linux-s390-low.c (HWCAP_S390_GS): New define.
339 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
340 New functions.
341 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
342 (s390_arch_setup): Check for guarded-storage support and choose
343 appropriate tdesc.
344 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
345 init_registers_s390x_gs_linux64.
346 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
347 enum value.
348 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
349 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
350
cc4d742f
SM
3512017-09-22 Simon Marchi <simon.marchi@ericsson.com>
352
353 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
354
f6327dcb
KB
3552017-09-21 Kevin Buettner <kevinb@redhat.com>
356
357 * linux-low.h (struct lwp_info): Add new field, thread_handle.
358 (thread_db_thread_handle): Declare.
359 * linux-low.c (linux_target_ops): Initialize thread_handle.
360 * server.c (handle_qxfer_threads_worker): Add support for
361 "handle" attribute.
362 * target.h (struct target_ops): Add new function pointer,
363 thread_handle.
364 (target_thread_handle): Define.
365 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
366 field in lwp.
367 (thread_db_thread_handle): New function.
368
86299109
KB
3692017-09-21 Kevin Buettner <kevinb@redhat.com>
370
371 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
372 * linux-low.h (thread_db_notice_clone): Declare.
373 * thread-db.c (thread_db_notice_clone): New function.
374
f557a88a
PA
3752017-09-21 Pedro Alves <palves@redhat.com>
376
377 * server.c (gdb_read_memory, handle_status, process_serial_event)
378 (handle_serial_event, handle_target_event): Adjust to
379 set_desired_thread prototype change.
380 * target.c (set_desired_thread): Remove 'use_general' parameter
381 and adjust.
382 * target.h (set_desired_thread): Remove 'use_general' parameter.
383
223ffa71
TT
3842017-09-20 Tom Tromey <tom@tromey.com>
385
386 * target.c (target_terminal::terminal_state): Define.
387 (target_terminal::init): Rename from target_terminal_init.
388 (target_terminal::inferior): Rename from
389 target_terminal_inferior.
390 (target_terminal::ours): Rename from target_terminal_ours.
391 (target_terminal::ours_for_output, target_terminal::info): New.
392
04fd3ba9
SM
3932017-09-16 Simon Marchi <simon.marchi@ericsson.com>
394
395 * server.c (accumulate_file_name_length): Remove.
396 (emit_dll_description): Adjust to std::string change.
397 (handle_qxfer_libraries): Use std::string to hold document.
398
5e187554
SM
3992017-09-16 Simon Marchi <simon.marchi@ericsson.com>
400
401 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
402 return type of xml_escape_text.
403 * server.c (emit_dll_description): Likewise.
404
1526853e
SM
4052017-09-16 Simon Marchi <simon.marchi@ericsson.com>
406
407 * server.c (captured_main): Accept argument for --selftest.
408 Update run_tests call.
409 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
410 when registering selftests.
411
c4dfafab
SDJ
4122017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
413
414 * regcache.c (get_thread_regcache): Update code to use "std::vector"
415 instead of "VEC" for "target_desc.reg_defs".
416 (regcache_cpy): Likewise.
417 (registers_to_string): Likewise.
418 (registers_from_string): Likewise.
419 (find_regno): Likewise.
420 (supply_regblock): Likewise.
421 (regcache_raw_read_unsigned): Likewise.
422 * tdesc.c (init_target_desc): Likewise.
423 (tdesc_create_reg): Likewise.
424 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
425 (struct target_desc) <reg_defs>: Convert to "std::vector".
426 (target_desc): Do not initialize "reg_defs".
427 (~target_desc): Update code to use "std::vector" instead of "VEC"
428 for "target_desc.reg_defs".
429 (operator==): Likewise.
430
124aceb4
SM
4312017-09-15 Simon Marchi <simon.marchi@ericsson.com>
432
433 * inferiors.h (thread_to_gdb_id): Remove.
434 * inferiors.c (thread_to_gdb_id): Remove.
435 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
436 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
437 lynx_store_registers, lynx_read_memory, lynx_write_memory):
438 Likewise.
439 * nto-low.c (nto_fetch_registers, nto_store_registers,
440 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
441
96cde54f
SM
4422017-09-15 Simon Marchi <simon.marchi@ericsson.com>
443
444 * inferiors.h (gdb_id_to_thread_id): Remove.
445 * inferiors.c (gdb_id_to_thread_id): Remove.
446 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
447 removal. Move pid declaration closer to where it's used.
448
e8ca139e
SM
4492017-09-15 Simon Marchi <simon.marchi@ericsson.com>
450
451 * server.c (handle_detach): New function.
452 (process_serial_event): Move code out, call handle_detach.
453
f8a4e119
SM
4542017-09-15 Simon Marchi <simon.marchi@ericsson.com>
455
456 * server.c (require_running): Rename to ...
457 (require_running_or_return): ... this ...
458 (require_running_or_break): ... and this.
459 (handle_query, process_serial_event): Adjust.
460
0eb0a407
SM
4612017-09-15 Simon Marchi <simon.marchi@ericsson.com>
462
463 * linux-low.c (linux_set_resume_request): Remove unused
464 variables.
465
785922a5
SM
4662017-09-15 Simon Marchi <simon.marchi@ericsson.com>
467
468 * server.c (first_thread_of): Remove.
469 (process_serial_event): Replace usage of first_thread_of with
470 find_any_thread_of_pid.
471 * tracepoint.c (same_process_p): Remove.
472 (gdb_agent_about_to_close): Replace usage of same_process_p with
473 find_any_thread_of_pid.
474 * linux-x86-low.c (same_process_callback): Remove.
475 (x86_arch_setup_process_callback): Replace usage of
476 same_process_callback with find_any_thread_of_pid.
477 * thread-db.c (any_thread_of): Remove.
478 (switch_to_process): Replace usage of any_thread_of with
479 find_any_thread_of_pid.
480 * inferiors.c (thread_pid_matches_callback): Remove.
481 (find_thread_process): Adjust to use find_any_thread_of_pid.
482
a059f00c
SDJ
4832017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
484
485 * regcache.c (get_thread_regcache): Guard calls to "memset"
486 with "!VEC_empty".
487
cc397f3a
SDJ
4882017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
489
490 * linux-low.c (handle_extended_wait): Use
491 "allocate_target_description" instead of "XNEW".
492 * linux-x86-low.c (initialize_low_arch): Likewise.
493
22916b07
YQ
4942017-09-05 Yao Qi <yao.qi@linaro.org>
495
496 * configure.srv (srv_i386_regobj): Remove.
497 (srv_amd64_regobj): Remove.
498 (srv_regobj): Set it to "" for x86 non-linux targets.
499 * linux-x86-tdesc.c (i386_linux_read_description):
500 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
501 (init_registers_i386): Remove the declaration.
502 (tdesc_i386): Remove the declaration.
503 (lynx_i386_arch_setup): Call i386_create_target_description.
504 * nto-x86-low.c: Likewise.
505 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
506 [!__x86_64__]: include arch/i386.h.
507 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
508
38602d55
YQ
5092017-09-05 Yao Qi <yao.qi@linaro.org>
510
511 * configure.srv (srv_amd64_linux_xmlfiles): Remove
512 i386/amd64-XXX-linux from it.
513
44b886ff
YQ
5142017-09-05 Yao Qi <yao.qi@linaro.org>
515
516 * configure.srv: Empty srv_amd64_linux_regobj if $development is
517 false.
518 (ipa_amd64_linux_regobj): Remove.
519 (ipa_x32_linux_regobj): Remove.
520
b4570e4b
YQ
5212017-09-05 Yao Qi <yao.qi@linaro.org>
522
523 * Makefile.in (arch-amd64.o): New rule.
524 * configure.srv: Append arch-amd64.o.
525 * linux-amd64-ipa.c: Include common/x86-xstate.h.
526 (get_ipa_tdesc): Call amd64_linux_read_description.
527 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
528 and init_registers_amd64_XXX.
529 * linux-x86-low.c (x86_linux_read_description): Call
530 amd64_linux_read_description.
531 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
532 (initialize_low_arch): Don't call init_registers_x32_XXX and
533 init_registers_amd64_XXX.
534 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
535 and tdesc_amd64_XXX.
536 [__x86_64__] (amd64_tdesc_test): New function.
537 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
538 and init_registers_amd64_XXX.
539 * linux-x86-tdesc.c: Include arch/amd64.h.
540 (xcr0_to_tdesc_idx): New function.
541 (i386_linux_read_description): New function.
542 (amd64_get_ipa_tdesc_idx): New function.
543 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
544 (amd64_get_ipa_tdesc): Declare.
545
d1f28ea2
YQ
5462017-09-05 Yao Qi <yao.qi@linaro.org>
547
548 * configure.srv (srv_i386_linux_xmlfiles): Remove
549 i386/i386-XXX-linux.xml from it.
550
25a93583
YQ
5512017-09-05 Yao Qi <yao.qi@linaro.org>
552
553 * configure.srv: Set srv_i386_linux_regobj empty if $development
554 is false.
555 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
556 initialize_low_tdesc.
557 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
558 with #if initialize_low_tdesc.
559 * linux-x86-tdesc-selftest.c: New file.
560 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
561
5f035c07
YQ
5622017-09-05 Yao Qi <yao.qi@linaro.org>
563
564 * Makefile.in (arch-i386.o): New rule.
565 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
566 (x86_64-*-linux*): Likewise.
567 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
568 include arch/i386.h.
569 (i386_linux_read_description): Remove code and call
570 i386_create_target_description.
571 * tdesc.c (allocate_target_description): New function.
572 * tdesc.h (set_tdesc_architecture): Remove declaration.
573 (set_tdesc_osabi): Likewise.
574
0abe8a89
YQ
5752017-09-05 Yao Qi <yao.qi@linaro.org>
576
577 * linux-x86-tdesc.c: Don't include <inttypes.h>.
578 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
579 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
580 .xmltarget.
581 * server.c (get_features_xml): Call tdesc_get_features_xml.
582 * tdesc.c (set_tdesc_architecture): New function.
583 (set_tdesc_osabi): New function.
584 (tdesc_get_features_xml): New function.
585 (tdesc_create_feature): Add an argument.
586 * tdesc.h (struct target_desc) <features>: New field.
587 <arch, osabi>: New field.
588 (~target_desc): xfree features, arch, and osabi.
589 (target_desc::oerator==): Don't compare .xmltarget.
590 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
591 (set_tdesc_osabi): Likewise.
592 (tdesc_get_features_xml): Likewise.
593
0a188386
YQ
5942017-09-05 Yao Qi <yao.qi@linaro.org>
595
596 * linux-x86-tdesc.c: Include selftest.h.
597 (i386_tdesc_test): New function.
598 (initialize_low_tdesc): Call selftests::register_test.
599 * tdesc.h: Include regdef.h.
600 (target_desc): Override operator == and !=.
601
f49ff000
YQ
6022017-09-05 Yao Qi <yao.qi@linaro.org>
603
604 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
605 (ipa_obj): Likewise.
606 * linux-i386-ipa.c: Include common/x86-xstate.h
607 (get_ipa_tdesc): Call i386_linux_read_description.
608 (initialize_low_tracepoint): Don't call init_registers_XXX
609 functions, call initialize_low_tdesc instead.
610 * linux-x86-low.c (x86_linux_read_description): Call
611 i386_linux_read_description.
612 (initialize_low_arch): Don't call init_registers_i386_XXX
613 functions, call initialize_low_tdesc.
614 * linux-x86-tdesc.c: New file.
615 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
616 (i386_get_ipa_tdesc_idx): Declare.
617 (i386_get_ipa_tdesc): Declare.
618 (initialize_low_tdesc): Declare.
619
2b68ef2f
YQ
6202017-09-05 Yao Qi <yao.qi@linaro.org>
621
622 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
623 instead of 0.
624
f7000548
YQ
6252017-09-05 Yao Qi <yao.qi@linaro.org>
626
627 * Makefile.in (IPA_OBJS): Add vec-ipa.o
628 * regcache.c (get_thread_regcache): Use VEC_length.
629 (init_register_cache): Likewise.
630 (regcache_cpy): Likewise.
631 (registers_to_string): Iterate reg_defs via VEC_iterate.
632 (find_regno): Likewise.
633 (find_register_by_number): Use VEC_index.
634 (register_size): Call find_register_by_number.
635 (register_data): Call find_register_by_number.
636 (supply_regblock): Use VEC_length.
637 (regcache_raw_read_unsigned): Likewise.
638 * tdesc.c (init_target_desc): Iterate reg_defs via
639 VEC_iterate.
640 (default_description): Update initializer.
641 (copy_target_description): Don't update field num_registers.
642 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
643 <num_registers>: Remove.
644
50a421ac
SM
6452017-09-04 Simon Marchi <simon.marchi@ericsson.com>
646
647 * Makefile.in (.SECONDARY): Define target.
648
23fdd69e
SM
6492017-09-03 Simon Marchi <simon.marchi@ericsson.com>
650
651 * linux-low.c (linux_wait_1): Adjust.
652 * server.c (queue_stop_reply_callback): Adjust.
653
0a2dde4a
SDJ
6542017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
655
656 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
657 QEnvironmentUnset and QEnvironmentReset packets.
658 (handle_query): Inform remote that QEnvironmentHexEncoded,
659 QEnvironmentUnset and QEnvironmentReset are supported.
660
6afd337d
SM
6612017-08-25 Simon Marchi <simon.marchi@ericsson.com>
662
663 * inferiors.h (inferior_target_data): Rename to ...
664 (thread_target_data): ... this.
665 (inferior_regcache_data): Rename to ...
666 (thread_regcache_data): ... this.
667 (set_inferior_regcache_data): Rename to ...
668 (set_thread_regcache_data): ... this.
669 * inferiors.c (inferior_target_data): Rename to ...
670 (thread_target_data): ... this.
671 (inferior_regcache_data): Rename to ...
672 (thread_regcache_data): ... this.
673 (set_inferior_regcache_data): Rename to ...
674 (set_thread_regcache_data): ... this.
675 (free_one_thread): Update.
676 * linux-low.h (get_thread_lwp): Update.
677 * regcache.c (get_thread_regcache): Update.
678 (regcache_invalidate_thread): Update.
679 (free_register_cache_thread): Update.
680 * win32-i386-low.c (update_debug_registers_callback): Update.
681 (win32_get_current_dr): Update.
682 * win32-low.c (thread_rec): Update.
683 (delete_thread_info): Update.
684 (continue_one_thread): Update.
685 (suspend_one_thread): Update.
686
a160cc46
SM
6872017-08-24 Simon Marchi <simon.marchi@ericsson.com>
688
689 * inferiors.c (set_inferior_target_data): Remove.
690 * inferiors.h (set_inferior_target_data): Remove.
691
6d580b63
YQ
6922017-08-18 Yao Qi <yao.qi@linaro.org>
693
694 * Makefile.in (OBS): Add selftest.o.
695 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
696 * configure, config.in: Re-generated.
697 * server.c: Include common/sefltest.h.
698 (captured_main): Handle option --selftest.
699
f5a29eb0
YQ
7002017-08-09 Yao Qi <yao.qi@linaro.org>
701
702 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
703 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
704 i386-avx-mpx.o and i386-mmx.o.
705 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
706 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
707 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
708 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
709 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
710 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
711 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
712 i386/amd64-avx-mpx.xml.
713
57757c2f
YQ
7142017-08-09 Yao Qi <yao.qi@linaro.org>
715
716 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
717 and x32-avx-avx512.o.
718 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
719 i386/x32-avx-avx512.xml.
720
229d26fc
SM
7212017-07-26 Simon Marchi <simon.marchi@ericsson.com>
722
723 * tracepoint.h (enum class fast_tpoint_collect_result): New
724 enumeration.
725 (fast_tracepoint_collecting): Change return type to
726 fast_tpoint_collect_result.
727 * tracepoint.c (fast_tracepoint_collecting): Likewise.
728 * linux-low.h: Include tracepoint.h.
729 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
730 fast_tpoint_collect_result.
731 * linux-low.c (handle_tracepoints): Adjust.
732 (linux_fast_tracepoint_collecting): Change return type to
733 fast_tpoint_collect_result.
734 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
735 linux_wait_1, stuck_in_jump_pad_callback,
736 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
737 proceed_one_lwp): Adjust to type change.
738
2e1e43e1
YQ
7392017-07-10 Yao Qi <yao.qi@linaro.org>
740
741 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
742
adc764e7
YQ
7432017-06-29 Yao Qi <yao.qi@linaro.org>
744
745 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
746 Remove.
747 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
748
a206891a
SM
7492017-06-20 Simon Marchi <simon.marchi@ericsson.com>
750
751 * Makefile.in (IPA_OBJS): Sort and format one item per line.
752
9a6c7d9c
SDJ
7532017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
754
755 * linux-low.c (linux_create_inferior): Adjust code to access the
756 environment information via 'gdb_environ' class.
757 * lynx-low.c (lynx_create_inferior): Likewise.
758 * server.c (our_environ): Make it an instance of 'gdb_environ'.
759 (get_environ): Return a pointer to 'our_environ'.
760 (captured_main): Initialize 'our_environ'.
761 * server.h (get_environ): Adjust prototype.
762 * spu-low.c (spu_create_inferior): Adjust code to access the
763 environment information via 'gdb_environ' class.
764
ae3e2ccf
SM
7652017-06-17 Simon Marchi <simon.marchi@ericsson.com>
766
767 * linux-low.c (linux_read_memory, linux_write_memory): Remove
768 usage of "register" keyword.
769
3e019bdc
SM
7702017-06-17 Simon Marchi <simon.marchi@ericsson.com>
771
772 * configure: Re-generate.
773
8465943a
SM
7742017-06-17 Simon Marchi <simon.marchi@ericsson.com>
775
776 * configure: Re-generate.
777
cf0dd6f0
SM
7782017-06-17 Simon Marchi <simon.marchi@ericsson.com>
779
780 * Makefile.in (COMPILE.pre): Add "-x c++".
781
9845682b
SDJ
7822017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
783
784 * fork-child.c: Conditionally include <signal.h>.
785
aefd8b33
SDJ
7862017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
787
788 * server.c (handle_general_set): Handle new packet
789 "QStartupWithShell".
790 (handle_query): Add "QStartupWithShell" to the list of supported
791 packets.
792 (gdbserver_usage): Add help text explaining the
793 new "--startup-with-shell" and "--no-startup-with-shell" CLI
794 options.
795 (captured_main): Recognize and act upon the presence of the new
796 CLI options.
797
2090129c
SDJ
7982017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
799 Pedro Alves <palves@redhat.com>
800
801 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
802 * configure: Regenerate.
803 * configure.srv (srv_linux_obj): Add "fork-child.o" and
804 "fork-inferior.o".
805 (i[34567]86-*-lynxos*): Likewise.
806 (spu*-*-*): Likewise.
807 * fork-child.c: New file.
808 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
809 and "environ.h".
810 (linux_ptrace_fun): New function.
811 (linux_create_inferior): Adjust function prototype to reflect
812 change on "target.h". Adjust function code to use
813 "fork_inferior".
814 (linux_request_interrupt): Delete "signal_pid".
815 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
816 (lynx_ptrace_fun): New function.
817 (lynx_create_inferior): Adjust function prototype to reflect
818 change on "target.h". Adjust function code to use
819 "fork_inferior".
820 * nto-low.c (nto_create_inferior): Adjust function prototype and
821 code to reflect change on "target.h". Update comments.
822 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
823 "common-terminal.h" and "environ.h".
824 (terminal_fd): Moved to fork-child.c.
825 (old_foreground_pgrp): Likewise.
826 (restore_old_foreground_pgrp): Likewise.
827 (last_status): Make it global.
828 (last_ptid): Likewise.
829 (our_environ): New variable.
830 (startup_with_shell): Likewise.
831 (program_name): Likewise.
832 (program_argv): Rename to...
833 (program_args): ...this.
834 (wrapper_argv): New variable.
835 (start_inferior): Delete function.
836 (get_exec_wrapper): New function.
837 (get_exec_file): Likewise.
838 (get_environ): Likewise.
839 (prefork_hook): Likewise.
840 (post_fork_inferior): Likewise.
841 (postfork_hook): Likewise.
842 (postfork_child_hook): Likewise.
843 (handle_v_run): Update code to deal with arguments coming from the
844 remote host. Update calls from "start_inferior" to
845 "create_inferior".
846 (captured_main): Likewise. Initialize environment variable. Call
847 "have_job_control".
848 * server.h (post_fork_inferior): New prototype.
849 (get_environ): Likewise.
850 (last_status): Declare.
851 (last_ptid): Likewise.
852 (signal_pid): Likewise.
853 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
854 (spu_ptrace_fun): New function.
855 (spu_create_inferior): Adjust function prototype to reflect change
856 on "target.h". Adjust function code to use "fork_inferior".
857 * target.c (target_terminal_init): New function.
858 (target_terminal_inferior): Likewise.
859 (target_terminal_ours): Likewise.
860 * target.h: Include <vector>.
861 (struct target_ops) <create_inferior>: Update prototype.
862 (create_inferior): Update macro.
863 * utils.c (gdb_flush_out_err): New function.
864 * win32-low.c (win32_create_inferior): Adjust function prototype
865 and code to reflect change on "target.h".
866
043a4934
SDJ
8672017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
868
869 * inferiors.c (switch_to_thread): New function.
870
15652511
SDJ
8712017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
872
873 * Makefile.in (SFILE): Add "common/job-control.c".
874 (OBS): Add "job-control.o".
875
21ea5acd
SDJ
8762017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
877
878 * Makefile: Remove "@host_makefile_frag@".
879
e13cb306
PA
8802017-05-05 Pedro Alves <palves@redhat.com>
881
882 * configure: Regenerate.
883
c94fee56
SDJ
8842017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
885
886 * configure: Regenerate.
887
a0ff9e1a
SM
8882017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
889
890 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
891 software_single_step change of return type to
892 std::vector<CORE_ADDR>.
893 * linux-low.c (install_software_single_step_breakpoints):
894 Likewise.
895 * linux-low.h (install_software_single_step_breakpoints):
896 Likewise.
897
be628ab8
SDJ
8982017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
899
900 * remote-utils.c: Include "gdb_termios.h" instead of
901 "terminal.h".
902 * terminal.h: Delete file.
903
7c5ded6a
SDJ
9042017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
905
906 * server.c: Include <vector>.
907 <program_argv, wrapper_argv>: Convert to std::vector.
908 (start_inferior): Rewrite function to use C++.
909 (handle_v_run): Likewise. Update code that calculates the argv
910 based on the vRun packet; use C++.
911 (captured_main): Likewise.
912
436252de
SM
9132017-04-06 Simon Marchi <simon.marchi@ericsson.com>
914
915 * server.c (handle_v_cont): Initialize thread_resume::thread
916 with null_ptid.
917
9bf2a700
PA
9182017-04-05 Pedro Alves <palves@redhat.com>
919
920 * configure: Regenerate.
921
a121b7c1
PA
9222017-04-05 Pedro Alves <palves@redhat.com>
923
924 * gdbreplay.c (sync_error): Constify.
925 * linux-x86-low.c (push_opcode): Constify.
926
21c8a587
PA
9272017-04-05 Pedro Alves <palves@redhat.com>
928
929 * win32-low.c (get_child_debug_event)
930 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
931 Report TARGET_WAITKIND_SPURIOUS instead.
932
fb32b4f7
PA
9332017-04-05 Pedro Alves <palves@redhat.com>
934
935 * remote-utils.c (remote_prepare, remote_open): Constify.
936 * remote-utils.h (remote_prepare, remote_open): Constify.
937 * server.c (captured_main): Constify 'port' handling.
938
65dd1e59
SM
9392017-04-04 Simon Marchi <simon.marchi@ericsson.com>
940
941 * Makefile.in (clean): Clear .deps.
942
8fa5b777
SM
9432017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
944
945 * .gitignore: Remove generated files, replace with wildcard.
946 * (clean): Replace removal of generated files with wildcard.
947 (version.c): Replace with...
948 (version-generated.c): ...this.
949 (xml-builtin.c): Replace with...
950 (xml-builtin-generated.c): ...this.
951 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
952 (%.c: *regformats*): Replace with...
953 (%-generated.c: *regformats*): ...this.
954
a12e714b
MF
9552017-03-27 Max Filippov <jcmvbkbc@gmail.com>
956
957 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
958 (xtensa_fill_gregset): Call collect_register_by_name for
959 threadptr register.
960 (xtensa_store_gregset): Call supply_register_by_name for
961 threadptr register.
962
1a09b50a
MF
9632017-03-27 Max Filippov <jcmvbkbc@gmail.com>
964
965 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
966 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
967 (xtensa_store_gregset): Call supply_register for all registers in
968 a0_regnum..a0_regnum + C0_NREGS range.
969
1a01e7c6
SM
9702017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
971
972 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
973 (ax-ipa.o: ax.c): Remove.
974 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
975 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
976 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
977 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
978 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
979
36bc18a8
SM
9802017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
981
982 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
983 (print-utils-ipa.o: ../common/print-utils.c): Remove.
984 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
985 (errors-ipa.o: ../common/errors.c): Remove.
986 (format-ipa.o: ../common/format.c): Remove.
987 (common-utils-ipa.o: ../common/common-utils.c): Remove.
988
a8ebe3d5
SM
9892017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
990
991 * Makefile.in (%-ipa.o: %.c): New rule.
992 (tracepoint-ipa.o: tracepoint.c): Remove.
993 (utils-ipa.o: utils.c): Remove.
994 (remote-utils-ipa.o: remote-utils.c): Remove.
995 (regcache-ipa.o: regcache.c): Remove.
996 (i386-linux-ipa.o: i386-linux.c): Remove.
997 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
998 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
999 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1000 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1001 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1002 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1003 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1004 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1005 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1006 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1007 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1008 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1009 (aarch64-ipa.o: aarch64.c): Remove.
1010 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1011 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1012 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1013 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1014 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1015 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1016 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1017 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1018 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1019 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1020 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1021 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1022 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1023 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1024 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1025 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1026 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1027 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1028 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1029 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1030 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1031 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1032 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1033 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1034 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1035 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1036 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1037 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1038 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1039 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1040 (tdesc-ipa.o: tdesc.c): Remove.
1041 (x32-linux-ipa.o: x32-linux.c): Remove.
1042 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1043 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1044
50cfacb7
SM
10452017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1046
1047 * Makefile.in (%.o: ../arch/%.c): New rule.
1048 (arm.o: ../arch/arm.c): Remove.
1049 (arm-linux.o: ../arch/arm-linux.c): Remove.
1050 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1051 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1052
c5a22423
SM
10532017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1054
1055 * Makefile.in (%.o: ../nat/%.c): New rule.
1056 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1057 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1058 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1059 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1060 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1061 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1062 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1063 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1064 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1065 (linux-personality.o: ../nat/linux-personality.c): Remove.
1066 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1067 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1068 (x86-linux.o: ../nat/x86-linux.c): Remove.
1069 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1070 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1071
6bda016b
SM
10722017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1073
1074 * Makefile.in (%.o: ../common/%.c): New rule.
1075 (signals.o: ../common/signals.c): Remove.
1076 (print-utils.o: ../common/print-utils.c): Remove.
1077 (rsp-low.o: ../common/rsp-low.c): Remove.
1078 (common-utils.o: ../common/common-utils.c): Remove.
1079 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1080 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1081 (vec.o: ../common/vec.c): Remove.
1082 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1083 (xml-utils.o: ../common/xml-utils.c): Remove.
1084 (ptid.o: ../common/ptid.c): Remove.
1085 (buffer.o: ../common/buffer.c): Remove.
1086 (format.o: ../common/format.c): Remove.
1087 (filestuff.o: ../common/filestuff.c): Remove.
1088 (agent.o: ../common/agent.c): Remove.
1089 (errors.o: ../common/errors.c): Remove.
1090 (environ.o: ../common/environ.c): Remove.
1091 (common-debug.o: ../common/common-debug.c): Remove.
1092 (cleanups.o: ../common/cleanups.c): Remove.
1093 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1094 (fileio.o: ../common/fileio.c): Remove.
1095 (common-regcache.o: ../common/common-regcache.c): Remove.
1096 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1097 (new-op.o: ../common/new-op.c): Remove.
1098 (btrace-common.o: ../common/btrace-common.c): Remove.
1099
21122961
SM
11002017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1101
1102 * Makefile.in (%.o: ../target/%.c): New rule.
1103 (waitstatus.o: ../target/waitstatus.c): Remove.
1104
c362e621
SM
11052017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1106
1107 * Makefile.in
1108 (%.c: ../regformats/%.dat,
1109 (%.c: ../regformats/arm/%.dat,
1110 (%.c: ../regformats/i386/%.dat,
1111 (%.c: ../regformats/rs6000/%.dat): New rules.
1112 (aarch64.c): Remove.
1113 (reg-arm.c): Remove.
1114 (arm-with-iwmmxt.c): Remove.
1115 (arm-with-vfpv2.c): Remove.
1116 (arm-with-vfpv3.c): Remove.
1117 (arm-with-neon.c): Remove.
1118 (reg-bfin.c): Remove.
1119 (reg-cris.c): Remove.
1120 (reg-crisv32.c): Remove.
1121 (i386.c): Remove.
1122 (i386-linux.c): Remove.
1123 (i386-avx.c): Remove.
1124 (i386-avx-linux.c): Remove.
1125 (i386-avx-avx512.c): Remove.
1126 (i386-avx-avx512-linux.c): Remove.
1127 (i386-mpx.c): Remove.
1128 (i386-mpx-linux.c): Remove.
1129 (i386-avx-mpx-avx512-pku.c): Remove.
1130 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1131 (i386-avx-mpx.c): Remove.
1132 (i386-avx-mpx-linux.c): Remove.
1133 (i386-mmx.c): Remove.
1134 (i386-mmx-linux.c): Remove.
1135 (reg-ia64.c): Remove.
1136 (reg-m32r.c): Remove.
1137 (reg-m68k.c): Remove.
1138 (reg-cf.c): Remove.
1139 (mips-linux.c): Remove.
1140 (mips-dsp-linux.c): Remove.
1141 (mips64-linux.c): Remove.
1142 (mips64-dsp-linux.c): Remove.
1143 (nios2-linux.c): Remove.
1144 (powerpc-32.c): Remove.
1145 (powerpc-32l.c): Remove.
1146 (powerpc-altivec32l.c): Remove.
1147 (powerpc-cell32l.c): Remove.
1148 (powerpc-vsx32l.c): Remove.
1149 (powerpc-isa205-32l.c): Remove.
1150 (powerpc-isa205-altivec32l.c): Remove.
1151 (powerpc-isa205-vsx32l.c): Remove.
1152 (powerpc-e500l.c): Remove.
1153 (powerpc-64l.c): Remove.
1154 (powerpc-altivec64l.c): Remove.
1155 (powerpc-cell64l.c): Remove.
1156 (powerpc-vsx64l.c): Remove.
1157 (powerpc-isa205-64l.c): Remove.
1158 (powerpc-isa205-altivec64l.c): Remove.
1159 (powerpc-isa205-vsx64l.c): Remove.
1160 (s390-linux32.c): Remove.
1161 (s390-linux32v1.c): Remove.
1162 (s390-linux32v2.c): Remove.
1163 (s390-linux64.c): Remove.
1164 (s390-linux64v1.c): Remove.
1165 (s390-linux64v2.c): Remove.
1166 (s390-te-linux64.c): Remove.
1167 (s390-vx-linux64.c): Remove.
1168 (s390-tevx-linux64.c): Remove.
1169 (s390x-linux64.c): Remove.
1170 (s390x-linux64v1.c): Remove.
1171 (s390x-linux64v2.c): Remove.
1172 (s390x-te-linux64.c): Remove.
1173 (s390x-vx-linux64.c): Remove.
1174 (s390x-tevx-linux64.c): Remove.
1175 (tic6x-c64xp-linux.c): Remove.
1176 (tic6x-c64x-linux.c): Remove.
1177 (tic6x-c62x-linux.c): Remove.
1178 (reg-sh.c): Remove.
1179 (reg-sparc64.c): Remove.
1180 (reg-spu.c): Remove.
1181 (amd64.c): Remove.
1182 (amd64-linux.c): Remove.
1183 (amd64-avx.c): Remove.
1184 (amd64-avx-linux.c): Remove.
1185 (amd64-avx-avx512.c): Remove.
1186 (amd64-avx-avx512-linux.c): Remove.
1187 (amd64-mpx.c): Remove.
1188 (amd64-mpx-linux.c): Remove.
1189 (amd64-avx-mpx-avx512-pku.c): Remove.
1190 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1191 (amd64-avx-mpx.c): Remove.
1192 (amd64-avx-mpx-linux.c): Remove.
1193 (x32.c): Remove.
1194 (x32-linux.c): Remove.
1195 (x32-avx.c): Remove.
1196 (x32-avx-linux.c): Remove.
1197 (x32-avx-avx512.c): Remove.
1198 (x32-avx-avx512-linux.c): Remove.
1199 (reg-xtensa.c): Remove.
1200 (reg-tilegx.c): Remove.
1201 (reg-tilegx32.c): Remove.
1202
1672e0d9
SDJ
12032017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1204
1205 * Makefile.in (SFILES): Add "common/environ.c".
1206 (OBJS): Add "common/environ.h".
1207
239b6d10
WT
12082017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1209
1210 * configure.ac: Check if the fs_base and gs_base members of
1211 `struct user_regs_struct' exist.
1212 * config.in: Regenerated.
1213 * configure: Likewise.
1214
694b382c
AT
12152017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1216
1217 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1218 target_read_memory.
1219 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1220 (get_next_pcs_syscall_next_pc): Likewise.
1221
7dc53023
LM
12222016-12-23 Luis Machado <lgustavo@codesourcery.com>
1223
1224 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1225 * nto-x86-low.c: Likewise.
1226
ad02e4fe
SM
12272016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1228
1229 * Makefile.in: Include disable-implicit-rules.mk.
1230
dcb07cfa
PA
12312016-11-23 Pedro Alves <palves@redhat.com>
1232
1233 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1234 (debug_vprintf): Use std::chrono::steady_clock instead of
1235 gettimeofday. Use '.' instead of ':'.
1236 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1237 (get_timestamp): Use std::chrono::steady_clock instead of
1238 gettimeofday.
1239
8629c02c
SM
12402016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1241
1242 * Makefile.in: Fix whitespace formatting.
1243
b593ecca
SM
12442016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1245
1246 * Makefile.in (SFILES, OBS): Flatten list and order
1247 alphabetically.
1248
9986ba08
PA
12492016-11-23 Pedro Alves <palves@redhat.com>
1250
1251 * event-loop.c (handle_file_event): Use warning.
1252 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1253 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1254 Use warning.
1255
4eefa7bc
PA
12562016-11-23 Pedro Alves <palves@redhat.com>
1257
1258 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1259 output.
1260 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1261 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1262 debug_printf and debug_flush for debug output.
1263 * server.c (handle_general_set): Likewise.
1264 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1265 output.
1266
5443506e
SM
12672016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1268
1269 * Makefile.in (.c.o): Replace rule with ...
1270 (%.o: %.c): ... this one.
1271
3b165252
SM
12722016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1273
1274 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1275 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1276 make.
1277 * configure.ac: Remove checks for the make program.
1278 * configure: Re-generate.
1279
0bcda685
PA
12802016-10-28 Pedro Alves <palves@redhat.com>
1281
1282 * Makefile.in (CXX_DIALECT): Get from configure.
1283 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1284 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1285 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1286 * config.in: Regenerate.
1287 * configure: Regenerate.
1288
c3805894
YQ
12892016-10-27 Yao Qi <yao.qi@linaro.org>
1290
1291 * linux-low.c (linux_supports_range_stepping): Return true if
1292 can_software_single_step return true.
1293
89342618
YQ
12942016-10-27 Yao Qi <yao.qi@linaro.org>
1295
1296 * inferiors.c (find_inferior_in_random): New function.
1297 * inferiors.h (find_inferior_in_random): Declare.
1298 * linux-low.c (linux_wait_for_event_filtered): Call
1299 find_inferior_in_random instead of find_inferior.
1300
e3652c84
YQ
13012016-10-27 Yao Qi <yao.qi@linaro.org>
1302
1303 * linux-low.c (linux_wait_1): If single-step breakpoints are
1304 inserted, remove them.
1305
5a04c4cf
PA
13062016-10-26 Pedro Alves <palves@redhat.com>
1307
1308 * linux-low.c (handle_extended_wait): Link parent/child fork
1309 threads.
1310 (linux_wait_1): Unlink them.
1311 (linux_set_resume_request): Ignore resume requests for
1312 already-resumed and unhandled fork child threads.
1313 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1314 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1315 New functions.
1316 (handle_v_requests) <vCont>: Don't call require_running.
1317 * server.h (in_queued_stop_replies): New declaration.
1318
cb93dc7f
YQ
13192016-10-24 Yao Qi <yao.qi@linaro.org>
1320
1321 PR server/20733
1322 * linux-aarch64-low.c (append_insns): Cast the return value to
1323 'uint32_t *'.
1324
a1078bea
YQ
13252016-10-10 Yao Qi <yao.qi@linaro.org>
1326
1327 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1328
1fb77080
SDJ
13292016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1330
1331 * target.c (target_supports_multi_process): New function, moved
1332 from...
1333 * target.h (target_supports_multi_process): ... here. Remove
1334 macro.
1335
39b5a3b9
TT
13362016-10-05 Tom Tromey <tom@tromey.com>
1337
1338 PR remote/20655:
1339 * tracepoint.c (handle_tracepoint_bkpts): Check
1340 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1341
c1d0b70a
YQ
13422016-10-05 Yao Qi <yao.qi@linaro.org>
1343
1344 * configure.srv: Update the path of arm-*.xml files.
1345
0a69eedb
YQ
13462016-10-05 Terry Guo <terry.guo@arm.com>
1347 Yao Qi <yao.qi@linaro.org>
1348
1349 * Makefile.in: Adjust the path of rules.
1350 * configure.srv: Update the path of xml files.
1351 * regformats/arm-with-iwmmxt.dat: Regenerated.
1352 * regformats/arm-with-neon.dat: Likewise.
1353 * regformats/arm-with-vfpv2.dat: Likewise.
1354 * regformats/arm-with-vfpv3.dat Likewise.
1355
17e16485
YQ
13562016-09-30 Yao Qi <yao.qi@linaro.org>
1357
1358 PR gdbserver/20627
1359 * target.c (target_stop_and_wait): Don't call
1360 target_continue_no_signal, use resume_stop instead.
1361
edeeb602
YQ
13622016-09-26 Yao Qi <yao.qi@linaro.org>
1363
1364 * linux-low.c (linux_wait_1): Call debug_exit.
1365
503b1c39
PA
13662016-09-23 Pedro Alves <palves@redhat.com>
1367
1368 * Makefile.in (SFILES): Add common/new-op.c.
1369 (OBS): Add common/new-op.o.
1370 (new-op.o): New rule.
1371
74172ecf
SM
13722016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1373
1374 * .gitinore: Ignore more files.
1375
fc6cda2e
YQ
13762016-09-21 Yao Qi <yao.qi@linaro.org>
1377
1378 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1379 23.
1380
bc1e6c81
SDJ
13812016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1382
1383 * server.c (start_inferior): Call target_mourn_inferior instead of
1384 mourn_inferior; pass ptid_t argument to it.
1385 (resume): Likewise.
1386 (handle_target_event): Likewise.
1387 * target.c (target_mourn_inferior): New function.
1388 * target.h (mourn_inferior): Delete macro.
1389
0e00e962
AA
13902016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1391
1392 * linux-low.c (lwp_is_stepping): New function.
1393
1d8cb77d
CL
13942016-09-06 Carl Love <cel@us.ibm.com>
1395
1396 * server.c (start_inferior): Fixed comment, requested comment change
1397 didn't get updated correctly. Removed reference to ptrace () call as
1398 it is only true on Linux systems.
1399
7313bced
CL
14002016-09-06 Carl Love <cel@us.ibm.com>
1401
1402 * server.c (start_inferior): Do not call
1403 function target_post_create_inferior () if the
1404 inferior process has already exited.
1405
cf6de44d
PA
14062016-09-05 Pedro Alves <palves@redhat.com>
1407
1408 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1409 (COMPILE.pre, CC_LD): Use CXX directly.
1410 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1411 * acinclude.m4: Don't include build-with-cxx.m4.
1412 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1413 * configure: Regenerate.
1414
c1da6748
AT
14152016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1416
1417 PR gdb/19495
1418 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1419 call writing data to own_buf.
1420
f2b9e3df
SDJ
14212016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1422
1423 * target.c (mywait): Call target_wait instead of
1424 the_target->wait.
1425 (target_wait): New function.
1426
049a8570
SDJ
14272016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1428
1429 * server.c (start_inferior): New variable 'ptid'. Replace calls
1430 to the_target->resume by target_continue{,_no_signal}, depending
1431 on the case.
1432 * target.c (target_stop_and_wait): Call target_continue_no_signal
1433 instead of the_target->resume.
1434 (target_continue): New function.
1435
3aa5cfa0
AT
14362016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1437
1438 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1439
754653a7
AZ
14402016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1441
1442 PR server/20491
1443 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1444 ps_prochandle.
1445 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1446 * linux-arm-low.c (ps_get_thread_area): Likewise.
1447 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1448 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1449 * linux-mips-low.c (ps_get_thread_area): Likewise.
1450 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1451 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1452 * linux-x86-low.c (ps_get_thread_area): Likewise.
1453 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1454
ed036b40
PA
14552016-08-19 Pedro Alves <palves@redhat.com>
1456
1457 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1458
c8ef42ee
PA
14592016-08-19 Pedro Alves <palves@redhat.com>
1460
1461 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1462 comment. Use memcpy instead of casting through unsigned long.
1463
9c235a72
PA
14642016-08-19 Pedro Alves <palves@redhat.com>
1465
1466 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1467 allocating around 0x80000000.
1468
201506da
PA
14692016-08-19 Pedro Alves <palves@redhat.com>
1470
1471 PR gdb/20415
1472 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1473 (x32-avx512-linux-ipa.o): New rules.
1474 * configure.ac (x86_64-*-linux*): New x32 check.
1475 * configure.srv (ipa_x32_linux_regobj): New.
1476 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1477 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1478 descriptions.
1479 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1480 descriptions.
1481 * configure: Regenerate.
1482
f348d89a
PA
14832016-08-09 Pedro Alves <palves@redhat.com>
1484
1485 PR gdb/18653
1486 * Makefile.in (OBS): Add signals-state-save-restore.o.
1487 (signals-state-save-restore.o): New rule.
1488 * config.in: Regenerate.
1489 * configure: Regenerate.
1490 * linux-low.c: Include "signals-state-save-restore.h".
1491 (linux_create_inferior): Call
1492 restore_original_signals_state.
1493 * server.c: Include "dispositions-save-restore.h".
1494 (captured_main): Call save_original_signals_state.
1495
1baf5149
PA
14962016-08-05 Pedro Alves <palves@redhat.com>
1497
1498 * configure: Regenerate.
1499
fcd4a73d
YQ
15002016-08-04 Yao Qi <yao.qi@linaro.org>
1501
1502 * linux-low.c (regsets_fetch_inferior_registers): Check
1503 errno is ESRCH or not.
1504
979659d0
YQ
15052016-08-02 Yao Qi <yao.qi@linaro.org>
1506
1507 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1508 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1509 (thread_db_load_search): Update.
1510 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1511 td_ta_set_event and td_ta_event_getmsg.
1512
6598661d
PA
15132016-07-26 Pedro Alves <palves@redhat.com>
1514
1515 PR server/20414
1516 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1517 of unsigned long for 64-bit registers and use uint32_t instead of
1518 unsigned int for 32-bit registers.
1519
9cf12d57
PA
15202016-07-26 Pedro Alves <palves@redhat.com>
1521
1522 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1523 to 'ptrace'.
1524
305450ed
TT
15252016-07-21 Tom Tromey <tom@tromey.com>
1526
1527 * configure: Rebuild.
1528
2583da7c
YQ
15292016-07-21 Yao Qi <yao.qi@linaro.org>
1530
1531 * mem-break.c (find_gdb_breakpoint): Cast bp to
1532 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1533
21536b36
YQ
15342016-07-21 Yao Qi <yao.qi@linaro.org>
1535
1536 * server.c (handle_v_requests): Support s and S actions
1537 if target_supports_software_single_step return true.
1538
8901d193
YQ
15392016-07-21 Yao Qi <yao.qi@linaro.org>
1540
1541 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1542 is resume_step, call maybe_hw_step.
1543 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1544 and unstop them.
1545 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1546 breakpoints or not.
1547 (proceed_one_lwp): If resume request is resume_step, install
1548 reinsert breakpoints and call maybe_hw_step.
1549
0e9a339e
YQ
15502016-07-21 Yao Qi <yao.qi@linaro.org>
1551
1552 * linux-low.c (proceed_one_lwp): Declare.
1553 (linux_resume_one_thread): Remove local variable 'step'.
1554 Lift code enqueue signal. Call proceed_one_lwp instead of
1555 linux_resume_one_lwp.
1556
4281b351
YQ
15572016-07-21 Yao Qi <yao.qi@linaro.org>
1558
1559 * linux-low.c (linux_resume_one_thread): Call
1560 enqueue_pending_signal.
1561
984a2c04
YQ
15622016-07-21 Yao Qi <yao.qi@linaro.org>
1563
1564 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1565 * inferiors.c (do_restore_current_thread_cleanup): New function.
1566 (make_cleanup_restore_current_thread): Likewise.
1567 * linux-low.c (install_software_single_step_breakpoints): Call
1568 make_cleanup_restore_current_thread. Switch current_thread to
1569 thread.
1570
bec903c9
YQ
15712016-07-21 Yao Qi <yao.qi@linaro.org>
1572
1573 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1574 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1575 (clone_one_breakpoint): Likewise.
1576 (delete_reinsert_breakpoints): Change parameter to thread.
1577 Callers updated.
1578 (has_reinsert_breakpoints): Likewise.
1579 (uninsert_reinsert_breakpoints): Likewise.
1580 (reinsert_reinsert_breakpoints): Likewise.
1581 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1582 (delete_reinsert_breakpoints): Likewise.
1583 (reinsert_reinsert_breakpoints): Likewise.
1584 (uninsert_reinsert_breakpoints): Likewise.
1585 (has_reinsert_breakpoints): Likewise.
1586
63c40ec7
YQ
15872016-07-21 Yao Qi <yao.qi@linaro.org>
1588
1589 * inferiors.c (get_thread_process): Make parameter const.
1590 * inferiors.h (get_thread_process): Update declaration.
1591 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1592 Add new parameters child_thread and parent_thread. Callers
1593 updated.
1594 * mem-break.h (clone_all_breakpoints): Update declaration.
1595
9aa76cd0
YQ
15962016-07-21 Yao Qi <yao.qi@linaro.org>
1597
1598 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1599 <command_list, handler>: Remove.
1600 (struct gdb_breakpoint): New.
1601 (struct other_breakpoint): New.
1602 (struct reinsert_breakpoint): New.
1603 (is_gdb_breakpoint): New function.
1604 (any_persistent_commands): Update command_list if
1605 is_gdb_breakpoint returns true.
1606 (set_breakpoint): Create breakpoints according to their types.
1607 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1608 (set_gdb_breakpoint_1): Likewise.
1609 (set_gdb_breakpoint): Likewise.
1610 (clear_breakpoint_conditions): Change parameter type to
1611 'struct gdb_breakpoint *'.
1612 (clear_breakpoint_commands): Likewise.
1613 (clear_breakpoint_conditions_and_commands): Likewise.
1614 (add_condition_to_breakpoint): Likewise.
1615 (add_breakpoint_condition): Likewise.
1616 (add_commands_to_breakpoint): Likewise.
1617 (check_breakpoints): Check other_breakpoint.
1618 (clone_one_breakpoint): Clone breakpopint according to its type.
1619 * mem-break.h (struct gdb_breakpoint): Declare.
1620 (set_gdb_breakpoint): Update declaration.
1621 (clear_breakpoint_conditions_and_commands): Likewise.
1622 (add_breakpoint_condition): Likewise.
1623 (add_breakpoint_commands): Likewise.
1624 * server.c (process_point_options): Change parameter type to
1625 'struct gdb_breakpoint *'.
1626
811f8301
YQ
16272016-07-21 Yao Qi <yao.qi@linaro.org>
1628
1629 * mem-break.c (set_breakpoint_at): Rename it to ...
1630 (set_breakpoint_type_at): ... it.
1631 (set_breakpoint_at): Call set_breakpoint_type_at.
1632 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1633 * mem-break.h (set_breakpoint_at): Update comments.
1634
b1c51e36
CLT
16352016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1636
1637 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1638 to buf parameter.
1639 (nios2_store_gregset): Likewise.
1640
ced2dffb
PA
16412016-07-01 Pedro Alves <palves@redhat.com>
1642 Antoine Tremblay <antoine.tremblay@ericsson.com>
1643
1644 * linux-low.c: Change interface to take the target lwp_info
1645 pointer directly and return void. Handle detaching from a zombie
1646 thread.
1647 (linux_detach_lwp_callback): New function.
1648 (linux_detach): Detach from the leader thread after detaching from
1649 the clone threads.
1650
2ac09a5b
YQ
16512016-06-28 Yao Qi <yao.qi@linaro.org>
1652
1653 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1654 for variable new_offset.
1655 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1656 (aarch64_ftrace_insn_reloc_cb): Likewise.
1657 (aarch64_ftrace_insn_reloc_tb): Likewise.
1658 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1659 PRIx64 instead of PRIx32.
1660
79e7fd4f
YQ
16612016-06-28 Yao Qi <yao.qi@linaro.org>
1662
1663 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1664 (the_low_target): Install arm_get_syscall_trapinfo.
1665
061fc021
YQ
16662016-06-28 Yao Qi <yao.qi@linaro.org>
1667
1668 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1669 function.
1670 (the_low_target): Install aarch64_get_syscall_trapinfo.
1671
4cc32bec
YQ
16722016-06-28 Yao Qi <yao.qi@linaro.org>
1673
1674 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1675 Callers updated.
1676 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1677 Remove parameter sysno.
1678 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1679 sysret.
1680
782c1122
AA
16812016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1682
1683 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1684 (s390_emit_ne_goto): Likewise.
1685 (s390_emit_lt_goto): Likewise.
1686 (s390_emit_le_goto): Likewise.
1687 (s390_emit_gt_goto): Likewise.
1688 (s390_emit_ge_goto): Likewise.
1689 (s390x_emit_eq_goto): Likewise.
1690 (s390x_emit_ne_goto): Likewise.
1691 (s390x_emit_lt_goto): Likewise.
1692 (s390x_emit_le_goto): Likewise.
1693 (s390x_emit_gt_goto): Likewise.
1694 (s390x_emit_ge_goto): Likewise.
1695 (s390_emit_ops_impl): Mark variable static.
1696 (s390x_emit_ops): Likewise.
1697
2e7b624b
YQ
16982016-06-17 Yao Qi <yao.qi@linaro.org>
1699
1700 * linux-low.c (handle_extended_wait): Call
1701 uninsert_reinsert_breakpoints for the parent process. Remove
1702 reinsert breakpoints from the child process. Reinsert them to
1703 the parent process when vfork is done.
1704 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1705 (reinsert_reinsert_breakpoints): New function.
1706 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1707 (reinsert_reinsert_breakpoints): Declare.
1708
8a81c5d7
YQ
17092016-06-17 Yao Qi <yao.qi@linaro.org>
1710
1711 * linux-low.c (handle_extended_wait): If the parent is doing
1712 step-over, remove the reinsert breakpoints from the forked child.
1713
f50bf8e5
YQ
17142016-06-17 Yao Qi <yao.qi@linaro.org>
1715
1716 * linux-low.c (unsuspend_all_lwps): Declare.
1717 (linux_low_filter_event): If thread exited, call finish_step_over.
1718 If step-over is finished, unsuspend other threads.
1719
8376a3cb
YQ
17202016-06-17 Yao Qi <yao.qi@linaro.org>
1721
1722 * linux-low.c (linux_resume_one_lwp_throw): Assert
1723 has_reinsert_breakpoints returns false.
1724 * mem-break.c (delete_disabled_breakpoints): Assert
1725 bp type isn't reinsert_breakpoint.
1726
f79b145d
YQ
17272016-06-17 Yao Qi <yao.qi@linaro.org>
1728
1729 * linux-low.c (maybe_hw_step): New function.
1730 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1731 (finish_step_over): Switch current_thread to lwp temporarily,
1732 and assert has_reinsert_breakpoints returns true.
1733 (proceed_one_lwp): Call maybe_hw_step.
1734 * mem-break.c (has_reinsert_breakpoints): New function.
1735 * mem-break.h (has_reinsert_breakpoints): Declare.
1736
0ae534d2
JT
17372016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1738
1739 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1740
fcdad592
YQ
17412016-05-17 Yao Qi <yao.qi@linaro.org>
1742
1743 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1744 instead of find_inferior.
1745
9e784964
YQ
17462016-05-05 Yao Qi <yao.qi@linaro.org>
1747
1748 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1749 Initialize res to zero.
1750
cf2ebb6e
YQ
17512016-05-05 Yao Qi <yao.qi@linaro.org>
1752
1753 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1754 to uint32_t.
1755
c1aebf87
UW
17562016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1757
1758 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1759 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1760 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1761
35fd2deb 17622016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1763 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1764
1765 * tracepoint.c (write_inferior_int8): New function.
1766 (cmd_qtenable_disable): Write enable flag using
1767 write_inferior_int8.
1768
484b3c32
YQ
17692016-04-25 Yao Qi <yao.qi@linaro.org>
1770
1771 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1772 (need_step_over_p): Return zero if the LWP has pending signals
1773 can be delivered on software single step target.
1774
85ba7d86
YQ
17752016-04-25 Yao Qi <yao.qi@linaro.org>
1776
1777 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1778 return instead of error.
1779
3539aa13
YQ
17802016-04-22 Yao Qi <yao.qi@linaro.org>
1781
1782 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1783 to 23.
1784
5b061e98
YQ
17852016-04-22 Yao Qi <yao.qi@linaro.org>
1786
1787 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1788 signal when stepping over breakpoint with software single
1789 step.
1790
3451269c
PA
17912016-04-21 Pedro Alves <palves@redhat.com>
1792
1793 * linux-s390-low.c (s390_collect_ptrace_register)
1794 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1795 add casts.
1796 (s390_check_regset): Use void * instead of gdb_byte *.
1797
a2358508
PA
17982016-04-20 Pedro Alves <palves@redhat.com>
1799
1800 * configure: Renegerate.
1801
6885166d
YQ
18022016-04-20 Yao Qi <yao.qi@linaro.org>
1803
1804 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1805 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1806 number 16.
1807 (arm_store_gregset): Likewise.
1808
2b863f51
WT
18092016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1810
1811 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1812 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1813 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1814 (amd64-avx-mpx-linux.c): New rules.
1815 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1816 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1817 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1818 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1819 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1820 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1821 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1822 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1823 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1824 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1825 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1826 * linux-x86-low.c (x86_linux_read_description): Add case for
1827 X86_XSTATE_AVX_MPX_MASK.
1828 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1829 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1830 init_registers_i386_avx_mpx_linux.
1831 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1832 (initialize_low_tracepoint): Call
1833 init_registers_i386_avx_mpx_linux.
1834 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1835 (initialize_low_tracepoint): Call
1836 init_registers_amd64_avx_mpx_linux.
1837 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1838 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1839 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1840 declarations.
1841
9b30624b
PA
18422016-04-18 Pedro Alves <palves@redhat.com>
1843
1844 * configure: Regenerate.
1845
45e3745e
AT
18462016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1847
1848 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1849 (aarch64_emit_sub): Likewise.
1850
2afc13ff
PA
18512016-04-12 Pedro Alves <palves@redhat.com>
1852
1853 * utils.c (prepare_to_throw_exception): Delete.
1854
6e774b13
SM
18552016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1856
1857 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1858
4dca19f8
MK
18592016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1860
1861 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1862
d0a9981f
MK
18632016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1864
1865 * linux-aarch64-ipa.c: Add <elf.h> include.
1866 * linux-ppc-ipa.c: Add <elf.h> include.
1867 * linux-s390-ipa.c: Add <elf.h> include.
1868
252db07e
MK
18692016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1870
1871 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1872 (get_raw_reg_ptr): Likewise.
1873 (get_trace_state_variable_value_ptr): Likewise.
1874 (set_trace_state_variable_value_ptr): Likewise.
1875 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1876 char *.
1877
14e2b6d9
MK
18782016-03-31 Wei-cheng Wang <cole945@gmail.com>
1879 Marcin Kościelnicki <koriakin@0x04.net>
1880
1881 PR/17221
1882 * linux-ppc-low.c (emit_insns): New function.
1883 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1884 (ppc_emit_prologue): New function.
1885 (ppc_emit_epilogue): New function.
1886 (ppc_emit_add): New function.
1887 (ppc_emit_sub): New function.
1888 (ppc_emit_mul): New function.
1889 (ppc_emit_lsh): New function.
1890 (ppc_emit_rsh_signed): New function.
1891 (ppc_emit_rsh_unsigned): New function.
1892 (ppc_emit_ext): New function.
1893 (ppc_emit_zero_ext): New function.
1894 (ppc_emit_log_not): New function.
1895 (ppc_emit_bit_and): New function.
1896 (ppc_emit_bit_or): New function.
1897 (ppc_emit_bit_xor): New function.
1898 (ppc_emit_bit_not): New function.
1899 (ppc_emit_equal): New function.
1900 (ppc_emit_less_signed): New function.
1901 (ppc_emit_less_unsigned): New function.
1902 (ppc_emit_ref): New function.
1903 (ppc_emit_const): New function.
1904 (ppc_emit_reg): New function.
1905 (ppc_emit_pop): New function.
1906 (ppc_emit_stack_flush): New function.
1907 (ppc_emit_swap): New function.
1908 (ppc_emit_stack_adjust): New function.
1909 (ppc_emit_call): New function.
1910 (ppc_emit_int_call_1): New function.
1911 (ppc_emit_void_call_2): New function.
1912 (ppc_emit_if_goto): New function.
1913 (ppc_emit_goto): New function.
1914 (ppc_emit_eq_goto): New function.
1915 (ppc_emit_ne_goto): New function.
1916 (ppc_emit_lt_goto): New function.
1917 (ppc_emit_le_goto): New function.
1918 (ppc_emit_gt_goto): New function.
1919 (ppc_emit_ge_goto): New function.
1920 (ppc_write_goto_address): New function.
1921 (ppc_emit_ops_impl): New static variable.
1922 (ppc64v1_emit_prologue): New function.
1923 (ppc64v2_emit_prologue): New function.
1924 (ppc64_emit_epilogue): New function.
1925 (ppc64_emit_add): New function.
1926 (ppc64_emit_sub): New function.
1927 (ppc64_emit_mul): New function.
1928 (ppc64_emit_lsh): New function.
1929 (ppc64_emit_rsh_signed): New function.
1930 (ppc64_emit_rsh_unsigned): New function.
1931 (ppc64_emit_ext): New function.
1932 (ppc64_emit_zero_ext): New function.
1933 (ppc64_emit_log_not): New function.
1934 (ppc64_emit_bit_and): New function.
1935 (ppc64_emit_bit_or): New function.
1936 (ppc64_emit_bit_xor): New function.
1937 (ppc64_emit_bit_not): New function.
1938 (ppc64_emit_equal): New function.
1939 (ppc64_emit_less_signed): New function.
1940 (ppc64_emit_less_unsigned): New function.
1941 (ppc64_emit_ref): New function.
1942 (ppc64_emit_const): New function.
1943 (ppc64v1_emit_reg): New function.
1944 (ppc64v2_emit_reg): New function.
1945 (ppc64_emit_pop): New function.
1946 (ppc64_emit_stack_flush): New function.
1947 (ppc64_emit_swap): New function.
1948 (ppc64v1_emit_call): New function.
1949 (ppc64v2_emit_call): New function.
1950 (ppc64v1_emit_int_call_1): New function.
1951 (ppc64v2_emit_int_call_1): New function.
1952 (ppc64v1_emit_void_call_2): New function.
1953 (ppc64v2_emit_void_call_2): New function.
1954 (ppc64_emit_if_goto): New function.
1955 (ppc64_emit_eq_goto): New function.
1956 (ppc64_emit_ne_goto): New function.
1957 (ppc64_emit_lt_goto): New function.
1958 (ppc64_emit_le_goto): New function.
1959 (ppc64_emit_gt_goto): New function.
1960 (ppc64_emit_ge_goto): New function.
1961 (ppc64v1_emit_ops_impl): New static variable.
1962 (ppc64v2_emit_ops_impl): New static variable.
1963 (ppc_emit_ops): New function.
1964 (linux_low_target): Wire in ppc_emit_ops.
1965
a2174ba4
MK
19662016-03-31 Wei-cheng Wang <cole945@gmail.com>
1967 Marcin Kościelnicki <koriakin@0x04.net>
1968
1969 PR/17221
1970 * Makefile.in: Add powerpc-*-ipa.o
1971 * configure.srv: Add ipa_obj for powerpc*-linux.
1972 * linux-ppc-ipa.c: New file.
1973 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1974 includes.
1975 (PPC_FIELD): New macro.
1976 (PPC_SEXT): New macro.
1977 (PPC_OP6): New macro.
1978 (PPC_BO): New macro.
1979 (PPC_LI): New macro.
1980 (PPC_BD): New macro.
1981 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1982 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1983 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1984 (ppc_get_thread_area): New function.
1985 (is_elfv2_inferior): New function.
1986 (gen_ds_form): New function.
1987 (GEN_STD): New macro.
1988 (GEN_STDU): New macro.
1989 (GEN_LD): New macro.
1990 (GEN_LDU): New macro.
1991 (gen_d_form): New function.
1992 (GEN_ADDI): New macro.
1993 (GEN_ADDIS): New macro.
1994 (GEN_LI): New macro.
1995 (GEN_LIS): New macro.
1996 (GEN_ORI): New macro.
1997 (GEN_ORIS): New macro.
1998 (GEN_LWZ): New macro.
1999 (GEN_STW): New macro.
2000 (GEN_STWU): New macro.
2001 (gen_xfx_form): New function.
2002 (GEN_MFSPR): New macro.
2003 (GEN_MTSPR): New macro.
2004 (GEN_MFCR): New macro.
2005 (GEN_MTCR): New macro.
2006 (GEN_SYNC): New macro.
2007 (GEN_LWSYNC): New macro.
2008 (gen_x_form): New function.
2009 (GEN_OR): New macro.
2010 (GEN_MR): New macro.
2011 (GEN_LWARX): New macro.
2012 (GEN_STWCX): New macro.
2013 (GEN_CMPW): New macro.
2014 (gen_md_form): New function.
2015 (GEN_RLDICL): New macro.
2016 (GEN_RLDICR): New macro.
2017 (gen_i_form): New function.
2018 (GEN_B): New macro.
2019 (GEN_BL): New macro.
2020 (gen_b_form): New function.
2021 (GEN_BNE): New macro.
2022 (GEN_LOAD): New macro.
2023 (GEN_STORE): New macro.
2024 (gen_limm): New function.
2025 (gen_atomic_xchg): New function.
2026 (gen_call): New function.
2027 (ppc_relocate_instruction): New function.
2028 (ppc_install_fast_tracepoint_jump_pad): New function.
2029 (ppc_get_min_fast_tracepoint_insn_len): New function.
2030 (ppc_get_ipa_tdesc_idx): New function.
2031 (the_low_target): Wire in the new functions.
2032 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2033 tdescs.
2034 * linux-ppc-tdesc.h: New file.
2035
a13c4696
MK
20362016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2037
2038 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2039 (alloc_jump_pad_buffer): New function.
2040 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2041 (alloc_jump_pad_buffer): New function.
2042 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2043 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2044 (alloc_jump_pad_buffer): New function.
2045 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2046 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2047 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2048 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2049
1cda1512
MK
20502016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2051
2052 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2053 * linux-amd64-ipa.c: Likewise.
2054 * linux-i386-ipa.c: Likewise.
2055 * linux-s390-ipa.c: Likewise.
2056 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2057 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2058 set_trace_state_variable_value_ptr.
2059 (struct ipa_sym_addresses): Likewise.
2060 (symbol_list): Likewise.
2061 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2062 accessing gdb_collect directly.
2063 (gdb_collect_ptr_type): New typedef.
2064 (get_raw_reg_ptr_type): New typedef.
2065 (get_trace_state_variable_value_ptr_type): New typedef.
2066 (set_trace_state_variable_value_ptr_type): New typedef.
2067 (gdb_collect_ptr): New global.
2068 (get_raw_reg_ptr): New global.
2069 (get_trace_state_variable_value_ptr): New global.
2070 (set_trace_state_variable_value_ptr): New global.
2071 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2072 accessing get_raw_reg directly.
2073 (get_get_tsv_func_addr): Likewise for
2074 get_trace_state_variable_value_ptr.
2075 (get_set_tsv_func_addr): Likewise for
2076 set_trace_state_variable_value_ptr.
2077 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2078
72fb5488
SM
20792016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2080
2081 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2082
28170b88
MK
20832016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2084
2085 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2086 packets.
2087 (relocate_instruction): Remove own_buf.
2088 * server.c (own_buf): Make global.
2089 (handle_v_requests): Make global.
2090 * server.h (own_buf): New declaration.
2091 (handle_v_requests): New prototype.
2092
f39e8743
MK
20932016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2094
2095 PR 18377
2096 * linux-s390-low.c (add_insns): New function.
2097 (s390_emit_prologue): New function.
2098 (s390_emit_epilogue): New function.
2099 (s390_emit_add): New function.
2100 (s390_emit_sub): New function.
2101 (s390_emit_mul): New function.
2102 (s390_emit_lsh): New function.
2103 (s390_emit_rsh_signed): New function.
2104 (s390_emit_rsh_unsigned): New function.
2105 (s390_emit_ext): New function.
2106 (s390_emit_log_not): New function.
2107 (s390_emit_bit_and): New function.
2108 (s390_emit_bit_or): New function.
2109 (s390_emit_bit_xor): New function.
2110 (s390_emit_bit_not): New function.
2111 (s390_emit_equal): New function.
2112 (s390_emit_less_signed): New function.
2113 (s390_emit_less_unsigned): New function.
2114 (s390_emit_ref): New function.
2115 (s390_emit_if_goto): New function.
2116 (s390_emit_goto): New function.
2117 (s390_write_goto_address): New function.
2118 (s390_emit_litpool): New function.
2119 (s390_emit_const): New function.
2120 (s390_emit_call): New function.
2121 (s390_emit_reg): New function.
2122 (s390_emit_pop): New function.
2123 (s390_emit_stack_flush): New function.
2124 (s390_emit_zero_ext): New function.
2125 (s390_emit_swap): New function.
2126 (s390_emit_stack_adjust): New function.
2127 (s390_emit_set_r2): New function.
2128 (s390_emit_int_call_1): New function.
2129 (s390_emit_void_call_2): New function.
2130 (s390_emit_eq_goto): New function.
2131 (s390_emit_ne_goto): New function.
2132 (s390_emit_lt_goto): New function.
2133 (s390_emit_le_goto): New function.
2134 (s390_emit_gt_goto): New function.
2135 (s390_emit_ge_goto): New function.
2136 (s390x_emit_prologue): New function.
2137 (s390x_emit_epilogue): New function.
2138 (s390x_emit_add): New function.
2139 (s390x_emit_sub): New function.
2140 (s390x_emit_mul): New function.
2141 (s390x_emit_lsh): New function.
2142 (s390x_emit_rsh_signed): New function.
2143 (s390x_emit_rsh_unsigned): New function.
2144 (s390x_emit_ext): New function.
2145 (s390x_emit_log_not): New function.
2146 (s390x_emit_bit_and): New function.
2147 (s390x_emit_bit_or): New function.
2148 (s390x_emit_bit_xor): New function.
2149 (s390x_emit_bit_not): New function.
2150 (s390x_emit_equal): New function.
2151 (s390x_emit_less_signed): New function.
2152 (s390x_emit_less_unsigned): New function.
2153 (s390x_emit_ref): New function.
2154 (s390x_emit_if_goto): New function.
2155 (s390x_emit_const): New function.
2156 (s390x_emit_call): New function.
2157 (s390x_emit_reg): New function.
2158 (s390x_emit_pop): New function.
2159 (s390x_emit_stack_flush): New function.
2160 (s390x_emit_zero_ext): New function.
2161 (s390x_emit_swap): New function.
2162 (s390x_emit_stack_adjust): New function.
2163 (s390x_emit_int_call_1): New function.
2164 (s390x_emit_void_call_2): New function.
2165 (s390x_emit_eq_goto): New function.
2166 (s390x_emit_ne_goto): New function.
2167 (s390x_emit_lt_goto): New function.
2168 (s390x_emit_le_goto): New function.
2169 (s390x_emit_gt_goto): New function.
2170 (s390x_emit_ge_goto): New function.
2171 (s390_emit_ops): New function.
2172 (struct linux_target_ops): Fill in emit_ops hook.
2173
abd9baf9
MK
21742016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2175
2176 PR 18377
2177 * Makefile.in: Add s390 IPA files.
2178 * configure.srv: Build IPA for s390.
2179 * linux-s390-ipa.c: New file.
2180 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2181 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2182 (tdesc_s390_linux32): Likewise.
2183 (init_registers_s390_linux32v1): Likewise.
2184 (tdesc_s390_linux32v1): Likewise.
2185 (init_registers_s390_linux32v2): Likewise.
2186 (tdesc_s390_linux32v2): Likewise.
2187 (init_registers_s390_linux64): Likewise.
2188 (tdesc_s390_linux64): Likewise.
2189 (init_registers_s390_linux64v1): Likewise.
2190 (tdesc_s390_linux64v1): Likewise.
2191 (init_registers_s390_linux64v2): Likewise.
2192 (tdesc_s390_linux64v2): Likewise.
2193 (init_registers_s390_te_linux64): Likewise.
2194 (tdesc_s390_te_linux64): Likewise.
2195 (init_registers_s390_vx_linux64): Likewise.
2196 (tdesc_s390_vx_linux64): Likewise.
2197 (init_registers_s390_tevx_linux64): Likewise.
2198 (tdesc_s390_tevx_linux64): Likewise.
2199 (init_registers_s390x_linux64): Likewise.
2200 (tdesc_s390x_linux64): Likewise.
2201 (init_registers_s390x_linux64v1): Likewise.
2202 (tdesc_s390x_linux64v1): Likewise.
2203 (init_registers_s390x_linux64v2): Likewise.
2204 (tdesc_s390x_linux64v2): Likewise.
2205 (init_registers_s390x_te_linux64): Likewise.
2206 (tdesc_s390x_te_linux64): Likewise.
2207 (init_registers_s390x_vx_linux64): Likewise.
2208 (tdesc_s390x_vx_linux64): Likewise.
2209 (init_registers_s390x_tevx_linux64): Likewise.
2210 (tdesc_s390x_tevx_linux64): Likewise.
2211 (have_hwcap_s390_vx): New static variable.
2212 (s390_arch_setup): Fill have_hwcap_s390_vx.
2213 (s390_get_thread_area): New function.
2214 (s390_ft_entry_gpr_esa): New const.
2215 (s390_ft_entry_gpr_zarch): New const.
2216 (s390_ft_entry_misc): New const.
2217 (s390_ft_entry_fr): New const.
2218 (s390_ft_entry_vr): New const.
2219 (s390_ft_main_31): New const.
2220 (s390_ft_main_64): New const.
2221 (s390_ft_exit_fr): New const.
2222 (s390_ft_exit_vr): New const.
2223 (s390_ft_exit_misc): New const.
2224 (s390_ft_exit_gpr_esa): New const.
2225 (s390_ft_exit_gpr_zarch): New const.
2226 (append_insns): New function.
2227 (s390_relocate_instruction): New function.
2228 (s390_install_fast_tracepoint_jump_pad): New function.
2229 (s390_get_min_fast_tracepoint_insn_len): New function.
2230 (s390_get_ipa_tdesc_idx): New function.
2231 (struct linux_target_ops): Wire in the above functions.
2232 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2233 * linux-s390-tdesc.h: New file.
2234
a4105d04
MK
22352016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2236
2237 * linux-s390-low.c (s390_supports_tracepoints): New function.
2238 (struct linux_target_ops): Fill supports_tracepoints hook.
2239
35ac8b3e
YQ
22402016-03-18 Yao Qi <yao.qi@linaro.org>
2241
2242 * linux-low.c (lwp_signal_can_be_delivered): New function.
2243 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2244
94610ec4
YQ
22452016-03-18 Yao Qi <yao.qi@linaro.org>
2246
2247 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2248 0 if signal is enqueued. Remove 'signal' from one debugging
2249 message. Move one debugging message to some lines below.
2250 Remove code setting 'signal' to 0.
2251
80aea927
YQ
22522016-03-18 Yao Qi <yao.qi@linaro.org>
2253
2254 * linux-low.c (linux_low_filter_event): Remove redundant
2255 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2256
b04fd3be
MK
22572016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2258
2259 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2260 (struct linux_target_ops): Wire in the above.
2261
c40c8d4b
YQ
22622016-03-03 Yao Qi <yao.qi@linaro.org>
2263
2264 * linux-low.c: Update comments to start_step_over.
2265
0f8288ae
YQ
22662016-03-03 Yao Qi <yao.qi@linaro.org>
2267
2268 PR server/19736
2269 * linux-low.c (handle_extended_wait): Set child suspended
2270 if event_lwp->bp_reinsert isn't zero.
2271
fdbd04a8
YQ
22722016-03-02 Yao Qi <yao.qi@linaro.org>
2273
2274 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2275 enqueue_pending_signal.
2276
6896a8fa
MK
22772016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2278
2279 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2280 is actually loaded.
2281
ab503087
MK
22822016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2283
2284 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2285 (s390_regmap_3264) [!__s390x__]: New global.
2286 (s390_collect_ptrace_register): Skip map entries containing -1.
2287 (s390_supply_ptrace_register): Ditto.
2288 (s390_fill_gprs_high): New function.
2289 (s390_store_gprs_high): New function.
2290 (s390_regsets): Add NT_S390_HIGH_GPRS.
2291 (s390_get_hwcap): Enable on 31-bit.
2292 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2293 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2294 Detect NT_S390_HIGH_GPRS.
2295 (s390_usrregs_info_3264): Enable on 31-bit.
2296 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2297 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2298
ae91f625
MK
22992016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2300
2301 PR gdb/13808
2302 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2303 * configure.srv: Ditto.
2304 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2305 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2306 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2307 (init_registers_amd64_linux): Remove prototype.
2308 (tdesc_amd64_linux): Remove declaration.
2309 (get_ipa_tdesc): New function.
2310 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2311 initialize remaining tdescs.
2312 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2313 (init_registers_i386_linux): Remove prototype.
2314 (tdesc_i386_linux): Remove declaration.
2315 (get_ipa_tdesc): New function.
2316 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2317 initialize remaining tdescs.
2318 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2319 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2320 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2321 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2322 (x86_get_ipa_tdesc_idx): New function.
2323 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2324 * linux-x86-tdesc.h: New file.
2325 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2326 (target_get_ipa_tdesc_idx): New macro.
2327 * tracepoint.c (ipa_tdesc_idx): New macro.
2328 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2329 (symbol_list): Add ipa_tdesc_idx.
2330 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2331 (ipa_tdesc): Remove.
2332 (ipa_tdesc_idx): New variable.
2333 (get_context_regcache): Use get_ipa_tdesc.
2334 (gdb_collect): Ditto.
2335 (gdb_probe): Ditto.
2336 * tracepoint.h (get_ipa_tdesc): New prototype.
2337 (ipa_tdesc): Remove.
2338
e7ad2f14
PA
23392016-02-24 Pedro Alves <palves@redhat.com>
2340
2341 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2342 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2343 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2344 Factor out common code between the USE_SIGTRAP_SIGINFO and
2345 !USE_SIGTRAP_SIGINFO blocks.
2346 (linux_low_filter_event): Call save_stop_reason instead of
2347 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2348 Update comments.
2349 (linux_wait_1): Update comments.
2350
657f9cde
WW
23512016-02-24 Wei-cheng Wang <cole945@gmail.com>
2352
2353 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2354 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2355 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2356 ppc_insert_point, ppc_remove_point.
2357
b00b61e1
MK
23582016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2359
2360 * linux-s390-low.c (s390_supports_z_point_type): New function.
2361 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2362
553cb527
YQ
23632016-02-16 Yao Qi <yao.qi@linaro.org>
2364
2365 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2366 PC. Get pc from regcache_read_pc.
2367
a5652c21
YQ
23682016-02-12 Yao Qi <yao.qi@linaro.org>
2369
2370 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2371 or linux_get_pc_32bit.
2372 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2373
ed443b61
YQ
23742016-02-12 Yao Qi <yao.qi@linaro.org>
2375
2376 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2377 arm_linux_get_next_pcs_fixup.
2378
020ecd38
MK
23792016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2380
2381 * tracepoint.c (x_tracepoint_action_download): Change
2382 write_inferior_data_ptr to write_inferior_data_pointer.
2383 (cmd_qtstart): Likewise.
2384 (write_inferior_data_ptr): Remove.
2385 (download_agent_expr): Change write_inferior_data_ptr to
2386 write_inferior_data_pointer.
2387 (download_tracepoint_1): Likewise.
2388 (download_tracepoint): Likewise.
2389 (download_trace_state_variables): Likewise.
2390
7cae9051
WW
23912016-02-11 Wei-cheng Wang <cole945@gmail.com>
2392 Marcin Kościelnicki <koriakin@0x04.net>
2393
2394 * tracepoint.c (struct tracepoint_action_ops): Remove.
2395 (struct tracepoint_action): Remove ops.
2396 (m_tracepoint_action_download, r_tracepoint_action_download)
2397 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2398 size and offset accordingly.
2399 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2400 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2401 (tracepoint_action_send, tracepoint_action_download): New functions.
2402 Helpers for trace action handlers.
2403 (add_tracepoint_action): Remove setup actions ops.
2404 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2405
9f6a71b4
YQ
24062016-02-10 Yao Qi <yao.qi@linaro.org>
2407
2408 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2409
1e94266c
SM
24102016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2411
2412 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2413 to AC_OUTPUT.
2414 * configure: Regenerate.
2415
8adce034
SM
24162016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2417
2418 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2419 void * to gdb_byte *.
2420 * linux-low.c (siginfo_fixup): Likewise.
2421 (linux_xfer_siginfo): Likewise.
2422 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2423 Likewise.
2424 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2425
93813b37
WT
24262016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2427
2428 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2429 to srv_tgtobj.
2430 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2431 to srv_tgtobj.
2432 * linux-x86-low.c [__x86_64__]: Include
2433 "nat/amd64-linux-siginfo.h".
2434 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2435 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2436 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2437 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2438 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2439 (cpt_si_fd, si_timerid, si_overrun): Move from
2440 nat/amd64-linux-siginfo.c.
2441 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2442
8424cc97
SM
24432016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2444
2445 * server.c (skip_to_semicolon): Remove.
2446 (process_point_options): Use strchrnul instead of
2447 skip_to_semicolon.
2448
4d18591b
YQ
24492016-01-26 Yao Qi <yao.qi@linaro.org>
2450
2451 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2452 * linux-low.c (install_software_single_step_breakpoints): Don't
2453 call regcache_read_pc.
2454 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2455 argument pc.
2456
d8020970
YQ
24572016-01-26 Yao Qi <yao.qi@linaro.org>
2458
2459 * linux-low.c (install_software_single_step_breakpoints): Call
2460 regcache_read_pc instead of get_pc.
2461
8b207339
YQ
24622016-01-26 Yao Qi <yao.qi@linaro.org>
2463
2464 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2465 (unblock_async_io): Rename to ...
2466 (block_unblock_async_io): ... it. New function.
2467 (enable_async_io): Don't install SIGIO handler. Unblock it
2468 instead.
2469 (disable_async_io): Don't ignore SIGIO. Block it instead.
2470 (initialize_async_io): Install SIGIO handler. Don't call
2471 unblock_async_io.
2472
18879fef
YQ
24732016-01-26 Yao Qi <yao.qi@linaro.org>
2474
2475 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2476 first character is '\003', call *the_target->request_interrupt.
2477
a0f8e08a
YQ
24782016-01-25 Yao Qi <yao.qi@linaro.org>
2479
2480 * remote-utils.c (new_thread_notify): Remove.
2481 (dead_thread_notify): Likewise.
2482 * remote-utils.h (new_thread_notify): Remove declaration.
2483 (dead_thread_notify): Likewise.
2484
cc5fd9ab
MK
24852016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2486
2487 * gdb.trace/pending.exp: Fix expected message on continue.
2488
99e8eb11
MK
24892016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2490
2491 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2492 it works properly on big-endian machines where sizeof (CORE_ADDR)
2493 != sizeof (void *).
2494
a994041d
PA
24952016-01-21 Pedro Alves <palves@redhat.com>
2496
2497 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2498 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2499 * configure: Regenerate.
2500
f7a6a40d
YQ
25012016-01-21 Yao Qi <yao.qi@linaro.org>
2502
2503 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2504 is_thumb and set it according to CPSR saved on the stack.
2505 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2506 arm_sigreturn_next_pc.
2507
6f69e520
YQ
25082016-01-18 Yao Qi <yao.qi@linaro.org>
2509
2510 * linux-low.c (linux_set_pc_64bit): New function.
2511 (linux_get_pc_64bit): New function.
2512 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2513 Declare.
2514 * linux-sparc-low.c (debug_threads): Remove declaration.
2515 (sparc_get_pc): Remove.
2516 (the_low_target): Use linux_get_pc_64bit instead of
2517 sparc_get_pc.
2518 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2519 (the_low_target): Use linux_get_pc_64bit and
2520 linux_set_pc_64bit.
2521
276d4552
YQ
25222016-01-18 Yao Qi <yao.qi@linaro.org>
2523
2524 * linux-arm-low.c (debug_threads): Remove declaration.
2525 (arm_get_pc, arm_set_pc): Remove.
2526 (the_low_target): Use linux_get_pc_32bit and
2527 linux_set_pc_32bit.
2528 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2529 (the_low_target): Use linux_get_pc_32bit and
2530 linux_set_pc_32bit.
2531 * linux-cris-low.c (debug_threads): Remove declaration.
2532 (cris_get_pc, cris_set_pc,): Remove.
2533 (the_low_target): Use linux_get_pc_32bit and
2534 linux_set_pc_32bit.
2535 * linux-crisv32-low.c (debug_threads): Remove declaration.
2536 (cris_get_pc, cris_set_pc): Remove.
2537 (the_low_target): Use linux_get_pc_32bit and
2538 linux_set_pc_32bit.
2539 * linux-low.c: Include inttypes.h.
2540 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2541 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2542 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2543 (the_low_target): Use linux_get_pc_32bit and
2544 linux_set_pc_32bit.
2545 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2546 (the_low_target): Use linux_get_pc_32bit and
2547 linux_set_pc_32bit.
2548 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2549 (the_low_target): Use linux_get_pc_32bit and
2550 linux_set_pc_32bit.
2551 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2552 (the_low_target): Use linux_get_pc_32bit and
2553 linux_set_pc_32bit.
2554 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2555 (the_low_target): Use linux_get_pc_32bit and
2556 linux_set_pc_32bit.
2557
eb0edac8
GB
25582016-01-18 Gary Benson <gbenson@redhat.com>
2559
2560 * configure.ac (AC_FUNC_FORK): New check.
2561 * config.in: Regenerate.
2562 * configure: Likewise.
2563
1b451dda
YQ
25642016-01-14 Yao Qi <yao.qi@linaro.org>
2565
2566 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2567 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2568 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2569 arm_get_next_pcs_ctor.
2570
82075af2
JS
25712016-01-12 Josh Stone <jistone@redhat.com>
2572 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2573
2574 * inferiors.h: Include "gdb_vecs.h".
2575 (struct process_info): Add syscalls_to_catch.
2576 * inferiors.c (remove_process): Free syscalls_to_catch.
2577 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2578 syscall_return stops.
2579 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2580 * server.c (handle_general_set): Handle QCatchSyscalls.
2581 (handle_query): Report support for QCatchSyscalls.
2582 * target.h (struct target_ops): Add supports_catch_syscall.
2583 (target_supports_catch_syscall): New macro.
2584 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2585 (struct lwp_info): Add syscall_state.
2586 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2587 Maintain syscall_state and syscalls_to_catch across exec.
2588 (get_syscall_trapinfo): New function, proxy to the_low_target.
2589 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2590 (linux_low_filter_event): Toggle syscall_state entry/return for
2591 syscall traps, and set it ignored for all others.
2592 (gdb_catching_syscalls_p): New function.
2593 (gdb_catch_this_syscall_p): New function.
2594 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2595 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2596 (linux_supports_catch_syscall): New function.
2597 (linux_target_ops): Install it.
2598 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2599 (the_low_target): Install it.
2600
8f13a3ce
MF
26012016-01-12 Mike Frysinger <vapier@gentoo.org>
2602
2603 * acinclude.m4: Include new ../warning.m4 file.
2604 * configure: Regenerated.
2605 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2606
5b3da067
MF
26072016-01-12 Mike Frysinger <vapier@gentoo.org>
2608
2609 * ax.c (is_goto_target): Mark static.
2610 * linux-low.c (register_addr): Likewise.
2611 (linux_fetch_registers, linux_store_registers): Likewise.
2612 * mem-break.c (any_persistent_commands): Fix old prototype.
2613 (add_commands_to_breakpoint): Mark static.
2614 * regcache.c (find_register_by_name): Delete unused func.
2615 * remote-utils.c (hex_or_minus_one): Mark static.
2616 * server.c (monitor_show_help): Mark static.
2617 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2618 handle_v_requests): Likewise.
2619
bc504a31
PA
26202016-01-12 Pedro Alves <palves@redhat.com>
2621
2622 Remove use of the registered trademark symbol throughout.
2623
5a0dd67a
YQ
26242016-01-08 Yao Qi <yao.qi@linaro.org>
2625
2626 * remote-utils.c (getpkt): If c is '\003', call target hook
2627 request_interrupt.
2628
b2ca446f
YQ
26292016-01-06 Yao Qi <yao.qi@linaro.org>
2630
2631 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2632 linux-aarch32-low.c.
2633 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2634 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2635 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2636 (thumb2_breakpoint): Declare.
2637 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2638 linux-aarch32-low.h.
2639 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2640 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2641 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2642
edd88788
JB
26432016-01-01 Joel Brobecker <brobecker@adacore.com>
2644
2645 * gdbreplay.c (gdbreplay_version): Change copyright year in
2646 version message.
2647 * server.c (gdbserver_version): Likewise.
2648
65da7f14
PP
26492015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2650
2651 * server.c (crc32_table): Delete.
2652 (crc32): Use libiberty's xcrc32 function.
2653
4abd5ed2
JB
26542015-12-22 Joel Brobecker <brobecker@adacore.com>
2655
2656 * lynx-low.c (lynx_delete_thread_callback): New function.
2657 (lynx_mourn): Properly delete our process and all of its
2658 threads. Remove call to clear_inferiors.
2659
0e50fe5c
JB
26602015-12-22 Joel Brobecker <brobecker@adacore.com>
2661
2662 * target.c (thread_search_callback): Add check that
2663 the thread_stopped target callback is not NULL before
2664 calling it.
2665
35adc03f
YQ
26662015-12-21 Yao Qi <yao.qi@linaro.org>
2667
2668 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2669 arm breakpoint.
2670
bd2b2909
AT
26712015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2672
2673 * server.c (handle_query): Call target_supports_software_single_step.
2674
7fe5e27e
AT
26752015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2676
2677 * linux-low.c (single_step): New function.
2678 (linux_resume_one_lwp_throw): Call single_step.
2679 (start_step_over): Likewise.
2680
d9311bfa
AT
26812015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2682
2683 * Makefile.in (SFILES): Append arch/arm-linux.c,
2684 arch/arm-get-next-pcs.c.
2685 (arm-linux.o): New rule.
2686 (arm-get-next-pcs.o): New rule.
2687 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2688 arm-linux.o.
2689 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2690 to linux-aarch32-low.c.
2691 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2692 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2693 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2694 (thumb2_breakpoint_len): Likewise.
2695 (arm_is_thumb_mode): Make non-static.
2696 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2697 from linux-aarch32-low.c.
2698 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2699 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2700 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2701 (thumb2_breakpoint_len): Likewise.
2702 (arm_is_thumb_mode): New declaration.
2703 * linux-arm-low.c: Include arch/arm-linux.h
2704 aarch/arm-get-next-pcs.h, sys/syscall.h.
2705 (get_next_pcs_ops): New struct.
2706 (get_next_pcs_addr_bits_remove): New function.
2707 (get_next_pcs_is_thumb): New function.
2708 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2709 (arm_sigreturn_next_pc): Likewise.
2710 (get_next_pcs_syscall_next_pc): Likewise.
2711 (arm_gdbserver_get_next_pcs): Likewise.
2712 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2713 Initialize.
2714 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2715 * server.h: Include gdb_vecs.h.
2716
68ce2059
AT
27172015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2718
2719 * Makefile.in (SFILES): Append common/common-regcache.c.
2720 (OBS): Append common-regcache.o.
2721 (common-regcache.o): New rule.
2722 * regcache.c (init_register_cache): Initialize cache to
2723 REG_UNAVAILABLE.
2724 (regcache_raw_read_unsigned): New function.
2725 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2726 register_status enum.
2727
fa5308bd
AT
27282015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2729
2730 * linux-aarch64-low.c (the_low_targets): Rename
2731 breakpoint_reinsert_addr to get_next_pcs.
2732 * linux-arm-low.c (the_low_targets): Likewise.
2733 * linux-bfin-low.c (the_low_targets): Likewise.
2734 * linux-cris-low.c (the_low_targets): Likewise.
2735 * linux-crisv32-low.c (the_low_targets): Likewise.
2736 * linux-low.c (can_software_single_step): Likewise.
2737 (install_software_single_step_breakpoints): New function.
2738 (start_step_over): Use install_software_single_step_breakpoints.
2739 * linux-low.h: New CORE_ADDR vector.
2740 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2741 get_next_pcs.
2742 * linux-mips-low.c (the_low_targets): Likewise.
2743 * linux-nios2-low.c (the_low_targets): Likewise.
2744 * linux-sparc-low.c (the_low_targets): Likewise.
2745
4a6ed09b
PA
27462015-12-17 Pedro Alves <palves@redhat.com>
2747
2748 * linux-low.c (linux_kill_one_lwp): Remove references to
2749 LinuxThreads.
2750 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2751 to 'kill'.
2752 (linux_init_signals): Delete.
2753 (initialize_low): Adjust.
2754 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2755
7544db95
PA
27562015-12-16 Pedro Alves <palves@redhat.com>
2757
2758 * configure.ac (compiler warning flags): When testing a
2759 -Wno-foo option, check whether -Wfoo works instead.
2760 * configure: Regenerate.
2761
8020350c
DB
27622015-12-11 Don Breazeal <donb@codesourcery.com>
2763
2764 * server.c (process_serial_event): Don't exit from gdbserver
2765 in remote mode if there are still active inferiors.
2766
db91f502
YQ
27672015-12-11 Yao Qi <yao.qi@linaro.org>
2768
2769 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2770 arm_breakpoint_at if the process is 32-bit.
2771
b37a6290
YQ
27722015-12-11 Yao Qi <yao.qi@linaro.org>
2773
2774 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2775 arm breakpoint.
2776
17b1509a
YQ
27772015-12-07 Yao Qi <yao.qi@linaro.org>
2778
2779 * configure.srv: Append arm.o to srv_tgtobj for
2780 aarch64*-*-linux* target.
2781 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2782 from linux-arm-low.c.
2783 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2784 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2785 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2786 (thumb2_breakpoint_len): Likewise.
2787 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2788 (arm_breakpoint_kinds): Likewise.
2789 (arm_breakpoint_kind_from_pc): Likewise.
2790 (arm_sw_breakpoint_from_kind): Likewise.
2791 (arm_breakpoint_kind_from_current_state): Likewise.
2792 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2793 (arm_sw_breakpoint_from_kind): Declare.
2794 (arm_breakpoint_kind_from_current_state): Declare.
2795 (arm_breakpoint_at): Declare.
2796 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2797 arm_sw_breakpoint_from_kind if process is 32-bit.
2798 (aarch64_breakpoint_kind_from_pc): New function.
2799 (aarch64_breakpoint_kind_from_current_state): New function.
2800 (the_low_target): Initialize fields breakpoint_kind_from_pc
2801 and breakpoint_kind_from_current_state.
2802 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2803 linux-aarch32-low.c.
2804 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2805 (arm_breakpoint, arm_breakpoint_len): Likewise.
2806 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2807 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2808 (arm_is_thumb_mode): Likewise.
2809 (arm_breakpoint_at): Likewise.
2810 (arm_breakpoint_kind_from_pc): Likewise.
2811 (arm_sw_breakpoint_from_kind): Likewise.
2812 (arm_breakpoint_kind_from_current_state): Likewise.
2813
2814 Revert:
2815 2015-08-04 Yao Qi <yao.qi@linaro.org>
2816
2817 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2818 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2819 * server.c (extended_protocol): Remove "static".
2820 * server.h (extended_protocol): Declare it.
2821
ece66d65
JS
28222015-12-04 Josh Stone <jistone@redhat.com>
2823
2824 * target.h (struct target_ops) <arch_setup>: Rename to ...
2825 (struct target_ops) <post_create_inferior>: ... this.
2826 (target_arch_setup): Rename to ...
2827 (target_post_create_inferior): ... this, calling post_create_inferior.
2828 * server.c (start_inferior): Update target_arch_setup calls to
2829 target_post_create_inferior.
2830 * linux-low.c (linux_low_ptrace_options): Forward declare.
2831 (linux_arch_setup): Update its comment for general use.
2832 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2833 (struct linux_target_ops): Use linux_post_create_inferior.
2834 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2835 to post_create_inferior.
2836 * nto-low.c (struct nto_target_ops): Likewise.
2837 * spu-low.c (struct spu_target_ops): Likewise.
2838 * win32-low.c (struct win32_target_ops): Likewise.
2839
e58c48b4
AT
28402015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2841
2842 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2843
fbec8956
AT
28442015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2845
2846 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2847 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2848 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2849 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2850 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2851 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2852 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2853 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2854 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2855 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2856 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2857 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2858
9b4c5f87
AT
28592015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2860
2861 * linux-low.c (linux_look_up_symbols): Don't call
2862 linux_supports_traceclone.
2863 * linux-low.h (thread_db_init): Remove use_events argument.
2864 * thread-db.c (thread_db_use_event): Remove global variable.
2865 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2866 (struct thread_db) <td_create_bp>: Remove field.
2867 (thread_db_create_event): Remove function.
2868 (thread_db_enable_reporting): Likewise.
2869 (find_one_thread): Don't check for thread_db_use_events.
2870 (attach_thread): Likewise.
2871 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2872 (try_thread_db_load_1): Don't check for thread_db_use_events.
2873 (thread_db_init): Remove use_events argument and thread events
2874 handling.
2875 (remove_thread_event_breakpoints): Remove function.
2876 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2877
7d00775e
AT
28782015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2879
2880 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2881 New function.
2882 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2883 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2884 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2885 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2886 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2887 Initialize.
2888 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2889 New function.
2890 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2891 * linux-low.c (can_hardware_single_step): Use
2892 supports_hardware_single_step.
2893 (can_software_single_step): New function.
2894 (start_step_over): Call can_software_single_step.
2895 (linux_supports_hardware_single_step): New function.
2896 (struct target_ops) <supports_software_single_step>: Initialize.
2897 * linux-low.h (struct linux_target_ops)
2898 <supports_hardware_single_step>: Initialize.
2899 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2900 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2901 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2902 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2903 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2904 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2905 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2906 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2907 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2908 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2909 Initialize.
2910 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2911 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2912 Initialize.
2913 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2914 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2915 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2916 New function.
2917 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2918 * target.h (struct target_ops): <supports_software_single_step>:
2919 New field.
2920 (target_supports_software_single_step): New macro.
2921
2d97cd35
AT
29222015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2923
2924 * linux-low.c (linux_wait_1): Fix pc advance condition.
2925 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2926 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2927
769ef81f
AT
29282015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2929
2930 * linux-arm-low.c (arm_is_thumb_mode): New function.
2931 (arm_breakpoint_at): Use arm_is_thumb_mode.
2932 (arm_breakpoint_kind_from_current_state): New function.
2933 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2934 Initialize.
2935 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2936 (linux_breakpoint_kind_from_current_state): New function.
2937 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2938 * linux-low.h (struct linux_target_ops)
2939 <breakpoint_kind_from_current_state>: New field.
2940 * target.h (struct target_ops): Likewise.
2941 (target_breakpoint_kind_from_current_state): New macro.
2942
1bebeeca
PA
29432015-11-30 Pedro Alves <palves@redhat.com>
2944
2945 * linux-low.c (linux_resume): Wake up the event loop before
2946 returning.
2947
a67a9fae
PA
29482015-11-30 Pedro Alves <palves@redhat.com>
2949
2950 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2951 check.
2952 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2953 to -1.
2954 * target.c (struct thread_search): New structure.
2955 (thread_search_callback): New function.
2956 (prev_general_thread): New global.
2957 (prepare_to_access_memory, done_accessing_memory): New functions.
2958 * target.h (prepare_to_access_memory, done_accessing_memory):
2959 Replace macros with function declarations.
2960
f2faf941
PA
29612015-11-30 Pedro Alves <palves@redhat.com>
2962
2963 PR 14618
2964 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2965 report TARGET_WAITKIND_NO_RESUMED.
2966 * remote-utils.c (prepare_resume_reply): Handle
2967 TARGET_WAITKIND_NO_RESUMED.
2968 * server.c (report_no_resumed): New global.
2969 (handle_query) <qSupported>: Handle "no-resumed+". Report
2970 "no-resumed+" support.
2971 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2972 return error if the client doesn't support no-resumed events.
2973 (push_stop_notification): New function.
2974 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2975 events if the client supports them.
2976
a681f9c9
PA
29772015-11-30 Pedro Alves <palves@redhat.com>
2978
2979 * linux-low.c (thread_still_has_status_pending_p): Don't check
2980 vCont;t here.
2981 (lwp_resumed): New function.
2982 (status_pending_p_callback): Return early if the LWP is not
2983 supposed to be resumed.
2984
65706a29
PA
29852015-11-30 Pedro Alves <palves@redhat.com>
2986
2987 * linux-low.c (handle_extended_wait): Assert that the LWP's
2988 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2989 thread create events, leave the new child's status pending.
2990 (linux_low_filter_event): If GDB wants to hear about thread exit
2991 events, leave the LWP marked dead and don't delete it.
2992 (linux_wait_for_event_filtered): Don't check for thread exit.
2993 (filter_exit_event): New function.
2994 (linux_wait_1): Use it, when returning an exit event.
2995 (linux_resume_one_lwp_throw): Assert that the LWP's
2996 waitstatus is TARGET_WAITKIND_IGNORE.
2997 * remote-utils.c (prepare_resume_reply): Handle
2998 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2999 * server.c (report_thread_events): New global.
3000 (handle_general_set): Handle QThreadEvents.
3001 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3002 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3003 TARGET_WAITKIND_THREAD_EXITED.
3004 * server.h (report_thread_events): Declare.
3005
56cf4bed
PA
30062015-11-30 Pedro Alves <palves@redhat.com>
3007
3008 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3009 the thread's last_resume_kind was resume_stop.
3010
500c1d85
PA
30112015-11-30 Pedro Alves <palves@redhat.com>
3012
3013 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3014 before returning.
3015
de979965
PA
30162015-11-30 Pedro Alves <palves@redhat.com>
3017
3018 * server.c (handle_v_requests): Handle vCtrlC.
3019
34c65914
PA
30202015-11-30 Pedro Alves <palves@redhat.com>
3021
3022 * gdbthread.h (find_any_thread_of_pid): Declare.
3023 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3024 functions.
3025 * server.c (handle_query): If current_thread is NULL, look for
3026 another thread of the selected process.
3027
79efa585 30282015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3029 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3030
3031 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3032 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3033 name in reply.
3034 * target.h (struct target_ops) <thread_name>: New field.
3035 (target_thread_name): New macro.
3036
80d82c19
JB
30372015-11-23 Joel Brobecker <brobecker@adacore.com>
3038
3039 * regcache.h (regcache_invalidate_pid): Add declaration.
3040 * regcache.c (regcache_invalidate_pid): New function, extracted
3041 from regcache_invalidate.
3042 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3043 Add trivial documentation comment.
3044 * lynx-low.c: Use regcache_invalidate_pid instead of
3045 regcache_invalidate.
3046
64da5dd5
JB
30472015-11-23 Joel Brobecker <brobecker@adacore.com>
3048
3049 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3050 and Elf64_auxv_t if the target is Android.
3051
37ce4055
DE
30522015-11-22 Doug Evans <xdje42@gmail.com>
3053
3054 * target.h: #include <sys/types.h>.
3055
06e03fff
PA
30562015-11-19 Pedro Alves <palves@redhat.com>
3057
3058 * linux-low.c (linux_process_qsupported): Change prototype.
3059 Adjust.
3060 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3061 Change prototype.
3062 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3063 and adjust to loop over all features.
3064 * server.c (handle_query) <qSupported>: Adjust to call
3065 target_process_qsupported once, passing it a vector of unprocessed
3066 features.
3067 * target.h (struct target_ops) <process_qsupported>: Change
3068 prototype.
3069 (target_process_qsupported): Adjust.
3070
9a084706
PA
30712015-11-19 Pedro Alves <palves@redhat.com>
3072
3073 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3074 mode.
3075 * configure: Regenerate.
3076
dad44a1f
PA
30772015-11-19 Pedro Alves <palves@redhat.com>
3078
3079 * configure: Regenerate.
3080
231c0592
YQ
30812015-11-19 Yao Qi <yao.qi@linaro.org>
3082
3083 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3084 type to uint32_t.
3085
6c1c9a8b
YQ
30862015-11-19 Yao Qi <yao.qi@linaro.org>
3087
3088 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3089 (struct aarch64_operand): Move enum out.
3090
9caa3311
YQ
30912015-11-19 Yao Qi <yao.qi@linaro.org>
3092
3093 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3094 struct user_fpsimd_state *.
3095 (aarch64_store_fpregset): Likewise.
3096
6a69a054
YQ
30972015-11-19 Yao Qi <yao.qi@linaro.org>
3098
3099 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3100 struct user_pt_regs *.
3101 (aarch64_store_gregset): Likewise.
3102
1798301e
PA
31032015-11-18 Pedro Alves <palves@redhat.com>
3104
3105 * Makefile.in (all_object_files): Add $IPA_OBJS.
3106
ce7715e2
PA
31072015-11-17 Pedro Alves <palves@redhat.com>
3108
3109 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3110 GDB_SIGNAL_0 and gdb_signal_to_string.
3111
c0879059
PA
31122015-11-17 Pedro Alves <palves@redhat.com>
3113
3114 * win32-low.c (handle_output_debug_string): Remove parameter.
3115 (win32_kill): Remove our_status local and adjust call to
3116 handle_output_debug_string.
3117 (get_child_debug_event): Adjust call to
3118 handle_output_debug_string.
3119
1996e237
SM
31202015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3121
3122 * linux-mips-low.c (mips_fill_gregset): Add cast.
3123 (mips_store_gregset): Likewise.
3124 (mips_fill_fpregset): Likewise.
3125 (mips_store_fpregset): Likewise.
3126
cbec665b
SM
31272015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3128
3129 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3130 priv.
3131
eb3e3c67
SM
31322015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3133
3134 * linux-mips-low.c (mips_linux_new_thread): Change type of
3135 watch_type to enum target_hw_bp_type.
3136
171de4b8
SM
31372015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3138
3139 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3140 Change return type to arm_hwbp_type.
3141
04248ead
SM
31422015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3143
3144 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3145 (arm_store_gregset): Likewise.
3146 * linux-arm-low.c (arm_get_hwcap): Likewise.
3147 (arm_read_description): Likewise.
3148
04b3479c
SM
31492015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3150
3151 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3152
2bc84e8a
SM
31532015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3154
3155 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3156 (ppc_fill_vsxregset): Likewise.
3157 (ppc_store_vsxregset): Likewise.
3158 (ppc_fill_vrregset): Likewise.
3159 (ppc_store_vrregset): Likewise.
3160 (ppc_fill_evrregset): Likewise.
3161 (ppc_store_evrregset): Likewise.
3162
e6c5bb05
SM
31632015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3164
3165 * linux-ppc-low.c (ppc_usrregs_info): Remove
3166 forward-declaration.
3167 (ppc_arch_setup): Move lower in file.
3168
7ea45d72
SM
31692015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3170
3171 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3172 (ps_pdwrite): Likewise.
3173
69291610
HW
31742015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3175
3176 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3177 to after assert checks.
3178
b42945fd
SM
31792015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3180
3181 * proc-service.c (ps_pdread): Add/adjust casts.
3182 (ps_pdwrite): Add/adjust casts.
3183
d6f85c84
SM
31842015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3185
3186 * server.c (handle_search_memory_1): Cast return value of
3187 memmem.
3188
f98cd059
SM
31892015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3190
3191 * server.c (write_qxfer_response): Change type of data to
3192 gdb_byte *.
3193
d2412fa5
PA
31942015-10-29 Pedro Alves <palves@redhat.com>
3195
3196 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3197
c17414a2
PA
31982015-10-29 Pedro Alves <palves@redhat.com>
3199
3200 * tracepoint.c (clear_installed_tracepoints): Add casts.
3201
e053fbc4
PA
32022015-10-29 Pedro Alves <palves@redhat.com>
3203
3204 * server.c (handle_v_cont, process_serial_event): Add enum
3205 gdb_signal casts to signal parsing code.
3206
add67df8
PA
32072015-10-29 Pedro Alves <palves@redhat.com>
3208
3209 * linux-low.h (NULL_REGSET): Define.
3210 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3211 * linux-arm-low.c (arm_regsets): Likewise.
3212 * linux-crisv32-low.c (cris_regsets): Likewise.
3213 * linux-m68k-low.c (m68k_regsets): Likewise.
3214 * linux-mips-low.c (mips_regsets): Likewise.
3215 * linux-nios2-low.c (nios2_regsets): Likewise.
3216 * linux-ppc-low.c (ppc_regsets): Likewise.
3217 * linux-s390-low.c (s390_regsets): Likewise.
3218 * linux-sh-low.c (sh_regsets): Likewise.
3219 * linux-sparc-low.c (sparc_regsets): Likewise.
3220 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3221 * linux-tile-low.c (tile_regsets): Likewise.
3222 * linux-x86-low.c (x86_regsets): Likewise.
3223 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3224
50bc912a
PA
32252015-10-29 Pedro Alves <palves@redhat.com>
3226
3227 * linux-low.h (NULL_REGSET): Define.
3228 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3229 * linux-arm-low.c (arm_regsets): Likewise.
3230 * linux-crisv32-low.c (cris_regsets): Likewise.
3231 * linux-m68k-low.c (m68k_regsets): Likewise.
3232 * linux-mips-low.c (mips_regsets): Likewise.
3233 * linux-nios2-low.c (nios2_regsets): Likewise.
3234 * linux-ppc-low.c (ppc_regsets): Likewise.
3235 * linux-s390-low.c (s390_regsets): Likewise.
3236 * linux-sh-low.c (sh_regsets): Likewise.
3237 * linux-sparc-low.c (sparc_regsets): Likewise.
3238 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3239 * linux-tile-low.c (tile_regsets): Likewise.
3240 * linux-x86-low.c (x86_regsets): Likewise.
3241 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3242
682b2546
DE
32432015-10-26 Doug Evans <dje@google.com>
3244
3245 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3246
963843d4
DE
32472015-10-26 Doug Evans <dje@google.com>
3248
3249 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3250
d41401ac
DE
32512015-10-26 Doug Evans <dje@google.com>
3252
3253 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3254 for debug_printf.
3255 (attach_thread, find_new_threads_callback): Ditto.
3256
3db28855
AT
32572015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3258
3259 * mem-break.h (set_breakpoint_data): Remove.
3260
fb78e89c
AT
32612015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3262
3263 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3264 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3265 (initialize_low): Remove set_breakpoint_data call.
3266 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3267 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3268 (initialize_low): Remove set_breakpoint_data call.
3269 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3270 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3271 (initialize_low): Remove set_breakpoint_data call.
3272
2e6ee069
AT
32732015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3274
3275 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3276 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3277 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3278 * target.h (target_breakpoint_kind_from_pc): New macro.
3279
1652a986
AT
32802015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3281
3282 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3283 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3284 the default breakpoint kind.
3285
abeead09
AT
32862015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3287
3288 * linux-arm-low.c (arm_supports_z_point_type): Add software
3289 breakpoint support.
3290
b0b4b501
AT
32912015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3292
3293 * linux-arm-low.c: Refactor breakpoint definitions.
3294 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3295 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3296
8689682c
AT
32972015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3298
3299 * Makefile.in: Add arm.c/o.
3300 * configure.srv: Likewise.
3301 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3302 (arm_breakpoint_kind_from_pc): New function.
3303 (arm_sw_breakpoint_from_kind): Return proper kind.
3304 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3305
27165294
AT
33062015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3307
3308 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3309 removal.
3310 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3311 (struct raw_breakpoint) <size>: Remove.
3312 (struct raw_breakpoint) <kind>: Add.
3313 (bp_size): New function.
3314 (bp_opcode): Likewise.
3315 (find_raw_breakpoint_at): Adjust for kind.
3316 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3317 (remove_memory_breakpoint): Adjust for kind call bp_size.
3318 (set_raw_breakpoint_at): Adjust for kind.
3319 (set_breakpoint): Likewise.
3320 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3321 (delete_raw_breakpoint): Adjust for kind.
3322 (delete_breakpoint): Likewise.
3323 (find_gdb_breakpoint): Likewise.
3324 (set_gdb_breakpoint_1): Likewise.
3325 (set_gdb_breakpoint): Likewise.
3326 (delete_gdb_breakpoint_1): Likewise.
3327 (delete_gdb_breakpoint): Likewise.
3328 (uninsert_raw_breakpoint): Likewise.
3329 (reinsert_raw_breakpoint): Likewise.
3330 (set_breakpoint_data): Remove.
3331 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3332 (check_mem_read): Adjust for kind call bp_size.
3333 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3334 (clone_one_breakpoint): Adjust for kind.
3335 * mem-break.h (set_gdb_breakpoint): Likewise.
3336 (delete_gdb_breakpoint): Likewise.
3337 * server.c (process_serial_event): Likewise.
3338
dd373349
AT
33392015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3340
3341 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3342 (struct linux_target_ops) <breakpoint>: Remove.
3343 (struct linux_target_ops) <breakpoint_len>: Remove.
3344 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3345 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3346 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3347 (arm_sw_breakpoint_from_kind): New function.
3348 * linux-bfin-low.c (bfin_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-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3354 (struct linux_target_ops) <breakpoint>: Remove.
3355 (struct linux_target_ops) <breakpoint_len>: Remove.
3356 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3357 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3358 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3359 (struct linux_target_ops) <breakpoint>: Remove.
3360 (struct linux_target_ops) <breakpoint_len>: Remove.
3361 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3362 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3363 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3364 and sw_breakpoint_from_kind to increment the pc.
3365 (linux_breakpoint_kind_from_pc): New function.
3366 (linux_sw_breakpoint_from_kind): New function.
3367 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3368 (initialize_low): Call breakpoint_kind_from_pc and
3369 sw_breakpoint_from_kind to replace breakpoint_data/len.
3370 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3371 New field.
3372 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3373 * linux-m32r-low.c (m32r_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-m68k-low.c (m68k_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-mips-low.c (mips_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-nios2-low.c (nios2_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-ppc-low.c (ppc_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-s390-low.c (s390_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-sh-low.c (sh_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-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3409 (struct linux_target_ops) <breakpoint>: Remove.
3410 (struct linux_target_ops) <breakpoint_len>: Remove.
3411 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3412 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3413 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3414 (struct linux_target_ops) <breakpoint>: Remove.
3415 (struct linux_target_ops) <breakpoint_len>: Remove.
3416 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3417 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3418 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3419 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3420 (struct linux_target_ops) <breakpoint>: Remove.
3421 (struct linux_target_ops) <breakpoint_len>: Remove.
3422 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3423 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3424 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3425 (struct linux_target_ops) <breakpoint>: Remove.
3426 (struct linux_target_ops) <breakpoint_len>: Remove.
3427 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3428 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3429
4cd98a19
AT
34302015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3431
3432 * linux-cris-low.c (cris_get_pc): Remove void arg.
3433
774ee6d2
AR
34342015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3435
3436 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3437 variable name.
3438
833dcd29
AR
34392015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3440
3441 * inferiors.c (thread_pid_matches_callback): New function.
3442 (find_thread_process): New function.
3443 (remove_thread): Reset current_thread.
3444 (remove_process): Assert threads have been removed first.
3445
8d689ee5
YQ
34462015-10-15 Yao Qi <yao.qi@linaro.org>
3447
3448 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3449 if it is 3.
3450 (aarch64_remove_point): Likewise.
3451 * regcache.c (regcache_register_size): New function.
3452
1c2e1515
YQ
34532015-10-12 Yao Qi <yao.qi@linaro.org>
3454
3455 * linux-aarch64-low.c: Update all callers as emit_load_store
3456 is renamed to aarch64_emit_load_store.
3457
e1c587c3
YQ
34582015-10-12 Yao Qi <yao.qi@linaro.org>
3459
3460 * linux-aarch64-low.c: Update all callers of function renaming
3461 from emit_insn to aarch64_emit_insn.
3462
b6542f81
YQ
34632015-10-12 Yao Qi <yao.qi@linaro.org>
3464
3465 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3466 arch/aarch64-insn.h.
3467 (struct aarch64_memory_operand): Likewise.
3468 (ENCODE): Likewise.
3469 (emit_insn): Move to arch/aarch64-insn.c.
3470 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3471 (emit_load_store): Move to arch/aarch64-insn.c.
3472 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3473 (can_encode_int32): Remove.
3474
246994ce
YQ
34752015-10-12 Yao Qi <yao.qi@linaro.org>
3476
3477 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3478 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3479 (aarch64_relocate_instruction): Likewise.
3480 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3481 (struct aarch64_insn_visitor): Likewise.
3482
0badd99f
YQ
34832015-10-12 Yao Qi <yao.qi@linaro.org>
3484
3485 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3486 (struct aarch64_insn_visitor): New.
3487 (struct aarch64_insn_relocation_data): New.
3488 (aarch64_ftrace_insn_reloc_b): New function.
3489 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3490 (aarch64_ftrace_insn_reloc_cb): Likewise.
3491 (aarch64_ftrace_insn_reloc_tb): Likewise.
3492 (aarch64_ftrace_insn_reloc_adr): Likewise.
3493 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3494 (aarch64_ftrace_insn_reloc_others): Likewise.
3495 (visitor): New.
3496 (aarch64_relocate_instruction): Use visitor.
3497
dfaffe9d
YQ
34982015-10-12 Yao Qi <yao.qi@linaro.org>
3499
3500 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3501 int. Add argument buf.
3502 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3503 aarch64_relocate_instruction.
3504
70b439f0
YQ
35052015-10-12 Yao Qi <yao.qi@linaro.org>
3506
3507 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3508 argument insn. Remove local variable insn. Don't call
3509 target_read_uint32.
3510 (aarch64_install_fast_tracepoint_jump_pad): Call
3511 target_read_uint32.
3512
7781c06f
YQ
35132015-09-30 Yao Qi <yao.qi@linaro.org>
3514
3515 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3516 (emit_load_store_pair): Likewise.
3517
9a3c8263
SM
35182015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3519
3520 * dll.c (match_dll): Add cast(s).
3521 (unloaded_dll): Likewise.
3522 * linux-low.c (second_thread_of_pid_p): Likewise.
3523 (delete_lwp_callback): Likewise.
3524 (count_events_callback): Likewise.
3525 (select_event_lwp_callback): Likewise.
3526 (linux_set_resume_request): Likewise.
3527 * server.c (accumulate_file_name_length): Likewise.
3528 (emit_dll_description): Likewise.
3529 (handle_qxfer_threads_worker): Likewise.
3530 (visit_actioned_threads): Likewise.
3531 * thread-db.c (any_thread_of): Likewise.
3532 * tracepoint.c (same_process_p): Likewise.
3533 (match_blocktype): Likewise.
3534 (build_traceframe_info_xml): Likewise.
3535
224c3ddb
SM
35362015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3537
3538 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3539 assignment.
3540 (gdb_unparse_agent_expr): Likewise.
3541 * hostio.c (require_data): Likewise.
3542 (handle_pread): Likewise.
3543 * linux-low.c (disable_regset): Likewise.
3544 (fetch_register): Likewise.
3545 (store_register): Likewise.
3546 (get_dynamic): Likewise.
3547 (linux_qxfer_libraries_svr4): Likewise.
3548 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3549 (set_fast_tracepoint_jump): Likewise.
3550 (uninsert_fast_tracepoint_jumps_at): Likewise.
3551 (reinsert_fast_tracepoint_jumps_at): Likewise.
3552 (validate_inserted_breakpoint): Likewise.
3553 (clone_agent_expr): Likewise.
3554 * regcache.c (init_register_cache): Likewise.
3555 * remote-utils.c (putpkt_binary_1): Likewise.
3556 (decode_M_packet): Likewise.
3557 (decode_X_packet): Likewise.
3558 (look_up_one_symbol): Likewise.
3559 (relocate_instruction): Likewise.
3560 (monitor_output): Likewise.
3561 * server.c (handle_search_memory): Likewise.
3562 (handle_qxfer_exec_file): Likewise.
3563 (handle_qxfer_libraries): Likewise.
3564 (handle_qxfer): Likewise.
3565 (handle_query): Likewise.
3566 (handle_v_cont): Likewise.
3567 (handle_v_run): Likewise.
3568 (captured_main): Likewise.
3569 * target.c (write_inferior_memory): Likewise.
3570 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3571 * tracepoint.c (init_trace_buffer): Likewise.
3572 (add_tracepoint_action): Likewise.
3573 (add_traceframe): Likewise.
3574 (add_traceframe_block): Likewise.
3575 (cmd_qtdpsrc): Likewise.
3576 (cmd_qtdv): Likewise.
3577 (cmd_qtstatus): Likewise.
3578 (response_source): Likewise.
3579 (response_tsv): Likewise.
3580 (cmd_qtnotes): Likewise.
3581 (gdb_collect): Likewise.
3582 (initialize_tracepoint): Likewise.
3583
afbe19f8
PL
35842015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3585
3586 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3587 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3588 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3589 <NOP>: New.
3590 (enum aarch64_condition_codes): New enum.
3591 (w0): New static global.
3592 (fp): Likewise.
3593 (lr): Likewise.
3594 (struct aarch64_memory_operand) <type>: New
3595 MEMORY_OPERAND_POSTINDEX type.
3596 (postindex_memory_operand): New helper function.
3597 (emit_ret): New function.
3598 (emit_load_store_pair): New function, factored out of emit_stp
3599 with support for MEMORY_OPERAND_POSTINDEX.
3600 (emit_stp): Rewrite using emit_load_store_pair.
3601 (emit_ldp): New function.
3602 (emit_load_store): Likewise.
3603 (emit_ldr): Mention post-index instruction in comment.
3604 (emit_ldrh): New function.
3605 (emit_ldrb): New function.
3606 (emit_ldrsw): Mention post-index instruction in comment.
3607 (emit_str): Likewise.
3608 (emit_subs): New function.
3609 (emit_cmp): Likewise.
3610 (emit_and): Likewise.
3611 (emit_orr): Likewise.
3612 (emit_orn): Likewise.
3613 (emit_eor): Likewise.
3614 (emit_mvn): Likewise.
3615 (emit_lslv): Likewise.
3616 (emit_lsrv): Likewise.
3617 (emit_asrv): Likewise.
3618 (emit_mul): Likewise.
3619 (emit_sbfm): Likewise.
3620 (emit_sbfx): Likewise.
3621 (emit_ubfm): Likewise.
3622 (emit_ubfx): Likewise.
3623 (emit_csinc): Likewise.
3624 (emit_cset): Likewise.
3625 (emit_nop): Likewise.
3626 (emit_ops_insns): New helper function.
3627 (emit_pop): Likewise.
3628 (emit_push): Likewise.
3629 (aarch64_emit_prologue): New function.
3630 (aarch64_emit_epilogue): Likewise.
3631 (aarch64_emit_add): Likewise.
3632 (aarch64_emit_sub): Likewise.
3633 (aarch64_emit_mul): Likewise.
3634 (aarch64_emit_lsh): Likewise.
3635 (aarch64_emit_rsh_signed): Likewise.
3636 (aarch64_emit_rsh_unsigned): Likewise.
3637 (aarch64_emit_ext): Likewise.
3638 (aarch64_emit_log_not): Likewise.
3639 (aarch64_emit_bit_and): Likewise.
3640 (aarch64_emit_bit_or): Likewise.
3641 (aarch64_emit_bit_xor): Likewise.
3642 (aarch64_emit_bit_not): Likewise.
3643 (aarch64_emit_equal): Likewise.
3644 (aarch64_emit_less_signed): Likewise.
3645 (aarch64_emit_less_unsigned): Likewise.
3646 (aarch64_emit_ref): Likewise.
3647 (aarch64_emit_if_goto): Likewise.
3648 (aarch64_emit_goto): Likewise.
3649 (aarch64_write_goto_address): Likewise.
3650 (aarch64_emit_const): Likewise.
3651 (aarch64_emit_call): Likewise.
3652 (aarch64_emit_reg): Likewise.
3653 (aarch64_emit_pop): Likewise.
3654 (aarch64_emit_stack_flush): Likewise.
3655 (aarch64_emit_zero_ext): Likewise.
3656 (aarch64_emit_swap): Likewise.
3657 (aarch64_emit_stack_adjust): Likewise.
3658 (aarch64_emit_int_call_1): Likewise.
3659 (aarch64_emit_void_call_2): Likewise.
3660 (aarch64_emit_eq_goto): Likewise.
3661 (aarch64_emit_ne_goto): Likewise.
3662 (aarch64_emit_lt_goto): Likewise.
3663 (aarch64_emit_le_goto): Likewise.
3664 (aarch64_emit_gt_goto): Likewise.
3665 (aarch64_emit_ge_got): Likewise.
3666 (aarch64_emit_ops_impl): New static global variable.
3667 (aarch64_emit_ops): New target function, return
3668 &aarch64_emit_ops_impl.
3669 (struct linux_target_ops): Install it.
3670
bb903df0
PL
36712015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3672
3673 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3674 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3675 aarch64-ipa.o.
3676 * linux-aarch64-ipa.c: New file.
3677 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3678 and endian.h.
3679 (aarch64_get_thread_area): New target method.
3680 (extract_signed_bitfield): New helper function.
3681 (aarch64_decode_ldr_literal): New function.
3682 (enum aarch64_opcodes): New enum.
3683 (struct aarch64_register): New struct.
3684 (struct aarch64_operand): New struct.
3685 (x0): New static global.
3686 (x1): Likewise.
3687 (x2): Likewise.
3688 (x3): Likewise.
3689 (x4): Likewise.
3690 (w2): Likewise.
3691 (ip0): Likewise.
3692 (sp): Likewise.
3693 (xzr): Likewise.
3694 (aarch64_register): New helper function.
3695 (register_operand): Likewise.
3696 (immediate_operand): Likewise.
3697 (struct aarch64_memory_operand): New struct.
3698 (offset_memory_operand): New helper function.
3699 (preindex_memory_operand): Likewise.
3700 (enum aarch64_system_control_registers): New enum.
3701 (ENCODE): New macro.
3702 (emit_insn): New helper function.
3703 (emit_b): New function.
3704 (emit_bcond): Likewise.
3705 (emit_cb): Likewise.
3706 (emit_tb): Likewise.
3707 (emit_blr): Likewise.
3708 (emit_stp): Likewise.
3709 (emit_ldp_q_offset): Likewise.
3710 (emit_stp_q_offset): Likewise.
3711 (emit_load_store): Likewise.
3712 (emit_ldr): Likewise.
3713 (emit_ldrsw): Likewise.
3714 (emit_str): Likewise.
3715 (emit_ldaxr): Likewise.
3716 (emit_stxr): Likewise.
3717 (emit_stlr): Likewise.
3718 (emit_data_processing_reg): Likewise.
3719 (emit_data_processing): Likewise.
3720 (emit_add): Likewise.
3721 (emit_sub): Likewise.
3722 (emit_mov): Likewise.
3723 (emit_movk): Likewise.
3724 (emit_mov_addr): Likewise.
3725 (emit_mrs): Likewise.
3726 (emit_msr): Likewise.
3727 (emit_sevl): Likewise.
3728 (emit_wfe): Likewise.
3729 (append_insns): Likewise.
3730 (can_encode_int32_in): New helper function.
3731 (aarch64_relocate_instruction): New function.
3732 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3733 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3734 (struct linux_target_ops): Install aarch64_get_thread_area,
3735 aarch64_install_fast_tracepoint_jump_pad and
3736 aarch64_get_min_fast_tracepoint_insn_len.
3737
787749ea
PL
37382015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3739
3740 * Makefile.in (aarch64-insn.o): New rule.
3741 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3742
9812b2e6
YQ
37432015-09-21 Yao Qi <yao.qi@linaro.org>
3744
3745 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3746
18fe412b
YQ
37472015-09-21 Yao Qi <yao.qi@linaro.org>
3748
3749 * tracepoint.c (max_jump_pad_size): Remove.
3750
a0cc84cd
YQ
37512015-09-18 Yao Qi <yao.qi@linaro.org>
3752
3753 * linux-aarch64-low.c: Don't include sys/uio.h.
3754 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3755
d78908cf
WW
37562015-09-16 Wei-cheng Wang <cole945@gmail.com>
3757
3758 * tracepoint.c (eval_result_type): Change prototype.
3759 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3760
d57e0d50
PA
37612015-09-15 Pedro Alves <palves@redhat.com>
3762
3763 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3764 Check whether to report exec events instead of checking whether
3765 multiprocess is enabled.
3766
5a676acc
PA
37672015-09-15 Pedro Alves <palves@redhat.com>
3768
3769 PR remote/18965
3770 * remote-utils.c (prepare_resume_reply): Merge
3771 TARGET_WAITKIND_VFORK_DONE switch case with the
3772 TARGET_WAITKIND_FORKED case.
3773
7c5d0fad
YQ
37742015-09-15 Yao Qi <yao.qi@linaro.org>
3775
3776 * server.c (handle_query): Check string comparison using
3777 "else if" instead of "if".
3778
750ce8d1
YQ
37792015-09-15 Yao Qi <yao.qi@linaro.org>
3780
3781 * server.c (vCont_supported): New global variable.
3782 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3783 matches. Append ";vContSupported+" to own_buf.
3784 (handle_v_requests): Append ";s;S" to own_buf if target supports
3785 hardware single step or vCont_supported is false.
3786 (capture_main): Set vCont_supported to zero.
3787
70b90b91
YQ
37882015-09-15 Yao Qi <yao.qi@linaro.org>
3789
3790 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3791 it to ...
3792 (linux_supports_hardware_single_step): ... New function.
3793 (linux_target_ops): Update.
3794 * lynx-low.c (lynx_target_ops): Set field
3795 supports_hardware_single_step to target_can_do_hardware_single_step.
3796 * nto-low.c (nto_target_ops): Likewise.
3797 * spu-low.c (spu_target_ops): Likewise.
3798 * win32-low.c (win32_target_ops): Likewise.
3799 * target.c (target_can_do_hardware_single_step): New function.
3800 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3801 Remove. <supports_hardware_single_step>: New field.
3802 (target_supports_conditional_breakpoints): Remove.
3803 (target_supports_hardware_single_step): New macro.
3804 (target_can_do_hardware_single_step): Declare.
3805 * server.c (handle_query): Use target_supports_hardware_single_step
3806 instead of target_supports_conditional_breakpoints.
3807
ade90bde
YQ
38082015-09-15 Yao Qi <yao.qi@linaro.org>
3809
3810 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3811 function.
3812 (struct linux_target_ops the_low_target): Install
3813 aarch64_linux_siginfo_fixup.
3814
94585166
DB
38152015-09-11 Don Breazeal <donb@codesourcery.com>
3816 Luis Machado <lgustavo@codesourcery.com>
3817
3818 * linux-low.c (linux_mourn): Static declaration.
3819 (linux_arch_setup): Move in front of
3820 handle_extended_wait.
3821 (linux_arch_setup_thread): New function.
3822 (handle_extended_wait): Handle exec events. Call
3823 linux_arch_setup_thread. Make event_lwp argument a
3824 pointer-to-a-pointer.
3825 (check_zombie_leaders): Do not check stopped threads.
3826 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3827 (linux_low_filter_event): Add lwp and thread for exec'ing
3828 non-leader thread if leader thread has been deleted.
3829 Refactor code into linux_arch_setup_thread and call it.
3830 Pass child lwp pointer by reference to handle_extended_wait.
3831 (linux_wait_for_event_filtered): Update comment.
3832 (linux_wait_1): Prevent clobbering exec event status.
3833 (linux_supports_exec_events): New function.
3834 (linux_target_ops) <supports_exec_events>: Initialize new member.
3835 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3836 new member.
3837 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3838 * server.c (report_exec_events): New global variable.
3839 (handle_query): Handle qSupported query for exec-events feature.
3840 (captured_main): Initialize report_exec_events.
3841 * server.h (report_exec_events): Declare new global variable.
3842 * target.h (struct target_ops) <supports_exec_events>: New
3843 member.
3844 (target_supports_exec_events): New macro.
3845 * win32-low.c (win32_target_ops) <supports_exec_events>:
3846 Initialize new member.
3847
0568462b
MM
38482015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3849
3850 * linux-low.c (linux_low_enable_btrace): Remove.
3851 (linux_target_ops): Replace linux_low_enable_btrace with
3852 linux_enable_btrace.
3853
39edd165
YQ
38542015-09-03 Yao Qi <yao.qi@linaro.org>
3855
3856 * linux-aarch64-low.c (aarch64_insert_point): Call
3857 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3858 returns true.
3859
1db33b5a
UW
38602015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3861
3862 * linux-low.c (check_stopped_by_breakpoint): Use
3863 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3864
ab290430
PA
38652015-08-27 Pedro Alves <palves@redhat.com>
3866
3867 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3868
8d749320
SM
38692015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3870
6711b7f8
SM
3871 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3872 the XNEW-family equivalent.
8d749320
SM
3873 (compile_bytecodes): Likewise.
3874 * dll.c (loaded_dll): Likewise.
3875 * event-loop.c (append_callback_event): Likewise.
3876 (create_file_handler): Likewise.
3877 (create_file_event): Likewise.
3878 * hostio.c (handle_open): Likewise.
3879 * inferiors.c (add_thread): Likewise.
3880 (add_process): Likewise.
3881 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3882 * linux-arm-low.c (arm_new_process): Likewise.
3883 (arm_new_thread): Likewise.
3884 * linux-low.c (add_to_pid_list): Likewise.
3885 (linux_add_process): Likewise.
3886 (handle_extended_wait): Likewise.
3887 (add_lwp): Likewise.
3888 (enqueue_one_deferred_signal): Likewise.
3889 (enqueue_pending_signal): Likewise.
3890 (linux_resume_one_lwp_throw): Likewise.
3891 (linux_resume_one_thread): Likewise.
3892 (linux_read_memory): Likewise.
3893 (linux_write_memory): Likewise.
3894 * linux-mips-low.c (mips_linux_new_process): Likewise.
3895 (mips_linux_new_thread): Likewise.
3896 (mips_add_watchpoint): Likewise.
3897 * linux-x86-low.c (initialize_low_arch): Likewise.
3898 * lynx-low.c (lynx_add_process): Likewise.
3899 * mem-break.c (set_raw_breakpoint_at): Likewise.
3900 (set_breakpoint): Likewise.
3901 (add_condition_to_breakpoint): Likewise.
3902 (add_commands_to_breakpoint): Likewise.
3903 (clone_agent_expr): Likewise.
3904 (clone_one_breakpoint): Likewise.
3905 * regcache.c (new_register_cache): Likewise.
3906 * remote-utils.c (look_up_one_symbol): Likewise.
3907 * server.c (queue_stop_reply): Likewise.
3908 (start_inferior): Likewise.
3909 (queue_stop_reply_callback): Likewise.
3910 (handle_target_event): Likewise.
3911 * spu-low.c (fetch_ppc_memory): Likewise.
3912 (store_ppc_memory): Likewise.
3913 * target.c (set_target_ops): Likewise.
3914 * thread-db.c (thread_db_load_search): Likewise.
3915 (try_thread_db_load_1): Likewise.
3916 * tracepoint.c (add_tracepoint): Likewise.
3917 (add_tracepoint_action): Likewise.
3918 (create_trace_state_variable): Likewise.
3919 (cmd_qtdpsrc): Likewise.
3920 (cmd_qtro): Likewise.
3921 (add_while_stepping_state): Likewise.
3922 * win32-low.c (child_add_thread): Likewise.
3923 (get_image_name): Likewise.
3924
ed8b7b42
YQ
39252015-08-25 Yao Qi <yao.qi@linaro.org>
3926
3927 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3928
db3cb7cb
YQ
39292015-08-25 Yao Qi <yao.qi@linaro.org>
3930
3931 * Makefile.in (aarch64-linux.o): New rule.
3932 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3933 srv_tgtobj.
3934 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3935 (aarch64_init_debug_reg_state): Make it extern.
3936 (aarch64_linux_prepare_to_resume): Remove.
3937
f6011a1c
YQ
39382015-08-25 Yao Qi <yao.qi@linaro.org>
3939
3940 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3941 lwp_arch_private_info and ptid_of_lwp.
3942
88e2cf7e
YQ
39432015-08-25 Yao Qi <yao.qi@linaro.org>
3944
3945 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3946 Find proc_info by find_process_pid. All callers updated.
3947
5e35436e
YQ
39482015-08-25 Yao Qi <yao.qi@linaro.org>
3949
3950 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3951 Remove.
3952 (debug_reg_change_callback): Remove.
3953 (aarch64_notify_debug_reg_change): Remove.
3954
4a8a7965
YQ
39552015-08-25 Yao Qi <yao.qi@linaro.org>
3956
3957 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3958 Call current_lwp_ptid.
3959
32a271ee
YQ
39602015-08-25 Yao Qi <yao.qi@linaro.org>
3961
3962 * linux-aarch64-low.c (debug_reg_change_callback): Use
3963 debug_printf.
3964
0d51c8d7
YQ
39652015-08-25 Yao Qi <yao.qi@linaro.org>
3966
3967 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3968
31a43dd5
YQ
39692015-08-25 Yao Qi <yao.qi@linaro.org>
3970
3971 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3972
8ee52567
YQ
39732015-08-25 Yao Qi <yao.qi@linaro.org>
3974
3975 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3976 the code.
3977
ff3f0f45
YQ
39782015-08-25 Yao Qi <yao.qi@linaro.org>
3979
3980 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3981 Remove.
3982 (debug_reg_change_callback): Remove argument entry and add argument
3983 lwp. Remove local variable thread. Don't print thread id in the
3984 debugging output. Don't check whether pid of thread equals to pid.
3985 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3986 iterate_over_lwps instead find_inferior.
3987
3d40fbb5
PA
39882015-08-24 Pedro Alves <palves@redhat.com>
3989
3990 * inferiors.c (get_first_process): New function.
3991 * inferiors.h (get_first_process): New declaration.
3992 * remote-utils.c (read_ptid): Default to the first process in the
3993 list, instead of to the current thread's process.
3994
438e1e42
PA
39952015-08-24 Pedro Alves <palves@redhat.com>
3996
3997 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3998 * event-loop.c: Likewise.
3999 * remote-utils.c: Likewise.
4000 * tracepoint.c: Likewise.
4001
a8c6d4fc
PA
40022015-08-24 Pedro Alves <palves@redhat.com>
4003
4004 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4005 ptid_get_lwp.
4006
99b0bb12
PA
40072015-08-21 Pedro Alves <palves@redhat.com>
4008
4009 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4010 instead of literal 1.
4011
f8904751
PA
40122015-08-21 Pedro Alves <palves@redhat.com>
4013
4014 * tdesc.c (default_description): Explicitly zero-initialize.
4015
465a859e
PA
40162015-08-21 Pedro Alves <palves@redhat.com>
4017
4018 PR gdb/18749
4019 * inferiors.c (remove_thread): Discard any pending stop reply for
4020 this thread.
4021 * server.c (remove_all_on_match_pid): Rename to ...
4022 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4023 instead of a pid.
4024 (discard_queued_stop_replies): Change parameter to a ptid. Now
4025 extern.
4026 (handle_v_kill, kill_inferior_callback, captured_main)
4027 (process_serial_event): Adjust.
4028 * server.h (discard_queued_stop_replies): Declare.
4029
f0db101d
PA
40302015-08-21 Pedro Alves <palves@redhat.com>
4031
4032 * linux-low.c (wait_for_sigstop): Always switch to no thread
4033 selected if the previously current thread dies.
4034 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4035 process instead of the current thread's.
4036 * remote-utils.c (input_interrupt): Don't check if there's no
4037 current thread.
4038 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4039 current thread to the general thread fails, error out.
4040 (handle_qxfer_auxv, handle_qxfer_libraries)
4041 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4042 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4043 (handle_query): Check if there's a thread selected instead of
4044 checking whether there's any thread in the thread list.
4045 (handle_qxfer_threads, handle_qxfer_btrace)
4046 (handle_qxfer_btrace_conf): Don't error out early if there's no
4047 thread in the thread list.
4048 (handle_v_cont, myresume): Don't set the current thread to the
4049 continue thread.
4050 (process_serial_event) <Hg handling>: Also set thread_id if the
4051 previous general thread is still alive.
4052 (process_serial_event) <g/G handling>: If setting the current
4053 thread to the general thread fails, error out.
4054 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4055 thread's lwp instead of the current thread's.
4056 * target.c (set_desired_thread): If the desired thread was not
4057 found, leave the current thread pointing to NULL. Return an int
4058 (boolean) indicating success.
4059 * target.h (set_desired_thread): Change return type to int.
4060
40045d91
MF
40612015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4062
4063 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4064 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4065 #includes.
4066 (ps_get_thread_area): New function.
4067
45face3b
GB
40682015-08-19 Gary Benson <gbenson@redhat.com>
4069
4070 * hostio.c (handle_pread): Do not attempt to read more data
4071 than hostio_reply_with_data can fit in a packet.
4072
16d5f642
JB
40732015-08-18 Joel Brobecker <brobecker@adacore.com>
4074
4075 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4076
a738da3a
MF
40772015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4078
4079 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4080
33ebda9d
PA
40812015-08-06 Pedro Alves <palves@redhat.com>
4082
4083 * tracepoint.c (expr_eval_result): Now an int.
4084
a44892be
PA
40852015-08-06 Pedro Alves <palves@redhat.com>
4086
4087 * gdbthread.h (struct regcache): Forward declare.
4088 (struct thread_info) <regcache_data>: Now a struct regcache
4089 pointer.
4090 * inferiors.c (inferior_regcache_data)
4091 (set_inferior_regcache_data): Now work with struct regcache
4092 pointers.
4093 * inferiors.h (struct regcache): Forward declare.
4094 (inferior_regcache_data, set_inferior_regcache_data): Now work
4095 with struct regcache pointers.
4096 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4097 (free_register_cache_thread): Remove struct regcache pointer
4098 casts.
4099
608a1e46
PA
41002015-08-06 Pedro Alves <palves@redhat.com>
4101
4102 * server.c (captured_main): On error, print the exception message
4103 to stderr, and if run_once is set, throw a quit.
4104
f0ce0d3a
PA
41052015-08-06 Pedro Alves <palves@redhat.com>
4106
4107 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4108 the current thread.
4109
bf47e248
PA
41102015-08-06 Pedro Alves <palves@redhat.com>
4111
4112 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4113 reading beyond the passed in buffer length.
4114
b6b9ffcc
PL
41152015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4116
4117 * tracepoint.c (symbol_list) <required>: Remove.
4118
863d01bd
PA
41192015-08-06 Pedro Alves <palves@redhat.com>
4120
4121 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4122 count if stopping and suspending threads.
4123 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4124 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4125 (linux_detach): Complete an ongoing step-over.
4126 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4127 throughout.
4128 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4129 (linux_wait_1): If passing a signal to the inferior after
4130 finishing a step-over, unsuspend and re-resume all lwps. If we
4131 see a single-step event but the thread should be continuing, don't
4132 pass the trap to gdb.
4133 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4134 internal_error instead of gdb_assert.
4135 (enqueue_pending_signal): New function.
4136 (check_ptrace_stopped_lwp_gone): Add debug output.
4137 (start_step_over): Use internal_error instead of gdb_assert.
4138 (complete_ongoing_step_over): New function.
4139 (linux_resume_one_thread): Don't resume a suspended thread.
4140 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4141 it stepping.
4142
00db26fa
PA
41432015-08-06 Pedro Alves <palves@redhat.com>
4144
4145 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4146 (linux_thread_alive): Use lwp_is_marked_dead.
4147 (extended_event_reported): Delete.
4148 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4149 instead of extended_event_reported.
4150 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4151 as well.
4152 (lwp_is_marked_dead): New function.
4153 (lwp_running): Use lwp_is_marked_dead.
4154 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4155 comment.
4156
ad071a30
PA
41572015-08-06 Pedro Alves <palves@redhat.com>
4158
4159 * linux-low.c (linux_wait_1): Move fork event output out of the
4160 !report_to_gdb check. Pass event_child->waitstatus to
4161 target_waitstatus_to_string instead of ourstatus.
4162
524b57e6
YQ
41632015-08-04 Yao Qi <yao.qi@linaro.org>
4164
4165 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4166 if current_thread is 32 bit.
4167
6085d6f6
YQ
41682015-08-04 Yao Qi <yao.qi@linaro.org>
4169
4170 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4171 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4172 * server.c (extended_protocol): Remove "static".
4173 * server.h (extended_protocol): Declare it.
4174
8a7e4587
YQ
41752015-08-04 Yao Qi <yao.qi@linaro.org>
4176
4177 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4178 both aarch64 and aarch32.
4179 (aarch64_set_pc): Likewise.
4180
3b53ae99
YQ
41812015-08-04 Yao Qi <yao.qi@linaro.org>
4182
4183 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4184 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4185 arm-with-neon.xml to srv_xmlfiles.
4186 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4187 (is_64bit_tdesc): New function.
4188 (aarch64_linux_read_description): New function.
4189 (aarch64_arch_setup): Call aarch64_linux_read_description.
4190 (regs_info): Rename to regs_info_aarch64.
4191 (aarch64_regs_info): Return right regs_info.
4192 (initialize_low_arch): Call initialize_low_arch_aarch32.
4193
bd9e6534
YQ
41942015-08-04 Yao Qi <yao.qi@linaro.org>
4195
4196 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4197 * linux-aarch32-low.c: New file.
4198 * linux-aarch32-low.h: New file.
4199 * linux-arm-low.c (arm_fill_gregset): Move it to
4200 linux-aarch32-low.c.
4201 (arm_store_gregset): Likewise.
4202 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4203 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4204 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4205 (regs_info): Rename to regs_info_arm.
4206 (arm_regs_info): Return regs_info_aarch32 if
4207 have_ptrace_getregset is 1 and target description is
4208 arm_with_neon or arm_with_vfpv3.
4209 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4210 Call initialize_low_arch_aarch32 instead.
4211
ded48a5e
YQ
42122015-08-04 Yao Qi <yao.qi@linaro.org>
4213
4214 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4215 * linux-low.c: ... here.
4216 * linux-low.h (have_ptrace_getregset): Declare it.
4217
96e9210f
PA
42182015-08-04 Pedro Alves <palves@redhat.com>
4219
4220 * thread-db.c (struct thread_db): Use new typedefs.
4221 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4222 CHK calls.
4223 (disable_thread_event_reporting): Cast result of dlsym to
4224 destination function pointer type.
4225 (thread_db_mourn): Use td_ta_delete_ftype.
4226
af60a1ef
SL
42272015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4228
4229 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4230 arch variant.
4231 (CDX_BREAKPOINT): Define for R2.
4232 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4233 (the_low_target): Add comments.
4234
e8b41681
YQ
42352015-07-30 Yao Qi <yao.qi@linaro.org>
4236
4237 * linux-arm-low.c (arm_hwcap): Remove it.
4238 (arm_read_description): New local variable arm_hwcap. Don't
4239 set arm_hwcap to zero.
4240
89abb039
YQ
42412015-07-30 Yao Qi <yao.qi@linaro.org>
4242
4243 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4244 Use regcache->tdesc instead.
4245 (arm_store_wmmxregset): Likewise.
4246 (arm_fill_vfpregset): Likewise.
4247 (arm_store_vfpregset): Likewise.
4248
deca266c
YQ
42492015-07-30 Yao Qi <yao.qi@linaro.org>
4250
4251 * linux-arm-low.c: Include arch/arm.h.
4252 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4253 (arm_store_gregset): Likewise.
4254
aa58a496
SM
42552015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4256
4257 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4258 ptrace's 4th parameter.
4259
50904b25
YQ
42602015-07-27 Yao Qi <yao.qi@linaro.org>
4261
4262 * configure.srv (case aarch64*-*-linux*): Don't set
4263 srv_linux_usrregs.
4264
5826e159
PA
42652015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4266
4267 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4268 sys/ptrace.h.
4269 * linux-arm-low.c: Likewise.
4270 * linux-cris-low.c: Likewise.
4271 * linux-crisv32-low.c: Likewise.
4272 * linux-low.c: Likewise.
4273 * linux-m68k-low.c: Likewise.
4274 * linux-mips-low.c: Likewise.
4275 * linux-nios2-low.c: Likewise.
4276 * linux-s390-low.c: Likewise.
4277 * linux-sparc-low.c: Likewise.
4278 * linux-tic6x-low.c: Likewise.
4279 * linux-tile-low.c: Likewise.
4280 * linux-x86-low.c: Likewise.
4281
54019719
PA
42822015-07-24 Pedro Alves <palves@redhat.com>
4283
4284 * config.in: Regenerate.
4285 * configure: Regenerate.
4286
eb7aa561
PA
42872015-07-24 Pedro Alves <palves@redhat.com>
4288
4289 * acinclude.m4: Include ../ptrace.m4.
4290 * configure.ac: Call GDB_AC_PTRACE.
4291 * config.in, configure: Regenerate.
4292
55d7b841
YQ
42932015-07-24 Yao Qi <yao.qi@linaro.org>
4294
4295 * linux-low.c (linux_create_inferior): Remove setting to
4296 proc->priv->new_inferior.
4297 (linux_attach): Likewise.
4298 (linux_low_filter_event): Likewise.
4299 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4300
c06cbd92
YQ
43012015-07-24 Yao Qi <yao.qi@linaro.org>
4302
4303 * linux-low.c (linux_arch_setup): New function.
4304 (linux_low_filter_event): If proc->tdesc is NULL and
4305 proc->attached is true, call the_low_target.arch_setup.
4306 Otherwise, keep status pending, and return.
4307 (linux_resume_one_lwp_throw): Don't call get_pc if
4308 thread->while_stepping isn't NULL. Don't call
4309 get_thread_regcache if proc->tdesc is NULL.
4310 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4311 (linux_target_ops): Install arch_setup.
4312 * server.c (start_inferior): Call the_target->arch_setup.
4313 * target.h (struct target_ops) <arch_setup>: New field.
4314 (target_arch_setup): New marco.
4315 * lynx-low.c (lynx_target_ops): Update.
4316 * nto-low.c (nto_target_ops): Update.
4317 * spu-low.c (spu_target_ops): Update.
4318 * win32-low.c (win32_target_ops): Update.
4319
5ae3ebba
YQ
43202015-07-24 Yao Qi <yao.qi@linaro.org>
4321
4322 * linux-low.c (linux_add_process): Don't set
4323 proc->priv->new_inferior.
4324 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4325 (linux_attach): Likewise.
4326
eb97750b
YQ
43272015-07-24 Yao Qi <yao.qi@linaro.org>
4328
4329 * server.c (start_inferior): Code refactor.
4330
51aee833
YQ
43312015-07-24 Yao Qi <yao.qi@linaro.org>
4332
4333 * server.c (process_serial_event): Set general_thread.
4334
af1b22f3
YQ
43352015-07-21 Yao Qi <yao.qi@linaro.org>
4336
4337 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4338 aarch64_linux_get_debug_reg_capacity.
4339
554717a3
YQ
43402015-07-17 Yao Qi <yao.qi@linaro.org>
4341
4342 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4343 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4344 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4345 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4346 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4347 (AARCH64_HWP_ALIGNMENT): Likewise.
4348 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4349 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4350 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4351 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4352 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4353 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4354 (struct aarch64_debug_reg_state): Likewise.
4355 (struct arch_lwp_info): Likewise.
4356 (aarch64_align_watchpoint): Likewise.
4357 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4358 (aarch64_watchpoint_length): Likewise.
4359 (aarch64_point_encode_ctrl_reg): Likewise
4360 (aarch64_point_is_aligned): Likewise.
4361 (aarch64_align_watchpoint): Likewise.
4362 (aarch64_linux_set_debug_regs):
4363 (aarch64_dr_state_insert_one_point): Likewise.
4364 (aarch64_dr_state_remove_one_point): Likewise.
4365 (aarch64_handle_breakpoint): Likewise.
4366 (aarch64_handle_aligned_watchpoint): Likewise.
4367 (aarch64_handle_unaligned_watchpoint): Likewise.
4368 (aarch64_handle_watchpoint): Likewise.
4369
c67ca4de
YQ
43702015-07-17 Yao Qi <yao.qi@linaro.org>
4371
4372 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4373 and don't aarch64_get_debug_reg_state. All callers update.
4374 (aarch64_handle_aligned_watchpoint): Likewise.
4375 (aarch64_handle_unaligned_watchpoint): Likewise.
4376 (aarch64_handle_watchpoint): Likewise.
4377 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4378 (aarch64_remove_point): Likewise.
4379
25abf979
YQ
43802015-07-17 Yao Qi <yao.qi@linaro.org>
4381
4382 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4383 debug_printf.
4384 (aarch64_handle_unaligned_watchpoint): Likewise.
4385
db1ff28b
JK
43862015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4387
4388 Revert the previous 3 commits:
4389 Move gdb_regex* to common/
4390 Move linux_find_memory_regions_full & co.
4391 gdbserver build-id attribute generator
4392
700ca40f
JK
43932015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4394 Jan Kratochvil <jan.kratochvil@redhat.com>
4395
4396 gdbserver build-id attribute generator.
4397 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4398 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4399 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4400 (find_phdr): New.
4401 (get_dynamic): Use find_pdhr to traverse program headers.
4402 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4403 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4404 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4405 (get_hex_build_id): New.
4406 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4407 to reply XML document.
4408
9904185c
JK
44092015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4410 Jan Kratochvil <jan.kratochvil@redhat.com>
4411
4412 * target.c: Include target/target-utils.h and fcntl.h.
4413 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4414 (target_fileio_read_stralloc): New functions.
4415
6e5b4429
JK
44162015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4417
4418 * Makefile.in (OBS): Add gdb_regex.o.
4419 (gdb_regex.o): New.
4420 * config.in: Rebuilt.
4421 * configure: Rebuilt.
4422
ddc98fbf
JK
44232015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4424 Jan Kratochvil <jan.kratochvil@redhat.com>
4425
4426 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4427 * Makefile.in (OBS): Add target-utils.o.
4428 (linux-maps.o, target-utils.o): New.
4429 * configure.srv (srv_linux_obj): Add linux-maps.o.
4430
e57bb7a0
PL
44312015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4432
4433 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4434 function, return 1.
4435 (the_low_target): Install it.
4436
586b02a9
PA
44372015-07-14 Pedro Alves <palves@redhat.com>
4438
4439 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4440 Instead, ignore ECHILD, and throw an error for other errnos.
4441
58c1b36c
PA
44422015-07-10 Pedro Alves <palves@redhat.com>
4443
4444 * event-loop.c (struct callback_event) <data>: Change type to
4445 gdb_client_data instance instead of gdb_client_data pointer.
4446 (append_callback_event): Adjust.
4447
421530db
PL
44482015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4449
4450 * linux-aarch64-low.c: Add comments for each linux_target_ops
4451 method. Remove comments already covered in target_ops and
4452 linux_target_ops definitions.
4453 (the_low_target): Add comments for each unimplemented method.
4454
c2d65f38
YQ
44552015-07-09 Yao Qi <yao.qi@linaro.org>
4456
4457 * linux-aarch64-low.c (aarch64_regmap): Remove.
4458 (aarch64_usrregs_info): Remove.
4459 (regs_info): Set field usrregs to NULL.
4460
b20a6524
MM
44612015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4462
4463 * linux-low.c: Include "rsp-low.h"
4464 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4465 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4466 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4467 (handle_btrace_enable_pt): New.
4468 (handle_btrace_general_set): Support "pt".
4469 (handle_btrace_conf_general_set): Support "pt:size".
4470
96c97461
PL
44712015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4472
4473 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4474 Z_PACKET_SW_BP.
4475
37d66942
PL
44762015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4477
4478 * linux-aarch64-low.c: Remove comment about endianness.
4479 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4480 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4481 memcmp.
4482
dc06243f
GB
44832015-06-24 Gary Benson <gbenson@redhat.com>
4484
4485 * linux-i386-ipa.c (stdint.h): Do not include.
4486 * lynx-i386-low.c (stdint.h): Likewise.
4487 * lynx-ppc-low.c (stdint.h): Likewise.
4488 * mem-break.c (stdint.h): Likewise.
4489 * thread-db.c (stdint.h): Likewise.
4490 * tracepoint.c (stdint.h): Likewise.
4491 * win32-low.c (stdint.h): Likewise.
4492
124e13d9
SM
44932015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4494
4495 * server.c (write_qxfer_response): Update call to
4496 remote_escape_output.
4497
909c2cda
JK
44982015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4499 Jan Kratochvil <jan.kratochvil@redhat.com>
4500
4501 Merge multiple hex conversions.
4502 * gdbreplay.c (tohex): Rename to 'fromhex'.
4503 (logchar): Use fromhex.
4504
24c05f46
JK
45052015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4506
4507 * server.c (handle_qxfer_libraries): Set `version' attribute for
4508 <library-list>.
4509
14d2069a
GB
45102015-06-10 Gary Benson <gbenson@redhat.com>
4511
4512 * target.h (struct target_ops) <multifs_open>: New field.
4513 <multifs_unlink>: Likewise.
4514 <multifs_readlink>: Likewise.
4515 * linux-low.c (nat/linux-namespaces.h): New include.
4516 (linux_target_ops): Initialize the_target->multifs_open,
4517 the_target->multifs_unlink and the_target->multifs_readlink.
4518 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4519 * hostio.c (hostio_fs_pid): New static variable.
4520 (hostio_handle_new_gdb_connection): New function.
4521 (handle_setfs): Likewise.
4522 (handle_open): Use the_target->multifs_open as appropriate.
4523 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4524 (handle_readlink): Use the_target->multifs_readlink as
4525 appropriate.
4526 (handle_vFile): Handle vFile:setfs packets.
4527 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4528 after target_handle_new_gdb_connection.
4529
4b8b5e72
GB
45302015-06-10 Gary Benson <gbenson@redhat.com>
4531
4532 * configure.ac (AC_CHECK_FUNCS): Add setns.
4533 * config.in: Regenerate.
4534 * configure: Likewise.
4535 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4536 (linux-namespaces.o): New rule.
4537 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4538
3ac2e371
GB
45392015-06-09 Gary Benson <gbenson@redhat.com>
4540
4541 * hostio.c (handle_open): Process mode argument with
4542 fileio_to_host_mode.
4543
ca9b78ce
YQ
45442015-06-01 Yao Qi <yao.qi@linaro.org>
4545
4546 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4547 * linux-x86-low.c: Likewise.
4548
bfacd19d
DB
45492015-05-28 Don Breazeal <donb@codesourcery.com>
4550
4551 * linux-low.c (handle_extended_wait): Initialize
4552 thread_info.last_resume_kind for new fork children.
4553
452003ef
PA
45542015-05-15 Pedro Alves <palves@redhat.com>
4555
4556 * target.h (target_handle_new_gdb_connection): Rewrite using if
4557 wrapped in do/while.
4558
1041a03c
JB
45592015-05-14 Joel Brobecker <brobecker@adacore.com>
4560
4561 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4562 * configure, config.in: Regenerate.
4563 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4564 Declare typedef.
4565
c269dbdb
DB
45662015-05-12 Don Breazeal <donb@codesourcery.com>
4567
4568 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4569 PTRACE_EVENT_VFORK_DONE.
4570 (linux_low_ptrace_options, extended_event_reported): Add vfork
4571 events.
4572 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4573 and "vforkdone" for RSP 'T' Stop Reply Packet.
4574 * server.h (report_vfork_events): Declare
4575 global variable.
4576
3a8a0396
DB
45772015-05-12 Don Breazeal <donb@codesourcery.com>
4578
4579 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4580 (the_low_target) <new_fork>: Initialize new member.
4581 * linux-arm-low.c (arm_new_fork): New function.
4582 (the_low_target) <new_fork>: Initialize new member.
4583 * linux-low.c (handle_extended_wait): Call new target function
4584 new_fork.
4585 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4586 * linux-mips-low.c (mips_add_watchpoint): New function
4587 extracted from mips_insert_point.
4588 (the_low_target) <new_fork>: Initialize new member.
4589 (mips_linux_new_fork): New function.
4590 (mips_insert_point): Call mips_add_watchpoint.
4591 * linux-x86-low.c (x86_linux_new_fork): New function.
4592 (the_low_target) <new_fork>: Initialize new member.
4593
de0d863e
DB
45942015-05-12 Don Breazeal <donb@codesourcery.com>
4595
4596 * linux-low.c (handle_extended_wait): Implement return value,
4597 rename argument 'event_child' to 'event_lwp', handle
4598 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4599 (linux_low_ptrace_options): New function.
4600 (linux_low_filter_event): Call linux_low_ptrace_options,
4601 use different argument fo linux_enable_event_reporting,
4602 use return value from handle_extended_wait.
4603 (extended_event_reported): New function.
4604 (linux_wait_1): Call extended_event_reported and set
4605 status to report fork events.
4606 (linux_write_memory): Add pid to debug message.
4607 (reset_lwp_ptrace_options_callback): New function.
4608 (linux_handle_new_gdb_connection): New function.
4609 (linux_target_ops): Initialize new structure member.
4610 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4611 * lynx-low.c: Initialize new structure member.
4612 * remote-utils.c (prepare_resume_reply): Implement stop reason
4613 "fork" for "T" stop message.
4614 * server.c (handle_query): Call handle_new_gdb_connection.
4615 * server.h (report_fork_events): Declare global flag.
4616 * target.h (struct target_ops) <handle_new_gdb_connection>:
4617 New member.
4618 (target_handle_new_gdb_connection): New macro.
4619 * win32-low.c: Initialize new structure member.
4620
ddcbc397
DB
46212015-05-12 Don Breazeal <donb@codesourcery.com>
4622
4623 * mem-break.c (APPEND_TO_LIST): Define macro.
4624 (clone_agent_expr): New function.
4625 (clone_one_breakpoint): New function.
4626 (clone_all_breakpoints): New function.
4627 * mem-break.h: Declare new functions.
4628
89245bc0
DB
46292015-05-12 Don Breazeal <donb@codesourcery.com>
4630
4631 * linux-low.c (linux_supports_fork_events): New function.
4632 (linux_supports_vfork_events): New function.
4633 (linux_target_ops): Initialize new structure members.
4634 (initialize_low): Call linux_check_ptrace_features.
4635 * lynx-low.c (lynx_target_ops): Initialize new structure
4636 members.
4637 * server.c (report_fork_events, report_vfork_events):
4638 New global flags.
4639 (handle_query): Add new features to qSupported packet and
4640 response.
4641 (captured_main): Initialize new global variables.
4642 * target.h (struct target_ops) <supports_fork_events>:
4643 New member.
4644 <supports_vfork_events>: New member.
4645 (target_supports_fork_events): New macro.
4646 (target_supports_vfork_events): New macro.
4647 * win32-low.c (win32_target_ops): Initialize new structure
4648 members.
4649
835205d0
GB
46502015-05-12 Gary Benson <gbenson@redhat.com>
4651
4652 * server.c (handle_qxfer_exec_file): Use current process
4653 if annex is empty.
4654
21e94bd9
SL
46552015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4656
4657 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4658 Remove HAVE_PTRACE_GETREGS conditionals.
4659 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4660 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4661
45614f15
YQ
46622015-05-08 Yao Qi <yao.qi@linaro.org>
4663
4664 * linux-low.c (linux_supports_conditional_breakpoints): New
4665 function.
4666 (linux_target_ops): Install new target method.
4667 * lynx-low.c (lynx_target_ops): Install NULL hook for
4668 supports_conditional_breakpoints.
4669 * nto-low.c (nto_target_ops): Likewise.
4670 * spu-low.c (spu_target_ops): Likewise.
4671 * win32-low.c (win32_target_ops): Likewise.
4672 * server.c (handle_query): Check
4673 target_supports_conditional_breakpoints.
4674 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4675 New field.
4676 (target_supports_conditional_breakpoints): New macro.
4677
80ad801e
PA
46782015-05-06 Pedro Alves <palves@redhat.com>
4679
4680 PR server/18081
4681 * server.c (start_inferior): If the process exits, mourn it.
4682
819843c7
GB
46832015-04-21 Gary Benson <gbenson@redhat.com>
4684
4685 * hostio.c (fileio_open_flags_to_host): Factored out to
4686 fileio_to_host_openflags in common/fileio.c. Single use
4687 updated.
4688
a2d5a9d7
MF
46892015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4690
4691 * linux-xtensa-low.c (xtensa_fill_gregset)
4692 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4693 XCHAL_HAVE_LOOP.
4694
deb44829
MF
46952015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4696
4697 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4698 (regs_info): Replace usrregs pointer with NULL.
4699
e57f1de3
GB
47002015-04-17 Gary Benson <gbenson@redhat.com>
4701
4702 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4703 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4704 * server.c (handle_qxfer_exec_file): New function.
4705 (qxfer_packets): Add exec-file entry.
4706 (handle_query): Report qXfer:exec-file:read as supported packet.
4707
62828379
RN
47082015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4709
4710 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4711
b88bb450
GB
47122015-04-09 Gary Benson <gbenson@redhat.com>
4713
4714 * hostio-errno.c (errno_to_fileio_error): Remove function.
4715 Update caller to use remote_fileio_to_fio_error.
4716
c8f4bfdd
YQ
47172015-04-09 Yao Qi <yao.qi@linaro.org>
4718
4719 * linux-low.c (linux_insert_point): Call
4720 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4721 (linux_remove_point): Call remove_memory_breakpoint if type is
4722 raw_bkpt_type_sw.
4723 * linux-x86-low.c (x86_insert_point): Don't call
4724 insert_memory_breakpoint.
4725 (x86_remove_point): Don't call remove_memory_breakpoint.
4726
41f98f02
PA
47272015-04-01 Pedro Alves <palves@redhat.com>
4728 Cleber Rosa <crosa@redhat.com>
4729
4730 * server.c (gdbserver_usage): Reorganize and extend the usage
4731 message.
4732
2bf6fb9d
PA
47332015-03-24 Pedro Alves <palves@redhat.com>
4734
4735 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4736 output. Also dump TRAP_TRACE.
4737 (linux_low_filter_event): In debug output, distinguish a
4738 resume_stop SIGSTOP from a delayed SIGSTOP.
4739
369f6daa
GB
47402015-03-24 Gary Benson <gbenson@redhat.com>
4741
4742 * linux-x86-low.c (x86_linux_new_thread): Moved to
4743 nat/x86-linux.c.
4744 (x86_linux_prepare_to_resume): Likewise.
4745
8e5d4070
GB
47462015-03-24 Gary Benson <gbenson@redhat.com>
4747
4748 * Makefile.in (x86-linux-dregs.o): New rule.
4749 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4750 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4751 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4752 (x86_linux_dr_get): Likewise.
4753 (x86_linux_dr_set): Likewise.
4754 (update_debug_registers_callback): Likewise.
4755 (x86_linux_dr_set_addr): Likewise.
4756 (x86_linux_dr_get_addr): Likewise.
4757 (x86_linux_dr_set_control): Likewise.
4758 (x86_linux_dr_get_control): Likewise.
4759 (x86_linux_dr_get_status): Likewise.
4760 (x86_linux_update_debug_registers): Likewise.
4761
2b95d440
GB
47622015-03-24 Gary Benson <gbenson@redhat.com>
4763
4764 * linux-x86-low.c (x86_linux_update_debug_registers):
4765 New function, factored out from...
4766 (x86_linux_prepare_to_resume): ...this.
4767
14b0bc68
GB
47682015-03-24 Gary Benson <gbenson@redhat.com>
4769
4770 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4771 (x86_linux_dr_set): Likewise.
4772 (update_debug_registers_callback): Likewise.
4773 (x86_linux_dr_set_addr): Likewise.
4774 (x86_linux_dr_get_addr): Likewise.
4775 (x86_linux_dr_set_control): Likewise.
4776 (x86_linux_dr_get_control): Likewise.
4777 (x86_linux_dr_get_status): Likewise.
4778 (x86_linux_prepare_to_resume): Likewise.
4779
5dfe6ca8
GB
47802015-03-24 Gary Benson <gbenson@redhat.com>
4781
4782 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4783 Use perror_with_name. Pass string through gettext.
4784 (x86_linux_dr_set): Likewise.
4785
d33472ad
GB
47862015-03-24 Gary Benson <gbenson@redhat.com>
4787
4788 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4789 (x86_linux_dr_set_addr): ...this.
4790 (x86_dr_low_get_addr): Rename to...
4791 (x86_linux_dr_get_addr): ...this.
4792 (x86_dr_low_set_control): Rename to...
4793 (x86_linux_dr_set_control): ...this.
4794 (x86_dr_low_get_control): Rename to...
4795 (x86_linux_dr_get_control): ...this.
4796 (x86_dr_low_get_status): Rename to...
4797 (x86_linux_dr_get_status): ...this.
4798 (x86_dr_low): Update with new function names.
4799
4b134ca1
GB
48002015-03-24 Gary Benson <gbenson@redhat.com>
4801
4802 * Makefile.in (x86-linux.o): New rule.
4803 * configure.srv: Add x86-linux.o to relevant targets.
4804 * linux-low.c (lwp_set_arch_private_info): New function.
4805 (lwp_arch_private_info): Likewise.
4806 * linux-x86-low.c: Include nat/x86-linux.h.
4807 (arch_lwp_info): Removed structure.
4808 (update_debug_registers_callback):
4809 Use lwp_set_debug_registers_changed.
4810 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4811 and lwp_set_debug_registers_changed.
4812 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4813
34c703da
GB
48142015-03-24 Gary Benson <gbenson@redhat.com>
4815
4816 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4817 * linux-arm-low.c (arm_new_thread): Likewise.
4818 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4819 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4820 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4821 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4822
cff068da
GB
48232015-03-24 Gary Benson <gbenson@redhat.com>
4824
4825 * linux-low.c (ptid_of_lwp): New function.
4826 (lwp_is_stopped): Likewise.
4827 (lwp_stop_reason): Likewise.
4828 * linux-x86-low.c (update_debug_registers_callback):
4829 Use lwp_is_stopped.
4830 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4831 lwp_stop_reason.
4832
b2f7c7e8
GB
48332015-03-24 Gary Benson <gbenson@redhat.com>
4834
4835 * linux-low.h (linux_stop_lwp): Remove declaration.
4836
6d4ee8c6
GB
48372015-03-24 Gary Benson <gbenson@redhat.com>
4838
4839 * linux-low.h: Include nat/linux-nat.h.
4840 * linux-low.c (iterate_over_lwps_args): New structure.
4841 (iterate_over_lwps_filter): New function.
4842 (iterate_over_lwps): Likewise.
4843 * linux-x86-low.c (update_debug_registers_callback):
4844 Update signature to what iterate_over_lwps expects.
4845 Remove PID check that iterate_over_lwps now performs.
4846 (x86_dr_low_set_addr): Use iterate_over_lwps.
4847 (x86_dr_low_set_control): Likewise.
4848
70a0bb6b
GB
48492015-03-24 Gary Benson <gbenson@redhat.com>
4850
4851 * linux-x86-low.c (x86_debug_reg_state): New function.
4852 (x86_linux_prepare_to_resume): Use the above.
4853
7b669087
GB
48542015-03-24 Gary Benson <gbenson@redhat.com>
4855
4856 * linux-low.c (current_lwp_ptid): New function.
4857 * linux-x86-low.c: Include nat/linux-nat.h.
4858 (x86_dr_low_get_addr): Use current_lwp_ptid.
4859 (x86_dr_low_get_control): Likewise.
4860 (x86_dr_low_get_status): Likewise.
4861
eef49a3d
PA
48622015-03-20 Pedro Alves <palves@redhat.com>
4863
4864 * tracepoint.c (cmd_qtstatus): Make "str" const.
4865
b2333d22
PA
48662015-03-20 Pedro Alves <palves@redhat.com>
4867
4868 * server.c (handle_general_set): Make "req_str" const.
4869
23f238d3
PA
48702015-03-19 Pedro Alves <palves@redhat.com>
4871
4872 * linux-low.c (linux_resume_one_lwp): Rename to ...
4873 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4874 instead call perror_with_name.
4875 (check_ptrace_stopped_lwp_gone): New function.
4876 (linux_resume_one_lwp): Reimplement as wrapper around
4877 linux_resume_one_lwp_throw that swallows errors if the LWP is
4878 gone.
4879
91baf43f
PA
48802015-03-19 Pedro Alves <palves@redhat.com>
4881
4882 * linux-low.c (count_events_callback, select_event_lwp_callback):
4883 No longer check whether the thread has resume_stop as last resume
4884 kind.
4885
8bf3b159
PA
48862015-03-19 Pedro Alves <palves@redhat.com>
4887
4888 * linux-low.c (count_events_callback, select_event_lwp_callback):
4889 Use the lwp's status_pending_p field, not the thread's.
4890
b90fc188
PA
48912015-03-19 Pedro Alves <palves@redhat.com>
4892
4893 * linux-low.c (select_event_lwp_callback): Update comments to
4894 no longer mention SIGTRAP.
4895
464b0089
GB
48962015-03-18 Gary Benson <gbenson@redhat.com>
4897
4898 * server.c (handle_query): Do not report vFile:fstat as supported.
4899
aa9e327f
GB
49002015-03-11 Gary Benson <gbenson@redhat.com>
4901
4902 * hostio.c (sys/types.h): New include.
4903 (sys/stat.h): Likewise.
4904 (common-remote-fileio.h): Likewise.
4905 (handle_fstat): New function.
4906 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4907
791c0056
GB
49082015-03-11 Gary Benson <gbenson@redhat.com>
4909
4910 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4911 struct stat.st_blocks and struct stat.st_blksize.
4912 * configure: Regenerate.
4913 * config.in: Likewise.
4914 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4915 (OBS): Add common-remote-fileio.o.
4916 (common-remote-fileio.o): New rule.
4917
9a9df970
PA
49182015-03-09 Pedro Alves <palves@redhat.com>
4919
4920 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4921 'struct sockaddr' pointer in 'accept' call.
4922
9eb1356e
PA
49232015-03-09 Pedro Alves <palves@redhat.com>
4924
4925 Revert:
4926 2015-03-07 Pedro Alves <palves@redhat.com>
4927 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4928 or <winsock2.h> here. Instead include "gdb_socket.h".
4929 (remote_open): Use union gdb_sockaddr_u.
4930 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4931 or <winsock2.h> here. Instead include "gdb_socket.h".
4932 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4933 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4934 or <sys/un.h>.
4935 (init_named_socket, gdb_agent_helper_thread): Use union
4936 gdb_sockaddr_u.
4937
aac331e4
PA
49382015-03-07 Pedro Alves <palves@redhat.com>
4939
4940 * configure.ac (build_warnings): Move
4941 -Wdeclaration-after-statement to the C-specific set.
4942 * configure: Regenerate.
4943
366c75fc
PA
49442015-03-07 Pedro Alves <palves@redhat.com>
4945
4946 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4947 or <winsock2.h> here. Instead include "gdb_socket.h".
4948 (remote_open): Use union gdb_sockaddr_u.
4949 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4950 or <winsock2.h> here. Instead include "gdb_socket.h".
4951 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4952 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4953 or <sys/un.h>.
4954 (init_named_socket, gdb_agent_helper_thread): Use union
4955 gdb_sockaddr_u.
4956
492d29ea
PA
49572015-03-07 Pedro Alves <palves@redhat.com>
4958
4959 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4960 instead.
4961
60a191ed
YQ
49622015-03-06 Yao Qi <yao.qi@linaro.org>
4963
4964 * linux-aarch64-low.c (aarch64_insert_point): Use
4965 show_debug_regs as a boolean.
4966 (aarch64_remove_point): Likewise.
4967
f5771b1d
PA
49682015-03-05 Pedro Alves <palves@redhat.com>
4969
4970 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4971 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4972 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4973 * nto-low.c (nto_target_ops): Likewise.
4974 * spu-low.c (spu_target_ops): Likewise.
4975 * win32-low.c (win32_target_ops): Likewise.
4976
3e572f71
PA
49772015-03-04 Pedro Alves <palves@redhat.com>
4978
72f4393d 4979 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4980 Decide whether a breakpoint triggered based on the SIGTRAP's
4981 siginfo.si_code.
72f4393d
L
4982 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4983 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4984 (linux_low_filter_event): Check for breakpoints before checking
4985 watchpoints.
4986 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4987 siginfo.si_code.
72f4393d
L
4988 (linux_stopped_by_sw_breakpoint)
4989 (linux_supports_stopped_by_sw_breakpoint)
4990 (linux_stopped_by_hw_breakpoint)
4991 (linux_supports_stopped_by_hw_breakpoint): New functions.
4992 (linux_target_ops): Install new target methods.
3e572f71 4993
1ec68e26
PA
49942015-03-04 Pedro Alves <palves@redhat.com>
4995
4996 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4997 * server.c (swbreak_feature, hwbreak_feature): New globals.
4998 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4999 (captured_main): Clear swbreak_feature and hwbreak_feature.
5000 * server.h (swbreak_feature, hwbreak_feature): Declare.
5001 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5002 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5003 supports_stopped_by_hw_breakpoint>: New fields.
5004 (target_supports_stopped_by_sw_breakpoint)
5005 (target_stopped_by_sw_breakpoint)
5006 (target_supports_stopped_by_hw_breakpoint)
5007 (target_stopped_by_hw_breakpoint): Declare.
5008
15c66dd6
PA
50092015-03-04 Pedro Alves <palves@redhat.com>
5010
5011 enum lwp_stop_reason -> enum target_stop_reason
5012 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5013 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5014 (linux_wait_1, stuck_in_jump_pad_callback)
5015 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5016 (linux_stopped_by_watchpoint):
5017 * linux-low.h (enum lwp_stop_reason): Delete.
5018 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5019 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5020
98fc70d6
YQ
50212015-03-04 Yao Qi <yao.qi@linaro.org>
5022
5023 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5024
dd2ac174
GB
50252015-03-03 Gary Benson <gbenson@redhat.com>
5026
5027 * hostio.c (handle_vFile): Fix prefix lengths.
5028
d68e53f4
MM
50292015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5030
5031 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5032 ptr_bits.
5033
bf2d68ab
AA
50342015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5035
5036 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5037 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5038 (clean): Add "rm -f" for above C files.
5039 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5040 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5041 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5042 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5043 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5044 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5045 (init_registers_s390x_vx_linux64)
5046 (init_registers_s390x_tevx_linux64)
5047 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5048 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5049 declarations.
5050 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5051 (s390_store_vxrs_high): New functions.
5052 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5053 NT_S390_VXRS_HIGH.
5054 (s390_arch_setup): Add logic for selecting one of the new target
5055 descriptions. Activate the new vector regsets if applicable.
5056 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5057 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5058 and init_registers_s390x_tevx_linux64.
5059
c966a859
PA
50602015-03-01 Pedro Alves <palves@redhat.com>
5061
5062 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5063 parameter.
5064
4180215b
PA
50652015-02-27 Pedro Alves <palves@redhat.com>
5066
5067 * linux-x86-low.c (u_debugreg_offset): New function.
5068 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5069
749bab01
PA
50702015-02-27 Pedro Alves <palves@redhat.com>
5071
5072 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5073 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5074 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5075 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5076 (ps_lsetfpregs, ps_getpid)
5077 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5078 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5079 (ps_lsetxregs, ps_plog): Declare.
5080
3c14e5a3
PA
50812015-02-27 Pedro Alves <palves@redhat.com>
5082
5083 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5084 IP_AGENT_EXPORT_FUNC.
5085 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5086 IP_AGENT_EXPORT_FUNC.
5087 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5088 (IP_AGENT_EXPORT): Delete.
5089 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5090 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5091 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5092 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5093 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5094 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5095 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5096 (traceframe_read_count, traceframe_write_count)
5097 (traceframes_created, trace_state_variables, get_raw_reg)
5098 (get_trace_state_variable_value, set_trace_state_variable_value)
5099 (ust_loaded, helper_thread_id, cmd_buf): Use
5100 IPA_SYM_EXPORTED_NAME.
5101 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5102 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5103 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5104 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5105 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5106 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5107 EXTERN_C_PUSH/EXTERN_C_POP.
5108 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5109 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5110 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5111 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5112 (traceframe_write_count, traceframe_read_count)
5113 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5114 (about_to_request_buffer_space, get_trace_state_variable_value)
5115 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5116 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5117 EXTERN_C_PUSH/EXTERN_C_POP.
5118 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5119 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5120 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5121 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5122 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5123 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5124 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5125 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5126 Define.
5127 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5128 (IP_AGENT_EXPORT_VAR_DECL): Define.
5129 (tracing): Declare.
5130 (gdb_agent_get_raw_reg): Declare.
5131
fe978cb0
PA
51322015-02-27 Tom Tromey <tromey@redhat.com>
5133 Pedro Alves <palves@redhat.com>
5134
5135 Rename symbols whose names are reserved C++ keywords throughout.
5136
3bc3d82a
PA
51372015-02-27 Pedro Alves <palves@redhat.com>
5138
5139 * Makefile.in (COMPILER): New, get it from autoconf.
5140 (CXX): Get from autoconf instead.
5141 (COMPILE.pre): Use COMPILER.
5142 (CC-LD): Rename to ...
5143 (CC_LD): ... this. Use COMPILER.
5144 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5145 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5146 * acinclude.m4: Include build-with-cxx.m4.
5147 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5148 Disable -Werror by default if building in C++ mode.
5149 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5150 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5151 the C++ compiler. Save/restore CXXFLAGS too.
5152 * configure: Regenerate.
5153
07697489
PA
51542015-02-27 Pedro Alves <palves@redhat.com>
5155
5156 * acinclude.m4: Include libiberty.m4.
5157 * configure.ac: Call libiberty_INIT.
5158 * config.in, configure: Regenerate.
5159
9beb7c4e
PA
51602015-02-26 Pedro Alves <palves@redhat.com>
5161
5162 * linux-low.c (linux_wait_1): When incrementing the PC past a
5163 program breakpoint always use the_low_target.breakpoint_len as
5164 increment, rather than the maximum between that and
5165 the_low_target.decr_pc_after_break.
5166
8090aef2
PA
51672015-02-23 Pedro Alves <palves@redhat.com>
5168
5169 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5170 thread was doing a step-over; always adjust the PC if
5171 we stepped over a permanent breakpoint.
5172 (linux_wait_1): If we stepped over breakpoint that was on top of a
5173 permanent breakpoint, manually advance the PC past it.
5174
bc9540e8
PA
51752015-02-23 Pedro Alves <palves@redhat.com>
5176
5177 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5178 modes.
5179 (x86_fill_gregset, x86_store_gregset): Use it when handling
5180 $orig_eax.
5181
2db9a427
PA
51822015-02-20 Pedro Alves <palves@redhat.com>
5183
5184 * thread-db.c: Include "nat/linux-procfs.h".
5185 (thread_db_init): Skip listing new threads if the kernel supports
5186 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5187
afa8d396
PA
51882015-02-20 Pedro Alves <palves@redhat.com>
5189
5190 * linux-low.c (status_pending_p_callback): Use ptid_match.
5191
c9587f88
AT
51922015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5193
5194 PR breakpoints/16812
5195 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5196 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5197 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5198
b05ec7a5
AT
51992015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5200
5201 PR breakpoints/15956
5202 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5203
d33501a5
MM
52042015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5205
5206 * linux-low.c (linux_low_btrace_conf): Print size.
5207 * server.c (handle_btrace_conf_general_set): New.
5208 (hanle_general_set): Call handle_btrace_conf_general_set.
5209 (handle_query): Report Qbtrace-conf:bts:size as supported.
5210
f4abbc16
MM
52112015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5212
5213 * linux-low.c (linux_low_enable_btrace): Update parameters.
5214 (linux_low_btrace_conf): New.
5215 (linux_target_ops)<to_btrace_conf>: Initialize.
5216 * server.c (current_btrace_conf): New.
5217 (handle_btrace_enable): Rename to ...
5218 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5219 to target_enable_btrace. Update comment. Update users.
5220 (handle_qxfer_btrace_conf): New.
5221 (qxfer_packets): Add btrace-conf entry.
5222 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5223 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5224 (target_ops)<read_btrace_conf>: New.
5225 (target_enable_btrace): Update parameters.
5226 (target_read_btrace_conf): New.
5227
043c3577
MM
52282015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5229
5230 * server.c (handle_btrace_general_set): Remove call to
5231 target_supports_btrace.
5232 (supported_btrace_packets): New.
5233 (handle_query): Call supported_btrace_packets.
5234 * target.h: include btrace-common.h.
5235 (btrace_target_info): Removed.
5236 (supports_btrace, target_supports_btrace): Update parameters.
5237
734b0e4b
MM
52382015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5239
5240 * Makefile.in (SFILES): Add common/btrace-common.c.
5241 (OBS): Add common/btrace-common.o.
5242 (btrace-common.o): Add build rules.
5243 * linux-low: Include btrace-common.h.
5244 (linux_low_read_btrace): Use struct btrace_data. Call
5245 btrace_data_init and btrace_data_fini.
5246
d6c146e9
PA
52472015-02-06 Pedro Alves <palves@redhat.com>
5248
5249 * thread-db.c (find_new_threads_callback): Add debug output.
5250
20ba1ce6
PA
52512015-02-04 Pedro Alves <palves@redhat.com>
5252
5253 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5254 (resume_stopped_resumed_lwps): New function.
5255 (linux_wait_for_event_filtered): Use it.
5256
8cc73a39
SDJ
52572015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5258
5259 * Makefile.in (SFILES): Add linux-personality.c.
5260 (linux-personality.o): New rule.
5261 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5262 list of objects to be built.
5263 * linux-low.c: Include nat/linux-personality.h.
5264 (linux_create_inferior): Remove code to disable address space
5265 randomization (moved to ../nat/linux-personality.c). Create
5266 cleanup to disable address space randomization.
5267
fb23d554
SDJ
52682015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5269
5270 * Makefile.in (posix-strerror.o): New rule.
5271 (mingw-strerror.o): Likewise.
5272 * configure: Regenerated.
5273 * configure.ac: Source file ../common/common.host. Initialize new
5274 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5275
cdf43629
YQ
52762015-01-14 Yao Qi <yao@codesourcery.com>
5277
5278 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5279 (ppc-linux.o): New rule.
5280 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5281 * configure.ac: AC_CHECK_FUNCS(getauxval).
5282 * config.in: Re-generated.
5283 * configure: Re-generated.
5284 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5285 ppc64_64bit_inferior_p
5286
514c5338
YQ
52872015-01-14 Yao Qi <yao@codesourcery.com>
5288
5289 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5290 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5291 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5292 (PT_ORIG_R3, PT_TRAP): Likewise.
5293 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5294 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5295 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5296
3368c1e5
JB
52972015-01-10 Joel Brobecker <brobecker@adacore.com>
5298
5299 * i387-fp.c (i387_cache_to_xsave): In look over
5300 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5301 zmmh_low_space field by use of zmmh_high_space.
5302
582511be
PA
53032015-01-09 Pedro Alves <palves@redhat.com>
5304
5305 * linux-low.c (step_over_bkpt): Move higher up in the file.
5306 (handle_extended_wait): Don't store the stop_pc here.
5307 (get_stop_pc): Adjust comments and rename to ...
5308 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5309 stopped for a software breakpoint or hardware breakpoint.
5310 (thread_still_has_status_pending_p): New function.
5311 (status_pending_p_callback): Use
5312 thread_still_has_status_pending_p. If the event is no longer
5313 interesting, resume the LWP.
5314 (handle_tracepoints): Add assert.
5315 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5316 (wstatus_maybe_breakpoint): New function.
5317 (cancel_breakpoint): Delete function.
5318 (check_stopped_by_watchpoint): New function, factored out from
5319 linux_low_filter_event.
5320 (lp_status_maybe_breakpoint): Delete function.
5321 (linux_low_filter_event): Remove filter_ptid argument.
5322 Leave thread group exits pending here. Store the LWP's stop PC.
5323 Always leave events pending.
5324 (linux_wait_for_event_filtered): Pull all events out of the
5325 kernel, and leave them all pending.
5326 (count_events_callback, select_event_lwp_callback): Consider all
5327 events.
5328 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5329 (select_event_lwp): Only give preference to the stepping LWP in
5330 all-stop mode. Adjust comments.
5331 (ignore_event): New function.
5332 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5333 references to cancel_breakpoints. Adjust to renames. Also give
5334 equal priority to all LWPs that have had events in non-stop mode.
5335 If reporting a software breakpoint event, unadjust the LWP's PC.
5336 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5337 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5338 Adjust.
5339 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5340 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5341 (linux_stopped_by_watchpoint): Adjust.
5342 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5343 * linux-low.h (enum lwp_stop_reason): New.
5344 (struct lwp_info) <stop_pc>: Adjust comment.
5345 <stopped_by_watchpoint>: Delete field.
5346 <stop_reason>: New field.
5347 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5348 * mem-break.c (software_breakpoint_inserted_here)
5349 (hardware_breakpoint_inserted_here): New function.
5350 * mem-break.h (software_breakpoint_inserted_here)
5351 (hardware_breakpoint_inserted_here): Declare.
5352 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5353 (cancel_breakpoints): Delete.
5354 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5355 (upload_fast_traceframes): Remove references to
5356 cancel_breakpoints.
5357
a33e3959
PA
53582015-01-09 Pedro Alves <palves@redhat.com>
5359
5360 * thread-db.c (find_new_threads_callback): Ignore thread if the
5361 kernel thread ID is -1.
5362
8784d563
PA
53632015-01-09 Pedro Alves <palves@redhat.com>
5364
5365 * linux-low.c (linux_attach_fail_reason_string): Move to
5366 nat/linux-ptrace.c, and rename.
5367 (linux_attach_lwp): Update comment.
5368 (attach_proc_task_lwp_callback): New function.
5369 (linux_attach): Adjust to rename and use
5370 linux_proc_attach_tgid_threads.
5371 (linux_attach_fail_reason_string): Delete declaration.
5372
76f2b779
JB
53732015-01-01 Joel Brobecker <brobecker@adacore.com>
5374
5375 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5376 * server.c (gdbserver_version): Likewise.
5377
fafcc06a
SDJ
53782014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5379
5380 * remote-utils.c: Include ctype.h.
5381 (input_interrupt): Explicitly handle the case when the char
5382 received is the NUL byte. Improve the printing of non-ASCII
5383 characters.
5384
beed38b8
JB
53852014-12-16 Joel Brobecker <brobecker@adacore.com>
5386
5387 * linux-low.c (linux_low_filter_event): Update call to
5388 linux_enable_event_reporting following the addition of
5389 a new parameter to that function.
5390
bf330350
CU
53912014-12-16 Catalin Udma <catalin.udma@freescale.com>
5392
5393 PR server/17457
5394 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5395 (AARCH64_FPCR_REGNO): Likewise.
5396 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5397 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5398 (aarch64_store_fpregset): Likewise.
5399
5227d625
JB
54002014-12-15 Joel Brobecker <brobecker@adacore.com>
5401
5402 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5403 Remove FIXME comment about assumption about N.
5404
f93b65a0
JB
54052014-12-13 Joel Brobecker <brobecker@adacore.com>
5406
5407 * configure.ac: If large-file support is disabled in GDBserver,
5408 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5409 * configure: Regenerate.
5410
e5a9158d
AA
54112014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5412
5413 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5414 warning upon ENODATA from ptrace.
5415 * linux-s390-low.c (s390_store_tdb): New.
5416 (s390_regsets): Add regset for NT_S390_TDB.
5417
feea5f36
AA
54182014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5419
5420 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5421 without a fill_function.
5422 * linux-s390-low.c (s390_fill_last_break): Remove.
5423 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5424 (s390_arch_setup): Use regset's size instead of fill_function for
5425 loop end condition.
5426
098dbe61
AA
54272014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5428
5429 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5430 the regset's store function when ptrace returned an error.
5431 * regcache.c (get_thread_regcache): Invalidate register cache
5432 before fetching inferior's registers.
5433
28eef672
AA
54342014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5435
5436 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5437 while-loop as for-loop.
5438 (regsets_store_inferior_registers): Likewise.
5439
bdca27a2
YQ
54402014-11-28 Yao Qi <yao@codesourcery.com>
5441
5442 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5443 * config.in, configure: Re-generate.
5444 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5445 is defined.
5446
9c232dda
YQ
54472014-11-21 Yao Qi <yao@codesourcery.com>
5448
5449 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5450 (AC_CHECK_HEADERS): Remove malloc.h.
5451 * configure: Re-generated.
5452 * config.in: Re-generated.
5453 * server.h: Don't include alloca.h and malloc.h.
5454 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5455 Don't include malloc.h.
5456
43968415
JB
54572014-11-17 Joel Brobecker <brobecker@adacore.com>
5458
5459 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5460 corresponding ERRNO check in same block.
5461
40e91bc7
PA
54622014-11-12 Pedro Alves <palves@redhat.com>
5463
5464 * server.c (cont_thread): Update comment.
5465 (start_inferior, attach_inferior): No longer clear cont_thread.
5466 (handle_v_cont): No longer set cont_thread.
5467 (captured_main): Clear cont_thread each time a GDB connects.
5468
c2c118cf
PA
54692014-11-12 Pedro Alves <palves@redhat.com>
5470
5471 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5472 thread, and don't resume all threads if the Hc thread has exited.
5473
78708b7c
PA
54742014-11-12 Pedro Alves <palves@redhat.com>
5475
5476 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5477 the process group instead of to a specific LWP.
5478
a2abc7de
PA
54792014-10-15 Pedro Alves <palves@redhat.com>
5480
5481 PR server/17487
5482 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5483 parameter.
5484 (arm_set_thread_context): Delete.
5485 (the_low_target): Adjust.
5486 * win32-i386-low.c (debug_registers_changed)
5487 (debug_registers_used): Delete.
5488 (update_debug_registers_callback): New function.
5489 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5490 needing to update their debug registers.
5491 (win32_get_current_dr): New function.
5492 (x86_dr_low_get_addr, x86_dr_low_get_control)
5493 (x86_dr_low_get_status): Fetch the debug register from the thread
5494 record's context.
5495 (i386_initial_stuff): Adjust.
5496 (i386_get_thread_context): Remove current_event parameter. Don't
5497 clear debug_registers_changed nor copy DR values to
5498 debug_reg_state.
5499 (i386_set_thread_context): Delete.
5500 (i386_prepare_to_resume): New function.
5501 (i386_thread_added): Mark the thread as needing to update irs
5502 debug registers.
5503 (the_low_target): Remove i386_set_thread_context and install
5504 i386_prepare_to_resume.
5505 * win32-low.c (win32_get_thread_context): Adjust.
5506 (win32_set_thread_context): Use SetThreadContext
5507 directly.
5508 (win32_prepare_to_resume): New function.
5509 (win32_require_context): New function, factored out from ...
5510 (thread_rec): ... this.
5511 (continue_one_thread): Call win32_prepare_to_resume on each thread
5512 we're about to continue.
5513 (win32_resume): Call win32_prepare_to_resume on the event thread.
5514 * win32-low.h (struct win32_thread_info)
5515 <debug_registers_changed>: New field.
5516 (struct win32_target_ops): Change prototype of set_thread_context,
5517 delete set_thread_context and add prepare_to_resume.
5518 (win32_require_context): New declaration.
5519
a442d071
GB
55202014-10-08 Gary Benson <gbenson@redhat.com>
5521
5522 * server.h: Do not include common-exceptions.h.
5523
6f1947e8
GB
55242014-10-08 Gary Benson <gbenson@redhat.com>
5525
5526 * server.h: Do not include cleanups.h.
5527
63b434a4
JH
55282014-09-30 James Hogan <james.hogan@imgtec.com>
5529
5530 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5531 mips64-dsp-linux.c.
5532
c4d9ceb6
YQ
55332014-09-23 Yao Qi <yao@codesourcery.com>
5534
5535 * linux-low.c (lp_status_maybe_breakpoint): New function.
5536 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5537 (count_events_callback): Likewise.
5538 (select_event_lwp_callback): Likewise.
5539 (cancel_breakpoints_callback): Likewise.
5540
89a5711c
DB
55412014-09-19 Don Breazeal <donb@codesourcery.com>
5542
5543 * linux-low.c (handle_extended_wait): Call
5544 linux_ptrace_get_extended_event.
5545 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5546 linux_is_extended_waitstatus.
5547
bffc0964
JB
55482014-09-16 Joel Brobecker <brobecker@adacore.com>
5549
5550 * Makefile.in (CPPFLAGS): Define.
5551 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5552 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5553
0bfdf32f
GB
55542014-09-16 Gary Benson <gbenson@redhat.com>
5555
5556 * inferiors.h (current_inferior): Renamed as...
5557 (current_thread): New variable. All uses updated.
5558 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5559 (maybe_move_out_of_jump_pad): Likewise.
5560 (cancel_breakpoint): Likewise.
5561 (linux_low_filter_event): Likewise.
5562 (wait_for_sigstop): Likewise.
5563 (linux_resume_one_lwp): Likewise.
5564 (need_step_over_p): Likewise.
5565 (start_step_over): Likewise.
5566 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5567 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5568 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5569 and save_inferior as saved_thread.
5570 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5571 saved_thread.
5572 (regcache_invalidate_thread): Likewise.
5573 * remote-utils.c (prepare_resume_reply): Likewise.
5574 * thread-db.c (thread_db_get_tls_address): Likewise.
5575 (disable_thread_event_reporting): Likewise.
5576 (remove_thread_event_breakpoints): Likewise.
5577 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5578 as saved_thread.
5579 * target.h (set_desired_inferior): Renamed as...
5580 (set_desired_thread): New declaration. All uses updated.
5581 * server.c (myresume): Updated comment to reference thread instead
5582 of inferior.
5583 (handle_serial_event): Likewise.
5584 (handle_target_event): Likewise.
5585
361c8ade
GB
55862014-09-12 Tom Tromey <tromey@redhat.com>
5587 Gary Benson <gbenson@redhat.com>
5588
5589 * regcache.h: Include common-regcache.h.
5590 (regcache_read_pc): Don't declare.
5591 * regcache.c (get_thread_regcache_for_ptid): New function.
5592
bd9269f7
GB
55932014-09-11 Tom Tromey <tromey@redhat.com>
5594 Gary Benson <gbenson@redhat.com>
5595
5596 * symbol.c: New file.
5597 * Makefile.in (SFILES): Add symbol.c.
5598 (OBS): Add symbol.o.
5599
f8c1d06b
GB
56002014-09-11 Gary Benson <gbenson@redhat.com>
5601
5602 * target.c (target_stop_ptid, target_continue_ptid): New
5603 functions.
5604
721ec300
GB
56052014-09-11 Tom Tromey <tromey@redhat.com>
5606 Gary Benson <gbenson@redhat.com>
5607
5608 * target.h: Include target/target.h.
5609 * target.c (target_read_memory, target_read_uint32)
5610 (target_write_memory): New functions.
5611
c5e92cca
GB
56122014-09-11 Gary Benson <gbenson@redhat.com>
5613
5614 * server.h (debug_hw_points): Don't declare.
5615 * server.c (debug_hw_points): Don't define. Replace all uses
5616 with show_debug_regs.
5617 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5618 all uses with show_debug_regs.
5619
2e4bb98a
EBM
56202014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5621
5622 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5623 endianness into account.
5624 (ppc_supply_ptrace_register): Likewise.
5625
ac740bc7
JH
56262014-09-03 James Hogan <james.hogan@imgtec.com>
5627
5628 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5629 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5630
97ea6506
GB
56312014-09-03 Gary Benson <gbenson@redhat.com>
5632
5633 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5634 ALL_DEBUG_ADDRESS_REGISTERS.
5635
df7e5265
GB
56362014-09-02 Gary Benson <gbenson@redhat.com>
5637
5638 * i386-low.h: Renamed as...
5639 * x86-low.h: New file. All type, function and variable name
5640 prefixes changed from "i386_" to "x86_". All references updated.
5641 * i386-low.c: Renamed as...
5642 * x86-low.c: New file. All type, function and variable name
5643 prefixes changed from "i386_" to "x86_". All references updated.
5644
ed859da7
GB
56452014-09-02 Gary Benson <gbenson@redhat.com>
5646
5647 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5648 (x86_linux_new_thread): Likewise.
5649
860789c7
GB
56502014-08-29 Gary Benson <gbenson@redhat.com>
5651
5652 * server.h (setjmp.h): Do not include.
5653 (toplevel): Do not declare.
5654 (common-exceptions.h): Include.
5655 (cleanups.h): Likewise.
5656 * server.c (toplevel): Do not define.
5657 (exit_code): New static global.
5658 (detach_or_kill_for_exit_cleanup): New function.
5659 (main): New function. Original main renamed to...
5660 (captured_main): New function.
5661 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5662
ff55e1b5
GB
56632014-08-29 Gary Benson <gbenson@redhat.com>
5664
5665 * Makefile.in (SFILES): Add common/common-exceptions.c.
5666 (OBS): Add common-exceptions.o.
5667 (common-exceptions.o): New rule.
5668 * utils.c (prepare_to_throw_exception): New function.
5669
e9bcb658
GB
56702014-08-29 Gary Benson <gbenson@redhat.com>
5671
5672 * config.in: Regenerate.
5673 * configure: Likewise.
5674
e3180625
GB
56752014-08-29 Gary Benson <gbenson@redhat.com>
5676
5677 * Makefile.in (SFILES): Add common/cleanups.c.
5678 (OBS): cleanups.o.
5679 (cleanups.o): New rule.
5680
e3d6ba5d
GB
56812014-08-29 Gary Benson <gbenson@redhat.com>
5682
5683 * utils.c (internal_vwarning): New function.
5684
7096e886
GB
56852014-08-28 Gary Benson <gbenson@redhat.com>
5686
5687 * utils.h (fatal): Remove declaration.
5688 * utils.c (fatal): Remove function.
5689
14ce3192
GB
56902014-08-28 Gary Benson <gbenson@redhat.com>
5691
5692 * tracepoint.c (gdb_agent_init): Replace fatal with
5693 perror_with_name.
5694 (initialize_tracepoint): Likewise.
5695
50278d59
GB
56962014-08-28 Gary Benson <gbenson@redhat.com>
5697
5698 * remote-utils.c (remote_prepare): Replace fatal with error.
5699
aa96c426
GB
57002014-08-28 Gary Benson <gbenson@redhat.com>
5701
5702 * linux-low.c (linux_async): Replace fatal with warning.
5703 Tidy up and return.
5704 (linux_start_non_stop): Return -1 if linux_async failed.
5705
f7160e97
GB
57062014-08-28 Gary Benson <gbenson@redhat.com>
5707
5708 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5709 gdb_assert.
5710 (i386_dr_low_get_addr): Remove vague comment.
5711 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5712 gdb_assert.
5713
38e08fca
GB
57142014-08-28 Gary Benson <gbenson@redhat.com>
5715
5716 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5717 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5718 internal_error.
5719 (linux_resume_one_lwp): Likewise.
5720 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5721 gdb_assert.
5722 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5723 with internal_error.
5724 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5725 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5726 (find_register_by_name): Replace fatal with internal_error.
5727 (find_regno): Likewise.
5728 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5729 * thread-db.c (thread_db_create_event): Likewise.
5730 (thread_db_load_search): Likewise.
5731 (try_thread_db_load_1): Likewise.
5732 * tracepoint.c (get_jump_space_head): Replace fatal with
5733 internal_error.
5734 (claim_trampoline_space): Likewise.
5735 (have_fast_tracepoint_trampoline_buffer): Likewise.
5736 (cmd_qtstart): Likewise.
5737 (stop_tracing): Likewise.
5738 (fast_tracepoint_collecting): Likewise.
5739 (target_malloc): Likewise.
5740 (download_tracepoint): Likewise.
5741 (download_trace_state_variables): Replace check with gdb_assert.
5742 (upload_fast_traceframes): Replace fatal with internal_error.
5743
34abf635
GB
57442014-08-19 Tom Tromey <tromey@redhat.com>
5745 Gary Benson <gbenson@redhat.com>
5746
5747 * Makefile.in (SFILES): Add common/common-debug.c.
5748 (OBS): Add common-debug.o.
5749 (common-debug.o): New rule.
5750 * debug.h (debug_printf): Don't declare.
5751 * debug.c (debug_printf): Renamed and rewritten as...
5752 (debug_vprintf): New function.
5753
f6e94d78
GB
57542014-08-19 Gary Benson <gbenson@redhat.com>
5755
5756 * utils.h: Do not include print-utils.h.
5757
9239eeab
GB
57582014-08-19 Tom Tromey <tromey@redhat.com>
5759 Gary Benson <gbenson@redhat.com>
5760
5761 * server.h: Add static assertion.
5762 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5763
ef87c8bb
GB
57642014-08-19 Tom Tromey <tromey@redhat.com>
5765 Gary Benson <gbenson@redhat.com>
5766
5767 * Makefile.in (SFILES): Add common/errors.c.
5768 (OBS): Add errors.o.
5769 (IPA_OBS): Add errors-ipa.o.
5770 (errors.o): New rule.
5771 (errors-ipa.o): Likewise.
5772 * utils.h (perror_with_name, error, warning): Don't declare.
5773 * utils.c (warning): Renamed and rewritten as...
5774 (vwarning): New function.
5775 (error): Renamed and rewritten as...
5776 (verror): New function.
5777 (internal_error): Renamed and rewritten as...
5778 (internal_verror): New function.
5779
bb974a24
GB
57802014-08-07 Gary Benson <gbenson@redhat.com>
5781
5782 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5783 * configure: Regenerate.
5784 * config.in: Likewise.
5785 * server.h: Do not include errno.h.
5786 * event-loop.c: Likewise.
5787 * hostio-errno.c: Likewise.
5788 * linux-low.c: Likewise.
5789 * remote-utils.c: Likewise.
5790 * spu-low.c: Likewise.
5791 * utils.c: Likewise.
5792 * gdbreplay.c: Unconditionally include errno.h.
5793
6d3d12eb
GB
57942014-08-07 Gary Benson <gbenson@redhat.com>
5795
5796 * server.h: Do not include string.h.
5797 * event-loop.c: Likewise.
5798 * linux-low.c: Likewise.
5799 * regcache.c: Likewise.
5800 * remote-utils.c: Likewise.
5801 * spu-low.c: Likewise.
5802 * utils.c: Likewise.
5803
dccbb609
GB
58042014-08-07 Gary Benson <gbenson@redhat.com>
5805
5806 * server.h: Do not include gdb_assert.h.
5807
e76df0d0
GB
58082014-08-07 Gary Benson <gbenson@redhat.com>
5809
5810 * server.h: Do not include common-utils.h.
5811
4cb9c816
GB
58122014-08-07 Gary Benson <gbenson@redhat.com>
5813
5814 * server.h: Do not include ptid.h.
5815 * notif.h: Likewise.
5816
3995eeee
GB
58172014-08-07 Gary Benson <gbenson@redhat.com>
5818
5819 * server.h: Do not include gdb_locale.h.
5820
cb9f1a9b
GB
58212014-08-07 Gary Benson <gbenson@redhat.com>
5822
5823 * server.h: Do not include gdb/signals.h.
5824 * win32-low.c: Likewise.
5825
a5fceff8
GB
58262014-08-07 Gary Benson <gbenson@redhat.com>
5827
5828 * server.h: Do not include pathmax.h.
5829
b9391142
GB
58302014-08-07 Gary Benson <gbenson@redhat.com>
5831
5832 * server.h: Do not include libiberty.h.
5833 * linux-bfin-low.c: Likewise.
5834
0e443c87
GB
58352014-08-07 Gary Benson <gbenson@redhat.com>
5836
5837 * server.h: Do not include ansidecl.h.
5838
8ebb3f56
GB
58392014-08-07 Gary Benson <gbenson@redhat.com>
5840
5841 * linux-x86-low.c: Do not include stddef.h.
5842 * lynx-ppc-low.c: Likewise.
5843 * tracepoint.c: Likewise.
5844
8980bdf6
GB
58452014-08-07 Gary Benson <gbenson@redhat.com>
5846
5847 * server.h: Do not include stdarg.h.
5848 * nto-low.c: Likewise.
5849
d7096f71
GB
58502014-08-07 Gary Benson <gbenson@redhat.com>
5851
5852 * server.h: Do not include stdlib.h.
5853 * inferiors.c: Likewise.
5854 * linux-low.c: Likewise.
5855 * regcache.c: Likewise.
5856 * spu-low.c: Likewise.
5857 * tracepoint.c: Likewise.
5858 * utils.c: Likewise.
5859
d02f550d
GB
58602014-08-07 Gary Benson <gbenson@redhat.com>
5861
5862 * server.h: Do not include stdio.h.
5863 * linux-low.c: Likewise.
5864 * remote-utils.c: Likewise.
5865 * spu-low.c: Likewise.
5866 * utils.c: Likewise.
5867 * wincecompat.c: Likewise.
5868
87f6c4e3
GB
58692014-08-06 Gary Benson <gbenson@redhat.com>
5870
5871 * regcache.c (init_register_cache): Move conditionals inside if.
5872
7089dca4
GB
58732014-08-06 Gary Benson <gbenson@redhat.com>
5874
5875 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5876
462f517e
GB
58772014-07-31 Gary Benson <gbenson@redhat.com>
5878
5879 * ax.h: Do not include server.h.
5880 * gdbthread.h: Likewise.
5881 * lynx-low.h: Likewise.
5882 * notif.h: Likewise.
5883
976411d6
GB
58842014-07-30 Gary Benson <gbenson@redhat.com>
5885
5886 * server.h: Include common-defs.h.
5887 Do not include config.h or build-gnulib-gdbserver/config.h.
5888
d41f6d8e
GB
58892014-07-30 Gary Benson <gbenson@redhat.com>
5890
5891 * hostio-errno.c: Move server.h to top of includes list.
5892 * inferiors.c: Likewise.
5893 * linux-x86-low.c: Likewise.
5894 * notif.c: Include server.h.
5895
314c6a35
TT
58962014-07-24 Tom Tromey <tromey@redhat.com>
5897 Gary Benson <gbenson@redhat.com>
5898
5899 * server.h (CORE_ADDR): Now unsigned.
5900
69ff6be5
PA
59012014-07-16 Pedro Alves <palves@redhat.com>
5902
5903 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5904
ce9e3fe7
PA
59052014-07-15 Pedro Alves <palves@redhat.com>
5906
5907 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5908 copy.
5909
e76126e8
PA
59102014-07-11 Pedro Alves <palves@redhat.com>
5911
5912 * linux-low.c (kill_wait_lwp): New function, based on
5913 kill_one_lwp_callback, but use my_waitpid directly.
5914 (kill_one_lwp_callback, linux_kill): Use it.
5915
8e9db26e
PA
59162014-06-23 Pedro Alves <palves@redhat.com>
5917
5918 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5919 before setting DR0..DR3.
5920
698b3e08
GB
59212014-06-20 Gary Benson <gbenson@redhat.com>
5922
5923 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5924 * configure: Regenerated.
5925 * config.in: Likewise.
5926
125f8a3d
GB
59272014-06-20 Gary Benson <gbenson@redhat.com>
5928
5929 * Makefile.in (SFILES): Update locations for files moved
5930 from common to nat.
5931 (object file files): Reordered.
5932
42995dbd
GB
59332014-06-20 Gary Benson <gbenson@redhat.com>
5934
5935 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5936 (i386_dr_low_set_addr): Likewise.
5937 (i386_dr_low_get_addr): Likewise.
5938 (i386_dr_low_can_set_control): Likewise.
5939 (i386_dr_low_set_control): Likewise.
5940 (i386_dr_low_get_control): Likewise.
5941 (i386_dr_low_get_status): Likewise.
5942 (i386_get_debug_register_length): Likewise.
5943 * linux-x86-low.c (i386_dr_low_set_addr):
5944 Changed signature. Made static.
5945 (i386_dr_low_get_addr): Likewise.
5946 (i386_dr_low_set_control): Likewise.
5947 (i386_dr_low_get_control): Likewise.
5948 (i386_dr_low_get_status): Likewise.
5949 (i386_dr_low): New global variable.
5950 * win32-i386-low.c (i386_dr_low_set_addr):
5951 Changed signature. Made static.
5952 (i386_dr_low_get_addr): Likewise.
5953 (i386_dr_low_set_control): Likewise.
5954 (i386_dr_low_get_control): Likewise.
5955 (i386_dr_low_get_status): Likewise.
5956 (i386_dr_low): New global variable.
5957
e1d2394b
MS
59582014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5959
5960 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5961 * Makefile.in (AR, AR_FLAGS): Define.
5962 * configure: Regenerate.
5963
3a8ee006
GB
59642014-06-19 Gary Benson <gbenson@redhat.com>
5965
5966 * Makefile.in (i386-dregs.o): New rule.
5967 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5968 * i386-low.c (target.h): Remove include.
5969 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5970 (DR_CONTROL_SHIFT): Likewise.
5971 (DR_CONTROL_SIZE): Likewise.
5972 (DR_RW_EXECUTE): Likewise.
5973 (DR_RW_WRITE): Likewise.
5974 (DR_RW_READ): Likewise.
5975 (DR_RW_IORW): Likewise.
5976 (DR_LEN_1): Likewise.
5977 (DR_LEN_2): Likewise.
5978 (DR_LEN_4): Likewise.
5979 (DR_LEN_8): Likewise.
5980 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5981 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5982 (DR_ENABLE_SIZE): Likewise.
5983 (DR_LOCAL_SLOWDOWN): Likewise.
5984 (DR_GLOBAL_SLOWDOWN): Likewise.
5985 (DR_CONTROL_RESERVED): Likewise.
5986 (I386_DR_CONTROL_MASK): Likewise.
5987 (I386_DR_VACANT): Likewise.
5988 (I386_DR_LOCAL_ENABLE): Likewise.
5989 (I386_DR_GLOBAL_ENABLE): Likewise.
5990 (I386_DR_DISABLE): Likewise.
5991 (I386_DR_SET_RW_LEN): Likewise.
5992 (I386_DR_GET_RW_LEN): Likewise.
5993 (I386_DR_WATCH_HIT): Likewise.
5994 (i386_wp_op_t): Likewise.
5995 (i386_show_dr): Likewise.
5996 (i386_length_and_rw_bits): Likewise.
5997 (i386_insert_aligned_watchpoint): Likewise.
5998 (i386_remove_aligned_watchpoint): Likewise.
5999 (i386_handle_nonaligned_watchpoint): Likewise.
6000 i386_update_inferior_debug_regs(): Likewise.
6001 (i386_dr_insert_watchpoint): Likewise.
6002 (i386_dr_remove_watchpoint): Likewise.
6003 (i386_dr_region_ok_for_watchpoint): Likewise.
6004 (i386_dr_stopped_data_address): Likewise.
6005 (i386_dr_stopped_by_watchpoint): Likewise.
6006
8f26655c
GB
60072014-06-19 Gary Benson <gbenson@redhat.com>
6008
6009 * i386-low.c (i386_dr_show): Renamed to
6010 i386_show_dr and made static. All uses updated.
6011 (i386_dr_length_and_rw_bits): Renamed to
6012 i386_length_and_rw_bits and made static.
6013 All uses updated.
6014 (i386_dr_insert_aligned_watchpoint): Renamed to
6015 i386_insert_aligned_watchpoint and made static.
6016 All uses updated.
6017 (i386_dr_remove_aligned_watchpoint): Renamed to
6018 i386_remove_aligned_watchpoint and made static.
6019 All uses updated.
6020 (i386_dr_update_inferior_debug_regs): Renamed to
6021 i386_update_inferior_debug_regs and made static.
6022 All uses updated.
6023
b9228891
GB
60242014-06-18 Gary Benson <gbenson@redhat.com>
6025
5171def3
GB
6026 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6027 (i386_dr_low_can_set_control): Likewise.
6028 (i386_get_debug_register_length): Likewise.
6029 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6030 (i386_dr_low_can_set_control): Likewise.
6031 (i386_get_debug_register_length): Likewise.
6032
60332014-06-17 Gary Benson <gbenson@redhat.com>
6034
b9228891
GB
6035 * i386-low.h (i386-dregs.h): New include.
6036 (DR_FIRSTADDR): Now in i386-dregs.h.
6037 (DR_LASTADDR): Likewise.
6038 (DR_NADDR): Likewise.
6039 (DR_STATUS): Likewise.
6040 (DR_CONTROL): Likewise.
6041 (i386_debug_reg_state): Likewise.
6042 (i386_dr_insert_watchpoint): Likewise.
6043 (i386_dr_remove_watchpoint): Likewise.
6044 (i386_dr_region_ok_for_watchpoint): Likewise.
6045 (i386_dr_stopped_data_address): Likewise.
6046 (i386_dr_stopped_by_watchpoint): Likewise.
6047 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6048
4be83cc2
GB
60492014-06-18 Gary Benson <gbenson@redhat.com>
6050
6051 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6052 i386_dr_insert_watchpoint.
6053 (i386_low_remove_watchpoint): Renamed to
6054 i386_dr_remove_watchpoint.
6055 (i386_low_region_ok_for_watchpoint): Renamed to
6056 i386_dr_region_ok_for_watchpoint.
6057 (i386_low_stopped_data_address): Renamed to
6058 i386_dr_stopped_data_address.
6059 (i386_low_stopped_by_watchpoint): Renamed to
6060 i386_dr_stopped_by_watchpoint.
6061 * i386-low.c (i386_show_dr): Renamed to
6062 i386_dr_show and made nonstatic. All uses updated.
6063 (i386_length_and_rw_bits): Renamed to
6064 i386_dr_length_and_rw_bits and made nonstatic.
6065 All uses updated.
6066 (i386_insert_aligned_watchpoint): Renamed to
6067 i386_dr_insert_aligned_watchpoint and made nonstatic.
6068 All uses updated.
6069 (i386_remove_aligned_watchpoint): Renamed to
6070 i386_dr_remove_aligned_watchpoint and made nonstatic.
6071 All uses updated.
6072 (i386_update_inferior_debug_regs): Renamed to
6073 i386_dr_update_inferior_debug_regs and made nonstatic.
6074 All uses updated.
6075 (i386_low_insert_watchpoint): Renamed to
6076 i386_dr_insert_watchpoint. All uses updated.
6077 (i386_low_remove_watchpoint): Renamed to
6078 i386_dr_remove_watchpoint. All uses updated.
6079 (i386_low_region_ok_for_watchpoint): Renamed to
6080 i386_dr_region_ok_for_watchpoint. All uses updated.
6081 (i386_low_stopped_data_address): Renamed to
6082 i386_dr_stopped_data_address. All uses updated.
6083 (i386_low_stopped_by_watchpoint): Renamed to
6084 i386_dr_stopped_by_watchpoint. All uses updated.
6085
131aa0d4
GB
60862014-06-18 Gary Benson <gbenson@redhat.com>
6087
6088 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6089 (i386_dr_low_can_set_control): Likewise.
6090 (i386_insert_aligned_watchpoint): New check.
6091
d9305f7f
GB
60922014-06-18 Gary Benson <gbenson@redhat.com>
6093
6094 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6095 Renamed to state.
6096
e927c9fc
GB
60972014-06-18 Gary Benson <gbenson@redhat.com>
6098
6099 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6100 instead of fatal and error.
6101 (i386_handle_nonaligned_watchpoint): Likewise.
6102
1b6d4134
GB
61032014-06-18 Gary Benson <gbenson@redhat.com>
6104
6105 * i386-low.c (i386_get_debug_register_length): New macro.
6106 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6107 (i386_show_dr): Use debug_printf instead of fprintf. Use
6108 phex to format values.
6109
6e62758f
GB
61102014-06-18 Gary Benson <gbenson@redhat.com>
6111
6112 * i386-low.h: Comment changes.
6113 * i386-low.c: Likewise.
6114
fc6e2f03
GB
61152014-06-18 Gary Benson <gbenson@redhat.com>
6116
6117 * i386-low.c: Whitespace changes.
6118
f9d1eeed
TT
61192014-06-12 Tom Tromey <tromey@redhat.com>
6120
6121 * utils.c (freeargv): Remove.
6122
0b04e523
TT
61232014-06-12 Tom Tromey <tromey@redhat.com>
6124
6125 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6126 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6127 (parse_debug_format_options): Likewise.
6128 (gdbserver_usage): Likewise.
6129 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6130 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6131 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6132 against libiberty.
6133 ($(LIBGNU)): Depend on libiberty.
6134 (all-lib): Recurse into all subdirs.
6135 (install-only): Invoke "install" target in subdirs.
6136 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6137 targets.
6138 * configure: Rebuild.
6139 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6140 for vasprintf, vsnprintf, or gettimeofday.
6141 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6142 srv_tgtobj.
6143
270c9937
JB
61442014-06-05 Joel Brobecker <brobecker@adacore.com>
6145
6146 * development.sh: Delete.
6147 * Makefile.in (config.status): Adjust dependency on development.sh.
6148 * configure.ac: Adjust development.sh source call.
6149 * configure: Regenerate.
6150
0a261ed8
PA
61512014-06-02 Pedro Alves <palves@redhat.com>
6152
6153 * ax.c (gdb_free_agent_expr): New function.
6154 * ax.h (gdb_free_agent_expr): New declaration.
6155 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6156 list.
6157 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6158 static.
6159 (clear_breakpoint_conditions_and_commands): New function.
6160 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6161 (clear_breakpoint_conditions_and_commands): New declaration.
6162
e9dae05e
RR
61632014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6164
6165 * linux-aarch64-low.c (asm/ptrace.h): Include.
6166
5876f503
JK
61672014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6168
6169 Fix TLS access for -static -pthread.
6170 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6171 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6172 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6173
802e8e6d
PA
61742014-05-20 Pedro Alves <palves@redhat.com>
6175
6176 * linux-aarch64-low.c (aarch64_insert_point)
6177 (aarch64_remove_point): No longer check whether the type is
6178 supported here. Adjust to new interface.
6179 (the_low_target): Install aarch64_supports_z_point_type as
6180 supports_z_point_type method.
6181 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6182 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6183 instead of a Z packet char. Adjust.
6184 (arm_supports_z_point_type): New function.
6185 (arm_insert_point, arm_remove_point): Adjust to new interface.
6186 (the_low_target): Install arm_supports_z_point_type.
6187 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6188 (cris_insert_point, cris_remove_point): Adjust to new interface.
6189 Don't check whether the type is supported here.
6190 (the_low_target): Install cris_supports_z_point_type.
6191 * linux-low.c (linux_supports_z_point_type): New function.
6192 (linux_insert_point, linux_remove_point): Adjust to new interface.
6193 * linux-low.h (struct linux_target_ops) <insert_point,
6194 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6195 raw_breakpoint pointer parameter.
6196 <supports_z_point_type>: New method.
6197 * linux-mips-low.c (mips_supports_z_point_type): New function.
6198 (mips_insert_point, mips_remove_point): Adjust to new interface.
6199 Use mips_supports_z_point_type.
6200 (the_low_target): Install mips_supports_z_point_type.
6201 * linux-ppc-low.c (the_low_target): Install NULL as
6202 supports_z_point_type method.
6203 * linux-s390-low.c (the_low_target): Install NULL as
6204 supports_z_point_type method.
6205 * linux-sparc-low.c (the_low_target): Install NULL as
6206 supports_z_point_type method.
6207 * linux-x86-low.c (x86_supports_z_point_type): New function.
6208 (x86_insert_point): Adjust to new insert_point interface. Use
6209 insert_memory_breakpoint. Adjust to new
6210 i386_low_insert_watchpoint interface.
6211 (x86_remove_point): Adjust to remove_point interface. Use
6212 remove_memory_breakpoint. Adjust to new
6213 i386_low_remove_watchpoint interface.
6214 (the_low_target): Install x86_supports_z_point_type.
6215 * lynx-low.c (lynx_target_ops): Install NULL as
6216 supports_z_point_type callback.
6217 * nto-low.c (nto_supports_z_point_type): New.
6218 (nto_insert_point, nto_remove_point): Adjust to new interface.
6219 (nto_target_ops): Install nto_supports_z_point_type.
6220 * mem-break.c: Adjust intro comment.
6221 (struct raw_breakpoint) <raw_type, size>: New fields.
6222 <inserted>: Update comment.
6223 <shlib_disabled>: Delete field.
6224 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6225 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6226 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6227 (raw_bkpt_type_to_target_hw_bp_type): New function.
6228 (find_enabled_raw_code_breakpoint_at): New function.
6229 (find_raw_breakpoint_at): New type and size parameters. Use them.
6230 (insert_memory_breakpoint): New function, based off
6231 set_raw_breakpoint_at.
6232 (remove_memory_breakpoint): New function.
6233 (set_raw_breakpoint_at): Reimplement.
6234 (set_breakpoint): New, based on set_breakpoint_at.
6235 (set_breakpoint_at): Reimplement.
6236 (delete_raw_breakpoint): Go through the_target->remove_point
6237 instead of assuming memory breakpoints.
6238 (find_gdb_breakpoint_at): Delete.
6239 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6240 (find_gdb_breakpoint): New function.
6241 (set_gdb_breakpoint_at): Delete.
6242 (z_type_supported): New function.
6243 (set_gdb_breakpoint_1): New function, loosely based off
6244 set_gdb_breakpoint_at.
6245 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6246 (delete_gdb_breakpoint_at): Delete.
6247 (delete_gdb_breakpoint_1): New function, loosely based off
6248 delete_gdb_breakpoint_at.
6249 (delete_gdb_breakpoint): New function.
6250 (clear_gdb_breakpoint_conditions): Rename to ...
6251 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6252 breakpoint.
6253 (add_condition_to_breakpoint): Make static.
6254 (add_breakpoint_condition): Take a struct breakpoint pointer
6255 instead of an address. Adjust.
6256 (gdb_condition_true_at_breakpoint): Rename to ...
6257 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6258 z_type parameter.
6259 (gdb_condition_true_at_breakpoint): Reimplement.
6260 (add_breakpoint_commands): Take a struct breakpoint pointer
6261 instead of an address. Adjust.
6262 (gdb_no_commands_at_breakpoint): Rename to ...
6263 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6264 parameter. Return true if no breakpoint was found. Change debug
6265 output.
6266 (gdb_no_commands_at_breakpoint): Reimplement.
6267 (run_breakpoint_commands): Rename to ...
6268 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6269 and change return type to boolean.
6270 (run_breakpoint_commands): New function.
6271 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6272 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6273 breakpoint. Go through the_target->remove_point instead of
6274 assuming memory breakpoint.
6275 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6276 software and hardware breakpoints.
6277 (reinsert_raw_breakpoint): Go through the_target->insert_point
6278 instead of assuming memory breakpoint.
6279 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6280 software and hardware breakpoints.
6281 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6282 Check both software and hardware breakpoints.
6283 (validate_inserted_breakpoint): Assert the breakpoint is a
6284 software breakpoint. Set the inserted flag to -1 instead of
6285 setting shlib_disabled.
6286 (delete_disabled_breakpoints): Adjust.
6287 (validate_breakpoints): Only validate software breakpoints.
6288 Adjust to inserted flag change.
6289 (check_mem_read, check_mem_write): Skip breakpoint types other
6290 than software breakpoints. Adjust to inserted flag change.
6291 * mem-break.h (enum raw_bkpt_type): New enum.
6292 (raw_breakpoint, struct process_info): Forward declare.
6293 (Z_packet_to_target_hw_bp_type): Delete declaration.
6294 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6295 (set_gdb_breakpoint, delete_gdb_breakpoint)
6296 (clear_breakpoint_conditions): New declarations.
6297 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6298 (breakpoint_inserted_here): Update comment.
6299 (add_breakpoint_condition, add_breakpoint_commands): Replace
6300 address parameter with a breakpoint pointer parameter.
6301 (gdb_breakpoint_here): Update comment.
6302 (delete_gdb_breakpoint_at): Delete.
6303 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6304 * server.c (process_point_options): Take a struct breakpoint
6305 pointer instead of an address. Adjust.
6306 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6307 delete_gdb_breakpoint.
6308 * spu-low.c (spu_target_ops): Install NULL as
6309 supports_z_point_type method.
6310 * target.h: Include mem-break.h.
6311 (struct target_ops) <prepare_to_access_memory>: Update comment.
6312 <supports_z_point_type>: New field.
6313 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6314 instead of a char. Also take a raw breakpoint pointer.
6315 * win32-arm-low.c (the_low_target): Install NULL as
6316 supports_z_point_type.
6317 * win32-i386-low.c (i386_supports_z_point_type): New function.
6318 (i386_insert_point, i386_remove_point): Adjust to new interface.
6319 (the_low_target): Install i386_supports_z_point_type.
6320 * win32-low.c (win32_supports_z_point_type): New function.
6321 (win32_insert_point, win32_remove_point): Adjust to new interface.
6322 (win32_target_ops): Install win32_supports_z_point_type.
6323 * win32-low.h (struct win32_target_ops):
6324 <supports_z_point_type>: New method.
6325 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6326 instead of a char. Also take a raw breakpoint pointer.
6327
932539e3
PA
63282014-05-20 Pedro Alves <palves@redhat.com>
6329
6330 * mem-break.h: Include break-common.h.
6331 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6332 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6333 (Z_packet_to_target_hw_bp_type): New declaration.
6334 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6335 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6336 (Z_PACKET_ACCESS_WP): Delete macros.
6337 (Z_packet_to_hw_type): Delete function.
6338 * i386-low.h: Don't include break-common.h here.
6339 (Z_packet_to_hw_type): Delete declaration.
6340 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6341 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6342 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6343 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6344 * linux-aarch64-low.c: Don't include break-common.h here.
6345 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6346 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6347 (Z_packet_to_target_hw_bp_type): Delete function.
6348 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6349 function.
6350 (mips_insert_point, mips_remove_point): Use
6351 Z_packet_to_target_hw_bp_type.
6352
4ff0d3d8
PA
63532014-05-20 Pedro Alves <palves@redhat.com>
6354
6355 * linux-aarch64-low.c: Include break-common.h.
6356 (enum target_point_type): Delete.
6357 (Z_packet_to_point_type): Rename to ...
6358 (Z_packet_to_target_hw_bp_type): ... this, and return a
6359 target_hw_bp_type instead.
6360 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6361 instead of an enum target_point_type.
6362 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6363 breakpoint type.
6364 (aarch64_dr_state_insert_one_point)
6365 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6366 (aarch64_handle_aligned_watchpoint)
6367 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6368 Take an enum target_hw_bp_type instead of an enum
6369 target_point_type.
6370 (aarch64_supports_z_point_type): New function.
6371 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6372 use Z_packet_to_target_hw_bp_type.
6373
786dc519
JB
63742014-05-20 Joel Brobecker <brobecker@adacore.com>
6375
6376 * configure.ac: Only use -Werror by default when DEVELOPMENT
6377 is true.
6378 * configure: Regenerate.
6379
9e0aa64f
JK
63802014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6381
6382 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6383 * linux-x86-low.c (X86_64_USER_REGS): New.
6384 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6385
2b577b92
YQ
63862014-04-28 Yao Qi <yao@codesourcery.com>
6387
6388 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6389 name.
6390
94611da2
PA
63912014-04-25 Pedro Alves <palves@redhat.com>
6392
6393 PR server/16255
6394 * linux-low.c (linux_attach_fail_reason_string): New function.
6395 (linux_attach_lwp): Delete.
6396 (linux_attach_lwp_1): Rename to ...
6397 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6398 argument. Remove "initial" parameter. Return int instead of
6399 void. Don't error or warn here.
6400 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6401 failure to attach to the tgid. Call warning when failing to
6402 attach to an lwp.
6403 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6404 argument. Remove "initial" parameter. Return int instead of
6405 void. Don't error or warn here.
6406 (linux_attach_fail_reason_string): New declaration.
6407 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6408 interface change. Use linux_attach_fail_reason_string.
6409
01f9f808
MS
64102014-04-24 Michael Sturm <michael.sturm@mintel.com>
6411 Walfred Tedeschi <walfred.tedeschi@intel.com>
6412
6413 * Makefile.in: Added rules to handle new files
6414 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6415 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6416 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6417 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6418 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6419 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6420 x32-avx512-linux.o.
6421 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6422 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6423 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6424 i386/x32-avx512.xml.
6425 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6426 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6427 i386/x32-avx512-linux.xml.
6428 * i387-fp.c (num_avx512_k_registers): New constant for number
6429 of K registers.
6430 (num_avx512_zmmh_low_registers): New constant for number of
6431 lower ZMM registers (0-15).
6432 (num_avx512_zmmh_high_registers): New constant for number of
6433 higher ZMM registers (16-31).
6434 (num_avx512_ymmh_registers): New contant for number of higher
6435 YMM registers (ymm16-31 added by avx521 on x86_64).
6436 (num_avx512_xmm_registers): New constant for number of higher
6437 XMM registers (xmm16-31 added by AVX512 on x86_64).
6438 (struct i387_xsave): Add space for AVX512 registers.
6439 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6440 Add code to handle AVX512 registers.
6441 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6442 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6443 prototypei from generated file.
6444 (tdesc_amd64_avx512_linux): Likewise.
6445 (init_registers_x32_avx512_linux): Likewise.
6446 (tdesc_x32_avx512_linux): Likewise.
6447 (init_registers_i386_avx512_linux): Likewise.
6448 (tdesc_i386_avx512_linux): Likewise.
6449 (x86_64_regmap): Add AVX512 registers.
6450 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6451 mask.
6452 (initialize_low_arch): Add code to initialize AVX512 registers.
6453
51aa91f9
PA
64542014-04-23 Pedro Alves <palves@redhat.com>
6455
6456 * mem-break.c (find_gdb_breakpoint_at): Make static.
6457 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6458
a4165e94
PA
64592014-04-23 Pedro Alves <palves@redhat.com>
6460
6461 * i386-low.c: Don't include break-common.h here.
6462 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6463 prototype to take target_hw_bp_type as argument instead of a Z
6464 packet char.
6465 * i386-low.h: Include break-common.h here.
6466 (Z_packet_to_hw_type): Declare.
6467 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6468 prototypes.
6469 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6470 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6471 (x86_remove_point): Convert the packet number to a
6472 target_hw_bp_type before calling i386_low_remove_watchpoint.
6473 * win32-i386-low.c (i386_insert_point): Convert the packet number
6474 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6475 (i386_remove_point): Convert the packet number to a
6476 target_hw_bp_type before calling i386_low_remove_watchpoint.
6477
b8acf843
PA
64782014-04-23 Pedro Alves <palves@redhat.com>
6479
6480 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6481
d708bcd1
PA
64822014-04-10 Pedro Alves <palves@redhat.com>
6483
6484 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6485 Check if the condition or command is NULL before checking if the
6486 breakpoint is known. On success, return true.
6487 * mem-break.h (add_breakpoint_condition): Document return.
6488 (add_breakpoint_commands): Add describing comment.
6489 * server.c (skip_to_semicolon): New function.
6490 (process_point_options): Use it.
6491
2eec7d5b
PA
64922014-04-09 Pedro Alves <palves@redhat.com>
6493
6494 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6495 to lwpid_of.
6496
fa96cb38
PA
64972014-02-27 Pedro Alves <palves@redhat.com>
6498
6499 PR 12702
6500 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6501 macros.
6502 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6503 output.
6504 (last_thread_of_process_p): Take a PID argument instead of a
6505 thread pointer.
6506 (linux_wait_for_lwp): Delete.
6507 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6508 functions.
6509 (linux_low_filter_event): New function, party factored out from
6510 linux_wait_for_event.
6511 (linux_wait_for_event): Rename to ...
6512 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6513 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6514 sigsuspend. Check for zombie leaders.
6515 (linux_wait_for_event): Reimplement as wrapper around
6516 linux_wait_for_event_filtered.
6517 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6518 a normal or signal exit is seen, it's the whole process exiting.
6519 (wait_for_sigstop): No longer a for_each_inferior callback.
6520 Rewrite on top of linux_wait_for_event_filtered.
6521 (stop_all_lwps): Call wait_for_sigstop directly.
6522 * server.c (resume, handle_target_event): Handle
6523 TARGET_WAITKIND_NO_RESUMED.
6524
d763de10
JB
65252014-02-26 Joel Brobecker <brobecker@adacore.com>
6526
6527 * win32-low.c (psapi_get_dll_name,
6528 * win32_CreateToolhelp32Snapshot): Delete.
6529 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6530 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6531 Delete.
6532 (handle_load_dll): Add function description.
6533 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6534
850a0f76
JB
65352014-02-26 Joel Brobecker <brobecker@adacore.com>
6536
6537 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6538 Add comment.
6539 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6540 base address when calling win32_add_one_solib.
6541 (handle_load_dll): Delete local variable load_addr.
6542 Remove 0x1000 offset applied to DLL base address when calling
6543 win32_add_one_solib.
6544 (handle_unload_dll): Add comment.
6545
f25b3fc3
JB
65462014-02-26 Joel Brobecker <brobecker@adacore.com>
6547
6548 * win32-low.c (win32_add_all_dlls): Renames
6549 win32_ensure_ntdll_loaded. Rewrite function documentation.
6550 Adjust implementation to always load all DLLs.
6551 Add 0x1000 offset to DLL base address when calling
6552 win32_add_one_solib.
6553 (child_initialization_done): New static global.
6554 (do_initial_child_stuff): Set child_initialization_done to
6555 zero during child initialization, and 1 after. Replace call
6556 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6557 Add comment.
6558 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6559 (handle_unload_dll): Add function documentation.
6560 (get_child_debug_event): Ignore load and unload DLL events
6561 during child initialization.
6562
d86d4aaf
DE
65632014-02-20 Doug Evans <dje@google.com>
6564
3bc32da3 6565 Remove global all_lwps.
d86d4aaf
DE
6566 * inferiors.h (ptid_of): Move here from linux-low.h.
6567 (pid_of, lwpid_of): Ditto.
6568 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6569 parameter is a struct thread_info * now.
6570 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6571 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6572 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6573 directly.
6574 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6575 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6576 * linux-arm-low.c (update_registers_callback): Update, "entry"
6577 parameter is a struct thread_info * now.
6578 Fetch lwpid from current_inferior directly.
6579 (arm_insert_point): Pass &all_threads to find_inferior instead of
6580 &all_lwps.
6581 (arm_remove_point): Ditto.
6582 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6583 (arm_prepare_to_resume): Fetch pid from thread.
6584 (arm_read_description): Fetch lwpid from current_inferior directly.
6585 * linux-low.c (all_lwps): Delete.
6586 (delete_lwp): Delete call to remove_inferior.
6587 (handle_extended_wait): Fetch lwpid from thread.
6588 (add_lwp): Don't set lwp->entry.id. Remove call to
6589 add_inferior_to_list.
6590 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6591 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6592 (kill_one_lwp_callback): Ditto.
6593 (linux_kill): Don't dereference NULL pointer.
6594 Fetch ptid,lwpid from thread.
6595 (get_detach_signal): Fetch ptid from thread.
6596 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6597 Simplify call to regcache_invalidate_thread.
6598 (delete_lwp_callback): Update, "entry" parameter is a
6599 struct thread_info * now. Fetch pid from thread.
6600 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6601 (status_pending_p_callback): Update, "entry" parameter is a
6602 struct thread_info * now. Fetch ptid from thread.
6603 (find_lwp_pid): Update, "entry" parameter is a
6604 struct thread_info * now.
6605 (linux_wait_for_lwp): Fetch pid from thread.
6606 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6607 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6608 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6609 (dequeue_one_deferred_signal): Ditto.
6610 (cancel_breakpoint): Fetch ptid from current_inferior.
6611 (linux_wait_for_event): Pass &all_threads to find_inferior,
6612 not &all_lwps. Fetch ptid, lwpid from thread.
6613 (count_events_callback): Update, "entry" parameter is a
6614 struct thread_info * now.
6615 (select_singlestep_lwp_callback): Ditto.
6616 (select_event_lwp_callback): Ditto.
6617 (cancel_breakpoints_callback): Ditto.
6618 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6619 not &all_lwps.
6620 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6621 (unsuspend_one_lwp): Update, "entry" parameter is a
6622 struct thread_info * now.
6623 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6624 not &all_lwps.
6625 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6626 Fetch lwpid from thread, not lwp.
6627 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6628 Pass &all_threads to find_inferior, not &all_lwps.
6629 (send_sigstop): Fetch lwpid from thread, not lwp.
6630 (send_sigstop_callback): Update, "entry" parameter is a
6631 struct thread_info * now.
6632 (suspend_and_send_sigstop_callback): Ditto.
6633 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6634 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6635 struct thread_info * now.
6636 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6637 from thread, lwp.
6638 (lwp_running): Update, "entry" parameter is a
6639 struct thread_info * now.
6640 (stop_all_lwps): Fetch ptid from thread.
6641 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6642 (linux_resume_one_lwp): Fetch lwpid from thread.
6643 (linux_set_resume_request): Update, "entry" parameter is a
6644 struct thread_info * now. Fetch pid, lwpid from thread.
6645 (resume_status_pending_p): Update, "entry" parameter is a
6646 struct thread_info * now.
6647 (need_step_over_p): Ditto. Fetch lwpid from thread.
6648 (start_step_over): Fetch lwpid from thread.
6649 (linux_resume_one_thread): Update, "entry" parameter is a
6650 struct thread_info * now. Fetch lwpid from thread.
6651 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6652 (proceed_one_lwp): Update, "entry" parameter is a
6653 struct thread_info * now. Fetch lwpid from thread.
6654 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6655 struct thread_info * now.
6656 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6657 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6658 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6659 directly.
6660 (regsets_store_inferior_registers): Ditto.
6661 (fetch_register, store_register): Ditto.
6662 (linux_read_memory, linux_write_memory): Ditto.
6663 (linux_request_interrupt): Ditto.
6664 (linux_read_auxv): Ditto.
6665 (linux_xfer_siginfo): Ditto.
6666 (linux_qxfer_spu): Ditto.
6667 (linux_qxfer_libraries_svr4): Ditto.
6668 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6669 moved to inferiors.h.
6670 (get_lwp): Delete.
6671 (get_thread_lwp): Update.
6672 (struct lwp_info): Delete member "entry". Simplify comment for
6673 member "thread".
6674 (all_lwps): Delete.
6675 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6676 current_inferior directly.
6677 (update_watch_registers_callback): Update, "entry" parameter is a
6678 struct thread_info * now. Fetch pid from thread.
6679 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6680 (mips_insert_point): Fetch lwpid from current_inferior.
6681 Pass &all_threads to find_inferior, not &all_lwps.
6682 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6683 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6684 directly.
6685 (mips_stopped_data_address): Ditto.
6686 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6687 directly.
6688 * linux-tile-low.c (tile_arch_setup): Ditto.
6689 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6690 (update_debug_registers_callback): Update, "entry" parameter is a
6691 struct thread_info * now. Fetch pid from thread.
6692 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6693 Pass &all_threads to find_inferior, not &all_lwps.
6694 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6695 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6696 Pass &all_threads to find_inferior, not &all_lwps.
6697 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6698 (i386_dr_low_get_status): Ditto.
6699 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6700 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6701 (x86_linux_read_description): Ditto.
6702 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6703
3b8361aa
DE
67042014-02-20 Doug Evans <dje@google.com>
6705
6706 * inferiors.c (get_first_inferior): Fix buglet.
6707
f7667f0d
DE
67082014-02-19 Doug Evans <dje@google.com>
6709
6710 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6711 * inferiors.c (add_thread): Change result type to struct thread_info *.
6712 All callers updated.
6713 (add_lwp): Call add_thread here instead of in callers.
6714 All callers updated.
6715 * linux-low.h (get_lwp_thread): Rewrite.
6716 (struct lwp_info): New member "thread".
6717
b3312d80
DE
67182014-02-19 Doug Evans <dje@google.com>
6719
6720 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6721 All callers updated.
6722
ecc6f45c
DE
67232014-02-19 Doug Evans <dje@google.com>
6724
6725 * inferiors.c (add_thread): Fix whitespace.
6726
649ebbca
DE
67272014-02-19 Doug Evans <dje@google.com>
6728
6729 * dll.c (clear_dlls): Replace accessing list implemention details
6730 with API function.
6731 * gdbthread.h (get_first_thread): Declare.
6732 * inferiors.c (for_each_inferior_with_data): New function.
6733 (get_first_thread): New function.
6734 (find_thread_ptid): Simplify.
6735 (get_first_inferior): New function.
6736 (clear_list): Delete.
6737 (one_inferior_p): New function.
6738 (clear_inferior_list): New function.
6739 (clear_inferiors): Update.
6740 * inferiors.h (for_each_inferior_with_data): Declare.
6741 (clear_inferior_list): Declare.
6742 (one_inferior_p): Declare.
6743 (get_first_inferior): Declare.
6744 * linux-low.c (linux_wait_for_event): Replace accessing list
6745 implemention details with API function.
6746 * server.c (target_running): Ditto.
6747 (accumulate_file_name_length): New function.
6748 (emit_dll_description): New function.
6749 (handle_qxfer_libraries): Replace accessing list implemention
6750 details with API function.
6751 (handle_qxfer_threads_worker): New function.
6752 (handle_qxfer_threads_proper): Replace accessing list implemention
6753 details with API function.
6754 (handle_query): Ditto.
6755 (visit_actioned_threads_callback_ftype): New typedef.
6756 (visit_actioned_threads_data): New struct.
6757 (visit_actioned_threads): Rewrite to be find_inferior callback.
6758 (resume): Call find_inferior.
6759 (handle_status): Replace accessing list implemention
6760 details with API function.
6761 (process_serial_event): Replace accessing list implemention details
6762 with API function.
6763 * target.c (set_desired_inferior): Replace accessing list implemention
6764 details with API function.
6765 * tracepoint.c (same_process_p): New function.
6766 (gdb_agent_about_to_close): Replace accessing list implemention
6767 details with API function.
6768 * win32-low.c (child_delete_thread): Replace accessing list
6769 implemention details with API function.
6770 (match_dll_by_basename): New function.
6771 (dll_is_loaded_by_basename): New function.
6772 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6773 details call to dll_is_loaded_by_basename.
6774
80894984
DE
67752014-02-19 Doug Evans <dje@google.com>
6776
6777 * dll.h (struct dll_info): Add comment.
6778 * gdbthread.h (struct thread_info): Add comment.
6779 (current_ptid): Simplify.
6780 * inferiors.c (add_process): Update.
6781 (remove_process): Update.
6782 * inferiors.h (struct process_info): Rename member "head" to "entry".
6783 * linux-low.c (delete_lwp): Update.
6784 (add_lwp): Update.
6785 (last_thread_of_process_p): Update.
6786 (kill_one_lwp_callback, linux_kill): Update.
6787 (status_pending_p_callback): Update.
6788 (wait_for_sigstop): Update. Simplify read of ptid.
6789 (start_step_over): Update.
6790 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6791 (get_lwp_thread): Update.
6792 (struct lwp_info): Rename member "head" to "entry".
6793 * regcache.h (inferior_list_entry): Delete.
6794 * server.c (kill_inferior_callback): Update.
6795 (detach_or_kill_inferior_callback): Update.
6796 (print_started_pid): Update.
6797 (print_attached_pid): Update.
6798 (process_serial_event): Simplify read of ptid.
6799 * thread-db.c (thread_db_create_event): Update.
6800 (thread_db_get_tls_address): Update.
6801 * win32-low.c (current_inferior_ptid): Simplify.
6802
46917d26
TT
68032014-02-19 Tom Tromey <tromey@redhat.com>
6804
6805 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6806 argument.
6807 (target_supports_btrace): Update.
6808
0759a81e
YQ
68092014-02-14 Yao Qi <yao@codesourcery.com>
6810
6811 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6812 (rsp-low-ipa.o): New target.
6813
a7191e8b
TT
68142014-02-12 Tom Tromey <tromey@redhat.com>
6815
6816 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6817 convert_ascii_to_int.
6818 * regcache.c (registers_to_string): Likewise.
6819 * remote-utils.c (decode_M_packet): Likewise.
6820 * server.c (process_serial_event): Likewise.
6821
ff0e980e
TT
68222014-02-12 Tom Tromey <tromey@redhat.com>
6823
6824 * server.c (handle_query, handle_v_run): Use hex2bin, not
6825 unhexify.
6826 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6827
e9371aff
TT
68282014-02-12 Tom Tromey <tromey@redhat.com>
6829
6830 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6831 convert_int_to_ascii.
6832 * regcache.c (registers_to_string, collect_register_as_string):
6833 Likewise.
6834 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6835 Likewise.
6836 * server.c (process_serial_event): Likewise.
6837 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6838 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6839
971dc0b8
TT
68402014-02-12 Tom Tromey <tromey@redhat.com>
6841
6842 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6843 bin2hex, not hexify.
6844 * tracepoint.c (cmd_qtstatus): Likewise.
6845
0a822afb
TT
68462014-02-12 Tom Tromey <tromey@redhat.com>
6847
6848 * remote-utils.c (monitor_output): Pass explicit length to
6849 hexify.
6850
9c3d6531
TT
68512014-02-12 Tom Tromey <tromey@redhat.com>
6852
6853 * tracepoint.c: Include rsp-low.h.
6854 * server.c: Include rsp-low.h.
6855 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6856 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6857 declare.
6858 * remote-utils.c: Include rsp-low.h.
6859 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6860 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6861 (convert_int_to_ascii, convert_ascii_to_int): Move to
6862 common/rsp-low.c.
6863 * regcache.c: Include rsp-low.h.
6864 * ax.c: Include rsp-low.h.
6865 * Makefile.in (SFILES): Add common/rsp-low.c.
6866 (OBS): Add rsp-low.o.
6867 (rsp-low.o): New target.
6868
01fd3ea5
TT
68692014-02-12 Tom Tromey <tromey@redhat.com>
6870
6871 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6872 Include print-utils.h.
6873 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6874 (plongest, thirty_two, phex_nz): Remove.
6875 * Makefile.in (SFILES): Add common/print-utils.c.
6876 (OBS): Add print-utils.o.
6877 (print-utils-ipa.o): New target.
6878 (print-utils.o): New target.
6879 (IPA_OBJS): Add print-utils-ipa.o.
6880
e99dc820
TT
68812014-02-06 Tom Tromey <tromey@redhat.com>
6882
6883 * Makefile.in (SFILES): Fix indentation.
6884
ee1e2d4f
DE
68852014-02-05 Doug Evans <dje@google.com>
6886
6887 * linux-low.c (linux_wait_for_event): Improve comment.
6888 (linux_wait_1): Keep current_inferior in sync with event_child.
6889
f5a02773
DE
68902014-01-22 Doug Evans <dje@google.com>
6891
6892 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6893
87ce2a04
DE
68942014-01-22 Doug Evans <dje@google.com>
6895
6896 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6897 * configure: Regenerate.
6898 * config.in: Regenerate.
6899 * Makefile.in (SFILES): Add debug.c.
6900 (OBS): Add debug.o.
6901 * debug.c: New file.
6902 * debug.h: New file.
6903 * linux-aarch64-low.c (*): Update all debugging printfs to use
6904 debug_printf instead of fprintf.
6905 * linux-arm-low.c (*): Ditto.
6906 * linux-cris-low.c (*): Ditto.
6907 * linux-crisv32-low.c (*): Ditto.
6908 * linux-m32r-low.c (*): Ditto.
6909 * linux-sparc-low.c (*): Ditto.
6910 * linux-x86.c (*): Ditto.
6911 * linux-low.c (*): Ditto.
6912 (linux_wait_1): Add calls to debug_enter, debug_exit.
6913 (linux_wait): Remove redundant debugging printf.
6914 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6915 (linux_resume, unstop_all_lwps): Ditto.
6916 * mem-break.c (*): Update all debugging printfs to use
6917 debug_printf instead of fprintf.
6918 * remote-utils.c (*): Ditto.
6919 * thread-db.c (*): Ditto.
6920 * server.c #include <ctype.h>, "gdb_vecs.h".
6921 (debug_threads): Moved to debug.c.
6922 (*): Update all debugging printfs to use debug_printf instead of
6923 fprintf.
6924 (start_inferior): Replace call to fflush with call to debug_flush.
6925 (monitor_show_help): Mention set debug-format.
6926 (parse_debug_format_options): New function.
6927 (handle_monitor_command): Handle "monitor set debug-format".
6928 (gdbserver_usage): Mention --debug-format.
6929 (main): Parse --debug-format.
6930 * server.h (debug_threads): Declaration moved to debug.h.
6931 #include "debug.h".
6932 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6933 trace_debug_1 that uses debug_printf.
6934 (tracepoint_look_up_symbols): Update all debugging printfs to use
6935 debug_printf instead of fprintf.
6936
e671835b
BS
69372014-01-20 Baruch Siach <baruch@tkos.co.il>
6938
6939 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6940 sys/ptrace.h.
6941
b5737fa9
PA
69422014-01-17 Pedro Alves <palves@redhat.com>
6943
ea38d2a9 6944 PR build/16445
c7faa97a
PA
6945 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6946 defined after including gdb_proc_service.h.
b5737fa9 6947
40ed484e
DE
69482014-01-16 Doug Evans <dje@google.com>
6949
6950 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6951 (match_dll): Use it.
6952
969c39fb
MM
69532014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6954
6955 * target.h (target_ops) <read_btrace>: Change parameters and
6956 return type to allow error reporting.
6957 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6958 trace reading errors on.
6959 * linux-low.c (linux_low_read_btrace): Pass trace reading
6960 errors on.
6961 (linux_low_disable_btrace): New.
6962
ab7f45ba
DE
69632014-01-15 Doug Evans <dje@google.com>
6964
6965 * inferiors.c (thread_id_to_gdb_id): Delete.
6966 * inferiors.h (thread_id_to_gdb_id): Delete.
6967
66af0f44
EZ
69682014-01-13 Eli Zaretskii <eliz@gnu.org>
6969
6970 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6971 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6972 versions.
6973
9939e131
PA
69742014-01-08 Pedro Alves <palves@redhat.com>
6975
6976 * server.c (handle_status): Don't discard previous queued stop
6977 replies or thread's pending status here.
6978 (main) <disconnection>: Do it here instead.
6979
b7ea362b
PA
69802014-01-08 Pedro Alves <palves@redhat.com>
6981
6982 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6983 * server.c (visit_actioned_threads, handle_pending_status): New
6984 function.
6985 (handle_v_cont): Factor out parts to ...
6986 (resume): ... this new function. If in all-stop, and a thread
6987 being resumed has a pending status, report it without actually
6988 resuming.
6989 (myresume): Adjust to use the new 'resume' function.
6990 (clear_pending_status_callback, set_pending_status_callback)
6991 (find_status_pending_thread_callback): New functions.
6992 (handle_status): Handle the case of multiple threads having
6993 interesting statuses to report. Report threads' real last signal
6994 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6995 with an interesting thread to report the status for, instead of
6996 always reporting the status of the first thread.
6997
28498c42
JB
69982014-01-01 Joel Brobecker <brobecker@adacore.com>
6999
7000 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7001 * gdbreplay.c (gdbreplay_version): Likewise.
7002
f45c82da
YZ
70032013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7004
7005 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7006 iov.iov_len with the real length in use.
7007
379a5e2d
JB
70082013-12-13 Joel Brobecker <brobecker@adacore.com>
7009
7010 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7011 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7012 for all targets that use win32-low.c.
7013 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7014 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7015
4210d83e
PA
70162013-12-13 Pedro Alves <palves@redhat.com>
7017
7018 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7019 if equal to TARGET_WAITKIND_LOADED.
7020 * win32-low.c (cached_status): New static global.
7021 (win32_wait): Add declaration.
7022 (do_initial_child_stuff): Flush all initial pending debug events
7023 up to the initial breakpoint.
7024 (win32_wait): If CACHED_STATUS was set, return that instead
7025 of doing a real wait. Remove the code resuming the execution
7026 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7027 during the initial phase. Also remove the code changing
7028 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7029 TARGET_WAITKIND_STOPPED.
7030
e7f0d979
YQ
70312013-12-11 Yao Qi <yao@codesourcery.com>
7032
7033 * notif.c (handle_notif_ack): Return 0 if no notification
7034 matches.
7035
ebcf782c
DE
70362013-11-20 Doug Evans <dje@google.com>
7037
7038 * linux-low.c (linux_set_resume_request): Fix comment.
7039
20ad9378
DE
70402013-11-20 Doug Evans <dje@google.com>
7041
7042 * linux-low.c (resume_status_pending_p): Tweak comment.
7043
a196ebeb
WT
70442013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7045
7046 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7047 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7048 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7049 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7050 (srv_amd64_regobj): Add amd64-mpx.o.
7051 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7052 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7053 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7054 * i387-fp.c (num_pl_bnd_register) Added constant.
7055 (num_pl_bnd_cfg_registers) Added constant.
7056 (struct i387_xsave) Added reserved area and MPX fields.
7057 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7058 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7059 function.
7060 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7061 (init_registers_amd64_mpx_linux): Declare new function.
7062 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7063 (x86_64_regmap): Add MPX registers.
7064 (x86_linux_read_description): Add MPX case.
7065 (initialize_low_arch): Initialize MPX targets.
7066
0080a2f6
TT
70672013-11-18 Tom Tromey <tromey@redhat.com>
7068
7069 * configure: Rebuild.
7070 * configure.ac: Don't check for stdlib.h.
7071 * gdbreplay.c: Unconditionally include stdlib.h.
7072
2978b111
TT
70732013-11-18 Tom Tromey <tromey@redhat.com>
7074
7075 * config.in: Rebuild.
7076 * configure: Rebuild.
7077 * configure.ac: Don't use AC_HEADER_DIRENT.
7078
a3d08894
TT
70792013-11-18 Tom Tromey <tromey@redhat.com>
7080
7081 * server.h: Don't check HAVE_STRING_H.
7082 * gdbreplay.c: Don't check HAVE_STRING_H.
7083 * configure: Rebuild.
7084
0a5dd17d
TT
70852013-11-18 Tom Tromey <tromey@redhat.com>
7086
7087 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7088 LIBGNU.
7089
1bd2f0ba
TT
70902013-11-08 Tom Tromey <tromey@redhat.com>
7091
7092 * configure, config.in: Rebuild.
7093 * configure.ac: Remove unused configury.
7094
3266f10b
TT
70952013-11-08 Tom Tromey <tromey@redhat.com>
7096
7097 * acinclude.m4: Include common.m4, codeset.m4.
7098 * configure, config.in: Rebuild.
7099 * configure.ac: Use GDB_AC_COMMON.
7100
6682d959
AA
71012013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7102
7103 * linux-s390-low.c (HWCAP_S390_TE): New define.
7104 (s390_arch_setup): Consider the TE field in the HWCAP for
7105 determining 'have_regset_tdb'.
7106
fd0a4d76
SDJ
71072013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7108
7109 PR gdb/16014
7110 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7111 call to sizeof.
7112
1a3d890b
PA
71132013-10-02 Pedro Alves <palves@redhat.com>
7114
7115 * server.c (process_serial_event): Don't output "GDBserver
7116 exiting" if GDB is connected through stdio.
7117 * target.c (mywait): Likewise, be silent if GDB is connected
7118 through stdio.
7119
97ad4581
JB
71202013-10-01 Joel Brobecker <brobecker@adacore.com>
7121
7122 * lynx-low.c (lynx_add_threads_after_attach): New function.
7123 (lynx_attach): Remove call to add_thread. Add call to
7124 lynx_add_threads_after_attach instead.
7125
5b4e221c
MF
71262013-09-28 Mike Frysinger <vapier@gentoo.org>
7127
7128 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7129 * config.in, configure: Regenerated.
7130
ee47b2f8
YQ
71312013-09-18 Yao Qi <yao@codesourcery.com>
7132
7133 PR server/15959
7134 * server.c (start_inferior): Clear 'resume_info'.
7135
d6707650 71362013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7137
d6707650
JW
7138 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7139 for each register.
7140
9243dd0e 71412013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7142
9243dd0e
JW
7143 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7144 linux-tile-low.o to srv_tgtobj.
7145
c623a6ef
WN
71462013-09-16 Will Newton <will.newton@linaro.org>
7147
7148 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7149 out regs.
7150
fb71d39e
PA
71512013-09-06 Pedro Alves <palves@redhat.com>
7152
7153 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7154 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7155 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7156 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7157 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7158 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7159
8e7e9910
PA
71602013-09-06 Pedro Alves <palves@redhat.com>
7161
7162 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7163 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7164
7c3a12ca
PA
71652013-09-06 Pedro Alves <palves@redhat.com>
7166
7167 * linux-amd64-ipa.c: Include tracepoint.h.
7168 * linux-i386-ipa.c: Include tracepoint.h.
7169
8eb3d7b6
RW
71702013-09-06 Ricard Wanderlof <ricardw@axis.com>
7171
7172 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7173 (ps_get_thread_area): New function.
7174
eddddb9d
RW
71752013-09-06 Ricard Wanderlof <ricardw@axis.com>
7176
7177 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7178 (initialize_low_arch): Call init_registers_crisv32 rather than
7179 init_register_crisv32.
7180
533b0600
PA
71812013-09-05 Pedro Alves <palves@redhat.com>
7182
7183 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7184 to ...
7185 * hostio.h: ... this new file.
7186 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7187 win32-low.c: Include hostio.h.
7188
0ce3d3b5
PA
71892013-09-05 Pedro Alves <palves@redhat.com>
7190
7191 * server.h (gdb_client_data, handler_func, callback_handler_func)
7192 (delete_file_handler, add_file_handler, append_callback_event)
7193 (delete_callback_event, start_event_loop, initialize_event_loop):
7194 Move to event-loop.h and include it.
7195 * event-loop.h: New file.
7196
799cdc37
PA
71972013-09-05 Pedro Alves <palves@redhat.com>
7198
7199 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7200 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7201 (loaded_dll, unloaded_dll): Move to ...
7202 * dll.h: ... this new file.
7203 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7204
6a6bbd9d
PA
72052013-09-05 Pedro Alves <palves@redhat.com>
7206
7207 * server.h (current_process, get_thread_process, all_processes)
7208 (add_inferior_to_list, for_each_inferior, current_inferior)
7209 (remove_inferior, add_process, remove_process, find_process_pid)
7210 (have_started_inferiors_p, have_attached_inferiors_p)
7211 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7212 (clear_inferiors, find_inferior, find_inferior_id)
7213 (inferior_target_data, set_inferior_target_data)
7214 (inferior_regcache_data, set_inferior_regcache_data): Move to
7215 inferiors.h, and include it.
7216 * inferiors.h: New file.
7217
f699aaba
PA
72182013-09-05 Pedro Alves <palves@redhat.com>
7219
7220 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7221 Move ...
72f4393d 7222 * ax.h: ... here.
f699aaba 7223
c144c7a0
PA
72242013-09-05 Pedro Alves <palves@redhat.com>
7225
7226 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7227 tracepoint.h.
7228 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7229 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7230 (handle_tracepoint_general_set, handle_tracepoint_query)
7231 (tracepoint_finished_step, tracepoint_was_hit)
7232 (release_while_stepping_state_list, current_traceframe)
7233 (in_readonly_region, traceframe_read_mem)
7234 (fetch_traceframe_registers, traceframe_read_sdata)
7235 (traceframe_read_info, struct fast_tpoint_collect_status)
7236 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7237 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7238 (supply_fast_tracepoint_registers)
7239 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7240 (ipa_tdesc, claim_trampoline_space)
7241 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7242 (agent_mem_read, agent_get_trace_state_variable_value)
7243 (agent_set_trace_state_variable_value, agent_tsv_read)
7244 (agent_mem_read_string, get_raw_reg_func_addr)
7245 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7246 * tracepoint.h: ... this new file.
7247
ff42e6ab
PA
72482013-09-05 Pedro Alves <palves@redhat.com>
7249
7250 * server.h (perror_with_name, error, fatal, warning, paddress)
7251 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7252 include it.
7253 * utils.h: New file.
7254
541af0f4
PA
72552013-09-05 Pedro Alves <palves@redhat.com>
7256
7257 * server.h (remote_debug, noack_mode, transport_is_reliable)
7258 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7259 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7260 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7261 (write_enn, initialize_async_io, enable_async_io)
7262 (disable_async_io, check_remote_input_interrupt_request)
7263 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7264 (dead_thread_notify, prepare_resume_reply)
7265 (decode_address_to_semicolon, decode_address, decode_m_packet)
7266 (decode_M_packet, decode_X_packet, decode_xfer_write)
7267 (decode_search_memory_packet, unhexify, hexify)
7268 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7269 (look_up_one_symbol, relocate_instruction)
7270 (monitor_output): Move to remote-utils.h, and include it.
7271 * remote-utils.h: New file.
7272
eebdf26b
PA
72732013-09-05 Pedro Alves <palves@redhat.com>
7274
7275 * server.h (_): Delete.
7276
3aafd2ff
PA
72772013-09-02 Pedro Alves <palves@redhat.com>
7278
7279 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7280 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7281 allocated.
7282 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7283
cee83bcb
PM
72842013-09-02 Pierre Muller <muller@sourceware.org>
7285
7286 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7287 or WriteProcessMemory complete successfully and handle
7288 ERROR_PARTIAL_COPY error.
7289
9a13b2fa
PA
72902013-09-02 Pedro Alves <palves@redhat.com>
7291
7292 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7293 error instead of EIO.
7294
602e3198
JK
72952013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7296
7297 PR server/15604
7298 * linux-low.c: Include filestuff.h.
7299 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7300 * lynx-low.c: Include filestuff.h.
7301 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7302 * server.c: Include filestuff.h.
7303 (main): Call notice_open_fds.
7304 * spu-low.c: Include filestuff.h.
7305 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7306
96d7229d
LM
73072013-08-22 Luis Machado <lgustavo@codesourcery.com>
7308
7309 * Makefile.in: Explain why ../target and ../nat are not
7310 listed as include file search paths.
7311 (linux-waitpid.o): New object file rule.
7312 * configure.srv (srv_native_linux_obj): New variable.
7313 Replace all occurrences of linux native object files with
7314 $srv_native_linux_obj.
7315 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7316 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7317 (linux_enable_event_reporting): Remove declaration.
7318 (my_waitpid): Moved to common/linux-waitpid.c.
7319 (linux_wait_for_event): Pass ptid when calling
7320 linux_enable_event_reporting.
7321 (linux_supports_tracefork_flag): Remove.
7322 (linux_enable_event_reporting): Likewise.
7323 (linux_tracefork_grandchild): Remove.
7324 (STACK_SIZE): Moved to common/linux-ptrace.c.
7325 (linux_tracefork_child): Remove.
7326 (linux_test_for_tracefork): Remove.
7327 (linux_look_up_symbols): Call linux_supports_traceclone.
7328 (initialize_low): Remove call to linux_test_for_tracefork.
7329 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7330 common/linux-ptrace.h.
7331 (PTRACE_TYPE_ARG4): Likewise.
7332 Include linux-ptrace.h.
7333
32940073
PA
73342013-08-21 Pedro Alves <palves@redhat.com>
7335
7336 * config.in: Renegerate.
7337
33b60d58 73382013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7339
33b60d58
LM
7340 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7341 (SFILES): Remove $(srcdir)/common/target-common.c and
7342 add $(srcdir)/target/waitstatus.c.
7343 (OBS): Remove target-common.o and add waitstatus.o.
7344 (server_h): Remove $(srcdir)/../common/target-common.h and
7345 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7346 and $(srcdir)/../target/waitstatus.h.
7347 (target-common.o): Remove.
7348 (waitstatus.o): New target object file.
7349 * target.h: Do not include target-common.h and
7350 include target/resume.h, target/wait.h and
7351 target/waitstatus.h.
7352
b8e1b30e
LM
73532013-08-13 Luis Machado <lgustavo@codesourcery.com>
7354
7355 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7356 to PTRACE_TYPE_ARG3.
7357 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7358 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7359 PTRACE_TYPE_ARG4.
7360 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7361 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7362
7a60ad40
YQ
73632013-07-27 Jie Zhang <jie@codesourcery.com>
7364 Daniel Jacobowitz <dan@codesourcery.com>
7365 Yao Qi <yao@codesourcery.com>
7366
7367 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7368 (mips-linux-watch.o): New rule.
7369 (mips_linux_watch_h): New variable.
7370 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7371 srv_tgtobj.
7372 * linux-mips-low.c: Include mips-linux-watch.h.
7373 (struct arch_process_info, struct arch_lwp_info): New.
7374 (update_watch_registers_callback): New function.
7375 (mips_linux_new_process, mips_linux_new_thread) New functions.
7376 (mips_linux_prepare_to_resume, mips_insert_point): New
7377 functions.
7378 (mips_remove_point, mips_stopped_by_watchpoint): New
7379 functions.
7380 (rsp_bp_type_to_target_hw_bp_type): New function.
7381 (mips_stopped_data_address): New function.
7382 (the_low_target): Add watchpoint support functions.
7383
de6f69ad
YQ
73842013-07-27 Yao Qi <yao@codesourcery.com>
7385
7386 * i386-low.c: Include break-common.h.
7387 (enum target_hw_bp_type): Remove.
7388
3360c0bf
LM
73892013-07-24 Luis Machado <lgustavo@codesourcery.com>
7390
7391 * Makefile.in (SFILES): /common/target-common.c.
7392 (OBS): Add target-common.o.
7393 (server_h): Add $(srcdir)/../common/target-common.h.
7394 (target-common.o): New target.
7395 * server.c (queue_stop_reply_callback): Free
7396 status string after use.
7397 * target.c (target_waitstatus_to_string): Remove.
7398 * target.h: Include target-common.h.
7399 (resume_kind): Likewise.
7400 (target_waitkind): Likewise.
7401 (target_waitstatus): Likewise.
7402 (TARGET_WNOHANG): Likewise.
7403
bd885420
YQ
74042013-07-04 Yao Qi <yao@codesourcery.com>
7405
7406 * Makefile.in (host_alias): Use @host_noncanonical@.
7407 (target_alias): Use @target_noncanonical@.
7408 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7409 ACX_NONCANONICAL_HOST.
7410 * configure: Regenerated.
7411
7412 Revert:
7413 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7414
7415 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7416 * configure: Rebuild.
7417 * Makefile.in (version_host, version_target): Get from configure.
7418 (version.c): Use $(version_host) and $(version_target).
7419
17ef446e
PA
74202013-07-03 Pedro Alves <palves@redhat.com>
7421
7422 * Makefile.in (config.status): Depend on development.sh.
7423 * acinclude.m4: Include libmcheck.m4.
7424 * configure: Regenerate.
7425
7a9a7487
MG
74262013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7427
7428 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7429 attribute inside the parentheses.
7430 (winapi_DebugSetProcessKillOnExit): Ditto.
7431 (winapi_DebugBreakProcess): Ditto.
7432 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7433
49b64de6
MG
74342013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7435
7436 * notif.h (notif_event): Add a dummy member to avoid compiler
7437 errors.
7438
d5749ee7
PA
74392013-07-01 Pedro Alves <palves@redhat.com>
7440
7441 * hostio.c (HOSTIO_PATH_MAX): Define.
7442 (require_filename, handle_open, handle_unlink, handle_readlink):
7443 Use it.
7444
d8d2a3ee
PA
74452013-07-01 Pedro Alves <palves@redhat.com>
7446
7447 * server.h: Include "pathmax.h".
7448 * linux-low.c: Don't include sys/param.h.
7449 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7450 MAXPATHLEN.
7451 * win32-low.c: Don't include sys/param.h.
7452 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7453
bc7dea8d
PA
74542013-07-01 Pedro Alves <palves@redhat.com>
7455
7456 * event-loop.c: Don't check HAVE_UNISTD_H before including
7457 <unistd.h>.
7458 * gdbreplay.c: Likewise.
7459 * remote-utils.c: Likewise.
7460 * server.c: Likewise.
7461 * configure.ac: Don't check for unistd.h.
7462 * configure: Regenerate.
7463
d6c2da54
TT
74642013-06-28 Tom Tromey <tromey@redhat.com>
7465
7466 * Makefile.in (version.c): Use version.in, not
7467 common/version.in.
7468
257b6bec
MG
74692013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7470
7471 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7472 * configure: Rebuild.
7473 * Makefile.in (version_host, version_target): Get from configure.
7474 (version.c): Use $(version_host) and $(version_target).
7475
86ebe149
DK
74762013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7477
7478 Fix trace-status to output user name without trailing colon.
7479 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7480
f30aa5af
DK
74812013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7482
7483 Fix trace-status to output proper start-time and stop-time.
7484 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7485 output start time and stop time in hex as gdb expects.
7486
28a93511
YQ
74872013-06-26 Pedro Alves <pedro@codesourcery.com>
7488
7489 * tracepoint.c (build_traceframe_info_xml): Output trace state
7490 variables present in the trace buffer.
7491
01208463
TT
74922013-06-24 Tom Tromey <tromey@redhat.com>
7493
7494 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7495 create-version.sh.
7496 (version.o): Remove.
7497 * gdbreplay.c: Include version.h.
7498 (version, host_name): Don't declare.
7499 * server.h: Include version.h.
7500 (version, host_name): Don't declare.
7501
760256f9
PA
75022013-06-12 Pedro Alves <palves@redhat.com>
7503
7504 * linux-x86-low.c (linux_is_elf64): Delete global.
7505 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7506 with local linux_pid_exe_is_elf_64_file use.
7507
030031ee
PA
75082013-06-11 Pedro Alves <palves@redhat.com>
7509
7510 * linux-low.c (regset_disabled, disable_regset): New functions.
7511 (regsets_fetch_inferior_registers)
7512 (regsets_store_inferior_registers): Use them.
7513 (initialize_regsets_info); Don't allocate the disabled_regsets
7514 array here.
7515 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7516 comment.
7517
5da6eb0a
PA
75182013-06-11 Pedro Alves <palves@redhat.com>
7519
7520 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7521 xmalloc.
7522
7e5aaa09
PA
75232013-06-11 Pedro Alves <palves@redhat.com>
7524
7525 * linux-x86-low.c (initialize_low_arch): Call
7526 init_registers_x32_avx_linux.
7527
d878444c
JK
75282013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7529
7530 Fix compatibility with Android Bionic.
7531 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7532 it is not empty.
7533
3aee8918
PA
75342013-06-07 Pedro Alves <palves@redhat.com>
7535
5f2b57b5 7536 PR server/14823
3aee8918
PA
7537 * Makefile.in (OBS): Add tdesc.o.
7538 (IPA_OBJS): Add tdesc-ipa.o.
7539 (tdesc-ipa.o): New rule.
7540 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7541 interface.
7542 * linux-low.c (new_inferior): Delete.
7543 (disabled_regsets, num_regsets): Delete.
7544 (linux_add_process): Adjust to set the new per-process
7545 new_inferior flag.
7546 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7547 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7548 was a stop. When calling arch_setup, switch the current inferior
7549 to the thread that got an event.
7550 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7551 (regsets_fetch_inferior_registers)
7552 (regsets_store_inferior_registers): New regsets_info parameter.
7553 Adjust to use it.
7554 (linux_register_in_regsets): New regs_info parameter. Adjust to
7555 use it.
7556 (register_addr, fetch_register, store_register): New usrregs_info
7557 parameter. Adjust to use it.
7558 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7559 parameter regs_info. Adjust to use it.
7560 (linux_fetch_registers): Get the current inferior's regs_info, and
7561 adjust to use it.
7562 (linux_store_registers): Ditto.
7563 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7564 (initialize_low): Don't initialize the target_regsets here. Call
7565 initialize_low_arch.
7566 * linux-low.h (target_regsets): Delete declaration.
7567 (struct regsets_info): New.
7568 (struct usrregs_info): New.
7569 (struct regs_info): New.
7570 (struct process_info_private) <new_inferior>: New field.
7571 (struct linux_target_ops): Delete the num_regs, regmap, and
7572 regset_bitmap fields. New field regs_info.
7573 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7574 * i387-fp.c (num_xmm_registers): Delete.
7575 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7576 calls to new interface.
7577 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7578 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7579 Infer the number of xmm registers from the regcache's target
7580 description.
7581 * i387-fp.h (num_xmm_registers): Delete.
7582 * inferiors.c (add_thread): Don't install the thread's regcache
7583 here.
7584 * proc-service.c (gregset_info): Fetch the current inferior's
7585 regs_info. Adjust to use it.
7586 * regcache.c: Include tdesc.h.
7587 (register_bytes, reg_defs, num_registers)
7588 (gdbserver_expedite_regs): Delete.
7589 (get_thread_regcache): If the thread doesn't have a regcache yet,
7590 create one, instead of aborting gdbserver.
7591 (regcache_invalidate_one): Rename to ...
7592 (regcache_invalidate_thread): ... this.
7593 (regcache_invalidate_one): New.
7594 (regcache_invalidate): Only invalidate registers of the current
7595 process.
7596 (init_register_cache): Add target_desc parameter, and use it.
7597 (new_register_cache): Ditto. Assert the target description has a
7598 non zero registers_size.
7599 (regcache_cpy): Add assertions. Adjust.
7600 (realloc_register_cache, set_register_cache): Delete.
7601 (registers_to_string, registers_from_string): Adjust.
7602 (find_register_by_name, find_regno, find_register_by_number)
7603 (register_cache_size): Add target_desc parameter, and use it.
7604 (free_register_cache_thread, free_register_cache_thread_one)
7605 (regcache_release, register_cache_size): New.
7606 (register_size): Add target_desc parameter, and use it.
7607 (register_data, supply_register, supply_register_zeroed)
7608 (supply_regblock, supply_register_by_name, collect_register)
7609 (collect_register_as_string, collect_register_by_name): Adjust.
7610 * regcache.h (struct target_desc): Forward declare.
7611 (struct regcache) <tdesc>: New field.
7612 (init_register_cache, new_register_cache): Add target_desc
7613 parameter.
7614 (regcache_invalidate_thread): Declare.
7615 (regcache_invalidate_one): Delete declaration.
7616 (regcache_release): Declare.
7617 (find_register_by_number, register_cache_size, register_size)
7618 (find_regno): Add target_desc parameter.
7619 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7620 declarations.
7621 * remote-utils.c: Include tdesc.h.
7622 (outreg, prepare_resume_reply): Adjust.
7623 * server.c: Include tdesc.h.
7624 (gdbserver_xmltarget): Delete declaration.
7625 (get_features_xml, process_serial_event): Adjust.
7626 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7627 declare.
7628 (struct process_info) <tdesc>: New field.
7629 (ipa_tdesc): Declare.
7630 * tdesc.c: New file.
7631 * tdesc.h: New file.
7632 * tracepoint.c: Include tdesc.h.
7633 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7634 (get_context_regcache): Adjust to pass ipa_tdesc down.
7635 (do_action_at_tracepoint): Adjust to get the register cache size
7636 from the context regcache's description.
7637 (traceframe_walk_blocks): Adjust to get the register cache size
7638 from the current trace frame's description.
7639 (traceframe_get_pc): Adjust to get current trace frame's
7640 description and pass it down.
7641 (gdb_collect): Adjust to get the register cache size from the
7642 IPA's description.
7643 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7644 (gdbserver_xmltarget): Delete.
7645 (initialize_low_tracepoint): Set the ipa's target description.
7646 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7647 (initialize_low_tracepoint): Set the ipa's target description.
7648 * linux-x86-low.c: Include tdesc.h.
7649 [__x86_64__] (is_64bit_tdesc): New.
7650 (ps_get_thread_area, x86_get_thread_area): Use it.
7651 (i386_cannot_store_register): Rename to ...
7652 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7653 (i386_cannot_fetch_register): Rename to ...
7654 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7655 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7656 to new interface.
7657 (target_regsets): Rename to ...
7658 (x86_regsets): ... this.
7659 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7660 interface.
7661 (x86_siginfo_fixup): Use is_64bit_tdesc.
7662 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7663 (tdesc_x32_avx_linux, tdesc_x32_linux)
7664 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7665 Declare.
7666 (x86_linux_update_xmltarget): Delete.
7667 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7668 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7669 (AMD64_LINUX_USER64_CS): New.
7670 (x86_linux_read_description): New, based on
7671 x86_linux_update_xmltarget.
7672 (same_process_callback): New.
7673 (x86_arch_setup_process_callback): New.
7674 (x86_linux_update_xmltarget): New.
7675 (x86_regsets_info): New.
7676 (amd64_linux_regs_info): New.
7677 (i386_linux_usrregs_info): New.
7678 (i386_linux_regs_info): New.
7679 (x86_linux_regs_info): New.
7680 (x86_arch_setup): Reimplement.
7681 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7682 (x86_emit_ops): Ditto.
7683 (the_low_target): Adjust. Install x86_linux_regs_info,
7684 x86_cannot_fetch_register, and x86_cannot_store_register.
7685 (initialize_low_arch): New.
7686 * linux-ia64-low.c (tdesc_ia64): Declare.
7687 (ia64_fetch_register): Adjust.
7688 (ia64_usrregs_info, regs_info): New globals.
7689 (ia64_regs_info): New function.
7690 (the_low_target): Adjust.
7691 (initialize_low_arch): New function.
7692 * linux-sparc-low.c (tdesc_sparc64): Declare.
7693 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7694 Adjust.
7695 (sparc_arch_setup): New function.
7696 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7697 (the_low_target): Adjust.
7698 (initialize_low_arch): New function.
7699 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7700 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7701 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7702 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7703 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7704 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7705 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7706 (tdesc_powerpc_isa205_vsx64l): Declare.
7707 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7708 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7709 (ppc_set_pc, ppc_get_hwcap): Adjust.
7710 (ppc_usrregs_info): Forward declare.
7711 (!__powerpc64__) ppc_regmap_adjusted: New global.
7712 (ppc_arch_setup): Adjust to the current process'es target
7713 description.
7714 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7715 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7716 (ppc_store_evrregset): Adjust.
7717 (target_regsets): Rename to ...
7718 (ppc_regsets): ... this, and make static.
7719 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7720 (ppc_regs_info): New function.
7721 (the_low_target): Adjust.
7722 (initialize_low_arch): New function.
7723 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7724 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7725 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7726 (tdesc_s390x_linux64v2): Declare.
7727 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7728 (s390_fill_gregset, s390_store_last_break): Adjust.
7729 (target_regsets): Rename to ...
7730 (s390_regsets): ... this, and make static.
7731 (s390_get_pc, s390_set_pc): Adjust.
7732 (s390_get_hwcap): New target_desc parameter, and use it.
7733 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7734 (s390_arch_setup): Adjust to set the current process'es target
7735 description. Don't adjust the regmap.
7736 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7737 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7738 (regs_info_3264): New globals.
7739 (s390_regs_info): New function.
7740 (the_low_target): Adjust.
7741 (initialize_low_arch): New function.
7742 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7743 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7744 [__mips64] (init_registers_mips_linux)
7745 (init_registers_mips_dsp_linux): Delete defines.
7746 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7747 (have_dsp): New global.
7748 (mips_read_description): New, based on mips_arch_setup.
7749 (mips_arch_setup): Reimplement.
7750 (get_usrregs_info): New function.
7751 (mips_cannot_fetch_register, mips_cannot_store_register)
7752 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7753 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7754 (target_regsets): Rename to ...
7755 (mips_regsets): ... this, and make static.
7756 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7757 (dsp_regs_info, regs_info): New globals.
7758 (mips_regs_info): New function.
7759 (the_low_target): Adjust.
7760 (initialize_low_arch): New function.
7761 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7762 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7763 Declare.
7764 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7765 (arm_read_description): New, with bits factored from
7766 arm_arch_setup.
7767 (arm_arch_setup): Reimplement.
7768 (target_regsets): Rename to ...
7769 (arm_regsets): ... this, and make static.
7770 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7771 (arm_regs_info): New function.
7772 (the_low_target): Adjust.
7773 (initialize_low_arch): New function.
7774 * linux-m68k-low.c (tdesc_m68k): Declare.
7775 (target_regsets): Rename to ...
7776 (m68k_regsets): ... this, and make static.
7777 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7778 (m68k_regs_info): New function.
7779 (m68k_arch_setup): New function.
7780 (the_low_target): Adjust.
7781 (initialize_low_arch): New function.
7782 * linux-sh-low.c (tdesc_sharch): Declare.
7783 (target_regsets): Rename to ...
7784 (sh_regsets): ... this, and make static.
7785 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7786 (sh_regs_info, sh_arch_setup): New functions.
7787 (the_low_target): Adjust.
7788 (initialize_low_arch): New function.
7789 * linux-bfin-low.c (tdesc_bfin): Declare.
7790 (bfin_arch_setup): New function.
7791 (bfin_usrregs_info, regs_info): New globals.
7792 (bfin_regs_info): New function.
7793 (the_low_target): Adjust.
7794 (initialize_low_arch): New function.
7795 * linux-cris-low.c (tdesc_cris): Declare.
7796 (cris_arch_setup): New function.
7797 (cris_usrregs_info, regs_info): New globals.
7798 (cris_regs_info): New function.
7799 (the_low_target): Adjust.
7800 (initialize_low_arch): New function.
7801 * linux-cris-low.c (tdesc_crisv32): Declare.
7802 (cris_arch_setup): New function.
7803 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7804 (cris_regs_info): New function.
7805 (the_low_target): Adjust.
7806 (initialize_low_arch): New function.
7807 * linux-m32r-low.c (tdesc_m32r): Declare.
7808 (m32r_arch_setup): New function.
7809 (m32r_usrregs_info, regs_info): New globals.
7810 (m32r_regs_info): Adjust.
7811 (initialize_low_arch): New function.
7812 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7813 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7814 (tic6x_usrregs_info): Forward declare.
7815 (tic6x_read_description): New function, based on ...
7816 (tic6x_arch_setup): ... this. Reimplement.
7817 (target_regsets): Rename to ...
7818 (tic6x_regsets): ... this, and make static.
7819 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7820 (tic6x_regs_info): New function.
7821 (the_low_target): Adjust.
7822 (initialize_low_arch): New function.
7823 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7824 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7825 (target_regsets): Rename to ...
7826 (xtensa_regsets): ... this, and make static.
7827 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7828 globals.
7829 (xtensa_arch_setup, xtensa_regs_info): New functions.
7830 (the_low_target): Adjust.
7831 (initialize_low_arch): New function.
7832 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7833 (nios2_arch_setup): Set the current process'es tdesc.
7834 (target_regsets): Rename to ...
7835 (nios2_regsets): ... this.
7836 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7837 (nios2_regs_info): New function.
7838 (the_low_target): Adjust.
7839 (initialize_low_arch): New function.
a261b8f5
PA
7840 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7841 (aarch64_arch_setup): Set the current process'es tdesc.
7842 (target_regsets): Rename to ...
7843 (aarch64_regsets): ... this.
7844 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7845 (aarch64_regs_info): New function.
7846 (the_low_target): Adjust.
7847 (initialize_low_arch): New function.
3aee8918
PA
7848 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7849 globals.
7850 (target_regsets): Rename to ...
7851 (tile_regsets): ... this.
7852 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7853 (tile_regs_info): New function.
7854 (tile_arch_setup): Set the current process'es tdesc.
7855 (the_low_target): Adjust.
7856 (initialize_low_arch): New function.
7857 * spu-low.c (tdesc_spu): Declare.
7858 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7859 * win32-arm-low.c (tdesc_arm): Declare.
7860 (arm_arch_setup): New function.
7861 (the_low_target): Install arm_arch_setup instead of
7862 init_registers_arm.
7863 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7864 (init_windows_x86): Rename to ...
7865 (i386_arch_setup): ... this. Set `win32_tdesc'.
7866 (the_low_target): Adjust.
7867 * win32-low.c (win32_tdesc): New global.
7868 (child_add_thread): Don't create the thread cache here.
7869 (do_initial_child_stuff): Set the new process'es tdesc.
7870 * win32-low.h (struct target_desc): Forward declare.
7871 (win32_tdesc): Declare.
7872 * lynx-i386-low.c (tdesc_i386): Declare global.
7873 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7874 * lynx-low.c (lynx_tdesc): New global.
7875 (lynx_add_process): Set the new process'es tdesc.
7876 * lynx-low.h (struct target_desc): Forward declare.
7877 (lynx_tdesc): Declare global.
7878 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7879 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7880 * nto-low.c (nto_tdesc): New global.
7881 (do_attach): Set the new process'es tdesc.
7882 * nto-low.h (struct target_desc): Forward declare.
7883 (nto_tdesc): Declare.
7884 * nto-x86-low.c (tdesc_i386): Declare.
7885 (nto_x86_arch_setup): Set `nto_tdesc'.
7886
b1fbec62
GB
78872013-06-04 Gary Benson <gbenson@redhat.com>
7888
7889 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7890 to qSupported response when appropriate.
7891 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7892 with nonzero-length annex.
7893 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7894 arguments supplied in annex.
7895
d1ec4ce7
DE
78962013-05-31 Doug Evans <dje@google.com>
7897
ac44adcb 7898 PR server/15594
d1ec4ce7
DE
7899 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7900 64 bits in 64-cross-32 environment.
7901
9b25f2d3
PA
79022013-05-28 Pedro Alves <palves@redhat.com>
7903
7904 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7905 (aarch64-without-fpu.c): Delete rule.
7906 * configure.srv (aarch64*-*-linux*): Remove references to
7907 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7908 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7909 declaration.
7910
6740dc9c
PA
79112013-05-24 Pedro Alves <palves@redhat.com>
7912
7913 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7914 instead of strchr/decode_address. Error if the range isn't split
7915 with a ','. Don't assume there's be a ':' in the action.
7916
c2d6af84
PA
79172013-05-23 Yao Qi <yao@codesourcery.com>
7918 Pedro Alves <palves@redhat.com>
7919
7920 * linux-low.c (lwp_in_step_range): New function.
7921 (linux_wait_1): If the thread was range stepping and stopped
7922 outside the stepping range, report the stop to GDB. Otherwise,
7923 continue stepping. Add range stepping debug output.
7924 (linux_set_resume_request): Copy the step range from the resume
7925 request to the lwp.
7926 (linux_supports_range_stepping): New.
7927 (linux_target_ops) <supports_range_stepping>: Set to
7928 linux_supports_range_stepping.
7929 * linux-low.h (struct linux_target_ops)
7930 <supports_range_stepping>: New field.
7931 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7932 * linux-x86-low.c (x86_supports_range_stepping): New.
7933 (the_low_target) <supports_range_stepping>: Set to
7934 x86_supports_range_stepping.
7935 * server.c (handle_v_cont): Handle 'r' action.
7936 (handle_v_requests): Append ";r" if the target supports range
7937 stepping.
7938 * target.h (struct thread_resume) <step_range_start,
7939 step_range_end>: New fields.
7940 (struct target_ops) <supports_range_stepping>:
7941 New field.
7942 (target_supports_range_stepping): New macro.
7943
58794e1a
JB
79442013-05-17 Joel Brobecker <brobecker@adacore.com>
7945
7946 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7947 confusion in comment.
7948
d631c5a7
JB
79492013-05-17 Joel Brobecker <brobecker@adacore.com>
7950
7951 * lynx-low.c (struct process_info_private): New type.
7952 (lynx_add_process): New function.
7953 (lynx_create_inferior, lynx_attach): Replace calls to
7954 add_process by calls to lynx_add_process.
7955 (lynx_resume): If PTID is null, then try using
7956 current_process()->private->last_wait_event_ptid.
7957 Add comments.
7958 (lynx_clear_inferiors): Delete. The contents of that function
7959 has been inlined in lynx_mourn;
7960 (lynx_wait_1): Save the ptid in the process's private data.
7961 (lynx_mourn): Free the process' private data. Replace call
7962 to lynx_clear_inferiors by call to clear_inferiors.
7963
96f7a20f
YQ
79642013-05-17 Yao Qi <yao@codesourcery.com>
7965
7966 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7967 the right place.
7968
db0dfaa0
LM
79692013-05-16 Luis Machado <lgustavo@codesourcery.com>
7970
7971 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7972 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7973 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7974 PT_TEXT_END_ADDR guards. Update comments.
7975 (linux_target_op) <read_offsets>: Conditionally define to
7976 linux_read_offsets if the target is UCLIBC and if it defines
7977 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7978
68f5f838
SL
79792013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7980 Andrew Jenner <andrew@codesourcery.com>
7981
7982 * Makefile.in (SFILES): Add linux-nios2-low.c.
7983 (clean): Add action to delete nios2-linux.c.
7984 (nios2-linux.c): New rule.
7985 * configure.srv: Add nios2*-*-linux*.
7986 * linux-nios2-low.c: New.
7987
1ebff1fd
HAQ
79882013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7989
7990 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7991
f6150862
HZ
79922013-04-25 Hui Zhu <hui@codesourcery.com>
7993
7994 PR gdb/15186
f6150862
HZ
7995 * ax.c (ax_printf): Add fflush.
7996
614c279d
TT
79972013-04-22 Tom Tromey <tromey@redhat.com>
7998
7999 * Makefile.in (SFILES): Add filestuff.c.
8000 (OBS): Add filestuff.o.
8001 (filestuff.o): New target.
8002 * config.in, configure: Rebuild.
8003 * configure.ac: Check for fdwalk, pipe2.
8004
7d4e5717
PA
80052013-04-17 Pedro Alves <palves@redhat.com>
8006
8007 * configure.ac (USE_THREAD_DB): Delete variable.
8008 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8009 Don't AC_SUBST USE_THREAD_DB.
8010 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8011 * config.in, configure: Regenerate.
8012
d5c93e41
PA
80132013-04-16 Pedro Alves <palves@redhat.com>
8014
8015 * linux-low.h (struct lwp_info) <thread_known>: Move under
8016 the USE_THREAD_DB #ifdef.
8017
04f5fe89
PA
80182013-04-16 Pedro Alves <palves@redhat.com>
8019
8020 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8021 (linux-low.o): Delete rule.
8022 * linux-low.h: Always include "gdb_thread_db.h" instead of
8023 conditionally including thread_db.h.
8024 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8025 HAVE_THREAD_DB_H.
8026
480b27bf
JK
80272013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8028
8029 * Makefile.in (install-only): Fix make install regression.
8030
43662968
JK
80312013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8032
8033 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8034 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8035 installation.
8036 * gdbserver.1: Remove.
8037
3e74e146
PA
80382013-03-22 Pedro Alves <palves@redhat.com>
8039
8040 * linux-low.c (handle_extended_wait): Don't call
8041 linux_enable_event_reporting.
8042
a8347a2a
TT
80432013-03-15 Tony Theodore <tonyt@logyst.com>
8044
8045 PR build/9098:
8046 * Makefile.in (SHELL): Use @SHELL@.
8047
eeb56fa7
SDJ
80482013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8049
8050 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8051 compiler warning.
8052
4fa7e2ff
JB
80532013-03-13 Joel Brobecker <brobecker@adacore.com>
8054
8055 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8056 Remove extraneous NULL element.
8057
8ddb1965
YQ
80582013-03-13 Yao Qi <yao@codesourcery.com>
8059
8060 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8061 'V' block in trace frame.
8062
9accd112
MM
80632013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8064
8065 * target.h (struct target_ops): Add btrace ops.
8066 (target_supports_btrace): New macro.
8067 (target_enable_btrace): New macro.
8068 (target_disable_btrace): New macro.
8069 (target_read_btrace): New macro.
8070 * gdbthread.h (struct thread_info): Add btrace field.
8071 * server.c: Include btrace-common.h.
8072 (handle_btrace_general_set): New function.
8073 (handle_btrace_enable): New function.
8074 (handle_btrace_disable): New function.
8075 (handle_general_set): Call handle_btrace_general_set.
8076 (handle_qxfer_btrace): New function.
8077 (struct qxfer qxfer_packets[]): Add btrace entry.
8078 * inferiors.c (remove_thread): Disable btrace.
8079 * linux-low: Include linux-btrace.h.
8080 (linux_low_enable_btrace): New function.
8081 (linux_low_read_btrace): New function.
8082 (linux_target_ops): Add btrace ops.
8083 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8084 Add srv_linux_btrace=yes.
8085 (x86_64-*-linux*): Add linux-btrace.o.
8086 Add srv_linux_btrace=yes.
8087 * configure.ac: Define HAVE_LINUX_BTRACE.
8088 * config.in: Regenerated.
8089 * configure: Regenerated.
8090
5cc22e4c
MM
80912013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8092
8093 * server.c (handle_qxfer): Preserve error message if -3 is
8094 returned.
8095 (qxfer): Document the -3 return value.
8096
7c97f91e
MM
80972013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8098
8099 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8100 (linux_btrace_h): New variable.
8101 (linux-btrace.o): New rule.
8102
be9a119c 81032013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8104 Hafiz Abid Qadeer <abidh@codesourcery.com>
8105
8106 * tracepoint.c (trace_buffer_size): New global.
8107 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8108 (init_trace_buffer): Change to one-argument function. Allocate
8109 trace buffer memory.
8110 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8111 handle QTBuffer:size packet.
8112 (cmd_bigqtbuffer_size): New function.
8113 (initialize_tracepoint): Call init_trace_buffer with
8114 DEFAULT_TRACE_BUFFER_SIZE.
8115 * server.c (handle_query): Add QTBuffer:size in the
8116 supported packets.
8117
e64f7499
YQ
81182013-03-07 Yao Qi <yao@codesourcery.com>
8119
8120 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8121 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8122 of -1.
8123 (cmd_qtsp): Adjust condition. Do post increment.
8124 Set cur_action and cur_step_action back to 0.
8125
f0ae6fc3
PA
81262013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8127
8128 PR server/15236
8129 * linux-low.c (linux_write_memory): Return early success if LEN is
8130 zero.
8131
b5b0b0af
CV
81322013-03-05 Corinna Vinschen <vinschen@redhat.de>
8133
334ad4a8 8134 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8135
589bc927
TT
81362013-02-28 Tom Tromey <tromey@redhat.com>
8137
8138 * configure.ac: Invoke AC_SYS_LARGEFILE.
8139 * configure, config.in: Rebuild.
8140
dfe07582
CV
81412013-02-28 Corinna Vinschen <vinschen@redhat.com>
8142
8143 * win32-low.c: Throughout, fix format strings and casts of
8144 printf-like functions to avoid type related warnings on all
8145 platforms.
8146 (get_child_debug_event): Print dwDebugEventCode as hex since
8147 that's how it's usually documented.
8148
736cd585
YQ
81492013-02-28 Yao Qi <yao@codesourcery.com>
8150
8151 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8152 pulongest.
8153
e1f58301
JW
81542013-02-27 Jiong Wang <jiwang@tilera.com>
8155
8156 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8157 (reg-tilegx32.c): New rule.
8158 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8159 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8160 different register info initializer according to elf class.
8161 (init_registers_tilgx32): New function. The tilegx32 register info
8162 initializer.
8163 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8164 (tile_store_gregset): Likewise.
8165
d171ca78
YQ
81662013-02-27 Yao Qi <yao@codesourcery.com>
8167
8168 * server.c (process_point_options): Print debug message when
8169 debug_threads is true.
8170
282bbdf3
YQ
81712013-02-26 Yao Qi <yao@codesourcery.com>
8172
8173 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8174
aca22551
PA
81752013-02-19 Pedro Alves <palves@redhat.com>
8176 Kai Tietz <ktietz@redhat.com>
8177
8178 PR gdb/15161
8179
8180 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8181 instead of strtoul to extract address from packet.
8182 (process_serial_event) <'z'>: Likewise.
8183
4f3cee1c
YQ
81842013-02-18 Yao Qi <yao@codesourcery.com>
8185
8186 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8187
8e1d55a3
PA
81882013-02-14 Pedro Alves <palves@redhat.com>
8189
8190 Plug memory leak.
8191
8192 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8193 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8194
458820da
PA
81952013-02-14 Pedro Alves <palves@redhat.com>
8196
8197 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8198
baea0dae
PA
81992013-02-14 Pedro Alves <palves@redhat.com>
8200
8201 * tracepoint.c (save_string): Delete.
8202 (add_tracepoint_action): Use savestring instead of save_string.
8203
0b1afbb3
PA
82042013-02-12 Pedro Alves <palves@redhat.com>
8205
8206 * linux-xtensa-low.c: Ditto.
8207 * xtensa-xtregs.c: Ditto.
8208
8a4ac37e
PA
82092013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8210
8211 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8212 thread_db.
8213
148de6bb
MS
82142013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8215
8216 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8217 aarch64_num_wp_regs and aarch64_num_bp_regs to
8218 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8219
55fac6e0
MS
82202013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8221
8222 * linux-aarch64-low.c (ps_get_thread_area): Replace
8223 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8224
176eb98c
MS
82252013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8226 Marcus Shawcroft <marcus.shawcroft@arm.com>
8227 Nigel Stephens <nigel.stephens@arm.com>
8228 Yufeng Zhang <yufeng.zhang@arm.com>
8229
8230 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8231 (aarch64.c, aarch64-without-fpu.c): New targets.
8232 * configure.srv (aarch64*-*-linux*): New.
8233 * linux-aarch64-low.c: New file.
8234
56f7af9c
MS
82352013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8236
43aaf8b6 8237 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8238 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8239 (dequeue_one_deferred_signal, linux_resume_one_thread)
8240 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8241 (linux_tracefork_grandchild, linux_test_for_tracefork)
8242 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8243 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8244 where the argument is 0.
8245
60f662b0
YQ
82462013-01-25 Yao Qi <yao@codesourcery.com>
8247
8248 * event-loop.c: Include "queue.h".
8249 (gdb_event_p): New typedef.
8250 (struct gdb_event) <next_event>: Remove.
8251 (event_queue): Change to QUEUE(gdb_event_p).
8252 (async_queue_event): Remove.
8253 (gdb_event_xfree): New.
8254 (initialize_event_loop): New.
8255 (process_event): Use API from QUEUE.
8256 (wait_for_event): Likewise.
8257 * server.c (main): Call initialize_event_loop.
8258 * server.h (initialize_event_loop): Declare.
8259
5ae4861a
YQ
82602013-01-18 Yao Qi <yao@codesourcery.com>
8261
8262 * ax.h (struct eval_agent_expr_context): New.
8263 (gdb_eval_agent_expr): Update declaration.
8264 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8265 TFRAME. Add new argument CTX.
8266 * server.h (struct eval_agent_expr_context): Declare.
8267 (agent_mem_read, agent_tsv_read): Update declaration.
8268 (agent_mem_read_string): Likewise.
8269 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8270 (add_traceframe_block): Add new argument TPOINT.
8271 Increase TPOINT->traceframe_usage.
8272 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8273 eval_tracepoint_agent_expr.
8274 (condition_true_at_tracepoint): Likewise.
8275 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8276 (agent_mem_read_string, agent_tsv_read): Likewise.
8277
85e00e85
YQ
82782013-01-16 Yao Qi <yao@codesourcery.com>
8279
8280 * linux-low.c (linux_resume_one_lwp): Don't check
8281 'lwp->bp_reinsert != 0'.
8282
4039cf45
JB
82832013-01-07 Joel Brobecker <brobecker@adacore.com>
8284 Pedro Alves <palves@redhat.com>
8285
8286 * lynx-low.c (ptrace_request_to_str): Define a temporary
8287 macro and use it to simplify this function's implementation.
8288
9044dee2
JB
82892013-01-07 Joel Brobecker <brobecker@adacore.com>
8290
8291 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8292 sets errno.
8293
e6352c8f
JB
82942013-01-07 Joel Brobecker <brobecker@adacore.com>
8295
8296 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8297
50681a27
JB
82982013-01-07 Joel Brobecker <brobecker@adacore.com>
8299
8300 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8301
3f6e77ef
JB
83022013-01-07 Joel Brobecker <brobecker@adacore.com>
8303
8304 * lynx-low.c (lynx_resume): Use the resume_info parameter
8305 to determine the ptid for the lynx_ptrace call, unless
8306 it is equal to minus_one_ptid, in which case we use the
8307 ptid of the current_inferior.
8308 (lynx_wait_1): After having received a thread create/exit
8309 event, resume the inferior's execution using the signaling
8310 thread's ptid, rather than the old ptid.
8311
7fda33ae
JB
83122013-01-07 Joel Brobecker <brobecker@adacore.com>
8313
8314 * lynx-low.c (lynx_resume): Delete variable ret.
8315
b9786c74
JB
83162013-01-01 Joel Brobecker <brobecker@adacore.com>
8317
8318 * gdbreplay.c (gdbreplay_version): Update copyright year.
8319 * server.c (gdbserver_version): Likewise.
8320
8b93d60f
JB
83212012-12-17 Joel Brobecker <brobecker@adacore.com>
8322
8323 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8324 new thread.
8325
037335a7
JB
83262012-12-17 Joel Brobecker <brobecker@adacore.com>
8327
8328 * lynx-low.c (ptrace_request_to_str): Add handling for
8329 PTRACE_GETTRACESIG.
8330
52d4cbd8
JB
83312012-12-17 Joel Brobecker <brobecker@adacore.com>
8332
8333 * lynx-low.c (lynx_attach): Delete variable new_process.
8334
ab8f6ca9
JB
83352012-12-17 Joel Brobecker <brobecker@adacore.com>
8336
8337 * lynx-low.c (lynx_create_inferior): Delete variable
8338 new_process.
8339
78cbc024
JB
83402012-12-17 Joel Brobecker <brobecker@adacore.com>
8341
8342 * lynx-low.c (ptrace_request_to_str): Do not handle
8343 PTRACE_GETTHREADLIST if this macro does not exist.
8344
14a00470
YQ
83452012-12-15 Yao Qi <yao@codesourcery.com>
8346
8347 * Makefile.in (OBS): Add notif.o.
8348 * notif.c, notif.h: New.
8349 * server.c: Include "notif.h".
8350 (struct vstop_notif) <next>: Remove.
8351 <base>: New field.
8352 (queue_stop_reply): Update.
8353 (push_event, send_next_stop_reply): Remove.
8354 (discard_queued_stop_replies): Update.
8355 (notif_stop): New variable.
8356 (handle_v_stopped): Remove.
8357 (handle_v_requests): Don't call handle_v_stopped. Call
8358 handle_ack_notif instead.
8359 (queue_stop_reply_callback): Call notif_event_enque instead
8360 of queue_stop_reply.
8361 (handle_status): Don't call send_next_stop_reply, call
8362 notif_write_event instead.
8363 (kill_inferior_callback): Likewise.
8364 (detach_or_kill_inferior_callback): Likewise.
8365 (main): Call initialize_notif.
8366 (process_serial_event): Call QUEUE_is_empty.
8367 (handle_target_event): Call notif_push instead of push event.
8368 * server.h (push_event): Remove declaration.
8369
61c125b9
TT
83702012-12-10 Tom Tromey <tromey@redhat.com>
8371
8372 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8373 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8374 macros.
8375 (.c.o): Rewrite.
8376 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8377 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8378 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8379 (amd64-linux-ipa.o, ax.o): Rewrite.
8380 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8381 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8382 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8383 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8384 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8385 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8386 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8387 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8388 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8389 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8390 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8391 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8392 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8393 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8394 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8395 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8396 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8397 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8398 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8399 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8400 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8401 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8402 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8403 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8404 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8405 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8406 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8407 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8408 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8409 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8410 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8411 (reg-tilegx.o): Remove.
8412 (all_object_files): New macro.
8413 Include .deps files.
8414 * aclocal.m4, configure: Rebuild.
8415 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8416 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8417 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8418
e90e9ad9
TT
84192012-12-05 Tom Tromey <tromey@redhat.com>
8420
8421 PR gdb/14917:
8422 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8423
02d403bf 84242012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8425
8426 * configure.ac: Check for linux/perf_event.h.
8427 * config.in: Regenerated.
8428 * configure: Regenerated.
8429
0270a750
PA
84302012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8431
8432 * hostio.c (handle_readlink): Decrease buffer size
8433 parameter passed to readlink by one byte.
8434
8c29b58e
YQ
84352012-11-26 Yao Qi <yao@codesourcery.com>
8436
8437 * configure.ac (build_warnings): Append '-Wempty-body'.
8438 * configure: Regenerated.
8439 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8440 body.
8441
8bdce1ff
PM
84422012-11-15 Pierre Muller <muller@sourceware.org>
8443
8444 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8445 * config.in: Regenerate.
8446 * configure: Regenerate.
8447 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8448 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8449 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8450 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8451 header.
8452 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8453 instead of <sys/wait.h> header.
8454 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8455
02d403bf 84562012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8457
8458 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8459 (various make rules): Remove -DGDBSERVER
8460
fbd5db48
YQ
84612012-11-09 Yao Qi <yao@codesourcery.com>
8462
8463 * spu-low.c (current_ptid): Move it to ..
8464 * gdbthread.h: ... here. New.
8465 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8466 * server.c (myresume, process_serial_event): Likewise.
8467 * thread-db.c (thread_db_find_new_threads): Likewise.
8468 * tracepoint.c (run_inferior_command): Likewise.
8469
b3dc46ff
AB
84702012-10-01 Andrew Burgess <aburgess@broadcom.com>
8471
8472 * server.c (handle_search_memory_1): Include access length in
8473 warning message.
8474
07c04788
HPN
84752012-09-05 Michael Brandt <michael.brandt@axis.com>
8476
8477 * linux-crisv32-low.c: Fix compile errors.
8478
918d227b
YQ
84792012-09-04 Yao Qi <yao@codesourcery.com>
8480
8481 * tracepoint.c (cmd_qtsv): Adjust debug message.
8482 Don't check CUR_TPOINT.
8483
18c1b81a
YQ
84842012-08-28 Yao Qi <yao@codesourcery.com>
8485
8486 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8487 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8488 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8489 Remove declarations of xmalloc, xreallloc, xstrdup and
8490 freeargv.
8491 * Makefile.in (libiberty_h): New.
8492 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8493 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8494
dc82f37b
YQ
84952012-08-23 Yao Qi <yao@codesourcery.com>
8496
8497 * server.h: Remove declaration of 'xsnprintf'.
8498
406b1477
KS
84992012-08-22 Keith Seitz <keiths@redhat.com>
8500
8501 * server.h: Include build-gnulib-gbserver/config.h.
8502 * gdbreplay.c: Likewise.
8503
e6712ff1
DE
85042012-08-08 Doug Evans <dje@google.com>
8505
8506 * Makefile.in (SFILES): Add gdb_vecs.c.
8507 (OBS): Add gdb_vecs.o.
8508 (gdb_vecs_h, host_defs_h): New variables.
8509 (thread-db.o): Add $(gdb_vecs_h) dependency.
8510 (gdb_vecs.o): New rule.
8511 * thread-db.c: #include "gdb_vecs.h".
8512 (thread_db_load_search): Use a vector to iterate over path elements.
8513 Handle text appearing after "$pdir".
8514
8515 * configure.ac: Add check for strstr.
8516 * config.in: Regenerate.
8517 * configure: Regenerate.
8518
7c3270ae
UW
85192012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8520
8521 * hostio.c (handle_pread): If pread fails, fall back to attempting
8522 lseek/read.
8523 (handle_pwrite): Likewise for pwrite.
8524
b62e2b27
UW
85252012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8526
8527 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8528 between unsupported TYPE and unimplementable ADDR/LEN combination.
8529 (arm_insert_point): Act on new return value.
8530
78a99e91
PA
85312012-07-31 Pedro Alves <palves@redhat.com>
8532
8533 * server.c (process_point_options): Only skip tokens if we find
8534 one that is unrecognized. Don't treat 'X' specially while
8535 skipping unrecognized tokens.
8536
fcf303ab
UW
85372012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8538
8539 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8540 to 4-byte-align HW breakpoint addresses for Thumb.
8541
7255706c
YQ
85422012-07-27 Yao Qi <yao@codesourcery.com>
8543
8544 PR remote/14161.
8545
8546 * server.h: Declare gdb_agent_about_to_close.
8547 * target.c (kill_inferior): Include "agent.h".
8548 New. Send command 'kill'.
8549 * target.h (kill_inferior): Removed macro.
8550 * tracepoint.c (gdb_agent_about_to_close): New.
8551 (gdb_agent_helper_thread): Handle command 'close'.
8552 Wait endlessly until the inferior stops.
8553 Install gdb_agent_remove_socket to atexit hook.
8554 (agent_socket_name): New static variable.
8555 (gdb_agent_socket_init): Replace local variable 'name' with
8556 'agent_socket_name'.
8557 (gdb_agent_remove_socket): New.
8558
5a3f286f
YQ
85592012-07-27 Yao Qi <yao@codesourcery.com>
8560
8561 * server.c (process_point_options): Stop at 'X' when parsing.
8562
961bd387
ME
85632012-07-19 Michael Eager <eager@eagercon.com>
8564
a261b8f5 8565 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8566 to hw_execute.
8567 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8568 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8569 hardware breakpoint.
8570
aa7c7447
JK
85712012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8572
8573 * gdbserver/linux-low.c (initialize_low): Call
8574 linux_ptrace_init_warnings.
8575
7f216e7c
DE
85762012-07-02 Doug Evans <dje@google.com>
8577
8578 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8579 pointer to int.
8580
d3ce09f5
SS
85812012-07-02 Stan Shebs <stan@codesourcery.com>
8582
8583 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8584 (ax.o): Add it to build rule.
8585 (ax-ipa.o): Ditto.
8586 (OBS): Add format.o.
8587 (IPA_OBS): Add format.o.
8588 * server.c (handle_query): Claim support for breakpoint commands.
8589 (process_point_options): Add command case.
8590 (process_serial_event): Leave running if there are printfs in
8591 effect.
8592 * mem-break.h (any_persistent_commands): Declare.
8593 (add_breakpoint_commands): Declare.
8594 (gdb_no_commands_at_breakpoint): Declare.
8595 (run_breakpoint_commands): Declare.
8596 * mem-break.c (struct point_command_list): New struct.
8597 (struct breakpoint): New field command_list.
8598 (any_persistent_commands): New function.
8599 (add_commands_to_breakpoint): New function.
8600 (add_breakpoint_commands): New function.
8601 (gdb_no_commands_at_breakpoint): New function.
8602 (run_breakpoint_commands): New function.
8603 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8604 locally.
8605 * ax.c: Include format.h.
8606 (ax_printf): New function.
8607 (gdb_eval_agent_expr): Add printf opcode.
8608
2f8f6aed
YQ
86092012-06-13 Yao Qi <yao@codesourcery.com>
8610
8611 * server.c (start_inferior): Remove duplicated writes to fields
8612 'last_resume_kind' and 'last_status' of 'current_inferior'.
8613
0c9070b3
YQ
86142012-06-12 Yao Qi <yao@codesourcery.com>
8615 Pedro Alves <palves@redhat.com>
8616
8617 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8618 comment.
8619 * server.c (handle_v_cont): Extend comment.
8620
c52daf70
YQ
86212012-06-11 Yao Qi <yao@codesourcery.com>
8622
8623 * linux-low.c (linux_attach): Add 'static'.
8624
d38bbb0a
YQ
86252012-06-06 Yao Qi <yao@codesourcery.com>
8626
8627 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8628
89dc0afd
JK
86292012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8630
8631 Fix gcc -flto compilation warning.
8632 * server.c (main): Make variable multi_mode and attach volatile.
8633
75f62ce7
TJB
86342012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8635
8636 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8637 if the platform doesn't know about it.
8638
65f479b6
PA
86392012-05-30 Jeff Kenton <jkenton@tilera.com>
8640
8641 * Makefile.in (SFILES): Add linux-tile-low.c.
8642 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8643 * configure.srv: Handle tilegx-*-linux*.
8644 * linux-tile-low.c: New file.
8645
0c5bf5a9
JK
86462012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8647
8648 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8649
a493e3e2
PA
86502012-05-24 Pedro Alves <palves@redhat.com>
8651
8652 PR gdb/7205
8653
43aaf8b6 8654 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8655
2ea28649
PA
86562012-05-24 Pedro Alves <palves@redhat.com>
8657
8658 PR gdb/7205
8659
8660 Replace target_signal with gdb_signal throughout.
8661
8d409d16
MR
86622012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8663
8664 * linux-low.c (linux_store_registers): Avoid the copying sequence
8665 when no data has been retrieved by ptrace.
8666
23512c01
MGD
86672012-05-22 Will Deacon <will.deacon@arm.com>
8668
8669 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8670 Include asm/ptrace.h.
8671 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8672 already defined.
8673
4934b29e
MR
86742012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8675
8676 * linux-low.c (linux_store_registers): Don't re-retrieve data
8677 with ptrace that has already been obtained from /proc. Always
8678 copy any data retrieved with ptrace to the buffer supplied.
8679
bde24c0a
PA
86802012-05-11 Yao Qi <yao@codesourcery.com>
8681 Pedro Alves <palves@redhat.com>
8682
8683 * linux-low.c (enum stopping_threads_kind): New.
8684 (stopping_threads): Change type to `enum stopping_threads_kind'.
8685 (handle_extended_wait): If stopping and suspending threads, leave
8686 the new_lwp suspended too.
8687 (linux_wait_for_event): Adjust.
8688 (stop_all_lwps): Set `stopping_threads' to
8689 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8690 whether we're suspending threads or just stopping them. Assert no
8691 recursion happens.
8692
623b6bdf
YQ
86932012-04-29 Yao Qi <yao@codesourcery.com>
8694
8695 * server.h: Move some code to ...
8696 * gdbthread.h: ... here. New.
8697 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8698 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8699 (nto-low.o, win32-low.o): Likewise.
8700 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8701 * regcache.c, remote-utils.c, server.c: Likewise.
8702 * target.c, tracepoint.c, win32-low.c: Likewise.
8703
f15f9948
TJB
87042012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8705
8706 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8707 (PTRACE_ARG4_TYPE): Likewise.
8708 (PTRACE_XFER_TYPE): Likewise.
8709 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8710 ptrace to PTRACE_ARG3_TYPE.
8711 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8712 (PTRACE_ARG4_TYPE): Likewise.
8713 (PTRACE_XFER_TYPE): Likewise.
8714 (linux_detach_one_lwp): Cast fourth argument of
8715 ptrace to long then PTRACE_ARG4_TYPE.
8716 (regsets_fetch_inferior_registers): Cast third argument of
8717 ptrace to long then PTRACE_ARG3_TYPE.
8718 (regsets_store_inferior_registers): Likewise.
8719
38ea300a
PA
87202012-04-20 Pedro Alves <palves@redhat.com>
8721
8722 * configure: Regenerate.
8723
c971b7fa
PA
87242012-04-19 Pedro Alves <palves@redhat.com>
8725
43aaf8b6 8726 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8727 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8728 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8729 (all, install-only, uninstall, clean-info, all-lib, clean): No
8730 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8731 (maintainer-clean realclean distclean): Use subdir_do.
8732 (subdir_do): New.
8733 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8734 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8735 * acinclude.m4: Include acx_configure_dir.m4.
8736 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8737 calls. Call AC_PROG_RANLIB. Configure gnulib using
8738 ACX_CONFIGURE_DIR.
8739 (GNULIB): New.
8740 (GNULIB_STDINT_H): Adjust.
8741 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8742 * gdbreplay.c: Include build-gnulib/config.h.
8743 * server.h: Likewise.
8744 * aclocal.m4: Regenerate.
8745 * config.in: Regenerate.
8746 * configure: Regenerate.
c971b7fa 8747
809277f8
PA
87482012-04-19 Pedro Alves <palves@redhat.com>
8749
8750 * Makefile.in (LIBGNU, INCGNU): Adjust.
8751 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8752 (all, install-only, uninstall, clean-info, all-lib, clean)
8753 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8754 * configure.ac: Adjust AC_OUTPUT output.
8755 * aclocal.m4: Regenerate.
8756 * configure: Regenerate.
8757
fd9bb8b8
PA
87582012-04-19 Pedro Alves <palves@redhat.com>
8759
8760 * Makefile.in (generated_files): New.
8761 (server_h): Remove the explicit dependency on config.h, and depend
8762 on $generated_files.
8763
1c298c66
PA
87642012-04-19 Pedro Alves <palves@redhat.com>
8765
8766 * Makefile.in (INCGNU): Add -Ignulib.
8767
57c4b50b
PA
87682012-04-19 Pedro Alves <palves@redhat.com>
8769
8770 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8771 (INCGNU): ... this, and spell out -I here.
8772 (GNULIB_LIB): Rename to ...
8773 (LIBGNU): ... this.
8774 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8775
1030e047
PA
87762012-04-19 Pedro Alves <palves@redhat.com>
8777
8778 * config.in: Regenerate.
8779
447d4319
PA
87802012-04-19 Pedro Alves <palves@redhat.com>
8781
8782 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8783 * server.h (memmem): Remove declaration.
8784 * config.in: Regenerate.
8785 * configure: Regenerate.
8786
aad9eab9
YQ
87872012-04-19 Yao Qi <yao@codesourcery.com>
8788
8789 * Makefile.in (SFILES): Add common/vec.c.
8790 (OBS): Add vec.o.
8791 (vec.o): New rule.
8792
3e10640f
YQ
87932012-04-19 Yao Qi <yao@codesourcery.com>
8794
8795 * remote-utils.c (prepare_resume_reply): Replace with macro
8796 target_core_of_thread.
8797 * server.c (handle_qxfer_threads_proper): Likewise.
8798 * target.h (traget_core_of_thread): New macro.
8799
71622373
PA
88002012-04-18 Pedro Alves <palves@redhat.com>
8801
8802 * aclocal.m4: Regenerate.
8803 * configure: Regenerate.
8804
80d26939
YQ
88052012-04-16 Yao Qi <yao@codesourcery.com>
8806
8807 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8808 duplicated on address.
8809
42476b70
YQ
88102012-04-16 Yao Qi <yao@codesourcery.com>
8811
8812 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8813 (struct tracepoint_action_ops) <send>: New field.
8814 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8815 (agent_expr_send, x_tracepoint_action_send): New.
8816 (l_tracepoint_action_send): New.
8817 (cmd_qtdp): Download and install tracepoint
8818 according to `use_agent'.
8819 (run_inferior_command): Add one more parameter `len'.
8820 Update callers.
8821 (tracepoint_send_agent): New.
8822 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8823
7bc83639
YQ
88242012-04-16 Yao Qi <yao@codesourcery.com>
8825
8826 * tracepoint.c (download_tracepoints): Moved to ...
8827 (cmd_qtstart): ... here.
8828
5f18041e
YQ
88292012-04-14 Yao Qi <yao@codesourcery.com>
8830
8831 * tracepoint.c: Include inttypes.h.
8832 (struct collect_memory_action): Use sized types.
8833 (struct tracepoint): Likewise.
8834 (cmd_qtdp, stop_tracing): Update print specifiers.
8835 (cmd_qtp, response_tracepoint): Likewise.
8836 (collect_data_at_tracepoint): Likewise.
8837 (collect_data_at_step): Likewise.
8838
55a8c076
YQ
88392012-04-14 Yao Qi <yao@codesourcery.com>
8840
8841 Import gnulib module inttypes.
8842 * aclocal.m4, config.in, configure: Regenerated.
8843
dc750257
YQ
88442012-04-14 Yao Qi <yao@codesourcery.com>
8845
8846 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8847 Makefile and config.status at last.
8848
0ab5faf9
YQ
88492012-04-13 Yao Qi <yao@codesourcery.com>
8850
8851 * tracepoint.c: Include stdint.h unconditionally.
8852
18f5fd81
TJB
88532012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8854
8855 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8856 on BFD_HAVE_SYS_PROCFS_TYPE.
8857 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8858 * configure: Regenerate.
8859 * config.in: Likewise.
8860
4d47af5c
L
88612012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8862
8863 * Makefile.in (clean): Also remove x32.c x32-linux.c
8864 x32-avx.c x32-avx-linux.c.
8865 (x32.o): New target.
8866 (x32.c): Likewise.
8867 (x32-linux.o): Likewise.
8868 (x32-linux.c): Likewise.
8869 (x32-avx.o): Likewise.
8870 (x32-avx.c): Likewise.
8871 (x32-avx-linux.o): Likewise.
8872 (x32-avx-linux.c): Likewise.
8873
8874 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8875 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8876 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8877 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8878 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8879 i386/x32-avx-linux.xml.
8880
8881 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8882 (init_registers_x32_avx_linux): Likwise.
8883 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8884 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8885
ecedbe58
PA
88862012-04-13 Pedro Alves <palves@redhat.com>
8887
8888 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8889 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8890 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8891 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8892 the sub-make.
8893
c92b5177
L
88942012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8895
8896 * linux-x86-low.c (compat_x32_clock_t): New.
8897 (compat_x32_siginfo_t): Likewise.
8898 (compat_x32_siginfo_from_siginfo): Likewise.
8899 (siginfo_from_compat_x32_siginfo): Likewise.
8900 (linux_is_elf64): Likewise.
8901 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8902 and siginfo_from_compat_x32_siginfo for x32.
8903 (x86_arch_setup): Set linux_is_elf64.
8904
214d508e
L
89052012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8906
8907 PR gdb/13969
8908 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8909 e_machine field.
8910 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8911 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8912 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8913 compatible with process.
8914
c9a1864a
YQ
89152012-04-12 Yao Qi <yao@codesourcery.com>
8916
8917 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8918 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8919 (install-only, install-info, clean): Handle sub dir gnulib.
8920 (all-lib, am--refresh): New targets.
8921 (memmem.o): Remove target.
8922 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8923 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8924 (AC_REPLACE_FUNCS): Remove memmem.
8925 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8926 (AC_OUTPUT): Generate Makefile in gnulib/.
8927 * aclocal.m4, config.in, configure: Regenerated.
8928
367ba2c2
MR
89292012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8930
8931 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8932
9d236627
PA
89332012-04-05 Pedro Alves <palves@redhat.com>
8934
8935 -Werror=strict-aliasing
8936
8937 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8938 pointer.
8939
111217b3
PA
89402012-04-04 Pedro Alves <palves@redhat.com>
8941
8942 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8943 (sparc_store_gregset_from_stack, sparc_store_gregset)
8944 (sparc_breakpoint_at): Fix formatting.
8945
8365dcf5
TJB
89462012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8947
8948 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8949 are available.
8950 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8951 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8952 * config.in: Regenerate.
8953 * configure: Likewise.
8954
689cc2ae
PA
89552012-03-29 Pedro Alves <palves@redhat.com>
8956
8957 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8958 Correct ptrace arguments.
8959
c14dfd32
PA
89602012-03-28 Pedro Alves <palves@redhat.com>
8961
8962 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8963 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8964 (IA64_FR1_REGNUM): New defines.
8965 (ia64_fetch_register): New.
8966 (the_low_target): Install it.
8967 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8968 field.
8969 * linux-low.c (linux_fetch_registers): Try the
8970 the_low_target.fetch_register hook first.
8971
8972 * linux-arm-low.c (the_low_target): Adjust.
8973 * linux-bfin-low.c (the_low_target): Adjust.
8974 * linux-cris-low.c (the_low_target): Adjust.
8975 * linux-crisv32-low.c (the_low_target): Adjust.
8976 * linux-m32r-low.c (the_low_target): Adjust.
8977 * linux-m68k-low.c (the_low_target): Adjust.
8978 * linux-mips-low.c (the_low_target): Adjust.
8979 * linux-ppc-low.c (the_low_target): Adjust.
8980 * linux-s390-low.c (the_low_target): Adjust.
8981 * linux-sh-low.c (the_low_target): Adjust.
8982 * linux-sparc-low.c (the_low_target): Adjust.
8983 * linux-tic6x-low.c (the_low_target): Adjust.
8984 * linux-x86-low.c (the_low_target): Adjust.
8985 * linux-xtensa-low.c (the_low_target): Adjust.
8986
63c88e13
PA
89872012-03-26 Pedro Alves <palves@redhat.com>
8988
8989 * server.c (handle_qxfer_libraries): Don't bail early if
8990 the_target->qxfer_libraries_svr4 is not NULL.
8991
fb723180
PA
89922012-03-26 Pedro Alves <palves@redhat.com>
8993
8994 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8995
0afae3cf
PA
89962012-03-23 Pedro Alves <palves@redhat.com>
8997
8998 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8999 "library-list-svr4" element's start tag when the the DSO list is
9000 empty.
9001
485f1ee4
PA
90022012-03-23 Pedro Alves <palves@redhat.com>
9003
9004 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9005 a variable whose type size is the same as the inferior's pointer
9006 size.
9007
a5362b9a
TS
90082012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9009
9010 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9011 struct siginfo.
9012 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9013 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9014 * linux-low.h: Include <signal.h>.
9015 (struct siginfo): Remove forward declaration.
9016 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9017 struct siginfo.
9018
d226c142
MF
90192012-03-21 Mike Frysinger <vapier@gentoo.org>
9020
9021 * .gitignore: Ignore more files.
9022
122f36ef
PA
90232012-03-19 Pedro Alves <palves@redhat.com>
9024 Jan Kratochvil <jan.kratochvil@redhat.com>
9025
9026 * server.c (cont_thread, general_thread): Add describing comments.
9027 (start_inferior): Clear `cont_thread'.
9028 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9029 of a process.
9030
fc3e5175
YQ
90312012-03-15 Yao Qi <yao@codesourcery.com>
9032
9033 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9034 handling to ...
9035 (cmd_qtdp): ... here.
9036
8d0d92cd
YQ
90372012-03-15 Yao Qi <yao@codesourcery.com>
9038
9039 * tracepoint.c (struct tracepoint_action_ops): New.
9040 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9041 (m_tracepoint_action_download): New.
9042 (r_tracepoint_action_download): New.
9043 (x_tracepoint_action_download): New.
9044 (l_tracepoint_action_download): New.
9045 (add_tracepoint_action): Install `action->ops' according type.
9046 (download_tracepoint_1): Move code `download' function pointer
9047 of various tracepoint_action_ops.
9048
87b0bb13
JK
90492012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9050
9051 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9052 linux_ptrace_attach_warnings.
9053
5f572dec
JK
90542012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9055
9056 * Makefile.in (linux-ptrace.o): New.
9057 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9058 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9059 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9060 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9061 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9062 of these targets.
9063 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9064
f4647387
YQ
90652012-03-08 Yao Qi <yao@codesourcery.com>
9066 Pedro Alves <palves@redhat.com>
9067
9068 Fix PR server/13392.
9069 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9070 offset of JMP insn.
9071 * tracepoint.c (remove_tracepoint): New.
9072 (cmd_qtdp): Call remove_tracepoint when failed to install.
9073
9b224c5e
PA
90742012-03-07 Pedro Alves <palves@redhat.com>
9075
9076 * linux-low.c (get_detach_signal): New.
9077 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9078 Pass on pending signals to PTRACE_DETACH. Check the result of the
9079 ptrace call.
9080 * server.c (program_signals, program_signals_p): New.
9081 (handle_general_set): Handle QProgramSignals.
9082 * server.h (program_signals, program_signals_p): Declare.
9083
e237a7e2
JK
90842012-03-05 Pedro Alves <palves@redhat.com>
9085 Jan Kratochvil <jan.kratochvil@redhat.com>
9086
9087 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9088 New comment why.
9089
5808517f
YQ
90902012-03-03 Yao Qi <yao@codesourcery.com>
9091
9092 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9093 agent_look_up_symbols.
9094
58b4daa5
YQ
90952012-03-03 Yao Qi <yao@codesourcery.com>
9096
9097 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9098 (linux-x86-low.o): Likewise.
9099 * server.h: Remove in_process_agent_loaded.
9100 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9101 common/agent.c.
9102 Update callers.
9103
8ffcbaaf
YQ
91042012-03-03 Yao Qi <yao@codesourcery.com>
9105
9106 * tracepoint.c (gdb_agent_capability): New global.
9107 (in_process_agent_loaded_ust): Renamed to
9108 `in_process_agent_supports_ust'.
9109 Update callers.
9110 (in_process_agent_supports_ust): Call agent_capability_check.
9111 (clear_installed_tracepoints): Assert that agent supports
9112 agent.
9113
d1feda86
YQ
91142012-03-03 Yao Qi <yao@codesourcery.com>
9115
9116 * linux-low.c (linux_supports_agent): New.
9117 (linux_target_ops): Initialize field `supports_agent' with
9118 linux_supports_agent.
9119 * target.h (struct target_ops) <supports_agent>: New.
9120 (target_supports_agent): New macro.
9121 * server.c (handle_general_set): Handle packet 'QAgent'.
9122 (handle_query): Send `QAgent+'.
9123 * Makefile.in (server.o): Depends on agent.h.
9124
2fa291ac
YQ
91252012-03-03 Yao Qi <yao@codesourcery.com>
9126
9127 * Makefile.in (OBS): Add agent.o.
9128 Add new rule for agent.o.
9129 Track dependence of tracepoint.c on agent.h.
9130 * tracepoint.c (run_inferior_command_1):
9131 (run_inferior_command): Call agent_run_command.
9132 (gdb_ust_connect_sync_socket): Deleted. Move it to
9133 common/agent.c.
9134 (resume_thread, stop_thread): Likewise.
9135 (gdb_ust_socket_init): Renamed to ...
9136 (gdb_agent_socket_init): ... New.
9137 (gdb_ust_thread): Renamed to ...
9138 (gdb_agent_helper_thread): ... New.
9139 (gdb_ust_init): Move some code to ...
9140 (gdb_agent_init): ... here. New.
9141 [HAVE_UST]: Call gdb_ust_init.
9142 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9143 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9144 * config.in, configure: Regenerated.
9145
05044653
PA
91462012-03-02 Pedro Alves <palves@redhat.com>
9147
9148 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9149 * linux-low.c (struct simple_pid_list): New.
9150 (stopped_pids): New a struct simple_pid_list pointer.
9151 (add_to_pid_list, pull_pid_from_list): New.
9152 (handle_extended_wait): Don't assume the first signal new children
9153 report is SIGSTOP. Adjust call to pull_pid_from_list.
9154 (linux_wait_for_lwp): Adjust.
9155
8d00225b
YQ
91562012-03-02 Yao Qi <yao@codesourcery.com>
9157
9158 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9159 debug log.
9160
19560ba5
YQ
91612012-03-02 Yao Qi <yao@codesourcery.com>
9162
9163 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9164 `stop_pc' and `tpoint'. Update caller.
9165
1faeff08
MR
91662012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9167
9168 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9169 * linux-low.c (use_linux_regsets): New macro.
9170 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9171 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9172 (linux_register_in_regsets): New function.
9173 (usr_fetch_inferior_registers): Skip registers covered by
9174 regsets.
9175 (usr_store_inferior_registers): Likewise.
9176 (usr_fetch_inferior_registers): New macro.
9177 (usr_store_inferior_registers): Likewise.
9178 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9179 (linux_store_registers): Likewise.
9180 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9181 prototype.
9182 (init_registers_mips64_dsp_linux): Likewise.
9183 (init_registers_mips_linux): New macro.
9184 (init_registers_mips_dsp_linux): Likewise.
9185 (mips_dsp_num_regs): Likewise.
9186 (DSP_BASE, DSP_CONTROL): New fallback macros.
9187 (mips_base_regs): New macro.
9188 (mips_regmap): Use it. Fix the size.
9189 (mips_dsp_regmap): New variable.
9190 (mips_dsp_regset_bitmap): Likewise.
9191 (mips_arch_setup): New function.
9192 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9193 than mips_regmap.
9194 (mips_cannot_store_register): Likewise.
9195 (the_low_target): Update .arch_setup, .num_regs and .regmap
9196 initializers. Add .regset_bitmap initializer.
9197 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9198 initializer.
9199 * linux-bfin-low.c (the_low_target): Likewise.
9200 * linux-cris-low.c (the_low_target): Likewise.
9201 * linux-crisv32-low.c (the_low_target): Likewise.
9202 * linux-ia64-low.c (the_low_target): Likewise.
9203 * linux-m32r-low.c (the_low_target): Likewise.
9204 * linux-m68k-low.c (the_low_target): Likewise.
9205 * linux-ppc-low.c (the_low_target): Likewise.
9206 * linux-s390-low.c (the_low_target): Likewise.
9207 * linux-sh-low.c (the_low_target): Likewise.
9208 * linux-sparc-low.c (the_low_target): Likewise.
9209 * linux-tic6x-low.c (the_low_target): Likewise.
9210 * linux-x86-low.c (the_low_target): Likewise.
9211 * linux-xtensa-low.c (the_low_target): Likewise.
9212 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9213 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9214 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9215 srv_xmlfiles.
9216 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9217 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9218
c03e6ccc
YQ
92192012-02-29 Yao Qi <yao@codesourcery.com>
9220 Pedro Alves <palves@redhat.com>
9221
9222 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9223 `step_over_finished' is true.
9224
644cebc9
PA
92252012-02-27 Pedro Alves <palves@redhat.com>
9226
9227 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9228 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9229
c14d7ab2
PA
92302012-02-27 Pedro Alves <palves@redhat.com>
9231
9232 PR server/9684
9233 * linux-low.c (pid_is_stopped): New.
9234 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9235
412c89dd
LM
92362012-02-25 Luis Machado <lgustavo@codesourcery.com>
9237
9238 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9239 of conditions.
9240
b745defe
MR
92412012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9242
9243 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9244
9f3a5c85
LM
92452012-02-24 Luis Machado <lgustavo@codesourcery>
9246
9247 * server.c (handle_query): Advertise support for target-side
9248 breakpoint condition evaluation.
9249 (process_point_options): New function.
9250 (process_serial_event): When inserting a breakpoint, check for
9251 a target-side condition that should be evaluated.
9252
9253 * mem-break.c: Include regcache.h and ax.h.
9254 (point_cond_list_t): New data structure.
9255 (breakpoint) <cond_list>: New field.
9256 (find_gdb_breakpoint_at): Make non-static.
9257 (delete_gdb_breakpoint_at): Clear any target-side
9258 conditions.
9259 (clear_gdb_breakpoint_conditions): New function.
9260 (add_condition_to_breakpoint): Likewise.
9261 (add_breakpoint_condition): Likewise.
9262 (gdb_condition_true_at_breakpoint): Likewise.
9263 (gdb_breakpoint_here): Return result directly instead
9264 of going through a local variable.
9265
9266 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9267 (clear_gdb_breakpoint_conditions): Likewise.
9268 (add_breakpoint_condition): Likewise.
9269 (gdb_condition_true_at_breakpoint): Likewise.
9270
9271 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9272 (need_step_over_p): Take target-side breakpoint condition into
9273 consideration.
9274
5e1dc496
LM
92752012-02-24 Luis Machado <lgustavo@codesourcery>
9276
9277 * server.h: Include tracepoint.h.
9278 (agent_mem_read, agent_get_trace_state_variable_value,
9279 agent_set_trace_state_variable_value,
9280 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9281 get_set_tsv_func_addr): New prototypes.
9282
9283 * ax.h: New include file.
9284 * ax.c: New source file.
9285
9286 * tracepoint.c: Include ax.h.
9287 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9288 agent_expr, eval_result_type): Move to ax.h.
9289 (parse_agent_expr): Rename to ...
9290 (gdb_parse_agent_expr): ... this, make it non-static and move
9291 to ax.h.
9292 (unparse_agent_expr) Rename to ...
9293 (gdb_unparse_agent_expr): ... this, make it non-static and move
9294 to ax.h.
9295 (eval_agent_expr): Rename to ...
9296 (eval_tracepoint_agent_expr): ... this.
9297 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9298 forward declarations.
9299 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9300 (agent_get_trace_state_variable_value): New function.
9301 (agent_set_trace_state_variable_value): New function.
9302 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9303 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9304 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9305 (condition_true_at_tracepoint): Likewise.
9306 (parse_agent_expr): Rename to ...
9307 (gdb_parse_agent_expr): ... this and move to ax.c.
9308 (unparse_agent_expr): Rename to ...
9309 (gdb_unparse_agent_expr): ... this and move to ax.c.
9310 (gdb_agent_op_name): Move to ax.c.
9311 (eval_agent_expr): Rename to ...
9312 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9313 and move to ax.c.
9314 (eval_tracepoint_agent_expr): New function.
9315 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9316 non-static.
5e1dc496
LM
9317 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9318 ax.c.
9319 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9320 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9321 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9322 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9323 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9324 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9325 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9326 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9327 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9328 (compile_bytecodes): Remove forward declaration.
9329 (is_goto_target): Move to ax.c.
9330 (compile_bytecodes): Move to ax.c and call
9331 agent_get_trace_state_variable_value (...) and
9332 agent_set_trace_state_variable_value (...).
9333
9334 * Makefile.in: Update ax.c and IPA dependencies.
9335
277e4e52
PA
93362012-02-24 Pedro Alves <palves@redhat.com>
9337
9338 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9339 (cmd_bigqtbuffer_circular): ... this. Only handle
9340 'QTBuffer:circular:'.
9341 (handle_tracepoint_general_set): Adjust.
9342
bf4c19f7
YQ
93432012-02-16 Yao Qi <yao@codesourcery.com>
9344
9345 * inferiors.c: Move code to ...
9346 * dll.c: .... here. New.
9347 * server.h: Declare clear_dlls.
9348 * Makefile.in (SFILES): Add dll.c.
9349 (OBS): Add dll.o
9350 (dll.o): New rule.
9351
d73f2619
YQ
93522012-02-11 Yao Qi <yao@codesourcery.com>
9353
9354 * server.c: (handle_monitor_command): Add a new parameter
9355 `own_buf'.
9356 (handle_query): Update caller.
9357
f8255c2a
JB
93582012-02-09 Joel Brobecker <brobecker@adacore.com>
9359
9360 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9361 * configure, config.in: Regenerate.
9362 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9363 is not defined.
9364
da84f473
PA
93652012-02-02 Pedro Alves <palves@redhat.com>
9366
9367 Try SIGKILL first, then PTRACE_KILL.
9368 * linux-low.c (linux_kill_one_lwp): New.
9369 (linux_kill_one_lwp): Rename to ...
9370 (kill_one_lwp_callback): ... this. Use the new
9371 linux_kill_one_lwp.
9372
e886a173
PA
93732012-02-02 Pedro Alves <palves@redhat.com>
9374
9375 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9376 inferior.
9377
be07f1a2
PA
93782012-01-27 Pedro Alves <palves@redhat.com>
9379
9380 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9381 (elf_64_file_p): Make static.
9382 (linux_pid_exe_is_elf_64_file): New.
9383 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9384 Delete declarations.
9385 (linux_pid_exe_is_elf_64_file): Declare.
9386 * linux-x86-low.c (x86_arch_setup): Use
9387 linux_pid_exe_is_elf_64_file.
9388
d8301ad1
JK
93892012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9390
9391 * linux-low.c (linux_wait_for_event_1): Rename to ...
9392 (linux_wait_for_event): ... here and merge it with former
9393 linux_wait_for_event - new variable wait_ptid, use it.
9394 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9395
01b17894
PA
93962012-01-23 Pedro Alves <palves@redhat.com>
9397
9398 * server.c (main): Avoid yet another case of infinite loop while
9399 detaching/killing after a longjmp.
9400
e825046f
JK
94012012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9402
9403 Code cleanup.
9404 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9405
b9e7b9c3
UW
94062012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9407
9408 * hostio.c (handle_readlink): New function.
9409 (handle_vFile): Call it to handle "vFile:readlink" packets.
9410
901f9912
UW
94112012-01-20 Pedro Alves <palves@redhat.com>
9412 Ulrich Weigand <ulrich.weigand@linaro.org>
9413
9414 * server.c (handle_v_requests): Only support vAttach and vRun to
9415 start multiple processes when in extended protocol mode.
9416
fc1ab1a0
PA
94172012-01-17 Pedro Alves <palves@redhat.com>
9418
9419 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9420 memalign plus mprotect to allocate the scratch buffer.
9421
7d5d4e98
PA
94222012-01-13 Pedro Alves <palves@redhat.com>
9423
9424 * server.c (attach_inferior): Clear `cont_thread'.
9425
f128d5e9
PA
94262012-01-13 Pedro Alves <palves@redhat.com>
9427
9428 * server.c (main): Avoid infinite loop while detaching/killing
9429 after a longjmp.
9430
06db92f0
DE
94312012-01-09 Doug Evans <dje@google.com>
9432
9433 * server.c (start_inferior): Set last_ptid in --wrapper case.
9434
32d92999
YQ
94352012-01-06 Yao Qi <yao@codesourcery.com>
9436
9437 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9438 defined.
9439 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9440
5e0a92a9
YQ
94412012-01-04 Yao Qi <yao@codesourcery.com>
9442
9443 * tracepoint.c (cmd_qtdp): Print debug message
9444 for static tracepoint.
9445
ae639e8c
YQ
94462012-01-04 Yao Qi <yao@codesourcery.com>
9447
9448 * tracepoint.c (trace_vdebug): Differentiate debug message
9449 between gdbserver and IPA.
9450
f72429c5
YQ
94512012-01-03 Yao Qi <yao@codesourcery.com>
9452
9453 * tracepoint.c (tracepoint_was_hit): Don't collect for
9454 static tracepoint.
9455
12c3e59c
JB
94562012-01-02 Joel Brobecker <brobecker@adacore.com>
9457
9458 * terminal.h: Reformat copyright header.
9459
67827812
JB
94602012-01-02 Joel Brobecker <brobecker@adacore.com>
9461
9462 * server.c (gdbserver_version): Update copyright year.
9463 * gdbreplay.c (gdbreplay_version): Likewise.
9464
3e52c33d
JK
94652011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9466
9467 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9468
9469 Revert:
9470 2011-12-18 Hui Zhu <teawater@gmail.com>
9471 * linux-low.c (linux_create_inferior): Save return value to ret.
9472
66f1260e
HZ
94732011-12-18 Hui Zhu <teawater@gmail.com>
9474
9475 * linux-low.c (linux_create_inferior): Save return value to ret.
9476
e77616d7
DE
94772011-12-16 Doug Evans <dje@google.com>
9478
e7b06c57
DE
9479 * linux-low.c (linux_create_inferior): If stdio connection,
9480 redirect stdin from /dev/null, stdout to stderr.
9481 * remote-utils.c (remote_is_stdio): New static global.
9482 (remote_connection_is_stdio): New function.
9483 (remote_prepare): Handle stdio connection.
9484 (remote_open): Ditto.
9485 (remote_close): Don't close stdin for stdio connections.
9486 (read_prim,write_prim): New functions. Replace all calls to
9487 read/write to these.
9488 * server.c (main): Watch for "-" argument. Move call to
9489 remote_prepare before start_inferior.
9490 * server.h (STDIO_CONNECTION_NAME): New macro.
9491 (remote_connection_is_stdio): Declare.
9492
e77616d7
DE
9493 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9494 in debugging output.
9495
82067193
YQ
94962011-12-15 Yao Qi <yao@codesourcery.com>
9497
9498 * tracepoint.c: Include sys/syscall.h.
9499 (gdb_ust_thread): Remove preprocessor conditional.
9500
82bfbe7e
PA
95012011-12-14 Pedro Alves <pedro@codesourcery.com>
9502
9503 * linux-low.c (linux_detach_one_lwp): Call
9504 the_low_target.prepare_to_resume before detaching.
9505
712c6575
YQ
95062011-12-14 Yao Qi <yao@codesourcery.com>
9507
9508 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9509 of write.
9510
d54d1edf
YQ
95112011-12-14 Yao Qi <yao@codesourcery.com>
9512
9513 * i386-low.c (i386_low_stopped_data_address): Initialize local
9514 variable `control'.
9515
6210a125
PA
95162011-12-13 Pedro Alves <pedro@codesourcery.com>
9517
9518 PR remote/13492
9519
9520 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9521 DR_CONTROL unless necessary. Extend comments.
9522 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9523 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9524
2ece8244
YQ
95252011-12-13 Yao Qi <yao@codesourcery.com>
9526
9527 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9528 macros.
9529 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9530
784867a5
JK
95312011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9532
9533 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9534 Print new debug message for such case.
9535
6bf36717
JK
95362011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9537
9538 Fix overlapping memcpy.
9539 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9540 the read_inferior_memory transfer.
9541 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9542 write_inferior_memory transfer.
9543 (set_fast_tracepoint_jump): New variable buf. Use it for the
9544 read_inferior_memory and write_inferior_memory transfers.
9545 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9546 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9547 Use it for the write_inferior_memory transfer.
9548 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9549 buffers.
9550
50275556
MR
95512011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9552
9553 * linux-low.c (fetch_register, store_register): Make code
9554 consistent, fix formatting.
9555
7325beb4
MR
95562011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9557
9558 * linux-low.c (usr_store_inferior_registers): Factor out code
9559 to handle individual registers into...
9560 (store_register): ... this new function.
9561
c642a434
UW
95622011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9563
9564 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9565 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9566 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9567 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9568 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9569 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9570 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9571 (srv_xmlfiles): Add new XML files.
9572
9573 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9574 and <sys/uio.h>.
9575 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9576 (init_registers_s390_linux32v1): Add prototype.
9577 (init_registers_s390_linux32v2): Likewise.
9578 (init_registers_s390_linux64v1): Likewise.
9579 (init_registers_s390_linux64v2): Likewise.
9580 (init_registers_s390x_linux64v1): Likewise.
9581 (init_registers_s390x_linux64v2): Likewise.
9582 (s390_num_regs): Increment to 52.
9583 (s390_regmap): Add orig_r2 register.
9584 (s390_num_regs_3264): Increment to 68.
9585 (s390_regmap_3264): Add orig_r2 register.
9586 (s390_collect_ptrace_register): Handle orig_r2 register.
9587 (s390_supply_ptrace_register): Likewise.
9588 (s390_fill_last_break): New function.
9589 (s390_store_last_break): Likewise.
9590 (s390_fill_system_call): New function.
9591 (s390_store_system_call): Likewise.
9592 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9593 register sets.
9594 (s390_check_regset): New function.
9595 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9596 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9597 Update target_regsets for available register sets.
9598
2268b414
JK
95992011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9600 Jan Kratochvil <jan.kratochvil@redhat.com>
9601
9602 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9603 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9604 New.
9605 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9606 * linux-low.h (struct process_info_private): New member r_debug.
9607 * server.c (handle_qxfer_libraries): Call
9608 the_target->qxfer_libraries_svr4.
9609 (handle_qxfer_libraries_svr4): New function.
9610 (qxfer_packets): New entry "libraries-svr4".
9611 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9612 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9613 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9614 PACKET_qXfer_libraries_svr4.
9615
d6db1fab
UW
96162011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9617
9618 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9619 PSW address/mask between 8-byte and 16-byte formats.
9620 (s390_supply_ptrace_register): Likewise.
9621 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9622 basic addressing mode bit.
9623
242f5f1c
SS
96242011-11-24 Stan Shebs <stan@codesourcery.com>
9625
9626 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9627
f196051f
SS
96282011-11-17 Stan Shebs <stan@codesourcery.com>
9629
9630 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9631 (tracing_start_time): New global.
9632 (tracing_stop_time): New global.
9633 (tracing_user_name): New global.
9634 (tracing_notes): New global.
9635 (tracing_stop_note): New global.
9636 (cmd_qtstart): Set traceframe_usage, start_time.
9637 (stop_tracing): Set stop_time.
9638 (cmd_qtstatus): Report additional status.
9639 (cmd_qtp): New function.
9640 (handle_tracepoint_query): Call it.
9641 (cmd_qtnotes): New function.
9642 (handle_tracepoint_general_set): Call it.
9643 (get_timestamp): Rename from tsv_get_timestamp.
9644
405f8e94
SS
96452011-11-14 Stan Shebs <stan@codesourcery.com>
9646 Kwok Cheung Yeung <kcy@codesourcery.com>
9647
9648 * linux-x86-low.c (small_jump_insn): New.
9649 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9650 trampoline and error message, build a trampoline and issue a small
9651 jump instruction to it.
9652 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9653 trampoline and error message.
9654 (x86_get_min_fast_tracepoint_insn_len): New.
9655 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9656 * linux-low.h (struct linux_target_ops): Add arguments to
9657 install_fast_tracepoint_jump_pad operation, add new operation.
9658 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9659 arguments.
9660 (linux_get_min_fast_tracepoint_insn_len): New function.
9661 (linux_target_op): Add new operation.
9662 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9663 (gdb_trampoline_buffer_end): Ditto.
9664 (gdb_trampoline_buffer_error): Ditto.
9665 (struct ipa_sym_addresses): Add fields for new IPA variables.
9666 (symbol_list): Add entries for new IPA variables.
9667 (struct tracepoint): Add fields to hold the address range of the
9668 trampoline used by the tracepoint.
9669 (trampoline_buffer_head): New static variable.
9670 (trampoline_buffer_tail): Ditto.
9671 (claim_trampoline_space): New function.
9672 (have_fast_tracepoint_trampoline_buffer): New function.
9673 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9674 structure.
9675 (install_fast_tracepoint): Ditto, also add error buffer argument.
9676 (cmd_qtminftpilen): New function.
9677 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9678 (fast_tracepoint_from_trampoline_address): New function.
9679 (fast_tracepoint_collecting): Handle trampoline as part of jump
9680 pad space.
9681 (set_trampoline_buffer_space): New function.
9682 (initialize_tracepoint): Initialize new IPA variables.
9683 * target.h (struct target_ops): Add arguments to
9684 install_fast_tracepoint_jump_pad operation, add new
9685 get_min_fast_tracepoint_insn_len operation.
9686 (target_get_min_fast_tracepoint_insn_len): New.
9687 (install_fast_tracepoint_jump_pad): Add arguments.
9688 * server.h (IPA_BUFSIZ): Define.
9689 * linux-i386-ipa.c: Include extra header files.
9690 (initialize_fast_tracepoint_trampoline_buffer): New function.
9691 (initialize_low_tracepoint): Call it.
9692 * server.h (set_trampoline_buffer_space): Declare.
9693 (claim_trampoline_space): Ditto.
9694 (have_fast_tracepoint_trampoline_buffer): Ditto.
9695
1e4d1764
YQ
96962011-11-14 Yao Qi <yao@codesourcery.com>
9697
9698 * server.c (handle_query): Handle InstallInTrace for qSupported.
9699 * tracepoint.c (add_tracepoint): Sort list.
9700 (install_tracepoint, download_tracepoint): New.
9701 (cmd_qtdp): Call them to install and download tracepoints.
9702 (sort_tracepoints): Removed.
9703 (cmd_qtstart): Update.
9704
5c73ff4e
YQ
97052011-11-14 Yao Qi <yao@codesourcery.com>
9706
9707 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9708 * mem-break.h: Declare.
9709 * tracepoint.c (cmd_qtstart): Move some code to ...
9710 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9711 New.
9712 (download_tracepoints): Move some code to ...
9713 (download_tracepoint_1): ... here. New.
9714
86a30030
YQ
97152011-11-08 Yao Qi <yao@codesourcery.com>
9716
9717 * remote-utils.c (relocate_instruction): A comment fix.
9718
8d26e50c
JB
97192011-11-07 Joel Brobecker <brobecker@adacore.com>
9720
9721 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9722 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9723 dr_status_mirror and dr_control_mirror from debug_reg_state.
9724 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9725 (i386_initial_stuff): Remove use of deleted globals.
9726 (i386_get_thread_context, i386_set_thread_context,
9727 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9728 from debug_reg_state.
9729
a59306a3
YQ
97302011-11-05 Yao Qi <yao@codesourcery.com>
9731
9732 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9733 address as TPOINT's.
9734
3065dfb6
SS
97352011-11-02 Stan Shebs <stan@codesourcery.com>
9736
9737 * tracepoint.c (agent_mem_read_string): New function.
9738 (eval_agent_expr): Call it for tracenz.
9739 * server.c (handle_query): Report support for tracenz.
9740
fd0d8c7c
YQ
97412011-11-02 Yao Qi <yao@codesourcery.com>
9742
9743 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9744
609086b1
YQ
97452011-11-02 Yao Qi <yao@codesourcery.com>
9746
9747 * target.h: Fix a typo in comment.
9748
b9fd1791
PA
97492011-10-31 Pedro Alves <pedro@codesourcery.com>
9750
9751 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9752 clobber the breakpoints' shadows with fast tracepoint jumps.
9753 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9754 * target.c (write_inferior_memory): Also pass MYADDR down to
9755 check_mem_write.
9756
03583c20
UW
97572011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9758
9759 * configure.ac: Check support for personality routine.
9760 * configure: Regenerate.
9761 * config.in: Likewise.
9762 * linux-low.c: Include <sys/personality.h>.
9763 Define ADDR_NO_RANDOMIZE if necessary.
9764 (linux_create_inferior): Disable address space randomization when
9765 forking inferior, if requested.
9766 (linux_supports_disable_randomization): New function.
9767 (linux_target_ops): Install it.
9768 * server.h (disable_randomization): Declare.
9769 * server.c (disable_randomization): New global variable.
9770 (handle_general_set): Handle QDisableRandomization.
9771 (handle_query): Likewise for qSupported.
9772 (main): Support --disable-randomization and --no-disable-randomization
9773 command line arguments.
9774 * target.h (struct target_ops): Add supports_disable_randomization.
9775 (target_supports_disable_randomization): New macro.
9776
723b724b
MF
97772011-09-29 Mike Frysinger <vapier@gentoo.org>
9778
9779 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9780 ifdef check.
9781 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9782 [!PT_GETDSBT] (target_loadmap): New definition.
9783 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9784 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9785 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9786 and PT_GETDSBT to LINUX_LOADMAP.
9787 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9788 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9789
55329a5c 97902011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9791
9792 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9793 (arm_linux_hwbp_cap): New static variable.
9794 (arm_linux_get_hwbp_cap): Replace by ...
9795 (arm_linux_init_hwbp_cap): ... this new function.
9796 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9797 (arm_linux_get_hw_watchpoint_count): Likewise.
9798 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9799 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9800 (arm_prepare_to_resume): Use perror_with_name instead of error.
9801
55329a5c 98022011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9803
9804 * linux-arm-low.c: Include <signal.h>.
9805 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9806 (struct arm_linux_hwbp_cap): New data type.
9807 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9808 (struct arm_linux_hw_breakpoint): New data type.
9809 (MAX_BPTS, MAX_WPTS): Define.
9810 (struct arch_process_info, struct arch_lwp_info): New data types.
9811 (arm_linux_get_hwbp_cap): New function.
9812 (arm_linux_get_hw_breakpoint_count): Likewise.
9813 (arm_linux_get_hw_watchpoint_count): Likewise.
9814 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9815 (arm_hwbp_control_initialize): Likewise.
9816 (arm_hwbp_control_is_enabled): Likewise.
9817 (arm_hwbp_control_is_initialized): Likewise.
9818 (arm_hwbp_control_disable): Likewise.
9819 (arm_linux_hw_breakpoint_equal): Likewise.
9820 (arm_linux_hw_point_initialize): Likewise.
9821 (struct update_registers_data): New data structure.
9822 (update_registers_callback: New function.
9823 (arm_insert_point): Likewise.
9824 (arm_remove_point): Likewise.
9825 (arm_stopped_by_watchpoint): Likewise.
9826 (arm_stopped_data_address): Likewise.
9827 (arm_new_process): Likewise.
9828 (arm_new_thread): Likewise.
9829 (arm_prepare_to_resume): Likewise.
9830 (the_low_target): Register arm_insert_point, arm_remove_point,
9831 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9832 arm_new_thread, and arm_prepare_to_resume.
9833
6b9801d4
SS
98342011-09-15 Stan Shebs <stan@codesourcery.com>
9835
9836 * server.h (struct emit_ops): Add compare-goto fields.
9837 * tracepoint.c (gdb_agent_op_sizes): New table.
9838 (emit_eq_goto): New function.
9839 (emit_ne_goto): New function.
9840 (emit_lt_goto): New function.
9841 (emit_le_goto): New function.
9842 (emit_gt_goto): New function.
9843 (emit_ge_goto): New function.
9844 (is_goto_target): New function.
9845 (compile_bytecodes): Recognize special cases of compare-goto
9846 combinations and call specialized emitters for them.
9847 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9848 (amd64_emit_ne_goto): New function.
9849 (amd64_emit_lt_goto): New function.
9850 (amd64_emit_le_goto): New function.
9851 (amd64_emit_gt_goto): New function.
9852 (amd64_emit_ge_goto): New function.
9853 (amd64_emit_ops): Add the new functions.
9854 (i386_emit_eq_goto): New function.
9855 (i386_emit_ne_goto): New function.
9856 (i386_emit_lt_goto): New function.
9857 (i386_emit_le_goto): New function.
9858 (i386_emit_gt_goto): New function.
9859 (i386_emit_ge_goto): New function.
9860 (i386_emit_ops): Add the new functions.
9861
bf15cbda
SS
98622011-09-08 Stan Shebs <stan@codesourcery.com>
9863
9864 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9865 (i386_emit_epilogue): Restore %ebx.
9866
943ca1dd
JZ
98672011-08-31 Jie Zhang <jzhang918@gmail.com>
9868
9869 * server.c (step_thread): Remove definition.
9870 (process_serial_event): Don't handle Hs.
9871 * server.h (step_thread): Remove declaration.
9872 * target.c (set_desired_inferior): Remove use of step_thread.
9873
e3deef73
LM
98742011-08-24 Luis Machado <lgustavo@codesourcery.com>
9875
9876 * linux-low.c: Include linux-procfs.h.
9877 (linux_attach_lwp_1): Update comments.
9878 (linux_attach): Scan for existing threads when attaching to a
9879 process that is the tgid.
9880 * Makefile.in: Update dependencies.
9881
13da1c97
LM
98822011-08-24 Luis Machado <lgustavo@codesourcery.com>
9883
9884 * configure.srv: Add linux-procfs.o dependencies.
9885
881127c9
YQ
98862011-08-14 Yao Qi <yao@codesourcery.com>
9887
9888 * target.h (struct target_ops): Fix indent.
9889 * win32-low.c (win32_target_ops): Fix comment.
9890
58dbd541
YQ
98912011-08-14 Andrew Jenner <andrew@codesourcery.com>
9892 Yao Qi <yao@codesourcery.com>
9893
9894 * Makefile.in (clean): Remove tic6x-*.c files.
9895 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9896 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9897 (tic6x-c64xp-linux.c): Likewise.
9898 * configure.srv: Add support for tic6x-*-uclinux.
9899 * linux-tic6x-low.c: New.
9900 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9901
78d85199
YQ
99022011-08-14 Andrew Stubbs <ams@codesourcery.com>
9903 Yao Qi <yao@codesourcery.com>
9904
9905 * target.h (struct target_ops): Add read_loadmap.
9906 * linux-low.c (struct target_loadseg): New type.
9907 (struct target_loadmap): New type.
9908 (linux_read_loadmap): New function.
9909 (linux_target_ops): Add linux_read_loadmap.
9910 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9911 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9912 to NULL.
78d85199 9913
a959a88d
EZ
99142011-08-05 Eli Zaretskii <eliz@gnu.org>
9915
9916 * win32-low.c: Include <stdint.h>.
9917
1ced966e
PA
99182011-07-22 Pedro Alves <pedro@codesourcery.com>
9919
9920 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9921 to the inferior here.
9922 (i386_remove_aligned_watchpoint): Ditto.
9923 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9924 fit part of the watchpoint in the debug registers.
9925 (i386_update_inferior_debug_regs): New.
9926 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9927 registers, and only update the inferior on success.
9928 (i386_low_remove_watchpoint): Ditto.
9929
d26e3629
KY
99302011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9931
9932 * linux-low.c (compare_ints, unique, list_threads, show_process,
9933 linux_core_of_thread): Delete.
9934 (linux_target_ops): Change linux_core_of_thread to
9935 linux_common_core_of_thread.
9936 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9937 * utils.c (malloc_failure): Change type of argument.
9938 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9939 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9940 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9941 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9942 (IPA_OBJS): Add common-utils-ipa.o.
9943 (ptid_h, linux_osdata_h): New macros.
9944 (server_h): Add common/common-utils.h, common/xml-utils.h,
9945 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9946 common/ptid.h.
9947 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9948 ptid.o, buffer.o): New rules.
9949 (linux-low.o): Add common/linux-osdata.h as a dependency.
9950 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9951 * configure.ac: Add AC_HEADER_DIRENT check.
9952 * config.in: Regenerate.
9953 * configure: Regenerate.
9954 * remote-utils.c (xml_escape_text): Delete.
9955 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9956 buffer_xml_printf): Move to common/buffer.c.
9957 * server.c (main): Remove call to initialize_inferiors.
9958 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9959 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9960 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9961 internal_error, gdb_assert, gdb_assert_fail): Delete.
9962 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9963 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9964 common/buffer.h.
9965 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9966 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9967 initialize_inferiors): Delete.
9968
2275a1a7
PA
99692011-07-20 Pedro Alves <pedro@codesourcery.com>
9970
9971 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9972 symbol error.
9973
0a5b1e09
PA
99742011-05-31 Pedro Alves <pedro@codesourcery.com>
9975
9976 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9977 assertion.
9978 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9979
6938fd34
YQ
99802011-05-26 Yao Qi <yao@codesourcery.com>
9981
9982 * Makefile.in (thread-db.o): Track dependence to
9983 common/gdb_thread_db.h.
9984 * thread-db.c: include gdb_thread_db.h from right place.
9985
b481f9e0
TT
99862011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9987
9988 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9989 __FILE__ and __LINE__ to internal_error.
9990
98a5dd13
DE
99912011-05-13 Doug Evans <dje@google.com>
9992
9993 * thread-db.c (try_thread_db_load_from_sdir): New function.
9994 (try_thread_db_load_from_dir): New function.
9995 (thread_db_load_search): Handle $sdir, ignore $pdir.
9996 Remove trying of system directories if search of
9997 libthread-db-search-path fails, that is now done via $sdir.
9998
d248b706
KY
99992011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10000
10001 * server.c (handle_query): Add EnableDisableTracepoints to the list
10002 of supported features.
43aaf8b6 10003 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10004 tracepoints.
43aaf8b6
PA
10005 (cmd_qtenable_disable): New.
10006 (cmd_qtstart): Install tracepoints even if disabled.
10007 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10008 receiving a QTEnable or QTDisable packet.
10009 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10010 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10011 tracepoints.
10012 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10013
84e578fb
DE
100142011-05-10 Doug Evans <dje@google.com>
10015
10016 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10017
71f55dd8
DE
100182011-05-04 Doug Evans <dje@google.com>
10019
10020 * linux-low.c (linux_join): Skip process lookup.
10021 * spu-low.c (spu_join): Ditto.
10022 * server.c (join_inferiors_callback): Delete.
10023 (process_serial_event): For 'D' packet (detach) call join_inferior
10024 directly.
10025
4d393d60
JM
100262011-05-04 Joseph Myers <joseph@codesourcery.com>
10027
10028 * README: Don't mention xscale*-*-linux*.
10029 * configure.srv (xscale*-*-linux*): Don't handle target.
10030
b00ad6ff
NF
100312011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10032
10033 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10034 casting pointers.
10035 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10036 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10037 (i386_emit_void_call_2): Likewise.
10038
af96c192
YQ
100392011-04-26 Yao Qi <yao@codesourcery.com>
10040
43aaf8b6
PA
10041 * linux-low.c: Move common macros to linux-ptrace.h.
10042 Include linux-ptrace.h.
af96c192
YQ
10043 * Makefile.in (linux_ptrace_h): New.
10044 (linux-low.o): Depends on linux-ptrace.h.
10045
03f2bd59
JK
100462011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10047
10048 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10049 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10050 (remote_prepare): New function with most of the TCP code from ...
10051 (remote_open): ... here. Detect PORT here unconditionally. Move also
10052 setting transport_is_reliable.
10053 * server.c (run_once): New variable.
10054 (gdbserver_usage): Document it.
10055 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10056 the first run if RUN_ONCE.
10057 * server.h (run_once, remote_prepare): New declarations.
10058
7a9dd1b2
TT
100592011-04-19 Tom Tromey <tromey@redhat.com>
10060
10061 * win32-low.c (handle_load_dll): Remove duplicate "the".
10062
81239425
PM
100632011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10064
10065 Remove support for old Cygwin 1.5 versions.
10066 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10067 function to avoid warning.
10068 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10069 warning.
10070
9e0627f1
PM
100712011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10072
10073 * gdbserver/server.h (Macro _): Define it if not available.
10074
588eebee
MS
100752011-03-14 Michael Snyder <msnyder@vmware.com>
10076
348af9f7 10077 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10078
43f70d4c
JB
100792011-03-10 Joel Brobecker <brobecker@adacore.com>
10080
10081 * Makefile.in (maintainer-clean realclean distclean): Remove
10082 "make ... subdir_do" command.
10083
348af9f7
MS
100842011-03-10 Michael Snyder <msnyder@vmware.com>
10085
10086 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10087
10088 * server.c (handle_v_run): Free alloced buffer on early return.
10089
e637a4f5
YQ
100902011-03-09 Yao Qi <yao@codesourcery.com>
10091
10092 Revert:
10093 2011-03-04 Yao Qi <yao@codesourcery.com>
10094
10095 * Makefile.in: Remove GNU make feature --directory.
10096
10097 2011-03-05 Yao Qi <yao@codesourcery.com>
10098
10099 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10100 (subdir_do): New make target. Copied from gdb/Makefile.
10101 (maintainer-clean, realclean, distclean, clean): Call corresponding
10102 make targets in common/Makefile.
10103
10104 2011-02-11 Yao Qi <yao@codesourcery.com>
10105
10106 * configure.ac: Call AC_PROG_RANLIB.
10107 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10108 * configure: Regenerate.
10109
e6edda56
JK
101102011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10111
10112 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10113
e5141119
JB
101142011-03-06 Yao Qi <yao@codesourcery.com>
10115
10116 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10117
64794aa4
JB
101182011-03-05 Yao Qi <yao@codesourcery.com>
10119
10120 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10121 (subdir_do): New make target. Copied from gdb/Makefile.
10122 (maintainer-clean, realclean, distclean, clean): Call corresponding
10123 make targets in common/Makefile.
10124
7a762829
YQ
101252011-03-04 Yao Qi <yao@codesourcery.com>
10126
10127 * Makefile.in: Remove GNU make feature --directory.
10128
348af9f7
MS
101292011-03-04 Michael Snyder <msnyder@vmware.com>
10130
10131 * server.c (queue_stop_reply): Call xmalloc not malloc.
10132
101332011-03-02 Michael Snyder <msnyder@vmware.com>
10134
10135 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10136
9f72fee2
MS
101372011-02-28 Michael Snyder <msnyder@vmware.com>
10138
588eebee
MS
10139 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10140 (cmd_qtframe): Ditto.
10141 (cmd_qtbuffer): Ditto.
10142 (cmd_bigqtbuffer): Ditto.
10143
9f72fee2
MS
10144 * utils.c (decimal2str): Initialize 'width' to nine, then
10145 don't mess with it.
10146
8040bd49
UW
101472011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10148
10149 * hostio.c (require_data): Free *data, not data.
10150
7e52cbd0
JK
101512011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10152
10153 * hostio.c (require_data): Use free, not xfree.
10154
9130f83e
MS
101552011-02-27 Michael Snyder <msnyder@vmware.com>
10156
4b812f4e
MS
10157 * server.c (handle_query): Discard unused value.
10158
9130f83e
MS
10159 * hostio.c (require_data): Free malloc memory before returning
10160 error.
10161
69d37113
MS
101622011-02-26 Michael Snyder <msnyder@vmware.com>
10163
10164 * linux-low.c (list_threads): Call closedir for dirent.
10165
35f5825a
MS
101662011-02-27 Michael Snyder <msnyder@vmware.com>
10167
2a589cef
MS
10168 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10169 a case statement falls through.
10170
0adea5f7
MS
10171 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10172
35f5825a
MS
10173 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10174 in comparison.
10175
238f1c74
MS
101762011-02-26 Michael Snyder <msnyder@vmware.com>
10177
10178 * utils.c (decimal2str): Eliminate dead code and dead param.
10179 (pulongest): Drop dead param from call to decimal2str.
10180 (plongest): Ditto.
10181
633ff500
JB
101822011-02-24 Joel Brobecker <brobecker@adacore.com>
10183
10184 Revert the following patch (not approved yet):
10185 2011-02-21 Hui Zhu <teawater@gmail.com>
10186 * tracepoint.c (tp_printf): New function.
10187 (eval_agent_expr): Handle gdb_agent_op_printf.
10188
f9c6ff72
HZ
101892011-02-21 Hui Zhu <teawater@gmail.com>
10190
10191 * tracepoint.c (tp_printf): New function.
10192 (eval_agent_expr): Handle gdb_agent_op_printf.
10193
94d5e490
TT
101942011-02-18 Tom Tromey <tromey@redhat.com>
10195
10196 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10197 (tracepoint.o): Likewise.
10198 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10199 (gdb_agent_op_names): Likewise.
10200
c7f96d2b
TT
102012011-02-18 Tom Tromey <tromey@redhat.com>
10202
10203 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10204 gdb_agent_op_rot>: New constants.
10205 (gdb_agent_op_names): Add pick and roll.
10206 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10207 cases.
10208
0feedb2c
JK
102092011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10210
10211 * aclocal.m4: Regenerated with aclocal-1.11.1.
10212
b3b9301e
PA
102132011-02-14 Pedro Alves <pedro@codesourcery.com>
10214
10215 * server.c (handle_qxfer_traceframe_info): New.
10216 (qxfer_packets): Register "traceframe-info".
10217 (handle_query): Report support for qXfer:traceframe-info:read+.
10218 * tracepoint.c (match_blocktype): New.
10219 (traceframe_find_block_type): Rename to ...
10220 (traceframe_walk_blocks): ... this. Add callback filter argument,
10221 and use it.
10222 (traceframe_find_block_type): New, reimplemented on top of
10223 traceframe_walk_blocks.
10224 (build_traceframe_info_xml): New.
10225 (traceframe_read_info): New.
10226 * server.h (traceframe_read_info): Declare.
10227
4f3e6fb7
YQ
102282011-02-11 Yao Qi <yao@codesourcery.com>
10229
10230 * configure.ac: Call AC_PROG_RANLIB.
10231 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10232 * configure: Regenerate.
10233
764880b7
PA
102342011-02-07 Pedro Alves <pedro@codesourcery.com>
10235
10236 * server.c (gdb_read_memory): Change return semantics to allow
10237 partial transfers.
10238 (handle_search_memory_1): Adjust.
10239 (process_serial_event) <'m' packet>: Handle partial transfers.
10240 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10241
1c79eb8a
PA
102422011-01-28 Pedro Alves <pedro@codesourcery.com>
10243
10244 * regcache.c (init_register_cache): Initialize
10245 regcache->register_status.
10246 (free_register_cache): Release regcache->register_status.
10247 (regcache_cpy): Copy register_status.
10248 (registers_to_string): Print 'x's for unavailable registers.
10249 (supply_register): Mark the register's status valid or
10250 unavailable, depending on whether a buffer was passed in or not.
10251 (supply_register_zeroed): New.
10252 (supply_regblock): Mark the registers' status valid or
10253 unavailable, depending on whether a buffer was passed in or not.
10254 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10255 (struct regcache): New `register_status' field.
10256 (supply_register_zeroed): Declare.
10257 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10258 supply_register_zeroed, rather than passing a NULL buffer to
10259 supply_register.
10260 * tracepoint.c (fetch_traceframe_registers): Update comment.
10261
85724a0e
PA
102622011-01-28 Pedro Alves <pedro@codesourcery.com>
10263
10264 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10265 buffer explicit.
10266
d08aafef
PA
102672011-01-25 Pedro Alves <pedro@codesourcery.com>
10268
10269 * server.h (decode_xfer_write): Change prototype.
10270 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10271 and don't extract the annex here.
10272 * server.c (decode_xfer_read): Remove `annex' parameter,
10273 and don't extract the annex here.
10274 (decode_xfer): New.
10275 (struct qxfer): New.
10276 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10277 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10278 (handle_qxfer_statictrace): New functions, abstracted out from
10279 handle_query, and made to use the struct qxfer interface.
10280 (handle_threads_qxfer_proper): Rename to ...
10281 (handle_qxfer_threads_proper): ... this.
10282 (handle_threads_qxfer): Rename to ...
10283 (handle_qxfer_threads): ... this. Adjust.
10284 (qxfer_packets): New array.
10285 (handle_qxfer): New function.
10286 (handle_query): Use handle_qxfer.
10287
493e2a69
MS
102882011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10289
10290 * gdbreplay.c: Shorten lines of >= 80 columns.
10291 * linux-low.c: Ditto.
10292 * linux-ppc-low.c: Ditto.
10293 * linux-s390-low.c: Ditto.
10294 * linux-sparc-low.c: Ditto.
10295 * linux-x86-low.c: Ditto.
10296 * linux-xtensa-low.c: Ditto.
10297 * mem-break.c: Ditto.
10298 * nto-low.c: Ditto.
10299 * regcache.h: Ditto.
10300 * remote-utils.c: Ditto.
10301 * server.c: Ditto.
10302 * server.h: Ditto.
10303 * thread-db.c: Ditto.
10304 * tracepoint.c: Ditto.
10305 * utils.c: Ditto.
10306 * win32-low.h: Ditto.
10307
44944448
JB
103082011-01-05 Joel Brobecker <brobecker@adacore.com>
10309
10310 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10311 update.
10312
71ce852c
JB
103132011-01-01 Joel Brobecker <brobecker@adacore.com>
10314
10315 * server.c (gdbserver_version): Update copyright year in version
10316 output.
10317 * gdbreplay.c (gdbreplay_version): Ditto.
10318
eb826dc6
MF
103192010-12-29 Jie Zhang <jie.zhang@analog.com>
10320
10321 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10322 * linux-bfin-low.c: New file.
10323 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10324 PT_DATA_ADDR for BFIN targets.
10325 * Makefile.in (SFILES): Add linux-bfin-low.c.
10326 (clean): Remove reg-bfin.c.
10327 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10328 * README: Mention supported Blackfin targets.
10329
39ab222a
MF
103302010-12-23 Mike Frysinger <vapier@gentoo.org>
10331
10332 * .gitignore: New file.
10333
a1f2ce7d
MF
103342010-11-16 Mike Frysinger <vapier@gentoo.org>
10335
10336 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10337
f474844c
JZ
103382010-10-22 Jie Zhang <jie@codesourcery.com>
10339
10340 * Makefile.in: Add FLAGS_TO_PASS variable.
10341 (install): Remove dependency of install-only and recursively
10342 invoke make for install-only.
10343
f1048712
DE
103442010-10-04 Doug Evans <dje@google.com>
10345
10346 * Makefile.in (uninstall): Use $(DESTDIR).
10347
b53a1623
PA
103482010-09-24 Pedro Alves <pedro@codesourcery.com>
10349
e6ee044d
PA
10350 PR gdb/11842
10351
b53a1623
PA
10352 * linux-x86-low.c (compat_siginfo_from_siginfo)
10353 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10354 si_code is < 0. Check for si_code == SI_TIMER before checking for
10355 si_code < 0.
10356
fa1bd1e4
JB
103572010-09-13 Joel Brobecker <brobecker@adacore.com>
10358
10359 * lynx-i386-low.c: New file.
10360 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10361
47fac8f8
JB
103622010-09-13 Joel Brobecker <brobecker@adacore.com>
10363
10364 * lynx-low.c (ptrace_request_to_str): Remove handling for
10365 request values that have been removed in LynxOS 5.x.
10366
1adfc54d
JB
103672010-09-13 Joel Brobecker <brobecker@adacore.com>
10368
10369 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10370 <ptrace.h>
10371
c2a66c29
NS
103722010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10373
10374 * configure.ac: Add --enable-inprocess-agent option.
10375 * configure: Rebuilt.
10376
32fcada3
YQ
103772010-09-06 Yao Qi <yao@codesourcery.com>
10378
10379 * linux-low.c (linux_kill): Remove unused variable.
10380 (linux_stabilize_threads): Likewise.
10381 * server.c (start_inferior): Likewise.
10382 (queue_stop_reply_callback): Likewise.
10383 * tracepoint.c (do_action_at_tracepoint): Likewise.
10384
0cccb683
YQ
103852010-09-06 Yao Qi <yao@codesourcery.com>
10386
10387 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10388 on return.
10389
423ec54c
JK
103902010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10391
10392 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10393
12ac6819
PA
103942010-09-06 Pedro Alves <pedro@codesourcery.com>
10395
10396 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10397 "$(IPA_DEPFILES)".
10398
8ed54b31
JB
103992010-09-01 Joel Brobecker <brobecker@adacore.com>
10400
10401 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10402 gdbserver/lynx-ppc-low.c: New files.
10403 * Makefile.in (lynx_low_h): New variable.
10404 (lynx-low.o, lynx-ppc-low.o): New rules.
10405 * configure.ac: On LynxOS, link with -lnetinet.
10406 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10407 * configure: regenerate.
10408
bb0116a4
JB
104092010-09-01 Joel Brobecker <brobecker@adacore.com>
10410
10411 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10412 * configure.ac: Add check for vasprintf and vsnprintf.
10413 * configure, config.in: Regenerate.
10414 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10415
a778ab81 104162010-09-01 Joel Brobecker <brobecker@adacore.com>
10417
10418 * gdbreplay.c: Move include of alloca.h up, next to include of
10419 malloc.h.
10420 * server.h: Add include of malloc.h.
10421 * mem-break.c: Remove include of malloc.h.
10422 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10423
8b034a19 104242010-09-01 Joel Brobecker <brobecker@adacore.com>
10425
10426 * Makefile.in (memmem.o): Build with -Wno-error.
10427
104282010-09-01 Joel Brobecker <brobecker@adacore.com>
10429
10430 * utils.c (xsnprintf): Make non-static.
10431 * server.h: Add xsnprintf declaration.
10432 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10433 replace calls to snprintf by calls to xsnprintf throughout.
10434
104352010-09-01 Joel Brobecker <brobecker@adacore.com>
10436
10437 * configure.ac: Add configure check for alloca.
10438 * configure, config.in: Regenerate.
10439 * server.h: Include alloca.h if it exists.
10440 * gdbreplay.c: Include alloca.h if it exists.
10441
1a981360
PA
104422010-08-28 Pedro Alves <pedro@codesourcery.com>
10443
10444 * linux-low.c (__SIGRTMIN): Define if not already defined.
10445 (linux_create_inferior): Check for __ANDROID__ rather than
10446 __SIGRTMIN.
10447 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10448 are already deferred.
10449 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10450 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10451 stopped and already has a pending signal to report.
10452 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10453 a pending signal to report or is moving out of a jump pad.
10454 (linux_init_signals): Check for __ANDROID__ rather than
10455 __SIGRTMIN.
10456
b4d51a55
PA
104572010-08-28 Pedro Alves <pedro@codesourcery.com>
10458
10459 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10460 debug_threads check. Avoid a linear search when not doing debug
10461 output.
10462
ec48365d
PA
104632010-08-27 Pedro Alves <pedro@codesourcery.com>
10464
10465 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10466 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10467 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10468 (process_event): Change local fd's type to gdb_fildes_t.
10469 (create_file_handler): Adjust prototype.
10470 (delete_file_handler): Adjust prototype.
10471 (handle_file_event): Adjust prototype. Use pfildes.
10472 (create_file_event): Adjsut prototype.
10473 * remote-utils.c (remote_desc, listen_desc): Change type to
10474 gdb_fildes_t.
10475 * server.h: New gdb_fildes_t typedef.
10476 [USE_WIN32API]: Include winsock2.h.
10477 (delete_file_handler, add_file_handler): Adjust prototypes.
10478 (pfildes): Declare.
10479 * utils.c (pfildes): New.
10480
854d88f0
PA
104812010-08-27 Pedro Alves <pedro@codesourcery.com>
10482
10483 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10484 * configure: Regenerate.
10485
0146f85b
PA
104862010-08-27 Pedro Alves <pedro@codesourcery.com>
10487
10488 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10489 (linux_done_accessing_memory): ... this.
10490 (linux_target_ops): Adjust.
10491 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10492 * nto-low.c (nto_target_ops): Adjust comment.
10493 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10494 * spu-low.c (spu_target_ops): Adjust comment.
10495 * target.h (target_ops): Rename unprepare_to_access_memory field
10496 to done_accessing_memory.
10497 (unprepare_to_access_memory): Rename to ...
10498 (done_accessing_memory): ... this.
10499
90d74c30
PA
105002010-08-26 Pedro Alves <pedro@codesourcery.com>
10501
10502 * linux-low.c (linux_prepare_to_access_memory): New.
10503 (linux_unprepare_to_access_memory): New.
10504 (linux_target_ops): Install them.
10505 * server.c (read_memory): Rename to ...
10506 (gdb_read_memory): ... this. Use
10507 prepare_to_access_memory/prepare_to_access_memory.
10508 (write_memory): Rename to ...
10509 (gdb_write_memory): ... this. Use
10510 prepare_to_access_memory/prepare_to_access_memory.
10511 (handle_search_memory_1): Adjust.
10512 (process_serial_event): Adjust.
10513 * target.h (struct target_ops): New fields
10514 prepare_to_access_memory and unprepare_to_access_memory.
10515 (prepare_to_access_memory, unprepare_to_access_memory): New.
10516 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10517 prepare_to_access_memory/prepare_to_access_memory.
10518 * nto-low.c (nto_target_ops): Adjust.
10519 * spu-low.c (spu_target_ops): Adjust.
10520 * win32-low.c (win32_target_ops): Adjust.
10521
fd467969
PA
105222010-08-26 Pedro Alves <pedro@codesourcery.com>
10523
10524 * Makefile.in (WARN_CFLAGS): Get it from configure.
10525 (WERROR_CFLAGS): New.
10526 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10527 * configure.ac: Introduce --enable-werror, which adds -Werror to
10528 the compiler command line. Enabled by default. Disable with
10529 --disable-werror. Add -Wdeclaration-after-statement
10530 Wpointer-arith and -Wformat-nonliteral to warning flags.
10531 * configure: Regenerate.
10532
331e2f5f
PA
105332010-08-26 Pedro Alves <pedro@codesourcery.com>
10534
10535 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10536
e581f2b4
PA
105372010-08-26 Pedro Alves <pedro@codesourcery.com>
10538
10539 * gdbreplay.c (remote_error): New.
10540 (gdbchar): New.
10541 (expect): Use gdbchar. Check for error reading from GDB.
10542 Clarify sync error output.
10543 (play): Check for errors writing to GDB.
10544 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10545 * remote-utils.c (getpkt): Check for errors writing to the remote
10546 descriptor.
10547
3c11dd79
PA
105482010-08-25 Pedro Alves <pedro@codesourcery.com>
10549
10550 * linux-low.c (linux_wait_1): Move non-debugging code out of
10551 `debug_threads' control.
10552
d20a8ad9
PA
105532010-08-25 Pedro Alves <pedro@codesourcery.com>
10554
10555 * linux-low.c (linux_wait_1): Don't set last_status here.
10556 * server.c (push_event, queue_stop_reply_callback): Assert we're
10557 not pushing a TARGET_WAITKIND_IGNORE event.
10558 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10559 (myresume, handle_target_event): Set the thread's last_resume_kind
10560 and last_status from the target returned status.
10561
964e4306
PA
105622010-08-25 Pedro Alves <pedro@codesourcery.com>
10563
10564 PR threads/10729
10565
10566 * linux-x86-low.c (update_debug_registers_callback): New.
10567 (i386_dr_low_set_addr): Use it.
10568 (i386_dr_low_get_addr): New.
10569 (i386_dr_low_set_control): Use update_debug_registers_callback.
10570 (i386_dr_low_get_control): New.
10571 (i386_dr_low_get_status): Adjust.
10572 * linux-low.c (linux_stop_lwp): New.
10573 * linux-low.h (linux_stop_lwp): Declare.
10574
10575 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10576 argument instead of a i386_debug_reg_state.
10577 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10578 a i386_debug_reg_state.
10579 (i386_insert_aligned_watchpoint): Adjust.
10580 (i386_remove_aligned_watchpoint): Adjust.
10581 (i386_low_stopped_data_address): Read the debug registers from the
10582 inferior instead of from the mirrors.
10583 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10584 (i386_dr_low_get_addr): Declare.
10585 (i386_dr_low_get_control): Declare.
10586 (i386_dr_low_get_status): Change prototype.
10587
10588 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10589 (i386_dr_low_get_addr): New.
10590 (i386_dr_low_get_control): New.
10591 (i386_dr_low_get_status): Adjust prototype. Return
10592 dr_status_mirror.
10593 (i386_initial_stuff): Clear dr_status_mirror and
10594 dr_control_mirror.
10595 (i386_get_thread_context): Adjust.
10596 (i386_set_thread_context): Adjust.
10597 (i386_thread_added): Adjust.
10598
5f21a75b
PA
105992010-08-24 Pedro Alves <pedro@codesourcery.com>
10600
10601 * linux-low.h (linux_thread_area): Delete declaration.
10602
3e4c1235
TS
106032010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10604
10605 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10606 after its termination.
10607
1971b033
PA
106082010-08-09 Pedro Alves <pedro@codesourcery.com>
10609
10610 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10611 (gdb_wants_all_stopped): Delete.
10612 (linux_wait_1): Don't call them.
10613 * server.c (handle_v_cont): Tag all threads as want-stopped.
10614 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10615 stopped as "client-wants-stopped".
10616
310444ac
PA
106172010-07-31 Pedro Alves <pedro@codesourcery.com>
10618
10619 * Makefile.in (signals_h): New.
10620 (server_h): Depend on it.
10621 (server.o): Don't depend on $(signals_def).
10622 (signals.o): Depend on $(signals_def).
10623
a19cae16
JK
106242010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10625
10626 * Makefile.in (signals_def): New.
10627 (server_h): Append include/gdb/signals.h and signals_def.
10628 (server.o): Append signals_def.
10629
30d50328
JK
106302010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10631
10632 * server.c (handle_target_event): Use target_signal_to_host for
10633 resume_info.sig initialization.
10634 * target.h (struct thread_resume) <sig>: New comment.
10635
5c3216e2
OS
106362010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10637
c6f46ca0
OS
10638 * server.c (handle_query): strcpy() the returned string from paddress()
10639 instead of sprintf().
5c3216e2
OS
10640 * utils.c (paddress): Return phex_nz().
10641
6bd31874
JB
106422010-07-07 Joel Brobecker <brobecker@adacore.com>
10643
10644 * server.c (handle_v_cont): Call mourn_inferior if process
10645 just exited.
10646 (myresume): Likewise.
10647
0fb4aa4b
PA
106482010-07-01 Pedro Alves <pedro@codesourcery.com>
10649
10650 Static tracepoints, and integration with UST.
10651
10652 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10653 * mem-break.c (uninsert_all_breakpoints)
10654 (reinsert_all_breakpoints): New.
10655 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10656 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10657 (gdb_agent_ust_loaded, helper_thread_id)
10658 (gdb_agent_helper_thread_id): New macros.
10659 (struct ipa_sym_addresses): Add addr_ust_loaded,
10660 addr_helper_thread_id, addr_cmd_buf.
10661 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10662 (in_process_agent_loaded_ust): New.
10663 (write_e_ust_not_loaded): New.
10664 (maybe_write_ipa_ust_not_loaded): New.
10665 (struct collect_static_trace_data_action): New.
10666 (enum tracepoint_type) <static_tracepoint>: New.
10667 (struct tracepoint) <handle>: Mention static tracepoints.
10668 (struct static_tracepoint_ctx): New.
10669 (CMD_BUF_SIZE): New.
10670 (add_tracepoint_action): Handle static tracepoint actions.
10671 (unprobe_marker_at): New.
10672 (clear_installed_tracepoints): Handle static tracepoints.
10673 (cmd_qtdp): Handle static tracepoints.
10674 (probe_marker_at): New.
10675 (cmd_qtstart): Handle static tracepoints.
10676 (response_tracepoint): Handle static tracepoints.
10677 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10678 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10679 (get_context_regcache): Handle static tracepoints.
10680 (do_action_at_tracepoint): Handle static tracepoint actions.
10681 (traceframe_find_block_type): Handle static trace data blocks.
10682 (traceframe_read_sdata): New.
10683 (download_tracepoints): Download static tracepoint actions.
10684 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10685 (GDB_PROBE_NAME): New.
10686 (ust_ops): New.
10687 (GET_UST_SYM): New.
10688 (USTF): New.
10689 (dlsym_ust): New.
10690 (ust_marker_to_static_tracepoint): New.
10691 (gdb_probe): New.
10692 (collect_ust_data_at_tracepoint): New.
10693 (gdb_ust_probe): New.
10694 (UNIX_PATH_MAX, SOCK_DIR): New.
10695 (gdb_ust_connect_sync_socket): New.
10696 (resume_thread, stop_thread): New.
10697 (run_inferior_command): New.
10698 (init_named_socket): New.
10699 (gdb_ust_socket_init): New.
10700 (cstr_to_hexstr): New.
10701 (next_st): New.
10702 (first_marker, next_marker): New.
10703 (response_ust_marker): New.
10704 (cmd_qtfstm, cmd_qtsstm): New.
10705 (unprobe_marker_at, probe_marker_at): New.
10706 (cmd_qtstmat, gdb_ust_thread): New.
10707 (gdb_ust_init): New.
10708 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10709 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10710 (ST_REGENTRY): New.
10711 (x86_64_st_collect_regmap): New.
10712 (X86_64_NUM_ST_COLLECT_GREGS): New.
10713 (AMD64_RIP_REGNUM): New.
10714 (supply_static_tracepoint_registers): New.
10715 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10716 (ST_REGENTRY): New.
10717 (i386_st_collect_regmap): New.
10718 (i386_NUM_ST_COLLECT_GREGS): New.
10719 (supply_static_tracepoint_registers): New.
10720 * server.c (handle_query): Handle qXfer:statictrace:read.
10721 <qSupported>: Report support for StaticTracepoints, and
10722 qXfer:statictrace:read features.
10723 * server.h (traceframe_read_sdata)
10724 (supply_static_tracepoint_registers): Declare.
10725 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10726 (unpack_varlen_hex): Include in IPA build.
10727 * Makefile.in (ustlibs, ustinc): New.
10728 (IPA_OBJS): Add remote-utils-ipa.o.
10729 ($(IPA_LIB)): Link -ldl and -lpthread.
10730 (UST_CFLAGS): New.
10731 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10732 * config.in, configure: Regenerate.
10733
9e4344e5
PA
107342010-06-20 Ian Lance Taylor <iant@google.com>
10735 Pedro Alves <pedro@codesourcery.com>
10736
10737 * linux-x86-low.c (always_true): Delete.
10738 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10739 trying to fool the compiler with always_true.
10740
c6beb2cb
PA
107412010-06-20 Pedro Alves <pedro@codesourcery.com>
10742
10743 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10744 conditions in gdbserver.
10745
d2ed6730
UW
107462010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10747
10748 * spu-low.c (spu_read_memory): Wrap around local store limit.
10749 (spu_write_memory): Likewise.
10750
4e29fb54
PA
107512010-06-15 Pedro Alves <pedro@codesourcery.com>
10752
10753 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10754 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10755 LONGEST uses.
10756 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10757 uses.
10758 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10759 uses with LONGEST uses.
10760
6a271cae
PA
107612010-06-14 Stan Shebs <stan@codesourcery.com>
10762 Pedro Alves <pedro@codesourcery.com>
10763
10764 Bytecode compiler.
10765
10766 * linux-x86-low.c: Include limits.h.
10767 (add_insns): New.
10768 (always_true): New.
10769 (EMIT_ASM): New.
10770 (EMIT_ASM32): New.
10771 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10772 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10773 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10774 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10775 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10776 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10777 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10778 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10779 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10780 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10781 (amd64_emit_void_call_2): New.
10782 (amd64_emit_ops): New.
10783 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10784 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10785 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10786 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10787 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10788 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10789 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10790 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10791 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10792 (i386_emit_stack_adjust, i386_emit_int_call_1)
10793 (i386_emit_void_call_2): New.
10794 (i386_emit_ops): New.
10795 (x86_emit_ops): New.
10796 (the_low_target): Install x86_emit_ops.
10797 * server.h (struct emit_ops): New.
10798 (get_raw_reg_func_addr): Declare.
10799 (current_insn_ptr, emit_error): Declare.
10800 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10801 (set_trace_state_variable_value): New defines.
10802 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10803 addr_get_trace_state_variable_value and
10804 addr_set_trace_state_variable_value.
10805 (symbol_list): New fields for get_raw_reg,
10806 get_trace_state_variable_value and set_trace_state_variable_value.
10807 (condfn): New typedef.
10808 (struct tracepoint): New field `compiled_cond'.
10809 (do_action_at_tracepoint): Clear compiled_cond.
10810 (get_trace_state_variable_value, set_trace_state_variable_value):
10811 Export in the IPA.
10812 (condition_true_at_tracepoint): If there's a compiled condition,
10813 run that.
10814 (current_insn_ptr, emit_error): New globals.
10815 (struct bytecode_address): New.
10816 (get_raw_reg_func_addr): New.
10817 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10818 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10819 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10820 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10821 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10822 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10823 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10824 (compile_tracepoint_condition, compile_bytecodes): New.
10825 * target.h (emit_ops): Forward declare.
10826 (struct target_ops): New field emit_ops.
10827 (target_emit_ops): New.
10828 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10829 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10830 * linux-low.c (linux_emit_ops): New.
10831 (linux_target_ops): Install it.
10832 * linux-low.h (struct linux_target_ops): New field emit_ops.
10833
92b72907
UW
108342010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10835
10836 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10837 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10838
fa593d66
PA
108392010-06-01 Pedro Alves <pedro@codesourcery.com>
10840 Stan Shebs <stan@codesourcery.com>
10841
10842 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10843 (all): Depend on $(extra_libraries).
10844 (install-only): Install the IPA.
10845 (IPA_OBJS, IPA_LIB): New.
10846 (clean): Remove the IPA lib.
10847 (IPAGENT_CFLAGS): New.
10848 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10849 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10850 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10851 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10852 * configure.ac: Check for atomic builtins support in the compiler.
10853 (IPA_DEPFILES, extra_libraries): Define.
10854 * configure.srv (ipa_obj): Add description.
10855 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10856 (i[34567]86-*-linux*): Set ipa_obj.
10857 (x86_64-*-linux*): Set ipa_obj.
10858 * linux-low.c (stabilizing_threads): New.
10859 (supports_fast_tracepoints): New.
10860 (linux_detach): Stabilize threads before detaching.
10861 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10862 the lwp is either not stabilizing, or is moving out of a jump pad.
10863 (linux_fast_tracepoint_collecting): New.
10864 (maybe_move_out_of_jump_pad): New.
10865 (enqueue_one_deferred_signal): New.
10866 (dequeue_one_deferred_signal): New.
10867 (linux_wait_for_event_1): If moving out of a jump pad, defer
10868 pending signals to later.
10869 (linux_stabilize_threads): New.
10870 (linux_wait_1): Check if threads need moving out of jump pads, and
10871 do it if so.
10872 (stuck_in_jump_pad_callback): New.
10873 (move_out_of_jump_pad_callback): New.
10874 (lwp_running): New.
10875 (linux_resume_one_lwp): Handle moving out of jump pads.
10876 (linux_set_resume_request): Dequeue deferred signals.
10877 (need_step_over_p): Also step over fast tracepoint jumps.
10878 (start_step_over): Also uninsert fast tracepoint jumps.
10879 (finish_step_over): Also reinsert fast tracepoint jumps.
10880 (linux_install_fast_tracepoint_jump): New.
10881 (linux_target_ops): Install linux_stabilize_threads and
10882 linux_install_fast_tracepoint_jump_pad.
10883 * linux-low.h (linux_target_ops) <get_thread_area,
10884 install_fast_tracepoint_jump_pad>: New fields.
10885 (struct lwp_info) <collecting_fast_tracepoint,
10886 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10887 (linux_get_thread_area): Declare.
10888 * linux-x86-low.c (jump_insn): New.
10889 (x86_get_thread_area): New.
10890 (append_insns): New.
10891 (push_opcode): New.
10892 (amd64_install_fast_tracepoint_jump_pad): New.
10893 (i386_install_fast_tracepoint_jump_pad): New.
10894 (x86_install_fast_tracepoint_jump_pad): New.
10895 (the_low_target): Install x86_get_thread_area and
10896 x86_install_fast_tracepoint_jump_pad.
10897 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10898 (struct fast_tracepoint_jump): New.
10899 (fast_tracepoint_jump_insn): New.
10900 (fast_tracepoint_jump_shadow): New.
10901 (find_fast_tracepoint_jump_at): New.
10902 (fast_tracepoint_jump_here): New.
10903 (delete_fast_tracepoint_jump): New.
10904 (set_fast_tracepoint_jump): New.
10905 (uninsert_fast_tracepoint_jumps_at): New.
10906 (reinsert_fast_tracepoint_jumps_at): New.
10907 (set_breakpoint_at): Use write_inferior_memory.
10908 (uninsert_raw_breakpoint): Use write_inferior_memory.
10909 (check_mem_read): Mask out fast tracepoint jumps.
10910 (check_mem_write): Mask out fast tracepoint jumps.
10911 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10912 (set_fast_tracepoint_jump): Declare.
10913 (delete_fast_tracepoint_jump)
10914 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10915 (reinsert_fast_tracepoint_jumps_at): Declare.
10916 * regcache.c: Don't compile many functions when building the
10917 in-process agent library.
10918 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10919 the register buffer in the heap.
10920 (free_register_cache): If the register buffer isn't owned by the
10921 regcache, don't free it.
10922 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10923 pre-existing register caches.
10924 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10925 type.
10926 (convert_ascii_to_int): : Constify `from' parameter type.
10927 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10928 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10929 the needed buffer in-place.
10930 (relocate_instruction): New.
10931 * server.c (handle_query) <qSymbols>: If the target supports
10932 tracepoints, give it a chance of looking up symbols. Report
10933 support for fast tracepoints.
10934 (handle_status): Stabilize threads.
10935 (process_serial_event): Adjust.
10936 * server.h (struct fast_tracepoint_jump): Forward declare.
10937 (struct process_info) <fast_tracepoint_jumps>: New field.
10938 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10939 (decode_X_packet, decode_M_packet): Adjust.
10940 (relocate_instruction): Declare.
10941 (in_process_agent_loaded): Declare.
10942 (tracepoint_look_up_symbols): Declare.
10943 (struct fast_tpoint_collect_status): Declare.
10944 (fast_tracepoint_collecting): Declare.
10945 (force_unlock_trace_buffer): Declare.
10946 (handle_tracepoint_bkpts): Declare.
10947 (initialize_low_tracepoint)
10948 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10949 * target.h (struct target_ops) <stabilize_threads,
10950 install_fast_tracepoint_jump_pad>: New fields.
10951 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10952 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10953 [HAVE_STDINT_H]: Include stdint.h.
10954 (trace_debug_1): Rename to ...
10955 (trace_vdebug): ... this.
10956 (trace_debug): Rename to ...
10957 (trace_debug_1): ... this. Add `level' parameter.
10958 (trace_debug): New.
10959 (ATTR_USED, ATTR_NOINLINE): New.
10960 (IP_AGENT_EXPORT): New.
10961 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10962 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10963 (about_to_request_buffer_space, trace_buffer_is_full)
10964 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10965 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10966 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10967 (traceframe_write_count, traceframes_created)
10968 (trace_state_variables)
10969 New renaming defines.
10970 (struct ipa_sym_addresses): New.
10971 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10972 (symbol_list): New.
10973 (ipa_sym_addrs): New.
10974 (all_tracepoint_symbols_looked_up): New.
10975 (in_process_agent_loaded): New.
10976 (write_e_ipa_not_loaded): New.
10977 (maybe_write_ipa_not_loaded): New.
10978 (tracepoint_look_up_symbols): New.
10979 (debug_threads) [IN_PROCESS_AGENT]: New.
10980 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10981 (UNKNOWN_SIDE_EFFECTS): New.
10982 (stop_tracing): New.
10983 (flush_trace_buffer): New.
10984 (stop_tracing_bkpt): New.
10985 (flush_trace_buffer_bkpt): New.
10986 (read_inferior_integer): New.
10987 (read_inferior_uinteger): New.
10988 (read_inferior_data_pointer): New.
10989 (write_inferior_data_pointer): New.
10990 (write_inferior_integer): New.
10991 (write_inferior_uinteger): New.
10992 (struct collect_static_trace_data_action): Delete.
10993 (enum tracepoint_type): New.
10994 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10995 <actions_str, step_actions, step_actions_str>: Only include in
10996 GDBserver.
fa593d66
PA
10997 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10998 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10999 (tracepoints): Use IP_AGENT_EXPORT.
11000 (last_tracepoint): Don't include in the IPA.
11001 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11002 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11003 (alloced_trace_state_variables): New.
11004 (trace_state_variables): Use IP_AGENT_EXPORT.
11005 (traceframe_t): Delete unused variable.
11006 (circular_trace_buffer): Don't include in the IPA.
11007 (trace_buffer_start): Delete.
11008 (struct trace_buffer_control): New.
11009 (trace_buffer_free): Delete.
11010 (struct ipa_trace_buffer_control): New.
11011 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11012 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11013 New.
11014 (trace_buffer_ctrl): New.
11015 (TRACE_BUFFER_CTRL_CURR): New.
11016 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11017 Reimplement as macros.
11018 (trace_buffer_wrap): Delete.
11019 (traceframe_write_count, traceframe_read_count)
11020 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11021 (struct tracepoint_hit_ctx) <type>: New field.
11022 (struct fast_tracepoint_ctx): New.
11023 (memory_barrier): New.
11024 (cmpxchg): New.
11025 (record_tracepoint_error): Update atomically in the IPA.
11026 (clear_inferior_trace_buffer): New.
11027 (about_to_request_buffer_space): New.
11028 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11029 updating the same buffer.
11030 (add_tracepoint): Default the tracepoint's type to trap
11031 tracepoint, and orig_size to -1.
11032 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11033 internal variables.
11034 (create_trace_state_variable): New parameter `gdb'. Handle it.
11035 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11036 (cmd_qtdp): Handle fast tracepoints.
11037 (cmd_qtdv): Adjust.
11038 (max_jump_pad_size): New.
11039 (gdb_jump_pad_head): New.
11040 (get_jump_space_head): New.
11041 (claim_jump_space): New.
11042 (sort_tracepoints): New.
11043 (MAX_JUMP_SIZE): New.
11044 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11045 IPA.
11046 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11047 support. Upload fast traceframes, and delete internal IPA
11048 breakpoints.
11049 (stop_tracing_handler): New.
11050 (flush_trace_buffer_handler): New.
11051 (cmd_qtstop): Upload fast tracepoints.
11052 (response_tracepoint): Handle fast tracepoints.
11053 (tracepoint_finished_step): Upload fast traceframes. Set the
11054 tracepoint hit context's tracepoint type.
11055 (handle_tracepoint_bkpts): New.
11056 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11057 type. Add comment about fast tracepoints.
11058 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11059 non-existing action_str field.
11060 (get_context_regcache): Handle fast tracepoints.
11061 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11062 to the regcache.
11063 (fast_tracepoint_from_jump_pad_address): New.
11064 (fast_tracepoint_from_ipa_tpoint_address): New.
11065 (collecting_t): New.
11066 (force_unlock_trace_buffer): New.
11067 (fast_tracepoint_collecting): New.
11068 (collecting): New.
11069 (gdb_collect): New.
11070 (write_inferior_data_ptr): New.
11071 (target_tp_heap): New.
11072 (target_malloc): New.
11073 (download_agent_expr): New.
11074 (UALIGN): New.
11075 (download_tracepoints): New.
11076 (download_trace_state_variables): New.
11077 (upload_fast_traceframes): New.
11078 (IPA_FIRST_TRACEFRAME): New.
11079 (IPA_NEXT_TRACEFRAME_1): New.
11080 (IPA_NEXT_TRACEFRAME): New.
11081 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11082 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11083 (gdb_jump_pad_buffer_end): New.
11084 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11085 (initialize_tracepoint): Adjust.
11086 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11087 buffer. Initialize the low module.
11088 * utils.c (PREFIX, TOOLNAME): New.
11089 (malloc_failure): Use PREFIX.
11090 (error): In the IPA, an error causes an exit.
11091 (fatal, warning): Use PREFIX.
11092 (internal_error): Use TOOLNAME.
11093 (NUMCELLS): Increase to 10.
11094 * configure, config.in: Regenerate.
11095
d149dd1d
PA
110962010-06-01 Pedro Alves <pedro@codesourcery.com>
11097
11098 * server.c (handle_query) <qSupported>: Do two passes over the
11099 qSupported string to avoid nesting strtok.
11100
f6528abd
JK
111012010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11102
11103 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11104 (CDEPS): New.
11105 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11106 -Wl,--dynamic-list.
11107 * configure: Regenerate.
11108 * proc-service.list: New.
11109
ca2a87a0
JK
111102010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11111
11112 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11113 New comment.
11114
363a6e9f
OS
111152010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11116
11117 * gdbreplay.c (remote_open): Check error return from socket() call by
11118 its equality to -1 not by it being negative.
11119 * remote-utils.c (remote_open): Likewise.
11120
d23b6cb1
PA
111212010-05-23 Pedro Alves <pedro@codesourcery.com>
11122
11123 * config.h: Regenerate.
11124
28d3cf85
MK
111252010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11126
11127 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11128 doesn't provide PTRACE_GET_THREAD_AREA.
11129
fea36a59
MK
111302010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11131
11132 * linux-m68k-low.c: Include <asm/ptrace.h>
11133 (ps_get_thread_area): Implement.
11134
24b066ba
DE
111352010-05-03 Doug Evans <dje@google.com>
11136
11137 * event-loop.c (struct callback_event): New struct.
11138 (callback_list): New global.
11139 (append_callback_event, delete_callback_event): New functions.
11140 (process_callback): New function.
11141 (start_event_loop): Call it.
11142 * remote-utils.c (NOT_SCHEDULED): Define.
11143 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11144 moved out of readchar.
11145 (readchar): Rewrite. Call reschedule before returning.
11146 (reset_readchar): New function.
11147 (remote_close): Call it.
11148 (process_remaining, reschedule): New functions.
11149 * server.h (callback_handler_func): New typedef.
11150 (append_callback_event, delete_callback_event): Declare.
11151
9836d6ea
PA
111522010-05-03 Pedro Alves <pedro@codesourcery.com>
11153
11154 * proc-service.c (ps_pglobal_lookup): Use
11155 thread_db_look_up_one_symbol.
11156 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11157 parameter. Use it instead of all_symbols_looked_up.
11158 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11159 field.
11160 (all_symbols_looked_up): Don't declare.
11161 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11162 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11163 field.
11164 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11165 Set all_symbols_looked_up here.
11166 (thread_db_look_up_one_symbol): New.
11167 (thread_db_get_tls_address): Adjust.
11168 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11169 thread_db object on the heap, and tentatively set it in the
11170 process structure.
11171 (thread_db_init): Don't set all_symbols_looked_up here.
11172 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11173
7984d532
PA
111742010-05-03 Pedro Alves <pedro@codesourcery.com>
11175
11176 * linux-low.c (linux_kill, linux_detach): Adjust.
11177 (status_pending_p_callback): Remove redundant statement. Check
11178 for !TARGET_WAITIKIND_IGNORE, instead of
11179 TARGET_WAITKIND_STOPPED.
11180 (handle_tracepoints): Make sure LWP is locked. Adjust.
11181 (linux_wait_for_event_1): Adjust.
11182 (linux_cancel_breakpoints): New.
11183 (unsuspend_one_lwp): New.
11184 (unsuspend_all_lwps): New.
11185 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11186 (send_sigstop_callback): Change return type to int, add new
11187 `except' parameter and handle it.
11188 (suspend_and_send_sigstop_callback): New.
11189 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11190 pass them down. If SUSPEND, also increment the lwp's suspend
11191 count.
11192 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11193 (need_step_over_p): Don't consider suspended LWPs.
11194 (start_step_over): Adjust.
11195 (proceed_one_lwp): Change return type to int, add new `except'
11196 parameter and handle it.
11197 (unsuspend_and_proceed_one_lwp): New.
11198 (proceed_all_lwps): Use find_inferior instead of
11199 for_each_inferior.
11200 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11201 also decrement the suspend count of LWPs. Pass `except' down,
11202 instead of hacking its suspend count.
11203 (linux_pause_all): Add `freeze' parameter. Adjust.
11204 (linux_unpause_all): New.
11205 (linux_target_ops): Install linux_unpause_all.
11206 * server.c (handle_status): Adjust.
11207 * target.h (struct target_ops): New fields `unpause_all' and
11208 `cancel_breakpoints'. Add new parameter to `pause_all'.
11209 (pause_all): Add new `freeze' parameter.
11210 (unpause_all): New.
11211 (cancel_breakpoints): New.
11212 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11213 cancel breakpoints.
11214 (cmd_qtstart): Pause threads.
11215 (stop_tracing): Pause threads, and cancel breakpoints.
11216 * win32-low.c (win32_target_ops): Adjust.
11217
e471f25b
PA
112182010-05-03 Pedro Alves <pedro@codesourcery.com>
11219
11220 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11221 the inferior right away from here...
11222 (linux_wait_1): ... to here, and adjust to check the thread's
11223 last_resume_kind instead of the lwp's step or stop_expected flags.
11224
1915ef4f
PA
112252010-05-02 Pedro Alves <pedro@codesourcery.com>
11226
11227 * README: Use consistent `GDB' and `GDBserver' spellings.
11228
f9e39928
PA
112292010-05-02 Pedro Alves <pedro@codesourcery.com>
11230
11231 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11232 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11233 (linux_detach_one_lwp): Assume the lwp is stopped.
11234 (any_thread_of): Delete.
11235 (linux_detach): Stop all lwps here. Don't blindly delete all
11236 breakpoints.
11237 (delete_lwp_callback): New.
11238 (linux_mourn): Delete all lwps of the process that is gone.
11239 (linux_wait_1): Don't delete the last lwp of the process here.
11240 * mem-break.h (mark_breakpoints_out): Declare.
11241 * mem-break.c (mark_breakpoints_out): New.
11242 (free_all_breakpoints): Use it.
11243 * server.c (handle_target_event): If the process is gone, mark
11244 breakpoints out.
11245 * thread-db.c (struct thread_db) <create_bp>: New field.
11246 (thread_db_enable_reporting): Fix prototype. Store a thread event
11247 breakpoint reference in the thread_db struct.
11248 (thread_db_load_search): Clear the thread_db object.
11249 (try_thread_db_load_1): Ditto.
11250 (switch_to_process): New.
11251 (disable_thread_event_reporting): Use it.
11252 (remove_thread_event_breakpoints): New.
11253 (thread_db_detach, thread_db_mourn): Use it.
11254
1e7fc18c
PA
112552010-05-01 Pedro Alves <pedro@codesourcery.com>
11256
11257 * linux-low.c (linux_enable_event_reporting): New.
11258 (linux_wait_for_event_1, handle_extended_wait): Use it.
11259
02fc4de7
PA
112602010-04-30 Pedro Alves <pedro@codesourcery.com>
11261
11262 * linux-low.c (linux_kill_one_lwp, linux_kill)
11263 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11264 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11265 SIGSTOP even if the LWP is stopped.
11266 (send_sigstop_callback): New.
11267 (stop_all_lwps): Use send_sigstop_callback instead.
11268 (linux_resume_one_thread): Adjust.
11269 (proceed_one_lwp): Still proceed an LWP that the client has
11270 requested to stop, if we haven't reported it as stopped yet. Make
11271 sure that LWPs the client want stopped, have a pending SIGSTOP.
11272
bc3b5632
DE
112732010-04-26 Doug Evans <dje@google.com>
11274
ae1ada35
DE
11275 * server.c (handle_general_set): Make static.
11276
bc3b5632
DE
11277 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11278 Print received char after testing for error/eof instead of before.
11279 (input_interrupt): Tweak comment.
11280
65730243
DE
112812010-04-23 Doug Evans <dje@google.com>
11282
11283 * server.c (start_inferior): Print inferior argv if --debug.
11284
a8ae7dc0
AR
112852010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11286
11287 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11288 * nto-x86-low.c: Include server.h
11289
1c07cc19
PM
112902010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11291
11292 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11293 be consistent with other sources of this directory.
11294 (init_registers_amd64): Correct name of source file of this function
11295 in the comment.
11296
e0a61e09
PM
112972010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11298
11299 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11300 64-bit executables.
11301
54709339
PM
113022010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11303
11304 * win32-i386-low.c: Add 64-bit support.
11305 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11306 (init_registers_amd64): Declare.
11307 (mappings): Add 64-bit version of array.
11308 (init_windows_x86): New function.
11309 (the_low_target): Change init_arch field to init_windows_x86.
11310
e8f0053d
PM
113112010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11312
11313 * win32-low.c: Adapt to support also 64-bit architecture.
11314 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11315 (get_image_name): Use SIZE_T type for local variable `done'.
11316 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11317 (toolhelp_get_dll_name): Idem.
11318 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11319 Use uintptr_t typecast to avoid warning.
11320 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11321 (handle_exception): Use phex_nz to avoid warning.
11322 (win32_wait): Remove unused local variable `process'.
11323
c481e77e
PM
113242010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11325
11326 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11327 `amd64-avx.o'.
11328
12ea4b69
PM
113292010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11330
11331 * configure.ac: Use `ws2_32' library for srv_mingw.
11332 * configure: Regenerate.
11333 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11334 * remote-utils.c: Likewise.
11335
f6d1620c
L
113362010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11337
11338 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11339 if __x86_64__ is defined.
11340
8e642873
PM
113412010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11342
11343 * configure: Regenerate.
11344
711e434b
PM
113452010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11346
11347 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11348 * target.h (target_ops): New get_tib_address field.
11349 * win32-low.h (win32_thread_info): Add thread_local_base field.
11350 * win32-low.c (child_add_thread): Add tlb argument.
11351 Set thread_local_base field to TLB.
11352 (get_child_debug_event): Adapt to child_add_thread change.
11353 (win32_get_tib_address): New function.
11354 (win32_target_ops): Set get_tib_address field to
11355 win32_get_tib_address.
11356 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11357
505106cd
PA
113582010-04-12 Pedro Alves <pedro@codesourcery.com>
11359
505106cd
PA
11360 * linux-low.c (linux_mourn): Also remove the process.
11361 * server.c (handle_target_event): Don't remove the process here.
11362 * nto-low.c (nto_mourn): New.
11363 (nto_target_ops): Install it.
11364 * spu-low.c (spu_mourn): New.
11365 (spu_target_ops): Install it.
11366 * win32-low.c (win32_mourn): New.
11367 (win32_target_ops): Install it.
11368
e8470a06
PA
113692010-04-12 Pedro Alves <pedro@codesourcery.com>
11370
11371 * server.h (buffer_xml_printf): Remove redundant `;'.
11372
45ba0d02
PA
113732010-04-12 Pedro Alves <pedro@codesourcery.com>
11374
11375 * regcache.c (set_register_cache): Invalidate regcaches before
11376 changing the register cache layout.
11377 (regcache_invalidate_one): Allow a NULL regcache.
11378 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11379 regcaches before changing the register cache layout or the target
11380 regsets.
11381
59e04013
L
113822010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11383
11384 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11385 variable warning on Linux/x86-64.
11386
8336d594
PA
113872010-04-11 Pedro Alves <pedro@codesourcery.com>
11388
11389 GDBserver disconnected tracing support.
11390
11391 * linux-low.c (linux_remove_process): Delete.
11392 (add_lwp): Don't set last_resume_kind here.
11393 (linux_kill): Use `mourn'.
11394 (linux_detach): Use `thread_db_detach', and `mourn'.
11395 (linux_mourn): New.
11396 (linux_attach_lwp_1): Adjust comment.
11397 (linux_attach): last_resume_kind moved the thread_info; adjust.
11398 (status_pending_p_callback): Adjust.
11399 (linux_wait_for_event_1): Adjust.
11400 (count_events_callback, select_singlestep_lwp_callback)
11401 (select_event_lwp_callback, cancel_breakpoints_callback)
11402 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11403 (proceed_one_lwp): Adjust.
11404 (linux_async): Add debug output.
11405 (linux_thread_stopped): New.
11406 (linux_pause_all): New.
11407 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11408 linux_pause_all.
11409 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11410 (thread_db_free): Delete declaration.
11411 (thread_db_detach, thread_db_mourn): Declare.
11412 * thread-db.c (thread_db_init): Use thread_db_mourn.
11413 (thread_db_free): Delete, split in two.
11414 (disable_thread_event_reporting): New.
11415 (thread_db_detach): New.
11416 (thread_db_mourn): New.
11417
11418 * server.h (struct thread_info) <last_resume_kind>: New field.
11419 <attached>: Add comment.
11420 <gdb_detached>: New field.
11421 (handler_func): Change return type to int.
11422 (handle_serial_event, handle_target_event): Ditto.
11423 (gdb_connected): Declare.
11424 (tracing): Delete.
11425 (disconnected_tracing): Declare.
11426 (stop_tracing): Declare.
11427
11428 * server.c (handle_query) <qSupported>: Report support for
11429 disconnected tracing.
11430 (queue_stop_reply_callback): Account for running threads.
11431 (gdb_wants_thread_stopped): New.
11432 (gdb_wants_all_threads_stopped): New.
11433 (gdb_reattached_process): New.
11434 (handle_status): Clear the `gdb_detached' flag of all processes.
11435 In all-stop, stop all threads.
11436 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11437 (process_serial_event): If the remote connection breaks, or if an
11438 exit was forced with "monitor exit", force an event loop exit.
11439 Handle disconnected tracing on detach.
11440 (handle_serial_event): Adjust.
11441 (handle_target_event): If GDB isn't connected, forward events back
11442 to the inferior, unless the last process exited, in which case,
11443 exit gdbserver. Adjust interface.
11444
11445 * remote-utils.c (remote_open): Don't block in accept. Instead
11446 register an event loop source on the listen socket file
11447 descriptor. Refactor bits into ...
11448 (listen_desc): ... this new global.
11449 (gdb_connected): ... this new function.
11450 (enable_async_notification): ... this new function.
11451 (handle_accept_event): ... this new function.
11452 (remote_close): Clear remote_desc.
11453
11454 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11455
11456 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11457 New fields.
11458 (mourn_inferior): Define.
11459 (target_process_qsupported): Avoid the dangling else problem.
11460 (thread_stopped): Define.
11461 (pause_all): Define.
11462 (target_waitstatus_to_string): Declare.
11463 * target.c (target_waitstatus_to_string): New.
11464
11465 * tracepoint.c (tracing): Make extern.
11466 (disconnected_tracing): New.
11467 (stop_tracing): Make extern. Handle tracing stops due to GDB
11468 disconnecting.
11469 (cmd_qtdisconnected): New.
11470 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11471 (handle_tracepoint_general_set): Handle QTDisconnected.
11472
11473 * event-loop.c (event_handler_func): Change return type to int.
11474 (process_event): Bail out if the event handler wants the event
11475 loop to stop.
11476 (handle_file_event): Ditto.
11477 (start_event_loop): Bail out if the event handler wants the event
11478 loop to stop.
11479
11480 * nto-low.c (nto_target_ops): Adjust.
11481 * spu-low.c (spu_wait): Don't remove the process here.
11482 (spu_target_ops): Adjust.
11483 * win32-low.c (win32_wait): Don't remove the process here.
11484 (win32_target_ops): Adjust.
11485
5d267c4c
PA
114862010-04-11 Pedro Alves <pedro@codesourcery.com>
11487
11488 * regcache.c (realloc_register_cache): Invalidate inferior's
11489 regcache before recreating it.
11490
623ccd72
PA
114912010-04-09 Pedro Alves <pedro@codesourcery.com>
11492
11493 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11494
219f2f23
PA
114952010-04-09 Stan Shebs <stan@codesourcery.com>
11496 Pedro Alves <pedro@codesourcery.com>
11497
11498 * server.h (LONGEST): New.
11499 (struct thread_info) <while_stepping>: New field.
11500 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11501 Declare.
11502 (initialize_tracepoint, handle_tracepoint_general_set)
11503 (handle_tracepoint_query, tracepoint_finished_step)
11504 (tracepoint_was_hit, release_while_stepping_state_list):
11505 (current_traceframe): Declare.
11506 * server.c (handle_general_set): Handle tracepoint packets.
11507 (read_memory): New.
11508 (write_memory): New.
11509 (handle_search_memory_1): Use read_memory.
11510 (handle_query): Report support for conditional tracepoints, trace
11511 state variables, and tracepoint sources. Handle tracepoint
11512 queries.
11513 (main): Initialize the tracepoints module.
11514 (process_serial_event): Handle traceframe reads/writes.
11515
11516 * linux-low.c (handle_tracepoints): New.
11517 (linux_wait_1): Call it.
11518 (linux_resume_one_lwp): Handle while-stepping.
11519 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11520 (linux_target_ops): Install them.
11521 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11522 New field.
11523 * linux-x86-low.c (x86_supports_tracepoints): New.
11524 (the_low_target). Install it.
11525
11526 * mem-break.h (delete_breakpoint): Declare.
11527 * mem-break.c (delete_breakpoint): Make external.
11528
11529 * target.h (struct target_ops): Add `supports_tracepoints',
11530 `read_pc', and `write_pc' fields.
11531 (target_supports_tracepoints): Define.
11532 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11533 (phex_nz): New.
11534
11535 * regcache.h (struct regcache) <registers_owned>: New field.
11536 (init_register_cache, regcache_cpy): Declare.
11537 (regcache_read_pc, regcache_write_pc): Declare.
11538 (register_cache_size): Declare.
11539 (supply_regblock): Declare.
11540 * regcache.c (init_register_cache): New.
11541 (new_register_cache): Use it.
11542 (regcache_cpy): New.
11543 (register_cache_size): New.
11544 (supply_regblock): New.
11545 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11546
219f2f23
PA
11547 * tracepoint.c: New.
11548
11549 * Makefile.in (OBS): Add tracepoint.o.
11550 (tracepoint.o): New rule.
11551
3a13a53b
L
115522010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11553
11554 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11555 (i386-mmx.o): New.
11556 (i386-mmx.c): Likewise.
11557 (i386-mmx-linux.o): Likewise.
11558 (i386-mmx-linux.c): Likewise.
11559
11560 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11561 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11562 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11563 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11564
11565 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11566 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11567 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11568
1570b33e
L
115692010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11570
11571 * Makefile.in (clean): Updated.
11572 (i386-avx.o): New.
11573 (i386-avx.c): Likewise.
11574 (i386-avx-linux.o): Likewise.
11575 (i386-avx-linux.c): Likewise.
11576 (amd64-avx.o): Likewise.
11577 (amd64-avx.c): Likewise.
11578 (amd64-avx-linux.o): Likewise.
11579 (amd64-avx-linux.c): Likewise.
11580
11581 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11582 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11583 (srv_amd64_regobj): Add amd64-avx.o.
11584 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11585 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11586 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11587 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11588 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11589 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11590 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11591
11592 * i387-fp.c: Include "i386-xstate.h".
11593 (i387_xsave): New.
11594 (i387_cache_to_xsave): Likewise.
11595 (i387_xsave_to_cache): Likewise.
11596 (x86_xcr0): Likewise.
11597
11598 * i387-fp.h (i387_cache_to_xsave): Likewise.
11599 (i387_xsave_to_cache): Likewise.
11600 (x86_xcr0): Likewise.
11601
11602 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11603 * linux-crisv32-low.c (target_regsets): Likewise.
11604 * linux-m68k-low.c (target_regsets): Likewise.
11605 * linux-mips-low.c (target_regsets): Likewise.
11606 * linux-ppc-low.c (target_regsets): Likewise.
11607 * linux-s390-low.c (target_regsets): Likewise.
11608 * linux-sh-low.c (target_regsets): Likewise.
11609 * linux-sparc-low.c (target_regsets): Likewise.
11610 * linux-xtensa-low.c (target_regsets): Likewise.
11611
11612 * linux-low.c: Include <sys/uio.h>.
11613 (regsets_fetch_inferior_registers): Support nt_type.
11614 (regsets_store_inferior_registers): Likewise.
11615 (linux_process_qsupported): New.
11616 (linux_target_ops): Add linux_process_qsupported.
11617
11618 * linux-low.h (regset_info): Add nt_type.
11619 (linux_target_ops): Add process_qsupported.
11620
11621 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11622 and <sys/uio.h>.
11623 (init_registers_i386_avx_linux): New.
11624 (init_registers_amd64_avx_linux): Likewise.
11625 (xmltarget_i386_linux_no_xml): Likewise.
11626 (xmltarget_amd64_linux_no_xml): Likewise.
11627 (PTRACE_GETREGSET): Likewise.
11628 (PTRACE_SETREGSET): Likewise.
11629 (x86_fill_xstateregset): Likewise.
11630 (x86_store_xstateregset): Likewise.
11631 (use_xml): Likewise.
11632 (x86_linux_update_xmltarget): Likewise.
11633 (x86_linux_process_qsupported): Likewise.
11634 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11635 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11636 init_registers_i386_linux here. Call
11637 x86_linux_update_xmltarget.
11638 (the_low_target): Add x86_linux_process_qsupported.
11639
11640 * server.c (handle_query): Call target_process_qsupported.
11641
11642 * target.h (target_ops): Add process_qsupported.
11643 (target_process_qsupported): New.
11644
fc7238bb
PA
116452010-04-03 Pedro Alves <pedro@codesourcery.com>
11646
11647 * inferiors.c (add_thread): Set last_status kind to
11648 TARGET_WAITKIND_IGNORE.
11649 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11650 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11651 (linux_wait_1): Move `thread' local definition to block that uses
11652 it. Don't NULL initialize `event_child'.
11653 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11654 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11655 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11656
bdabb078
PA
116572010-04-01 Pedro Alves <pedro@codesourcery.com>
11658
11659 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11660 an extended waitstatus, or by a watchpoint.
11661 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11662 thread was stepping or has been stopped by a watchpoint.
11663
d3bbe7a0
PA
116642010-04-01 Pedro Alves <pedro@codesourcery.com>
11665
11666 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11667 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11668 of another, then delete the previous, and validate all
11669 breakpoints.
11670 (validate_inserted_breakpoint): New.
11671 (delete_disabled_breakpoints): New.
11672 (validate_breakpoints): New.
11673 (check_mem_read): Validate breakpoints before trusting their
11674 shadow. Delete disabled breakpoints.
11675 (check_mem_write): Validate breakpoints before trusting they
11676 should be inserted. Delete disabled breakpoints.
11677 * mem-break.h (validate_breakpoints):
11678 * server.c (handle_query): Validate breakpoints when we see a
11679 qSymbol query.
11680
8b07ae33
PA
116812010-04-01 Pedro Alves <pedro@codesourcery.com>
11682
11683 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11684 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11685 if we could tell there's a GDB breakpoint at stop_pc.
11686 (need_step_over_p): Don't do a step over if we find a GDB
11687 breakpoint at the resume PC.
11688
11689 * mem-break.c (struct raw_breakpoint): New.
11690 (enum bkpt_type): New type `gdb_breakpoint'.
11691 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11692 fields. New field `raw'.
11693 (find_raw_breakpoint_at): New.
11694 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11695 breakpoint instead.
11696 (set_breakpoint_at): Adjust.
11697 (delete_raw_breakpoint): New.
11698 (release_breakpoint): New.
11699 (delete_breakpoint): Rename to...
11700 (delete_breakpoint_1): ... this. Add proc parameter. Use
11701 release_breakpoint. Return ENOENT.
11702 (delete_breakpoint): Reimplement.
11703 (find_breakpoint_at): Delete.
11704 (find_gdb_breakpoint_at): New.
11705 (delete_breakpoint_at): Delete.
11706 (set_gdb_breakpoint_at): New.
11707 (delete_gdb_breakpoint_at): New.
11708 (gdb_breakpoint_here): New.
11709 (set_reinsert_breakpoint): Use release_breakpoint.
11710 (uninsert_breakpoint): Rename to ...
11711 (uninsert_raw_breakpoint): ... this.
11712 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11713 (reinsert_raw_breakpoint): Change parameter type to
11714 raw_breakpoint.
11715 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11716 instead.
11717 (check_breakpoints): Adjust. Use release_breakpoint.
11718 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11719 (breakpoint_inserted_here): Ditto.
11720 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11721 Don't trust the breakpoint's shadow if it is not inserted.
11722 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11723 (delete_all_breakpoints): Adjust.
11724 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11725 use delete_breakpoint_1.
11726
11727 * mem-break.h (breakpoints_supported): Delete declaration.
11728 (set_gdb_breakpoint_at): Declare.
11729 (gdb_breakpoint_here): Declare.
11730 (delete_breakpoint_at): Delete.
11731 (delete_gdb_breakpoint_at): Declare.
11732
11733 * server.h (struct raw_breakpoint): Forward declare.
11734 (struct process_info): New field `raw_breakpoints'.
11735
11736 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11737 breakpoints.
11738
6bf5e0ba
PA
117392010-03-24 Pedro Alves <pedro@codesourcery.com>
11740
11741 * linux-low.c (status_pending_p_callback): Fix comment.
11742 (linux_wait_for_event_1): Move most of the internal breakpoint
11743 handling from here...
11744 (linux_wait_1): ... to here.
11745 (count_events_callback): New.
11746 (select_singlestep_lwp_callback): New.
11747 (select_event_lwp_callback): New.
11748 (cancel_breakpoints_callback): New.
11749 (select_event_lwp): New.
11750 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11751 priority to all LWPs that have had events that should be reported
11752 to the client. Cancel breakpoints when about to reporting the
11753 event to the client, not while stopping lwps. No longer cancel
11754 finished single-steps here.
11755 (cancel_finished_single_step): Delete.
11756 (cancel_finished_single_steps): Delete.
11757
414a389f
PA
117582010-03-24 Pedro Alves <pedro@codesourcery.com>
11759
11760 * mem-break.c (enum bkpt_type): New.
11761 (struct breakpoint): New field `type'.
11762 (set_breakpoint_at): Change return type to struct breakpoint
11763 pointer. Set type to `other_breakpoint' by default.
11764 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11765 in the breakpoint list.
11766 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11767 (reinsert_breakpoint): Rename to ...
11768 (reinsert_raw_breakpoint): ... this.
11769 (reinsert_breakpoints_at): Adjust.
11770 * mem-break.h (struct breakpoint): Declare.
11771 (set_breakpoint_at): Change return type to struct breakpoint
11772 pointer.
11773
2280c721
PA
117742010-03-24 Pedro Alves <pedro@codesourcery.com>
11775
11776 * server.c (handle_query): Assign, not compare.
11777
d50171e4
PA
117782010-03-24 Pedro Alves <pedro@codesourcery.com>
11779
11780 Teach linux gdbserver to step-over-breakpoints.
11781
11782 * linux-low.c (can_hardware_single_step): New.
11783 (supports_breakpoints): New.
11784 (handle_extended_wait): If stopping threads, read the stop pc of
11785 the new cloned LWP.
11786 (get_pc): New.
11787 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11788 low target doesn't support retrieving the PC.
11789 (add_lwp): Set last_resume_kind to resume_continue.
11790 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11791 (linux_attach): Don't clear stop_expected. Set the lwp's
11792 last_resume_kind to resume_stop.
11793 (linux_detach_one_lwp): Don't check for removed breakpoints.
11794 (check_removed_breakpoint): Delete.
11795 (status_pending_p): Rename to ...
11796 (status_pending_p_callback): ... this. Don't check for removed
11797 breakpoints. Don't consider threads that are stopped from GDB's
11798 perspective.
11799 (linux_wait_for_lwp): Always read the stop_pc here.
11800 (cancel_breakpoint): New.
11801 (step_over_bkpt): New global.
11802 (linux_wait_for_event_1): Implement stepping over breakpoints.
11803 (gdb_wants_lwp_stopped): New.
11804 (gdb_wants_all_stopped): New.
11805 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11806 single-step traps here. Store the thread's last reported target
11807 wait status.
11808 (send_sigstop): Don't clear stop_expected. Always set it,
11809 instead.
11810 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11811 (cancel_finished_single_step): New.
11812 (cancel_finished_single_steps): New.
11813 (wait_for_sigstop): Don't cancel finished single-step traps here.
11814 (linux_resume_one_lwp): Don't check for removed breakpoints.
11815 Don't set `step' on non-hardware step archs.
11816 (linux_set_resume_request): Ignore resume_stop requests if already
11817 stopping or stopped. Set the lwp's last_resume_kind.
11818 (resume_status_pending_p): Don't check for removed breakpoints.
11819 (need_step_over_p): New.
11820 (start_step_over): New.
11821 (finish_step_over): New.
11822 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11823 requests. Clear the thread's last reported target waitstatus.
11824 Don't use the `suspended' flag. Don't consider pending breakpoints.
11825 (linux_resume): Start a step-over if necessary.
11826 (proceed_one_lwp): New.
11827 (proceed_all_lwps): New.
11828 (unstop_all_lwps): New.
11829 * linux-low.h (struct lwp_info): Rewrite comment for the
11830 `suspended' flag. Add the `stop_pc' field. Delete the
11831 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11832 Add `'last_resume_kind' and `need_step_over' fields.
11833 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11834 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11835 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11836 (set_raw_breakpoint_at): New.
11837 (set_breakpoint_at): Rewrite to use it.
11838 (reinsert_breakpoint_handler): Delete.
11839 (set_reinsert_breakpoint): New.
11840 (reinsert_breakpoint_by_bp): Delete.
11841 (delete_reinsert_breakpoints): New.
11842 (uninsert_breakpoint): Rewrite.
11843 (uninsert_breakpoints_at): New.
11844 (reinsert_breakpoint): Rewrite.
11845 (reinsert_breakpoints_at): New.
11846 (check_breakpoints): Rewrite.
11847 (breakpoint_here): New.
11848 (breakpoint_inserted_here): New.
11849 (check_mem_read): Adjust.
11850 * mem-break.h (breakpoints_supported, breakpoint_here)
11851 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11852 (reinsert_breakpoint_by_bp): Delete declaration.
11853 (delete_reinsert_breakpoints): Declare.
11854 (reinsert_breakpoint): Delete declaration.
11855 (reinsert_breakpoints_at): Declare.
11856 (uninsert_breakpoint): Delete declaration.
11857 (uninsert_breakpoints_at): Declare.
11858 (check_breakpoints): Adjust prototype.
11859 * server.h: Adjust include order.
11860 (struct thread_info): Declare here. Add a `last_status' field.
11861
30ba68cb
MS
118622010-03-23 Michael Snyder <msnyder@vmware.com>
11863
11864 * server.c (crc32): New function.
11865 (handle_query): Add handling for 'qCRC:' request.
11866
b9a881c2
PA
118672010-03-23 Pedro Alves <pedro@codesourcery.com>
11868
11869 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11870 lwp had been stopped by a watchpoint.
11871
e92d13d5
PA
118722010-03-16 Pedro Alves <pedro@codesourcery.com>
11873
11874 * server.h (internal_error): Declare.
11875 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11876 * utils.c (internal_error): New function.
11877
64daa791
AS
118782010-03-15 Andreas Schwab <schwab@redhat.com>
11879
11880 * configure.srv: Fix typo setting srv_regobj.
11881
f52cd8cd
PA
118822010-03-15 Pedro Alves <pedro@codesourcery.com>
11883
11884 * linux-low.c (fetch_register): Avoid passing a non string literal
11885 format to `error'.
11886 (usr_store_inferior_registers): Ditto.
11887
93ae6fdc
PA
118882010-03-14 Pedro Alves <pedro@codesourcery.com>
11889
11890 * linux-low.c (linux_write_memory): Bail out early if peeking
11891 memory failed.
11892
c3adc08c
PA
118932010-03-14 Pedro Alves <pedro@codesourcery.com>
11894
11895 * linux-low.h (struct lwp_info): New fields
11896 `stopped_by_watchpoint' and `stopped_data_address'.
11897 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11898 here, and cache them in the lwp object.
11899 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11900 directly.
11901 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11902 field.
11903 (linux_stopped_by_watchpoint): Rewrite.
11904 (linux_stopped_data_address): Rewrite.
11905
bce522a2
PA
119062010-03-06 Simo Melenius <simo.melenius@iki.fi>
11907
11908 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11909 switching the current inferior, not before.
11910
90884b2b
L
119112010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11912
11913 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11914 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11915 i386-linux.c and amd64-linux.c.
11916 (reg-i386.o): Removed.
11917 (reg-i386.c): Likewise.
11918 (reg-i386-linux.o): Likewise.
11919 (reg-i386-linux.c): Likewise.
11920 (reg-x86-64.o): Likewise.
11921 (reg-x86-64.c): Likewise.
11922 (reg-x86-64-linux.o): Likewise.
11923 (reg-x86-64-linux.c): Likewise.
11924 (i386.o): New.
11925 (i386.c): Likewise.
11926 (i386-linux.o): Likewise.
11927 (i386-linux.c): Likewise.
11928 (amd64.o): Likewise.
11929 (amd64.c): Likewise.
11930 (amd64-linux.o): Likewise.
11931 (amd64-linux.c): Likewise.
11932
11933 * configure.srv (srv_i386_regobj): New.
11934 (srv_i386_linux_regobj): Likewise.
11935 (srv_amd64_regobj): Likewise.
11936 (srv_amd64_linux_regobj): Likewise.
11937 (srv_i386_32bit_xmlfiles): Likewise.
11938 (srv_i386_64bit_xmlfiles): Likewise.
11939 (srv_i386_xmlfiles): Likewise.
11940 (srv_amd64_xmlfiles): Likewise.
11941 (srv_i386_linux_xmlfiles): Likewise.
11942 (srv_amd64_linux_xmlfiles): Likewise.
11943 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11944 srv_xmlfiles to $srv_i386_xmlfiles.
11945 (i[34567]86-*-mingw32ce*): Likewise.
11946 (i[34567]86-*-mingw*): Likewise.
11947 (i[34567]86-*-nto*): Likewise.
11948 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11949 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11950 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11951 (x86_64-*-linux*): Likewise.
11952
11953 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11954 (init_registers_amd64_linux): New.
11955 (x86_arch_setup): Replace init_registers_x86_64_linux with
11956 init_registers_amd64_linux.
11957
193f13e6
MK
119582010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11959
11960 * configure.ac: Check for libdl. If it is not available link against
11961 static libthread_db.
11962 * configure: Regenerate.
11963
85d721b8
PA
119642010-02-22 Pedro Alves <pedro@codesourcery.com>
11965
11966 PR9605
11967
11968 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11969 handing a read watchpoint.
11970 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11971
6076632b
DE
119722010-02-12 Doug Evans <dje@google.com>
11973
11974 * linux-low.c (linux_supports_tracefork_flag): Document.
11975 (linux_look_up_symbols): Add comment.
11976
3327ccf7
L
119772010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11978
11979 * regcache.c (supply_register): Clear regcache if buf is NULL.
11980
0718675c 119812010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11982 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11983
11984 * inferiors.c (find_inferior): Add function documentation.
11985 (unloaded_dll): Handle the case where the unloaded dll has not
11986 been previously registered in the dll list.
11987
177321bd
DJ
119882010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11989
11990 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11991 (thumb2_breakpoint): New.
11992 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11993
2b009048
DJ
119942010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11995
11996 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11997 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11998 breakpoints.
11999
3be029c7
PA
120002010-01-21 Pedro Alves <pedro@codesourcery.com>
12001
12002 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12003
18f5de3b
JK
120042010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12005
12006 * linux-s390-low.c (s390_collect_ptrace_register)
12007 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12008
3743bb4f
DE
120092010-01-21 Doug Evans <dje@google.com>
12010
14ce3065
DE
12011 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12012 (PTRACE_ARG4_TYPE): New macro.
12013 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12014 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12015 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12016 (usr_store_inferior_registers): Ditto.
12017 (linux_read_memory, linux_write_memory): Ditto.
12018 (linux_test_for_tracefork): Ditto.
12019
3743bb4f
DE
12020 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12021 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12022
8b315be5
PA
120232010-01-21 Pedro Alves <pedro@codesourcery.com>
12024
12025 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12026 target.
12027
85492558
PA
120282010-01-21 Pedro Alves <pedro@codesourcery.com>
12029
12030 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12031 prototype to take a regcache. Adjust.
12032
442ea881
PA
120332010-01-20 Pedro Alves <pedro@codesourcery.com>
12034
12035 * regcache.h (struct thread_info): Forward declare.
12036 (struct regcache): New.
12037 (new_register_cache): Adjust prototype.
12038 (get_thread_regcache): Declare.
12039 (free_register_cache): Adjust prototype.
12040 (registers_to_string, registers_from_string): Ditto.
12041 (supply_register, supply_register_by_name, collect_register)
12042 (collect_register_as_string, collect_register_by_name): Ditto.
12043 * regcache.c (struct inferior_regcache_data): Delete.
12044 (get_regcache): Rename to ...
12045 (get_thread_regcache): ... this. Adjust. Switch inferior before
12046 fetching registers.
12047 (regcache_invalidate_one): Adjust.
12048 (regcache_invalidate): Fix prototype.
12049 (new_register_cache): Return the new register cache.
12050 (free_register_cache): Change prototype.
12051 (realloc_register_cache): Adjust.
12052 (registers_to_string): Change prototype to take a regcache. Adjust.
12053 (registers_from_string): Ditto.
12054 (register_data): Ditto.
12055 (supply_register): Ditto.
12056 (supply_register_by_name): Ditto.
12057 (collect_register): Ditto.
12058 (collect_register_as_string): Ditto.
12059 (collect_register_by_name): Ditto.
12060 * server.c (process_serial_event): Adjust.
12061 * linux-low.h (regset_fill_func, regset_store_func): Change
12062 prototype.
12063 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12064 Change prototype.
12065 * linux-low.c (get_stop_pc): Adjust.
12066 (check_removed_breakpoint): Adjust.
12067 (linux_wait_for_event): Adjust.
12068 (linux_resume_one_lwp): Adjust.
12069 (fetch_register): Add regcache parameter. Adjust.
12070 (usr_store_inferior_registers): Ditto.
12071 (regsets_fetch_inferior_registers): Ditto.
12072 (regsets_store_inferior_registers): Ditto.
12073 (linux_fetch_registers, linux_store_registers): Ditto.
12074 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12075 regcache. Adjust.
43aaf8b6
PA
12076 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12077 Ditto.
442ea881
PA
12078 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12079 prototype to take a regcache.
12080 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12081 * remote-utils.c (convert_ascii_to_int, outreg)
12082 (prepare_resume_reply): Change prototype to take a regcache.
12083 Adjust.
12084 * target.h (struct target_ops) <fetch_registers, store_registers>:
12085 Change prototype to take a regcache.
12086 (fetch_inferior_registers, store_inferior_registers): Change
12087 prototype to take a regcache. Adjust.
12088 * proc-service.c (ps_lgetregs): Adjust.
12089 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12090 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12091 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12092 take a regcache. Adjust.
12093 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12094 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12095 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12096 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12097 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12098 (cris_cannot_fetch_register):
12099 (cris_breakpoint_at): Change prototype to take a regcache.
12100 Adjust.
12101 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12102 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12103 to take a regcache. Adjust.
12104 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12105 Adjust.
12106 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12107 take a regcache. Adjust.
12108 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12109 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12110 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12111 * linux-mips-low.c (mips_get_pc):
12112 (mips_set_pc): Change prototype to take a regcache. Adjust.
12113 (mips_reinsert_addr): Adjust.
12114 (mips_collect_register): Change prototype to take a regcache.
12115 Adjust.
12116 (mips_supply_register):
12117 (mips_collect_register_32bit, mips_supply_register_32bit)
12118 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12119 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12120 * linux-ppc-low.c (ppc_supply_ptrace_register)
12121 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12122 (parse_spufs_run): Adjust.
12123 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12124 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12125 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12126 take a regcache. Adjust.
12127 * linux-s390-low.c (s390_collect_ptrace_register)
12128 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12129 (s390_set_pc): Change prototype to take a regcache. Adjust.
12130 (s390_arch_setup): Adjust.
12131 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12132 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12133 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12134 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12135 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12136 regcache. Adjust.
12137 (sparc_breakpoint_at): Adjust.
12138 * linux-xtensa-low.c (xtensa_fill_gregset):
12139 (xtensa_store_gregset):
12140 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12141 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12142 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12143 prototype to take a regcache. Adjust.
12144 * win32-arm-low.c (arm_fetch_inferior_register)
12145 (arm_store_inferior_register): Change prototype to take a
12146 regcache. Adjust.
12147 * win32-i386-low.c (i386_fetch_inferior_register)
12148 (i386_store_inferior_register): Change prototype to take a
12149 regcache. Adjust.
12150 * win32-low.c (child_fetch_inferior_registers)
12151 (child_store_inferior_registers): Change prototype to take a
12152 regcache. Adjust.
12153 (win32_wait): Adjust.
12154 (win32_fetch_inferior_registers): Change prototype to take a
12155 regcache. Adjust.
12156 (win32_store_inferior_registers): Adjust.
12157 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12158 store_inferior_register>: Change prototype to take a regcache.
12159
60c3d7b0
DE
121602010-01-20 Doug Evans <dje@google.com>
12161
12162 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12163 #ifdef.
12164 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12165 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12166
dc146f7c
VP
121672010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12168
12169 * linux-low.c (linux_core_of_thread): New.
12170 (compare_ints, show_process, list_threads): New.
12171 (linux_qxfer_osdata): Report threads and cores.
12172 (linux_target_op): Register linux_core_of_thread.
12173 * remote-utils.c (prepare_resume_reply): Report the core.
12174 (buffer_xml_printf): Support %d specifier.
12175 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12176 New.
12177 (handle_query): Handle qXfer:threads. Announce availability
12178 thereof.
12179 * target.h (struct target_ops): New field core_of_thread.
12180
7803799a
UW
121812010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12182
12183 * Makefile.in (clean): Remove new generated files.
12184 (reg-s390.o, reg-s390.c): Remove rules.
12185 (reg-s390x.o, reg-s390x.c): Likewise.
12186 (s390-linux32.o, s390-linux32.c): Add rules.
12187 (s390-linux64.o, s390-linux64.c): Likewise.
12188 (s390x-linux64.o, s390x-linux64.c): Likewise.
12189 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12190 * linux-s390-low.c: Include <elf.h>.
12191 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12192 (init_registers_s390): Remove prototype.
12193 (init_registers_s390x): Likewise.
12194 (init_registers_s390_linux32): Add prototype.
12195 (init_registers_s390_linux64): Likewise.
12196 (init_registers_s390x_linux64): Likewise.
12197 (s390_num_regs_3264): New define.
12198 (s390_regmap_3264): New global variable.
12199 (s390_cannot_fetch_register): Remove obsolete check.
12200 (s390_cannot_store_register): Likewise.
12201 (s390_collect_ptrace_register): Handle upper/lower register halves.
12202 (s390_supply_ptrace_register): Likewise.
12203 (s390_fill_gregset): Update to register number changes.
12204 (s390_get_hwcap): New routine.
12205 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12206 Install appropriate regmap and register set.
12207
6e7ffa39
JB
122082010-01-01 Joel Brobecker <brobecker@adacore.com>
12209
12210 * server.c (gdbserver_version): Update copyright year to 2010.
12211 * gdbreplay.c (gdbreplay_version): Likewise.
12212
957f3f49
DE
122132009-12-28 Doug Evans <dje@google.com>
12214
12215 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12216 elf/external.h. Include <elf.h> instead but only if necessary.
12217
ca5c370d
PA
122182009-12-28 Pedro Alves <pedro@codesourcery.com>
12219
12220 * linux-low.c (linux_remove_process): Remove `detaching'
12221 parameter. Don't release/detach from thread_db here.
12222 (linux_kill): Release/detach from thread_db here, ...
12223 (linux_detach): ... and here, before actually detaching.
12224 (linux_wait_1): ... and here, when a process exits.
12225 * thread-db.c (any_thread_of): New.
12226 (thread_db_free): Switch the current inferior to a thread of the
12227 passed in process.
12228
4ee62156
DE
122292009-12-21 Doug Evans <dje@google.com>
12230
d90e6a88
DE
12231 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12232
c5f62d5f
DE
12233 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12234 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12235 warning ifndef __NR_tkill. Move setting of errno there too.
12236 Delete unnecessary resetting of errno after syscall.
12237 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12238
10e86dd7
DE
12239 * configure.ac: Check for dladdr.
12240 * config.in: Regenerate.
12241 * configure: Regenerate.
12242 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12243 (try_thread_db_load): Update.
12244
4ee62156
DE
12245 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12246
00f515da
DE
122472009-12-18 Doug Evans <dje@google.com>
12248
e9464885
DE
12249 * event-loop.c: Include unistd.h if it exists.
12250
07d4f67e
DE
12251 * linux-low.c (my_waitpid): Move definition away from being in
12252 between linux_tracefork_child/linux_test_for_tracefork.
12253
00f515da
DE
12254 * gdb_proc_service.h (psaddr_t): Fix type.
12255 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12256 signature to match glibc.
12257
1de1badb
DE
122582009-12-16 Doug Evans <dje@google.com>
12259
12260 * linux-low.c (linux_read_memory): Fix argument to read.
12261
aeeb81d1
PA
122622009-11-26 Pedro Alves <pedro@codesourcery.com>
12263
12264 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12265 events, don't leave current_inferior pointing at null.
12266
10357975
PA
122672009-11-26 Pedro Alves <pedro@codesourcery.com>
12268
12269 * win32-low.c (LOG): Delete.
12270 (OUTMSG): Output to stderr.
12271 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12272 on compile time LOG macro.
12273 (win32_wait): Fix debug output.
12274
cf6e3471
PA
122752009-11-26 Pedro Alves <pedro@codesourcery.com>
12276
12277 * win32-low.c (win32_add_one_solib): If the dll name is
12278 "ntdll.dll", prepend the system directory to the dll path.
12279
0c85e18e
MK
122802009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12281
12282 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12283
9ac544ce 122842009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12285 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12286
12287 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12288 * configure.ac: Check for __mcoldfire__ and set
12289 gdb_cv_m68k_is_coldfire.
12290 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12291 reg-cf.o and reg-m68k.o.
12292 * configure: Regenerated.
12293
fd7dd3e6
PA
122942009-11-16 Pedro Alves <pedro@codesourcery.com>
12295
12296 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12297 Pass it to thread_db_free.
12298 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12299 proper `detaching' argument to linux_remove_process.
12300 * linux-low.h (thread_db_free): Add `detaching' parameter.
12301 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12302 to thread_db_free.
12303 (thread_db_free): Add `detaching' parameter. Only
12304 call td_ta_clear_event if detaching from process.
12305
75aa492e
MK
123062009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12307
12308 * thread-db.c (thread_db_free): Fix typo.
12309
21e1bee4
PP
123102009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12311
12312 PR gdb/10838
12313 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12314
8838b45e
NS
123152009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12316
12317 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12318 with an i686 compiler.
12319 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12320 needed.
12321 * configure: Rebuilt.
12322
8a35fb51
SL
123232009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12324
12325 PR gdb/10783
12326
12327 * server.c (handle_search_memory_1): Correct read_addr initialization
12328 in loop for searching subsequent chunks.
12329
96f15937
PP
123302009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12331
12332 * configure.ac: New --with-libthread-db option.
12333 * thread-db.c: Allow direct dependence on libthread_db.
12334 (thread_db_free): Adjust.
12335 * config.in: Regenerate.
12336 * configure: Likewise.
889bf7c5 12337
5f7d1694
PP
123382009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12339
12340 PR gdb/10757
12341 * thread-db.c (attach_thread): New function.
12342 (maybe_attach_thread): Return success/failure.
12343 (find_new_threads_callback): Adjust.
889bf7c5
PA
12344 (thread_db_find_new_threads): Loop until no new threads.
12345
88e3b899
PA
123462009-10-13 Pedro Alves <pedro@codesourcery.com>
12347
12348 * proc-service.c (ps_lgetregs): Formatting.
12349
cdbfd419
PP
123502009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12351
12352 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12353 * configure.ac: Adjust.
12354 * linux-low.h (struct process_info_private): Move members to struct
12355 thread_db.
12356 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12357 * linux-low.c (linux_remove_process): Adjust.
12358 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12359 * server.c (handle_query): Move code ...
12360 (handle_monitor_command): ... here. New function.
12361 * target.h (struct target_ops): New member.
12362 * thread-db.c (struct thread_db): New.
12363 (libthread_db_search_path): New variable.
12364 (thread_db_create_event, thread_db_enable_reporting)
12365 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12366 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12367 (try_thread_db_load_1, dladdr_to_soname): New functions.
12368 (try_thread_db_load, thread_db_load_search): New functions.
12369 (thread_db_init): Search for libthread_db.
12370 (thread_db_free): New function.
12371 (thread_db_handle_monitor_command): Likewise.
12372 * config.in: Regenerate.
12373 * configure: Regenerate.
889bf7c5 12374
4168d2d6
UW
123752009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12376
12377 * spu-low.c (spu_kill): Wait for inferior to terminate.
12378 Call clear_inferiors.
12379 (spu_detach): Call clear_inferiors.
12380
81ecdfbb
RW
123812009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12382
12383 * aclocal.m4: Regenerate.
12384 * config.in: Likewise.
12385 * configure: Likewise.
12386
0b9ff2c0
UW
123872009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12388
12389 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12390 (parse_spufs_run): New function.
12391 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12392 (ppc_breakpoint_at): Handle SPU breakpoints.
12393
efcbbd14
UW
123942009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12395
12396 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12397 (SPUFS_MAGIC): Define.
12398 (spu_enumerate_spu_ids): New function.
12399 (linux_qxfer_spu): New function.
12400 (linux_target_ops): Install linux_qxfer_spu.
12401
f4d9bade
UW
124022009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12403
12404 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12405 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12406 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12407 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12408 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12409 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12410 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12411 (init_registers_powerpc_cell32l): Add prototype.
12412 (init_registers_powerpc_cell64l): Likewise.
12413 (ppc_arch_setup): Detect Cell/B.E. architecture.
12414
96e946ca
RW
124152009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12416
12417 * Makefile.in (datarootdir): New variable.
12418
58d6951d
DJ
124192009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12420
12421 * linux-low.c (linux_write_memory): Update debugging output.
12422 * Makefile.in (clean): Add new descriptions.
12423 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12424 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12425 * configure.srv: Add new files for arm*-*-linux*.
12426 * linux-arm-low.c: Add new declarations.
12427 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12428 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12429 (HWCAP_VFPv3D16): New.
12430 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12431 instead of __IWMMXT__.
12432 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12433 (arm_arch_setup): New.
12434 (target_regsets): Remove #ifdef. Add VFP regset.
12435 (the_low_target): Use arm_arch_setup.
12436
12b42a12
DJ
124372009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12438
12439 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12440 the main thread again.
12441
ac8c974e
AR
124422009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12443
12444 Adding Neutrino gdbserver.
12445 * configure: Regenerated.
12446 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12447 * configure.srv (i[34567]86-*-nto*): New target.
12448 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12449 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12450 (nto_comctrl) [__QNX__]: New function.
12451 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12452
4424e0c3 124532009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12454
12455 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12456 srv_tgtobj.
12457
912cf4ba
PA
124582009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12459 Pedro Alves <pedro@codesourcery.com>
12460
12461 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12462 don't support CONTEXT_EXTENDED_REGISTERS.
12463 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12464 (the_low_target): Install them.
12465 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12466 failing with ERROR_PIPE_NOT_CONNECTED.
12467
aa5ca48f
DE
124682009-06-30 Doug Evans <dje@google.com>
12469 Pierre Muller <muller@ics.u-strasbg.fr>
12470
12471 Add h/w watchpoint support to x86-linux, win32-i386.
12472 * Makefile.in (SFILES): Add i386-low.c
12473 (i386_low_h): Define.
12474 (i386-low.o): Add dependencies.
12475 (linux-x86-low.o): Add i386-low.h dependency.
12476 (win32-i386-low.o): Ditto.
12477 * i386-low.c: New file.
12478 * i386-low.h: New file.
12479 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12480 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12481 * linux-low.c (linux_add_process): Initialize arch_private.
12482 (linux_remove_process): Free arch_private.
12483 (add_lwp): Initialize arch_private.
12484 (delete_lwp): Free arch_private.
12485 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12486 provided.
12487 * linux-low.h (process_info_private): New member arch_private.
12488 (lwp_info): New member arch_private.
12489 (linux_target_ops): New members new_process, new_thread,
12490 prepare_to_resume.
12491 (ptid_of): New macro.
12492 * linux-x86-low.c: Include stddef.h, i386-low.h.
12493 (arch_process_info): New struct.
12494 (arch_lwp_info): New struct.
12495 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12496 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12497 (i386_dr_low_get_status): New function.
12498 (x86_insert_point, x86_remove_point): New functions.
12499 (x86_stopped_by_watchpoint): New function.
12500 (x86_stopped_data_address): New function.
12501 (x86_linux_new_process, x86_linux_new_thread): New functions.
12502 (x86_linux_prepare_to_resume): New function.
12503 (the_low_target): Add entries for insert_point, remove_point,
12504 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12505 prepare_to_resume.
12506 * server.c (debug_hw_points): New global.
12507 (monitor_show_help): Document set debug-hw-points.
12508 (handle_query): Process "set debug-hw-points".
12509 * server.h (debug_hw_points): Declare.
12510 (paddress): Declare.
12511 * utils.c (NUMCELLS, CELLSIZE): New macros.
12512 (get_sell, xsnprintf, paddress): New functions.
12513 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12514 remove_point, stopped_by_watchpoint, stopped_data_address.
12515 * win32-i386-low.c: Include i386-low.h.
12516 (debug_reg_state): Replaces dr.
12517 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12518 (i386_dr_low_get_status): New function.
12519 (i386_insert_point, i386_remove_point): New functions.
12520 (i386_stopped_by_watchpoint): New function.
12521 (i386_stopped_data_address): New function.
12522 (i386_initial_stuff): Update.
12523 (get_thread_context,set_thread_context,i386_thread_added): Update.
12524 (the_low_target): Add entries for insert_point,
12525 remove_point, stopped_by_watchpoint, stopped_data_address.
12526 * win32-low.c (win32_insert_watchpoint): New function.
12527 (win32_remove_watchpoint): New function.
12528 (win32_stopped_by_watchpoint): New function.
12529 (win32_stopped_data_address): New function.
12530 (win32_target_ops): Add entries for insert_watchpoint,
12531 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12532 * win32-low.h (win32_target_ops): New members insert_point,
12533 remove_point, stopped_by_watchpoint, stopped_data_address.
12534
d993e290
PA
125352009-06-25 Pedro Alves <pedro@codesourcery.com>
12536
12537 * server.c (process_serial_event): Re-return unsupported, not
12538 error, if the type isn't recognized. Re-allow supporting only
12539 insert or remove packets. Also call require_running for
12540 breakpoints. Add missing break statement to default case. Tidy.
12541 * target.h (struct target_ops): Rename insert_watchpoint to
12542 insert_point, and remove_watchpoint to remove_point.
12543
12544 * linux-low.h (struct linux_target_ops): Likewise.
12545 * linux-low.c (linux_insert_watchpoint): Rename to ...
12546 (linux_insert_point): ... this. Adjust.
12547 (linux_remove_watchpoint): Rename to ...
12548 (linux_remove_point): ... this. Adjust.
12549 (linux_target_ops): Adjust.
12550 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12551 (cris_insert_point): ... this.
12552 (cris_remove_watchpoint): Rename to ...
12553 (cris_remove_point): ... this.
12554 (the_low_target): Adjust.
12555
0f54c268
PM
125562009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12557
12558 * server.c (handle_v_kill): Pass signal_pid to
12559 kill_inferior if multi_process is zero.
12560
c6314022
AR
125612009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12562
12563 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12564 * target.h (target_ops): Comment for *_watchpoint to make it clear
12565 the functions can get types '0' and '1'.
12566
4463ce24
AR
125672009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12568
12569 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12570 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12571 * regcache.c (get_regcache): Likewise.
12572 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12573 * win32-low.c (child_fetch_inferior_registers): Remove check for
12574 regno 0.
12575
cf8fd78b
PA
125762009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12577 Pedro Alves <pedro@codesourcery.com>
12578
12579 * target.h (struct target_ops) <supports_multi_process>: New
12580 callback.
12581 (target_supports_multi_process): New.
12582 * server.c (handle_query): Even if GDB reports support, only
12583 enable multi-process if the target also supports it. Report
12584 multi-process support only if the target backend supports it.
12585 * linux-low.c (linux_supports_multi_process): New function.
12586 (linux_target_ops): Install it as target_supports_multi_process
12587 callback.
12588
47c0c975
DE
125892009-05-24 Doug Evans <dje@google.com>
12590
e09875d4
DE
12591 Global renaming of find_thread_pid to find_thread_ptid.
12592 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12593 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12594 All callers updated.
12595
e27d73f6
DE
12596 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12597 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12598 directly.
12599
47c0c975
DE
12600 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12601 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12602 (linux_resume_one_lwp): Ditto.
12603
2acc282a
DE
126042009-05-23 Doug Evans <dje@google.com>
12605
12606 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12607 from struct inferior_list_entry * to struct lwp_info *.
12608 All callers updated.
12609
9f1036c1
DE
126102009-05-13 Doug Evans <dje@google.com>
12611
12612 * linux-x86-low.c: Don't include assert.h.
12613 (x86_siginfo_fixup): Use fatal, not assert.
12614 (x86_arch_setup): Fix comment.
12615
d0722149
DE
126162009-05-12 Doug Evans <dje@google.com>
12617
12618 Biarch support for i386/amd64 gdbserver.
12619 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12620 Add linux-x86-low.c.
12621 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12622 (linux-x86-low.o): Add.
12623 * linux-x86-64-low.c: Delete.
12624 * linux-i386-low.c: Delete.
12625 * linux-x86-low.c: New file.
12626 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12627 linux-x86-low.o.
12628 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12629 linux-x86-low.o.
12630 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12631 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12632 (linux_child_pid_to_exec_file): New function.
12633 (elf_64_header_p, elf_64_file_p): New functions.
12634 (siginfo_fixup): New function.
12635 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12636 give target a chance to convert layout.
12637 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12638 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12639
fdeb2a12
DE
126402009-05-07 Doug Evans <dje@google.com>
12641
12642 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12643 (regsets_store_inferior_registers): Ditto.
12644
a6dbe5df
PA
126452009-05-06 Pedro Alves <pedro@codesourcery.com>
12646
12647 PR server/10048
12648
12649 * linux-low.c (must_set_ptrace_flags): Delete.
12650 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12651 of the global.
12652 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12653 `lwp->must_set_ptrace_flags' instead.
ba42693b 12654 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12655 (linux_wait_1): ... not here.
12656
5091eb23
DE
126572009-04-30 Doug Evans <dje@google.com>
12658
9f767825
DE
12659 * inferiors.c (started_inferior_callback): New function.
12660 (attached_inferior_callback): New function.
12661 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12662 * server.c (print_started_pid, print_attached_pid): New functions.
12663 (detach_or_kill_for_exit): New function.
12664 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12665 * server.h (have_started_inferiors_p): Declare.
12666 (have_attached_inferiors_p): Declare.
12667
5091eb23
DE
12668 * inferiors.c (remove_process): Fix memory leak, free process.
12669 * linux-low.c (linux_remove_process): New function.
12670 (linux_kill): Call it instead of remove_process.
12671 (linux_detach, linux_wait_1): Ditto.
12672
155c8968
PA
126732009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12674
12675 * configure.srv: Add x86 Windows CE target.
12676
7fe519cb
UW
126772009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12678
12679 * inferiors.c (get_thread_process): Make global.
12680 * server.h (get_thread_process): Add prototype.
12681 * thread-db.c (find_one_thread): Use get_thread_process
12682 instead of current_process.
12683 (thread_db_get_tls_address): Do not crash if called when
12684 thread layer is not yet initialized.
12685
5472f405
UW
126862009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12687
12688 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12689 * spu-low.c (current_tid): Rename to ...
12690 (current_ptid): ... this.
12691 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12692 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12693 ptid_get_lwp (current_ptid) instead of current_tid.
12694 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12695 instead of current_tid. Use find_process_pid to verify pid
12696 argument is valid. Pass proper argument to remove_process.
12697 (spu_thread_alive): Compare current_ptid instead of current_tid.
12698 (spu_resume): Likewise.
12699
55ac2b99
PA
127002009-04-02 Pedro Alves <pedro@codesourcery.com>
12701
12702 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12703 variable.
12704
95954743
PA
127052009-04-01 Pedro Alves <pedro@codesourcery.com>
12706
12707 Implement the multiprocess extensions, and add linux multiprocess
12708 support.
12709
12710 * server.h (ULONGEST): Declare.
12711 (struct ptid, ptid_t): New.
12712 (minus_one_ptid, null_ptid): Declare.
12713 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12714 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12715 (struct inferior_list_entry): Change `id' type from unsigned from
12716 to ptid_t.
12717 (struct sym_cache, struct breakpoint, struct
12718 process_info_private): Forward declare.
12719 (struct process_info): Declare.
12720 (current_process): Declare.
12721 (all_processes): Declare.
12722 (initialize_inferiors): Declare.
12723 (add_thread): Adjust to use ptid_t.
12724 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12725 (add_process, remove_process, find_thread_pid): Declare.
12726 (find_inferior_id): Adjust to use ptid_t.
12727 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12728 (multi_process): Declare.
12729 (push_event): Adjust to use ptid_t.
12730 (read_ptid, write_ptid): Declare.
12731 (prepare_resume_reply): Adjust to use ptid_t.
12732 (clear_symbol_cache): Declare.
12733 * inferiors.c (all_processes): New.
12734 (null_ptid, minus_one_ptid): New.
12735 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12736 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12737 (add_thread): Change unsigned long to ptid. Remove gdb_id
12738 parameter. Adjust.
12739 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12740 (gdb_id_to_thread): Rename to ...
12741 (find_thread_pid): ... this. Change unsigned long to ptid.
12742 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12743 (loaded_dll, pull_pid_from_list): Adjust.
12744 (add_process, remove_process, find_process_pid)
12745 (get_thread_process, current_process, initialize_inferiors): New.
12746 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12747 (struct target_waitstatus) <related_pid>: Ditto.
12748 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12749 return type to int.
12750 (struct target_ops) <join>: Add `pid' argument.
12751 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12752 (struct target_ops) <wait>: Add `ptid' field. Change return type
12753 to ptid.
12754 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12755 (mywait): Add `ptid' argument. Change return type to ptid_t.
12756 (target_pid_to_str): Declare.
12757 * target.c (set_desired_inferior): Adjust to use ptids.
12758 (mywait): Add new `ptid' argument. Adjust.
12759 (target_pid_to_str): New.
12760 * mem-break.h (free_all_breakpoints): Declare.
12761 * mem-break.c (breakpoints): Delelete.
12762 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12763 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12764 to use per-process breakpoint list.
12765 (free_all_breakpoints): New.
12766 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12767 (symbol_cache, all_symbols_looked_up): Delete.
12768 (hexchars): New.
12769 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12770 read_ptid): New.
12771 (prepare_resume_reply): Change ptid argument's type from unsigned
12772 long to ptid_t. Adjust. Implement W;process and X;process.
12773 (free_sym_cache, clear_symbol_cache): New.
12774 (look_up_one_symbol): Adjust to per-process symbol cache. *
12775 * server.c (cont_thread, general_thread, step_thread): Change type
12776 to ptid_t.
12777 (attached): Delete.
12778 (multi_process): New.
12779 (last_ptid): Change type to ptid_t.
12780 (struct vstop_notif) <ptid>: Change type to ptid_t.
12781 (queue_stop_reply, push_event): Change `ptid' argument's type to
12782 ptid_t.
12783 (discard_queued_stop_replies): Add `pid' argument.
12784 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12785 changes. Don't reference the `attached' global.
12786 (attach_inferior): Adjust to mywait interface changes.
12787 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12788 features. Handle and report "multiprocess+". Handle
12789 "qAttached:PID".
12790 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12791 changes.
12792 (handle_v_kill): New.
12793 (handle_v_stopped): Adjust to use target_pid_to_str.
12794 (handle_v_requests): Allow multiple attaches and runs when
12795 multiprocess extensions are in effect. Handle "vKill".
12796 (myresume): Adjust to use ptids.
12797 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12798 (handle_status): Adjust to discard_queued_stop_replies interface
12799 change.
12800 (first_thread_of, kill_inferior_callback)
12801 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12802 (main): Call initialize_inferiors. Adjust to use ptids, killing
12803 and detaching from all inferiors. Handle multiprocess packet
12804 variants.
12805 * linux-low.h: Include gdb_proc_service.h.
12806 (struct process_info_private): New.
12807 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12808 <lwpid_of>: Use ptid_get_lwp.
12809 (get_lwp_thread): Adjust.
12810 (struct lwp_info): Add `dead' member.
12811 (find_lwp_pid): Declare.
12812 * linux-low.c (thread_db_active): Delete.
12813 (new_inferior): Adjust comment.
12814 (inferior_pid): Delete.
12815 (linux_add_process): New.
12816 (handle_extended_wait): Adjust.
12817 (add_lwp): Change unsigned long to ptid.
12818 (linux_create_inferior): Add process to processes table. Adjust
12819 to use ptids. Don't set new_inferior here.
12820 (linux_attach_lwp): Rename to ...
12821 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12822 it. Adjust to use ptids.
12823 (linux_attach_lwp): New.
12824 (linux_attach): Add process to processes table. Don't set
12825 new_inferior here.
12826 (struct counter): New.
12827 (second_thread_of_pid_p, last_thread_of_process_p): New.
12828 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12829 multiple processes.
12830 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12831 processes. Remove process from process table.
12832 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12833 to multiple processes.
12834 (any_thread_of): New.
12835 (linux_detach): Add `pid' argument, and handle it. Remove process
12836 from processes table.
12837 (linux_join): Add `pid' argument. Handle it.
12838 (linux_thread_alive): Change unsighed long argument to ptid_t.
12839 Consider dead lwps as not being alive.
12840 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12841 threads we're not interested in.
12842 (same_lwp, find_lwp_pid): New.
12843 (linux_wait_for_lwp): Change `pid' argument's type from int to
12844 ptid_t. Adjust.
12845 (linux_wait_for_event): Rename to ...
12846 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12847 from int to ptid_t. Adjust.
12848 (linux_wait_for_event): New.
12849 (linux_wait_1): Add `ptid' argument. Change return type to
12850 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12851 that exit from the process table.
12852 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12853 Adjust.
12854 (mark_lwp_dead): New.
12855 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12856 stopping all threads, mark its main lwp as dead.
12857 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12858 ptids.
12859 (fetch_register, usr_store_inferior_registers)
12860 (regsets_fetch_inferior_registers)
12861 (regsets_store_inferior_registers, linux_read_memory)
12862 (linux_write_memory): Inline `inferior_pid'.
12863 (linux_look_up_symbols): Adjust to use per-process
12864 `thread_db_active'.
12865 (linux_request_interrupt): Adjust to use ptids.
12866 (linux_read_auxv): Inline `inferior_pid'.
12867 (initialize_low): Don't reference thread_db_active.
12868 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12869 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12870 (ps_getpid): Return the pid of the current inferior.
12871 * thread-db.c (proc_handle, thread_agent): Delete.
12872 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12873 per-process data.
12874 (find_one_thread): Change argument type to ptid_t. Adjust to
12875 per-process data.
12876 (maybe_attach_thread): Adjust to per-process data and ptids.
12877 (thread_db_find_new_threads): Ditto.
12878 (thread_db_init): Ditto.
12879 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12880 processes table. Adjust to use ptids.
12881 (spu_kill, spu_detach): Adjust interface. Remove process from
12882 processes table.
12883 (spu_join, spu_thread_alive): Adjust interface.
12884 (spu_wait): Adjust interface. Remove process from processes
12885 table. Adjust to use ptids.
12886 * win32-low.c (current_inferior_tid): Delete.
12887 (current_inferior_ptid): New.
12888 (debug_event_ptid): New.
12889 (thread_rec): Take a ptid. Adjust.
12890 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12891 (child_delete_thread): Ditto.
12892 (do_initial_child_stuff): Add `attached' argument. Add process to
12893 processes table.
12894 (child_fetch_inferior_registers, child_store_inferior_registers):
12895 Adjust.
12896 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12897 (win32_attach): Pass 1 to do_initial_child_stuff.
12898 (win32_kill): Adjust interface. Remove process from processes
12899 table.
12900 (win32_detach): Ditto.
12901 (win32_join): Adjust interface.
12902 (win32_thread_alive): Take a ptid.
12903 (win32_resume): Adjust to use ptids.
12904 (get_child_debug_event): Ditto.
12905 (win32_wait): Adjust interface. Remove exiting process from
12906 processes table.
12907
bd99dc85
PA
129082009-04-01 Pedro Alves <pedro@codesourcery.com>
12909
12910 Non-stop mode support.
12911
12912 * server.h (non_stop): Declare.
12913 (gdb_client_data, handler_func): Declare.
12914 (delete_file_handler, add_file_handler, start_event_loop):
12915 Declare.
12916 (handle_serial_event, handle_target_event, push_event)
12917 (putpkt_notif): Declare.
12918 * target.h (enum resume_kind): New.
12919 (struct thread_resume): Replace `step' field by `kind' field.
12920 (TARGET_WNOHANG): Define.
12921 (struct target_ops) <wait>: Add `options' argument.
12922 <supports_non_stop, async, start_non_stop>: New fields.
12923 (target_supports_non_stop, target_async): New.
12924 (start_non_stop): Declare.
12925 (mywait): Add `options' argument.
12926 * target.c (mywait): Add `options' argument. Print child exit
12927 notifications here.
12928 (start_non_stop): New.
12929 * server.c (non_stop, own_buf, mem_buf): New globals.
12930 (struct vstop_notif): New.
12931 (notif_queue): New global.
12932 (queue_stop_reply, push_event, discard_queued_stop_replies)
12933 (send_next_stop_reply): New.
12934 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12935 interface changes.
12936 (attach_inferior): In non-stop mode, don't wait for the target
12937 here.
12938 (handle_general_set): Handle QNonStop.
12939 (handle_query): When handling qC, return the current general
12940 thread, instead of the first thread of the list.
12941 (handle_query): If the backend supports non-stop mode, include
12942 QNonStop+ in the qSupported query response.
12943 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12944 and non-stop mode.
12945 (handle_v_attach, handle_v_run): Handle non-stop mode.
12946 (handle_v_stopped): New.
12947 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12948 (myresume): Adjust to use resume_kind. Handle non-stop.
12949 (queue_stop_reply_callback): New.
12950 (handle_status): Handle non-stop mode.
12951 (main): Clear non_stop flag on reconnection. Use the event-loop.
12952 Refactor serial protocol handling from here ...
12953 (process_serial_event): ... to this new function. When GDB
12954 selects any thread, select one here. In non-stop mode, wait until
12955 GDB acks all pending events before exiting.
12956 (handle_serial_event, handle_target_event): New.
12957 * remote-utils.c (remote_open): Install remote_desc in the event
12958 loop.
12959 (remote_close): Remove remote_desc from the event loop.
12960 (putpkt_binary): Rename to...
12961 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12962 (putpkt_binary): New as wrapper around putpkt_binary_1.
12963 (putpkt_notif): New.
12964 (prepare_resume_reply): In non-stop mode, don't change the
12965 general_thread.
12966 * event-loop.c: New.
12967 * Makefile.in (OBJ): Add event-loop.o.
12968 (event-loop.o): New rule.
12969
12970 * linux-low.h (pid_of): Moved here.
12971 (lwpid_of): New.
12972 (get_lwp_thread): Use lwpid_of.
12973 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12974 * linux-low.c (pid_of): Delete.
12975 (inferior_pid): Use lwpid_of.
12976 (linux_event_pipe): New.
12977 (target_is_async_p): New.
12978 (delete_lwp): New.
12979 (handle_extended_wait): Use lwpid_of.
12980 (add_lwp): Don't set lwpid field.
12981 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12982 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12983 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12984 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12985 first. Adjust to linux_wait_for_event interface changes. Use
12986 lwpid_of.
12987 (linux_detach): Don't delete the main lwp here.
12988 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12989 (status_pending_p): Don't consider explicitly suspended lwps.
12990 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12991 pointer. Add OPTIONS argument. Change return type to int. Use
12992 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12993 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12994 pointer. Add status pointer argument. Return a pid instead of a
12995 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12996 changes. In non-stop mode, don't switch to a random thread.
12997 (linux_wait): Rename to...
12998 (linux_wait_1): ... this. Add target_options argument, and handle
12999 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13000 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13001 clean exit and signal exit code. Don't stop all threads in
13002 non-stop mode. In all-stop mode, only stop all threads when
13003 reporting a stop to GDB. Handle explicit thread stop requests.
13004 (async_file_flush, async_file_mark): New.
13005 (linux_wait): New.
13006 (send_sigstop): Use lwpid_of.
13007 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13008 interface changes. In non-stop mode, don't switch to a random
13009 thread.
13010 (linux_resume_one_lwp): Use lwpid_of.
13011 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13012 (linux_resume_one_thread): ... this. Handle resume_stop. In
13013 non-stop mode, don't look for pending flag in all threads.
13014 (resume_status_pending_p): Don't consider explicitly suspended
13015 threads.
13016 (my_waitpid): Reimplement. Emulate __WALL.
13017 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13018 Use lwpid_of.
13019 (sigchld_handler, linux_supports_non_stop, linux_async)
13020 (linux_start_non_stop): New.
13021 (linux_target_ops): Register linux_supports_non_stop, linux_async
13022 and linux_start_non_stop.
13023 (initialize_low): Install SIGCHLD handler.
13024 * thread-db.c (thread_db_create_event, find_one_thread)
13025 (thread_db_get_tls_address): Use lwpid_of.
13026 * win32-low.c (win32_detach): Adjust to use resume_kind.
13027 (win32_wait): Add `options' argument.
13028 * spu-low.c (spu_resume): Adjust to use resume_kind.
13029 (spu_wait): Add `options' argument.
13030
5b1c542e
PA
130312009-04-01 Pedro Alves <pedro@codesourcery.com>
13032
13033 Decouple target code from remote protocol.
13034
13035 * target.h (enum target_waitkind): New.
13036 (struct target_waitstatus): New.
13037 (struct target_ops) <wait>: Return an unsigned long. Take a
13038 target_waitstatus pointer instead of a char pointer.
13039 (mywait): Likewise.
13040 * target.c (mywait): Change prototype to return an unsigned long.
13041 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13042 * server.h (thread_from_wait, old_thread_from_wait): Delete
13043 declarations.
13044 (prepare_resume_reply): Change prototype to take a
13045 target_waitstatus.
13046 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13047 (last_status, last_ptid): New.
13048 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13049 pid instead of a signal.
13050 (attach_inferior): Remove "status" and "signal" parameters.
13051 Adjust.
13052 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13053 not as an address.
13054 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13055 (handle_v_requests, myresume): Remove "status" and "signal"
13056 parameters. Adjust.
13057 (handle_status): New.
13058 (main): Delete local `status'. Adjust.
13059 * remote-utils.c: Include target.h.
13060 (prepare_resume_reply): Change prototype to take a
13061 target_waitstatus. Adjust.
13062
13063 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13064 interface.
13065 * spu-low.c (spu_wait): Adjust.
13066 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13067 Delete.
13068 (win32_wait): Adjust.
13069
2bd7c093
PA
130702009-04-01 Pedro Alves <pedro@codesourcery.com>
13071
13072 * target.h (struct thread_resume): Delete leave_stopped member.
13073 (struct target_ops): Add a `n' argument to the `resume' callback.
13074 * server.c (start_inferior): Adjust.
13075 (handle_v_cont, myresume): Adjust.
13076 * linux-low.c (check_removed_breakpoint): Adjust to resume
13077 interface change, and to removed leave_stopped field.
13078 (resume_ptr): Delete.
13079 (struct thread_resume_array): New.
13080 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13081 resume interface change.
13082 (linux_continue_one_thread, linux_queue_one_thread)
13083 (resume_status_pending_p): Check if the resume field is NULL
13084 instead of checking the leave_stopped member.
13085 (linux_resume): Adjust to the target resume interface change.
13086 * spu-low.c (spu_resume): Adjust to the target resume interface
13087 change.
13088 * win32-low.c (win32_detach, win32_resume): Ditto.
13089
c35fafde
PA
130902009-04-01 Pedro Alves <pedro@codesourcery.com>
13091
13092 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13093 flag.
13094 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13095 pending.
13096 (linux_continue_one_thread): Only preserve the stepping flag if
13097 there's a pending breakpoint.
13098
0a59d50b
PA
130992009-03-31 Pedro Alves <pedro@codesourcery.com>
13100
13101 * server.c (main): After the inferior having exited, call
13102 remote_close before exiting gdbserver.
13103
f04c6d38
TJB
131042009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13105
13106 Fix size of FPSCR in Power 7 processors.
13107 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13108 (PPC_FEATURE_HAS_DFP): New #define.
13109 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13110 size of the FPSCR.
13111
78e5cee6
PA
131122009-03-23 Pedro Alves <pedro@codesourcery.com>
13113
13114 * server.c (handle_query) Whitespace and formatting.
13115
1b3f6016
PA
131162009-03-22 Pedro Alves <pedro@codesourcery.com>
13117
13118 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13119 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13120 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13121 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13122 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13123 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13124 Makefile.in, configure.ac: Fix whitespace throughout.
13125 * configure: Regenerate.
13126
a07b2135
PA
131272009-03-22 Pedro Alves <pedro@codesourcery.com>
13128
13129 * inferiors.c (find_inferior): Make it safe for the callback
13130 function to delete the currently iterated inferior.
13131
67cc2626
PA
131322009-03-22 Pedro Alves <pedro@codesourcery.com>
13133
13134 * Makefile.in (linuw_low_h): Move higher.
13135 (thread-db.o): Depend on $(linux_low_h).
13136
54a0b537
PA
131372009-03-17 Pedro Alves <pedro@codesourcery.com>
13138
13139 Rename "process" to "lwp" throughout.
13140
13141 * linux-low.c (all_processes): Rename to...
13142 (all_lwps): ... this.
13143 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13144 (add_process): Rename to ...
13145 (add_lwp): ... this. Adjust.
13146 (linux_create_inferior): Adjust.
13147 (linux_attach_lwp): Adjust.
13148 (linux_attach): Adjust.
13149 (linux_kill_one_process): Rename to ...
13150 (linux_kill_one_lwp): ... this. Adjust.
13151 (linux_kill): Adjust.
13152 (linux_detach_one_process): Rename to ...
13153 (linux_detach_one_lwp): ... this. Adjust.
13154 (linux_detach): Adjust.
13155 (check_removed_breakpoint): Adjust.
13156 (status_pending_p): Adjust.
13157 (linux_wait_for_process): Rename to ...
13158 (linux_wait_for_lwp): ... this. Adjust.
13159 (linux_wait_for_event): Adjust.
13160 (send_sigstop): Adjust.
13161 (wait_for_sigstop): Adjust.
13162 (stop_all_processes): Rename to ...
13163 (stop_all_lwps): ... this.
13164 (linux_resume_one_process): Rename to ...
13165 (linux_resume_one_lwp): ... this. Adjust.
13166 (linux_set_resume_request, linux_continue_one_thread)
13167 (linux_queue_one_thread, resume_status_pending_p)
13168 (usr_store_inferior_registers, regsets_store_inferior_registers)
13169 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13170 Adjust.
13171 * linux-low.h (get_process): Rename to ...
13172 (get_lwp): ... this. Adjust.
13173 (get_thread_process): Rename to ...
13174 (get_thread_lwp): ... this. Adjust.
13175 (get_process_thread): Rename to ...
13176 (get_lwp_thread): ... this. Adjust.
13177 (struct process_info): Rename to ...
13178 (struct lwp_info): ... this.
13179 (all_processes): Rename to ...
13180 (all_lwps): ... this.
13181 * proc-service.c (ps_lgetregs): Adjust.
13182 * thread-db.c (thread_db_create_event, find_one_thread)
13183 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13184
0b16c5cf
PA
131852009-03-14 Pedro Alves <pedro@codesourcery.com>
13186
13187 * server.c (handle_query): Handle "qAttached".
13188
32de4b9d
NS
131892009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13190
13191 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13192 GPLv3, update license URL.
13193
2aecd87f
DE
131942009-03-01 Doug Evans <dje@google.com>
13195
93efd302 13196 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13197 (server_h): Add gdb_signals.h.
13198 (signals.o): Update.
13199 * server.h (target_signal_from_host,target_signal_to_host_p)
13200 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13201
86b1f9c5
PM
132022009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13203
13204 * remote-utils.c (getpkt): Also generate remote-debug
13205 information if noack_mode is set.
13206
4aa995e1
PA
132072009-02-06 Pedro Alves <pedro@codesourcery.com>
13208
13209 * server.c (handle_query): Report qXfer:siginfo:read and
13210 qXfer:siginfo:write as supported and handle them.
13211 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13212 * linux-low.c (linux_xfer_siginfo): New.
13213 (linux_target_ops): Set it.
13214
62709adf
PA
132152009-01-26 Pedro Alves <pedro@codesourcery.com>
13216
13217 * server.c (gdbserver_usage): Mention --remote-debug.
13218 (main): Accept '--remote-debug' switch.
13219
aef93bd7
DE
132202009-01-18 Doug Evans <dje@google.com>
13221
13222 * regcache.c (new_register_cache): No need to check result of xcalloc.
13223 * server.c (handle_search_memory): Back out calls to xmalloc,
13224 result is checked and error is returned to user upon failure.
13225 (handle_query): Ditto. Add more checks for result of malloc.
13226 (handle_v_cont): Check result of malloc, report error back to
13227 user upon failure.
13228 (handle_v_run): Ditto. Call freeargv.
13229 * server.h (freeargv): Declare.
13230 * utils.c (freeargv): New fn.
13231
54363045
DE
132322009-01-15 Doug Evans <dje@google.com>
13233
f626972c
DE
13234 * gdbreplay.c (perror_with_name): Make arg const char *.
13235 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13236 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13237 * utils.c (perror_with_name): Make arg const char *.
54363045 13238
18aae699
PA
132392009-01-14 Pedro Alves <pedro@codesourcery.com>
13240
13241 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13242 when handling a EXIT_PROCESS_DEBUG_EVENT.
13243
ff703abe
JB
132442009-01-06 Joel Brobecker <brobecker@adacore.com>
13245
13246 * gdbreplay.c (gdbreplay_version): Update copyright year.
13247 * server.c (gdbserver_version): Likewise.
13248
f21cc1a2 132492009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13250
13251 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13252 (handle_extended_wait): Improve comment.
0e21c1ec 13253
bca929d3
DE
132542008-12-13 Doug Evans <dje@google.com>
13255
13256 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13257 * server.h (ATTR_MALLOC): New macro.
13258 (xmalloc,xcalloc,xstrdup): Declare.
13259 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13260 * inferiors.c: Ditto.
13261 * linux-low.c: Ditto.
13262 * mem-break.c: Ditto.
13263 * regcache.c: Ditto.
13264 * remote-utils.c: Ditto.
13265 * server.c: Ditto.
13266 * target.c: Ditto.
13267 * win32-low.c: Ditto.
13268
97438e3f
DE
132692008-12-12 Doug Evans <dje@google.com>
13270
896c7fbb
DE
13271 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13272 in debugging printf.
13273
97438e3f
DE
13274 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13275
e3b886f8
DE
132762008-12-09 Doug Evans <dje@google.com>
13277
13278 * linux-low.h (struct process_info): Delete member tid, unused.
13279 * thread-db.c (find_one_thread): Update.
13280 (maybe_attach_thread): Update.
13281
07e059b5
VP
132822008-12-02 Pedro Alves <pedro@codesourcery.com>
13283
889bf7c5
PA
13284 * target.h (struct target_ops): Add qxfer_osdata member.
13285 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13286 and dirent.h.
13287 (linux_qxfer_osdata): New functions.
13288 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13289 callback.
13290 * server.c (handle_query): Handle "qXfer:osdata:read:".
13291 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13292 (buffer_xml_printf): New functions.
13293 * server.h (struct buffer): New.
13294 (buffer_grow_str, buffer_grow_str0): New macros.
13295 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13296 (buffer_xml_printf): Declare.
07e059b5 13297
4cab47ab
DE
132982008-11-24 Doug Evans <dje@google.com>
13299
13300 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13301
f142445f
DJ
133022008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13303
13304 * server.c (handle_v_run): Always use the supplied argument list.
13305
d0107bb6 133062008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13307
d0107bb6
BW
13308 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13309 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13310
2c4ad781
TJB
133112008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13312
13313 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13314 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13315 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13316 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13317 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13318 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13319 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13320 XML target descriptions.
13321 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13322 when inferior is running on an ISA 2.05 or later processor. Add
13323 special case to return offset for full 64-bit slot of FPSCR when
13324 in 32-bits.
13325
dfb64f85
DJ
133262008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13327
13328 * Makefile.in (SFILES, clean): Added sparc64 files.
13329 (reg-sparc64.o, reg-sparc64.c): New.
13330 * configure.srv (sparc*-*-linux*): New configuration.
13331 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13332 syscall arguments for SPARC.
13333 (regsets_store_inferior_registers): Likewise.
13334 * linux-sparc-low.c: New file.
13335
66b6e1dd
DE
133362008-10-21 Doug Evans <dje@google.com>
13337
13338 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13339 (READLINE_DIR,READLINE_DEP): Delete.
13340 (INTERNAL_CFLAGS): Update.
13341 (LINTFLAGS): Update.
13342
9b710a42
PA
133432008-10-10 Pedro Alves <pedro@codesourcery.com>
13344
13345 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13346 whole argv from the last run, not just argv[0].
13347
5822d809
PA
133482008-09-08 Pedro Alves <pedro@codesourcery.com>
13349
13350 * regcache.c (new_register_cache): Return NULL if the register
13351 cache size isn't known yet.
13352 (free_register_cache): Avoid dereferencing a NULL regcache.
13353
74aac56f
DJ
133542008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13355
13356 * configure.srv: Merge MIPS and MIPS64.
13357
400b20f5
MR
133582008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13359
13360 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13361
677c5bb1
LM
133622008-08-18 Luis Machado <luisgpm@br.ibm.com>
13363
13364 * Makefile.in: Add required vsx dependencies.
13365
13366 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13367 Declare init_registers_powerpc_vsx32l.
13368 Declare init_registers_powerpc_vsx64l.
13369 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13370 (ppc_arch_setup): Check for VSX in hwcap.
13371 (ppc_fill_vsxregset): New function.
13372 (ppc_store_vsxregset): New function.
13373 Add new VSX entry in regset_info target_regsets.
13374
13375 * configure.srv: Add new VSX dependencies.
13376
a6f3e723
SL
133772008-08-12 Pedro Alves <pedro@codesourcery.com>
13378
13379 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13380 (remote_open): Set or clear transport_is_reliable.
13381 (putpkt_binary): Don't expect acks in noack mode.
13382 (getpkt): Don't send ack/nac in noack mode.
13383 * server.c (handle_general_set): Handle QStartNoAckMode.
13384 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13385 qSupported.
13386 (main): Reset noack_mode on every connection.
13387 * server.h (noack_mode): Declare.
13388
a417dc56
RW
133892008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13390
13391 * Makefile.in (GDBREPLAY_OBS): New variable.
13392 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13393
3221518c
UW
133942008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13395 Daniel Jacobowitz <dan@codesourcery.com>
13396
13397 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13398 (usr_store_inferior_registers): Likewise.
13399 (regsets_store_inferior_registers): Likewise.
13400
ec56be1b
PA
134012008-07-31 Rolf Jansen <rj@surtec.com>
13402 Pedro Alves <pedro@codesourcery.com>
13403
13404 * configure.ac: Check for memmem declaration.
13405 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13406 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13407 (disable_packet_qfThreadInfo): Unconditionally compile.
13408 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13409 * configure, config.in: Regenerate.
13410
2fe5e3ff
DE
134112008-07-28 Doug Kwan <dougkwan@google.com>
13412
13413 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13414 (linux_write_memory): Remove declaration of errno.
13415
836acd6d
UW
134162008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13417
13418 * linux-low.c (handle_extended_wait): Do not use "status"
13419 variable uninitialized.
13420
aeba519e
PA
134212008-07-07 Pedro Alves <pedro@codesourcery.com>
13422
13423 * server.c (handle_v_attach): Inhibit reporting dll changes.
13424
db42f210
PA
134252008-06-27 Pedro Alves <pedro@codesourcery.com>
13426
13427 * remote-utils.c (prepare_resume_reply): If requested, don't
13428 output "thread:TID" in the T stop reply.
13429
13430 * server.c (disable_packet_vCont, disable_packet_Tthread)
13431 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13432 (handle_query): If requested, disable support for qC, qfThreadInfo
13433 and qsThreadInfo.
13434 (handle_v_requests): If requested, disable support for vCont.
13435 (gdbserver_show_disableable): New.
13436 (main): Handle --disable-packet and --disable-packet=LIST.
13437
13438 * server.h (disable_packet_vCont, disable_packet_Tthread)
13439 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13440
8e4c5421
CD
134412008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13442
13443 * server.c (gdbserver_usage): Mention --version.
13444
6e23a804
DJ
134452008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13446
13447 * Makefile.in (gdbreplay.o): New rule.
13448
90aa6a40
JM
134492008-06-06 Joseph Myers <joseph@codesourcery.com>
13450
13451 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13452 message, not gdbserver.
13453
c16158bc 134542008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13455 Nathan Sidwell <nathan@codesourcery.com>
13456 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13457
13458 * acinclude.m4: Include ../../config/acx.m4.
13459 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13460 * configure, config.in: Regenerate.
13461 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13462 * server.c (gdbserver_version): Print PKGVERSION.
13463 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13464 (main): Adjust gdbserver_usage calls.
13465 * gdbreplay.c (version, host_name): Add declarations.
13466 (gdbreplay_version, gdbreplay_usage): New.
13467 (main): Accept --version and --help options.
13468
aeb75bf5
DJ
134692008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13470
13471 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13472 (arm_breakpoint_at): Handle Thumb.
13473 (the_low_target): Add comment.
13474
76b233dd
UW
134752008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13476
13477 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13478
08388c79
DE
134792008-05-09 Doug Evans <dje@google.com>
13480
a3c83fae
DE
13481 * server.h (decode_search_memory_packet): Declare.
13482 * remote-utils.c (decode_search_memory_packet): New fn.
13483 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13484 (handle_search_memory): New fn.
13485 (handle_query): Process qSearch:memory packets.
13486
bb9c3d36
UW
134872008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13488
13489 * regcache.c (registers_length): Remove.
13490 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13491 full register packet.
13492 * regcache.h (registers_length): Remove prototype.
13493 * server.h (PBUFSIZ): Define to 16384.
13494
7284e1be
UW
134952008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13496
13497 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13498 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13499 powerpc-64l.o, and powerpc-altivec64l.o.
13500 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13501 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13502 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13503 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13504 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13505 to srv_xmlfiles.
13506
13507 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13508 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13509 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13510 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13511 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13512 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13513 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13514 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13515 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13516 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13517 (clean): Update.
13518
13519 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13520 (init_registers_powerpc_32l): ... this new prototype.
13521 (init_registers_powerpc_32): Remove, replace by ...
13522 (init_registers_powerpc_altivec32l): ... this new prototype.
13523 (init_registers_powerpc_e500): Remove, replace by ...
13524 (init_registers_powerpc_e500l): ... this new prototype.
13525 (init_registers_ppc64): Remove, replace by ...
13526 (init_registers_powerpc_64l): ... this new prototype.
13527 (init_registers_powerpc_64): Remove, replace by ...
13528 (init_registers_powerpc_altivec64l): ... this new prototype.
13529 (ppc_num_regs): Set to 73.
13530 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13531 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13532 (ppc_cannot_store_register): Handle orig_r3 and trap.
13533 (ppc_arch_setup): Update init_registers_... calls.
13534 (ppc_fill_gregset): Handle orig_r3 and trap.
13535
13536 * inferiors.c (clear_inferiors): Reset current_inferior.
13537
fdc59709
PB
135382008-04-23 Paolo Bonzini <bonzini@gnu.org>
13539
889bf7c5
PA
13540 * acinclude.m4: Add override.m4.
13541 * configure: Regenerate.
fdc59709 13542
c9b2f845
UW
135432008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13544
13545 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13546 initial call to init_register_ppc64.
13547
550512b8
UW
135482008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13549
43aaf8b6
PA
13550 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13551 single powerpc*-*-linux* case.
550512b8
UW
13552 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13553
b6430ec3
UW
135542008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13555
13556 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13557 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13558 from reg_xmlfiles.
13559 * linux-ppc-low.c: Include <elf.h>.
13560 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13561 (ppc_hwcap): New global variable.
13562 (ppc_regmap): Remove __SPE__ #ifdef sections.
13563 (ppc_regmap_e500): New global variable.
13564 (ppc_cannot_store_register): Update __SPE__ special case.
13565 (ppc_get_hwcap): New function.
13566 (ppc_arch_setup): Use it to determine whether inferior supports
13567 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13568 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13569 Do not access registers if target does not support AltiVec.
13570 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13571 Do not access registers if target does not support SPE.
13572 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13573
52fa2412
UW
135742008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13575
13576 * linux-low.c (disabled_regsets, num_regsets): New.
13577 (use_regsets_p): Delete.
13578 (linux_wait_for_process): Clear disabled_regsets.
13579 (regsets_fetch_inferior_registers): Check and set it.
13580 (regsets_store_inferior_registers): Likewise.
13581 (linux_fetch_registers, linux_store_registers): Do not use
13582 use_regsets_p.
13583 (initialize_low): Allocate disabled_regsets.
13584
e28b3332
DJ
135852008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13586
13587 * Makefile.in (LIBOBJS): New.
13588 (OBS): Use LIBOBJS.
13589 (memmem.o): New rule.
13590 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13591 * configure: Regenerated.
13592
4536995d
UW
135932008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13594
13595 * server.c (handle_query): Never return "unsupported" for
13596 qXfer:features:read queries.
13597
221c031f
UW
135982008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13599
13600 * server.c (get_features_xml): Fix inverted condition.
13601 (handle_query): Always support qXfer:feature:read.
13602
ccd213ac
DJ
136032008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13604
13605 * server.c (wrapper_argv): New.
13606 (start_inferior): Handle wrapper_argv. If set, expect an extra
13607 trap.
13608 (gdbserver_usage): Document --wrapper.
13609 (main): Parse --wrapper.
13610
6fe305f7
UW
136112008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13612
13613 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13614 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13615 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13616 (ppc_set_pc): Likewise.
13617 (ppc_arch_setup): New function.
13618 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13619 of collect_register.
889bf7c5 13620 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13621
5b0a002e
UW
136222008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13623
13624 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13625 instead of linux-ppc64-low.o.
13626 * linux-ppc64-low.c: Remove file.
13627 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13628 (linux-ppc64-low.o): Remove rule.
13629
13630 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13631 (init_registers_powerpc_64): Likewise.
13632 (ppc_regmap): Conditionally define depending on __powerpc64__.
13633 (ppc_cannot_store_register): Do not special-case "fpscr" when
13634 compiled on __powerpc64__.
13635 (ppc_collect_ptrace_register): New function.
13636 (ppc_supply_ptrace_register): New function.
13637 (ppc_breakpoint): Change type to "unsigned int".
13638 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13639 (the_low_target): Conditionally provide initializers for the
889bf7c5 13640 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13641 collect_ptrace_register and supply_ptrace_register members.
13642
9b4b61c8
UW
136432008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13644
13645 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13646 * server.c (gdbserver_xmltarget): Define.
13647 (get_features_xml): Use it to replace "target.xml" and arch_string.
13648
13649 * configure.srv: Remove srv_xmltarget. Add XML files that were
13650 mentioned there to srv_xmlfiles instead. Remove conditional tests
13651 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13652 srv_xmlfiles and srv_regobj to include all possible choices.
13653 * configure.ac (srv_xmltarget): Remove.
13654 (srv_xmlfiles): Do not add "target.xml".
13655 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13656 checks for supplementary target information.
13657 * configure: Regenerate.
13658 * Makefile.in (XML_TARGET): Remove.
13659 (target.xml): Remove rule.
13660 (clean): Do not clean up target.xml.
13661 (.PRECIOUS): Do not mention target.xml.
13662
13663 * target.h (struct target_ops): Remove arch_string member.
13664 * linux-low.c (linux_arch_string): Remove.
13665 (linux_target_ops): Remove arch_string initializer.
13666 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13667 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13668 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13669 * spu-low.c (spu_arch_string): Remove.
13670 (spu_target_ops): Remove arch_string initializer.
13671 * win32-low.c (win32_arch_string): Remove.
13672 (win32_target_ops): Remove arch_string initializer.
13673 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13674 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13675 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13676
ee1a7ae4
UW
136772008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13678
13679 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13680 by collect_ptrace_register and supply_ptrace_register hooks.
13681 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13682 instead of checking for the_low_target.left_pad_xfer.
13683 (usr_store_inferior_registers): Use collect_ptrace_register callback
13684 instead of checking for the_low_target.left_pad_xfer.
13685
13686 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13687 (s390_supply_ptrace_register): Likewise.
13688 (s390_fill_gregset): Call s390_collect_ptrace_register.
13689 (the_low_target): Update.
13690
13691 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13692 (ppc_supply_ptrace_register): Likewise.
13693 (the_low_target): Update.
13694
13695 * linux-i386-low.c (the_low_target): Update.
13696 * linux-x86-64-low.c (the_low_target): Update.
13697
d61ddec4
UW
136982008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13699
13700 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13701 reg-s390.o and reg-s390x.o.
13702
13703 * linux-low.c (new_inferior): New global variable.
13704 (linux_create_inferior, linux_attach): Set it.
13705 (linux_wait_for_process): Call the_low_target.arch_setup after the
13706 target has stopped for the first time.
13707 (initialize_low): Do not call the_low_target.arch_setup.
13708
13709 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13710 (s390_set_pc): Likewise.
13711 (s390_arch_setup): New function.
13712 (the_low_target): Use s390_arch_setup as arch_setup routine.
13713
13714 * regcache.c (realloc_register_cache): New function.
13715 (set_register_cache): Call it for each existing regcache.
13716
d05b4ac3
UW
137172008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13718
13719 * server.h (init_registers): Remove prototype.
13720
13721 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13722 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13723 instead of init_registers ().
13724 * linux-arm-low.c (init_registers_arm): Add prototype.
13725 (init_registers_arm_with_iwmmxt): Likewise.
13726 (the_low_target): Add initializer for arch_setup field.
13727 * linux-cris-low.c (init_registers_cris): Add prototype.
13728 (the_low_target): Add initializer for arch_setup field.
13729 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13730 (the_low_target): Add initializer for arch_setup field.
13731 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13732 (the_low_target): Add initializer for arch_setup field.
13733 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13734 (the_low_target): Add initializer for arch_setup field.
13735 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13736 (the_low_target): Add initializer for arch_setup field.
13737 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13738 (the_low_target): Add initializer for arch_setup field.
13739 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13740 (init_registers_mips64_linux): Likewise.
13741 (the_low_target): Add initializer for arch_setup field.
13742 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13743 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13744 (the_low_target): Add initializer for arch_setup field.
13745 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13746 (init_registers_powerpc_64): Likewise.
13747 (the_low_target): Add initializer for arch_setup field.
13748 * linux-s390-low.c (init_registers_s390): Add prototype.
13749 (init_registers_s390x): Likewise.
13750 (the_low_target): Add initializer for arch_setup field.
13751 * linux-sh-low.c (init_registers_sh): Add prototype.
13752 (the_low_target): Add initializer for arch_setup field.
13753 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13754 (the_low_target): Add initializer for arch_setup field.
13755 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13756 (the_low_target): Add initializer for arch_setup field.
13757
13758 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13759 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13760 instead of init_registers ().
13761 * win32-arm-low.c (init_registers_arm): Add prototype.
13762 (the_low_target): Add initializer for arch_setup field.
13763 * win32-i386-low.c (init_registers_i386): Add prototype.
13764 (the_low_target): Add initializer for arch_setup field.
13765
13766 * spu-low.c (init_registers_spu): Add prototype.
13767 (initialize_low): Call initialie_registers_spu () instead of
13768 initialize_registers ().
13769
fd96d250
PA
137702008-02-19 Pedro Alves <pedro@codesourcery.com>
13771
13772 * server.c (handle_v_requests): When handling the vRun and vAttach
13773 packets, if already debugging a process, don't kill it. Return an
13774 error instead.
13775
d41b6bb4
DJ
137762008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13777
13778 * server.c (handle_query): Correct length check.
13779
5ac588cf
PA
137802008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13781
13782 * win32-low.c (do_initial_child_stuff): Add process handle
13783 parameter. Set current_process_handle and current_process_id from the
13784 parameters. Clear globals.
13785 (win32_create_inferior): Don't set current_process_handle and
13786 current_process_id here. Instead pass them on the call to
13787 do_initial_child_stuff.
13788 (win32_attach): Likewise.
13789 (win32_clear_inferiors): New.
13790 (win32_kill): Don't close the current process handle or the
13791 current thread handle here. Instead call win32_clear_inferiors.
13792 (win32_detach): Don't open a new handle to the process. Call
13793 win32_clear_inferiors.
13794 (win32_join): Don't rely on current_process_handle; open a new
13795 handle using the process id.
13796 (win32_wait): Call win32_clear_inferiors when the inferior process
13797 has exited.
13798
ecd7ecbc
DJ
137992008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13800
13801 * server.c (monitor_show_help): Add "exit".
13802
1525d545
MG
138032008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13804
ecd7ecbc 13805 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13806 (clean): Add reg-xtensa.c.
13807 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13808 * configure.srv (xtensa*-*-linux*) New target.
13809 * linux-xtensa-low.c: New.
13810 * xtensa-xtregs.c: New.
1525d545 13811
59a016f0
PA
138122008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13813
13814 * hostio.c: Don't include errno.h.
13815 (errno_to_fileio_errno): Move to hostio-errno.
13816 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13817 error number outputting to the target->hostio_last_error callback.
13818 (hostio_packet_error): Use FILEIO_EINVAL directly.
13819 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13820 calls to hostio_error.
13821 * hostio-errno.c: New.
13822 * server.h (hostio_last_error_from_errno): Declare.
13823 * target.h (target_ops): Add hostio_last_error member.
13824 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13825 as hostio_last_error handler.
889bf7c5 13826 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13827 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13828 (wince_hostio_last_error): New functions.
13829 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13830 as hostio_last_error handler.
13831 (win32_target_ops) [!_WIN32_WCE]: Register
13832 hostio_last_error_from_errno as hostio_last_error handler.
13833 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13834 (hostio-errno.o): New rule.
13835 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13836 * configure.srv (srv_hostio_err_objs): New variable. Default to
13837 hostio-errno.o.
13838 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13839 * configure: Regenerate.
13840
2d717e4f
DJ
138412008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13842
13843 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13844 (linux_kill, linux_detach): Clean up the process list.
13845 * remote-utils.c (remote_open): Improve port number parsing.
13846 (putpkt_binary, input_interrupt): Only send interrupts if the target
13847 is running.
13848 * server.c (extended_protocol): Make static.
13849 (attached): Define earlier.
13850 (exit_requested, response_needed, program_argv): New variables.
13851 (target_running): New.
13852 (start_inferior): Clear attached here.
13853 (attach_inferior): Set attached here.
13854 (require_running): Define.
13855 (handle_query): Use require_running and target_running. Implement
13856 "monitor exit".
13857 (handle_v_attach, handle_v_run): New.
13858 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13859 (gdbserver_usage): Update.
13860 (main): Redo argument parsing. Handle --debug and --multi. Handle
13861 --attach along with other options or after the port. Save
13862 program_argv. Support no initial program. Resynchronize
13863 communication with GDB after an error. Handle "monitor exit".
13864 Use require_running and target_running. Always allow the extended
13865 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13866 restart in extended mode.
13867 * README: Refer to the GDB manual. Update --attach usage.
13868
7407e2de
AS
138692007-12-20 Andreas Schwab <schwab@suse.de>
13870
13871 * linux-low.c (STACK_SIZE): Define.
13872 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13873 (linux_test_for_tracefork): Likewise.
13874
b65d95c5
DJ
138752007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13876
13877 * linux-low.c (linux_wait_for_event): Update messages. Do not
13878 reinsert auto-delete breakpoints.
13879 * mem-break.c (struct breakpoint): Change return type of handler to
13880 int.
13881 (set_breakpoint_at): Update handler type.
13882 (reinsert_breakpoint_handler): Return 1 instead of calling
13883 delete_breakpoint.
13884 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13885 setting a new one.
13886 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13887 * mem-break.h (set_breakpoint_at): Update handler type.
13888 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13889 * win32-low.c (auto_delete_breakpoint): New.
13890 (get_child_debug_event): Use it.
13891
4e799345
DJ
138922007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13893
13894 * configure.ac: Check for pread and pwrite.
13895 * hostio.c (handle_pread): Fall back to lseek and read.
13896 (handle_pwrite): Fall back to lseek and write.
13897 * config.in, configure: Regenerated.
13898
27524b67
DJ
138992007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13900
13901 * server.c (myresume): Add own_buf argument.
13902 (main): Update calls.
13903
a20d5e98
DJ
139042007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13905
13906 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13907 * remote-utils.c (remote_open): Do not call disable_async_io.
13908 (block_async_io): Delete.
13909 (unblock_async_io): Make static.
13910 (initialize_async_io): New.
13911 * server.c (handle_v_cont): Handle async I/O here.
13912 (myresume): Likewise. Move other common resume tasks here...
13913 (main): ... from here. Call initialize_async_io. Disable async
13914 I/O before the main loop.
13915 * server.h (initialize_async_io): Declare.
13916 (block_async_io, unblock_async_io): Delete prototypes.
13917 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13918
b79d787e
DJ
139192007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13920
13921 * remote-utils.c (readchar): Allow binary data in received messages.
13922
d97903b2
PA
139232007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13924
13925 * win32-low.c (attaching): New global.
13926 (win32_create_inferior): Clear the `attaching' global.
13927 (win32_attach): Set the `attaching' global.
13928 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13929 attaching. Only set a breakpoint at the entry point if not
13930 attaching.
13931
311de423
PA
139322007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13933
13934 * server.c (main): Don't report dll events on the initial
13935 connection on attaches.
13936
6c2d16d2
PA
139372007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13938
13939 * server.c (main): Relax numerical bases supported for the pid of
13940 the --attach command line argument.
13941
5ca906e6
PA
139422007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13943
13944 * win32-low.c (win32_attach): Call OpenProcess before
13945 DebugActiveProcess, not after. Add last error output to error
13946 call.
13947
9c6c8194
PA
139482007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13949
13950 * win32-low.c (win32_get_thread_context)
13951 (win32_set_thread_context): New functions.
13952 (thread_rec): Use win32_get_thread_context.
13953 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13954 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13955 field.
13956
4d5d1aaa
PA
139572007-12-03 Leo Zayas
13958 Pedro Alves <pedro_alves@portugalmail.pt>
13959
13960 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13961 global variables.
13962 (child_add_thread): Minor cleanup.
13963 (child_continue): Resume artificially suspended threads before
13964 calling ContinueDebugEvent.
13965 (suspend_one_thread): New.
13966 (fake_breakpoint_event): New.
13967 (get_child_debug_event): Change return type to int. Check here if
13968 gdb sent an interrupt request. If a soft interrupt was requested,
13969 fake a breakpoint event. Return 0 if there is no event to handle,
13970 and 1 otherwise.
13971 (win32_wait): Don't check here if gdb sent an interrupt request.
13972 Ensure there is a valid event to handle.
13973 (win32_request_interrupt): Add soft interruption method as last
13974 resort.
13975
c436e841
PA
139762007-12-03 Leo Zayas
13977 Pedro Alves <pedro_alves@portugalmail.pt>
13978
13979 * win32-low.h (win32_thread_info): Add descriptions to the
13980 structure members. Replace `suspend_count' counter by a
13981 `suspended' flag.
13982 * win32-low.c (thread_rec): Update condition of when to get the
13983 context from the inferior. Rely on ContextFlags being set if it
13984 has already been retrieved. Only suspend the inferior thread if
13985 we haven't already. Warn if that fails.
13986 (continue_one_thread): s/suspend_count/suspended/. Only call
13987 ResumeThread once. Warn if that fails.
13988
e7b5fa67
PA
139892007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13990
13991 * win32-low.c (win32_wait): Don't read from the inferior when it
13992 has already exited.
13993
a385171d
PA
139942007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13995
13996 * Makefile.in (win32_low_h): New variable.
13997 (win32-low.o): Add dependency on $(win32_low_h).
13998 (win32-arm-low.o, win32-i386-low.o): New rules.
13999
f80c84b3
DJ
140002007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14001
14002 * hostio.c: Correct copyright year.
14003
a6b151f1
DJ
140042007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14005
14006 * Makefile.in (OBS): Add hostio.o.
14007 (hostio.o): New rule.
14008 * server.h (handle_vFile): Declare.
14009 * hostio.c: New file.
14010 * server.c (handle_v_requests): Take packet_len and new_packet_len
14011 for binary packets. Call handle_vFile.
14012 (main): Update call to handle_v_requests.
14013
f9387fc3
DJ
140142007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14015
14016 * linux-low.c: Include <sched.h>.
14017
51c2684e
DJ
140182007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14019
14020 * linux-low.c (linux_tracefork_grandchild): New.
14021 (linux_tracefork_child): Use clone.
14022 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14023
75f83163
JB
140242007-10-31 Joel Brobecker <brobecker@adacore.com>
14025
14026 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14027
da5898ce
DJ
140282007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14029
14030 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14031
24a09b5f
DJ
140322007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14033
14034 * inferiors.c (change_inferior_id): Delete.
14035 (add_pid_to_list, pull_pid_from_list): New.
14036 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14037 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14038 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14039 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14040 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14041 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14042 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14043 (using_threads): Always set to 1.
14044 (handle_extended_wait): New.
14045 (add_process): Do not set TID.
14046 (linux_create_inferior): Set must_set_ptrace_flags.
14047 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14048 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14049 (linux_thread_alive): Rename TID argument to LWPID.
14050 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14051 (linux_wait_for_event): Do not use TID or check using_threads. Update
14052 call to dead_thread_notify. Call handle_extended_wait.
14053 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14054 (send_sigstop): Delete sigstop_sent.
14055 (wait_for_sigstop): Avoid TID.
14056 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14057 (linux_test_for_tracefork): New.
14058 (linux_lookup_signals): Use thread_db_active and
14059 linux_supports_tracefork_flag.
14060 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14061 * linux-low.h (get_process_thread): Avoid TID.
14062 (struct process_ifo): Move thread_known and tid to the end. Remove
14063 sigstop_sent.
14064 (linux_attach_lwp, thread_db_init): Update prototypes.
14065 * server.h (change_inferior_id): Delete prototype.
14066 (add_pid_to_list, pull_pid_from_list): New prototypes.
14067 * thread-db.c (thread_db_use_events): New.
14068 (find_first_thread): Rename to...
14069 (find_one_thread): ...this. Update callers and messages. Do not
14070 call fatal. Check thread_db_use_events. Do not call
14071 change_inferior_id or new_thread_notify.
14072 (maybe_attach_thread): Update. Do not call new_thread_notify.
14073 (thread_db_init): Set thread_db_use_events. Check use_events.
14074 * utils.c (fatal, warning): Correct message prefix.
14075
30ed0a8f
DJ
140762007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14077
14078 * Makefile.in (clean): Remove new files.
14079 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14080 (powerpc-64.o, powerpc-64.c): New rules.
14081 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14082 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14083 with SPE.
14084 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14085 SPE targets.
14086 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14087 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14088 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14089 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14090 (target_regsets): Add AltiVec and SPE register sets.
14091 * configure.ac: Check for AltiVec and SPE.
14092 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14093 (ppc_fill_vrregset, ppc_store_vrregset): New.
14094 (target_regsets): Add AltiVec register set.
14095 * configure: Regenerated.
14096
fd462a61
DJ
140972007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14098
14099 * linux-low.c (O_LARGEFILE): Define.
14100 (linux_read_memory): Use /proc/PID/mem.
14101 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14102 * configure, config.in: Regenerated.
14103
69f223ed
DJ
141042007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14105
14106 * linux-low.c (linux_wait_for_event): Do not pass signals while
14107 single-stepping.
14108
aec18585
PA
141092007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14110
14111 * win32-low.c (create_process): New.
14112 (win32_create_inferior): Use create_process instead of
14113 CreateProcess. If create_process failed retry appending an ".exe"
14114 suffix. Store the GetLastError result immediatelly after
14115 create_process calls and use it on the call to error.
14116
34d86ddd
PA
141172007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14118
14119 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14120
5a0e3bd0
JB
141212007-08-23 Joel Brobecker <brobecker@adacore.com>
14122
14123 * configure.ac: Switch license to GPLv3.
14124
f88c79e6
MS
141252007-08-01 Michael Snyder <msnyder@access-company.com>
14126
14127 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14128
6b3d9b83
PA
141292007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14130
14131 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14132 typedef.
14133 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14134 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14135 CloseToolhelp32Snapshot.
14136 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14137 CloseToolhelp32Snapshot.
14138
c588c53c
MS
141392007-07-27 Michael Snyder <michael.snyder@access-company.com>
14140
14141 * server.c (main): Check for inferior exit before main loop.
14142
aa0403d9
PA
141432007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14144
14145 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14146 instead of on tmp_desc.
14147
255e7678
DJ
141482007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14149 Daniel Jacobowitz <dan@codesourcery.com>
14150
14151 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14152 (add_thread): Minor cleanups.
14153 (clear_inferiors): Move lower in the file. Clear the DLL
14154 list.
14155 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14156 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14157 (xml_escape_text): New.
14158 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14159 for qSupported.
14160 (handle_v_cont): Report errors.
14161 (gdbserver_version): Update.
14162 (main): Correct size of own_buf. Do not report initial DLL events.
14163 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14164 (unloaded_dll, xml_escape_text): New.
14165 * win32-low.c (enum target_waitkind): Update comments.
14166 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14167 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14168 (win32_EnumProcessModules, win32_GetModuleInformation)
14169 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14170 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14171 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14172 (win32_Module32First, win32_Module32Next, load_toolhelp)
14173 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14174 (get_child_debug_event): Handle DLL events.
14175 (win32_wait): Likewise.
14176
0d37add9
DJ
141772007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14178
14179 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14180 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14181
45e2715e
PA
141822007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14183
14184 * win32-low.c (handle_output_debug_string): Ignore event if not
14185 waiting.
14186
c5674cf1
PA
141872007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14188
14189 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14190
2bbe3cc1
DJ
141912007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14192
14193 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14194
ae13219e
DJ
141952007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14196
14197 * inferiors.c (change_inferior_id): Add comment.
14198 * linux-low.c (check_removed_breakpoint): Add an early
14199 prototype. Improve debug output.
14200 (linux_attach): Doc update.
14201 (linux_detach_one_process, linux_detach): Clean up before releasing
14202 each process.
14203 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14204 * linux-low.h (struct process_info): Doc improvement.
14205 * mem-break.c (delete_all_breakpoints): New.
14206 * mem-break.h (delete_all_breakpoints): New prototype.
14207 * thread-db.c (find_first_thread): New.
14208 (thread_db_create_event): Call it instead of
14209 thread_db_find_new_threads. Clean up unused variables.
14210 (maybe_attach_thread): Remove first thread handling.
14211 (thread_db_find_new_threads): Use find_first_thread.
14212 (thread_db_get_tls_address): Likewise.
14213
4105de34
DJ
142142007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14215
14216 * thread-db.c (thread_db_find_new_threads): Add prototype.
14217 (thread_db_create_event): Check for the main thread before adding
14218 a new thread.
14219 (maybe_attach_thread): Only enable event reporting if TID == 0.
14220 (thread_db_get_tls_address): Check for new threads.
14221
2b876972
DJ
142222007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14223
14224 * linux-low.c (linux_create_inferior): Try execv before execvp.
14225 * spu-low.c (spu_create_inferior): Likewise.
14226
7a245884
DJ
142272007-06-13 Mike Frysinger <vapier@gentoo.org>
14228
14229 * linux-low.c (linux_create_inferior): Change execv to execvp.
14230 * spu-low.c (spu_create_inferior): Likewies.
14231
117ce543
DJ
142322007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14233
14234 * Makefile.in (clean): Clean new files instead of deleted ones.
14235 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14236 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14237 rules.
14238 * configure.srv: Specify XML files and new regformats for MIPS and
14239 MIPS64 GNU/Linux.
14240 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14241 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14242 an entry for the restart register.
14243 (mips_cannot_fetch_register, mips_cannot_store_register)
14244 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14245 register names to match the XML descriptions.
14246 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14247 restart register instead of $0.
14248
0e7f50da
UW
142492007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14250 Markus Deuling <deuling@de.ibm.com>
14251
14252 * remote-utils.c (decode_xfer_write): New function.
14253 * server.h (decode_xfer_write): Add prototype.
14254 * server.c (handle_query): Add PACKET_LEN argument. Support
14255 qXfer:spu:read and qXfer:spu:write packets.
14256 (main): Pass packet_len to handle_query.
14257 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14258 * target.h (target_ops): Add qxfer_spu.
14259
374c1d38
UW
142602007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14261
14262 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14263 accessing non-seekable spufs files.
14264
bb63802a
UW
142652007-05-16 Markus Deuling <deuling@de.ibm.com>
14266
889bf7c5 14267 * server.c (handle_query): Add reply for qC packet.
bb63802a 14268
7390519e
PA
142692007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14270 Leo Zayas <lerele@champenstudios@com>
14271
14272 * server.h (check_remote_input_interrupt_request): New function.
14273 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14274 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14275 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14276 (check_remote_input_interrupt_request): New function.
14277 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14278 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14279 winapi_GenerateConsoleCtrlEvent): New typedefs.
14280 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14281 to 250 ms.
14282 (win32_wait): Check for remote interrupt request
14283 with check_remote_input_interrupt_request.
14284 (win32_request_interrupt): New function.
14285 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14286
34b34921
PA
142872007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14288
14289 * win32-low.c (debug_registers_changed,
14290 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14291 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14292 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14293 (thread_rec): Get context using the low target.
14294 (child_add_thread): Call thread_added on the low target,
14295 which does the same thing.
14296 (regptr): Delete.
14297 (do_initial_child_stuff): Remove debug registers references.
14298 Set context using the low target. Resume threads after
14299 setting the contexts.
14300 (child_continue): Remove dead variable. Remove debug
14301 registers references.
14302 (child_fetch_inferior_registers): Go through the low target.
14303 (do_child_store_inferior_registers): Remove.
14304 (child_store_inferior_registers): Go through the low target.
14305 (win32_resume): Remove debug registers references.
14306 Set context using the low target.
14307 (handle_exception): Change return type to void. Don't record
14308 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14309 first chance exception.
889bf7c5 14310 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14311 goto loop. Always return after waiting for debug event.
14312 (win32_wait): Convert to switch statement. Handle spurious
14313 events.
14314
14315 * win32-i386-low.c (debug_registers_changed,
14316 debug_registers_used): New.
14317 (initial_stuff): Rename to ...
14318 (i386_initial_stuff): ... this. Clear debug registers
14319 state variables.
14320 (store_debug_registers): Delete.
14321 (i386_get_thread_context): New.
14322 (load_debug_registers): Delete.
14323 (i386_set_thread_context): New.
14324 (i386_thread_added): New.
14325 (single_step): Rename to ...
14326 (i386_single_step): ... this.
14327 (do_fetch_inferior_registers): Rename to ...
14328 (i386_fetch_inferior_register): ... this.
14329 (i386_store_inferior_register): New.
14330 (the_low_target): Adapt to new interface.
14331
14332 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14333 (arm_get_thread_context): New.
14334 (arm_set_thread_context): New.
14335 (regptr): New.
14336 (do_fetch_inferior_registers): Rename to ...
14337 (arm_fetch_inferior_register): ... this.
14338 (arm_store_inferior_register): New.
14339 (arm_wince_breakpoint): Reimplement as unsigned long.
14340 (arm_wince_breakpoint_len): Define.
14341 (the_low_target): Adapt to new interface.
14342
14343 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14344 load_debug_registers. Add get_thread_context, set_thread_context,
14345 thread_added and store_inferior_register. Rename
14346 fetch_inferior_registers to fetch_inferior_register.
14347 (regptr): Remove declaration.
14348
dd6953e1
PA
143492007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14350
14351 * linux-low.c (linux_detach): Change return type to int. Return 0.
14352 * spu-low.c (spu_detach): Likewise.
14353
444d6139
PA
143542007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14355
14356 * target.h (target_ops): Change return type of detach to int.
14357 Add join.
14358 (join_inferior): New.
14359 * server.c (main): Don't skip detach support on mingw32.
14360 If the inferior doesn't support detaching return error.
14361 Call join_inferior instead of using waitpid.
14362 * linux-low.c (linux_join): New.
14363 (linux_target_op): Add linux_join.
14364 * spu-low.c (spu_join): New.
14365 (spu_target_ops): Add spu_join.
14366 * win32-low.c (win32_detach): Adapt to new interface.
14367 Reopen current_process_handle before detaching. Issue a child
14368 resume before detaching.
14369 (win32_join): New.
14370 (win32_target_op): Add win32_join.
14371
1d5315fe
PA
143722007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14373
14374 * win32-low.c (win32-attach): Fix return value.
14375 * target.h (target_ops): Describe ATTACH return values.
14376
bf914831
PA
143772007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14378
14379 * win32-low.c (GETPROCADDRESS): Define.
14380 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14381 (winapi_DebugSetProcessKillOnExit): Likewise.
14382 (win32_create_inferior): Force usage of ansi CreateProcessA.
14383 (win32_attach): Use GETPROCADDRESS.
14384 (win32_detach): Likewise.
14385
f72f3e60
PA
143862007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14387
14388 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14389
ed50f18f
PA
143902007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14391
14392 * win32-low.c: Commit leftover changes from 2007-03-29.
14393
0c2ead7e
DJ
143942007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14395
14396 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14397 fields short instead of int. Add explicit padding.
14398 (i387_cache_to_fsave): Remove unnecessary casts.
14399 (i387_fsave_to_cache): Doc fix.
14400 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14401
73725ff3
DJ
144022007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14403
14404 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14405 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14406
d99f33d8
PA
144072007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14408
14409 * configure.srv (arm*-*-mingw32ce*): Move near the other
14410 arm targets.
14411
68070c10
PA
144122007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14413
2482afc6 14414 * configure.ac: Add errno checking.
68070c10
PA
14415 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14416 sys/file.h and malloc.h.
14417 (AC_CHECK_DECLS): Add perror.
14418 (srv_mingwce): Handle.
2482afc6 14419 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14420 win32-i386-low.o to srv_tgtobj.
14421 (i[34567]86-*-mingw*): Likewise.
14422 (arm*-*-mingw32ce*): Add case.
14423 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14424 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14425 [__MINGW32CE__] (strerror): New function.
14426 [__MINGW32CE__] (errno): Define to GetLastError.
14427 [__MINGW32CE__] (COUNTOF): New macro.
14428 (remote_open): Remove extra close call.
14429 * mem-break.c (delete_breakpoint_at): New function.
14430 * mem-break.h (delete_breakpoint_at): Declare.
14431 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14432 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14433 [USE_WIN32API] (read, write): Add char* casts.
14434 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14435 * server.h: Include wincecompat.h on Windows CE.
14436 [HAVE_ERRNO_H]: Check.
14437 (perror): Declare if not declared.
14438 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14439 (perror_with_name): Remove errno declaration.
14440 * wincecompat.h: New.
14441 * wincecompat.c: New.
14442 * win32-low.h: New.
14443 * win32-arm-low.c: New.
14444 * win32-i386-low.c: New.
14445 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14446 (OUTMSG2): Make it safe.
14447 (_T): New macro.
14448 (COUNTOF): New macro.
14449 (NUM_REGS): Get it from the low target.
14450 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14451 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14452 (thread_rec): Let low target handle debug registers.
14453 (child_add_thread): Likewise.
14454 (child_init_thread_list): Likewise.
14455 (continue_one_thread): Likewise.
14456 (regptr): New.
14457 (do_child_fetch_inferior_registers): Move to ...
14458 * win32-i386-low.c: ... here, and rename to ...
14459 (do_fetch_inferior_registers): ... this.
889bf7c5 14460 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14461 Go through the low target.
14462 (do_child_store_inferior_registers): Use regptr.
14463 (strwinerror): New function.
14464 (win32_create_inferior): Handle Windows CE.
14465 Use strwinerror instead of strerror on Windows error
14466 codes. Add program to the error output.
14467 Don't close the main thread handle on Windows CE.
14468 (win32_attach): Use coredll.dll on Windows CE.
14469 (win32_kill): Close current process and current
14470 thread handles.
14471 (win32_detach): Use coredll.dll on Windows CE.
14472 (win32_resume): Let low target handle debug registers, and
14473 step request.
14474 (handle_exception): Add/Remove initial breakpoint. Avoid
14475 non-existant WSTOPSIG on Windows CE.
14476 (win32_read_inferior_memory): Cast to remove warning.
14477 (win32_arch_string): Go through the low target.
14478 (initialize_low): Call set_breakpoint_data with the low
14479 target's breakpoint.
14480 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14481 FOP_REGNUM, mappings): Move to ...
14482 * win32-i386-low.c: ... here.
14483 * win32-low.c (win32_thread_info): Move to ...
14484 * win32-low.h: ... here.
14485 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14486 win32-arm-low.c and wincecompat.c.
14487 (all:): Add $EXEEXT.
14488 (install-only:): Likewise.
14489 (gdbserver:): Likewise.
14490 (gdbreplay:): Likewise.
14491 * config.in: Regenerate.
14492 * configure: Regenerate.
14493
41093d81
PA
144942007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14495
14496 * win32-low.c: Rename typedef thread_info to
14497 win32_thread_info throughout.
14498
544afa54
PA
144992007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14500
14501 * win32-i386-low.c: Rename to ...
14502 * win32-low.c: ... this.
14503 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14504 * Makefile.in: Likewise.
14505
bce7165d
PA
145062007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14507
14508 * remote-utils.c (monitor_output): Constify msg parameter.
14509 * server.h (monitor_output): Likewise.
14510 * win32-i386-low.c (handle_output_debug_string): New.
14511 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14512 handle_output_debug_string.
14513 (get_child_debug_event): Likewise.
14514
506c7aa0
DJ
145152007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14516
14517 * server.c (main): Correct strtoul check.
14518
42c81e2a
DJ
145192007-03-27 Jon Ringle <jon@ringle.org>
14520
14521 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14522
9453113a
DJ
145232007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14524
14525 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14526
64a69107
DJ
145272007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14528
14529 * terminal.h: Check HAVE_SGTTY_H.
14530
145312007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14532
14533 * remote-utils.c (remote_open): Print out the assigned port number.
14534
c74d0ad8
DJ
145352007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14536
14537 * remote-utils.c (monitor_output): New function.
14538 * server.c (debug_threads): Define here.
14539 (monitor_show_help): New function.
14540 (handle_query): Handle qRcmd.
14541 (main): Do not handle 'd' packet.
14542 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14543 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14544 of debug_threads.
14545
de7c3b4a
PA
145462007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14547
14548 * Makefile.in (EXEEXT): New.
14549 (clean): Use $(EXEEXT).
14550
ef57601b
PA
145512007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14552
14553 * target.h (target_ops): Rename send_signal to request_interrupt,
14554 and remove enum target_signal parameter.
14555 * linux-low.c (linux_request_interrupt): Rename from
14556 linux_send_signal, and always send SIGINT.
14557 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14558 and always send SIGINT.
14559 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14560 of send_signal.
14561 (input_interrupt): Likewise.
14562
820f2bda
PA
145632007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14564
14565 * server.c (get_features_xml): Check if target implemented
14566 arch_string.
14567 * win32-i386-low.c (win32_arch_string): New.
14568 (win32_target_ops): Add win32_arch_string as arch_string member.
14569
ab39bf24
UW
145702007-02-22 Markus Deuling <deuling@de.ibm.com>
14571
14572 * spu-low.c (spu_arch_string): New.
14573 (spu_target_ops): Add spu_arch_string.
14574
61ff6e04
DJ
145752007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14576
14577 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14578 * configure.ac: Do not check for terminal.h.
14579 * configure, config.in: Regenerated.
14580
fb1e4ffc
DJ
145812007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14582
14583 * Makefile.in (OBS): Add $(XML_BUILTIN).
14584 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14585 (clean): Update.
14586 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14587 (arm-with-iwmmxt.c): New.
14588 * config.in, configure: Regenerate.
14589 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14590 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14591 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14592 (arm*-*-linux*): Add iWMMXt and regset support.
14593 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14594 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14595 (arm_store_wmmxregset, target_regsets): New.
14596 * server.c (get_features_xml): Take annex argument. Check builtin
14597 XML documents.
14598 (handle_query): Handle multiple annexes.
14599
0f48aa01
DJ
146002007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14601
14602 * remote-utils.c [USE_WIN32API] (read, write): Define.
14603 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14604 write.
14605
23181151
DJ
146062007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14607
14608 * linux-i386-low.c (the_low_target): Set arch_string.
14609 * linux-x86-64-low.c (the_low_target): Likewise.
14610 * linux-low.c (linux_arch_string): New.
14611 (linux_target_ops): Add it.
14612 * linux-low.h (struct linux_target_ops): Add arch_string.
14613 * server.c (write_qxfer_response): Use const void * for DATA.
14614 (get_features_xml): New.
14615 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14616 * target.h (struct target_ops): Add arch_string method.
14617
9d606399
DJ
146182007-01-03 Denis Pilat <denis.pilat@st.com>
14619 Daniel Jacobowitz <dan@codesourcery.com>
14620
14621 * linux-low.c (linux_kill): Handle being called with no threads.
14622 * win32-i386-low.c (win32_kill): Likewise.
14623 (get_child_debug_event): Clear current_process_handle.
14624
146252006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14626 Daniel Jacobowitz <dan@codesourcery.com>
14627
14628 * remote-utils.c (remote_open): Check the type of specified
14629 serial port devices before opening them.
14630 * server.c (main): Kill the inferior if an error occurs during
14631 the first remote_open.
14632
a5e13d24
DJ
146332006-12-05 Markus Deuling <deuling@de.ibm.com>
14634
14635 * README: Update supported targets.
14636
186947f7
DJ
146372006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14638
14639 * Makefile.in (clean): Remove reg-mips64.c.
14640 (reg-mips64.c, reg-mips64.o): New rules.
14641 * configure.srv: Handle mips64. Include regset support for mips.
14642 * linux-mips-low.c (union mips_register): New.
14643 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14644 (mips_breakpoint, mips_breakpoint_at): Use int.
14645 (mips_collect_register, mips_supply_register)
14646 (mips_collect_register_32bit, mips_supply_register_32bit)
14647 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14648 (mips_store_fpregset, target_regsets): New.
14649 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14650
a13e2c95
UW
146512006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14652
14653 * configure.srv: Add target "spu*-*-*".
14654 * Makefile.in (clean): Remove reg-spu.c.
14655 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14656 * spu-low.c: New file.
14657
cb7283db
DJ
146582006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14659
14660 * configure.ac: Correct td_thr_tls_get_addr test.
14661 * configure: Regenerated.
14662
89be2091
DJ
146632006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14664
14665 * linux-low.c (linux_wait_for_event): Reformat. Use the
14666 pass_signals array.
14667 * remote-utils.c (decode_address_to_semicolon): New.
14668 * server.c (pass_signals, handle_general_set): New.
14669 (handle_query): Mention QPassSignals for qSupported.
14670 (main): Call handle_general_set.
14671 * server.h (pass_signals, decode_address_to_semicolon): New.
14672
000ef4f0
DJ
146732006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14674
14675 * server.c (handle_query): Correct error handling for read_auxv.
14676
b7149293
UW
146772005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14678
14679 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14680 and srv_linux_thread_db to yes.
14681 * linux-s390-low.c (s390_fill_gregset): New function.
14682 (target_regsets): Define data structure.
14683
dae5f5cf
DJ
146842006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14685
14686 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14687 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14688 * config.in, configure: Regenerated.
14689 * inferiors.c (gdb_id_to_thread): New function.
14690 (gdb_id_to_thread_id): Use it.
14691 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14692 * linux-low.h (struct process_info): Add th member.
14693 (thread_db_get_tls_address): New prototype.
14694 * remote-utils.c (decode_address): Make non-static.
14695 * server.c (handle_query): Handle qGetTLSAddr.
14696 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14697 * target.h (struct target_ops): Add get_tls_address.
14698 * thread-db.c (maybe_attach_thread): Save the thread handle.
14699 (thread_db_get_tls_address): New.
14700
32ca6d61
DJ
147012006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14702
14703 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14704 (linux_resume_one_process): Take a siginfo_t *. Update all
14705 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14706 (struct pending_signals): Add a siginfo_t.
14707 (linux_wait_for_process): Always set last_status.
14708 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14709 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14710 * linux-low.h (struct process_info): Add last_status.
14711
5ffff7c1
DJ
147122006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14713
14714 * remote-utils.c (try_rle): New function.
14715 (putpkt_binary): Use it.
14716
8695c747
DJ
147172006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14718
14719 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14720 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14721 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14722 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14723 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14724 point registers.
14725
290fadea
RS
147262006-08-08 Richard Sandiford <richard@codesourcery.com>
14727
14728 * server.c (terminal_fd): New variable.
14729 (old_foreground_pgrp): Likewise.
14730 (restore_old_foreground_pgrp): New function.
14731 (start_inferior): Record the terminal file descriptor in terminal_fd
14732 and its original foreground group in old_foreground_pgrp. Register
14733 restore_old_foreground_pgrp with atexit().
14734
9f2e1e63
DJ
147352006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14736
14737 * server.c (handle_query): Correct qPart to qXfer.
14738
b80864fb
DJ
147392006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14740
14741 * configure.ac: Check for more headers which are missing on
14742 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14743 * configure.srv: Add Cygwin and mingw32.
14744 * remote-utils.c: Don't include headers unconditionally which
14745 are missing on mingw32. Include <winsock.h> for mingw32.
14746 (remote_open): Adjust for mingw32 support. Flush
14747 standard error after writing to it.
14748 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14749 (unblock_async_io, enable_async_io, disable_async_io)
14750 (readchar, getpkt): Update for Winsock support.
14751 (prepare_resume_reply): Expect a protocol signal number.
14752 * server.c: Disable <sys/wait.h> on mingw32.
14753 (start_inferior): Adjust for mingw32 support. Flush
14754 standard error after writing to it.
14755 (attach_inferior): Likewise. Use protocol signal
14756 numbers.
14757 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14758 and names.
14759 * win32-i386-low.c: New file.
14760 * Makefile.in (XM_CLIBS): Set.
14761 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14762 (win32-i386-low.o): New dependency rule.
14763 * linux-low.c (linux_wait): Use target signal numbers.
14764 * target.h (struct target_ops): Doc fix.
14765 * server.h (target_signal_to_name): New prototype.
14766 * gdbreplay.c: Don't include headers unconditionally which
14767 are missing on mingw32. Include <winsock.h> for mingw32.
14768 (remote_close, remote_open): Adjust for Winsock support.
14769 * configure, config.in: Regenerated.
14770
0876f84a
DJ
147712006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14772
14773 * server.c (decode_xfer_read, write_qxfer_response): New.
14774 (handle_query): Take a packet length argument. Handle
14775 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14776 the qSupported response.
14777 (main): Update call to handle_query.
14778
01f9e8fa
DJ
147792006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14780
14781 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14782 (putpkt_binary): Renamed from putpkt and adjusted for binary
14783 data.
14784 (putpkt): New wrapper for putpkt_binary.
14785 (readchar): Don't mask off the high bit.
14786 (decode_X_packet): New function.
14787 * server.c (main): Call putpkt_binary if a handler sets the packet
14788 length. Save the length of the incoming packet. Handle 'X'.
14789 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14790
be2a5f71
DJ
147912006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14792
14793 * server.c (handle_query): Handle qSupported.
14794
ea025f5f
DJ
147952006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14796
14797 * remote-utils.c (all_symbols_looked_up): New variable.
14798 (look_up_one_symbol): Check it.
14799 * server.h (look_up_one_symbol): New declaration.
14800 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14801
9308fc88
DJ
148022006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14803
14804 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14805 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14806 (PTRACE_GET_THREAD_AREA): Define.
14807 (ps_get_thread_area): New function.
14808
52fb6437
NS
148092006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14810
14811 * configure.srv (m68k*-*-uclinux*): New target.
14812 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14813 (linux_resume_one_process): Remove extraneous cast.
14814 (linux_read_offsets): New.
14815 (linux_target_op): Add linux_read_offsets on mmuless systems.
14816 * server.c (handle_query): Add qOffsets logic.
14817 * target.h (struct target_ops): Add read_offsets.
14818
21b0f40c
DJ
148192006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14820
14821 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14822 (PTRACE_GET_THREAD_AREA): Define.
14823 (ps_get_thread_area): New function.
14824 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14825 (linux-x86-64-low.o): Update.
14826
0050a760
DJ
148272006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14828
14829 * configure.ac: Remove checks for prfpregset_t.
14830 * gdb_proc_service.h: New file.
14831 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14832 new "gdb_proc_service.h".
14833 * proc-service.c: Likewise.
14834 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14835 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14836 * Makefile.in (gdb_proc_service_h): Updated.
14837 * configure, config.in: Regenerated.
14838
b92a518e
DJ
148392006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14840
14841 * remote-utils.c (prepare_resume_reply): Move declaration
14842 of gdb_id_from_wait to the top of the block.
14843
545587ee
DJ
148442006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14845
14846 * linux-low.c (regsets_store_inferior_registers): Read the regset
14847 from the target before filling it.
14848
9db87ebd
DJ
148492006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14850
14851 * server.c (attach_inferior): Return SIGTRAP for a successful
14852 attach.
14853
dd24457d
DJ
148542006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14855
14856 * Makefile.in (OBS): Add version.o.
14857 (STAGESTUFF): Delete.
14858 (version.o): Add dependencies.
14859 (version.c): Replace rule.
14860 (clean): Remove version.c.
14861 * server.c (gdbserver_version): New.
14862 (gdbserver_usage): Use printf.
14863 (main): Handle --version and --help.
14864 * server.h (version, host_name): Add declarations.
14865
6f0f660e
EZ
148662005-12-23 Eli Zaretskii <eliz@gnu.org>
14867
889bf7c5
PA
14868 * linux-arm-low.c:
14869 * linux-arm-low.c:
14870 * inferiors.c:
14871 * i387-fp.h:
14872 * i387-fp.c:
14873 * gdbreplay.c:
14874 * regcache.c:
14875 * proc-service.c:
14876 * mem-break.h:
14877 * mem-break.c:
14878 * linux-x86-64-low.c:
14879 * linux-sh-low.c:
14880 * linux-s390-low.c:
14881 * linux-ppc64-low.c:
14882 * linux-ppc-low.c:
14883 * linux-mips-low.c:
14884 * linux-m68k-low.c:
14885 * linux-m32r-low.c:
14886 * linux-low.h:
14887 * linux-low.c:
14888 * linux-ia64-low.c:
14889 * linux-i386-low.c:
14890 * linux-crisv32-low.c:
14891 * thread-db.c:
14892 * terminal.h:
14893 * target.h:
14894 * target.c:
14895 * server.h:
14896 * server.c:
14897 * remote-utils.c:
14898 * regcache.h:
14899 * utils.c:
14900 * Makefile.in:
14901 * configure.ac:
6f0f660e
EZ
14902 * gdbserver.1: Add (C) after Copyright. Update the FSF
14903 address.
14904
9d1fb177
DJ
149052005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14906
14907 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14908 (arm_breakpoint_at): Recognize both breakpoints.
14909 (the_low_target): Use the correct breakpoint instruction.
14910
011a70c2
DJ
149112005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14912
14913 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14914 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14915 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14916 (the_low_target): Update.
14917
7fb85e41
AS
149182005-10-25 Andreas Schwab <schwab@suse.de>
14919
14920 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14921
14922 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14923 (ia64_num_regs): Reduce to 462.
14924
3db0444b
DJ
149252005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14926
14927 * acinclude.m4: Correct quoting.
14928 * aclocal.m4: Regenerated.
14929
14930 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14931 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14932 (thread_db_init): Call thread_db_err_str.
14933 * configure.ac: Check for TD_VERSION.
14934 * config.in, configure: Regenerated.
14935
bee0189a
DJ
149362005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14937
14938 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14939
e9d25b98
DJ
149402005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14941
14942 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14943 is not available. Define HAVE_PTRACE_GETREGS if it is.
14944 * config.in, configure: Regenerated.
14945 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14946 * linux-i386-low.c, linux-m68k-low.c: Update to use
14947 HAVE_PTRACE_GETREGS.
14948 * linux-low.c (regsets_fetch_inferior_registers)
14949 (regsets_store_inferior_registers): Only return 0 if we processed
14950 GENERAL_REGS.
14951 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14952 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14953
a06660f7
DJ
149542005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14955
14956 * inferiors.c (struct thread_info): Add gdb_id.
14957 (add_thread): Add gdb_id argument.
14958 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14959 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14960 calls to add_thread.
14961 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14962 * server.c (handle_query): Use thread_to_gdb_id.
14963 (handle_v_cont, main): Use gdb_id_to_thread_id.
14964 * server.h (add_thread): Update prototype.
14965 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14966 prototypes.
14967
5a1f5858
DJ
149682005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14969
14970 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14971 left-padded registers.
14972 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14973 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14974
e122f1f5
SE
149752005-07-01 Steve Ellcey <sje@cup.hp.com>
14976
14977 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14978 * configure: Regenerate.
14979 * config.in: Regenerate.
14980 * server.h (NEED_DECLARATION_STRERROR):
14981 Replace with !HAVE_DECL_STRERROR.
14982
d592fa2f
DJ
149832005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14984
14985 * linux-low.c (linux_wait, linux_send_signal): Don't test
14986 an unsigned long variable for > 0 if it could be MAX_ULONG.
14987 * server.c (myresume): Likewise.
14988 * target.c (set_desired_inferior): Likewise.
14989
ccbd4912
MK
149902005-06-13 Mark Kettenis <kettenis@gnu.org>
14991
14992 * configure.ac: Simplify and improve check for socklen_t.
14993 * configure, config.in: Regenerate.
14994
f450004a
DJ
149952005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14996
14997 * acconfig.h: Remove.
14998 * configure.ac: Add a test for socklen_t. Use three-argument
14999 AC_DEFINE throughout.
15000 * config.in: Regenerated using autoheader 2.59.
15001 * configure: Regenerated.
15002
15003 * gdbreplay.c (socklen_t): Provide a default.
15004 (remote_open): Use socklen_t.
15005 * remote-utils.c (socklen_t): Provide a default.
15006 (remote_open): Use socklen_t.
15007 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15008 unsigned char.
15009
15010 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15011 char for buffers.
15012 * linux-low.c (linux_read_memory, linux_write_memory)
15013 (linux_read_auxv): Likewise.
15014 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15015 (check_mem_write): Likewise.
15016 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15017 Likewise.
15018 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15019 (registers_from_string, register_data): Likewise.
15020 * server.c (handle_query, main): Likewise.
15021 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15022 (decode_M_packet): Likewise.
15023 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15024 * target.h (struct target_ops): Update read_memory, write_memory,
15025 and read_auxv.
15026 (read_inferior_memory, write_inferior_memory): Update.
15027 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15028 to unsigned char *.
15029 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15030 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15031 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15032 linux-s390-low.c, linux-sh-low.c: Update for changes in
15033 read_inferior_memory and the_low_target->breakpoint.
15034
eee84df1
DJ
150352005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15036
15037 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15038 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15039 * configure.srv: Add powerpc64-*-linux*.
15040 * linux-ppc64-low.c: New file.
15041
45b134e5
OF
150422005-05-23 Orjan Friberg <orjanf@axis.com>
15043
15044 * linux-cris-low.c: New file with support for CRIS.
15045 * linux-crisv32-low.c: Ditto for CRISv32.
15046 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15047 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15048 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15049 reg-crisv32.o, and reg-crisv32.c to make rules.
15050 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15051 recognized targets.
15052
48d93c75
UW
150532005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15054
15055 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15056 of sizeof (PTRACE_XFER_TYPE).
15057 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15058
e013ee27
OF
150592005-05-12 Orjan Friberg <orjanf@axis.com>
15060
889bf7c5 15061 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15062 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15063 pointers for hardware watchpoint support.
15064 * linux-low.h (struct linux_target_ops): Ditto.
15065 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15066 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15067 to linux_target_ops.
15068 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15069 reply packet.
15070 * server.c (main): Recognize 'Z' and 'z' packets.
15071
b0ded00b
UW
150722005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15073
15074 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15075 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15076 (the_low_target): Add new members.
15077
8643e2ad
DJ
150782005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15079
15080 * proc-service.c (ps_lgetregs): Search all_processes instead of
15081 all_threads.
15082
fc620387
DJ
150832005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15084
15085 * server.c (start_inferior): Change return type to int.
15086 (attach_inferior): Change sigptr to int *.
15087 (handle_v_cont, handle_v_requests): Change signal to int *.
15088 (main): Change signal to int.
15089
150902005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15091
15092 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15093 * configure.srv: Add m32r*-*-linux*.
15094 * linux-m32r-low.c: New file.
15095
e0e76420
DJ
150962005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15097
15098 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15099
a1928bad
DJ
151002005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15101
15102 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15103 Take unsigned long arguments for PIDs.
15104 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15105 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15106 (wait_for_sigstop, linux_resume_one_process)
15107 (regsets_fetch_inferior_registers, linux_send_signal)
15108 (linux_read_auxv): Likewise. Update the types of variables holding
15109 PIDs. Update format string specifiers.
15110 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15111 * remote-utils.c (prepare_resume_reply): Likewise.
15112 * server.c (cont_thread, general_thread, step_thread)
15113 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15114 unsigned long.
15115 (handle_query): Update format specifiers.
15116 (handle_v_cont, main): Use strtoul for thread IDs.
15117 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15118 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15119 (general_thread, step_thread, thread_from_wait)
15120 (old_thread_from_wait): Update.
15121 * target.h (struct thread_resume): Use unsigned long for THREAD.
15122 (struct target_ops): Use unsigned long for arguments to attach and
15123 thread_alive.
15124
dcdb98d2
DJ
151252005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15126
15127 * acinclude.m4: Include bfd/bfd.m4 directly.
15128 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15129 <agriffis@toolchain.org>.
15130 * aclocal.m4, configure: Regenerated.
15131
bec39cab
AC
151322005-01-07 Andrew Cagney <cagney@gnu.org>
15133
15134 * configure.ac: Rename configure.in, require autoconf 2.59.
15135 * configure: Re-generate.
15136
434c4c77
DJ
151372004-12-08 Daniel Jacobowitz <dan@debian.org>
15138
15139 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15140 LIBS when finished.
15141 * aclocal.m4: Regenerated.
15142 * configure: Regenerated.
15143
db1d3e1b
AS
151442004-11-21 Andreas Schwab <schwab@suse.de>
15145
15146 * linux-m68k-low.c (m68k_num_gregs): Define.
15147 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15148 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15149 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15150 (m68k_breakpoint_at): New. Add to the_low_target.
15151
15152 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15153 srv_linux_thread_db to yes.
15154
43360365
JB
151552004-10-20 Joel Brobecker <brobecker@gnat.com>
15156
15157 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15158 (ARCH_SET_FS): Likewise.
15159 (ARCH_GET_FS): Likewise.
15160 (ARCH_GET_GS): Likewise.
15161
fd500816
DJ
151622004-10-16 Daniel Jacobowitz <dan@debian.org>
15163
15164 * linux-i386-low.c (ps_get_thread_area): New.
15165 * linux-x86-64-low.c (ps_get_thread_area): New.
15166 * linux-low.c: Include <sys/syscall.h>.
15167 (linux_kill_one_process): Don't kill the first thread here.
15168 (linux_kill): Kill the first thread here.
15169 (kill_lwp): New function.
15170 (send_sigstop, linux_send_signal): Use it.
15171 * proc-service.c: Clean up #ifdefs.
15172 (fpregset_info): Delete.
15173 (ps_lgetregs): Update and enable implementation.
15174 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15175 implementations.
15176 * remote-utils.c (struct sym_cache, symbol_cache): New.
15177 (input_interrupt): Print a clearer message.
15178 (async_io_enabled): New variable.
15179 (enable_async_io, disable_async_io): Use it. Update comments.
15180 (look_up_one_symbol): Use the symbol cache.
15181 * thread-db.c (thread_db_look_up_symbols): New function.
15182 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15183
f6de3c42
DJ
151842004-10-16 Daniel Jacobowitz <dan@debian.org>
15185
15186 * configure.in: Test for -rdynamic.
15187 * configure: Regenerated.
15188 * Makefile (INTERNAL_LDFLAGS): New.
15189 (gdbserver, gdbreplay): Use it.
15190
2c0fc042
AC
151912004-09-02 Andrew Cagney <cagney@gnu.org>
15192
15193 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15194
075b3282
DJ
151952004-03-23 Daniel Jacobowitz <drow@mvista.com>
15196
15197 * linux-low.c (linux_wait): Clear all_processes list also.
15198
fa6a77dc
DJ
151992004-03-12 Daniel Jacobowitz <drow@mvista.com>
15200
15201 * linux-low.c: Include <errno.h>. Remove extern declaration of
15202 errno.
15203
6d782a97
DJ
152042004-03-12 Daniel Jacobowitz <drow@mvista.com>
15205
15206 * gdbreplay.c, server.h, utils.c: Update copyright years.
15207
3a7fb99b
DJ
152082004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15209
15210 * server.c (main): Print child status or termination signal from
15211 variable 'signal', not 'sig'.
15212
c3e735a6
DJ
152132004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15214
15215 * linux-low.c (linux_read_memory): Change return type to
15216 int. Check for and return error from ptrace().
15217 * target.c (read_inferior_memory): Change return type to int. Pass
15218 back return status from the_target->read_memory().
15219 * target.h (struct target_ops): Adapt *read_memory() prototype.
15220 Update comment.
15221 (read_inferior_memory): Adapt prototype.
15222 * server.c (main): Return an error packet if
15223 read_inferior_memory() returns an error.
15224
a59d1c82
DJ
152252004-03-04 Daniel Jacobowitz <drow@mvista.com>
15226
15227 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15228 Unify with other clean targets.
15229
dc3f8883
DJ
152302004-02-29 Daniel Jacobowitz <drow@mvista.com>
15231
15232 * server.c (handle_v_cont): Call set_desired_inferior.
15233
89a208da
DJ
152342004-02-29 Daniel Jacobowitz <drow@mvista.com>
15235
15236 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15237
62ea82f5
DJ
152382004-02-29 Daniel Jacobowitz <drow@mvista.com>
15239
15240 * linux-low.c (linux_wait): Unblock async I/O.
15241 (linux_resume): Block and enable async I/O.
15242 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15243 * server.h (block_async_io, unblock_async_io): Add prototypes.
15244
6910d122
DJ
152452004-02-29 Daniel Jacobowitz <drow@mvista.com>
15246
15247 * remote-utils.c (remote_open): Print a status notice after
15248 opening a TCP port.
15249 * server.c (attach_inferior): Print a status notice after
15250 attaching.
15251
152522004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15253
15254 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15255
c89dc5d4
DJ
152562004-02-26 Daniel Jacobowitz <drow@mvista.com>
15257
15258 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15259 error packet.
15260 * server.c, target.h: Update copyright years.
15261
4b8dad4a
RM
152622004-02-25 Roland McGrath <roland@redhat.com>
15263
15264 * target.h (struct target_ops): New member `read_auxv'.
15265 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15266 * linux-low.c (linux_read_auxv): New function.
15267 (linux_target_ops): Initialize `read_auxv' member to that.
15268
d7446758
JB
152692004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15270
15271 Committed by Jim Blandy <jimb@redhat.com>.
15272
15273 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15274 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15275 instead of GPR_SIZE to distiguish s390 and s390x targets.
15276
5544ad89
DJ
152772004-01-31 Daniel Jacobowitz <drow@mvista.com>
15278
15279 * linux-low.c: Update copyright year.
15280 (check_removed_breakpoint): Clear pending_is_breakpoint.
15281 (linux_set_resume_request, linux_queue_one_thread)
15282 (resume_status_pending_p): New functions.
15283 (linux_continue_one_thread): Use process->resume.
15284 (linux_resume): Only resume threads if there are no pending events.
15285 * linux-low.h (struct process_info): Add resume request
15286 pointer.
15287
2a68b70e
DJ
152882004-01-30 Daniel Jacobowitz <drow@mvista.com>
15289
15290 * regcache.c (new_register_cache): Clear the allocated register
15291 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15292
64386c31
DJ
152932003-10-13 Daniel Jacobowitz <drow@mvista.com>
15294
15295 * linux-low.c (linux_resume): Take a struct thread_resume *
15296 argument.
15297 (linux_wait): Update call.
15298 (resume_ptr): New static variable.
15299 (linux_continue_one_thread): Renamed from
15300 linux_continue_one_process. Use resume_ptr.
15301 (linux_resume): Use linux_continue_one_thread.
15302 * server.c (handle_v_cont, handle_v_requests): New functions.
15303 (myresume): New function.
15304 (main): Handle 'v' case.
15305 * target.h (struct thread_resume): New type.
15306 (struct target_ops): Change argument of "resume" to struct
15307 thread_resume *.
15308 (myresume): Delete macro.
15309
c938e9b0
L
153102003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15311
15312 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15313 (uninstall): Support DESTDIR.
15314
7f313d07
BC
15315Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15316
15317 * configure.srv: Add xscale*linux copy of arm*linux entry.
15318
3b2fc2ea
DJ
153192003-07-24 Daniel Jacobowitz <drow@mvista.com>
15320
15321 * linux-arm-low.c (arm_reinsert_addr): New function.
15322 (the_low_target): Add arm_reinsert_addr.
15323
1c0a559e
MK
153242003-07-08 Mark Kettenis <kettenis@gnu.org>
15325
15326 * mem-break.c: Remove whitespace at end of file.
15327
43d5792c
DJ
153282003-06-28 Daniel Jacobowitz <drow@mvista.com>
15329
15330 * configure.in: Check whether we need to prototype strerror.
15331 * server.h: Optionally prototype strerror.
15332 * gdbreplay.c (perror_with_name): Use strerror.
15333 * linux-low.c (linux_attach_lwp): Use strerror.
15334 * utils.c (perror_with_name): Use strerror.
15335 * config.in, configure: Regenerated.
15336
c8a86edf
DJ
153372003-06-28 Daniel Jacobowitz <drow@mvista.com>
15338
15339 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15340 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15341
73d37363
DJ
153422003-06-20 Daniel Jacobowitz <drow@mvista.com>
15343
15344 * Makefile.in (SFILES): Update.
15345 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15346 low-sun3.c: Remove files.
15347
6ad8ae5c
DJ
153482003-06-17 Daniel Jacobowitz <drow@mvista.com>
15349
15350 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15351 (linux_detach_one_process, linux_detach): New functions.
15352 (linux_target_ops): Add linux_detach.
15353 * server.c (main): Handle 'D' packet.
15354 * target.h (struct target_ops): Add "detach" member.
15355 (detach_inferior): Define.
15356
1581182a
MK
153572003-06-13 Mark Kettenis <kettenis@gnu.org>
15358
15359 From Kelley Cook <kelleycook@wideopenwest.com>:
15360 * configure.srv: Accept i[34567]86 variants.
15361
e5379b03
DJ
153622003-06-05 Daniel Jacobowitz <drow@mvista.com>
15363
15364 * linux-low.c (linux_wait_for_event): Correct comment typos.
15365 (linux_resume_one_process): Call check_removed_breakpoint.
15366 (linux_send_signal): New function.
15367 (linux_target_ops): Add linux_send_signal.
15368 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15369 of kill.
15370 * target.h (struct target_ops): Add send_signal.
15371
2ff29de4
JB
153722003-05-29 Jim Blandy <jimb@redhat.com>
15373
15374 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15375 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15376 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15377 away part of the register's value.
15378
254787d4
DJ
153792003-03-26 Daniel Jacobowitz <drow@mvista.com>
15380
15381 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15382 (linux_wait_for_event, linux_init_signals): Likewise.
15383
94e10508
DJ
153842003-03-17 Daniel Jacobowitz <drow@mvista.com>
15385
15386 * configure.in: Check for stdlib.h.
15387 * configure: Regenerated.
15388 * config.in: Regenerated.
15389
4c0711e0
DJ
153902003-01-04 Andreas Schwab <schwab@suse.de>
15391
15392 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15393
ef66e766
AC
153942003-01-02 Andrew Cagney <ac131313@redhat.com>
15395
15396 * Makefile.in: Remove obsolete code.
15397
a1358604
DJ
153982002-11-20 Daniel Jacobowitz <drow@mvista.com>
15399
15400 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15401 defined(PT_FPR0_HI).
15402
23ce3b1c
DJ
154032002-11-17 Stuart Hughes <seh@zee2.com>
15404
15405 * linux-arm-low.c (arm_num_regs): Increase.
15406 (arm_regmap): Include status register.
15407
154082002-11-17 Daniel Jacobowitz <drow@mvista.com>
15409
15410 * linux-low.c (register_addr): Remove incorrect -1 check.
15411
a9fa9f7d
DJ
154122002-08-29 Daniel Jacobowitz <drow@mvista.com>
15413
15414 * linux-low.c (linux_create_inferior): Call setpgid. Return
15415 the new PID.
15416 (unstopped_p, linux_signal_pid): Remove.
15417 (linux_target_ops): Remove linux_signal_pid.
15418 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15419 global instead of target method.
15420 * target.h (struct target_ops): Remove signal_pid. Update comment
15421 for create_inferior.
15422 * server.c (signal_pid): New variable.
15423 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15424 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15425 (attach_inferior): Set signal_pid.
15426
17574093
DJ
154272002-08-23 Daniel Jacobowitz <drow@mvista.com>
15428
15429 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15430
154312002-08-20 Jim Blandy <jimb@redhat.com>
15432
15433 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15434 default for this.
15435
154362002-08-01 Andrew Cagney <cagney@redhat.com>
15437
15438 * Makefile.in: Make chill references obsolete.
15439
154402002-07-24 Kevin Buettner <kevinb@redhat.com>
15441
15442 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15443 * configure: Regenerate.
15444 * config.in: Regenerate.
15445
154462002-07-09 David O'Brien <obrien@FreeBSD.org>
15447
15448 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15449 (perror_with_name, remote_close, remote_open, expect, play): Static.
15450
154512002-07-04 Michal Ludvig <mludvig@suse.cz>
15452
4b8dad4a 15453 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15454 byte offsets instead of an array of indexes.
15455 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15456
154572002-06-13 Daniel Jacobowitz <drow@mvista.com>
15458
15459 * regcache.c: Add comment.
15460
154612002-06-11 Daniel Jacobowitz <drow@mvista.com>
15462
15463 * thread-db.c: New file.
15464 * proc-service.c: New file.
15465 * acinclude.m4: New file.
15466 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15467 proc-service.o, and thread-db.o.
15468 (linux-low.o): Add USE_THREAD_DB.
15469 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15470 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15471 * aclocal.m4: Regenerated.
15472 * config.in: Regenerated.
15473 * configure: Regenerated.
15474 * configure.in: Check for proc_service.h, sys/procfs.h,
15475 thread_db.h, and linux/elf.h headrs.
15476 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15477 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15478 Check for -lthread_db and thread support.
15479 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15480 PowerPC, and SuperH.
15481 * i387-fp.c: Constify arguments.
15482 * i387-fp.h: Likewise.
15483 * inferiors.c: (struct thread_info): Renamed from
15484 `struct inferior_info'. Remove PID member. Use generic inferior
15485 list header. All uses updated.
15486 (inferiors, signal_pid): Removed.
15487 (all_threads): New variable.
15488 (get_thread): Define.
15489 (add_inferior_to_list): New function.
15490 (for_each_inferior): New function.
15491 (change_inferior_id): New function.
15492 (add_inferior): Removed.
15493 (remove_inferior): New function.
15494 (add_thread): New function.
15495 (free_one_thread): New function.
15496 (remove_thread): New function.
15497 (clear_inferiors): Use for_each_inferior and free_one_thread.
15498 (find_inferior): New function.
15499 (find_inferior_id): New function.
15500 (inferior_target_data): Update argument type.
15501 (set_inferior_target_data): Likewise.
15502 (inferior_regcache_data): Likewise.
15503 (set_inferior_regcache_data): Likewise.
15504 * linux-low.c (linux_bp_reinsert): Remove.
15505 (all_processes, stopping_threads, using_thrads)
15506 (struct pending_signals, debug_threads, pid_of): New.
15507 (inferior_pid): Replace with macro.
15508 (struct inferior_linux_data): Remove.
15509 (get_stop_pc, add_process): New functions.
15510 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15511 Use add_process and add_thread.
15512 (linux_attach_lwp): New function, based on old linux_attach. Use
15513 add_process and add_thread. Set stop_expected for new threads.
15514 (linux_attach): New function.
15515 (linux_kill_one_process): New function.
15516 (linux_kill): Kill all LWPs.
15517 (linux_thread_alive): Use find_inferior_id.
15518 (check_removed_breakpoints, status_pending_p): New functions.
15519 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15520 Update. Use WNOHANG. Wait for cloned processes also. Update process
15521 struct for the found process.
15522 (linux_wait_for_event): New function.
15523 (linux_wait): Use it. Support LWPs.
15524 (send_sigstop, wait_for_sigstop, stop_all_processes)
15525 (linux_resume_one_process, linux_continue_one_process): New functions.
15526 (linux_resume): Support LWPs.
15527 (REGISTER_RAW_SIZE): Remove.
15528 (fetch_register): Use register_size instead. Call supply_register.
15529 (usr_store_inferior_registers): Likewise. Call collect_register.
15530 Fix recursive case.
15531 (regsets_fetch_inferior_registers): Improve error message.
15532 (regsets_store_inferior_registers): Add debugging.
15533 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15534 (unstopped_p, linux_signal_pid): New functions.
15535 (linux_target_ops): Add linux_signal_pid.
15536 (linux_init_signals): New function.
15537 (initialize_low): Call it. Initialize using_threads.
15538 * regcache.c (inferior_regcache_data): Add valid
15539 flag.
15540 (get_regcache): Fetch registers lazily. Add fetch argument
15541 and update all callers.
15542 (regcache_invalidate_one, regcache_invalidate): New
15543 functions.
15544 (new_register_cache): Renamed from create_register_cache.
15545 Return the new regcache.
15546 (free_register_cache): Change argument to a void *.
15547 (registers_to_string, registers_from_string): Call get_regcache
15548 with fetch flag set.
15549 (register_data): Make static. Pass fetch flag to get_regcache.
15550 (supply_register): Call get_regcache with fetch flag clear.
15551 (collect_register): Call get_regcache with fetch flag set.
15552 (collect_register_as_string): New function.
15553 * regcache.h: Update.
15554 * remote-utils.c (putpkt): Flush after debug output and use
15555 stderr.
15556 Handle input interrupts while waiting for an ACK.
15557 (input_interrupt): Use signal_pid method.
15558 (getpkt): Flush after debug output and use stderr.
15559 (outreg): Use collect_register_as_string.
15560 (new_thread_notify, dead_thread_notify): New functions.
15561 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15562 and general_thread.
15563 (look_up_one_symbol): Flush after debug output.
15564 * server.c (step_thread, server_waiting): New variables.
15565 (start_inferior): Don't use signal_pid. Update call to mywait.
15566 (attach_inferior): Update call to mywait.
15567 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15568 (main): Don't fetch/store registers explicitly. Use
15569 set_desired_inferior. Support proposed ``Hs'' packet. Update
15570 calls to mywait.
15571 * server.h: Update.
15572 (struct inferior_list, struct_inferior_list_entry): New.
15573 * target.c (set_desired_inferior): New.
15574 (write_inferior_memory): Constify.
15575 (mywait): New function.
15576 * target.h: Update.
15577 (struct target_ops): New signal_pid method.
15578 (mywait): Removed macro, added prototype.
15579
15580 * linux-low.h (regset_func): Removed.
15581 (regset_fill_func, regset_store_func): New.
15582 (enum regset_type): New.
15583 (struct regset_info): Add type field. Use new operation types.
15584 (struct linux_target_ops): stop_pc renamed to get_pc.
15585 Add decr_pc_after_break and breakpoint_at.
15586 (get_process, get_thread_proess, get_process_thread)
15587 (strut process_info, all_processes, linux_attach_lwp)
15588 (thread_db_init): New.
15589
15590 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15591 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15592 (the_low_target): Add new members.
15593 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15594 (i386_store_fpxregset): Constify.
15595 (target_regsets): Add new kind identifier.
15596 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15597 (i386_set_pc): Add debugging.
15598 (i386_breakpoint_at): New function.
15599 (the_low_target): Add new members.
15600 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15601 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15602 (mips_breakpoint_at): New.
15603 (the_low_target): Add new members.
15604 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15605 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15606 (the_low_target): Add new members.
15607 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15608 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15609 (the_low_target): Add new members.
15610 * linux-x86-64-low.c (target_regsets): Add new kind
15611 identifier.
15612
156132002-05-15 Daniel Jacobowitz <drow@mvista.com>
15614
15615 From Martin Pool <mbp@samba.org>:
15616 * server.c (gdbserver_usage): New function.
15617 (main): Call it.
15618
156192002-05-14 Daniel Jacobowitz <drow@mvista.com>
15620
15621 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15622 stop_at -> stop_pc.
15623
156242002-05-04 Andrew Cagney <ac131313@redhat.com>
15625
15626 * Makefile.in: Remove obsolete code.
15627
156282002-04-24 Michal Ludvig <mludvig@suse.cz>
15629
15630 * linux-low.c (regsets_fetch_inferior_registers),
15631 (regsets_store_inferior_registers): Removed cast to int from
15632 ptrace() calls.
15633 * regcache.h: Added declaration of struct inferior_info.
15634
156352002-04-20 Daniel Jacobowitz <drow@mvista.com>
15636
15637 * inferiors.c (struct inferior_info): Add regcache_data.
15638 (add_inferior): Call create_register_cache.
15639 (clear_inferiors): Call free_register_cache.
15640 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15641 * regcache.c (struct inferior_regcache_data): New.
15642 (registers): Remove.
15643 (get_regcache): New function.
15644 (create_register_cache, free_register_cache): New functions.
15645 (set_register_cache): Don't initialize the register cache here.
15646 (registers_to_string, registers_from_string, register_data): Call
15647 get_regcache.
15648 * regcache.h: Add prototypes.
15649 * server.h: Likewise.
15650
156512002-04-20 Daniel Jacobowitz <drow@mvista.com>
15652
15653 * mem-break.c: New file.
15654 * mem-break.h: New file.
15655 * Makefile.in: Add mem-break.o rule; update server.h
15656 dependencies.
15657 * inferiors.c (struct inferior_info): Add target_data
15658 member.
15659 (clear_inferiors): Free target_data member if set.
15660 (inferior_target_data, set_inferior_target_data): New functions.
15661 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15662 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15663 * linux-low.c (linux_bp_reinsert): New variable.
15664 (struct inferior_linux_data): New.
15665 (linux_create_inferior): Use set_inferior_target_data.
15666 (linux_attach): Likewise. Call add_inferior.
15667 (linux_wait_for_one_inferior): New function.
15668 (linux_wait): Call it.
15669 (linux_write_memory): Add const.
15670 (initialize_low): Call set_breakpoint_data.
15671 * linux-low.h (struct linux_target_ops): Add breakpoint
15672 handling members.
15673 * server.c (attach_inferior): Remove extra add_inferior
15674 call.
15675 * server.h: Include mem-break.h. Update inferior.c
15676 prototypes.
15677 * target.c (read_inferior_memory)
15678 (write_inferior_memory): New functions.
15679 * target.h (read_inferior_memory)
15680 (write_inferior_memory): Change macros to prototypes.
15681 (struct target_ops): Update comments. Add const to write_memory
15682 definition.
15683
156842002-04-11 Daniel Jacobowitz <drow@mvista.com>
15685
15686 * linux-low.c (usr_store_inferior_registers): Support
15687 registers which are allowed to fail to store.
15688 * linux-low.h (linux_target_ops): Likewise.
15689 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15690 (ppc_cannot_store_register): FPSCR may not be storable.
15691
156922002-04-09 Daniel Jacobowitz <drow@mvista.com>
15693
15694 * server.h: Include <string.h> if HAVE_STRING_H.
15695 * ChangeLog: Correct paths in last ChangeLog entry.
15696
156972002-04-09 Daniel Jacobowitz <drow@mvista.com>
15698
15699 * linux-low.h: Remove obsolete prototypes.
15700 (struct linux_target_ops): New.
15701 (extern the_low_target): New.
15702 * linux-low.c (num_regs, regmap): Remove declarations.
15703 (register_addr): Use the_low_target explicitly.
15704 (fetch_register): Likewise.
15705 (usr_fetch_inferior_registers): Likewise.
15706 (usr_store_inferior_registers): Likewise.
15707 * linux-arm-low.c (num_regs): Remove.
15708 (arm_num_regs): Define.
15709 (arm_regmap): Renamed from regmap, made static.
15710 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15711 made static.
15712 (arm_cannot_store_register): Renamed from cannot_store_register,
15713 made static.
15714 (the_low_target): New.
15715 * linux-i386-low.c (num_regs): Remove.
15716 (i386_num_regs): Define.
15717 (i386_regmap): Renamed from regmap, made static.
15718 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15719 made static.
15720 (i386_cannot_store_register): Renamed from cannot_store_register,
15721 made static.
15722 (the_low_target): New.
15723 * linux-ia64-low.c (num_regs): Remove.
15724 (ia64_num_regs): Define.
15725 (ia64_regmap): Renamed from regmap, made static.
15726 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15727 made static.
15728 (ia64_cannot_store_register): Renamed from cannot_store_register,
15729 made static.
15730 (the_low_target): New.
15731 * linux-m68k-low.c (num_regs): Remove.
15732 (m68k_num_regs): Define.
15733 (m68k_regmap): Renamed from regmap, made static.
15734 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15735 made static.
15736 (m68k_cannot_store_register): Renamed from cannot_store_register,
15737 made static.
15738 (the_low_target): New.
15739 * linux-mips-low.c (num_regs): Remove.
15740 (mips_num_regs): Define.
15741 (mips_regmap): Renamed from regmap, made static.
15742 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15743 made static.
15744 (mips_cannot_store_register): Renamed from cannot_store_register,
15745 made static.
15746 (the_low_target): New.
15747 * linux-ppc-low.c (num_regs): Remove.
15748 (ppc_num_regs): Define.
15749 (ppc_regmap): Renamed from regmap, made static.
15750 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15751 made static.
15752 (ppc_cannot_store_register): Renamed from cannot_store_register,
15753 made static.
15754 (the_low_target): New.
15755 * linux-s390-low.c (num_regs): Remove.
15756 (s390_num_regs): Define.
15757 (s390_regmap): Renamed from regmap, made static.
15758 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15759 made static.
15760 (s390_cannot_store_register): Renamed from cannot_store_register,
15761 made static.
15762 (the_low_target): New.
15763 * linux-sh-low.c (num_regs): Remove.
15764 (sh_num_regs): Define.
15765 (sh_regmap): Renamed from regmap, made static.
15766 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15767 made static.
15768 (sh_cannot_store_register): Renamed from cannot_store_register,
15769 made static.
15770 (the_low_target): New.
15771 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15772 (the_low_target): New.
15773
157742002-04-09 Daniel Jacobowitz <drow@mvista.com>
15775
15776 * Makefile.in: Add stamp-h target.
15777 * configure.in: Create stamp-h.
15778 * configure: Regenerated.
15779
157802002-04-09 Daniel Jacobowitz <drow@mvista.com>
15781
15782 * inferiors.c: New file.
15783 * target.c: New file.
15784 * target.h: New file.
15785 * Makefile.in: Add target.o and inferiors.o. Update
15786 dependencies.
15787 * linux-low.c (inferior_pid): New static variable,
15788 moved from server.c.
15789 (linux_create_inferior): Renamed from create_inferior.
15790 Call add_inferior. Return 0 on success instead of a PID.
15791 (linux_attach): Renamed from myattach.
15792 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15793 (linux_thread_alive): Renamed from mythread_alive.
15794 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15795 child dies.
15796 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15797 (regsets_store_inferior_registers): Correct error message.
15798 Add missing ``return 0''.
15799 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15800 (linux_store_registers): Renamed from store_inferior_registers.
15801 (linux_read_memory): Renamed from read_inferior_memory.
15802 (linux_write_memory): Renamed from write_inferior_memory.
15803 (linux_target_ops): New structure.
15804 (initialize_low): Call set_target_ops ().
15805 * remote-utils.c (unhexify): New function.
15806 (hexify): New function.
15807 (input_interrupt): Send signals to ``signal_pid''.
15808 * server.c (inferior_pid): Remove.
15809 (start_inferior): Update create_inferior call.
15810 (attach_inferior): Call add_inferior.
15811 (handle_query): New function.
15812 (main): Call handle_query for `q' packets.
15813 * server.h: Include "target.h". Remove obsolete prototypes.
15814 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15815
158162002-04-09 Daniel Jacobowitz <drow@mvista.com>
15817
15818 * Makefile.in: Add WARN_CFLAGS. Update configury
15819 dependencies.
15820 * configure.in: Check for <string.h>
15821 * configure: Regenerate.
15822 * config.in: Regenerate.
15823 * gdbreplay.c: Include needed system headers.
15824 (remote_open): Remove strchr prototype.
15825 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15826 * regcache.c (supply_register): Change buf argument to const void *.
15827 (supply_register_by_name): Likewise.
15828 (collect_register): Change buf argument to void *.
15829 (collect_register_by_name): Likewise.
15830 * regcache.h: Add missing prototypes.
15831 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15832 * server.c (handle_query): New function.
15833 (attached): New static variable, moved out of main.
15834 (main): Quiet longjmp clobber warnings.
15835 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15836 * utils.c (error): Remove NORETURN.
15837 (fatal): Likewise.