Fix tic6x-uclinux GDBserver build failure
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
3491a34c
YQ
12017-11-16 Yao Qi <yao.qi@linaro.org>
2
3 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
4 (tic6x_store_gregset): Likewise.
5 (tic6x_usrregs_info): Move it up.
6
a602f924
AH
72017-11-15 Alan Hayward <alan.hayward@arm.com>
8
9 * Makefile.in: Update arch rules.
10 * configure.srv: Explicitly mark arch/ files.
11
5616b6c3
AS
122017-11-13 Andreas Schwab <schwab@suse.de>
13
14 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
15 function.
16 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
17
d1928160
PA
182017-11-06 Pedro Alves <palves@redhat.com>
19
20 * config.in, configure: Regenerate.
21
bac608e7
SM
222017-10-27 Simon Marchi <simon.marchi@ericsson.com>
23
24 * target.c (struct thread_search): Remove.
25 (thread_search_callback): Remove.
26 (prepare_to_access_memory): Use for_each_thread instead of
27 find_inferior. Inline code from thread_search_callback.
28
eaddb425
SM
292017-10-27 Simon Marchi <simon.marchi@ericsson.com>
30
31 * server.c (struct visit_actioned_threads_data): Remove.
32 (visit_actioned_threads): Change prototype to take arguments
33 directly.
34 (resume): Use find_thread instead of find_inferior.
35
99078d34
SM
362017-10-27 Simon Marchi <simon.marchi@ericsson.com>
37
38 * server.c (queue_stop_reply_callback): Change prototype, return
39 void.
40 (find_status_pending_thread_callback): Remove.
41 (handle_status): Replace find_inferior with find_thread and
42 for_each_thread.
43
cc628f3d
AH
442017-10-25 Alan Hayward <alan.hayward@arm.com>
45
46 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
47 with REGNO.
48 (aarch64_store_gregset): Likewise.
49 (aarch64_fill_fpregset): Likewise.
50 (aarch64_store_fpregset): Likewise.
51
4d3bb80e
SM
522017-10-21 Simon Marchi <simon.marchi@ericsson.com>
53
54 * gdbthread.h (find_thread, for_each_thread): New functions.
55 * inferiors.c (thread_of_pid): Remove.
56 (find_any_thread_of_pid): Use find_thread.
57 * linux-low.c (num_lwps): Use for_each_thread.
58
7a7cdfa0
YQ
592017-10-17 Yao Qi <yao.qi@linaro.org>
60
61 * Makefile.in: Remove one rule.
62 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
63
e675d170
YQ
642017-10-17 Yao Qi <yao.qi@linaro.org>
65
66 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
67 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
68
7eb4e0f9
YQ
692017-10-17 Yao Qi <yao.qi@linaro.org>
70
71 * configure.srv: Rename arm.o with arch/arm.o.
72
60d6cfc9
YQ
732017-10-17 Yao Qi <yao.qi@linaro.org>
74
75 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
76 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
77 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
78 (arch-i386.o, arch-amd64.o): Remove rules.
79 (arch/%.o): New rule.
80 Update POSTCOMPILE and COMPILE.pre.
81 * configure.ac: Invoke AC_CONFIG_COMMANDS.
82 * configure: Re-generated.
83 * configure.srv: Replace arch-i386.o with arch/i386.o.
84 Replace arch-amd64.o with arch/amd64.o.
85
5bfda255
YQ
862017-10-16 Yao Qi <yao.qi@linaro.org>
87
88 * configure: Regenerated.
89
9c80ecd6
SM
902017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
91
92 * inferiors.h: (struct inferior_list): Remove.
93 (struct inferior_list_entry); Remove.
94 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
95 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
96 get_first_inferior): Remove.
97 (for_each_inferior, for_each_inferior_with_data, find_inferior,
98 find_inferior_id, find_inferior_in_random): Change signature.
99 * inferiors.c (all_threads): Change type to
100 std::list<thread_info *>.
101 (get_thread): Remove macro.
102 (find_inferior, find_inferior_id): Change signature, implement
103 using find_thread.
104 (find_inferior_in_random): Change signature, implement using
105 find_thread_in_random.
106 (for_each_inferior, for_each_inferior_with_data): Change
107 signature, implement using for_each_thread.
108 (add_inferior_to_list, remove_inferior): Remove.
109 (add_thread, get_first_thread, thread_of_pid,
110 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
111 (get_first_inferior, one_inferior_p, clear_inferior_list):
112 Remove.
113 (clear_inferiors, get_thread_process): Update.
114 * gdbthread.h: Include <list>.
115 (struct thread_info) <entry>: Remove field.
116 <id>: New field.
117 (all_threads): Change type to std::list<thread_info *>.
118 (get_first_inferior): Add doc.
119 (find_thread, for_each_thread, find_thread_in_random): New
120 functions.
121 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
122 * linux-arm-low.c (update_registers_callback): Update.
123 * linux-low.c (second_thread_of_pid_p): Update.
124 (kill_one_lwp_callback, linux_detach_lwp_callback,
125 delete_lwp_callback, status_pending_p_callback, same_lwp,
126 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
127 iterate_over_lwps, not_stopped_callback,
128 resume_stopped_resumed_lwps, count_events_callback,
129 select_singlestep_lwp_callback, select_event_lwp_callback,
130 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
131 suspend_and_send_sigstop_callback, wait_for_sigstop,
132 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
133 lwp_running, linux_set_resume_request, resume_status_pending_p,
134 need_step_over_p, start_step_over, linux_resume_one_thread,
135 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
136 reset_lwp_ptrace_options_callback): Update.
137 * linux-mips-low.c (update_watch_registers_callback): Update.
138 * regcache.c (regcache_invalidate_one, regcache_invalidate):
139 Update.
140 (free_register_cache_thread_one): Remove.
141 (regcache_release): Update.
142 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
143 handle_qxfer_threads_worker): Update.
144 (handle_query): Update, use list iterator.
145 (visit_actioned_threads, handle_pending_status,
146 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
147 clear_pending_status_callback, set_pending_status_callback,
148 find_status_pending_thread_callback, handle_status,
149 process_serial_event): Update.
150 * target.c (thread_search_callback): Update.
151 * thread-db.c (thread_db_get_tls_address): Update.
152 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
153 Update.
154 * win32-i386-low.c (update_debug_registers_callback): Update.
155 * win32-low.c (delete_thread_info, child_delete_thread,
156 continue_one_thread, suspend_one_thread,
157 get_child_debug_event): Adjust.
158
9179355e
SM
1592017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
160
161 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
162 * inferiors.h: Include <list>.
163 (struct process_info) <entry>: Remove field.
164 <pid>: New field.
165 (pid_of): Change macro to function.
166 (ptid_of, lwpid_of): Remove macro.
167 (all_processes): Change type to std::list<process_info *>.
168 (ALL_PROCESSES): Remove macro.
169 (for_each_process, find_process): New function.
170 * inferiors.c (all_processes): Change type to
171 std::list<process_info *>.
172 (find_thread_process): Adjust.
173 (add_process): Likewise.
174 (remove_process): Likewise.
175 (find_process_pid): Likewise.
176 (get_first_process): Likewise.
177 (started_inferior_callback): Remove.
178 (have_started_inferiors_p): Adjust.
179 (attached_inferior_callback): Remove.
180 (have_attached_inferiors_p): Adjust.
181 * linux-low.c (check_zombie_leaders): Likewise.
182 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
183 (x86_linux_update_xmltarget): Adjust.
184 * server.c (handle_query): Likewise.
185 (gdb_reattached_process): Remove.
186 (handle_status): Adjust.
187 (kill_inferior_callback): Likewise.
188 (detach_or_kill_inferior): Remove.
189 (print_started_pid): Likewise.
190 (print_attached_pid): Likewise.
191 (detach_or_kill_for_exit): Update.
192 (process_serial_event): Likewise.
193 * linux-arm-low.c (arm_new_fork): Likewise.
194
c9cb8905
SM
1952017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
196
197 * dll.h: Include <list>.
198 (struct dll_info): Add constructor.
199 <entry>: Remove field.
200 (all_dlls): Change type to std::list<dll_info>.
201 * dll.c: Include <algorithm>.
202 (get_dll): Remove macro.
203 (all_dlls): Change type to std::list<dll_info *>.
204 (free_one_dll): Remove.
205 (match_dll): Likewise.
206 (loaded_dll): Adjust.
207 (unloaded_dll): Adjust to all_dlls type change, use
208 std::find_if. Inline code from match_dll.
209 (clear_dlls): Adjust to all_dlls type change.
210 * server.c (emit_dll_description): Remove.
211 (handle_qxfer_libraries): Adjust to all_dlls type change,
212 integrate emit_dll_description's functionality.
213
04ec7890
SM
2142017-10-12 Simon Marchi <simon.marchi@ericsson.com>
215
216 * linux-low.h (struct linux_target_ops) <delete_process>: New
217 field.
218 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
219 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
220 (struct linux_target_ops): Add delete_process callback.
221 * linux-arm-low.c (arm_delete_process): New.
222 (struct linux_target_ops): Add delete_process callback.
223 * linux-bfin-low.c (struct linux_target_ops): Likewise.
224 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
225 * linux-m32r-low.c (struct linux_target_ops): Likewise.
226 * linux-mips-low.c (mips_linux_delete_process): New.
227 (struct linux_target_ops): Add delete_process callback.
228 * linux-ppc-low.c (struct linux_target_ops): Likewise.
229 * linux-s390-low.c (struct linux_target_ops): Likewise.
230 * linux-sh-low.c (struct linux_target_ops): Likewise.
231 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
232 * linux-tile-low.c (struct linux_target_ops): Likewise.
233 * linux-x86-low.c (x86_linux_delete_process): New.
234 (struct linux_target_ops): Add delete_process callback.
235 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
236
466eecee
SM
2372017-10-12 Simon Marchi <simon.marchi@ericsson.com>
238
239 * linux-aarch64-low.c (the_low_target): Add thread delete
240 callback.
241 * linux-arm-low.c (arm_delete_thread): New function.
242 (the_low_target): Add thread delete callback.
243 * linux-bfin-low.c (the_low_target): Likewise.
244 * linux-crisv32-low.c (the_low_target): Likewise.
245 * linux-low.c (delete_lwp): Invoke delete_thread callback if
246 set.
247 * linux-low.h (struct linux_target_ops) <delete_thread>: New
248 field.
249 * linux-m32r-low.c (the_low_target): Add thread delete callback.
250 * linux-mips-low.c (mips_linux_delete_thread): New function.
251 (the_low_target): Add thread delete callback.
252 * linux-ppc-low.c (the_low_target): Likewise.
253 * linux-s390-low.c (the_low_target): Likewise.
254 * linux-sh-low.c (the_low_target): Likewise.
255 * linux-tic6x-low.c (the_low_target): Likewise.
256 * linux-tile-low.c (the_low_target): Likewise.
257 * linux-x86-low.c (the_low_target): Likewise.
258 * linux-xtensa-low.c (the_low_target): Likewise.
259
b79f7801
YZ
2602017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
261
262 * win32-low.c: Include "common-inferior.h".
263
bc3b087d
SDJ
2642017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
265
266 * inferiors.c (set_inferior_cwd): New function.
267 * server.c (handle_general_set): Handle QSetWorkingDir packet.
268 (handle_query): Inform that QSetWorkingDir is supported.
269 * win32-low.c (create_process): Pass the inferior's cwd to
270 CreateProcess.
271
d092c5a2
SDJ
2722017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
273
274 * inferiors.c (current_inferior_cwd): New global variable.
275 (get_inferior_cwd): New function.
276 * inferiors.h (struct process_info) <cwd>: New field.
277
7da0a886
SDJ
2782017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
279
280 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
281 (OBS): Add gdb_tilde_expand.o.
282
289a6840
SM
2832017-10-02 Simon Marchi <simon.marchi@ericsson.com>
284
285 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
286 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
287
256642e8
PA
2882017-09-29 Pedro Alves <palves@redhat.com>
289
290 * ax.c (gdb_parse_agent_expr): Constify.
291 * ax.h (gdb_parse_agent_expr): Constify.
292 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
293 Constify.
294 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
295 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
296 * remote-utils.h (read_ptid): Constify.
297 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
298 (process_point_options, process_serial_event): Constify.
299 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
300 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
301 (cmd_qtbuffer): Constify.
302
5b9ca4d4
PA
3032017-09-29 Pedro Alves <palves@redhat.com>
304
305 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
306 fails.
307
94c207e0
PA
3082017-09-29 Pedro Alves <palves@redhat.com>
309
310 * linux-low.c (handle_extended_wait): Pass parent thread instead
311 of process to thread_db_notice_clone.
312 * linux-low.h (thread_db_notice_clone): Replace parent process
313 parameter with parent thread parameter.
314 * thread-db.c (find_one_thread): Add comment.
315 (thread_db_notice_clone): Replace parent process parameter with
316 parent thread parameter. Temporarily switch to the parent thread.
317
75352e28
SDJ
3182017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
319
320 * gdbthread.h: Include "common-gdbthread.h".
321 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
322 "if" when validating the ptid.
323 * remote-utils.c: Include "gdbthread.h".
324 (prepare_resume_reply): Use "switch_to_thread".
325 * target.c (done_accessing_memory): Likewise.
326
ad339634
AA
3272017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
328
329 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
330 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
331 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
332 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
333 s390x-gs-linux64-ipa.o to ipa_obj.
334 * linux-s390-low.c (HWCAP_S390_GS): New define.
335 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
336 New functions.
337 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
338 (s390_arch_setup): Check for guarded-storage support and choose
339 appropriate tdesc.
340 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
341 init_registers_s390x_gs_linux64.
342 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
343 enum value.
344 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
345 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
346
cc4d742f
SM
3472017-09-22 Simon Marchi <simon.marchi@ericsson.com>
348
349 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
350
f6327dcb
KB
3512017-09-21 Kevin Buettner <kevinb@redhat.com>
352
353 * linux-low.h (struct lwp_info): Add new field, thread_handle.
354 (thread_db_thread_handle): Declare.
355 * linux-low.c (linux_target_ops): Initialize thread_handle.
356 * server.c (handle_qxfer_threads_worker): Add support for
357 "handle" attribute.
358 * target.h (struct target_ops): Add new function pointer,
359 thread_handle.
360 (target_thread_handle): Define.
361 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
362 field in lwp.
363 (thread_db_thread_handle): New function.
364
86299109
KB
3652017-09-21 Kevin Buettner <kevinb@redhat.com>
366
367 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
368 * linux-low.h (thread_db_notice_clone): Declare.
369 * thread-db.c (thread_db_notice_clone): New function.
370
f557a88a
PA
3712017-09-21 Pedro Alves <palves@redhat.com>
372
373 * server.c (gdb_read_memory, handle_status, process_serial_event)
374 (handle_serial_event, handle_target_event): Adjust to
375 set_desired_thread prototype change.
376 * target.c (set_desired_thread): Remove 'use_general' parameter
377 and adjust.
378 * target.h (set_desired_thread): Remove 'use_general' parameter.
379
223ffa71
TT
3802017-09-20 Tom Tromey <tom@tromey.com>
381
382 * target.c (target_terminal::terminal_state): Define.
383 (target_terminal::init): Rename from target_terminal_init.
384 (target_terminal::inferior): Rename from
385 target_terminal_inferior.
386 (target_terminal::ours): Rename from target_terminal_ours.
387 (target_terminal::ours_for_output, target_terminal::info): New.
388
04fd3ba9
SM
3892017-09-16 Simon Marchi <simon.marchi@ericsson.com>
390
391 * server.c (accumulate_file_name_length): Remove.
392 (emit_dll_description): Adjust to std::string change.
393 (handle_qxfer_libraries): Use std::string to hold document.
394
5e187554
SM
3952017-09-16 Simon Marchi <simon.marchi@ericsson.com>
396
397 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
398 return type of xml_escape_text.
399 * server.c (emit_dll_description): Likewise.
400
1526853e
SM
4012017-09-16 Simon Marchi <simon.marchi@ericsson.com>
402
403 * server.c (captured_main): Accept argument for --selftest.
404 Update run_tests call.
405 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
406 when registering selftests.
407
c4dfafab
SDJ
4082017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
409
410 * regcache.c (get_thread_regcache): Update code to use "std::vector"
411 instead of "VEC" for "target_desc.reg_defs".
412 (regcache_cpy): Likewise.
413 (registers_to_string): Likewise.
414 (registers_from_string): Likewise.
415 (find_regno): Likewise.
416 (supply_regblock): Likewise.
417 (regcache_raw_read_unsigned): Likewise.
418 * tdesc.c (init_target_desc): Likewise.
419 (tdesc_create_reg): Likewise.
420 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
421 (struct target_desc) <reg_defs>: Convert to "std::vector".
422 (target_desc): Do not initialize "reg_defs".
423 (~target_desc): Update code to use "std::vector" instead of "VEC"
424 for "target_desc.reg_defs".
425 (operator==): Likewise.
426
124aceb4
SM
4272017-09-15 Simon Marchi <simon.marchi@ericsson.com>
428
429 * inferiors.h (thread_to_gdb_id): Remove.
430 * inferiors.c (thread_to_gdb_id): Remove.
431 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
432 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
433 lynx_store_registers, lynx_read_memory, lynx_write_memory):
434 Likewise.
435 * nto-low.c (nto_fetch_registers, nto_store_registers,
436 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
437
96cde54f
SM
4382017-09-15 Simon Marchi <simon.marchi@ericsson.com>
439
440 * inferiors.h (gdb_id_to_thread_id): Remove.
441 * inferiors.c (gdb_id_to_thread_id): Remove.
442 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
443 removal. Move pid declaration closer to where it's used.
444
e8ca139e
SM
4452017-09-15 Simon Marchi <simon.marchi@ericsson.com>
446
447 * server.c (handle_detach): New function.
448 (process_serial_event): Move code out, call handle_detach.
449
f8a4e119
SM
4502017-09-15 Simon Marchi <simon.marchi@ericsson.com>
451
452 * server.c (require_running): Rename to ...
453 (require_running_or_return): ... this ...
454 (require_running_or_break): ... and this.
455 (handle_query, process_serial_event): Adjust.
456
0eb0a407
SM
4572017-09-15 Simon Marchi <simon.marchi@ericsson.com>
458
459 * linux-low.c (linux_set_resume_request): Remove unused
460 variables.
461
785922a5
SM
4622017-09-15 Simon Marchi <simon.marchi@ericsson.com>
463
464 * server.c (first_thread_of): Remove.
465 (process_serial_event): Replace usage of first_thread_of with
466 find_any_thread_of_pid.
467 * tracepoint.c (same_process_p): Remove.
468 (gdb_agent_about_to_close): Replace usage of same_process_p with
469 find_any_thread_of_pid.
470 * linux-x86-low.c (same_process_callback): Remove.
471 (x86_arch_setup_process_callback): Replace usage of
472 same_process_callback with find_any_thread_of_pid.
473 * thread-db.c (any_thread_of): Remove.
474 (switch_to_process): Replace usage of any_thread_of with
475 find_any_thread_of_pid.
476 * inferiors.c (thread_pid_matches_callback): Remove.
477 (find_thread_process): Adjust to use find_any_thread_of_pid.
478
a059f00c
SDJ
4792017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
480
481 * regcache.c (get_thread_regcache): Guard calls to "memset"
482 with "!VEC_empty".
483
cc397f3a
SDJ
4842017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
485
486 * linux-low.c (handle_extended_wait): Use
487 "allocate_target_description" instead of "XNEW".
488 * linux-x86-low.c (initialize_low_arch): Likewise.
489
22916b07
YQ
4902017-09-05 Yao Qi <yao.qi@linaro.org>
491
492 * configure.srv (srv_i386_regobj): Remove.
493 (srv_amd64_regobj): Remove.
494 (srv_regobj): Set it to "" for x86 non-linux targets.
495 * linux-x86-tdesc.c (i386_linux_read_description):
496 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
497 (init_registers_i386): Remove the declaration.
498 (tdesc_i386): Remove the declaration.
499 (lynx_i386_arch_setup): Call i386_create_target_description.
500 * nto-x86-low.c: Likewise.
501 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
502 [!__x86_64__]: include arch/i386.h.
503 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
504
38602d55
YQ
5052017-09-05 Yao Qi <yao.qi@linaro.org>
506
507 * configure.srv (srv_amd64_linux_xmlfiles): Remove
508 i386/amd64-XXX-linux from it.
509
44b886ff
YQ
5102017-09-05 Yao Qi <yao.qi@linaro.org>
511
512 * configure.srv: Empty srv_amd64_linux_regobj if $development is
513 false.
514 (ipa_amd64_linux_regobj): Remove.
515 (ipa_x32_linux_regobj): Remove.
516
b4570e4b
YQ
5172017-09-05 Yao Qi <yao.qi@linaro.org>
518
519 * Makefile.in (arch-amd64.o): New rule.
520 * configure.srv: Append arch-amd64.o.
521 * linux-amd64-ipa.c: Include common/x86-xstate.h.
522 (get_ipa_tdesc): Call amd64_linux_read_description.
523 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
524 and init_registers_amd64_XXX.
525 * linux-x86-low.c (x86_linux_read_description): Call
526 amd64_linux_read_description.
527 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
528 (initialize_low_arch): Don't call init_registers_x32_XXX and
529 init_registers_amd64_XXX.
530 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
531 and tdesc_amd64_XXX.
532 [__x86_64__] (amd64_tdesc_test): New function.
533 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
534 and init_registers_amd64_XXX.
535 * linux-x86-tdesc.c: Include arch/amd64.h.
536 (xcr0_to_tdesc_idx): New function.
537 (i386_linux_read_description): New function.
538 (amd64_get_ipa_tdesc_idx): New function.
539 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
540 (amd64_get_ipa_tdesc): Declare.
541
d1f28ea2
YQ
5422017-09-05 Yao Qi <yao.qi@linaro.org>
543
544 * configure.srv (srv_i386_linux_xmlfiles): Remove
545 i386/i386-XXX-linux.xml from it.
546
25a93583
YQ
5472017-09-05 Yao Qi <yao.qi@linaro.org>
548
549 * configure.srv: Set srv_i386_linux_regobj empty if $development
550 is false.
551 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
552 initialize_low_tdesc.
553 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
554 with #if initialize_low_tdesc.
555 * linux-x86-tdesc-selftest.c: New file.
556 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
557
5f035c07
YQ
5582017-09-05 Yao Qi <yao.qi@linaro.org>
559
560 * Makefile.in (arch-i386.o): New rule.
561 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
562 (x86_64-*-linux*): Likewise.
563 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
564 include arch/i386.h.
565 (i386_linux_read_description): Remove code and call
566 i386_create_target_description.
567 * tdesc.c (allocate_target_description): New function.
568 * tdesc.h (set_tdesc_architecture): Remove declaration.
569 (set_tdesc_osabi): Likewise.
570
0abe8a89
YQ
5712017-09-05 Yao Qi <yao.qi@linaro.org>
572
573 * linux-x86-tdesc.c: Don't include <inttypes.h>.
574 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
575 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
576 .xmltarget.
577 * server.c (get_features_xml): Call tdesc_get_features_xml.
578 * tdesc.c (set_tdesc_architecture): New function.
579 (set_tdesc_osabi): New function.
580 (tdesc_get_features_xml): New function.
581 (tdesc_create_feature): Add an argument.
582 * tdesc.h (struct target_desc) <features>: New field.
583 <arch, osabi>: New field.
584 (~target_desc): xfree features, arch, and osabi.
585 (target_desc::oerator==): Don't compare .xmltarget.
586 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
587 (set_tdesc_osabi): Likewise.
588 (tdesc_get_features_xml): Likewise.
589
0a188386
YQ
5902017-09-05 Yao Qi <yao.qi@linaro.org>
591
592 * linux-x86-tdesc.c: Include selftest.h.
593 (i386_tdesc_test): New function.
594 (initialize_low_tdesc): Call selftests::register_test.
595 * tdesc.h: Include regdef.h.
596 (target_desc): Override operator == and !=.
597
f49ff000
YQ
5982017-09-05 Yao Qi <yao.qi@linaro.org>
599
600 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
601 (ipa_obj): Likewise.
602 * linux-i386-ipa.c: Include common/x86-xstate.h
603 (get_ipa_tdesc): Call i386_linux_read_description.
604 (initialize_low_tracepoint): Don't call init_registers_XXX
605 functions, call initialize_low_tdesc instead.
606 * linux-x86-low.c (x86_linux_read_description): Call
607 i386_linux_read_description.
608 (initialize_low_arch): Don't call init_registers_i386_XXX
609 functions, call initialize_low_tdesc.
610 * linux-x86-tdesc.c: New file.
611 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
612 (i386_get_ipa_tdesc_idx): Declare.
613 (i386_get_ipa_tdesc): Declare.
614 (initialize_low_tdesc): Declare.
615
2b68ef2f
YQ
6162017-09-05 Yao Qi <yao.qi@linaro.org>
617
618 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
619 instead of 0.
620
f7000548
YQ
6212017-09-05 Yao Qi <yao.qi@linaro.org>
622
623 * Makefile.in (IPA_OBJS): Add vec-ipa.o
624 * regcache.c (get_thread_regcache): Use VEC_length.
625 (init_register_cache): Likewise.
626 (regcache_cpy): Likewise.
627 (registers_to_string): Iterate reg_defs via VEC_iterate.
628 (find_regno): Likewise.
629 (find_register_by_number): Use VEC_index.
630 (register_size): Call find_register_by_number.
631 (register_data): Call find_register_by_number.
632 (supply_regblock): Use VEC_length.
633 (regcache_raw_read_unsigned): Likewise.
634 * tdesc.c (init_target_desc): Iterate reg_defs via
635 VEC_iterate.
636 (default_description): Update initializer.
637 (copy_target_description): Don't update field num_registers.
638 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
639 <num_registers>: Remove.
640
50a421ac
SM
6412017-09-04 Simon Marchi <simon.marchi@ericsson.com>
642
643 * Makefile.in (.SECONDARY): Define target.
644
23fdd69e
SM
6452017-09-03 Simon Marchi <simon.marchi@ericsson.com>
646
647 * linux-low.c (linux_wait_1): Adjust.
648 * server.c (queue_stop_reply_callback): Adjust.
649
0a2dde4a
SDJ
6502017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
651
652 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
653 QEnvironmentUnset and QEnvironmentReset packets.
654 (handle_query): Inform remote that QEnvironmentHexEncoded,
655 QEnvironmentUnset and QEnvironmentReset are supported.
656
6afd337d
SM
6572017-08-25 Simon Marchi <simon.marchi@ericsson.com>
658
659 * inferiors.h (inferior_target_data): Rename to ...
660 (thread_target_data): ... this.
661 (inferior_regcache_data): Rename to ...
662 (thread_regcache_data): ... this.
663 (set_inferior_regcache_data): Rename to ...
664 (set_thread_regcache_data): ... this.
665 * inferiors.c (inferior_target_data): Rename to ...
666 (thread_target_data): ... this.
667 (inferior_regcache_data): Rename to ...
668 (thread_regcache_data): ... this.
669 (set_inferior_regcache_data): Rename to ...
670 (set_thread_regcache_data): ... this.
671 (free_one_thread): Update.
672 * linux-low.h (get_thread_lwp): Update.
673 * regcache.c (get_thread_regcache): Update.
674 (regcache_invalidate_thread): Update.
675 (free_register_cache_thread): Update.
676 * win32-i386-low.c (update_debug_registers_callback): Update.
677 (win32_get_current_dr): Update.
678 * win32-low.c (thread_rec): Update.
679 (delete_thread_info): Update.
680 (continue_one_thread): Update.
681 (suspend_one_thread): Update.
682
a160cc46
SM
6832017-08-24 Simon Marchi <simon.marchi@ericsson.com>
684
685 * inferiors.c (set_inferior_target_data): Remove.
686 * inferiors.h (set_inferior_target_data): Remove.
687
6d580b63
YQ
6882017-08-18 Yao Qi <yao.qi@linaro.org>
689
690 * Makefile.in (OBS): Add selftest.o.
691 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
692 * configure, config.in: Re-generated.
693 * server.c: Include common/sefltest.h.
694 (captured_main): Handle option --selftest.
695
f5a29eb0
YQ
6962017-08-09 Yao Qi <yao.qi@linaro.org>
697
698 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
699 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
700 i386-avx-mpx.o and i386-mmx.o.
701 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
702 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
703 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
704 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
705 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
706 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
707 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
708 i386/amd64-avx-mpx.xml.
709
57757c2f
YQ
7102017-08-09 Yao Qi <yao.qi@linaro.org>
711
712 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
713 and x32-avx-avx512.o.
714 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
715 i386/x32-avx-avx512.xml.
716
229d26fc
SM
7172017-07-26 Simon Marchi <simon.marchi@ericsson.com>
718
719 * tracepoint.h (enum class fast_tpoint_collect_result): New
720 enumeration.
721 (fast_tracepoint_collecting): Change return type to
722 fast_tpoint_collect_result.
723 * tracepoint.c (fast_tracepoint_collecting): Likewise.
724 * linux-low.h: Include tracepoint.h.
725 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
726 fast_tpoint_collect_result.
727 * linux-low.c (handle_tracepoints): Adjust.
728 (linux_fast_tracepoint_collecting): Change return type to
729 fast_tpoint_collect_result.
730 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
731 linux_wait_1, stuck_in_jump_pad_callback,
732 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
733 proceed_one_lwp): Adjust to type change.
734
2e1e43e1
YQ
7352017-07-10 Yao Qi <yao.qi@linaro.org>
736
737 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
738
adc764e7
YQ
7392017-06-29 Yao Qi <yao.qi@linaro.org>
740
741 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
742 Remove.
743 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
744
a206891a
SM
7452017-06-20 Simon Marchi <simon.marchi@ericsson.com>
746
747 * Makefile.in (IPA_OBJS): Sort and format one item per line.
748
9a6c7d9c
SDJ
7492017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
750
751 * linux-low.c (linux_create_inferior): Adjust code to access the
752 environment information via 'gdb_environ' class.
753 * lynx-low.c (lynx_create_inferior): Likewise.
754 * server.c (our_environ): Make it an instance of 'gdb_environ'.
755 (get_environ): Return a pointer to 'our_environ'.
756 (captured_main): Initialize 'our_environ'.
757 * server.h (get_environ): Adjust prototype.
758 * spu-low.c (spu_create_inferior): Adjust code to access the
759 environment information via 'gdb_environ' class.
760
ae3e2ccf
SM
7612017-06-17 Simon Marchi <simon.marchi@ericsson.com>
762
763 * linux-low.c (linux_read_memory, linux_write_memory): Remove
764 usage of "register" keyword.
765
3e019bdc
SM
7662017-06-17 Simon Marchi <simon.marchi@ericsson.com>
767
768 * configure: Re-generate.
769
8465943a
SM
7702017-06-17 Simon Marchi <simon.marchi@ericsson.com>
771
772 * configure: Re-generate.
773
cf0dd6f0
SM
7742017-06-17 Simon Marchi <simon.marchi@ericsson.com>
775
776 * Makefile.in (COMPILE.pre): Add "-x c++".
777
9845682b
SDJ
7782017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
779
780 * fork-child.c: Conditionally include <signal.h>.
781
aefd8b33
SDJ
7822017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
783
784 * server.c (handle_general_set): Handle new packet
785 "QStartupWithShell".
786 (handle_query): Add "QStartupWithShell" to the list of supported
787 packets.
788 (gdbserver_usage): Add help text explaining the
789 new "--startup-with-shell" and "--no-startup-with-shell" CLI
790 options.
791 (captured_main): Recognize and act upon the presence of the new
792 CLI options.
793
2090129c
SDJ
7942017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
795 Pedro Alves <palves@redhat.com>
796
797 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
798 * configure: Regenerate.
799 * configure.srv (srv_linux_obj): Add "fork-child.o" and
800 "fork-inferior.o".
801 (i[34567]86-*-lynxos*): Likewise.
802 (spu*-*-*): Likewise.
803 * fork-child.c: New file.
804 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
805 and "environ.h".
806 (linux_ptrace_fun): New function.
807 (linux_create_inferior): Adjust function prototype to reflect
808 change on "target.h". Adjust function code to use
809 "fork_inferior".
810 (linux_request_interrupt): Delete "signal_pid".
811 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
812 (lynx_ptrace_fun): New function.
813 (lynx_create_inferior): Adjust function prototype to reflect
814 change on "target.h". Adjust function code to use
815 "fork_inferior".
816 * nto-low.c (nto_create_inferior): Adjust function prototype and
817 code to reflect change on "target.h". Update comments.
818 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
819 "common-terminal.h" and "environ.h".
820 (terminal_fd): Moved to fork-child.c.
821 (old_foreground_pgrp): Likewise.
822 (restore_old_foreground_pgrp): Likewise.
823 (last_status): Make it global.
824 (last_ptid): Likewise.
825 (our_environ): New variable.
826 (startup_with_shell): Likewise.
827 (program_name): Likewise.
828 (program_argv): Rename to...
829 (program_args): ...this.
830 (wrapper_argv): New variable.
831 (start_inferior): Delete function.
832 (get_exec_wrapper): New function.
833 (get_exec_file): Likewise.
834 (get_environ): Likewise.
835 (prefork_hook): Likewise.
836 (post_fork_inferior): Likewise.
837 (postfork_hook): Likewise.
838 (postfork_child_hook): Likewise.
839 (handle_v_run): Update code to deal with arguments coming from the
840 remote host. Update calls from "start_inferior" to
841 "create_inferior".
842 (captured_main): Likewise. Initialize environment variable. Call
843 "have_job_control".
844 * server.h (post_fork_inferior): New prototype.
845 (get_environ): Likewise.
846 (last_status): Declare.
847 (last_ptid): Likewise.
848 (signal_pid): Likewise.
849 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
850 (spu_ptrace_fun): New function.
851 (spu_create_inferior): Adjust function prototype to reflect change
852 on "target.h". Adjust function code to use "fork_inferior".
853 * target.c (target_terminal_init): New function.
854 (target_terminal_inferior): Likewise.
855 (target_terminal_ours): Likewise.
856 * target.h: Include <vector>.
857 (struct target_ops) <create_inferior>: Update prototype.
858 (create_inferior): Update macro.
859 * utils.c (gdb_flush_out_err): New function.
860 * win32-low.c (win32_create_inferior): Adjust function prototype
861 and code to reflect change on "target.h".
862
043a4934
SDJ
8632017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
864
865 * inferiors.c (switch_to_thread): New function.
866
15652511
SDJ
8672017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
868
869 * Makefile.in (SFILE): Add "common/job-control.c".
870 (OBS): Add "job-control.o".
871
21ea5acd
SDJ
8722017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
873
874 * Makefile: Remove "@host_makefile_frag@".
875
e13cb306
PA
8762017-05-05 Pedro Alves <palves@redhat.com>
877
878 * configure: Regenerate.
879
c94fee56
SDJ
8802017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
881
882 * configure: Regenerate.
883
a0ff9e1a
SM
8842017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
885
886 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
887 software_single_step change of return type to
888 std::vector<CORE_ADDR>.
889 * linux-low.c (install_software_single_step_breakpoints):
890 Likewise.
891 * linux-low.h (install_software_single_step_breakpoints):
892 Likewise.
893
be628ab8
SDJ
8942017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
895
896 * remote-utils.c: Include "gdb_termios.h" instead of
897 "terminal.h".
898 * terminal.h: Delete file.
899
7c5ded6a
SDJ
9002017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
901
902 * server.c: Include <vector>.
903 <program_argv, wrapper_argv>: Convert to std::vector.
904 (start_inferior): Rewrite function to use C++.
905 (handle_v_run): Likewise. Update code that calculates the argv
906 based on the vRun packet; use C++.
907 (captured_main): Likewise.
908
436252de
SM
9092017-04-06 Simon Marchi <simon.marchi@ericsson.com>
910
911 * server.c (handle_v_cont): Initialize thread_resume::thread
912 with null_ptid.
913
9bf2a700
PA
9142017-04-05 Pedro Alves <palves@redhat.com>
915
916 * configure: Regenerate.
917
a121b7c1
PA
9182017-04-05 Pedro Alves <palves@redhat.com>
919
920 * gdbreplay.c (sync_error): Constify.
921 * linux-x86-low.c (push_opcode): Constify.
922
21c8a587
PA
9232017-04-05 Pedro Alves <palves@redhat.com>
924
925 * win32-low.c (get_child_debug_event)
926 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
927 Report TARGET_WAITKIND_SPURIOUS instead.
928
fb32b4f7
PA
9292017-04-05 Pedro Alves <palves@redhat.com>
930
931 * remote-utils.c (remote_prepare, remote_open): Constify.
932 * remote-utils.h (remote_prepare, remote_open): Constify.
933 * server.c (captured_main): Constify 'port' handling.
934
65dd1e59
SM
9352017-04-04 Simon Marchi <simon.marchi@ericsson.com>
936
937 * Makefile.in (clean): Clear .deps.
938
8fa5b777
SM
9392017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
940
941 * .gitignore: Remove generated files, replace with wildcard.
942 * (clean): Replace removal of generated files with wildcard.
943 (version.c): Replace with...
944 (version-generated.c): ...this.
945 (xml-builtin.c): Replace with...
946 (xml-builtin-generated.c): ...this.
947 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
948 (%.c: *regformats*): Replace with...
949 (%-generated.c: *regformats*): ...this.
950
a12e714b
MF
9512017-03-27 Max Filippov <jcmvbkbc@gmail.com>
952
953 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
954 (xtensa_fill_gregset): Call collect_register_by_name for
955 threadptr register.
956 (xtensa_store_gregset): Call supply_register_by_name for
957 threadptr register.
958
1a09b50a
MF
9592017-03-27 Max Filippov <jcmvbkbc@gmail.com>
960
961 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
962 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
963 (xtensa_store_gregset): Call supply_register for all registers in
964 a0_regnum..a0_regnum + C0_NREGS range.
965
1a01e7c6
SM
9662017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
967
968 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
969 (ax-ipa.o: ax.c): Remove.
970 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
971 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
972 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
973 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
974 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
975
36bc18a8
SM
9762017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
977
978 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
979 (print-utils-ipa.o: ../common/print-utils.c): Remove.
980 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
981 (errors-ipa.o: ../common/errors.c): Remove.
982 (format-ipa.o: ../common/format.c): Remove.
983 (common-utils-ipa.o: ../common/common-utils.c): Remove.
984
a8ebe3d5
SM
9852017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
986
987 * Makefile.in (%-ipa.o: %.c): New rule.
988 (tracepoint-ipa.o: tracepoint.c): Remove.
989 (utils-ipa.o: utils.c): Remove.
990 (remote-utils-ipa.o: remote-utils.c): Remove.
991 (regcache-ipa.o: regcache.c): Remove.
992 (i386-linux-ipa.o: i386-linux.c): Remove.
993 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
994 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
995 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
996 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
997 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
998 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
999 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1000 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1001 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1002 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1003 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1004 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1005 (aarch64-ipa.o: aarch64.c): Remove.
1006 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1007 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1008 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1009 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1010 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1011 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1012 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1013 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1014 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1015 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1016 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1017 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1018 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1019 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1020 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1021 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1022 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1023 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1024 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1025 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1026 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1027 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1028 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1029 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1030 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1031 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1032 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1033 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1034 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1035 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1036 (tdesc-ipa.o: tdesc.c): Remove.
1037 (x32-linux-ipa.o: x32-linux.c): Remove.
1038 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1039 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1040
50cfacb7
SM
10412017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1042
1043 * Makefile.in (%.o: ../arch/%.c): New rule.
1044 (arm.o: ../arch/arm.c): Remove.
1045 (arm-linux.o: ../arch/arm-linux.c): Remove.
1046 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1047 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1048
c5a22423
SM
10492017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1050
1051 * Makefile.in (%.o: ../nat/%.c): New rule.
1052 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1053 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1054 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1055 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1056 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1057 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1058 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1059 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1060 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1061 (linux-personality.o: ../nat/linux-personality.c): Remove.
1062 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1063 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1064 (x86-linux.o: ../nat/x86-linux.c): Remove.
1065 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1066 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1067
6bda016b
SM
10682017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1069
1070 * Makefile.in (%.o: ../common/%.c): New rule.
1071 (signals.o: ../common/signals.c): Remove.
1072 (print-utils.o: ../common/print-utils.c): Remove.
1073 (rsp-low.o: ../common/rsp-low.c): Remove.
1074 (common-utils.o: ../common/common-utils.c): Remove.
1075 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1076 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1077 (vec.o: ../common/vec.c): Remove.
1078 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1079 (xml-utils.o: ../common/xml-utils.c): Remove.
1080 (ptid.o: ../common/ptid.c): Remove.
1081 (buffer.o: ../common/buffer.c): Remove.
1082 (format.o: ../common/format.c): Remove.
1083 (filestuff.o: ../common/filestuff.c): Remove.
1084 (agent.o: ../common/agent.c): Remove.
1085 (errors.o: ../common/errors.c): Remove.
1086 (environ.o: ../common/environ.c): Remove.
1087 (common-debug.o: ../common/common-debug.c): Remove.
1088 (cleanups.o: ../common/cleanups.c): Remove.
1089 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1090 (fileio.o: ../common/fileio.c): Remove.
1091 (common-regcache.o: ../common/common-regcache.c): Remove.
1092 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1093 (new-op.o: ../common/new-op.c): Remove.
1094 (btrace-common.o: ../common/btrace-common.c): Remove.
1095
21122961
SM
10962017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1097
1098 * Makefile.in (%.o: ../target/%.c): New rule.
1099 (waitstatus.o: ../target/waitstatus.c): Remove.
1100
c362e621
SM
11012017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1102
1103 * Makefile.in
1104 (%.c: ../regformats/%.dat,
1105 (%.c: ../regformats/arm/%.dat,
1106 (%.c: ../regformats/i386/%.dat,
1107 (%.c: ../regformats/rs6000/%.dat): New rules.
1108 (aarch64.c): Remove.
1109 (reg-arm.c): Remove.
1110 (arm-with-iwmmxt.c): Remove.
1111 (arm-with-vfpv2.c): Remove.
1112 (arm-with-vfpv3.c): Remove.
1113 (arm-with-neon.c): Remove.
1114 (reg-bfin.c): Remove.
1115 (reg-cris.c): Remove.
1116 (reg-crisv32.c): Remove.
1117 (i386.c): Remove.
1118 (i386-linux.c): Remove.
1119 (i386-avx.c): Remove.
1120 (i386-avx-linux.c): Remove.
1121 (i386-avx-avx512.c): Remove.
1122 (i386-avx-avx512-linux.c): Remove.
1123 (i386-mpx.c): Remove.
1124 (i386-mpx-linux.c): Remove.
1125 (i386-avx-mpx-avx512-pku.c): Remove.
1126 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1127 (i386-avx-mpx.c): Remove.
1128 (i386-avx-mpx-linux.c): Remove.
1129 (i386-mmx.c): Remove.
1130 (i386-mmx-linux.c): Remove.
1131 (reg-ia64.c): Remove.
1132 (reg-m32r.c): Remove.
1133 (reg-m68k.c): Remove.
1134 (reg-cf.c): Remove.
1135 (mips-linux.c): Remove.
1136 (mips-dsp-linux.c): Remove.
1137 (mips64-linux.c): Remove.
1138 (mips64-dsp-linux.c): Remove.
1139 (nios2-linux.c): Remove.
1140 (powerpc-32.c): Remove.
1141 (powerpc-32l.c): Remove.
1142 (powerpc-altivec32l.c): Remove.
1143 (powerpc-cell32l.c): Remove.
1144 (powerpc-vsx32l.c): Remove.
1145 (powerpc-isa205-32l.c): Remove.
1146 (powerpc-isa205-altivec32l.c): Remove.
1147 (powerpc-isa205-vsx32l.c): Remove.
1148 (powerpc-e500l.c): Remove.
1149 (powerpc-64l.c): Remove.
1150 (powerpc-altivec64l.c): Remove.
1151 (powerpc-cell64l.c): Remove.
1152 (powerpc-vsx64l.c): Remove.
1153 (powerpc-isa205-64l.c): Remove.
1154 (powerpc-isa205-altivec64l.c): Remove.
1155 (powerpc-isa205-vsx64l.c): Remove.
1156 (s390-linux32.c): Remove.
1157 (s390-linux32v1.c): Remove.
1158 (s390-linux32v2.c): Remove.
1159 (s390-linux64.c): Remove.
1160 (s390-linux64v1.c): Remove.
1161 (s390-linux64v2.c): Remove.
1162 (s390-te-linux64.c): Remove.
1163 (s390-vx-linux64.c): Remove.
1164 (s390-tevx-linux64.c): Remove.
1165 (s390x-linux64.c): Remove.
1166 (s390x-linux64v1.c): Remove.
1167 (s390x-linux64v2.c): Remove.
1168 (s390x-te-linux64.c): Remove.
1169 (s390x-vx-linux64.c): Remove.
1170 (s390x-tevx-linux64.c): Remove.
1171 (tic6x-c64xp-linux.c): Remove.
1172 (tic6x-c64x-linux.c): Remove.
1173 (tic6x-c62x-linux.c): Remove.
1174 (reg-sh.c): Remove.
1175 (reg-sparc64.c): Remove.
1176 (reg-spu.c): Remove.
1177 (amd64.c): Remove.
1178 (amd64-linux.c): Remove.
1179 (amd64-avx.c): Remove.
1180 (amd64-avx-linux.c): Remove.
1181 (amd64-avx-avx512.c): Remove.
1182 (amd64-avx-avx512-linux.c): Remove.
1183 (amd64-mpx.c): Remove.
1184 (amd64-mpx-linux.c): Remove.
1185 (amd64-avx-mpx-avx512-pku.c): Remove.
1186 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1187 (amd64-avx-mpx.c): Remove.
1188 (amd64-avx-mpx-linux.c): Remove.
1189 (x32.c): Remove.
1190 (x32-linux.c): Remove.
1191 (x32-avx.c): Remove.
1192 (x32-avx-linux.c): Remove.
1193 (x32-avx-avx512.c): Remove.
1194 (x32-avx-avx512-linux.c): Remove.
1195 (reg-xtensa.c): Remove.
1196 (reg-tilegx.c): Remove.
1197 (reg-tilegx32.c): Remove.
1198
1672e0d9
SDJ
11992017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1200
1201 * Makefile.in (SFILES): Add "common/environ.c".
1202 (OBJS): Add "common/environ.h".
1203
239b6d10
WT
12042017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1205
1206 * configure.ac: Check if the fs_base and gs_base members of
1207 `struct user_regs_struct' exist.
1208 * config.in: Regenerated.
1209 * configure: Likewise.
1210
694b382c
AT
12112017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1212
1213 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1214 target_read_memory.
1215 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1216 (get_next_pcs_syscall_next_pc): Likewise.
1217
7dc53023
LM
12182016-12-23 Luis Machado <lgustavo@codesourcery.com>
1219
1220 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1221 * nto-x86-low.c: Likewise.
1222
ad02e4fe
SM
12232016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1224
1225 * Makefile.in: Include disable-implicit-rules.mk.
1226
dcb07cfa
PA
12272016-11-23 Pedro Alves <palves@redhat.com>
1228
1229 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1230 (debug_vprintf): Use std::chrono::steady_clock instead of
1231 gettimeofday. Use '.' instead of ':'.
1232 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1233 (get_timestamp): Use std::chrono::steady_clock instead of
1234 gettimeofday.
1235
8629c02c
SM
12362016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1237
1238 * Makefile.in: Fix whitespace formatting.
1239
b593ecca
SM
12402016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1241
1242 * Makefile.in (SFILES, OBS): Flatten list and order
1243 alphabetically.
1244
9986ba08
PA
12452016-11-23 Pedro Alves <palves@redhat.com>
1246
1247 * event-loop.c (handle_file_event): Use warning.
1248 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1249 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1250 Use warning.
1251
4eefa7bc
PA
12522016-11-23 Pedro Alves <palves@redhat.com>
1253
1254 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1255 output.
1256 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1257 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1258 debug_printf and debug_flush for debug output.
1259 * server.c (handle_general_set): Likewise.
1260 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1261 output.
1262
5443506e
SM
12632016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1264
1265 * Makefile.in (.c.o): Replace rule with ...
1266 (%.o: %.c): ... this one.
1267
3b165252
SM
12682016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1269
1270 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1271 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1272 make.
1273 * configure.ac: Remove checks for the make program.
1274 * configure: Re-generate.
1275
0bcda685
PA
12762016-10-28 Pedro Alves <palves@redhat.com>
1277
1278 * Makefile.in (CXX_DIALECT): Get from configure.
1279 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1280 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1281 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1282 * config.in: Regenerate.
1283 * configure: Regenerate.
1284
c3805894
YQ
12852016-10-27 Yao Qi <yao.qi@linaro.org>
1286
1287 * linux-low.c (linux_supports_range_stepping): Return true if
1288 can_software_single_step return true.
1289
89342618
YQ
12902016-10-27 Yao Qi <yao.qi@linaro.org>
1291
1292 * inferiors.c (find_inferior_in_random): New function.
1293 * inferiors.h (find_inferior_in_random): Declare.
1294 * linux-low.c (linux_wait_for_event_filtered): Call
1295 find_inferior_in_random instead of find_inferior.
1296
e3652c84
YQ
12972016-10-27 Yao Qi <yao.qi@linaro.org>
1298
1299 * linux-low.c (linux_wait_1): If single-step breakpoints are
1300 inserted, remove them.
1301
5a04c4cf
PA
13022016-10-26 Pedro Alves <palves@redhat.com>
1303
1304 * linux-low.c (handle_extended_wait): Link parent/child fork
1305 threads.
1306 (linux_wait_1): Unlink them.
1307 (linux_set_resume_request): Ignore resume requests for
1308 already-resumed and unhandled fork child threads.
1309 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1310 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1311 New functions.
1312 (handle_v_requests) <vCont>: Don't call require_running.
1313 * server.h (in_queued_stop_replies): New declaration.
1314
cb93dc7f
YQ
13152016-10-24 Yao Qi <yao.qi@linaro.org>
1316
1317 PR server/20733
1318 * linux-aarch64-low.c (append_insns): Cast the return value to
1319 'uint32_t *'.
1320
a1078bea
YQ
13212016-10-10 Yao Qi <yao.qi@linaro.org>
1322
1323 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1324
1fb77080
SDJ
13252016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1326
1327 * target.c (target_supports_multi_process): New function, moved
1328 from...
1329 * target.h (target_supports_multi_process): ... here. Remove
1330 macro.
1331
39b5a3b9
TT
13322016-10-05 Tom Tromey <tom@tromey.com>
1333
1334 PR remote/20655:
1335 * tracepoint.c (handle_tracepoint_bkpts): Check
1336 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1337
c1d0b70a
YQ
13382016-10-05 Yao Qi <yao.qi@linaro.org>
1339
1340 * configure.srv: Update the path of arm-*.xml files.
1341
0a69eedb
YQ
13422016-10-05 Terry Guo <terry.guo@arm.com>
1343 Yao Qi <yao.qi@linaro.org>
1344
1345 * Makefile.in: Adjust the path of rules.
1346 * configure.srv: Update the path of xml files.
1347 * regformats/arm-with-iwmmxt.dat: Regenerated.
1348 * regformats/arm-with-neon.dat: Likewise.
1349 * regformats/arm-with-vfpv2.dat: Likewise.
1350 * regformats/arm-with-vfpv3.dat Likewise.
1351
17e16485
YQ
13522016-09-30 Yao Qi <yao.qi@linaro.org>
1353
1354 PR gdbserver/20627
1355 * target.c (target_stop_and_wait): Don't call
1356 target_continue_no_signal, use resume_stop instead.
1357
edeeb602
YQ
13582016-09-26 Yao Qi <yao.qi@linaro.org>
1359
1360 * linux-low.c (linux_wait_1): Call debug_exit.
1361
503b1c39
PA
13622016-09-23 Pedro Alves <palves@redhat.com>
1363
1364 * Makefile.in (SFILES): Add common/new-op.c.
1365 (OBS): Add common/new-op.o.
1366 (new-op.o): New rule.
1367
74172ecf
SM
13682016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1369
1370 * .gitinore: Ignore more files.
1371
fc6cda2e
YQ
13722016-09-21 Yao Qi <yao.qi@linaro.org>
1373
1374 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1375 23.
1376
bc1e6c81
SDJ
13772016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1378
1379 * server.c (start_inferior): Call target_mourn_inferior instead of
1380 mourn_inferior; pass ptid_t argument to it.
1381 (resume): Likewise.
1382 (handle_target_event): Likewise.
1383 * target.c (target_mourn_inferior): New function.
1384 * target.h (mourn_inferior): Delete macro.
1385
0e00e962
AA
13862016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1387
1388 * linux-low.c (lwp_is_stepping): New function.
1389
1d8cb77d
CL
13902016-09-06 Carl Love <cel@us.ibm.com>
1391
1392 * server.c (start_inferior): Fixed comment, requested comment change
1393 didn't get updated correctly. Removed reference to ptrace () call as
1394 it is only true on Linux systems.
1395
7313bced
CL
13962016-09-06 Carl Love <cel@us.ibm.com>
1397
1398 * server.c (start_inferior): Do not call
1399 function target_post_create_inferior () if the
1400 inferior process has already exited.
1401
cf6de44d
PA
14022016-09-05 Pedro Alves <palves@redhat.com>
1403
1404 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1405 (COMPILE.pre, CC_LD): Use CXX directly.
1406 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1407 * acinclude.m4: Don't include build-with-cxx.m4.
1408 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1409 * configure: Regenerate.
1410
c1da6748
AT
14112016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1412
1413 PR gdb/19495
1414 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1415 call writing data to own_buf.
1416
f2b9e3df
SDJ
14172016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1418
1419 * target.c (mywait): Call target_wait instead of
1420 the_target->wait.
1421 (target_wait): New function.
1422
049a8570
SDJ
14232016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1424
1425 * server.c (start_inferior): New variable 'ptid'. Replace calls
1426 to the_target->resume by target_continue{,_no_signal}, depending
1427 on the case.
1428 * target.c (target_stop_and_wait): Call target_continue_no_signal
1429 instead of the_target->resume.
1430 (target_continue): New function.
1431
3aa5cfa0
AT
14322016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1433
1434 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1435
754653a7
AZ
14362016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1437
1438 PR server/20491
1439 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1440 ps_prochandle.
1441 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1442 * linux-arm-low.c (ps_get_thread_area): Likewise.
1443 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1444 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1445 * linux-mips-low.c (ps_get_thread_area): Likewise.
1446 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1447 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1448 * linux-x86-low.c (ps_get_thread_area): Likewise.
1449 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1450
ed036b40
PA
14512016-08-19 Pedro Alves <palves@redhat.com>
1452
1453 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1454
c8ef42ee
PA
14552016-08-19 Pedro Alves <palves@redhat.com>
1456
1457 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1458 comment. Use memcpy instead of casting through unsigned long.
1459
9c235a72
PA
14602016-08-19 Pedro Alves <palves@redhat.com>
1461
1462 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1463 allocating around 0x80000000.
1464
201506da
PA
14652016-08-19 Pedro Alves <palves@redhat.com>
1466
1467 PR gdb/20415
1468 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1469 (x32-avx512-linux-ipa.o): New rules.
1470 * configure.ac (x86_64-*-linux*): New x32 check.
1471 * configure.srv (ipa_x32_linux_regobj): New.
1472 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1473 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1474 descriptions.
1475 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1476 descriptions.
1477 * configure: Regenerate.
1478
f348d89a
PA
14792016-08-09 Pedro Alves <palves@redhat.com>
1480
1481 PR gdb/18653
1482 * Makefile.in (OBS): Add signals-state-save-restore.o.
1483 (signals-state-save-restore.o): New rule.
1484 * config.in: Regenerate.
1485 * configure: Regenerate.
1486 * linux-low.c: Include "signals-state-save-restore.h".
1487 (linux_create_inferior): Call
1488 restore_original_signals_state.
1489 * server.c: Include "dispositions-save-restore.h".
1490 (captured_main): Call save_original_signals_state.
1491
1baf5149
PA
14922016-08-05 Pedro Alves <palves@redhat.com>
1493
1494 * configure: Regenerate.
1495
fcd4a73d
YQ
14962016-08-04 Yao Qi <yao.qi@linaro.org>
1497
1498 * linux-low.c (regsets_fetch_inferior_registers): Check
1499 errno is ESRCH or not.
1500
979659d0
YQ
15012016-08-02 Yao Qi <yao.qi@linaro.org>
1502
1503 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1504 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1505 (thread_db_load_search): Update.
1506 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1507 td_ta_set_event and td_ta_event_getmsg.
1508
6598661d
PA
15092016-07-26 Pedro Alves <palves@redhat.com>
1510
1511 PR server/20414
1512 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1513 of unsigned long for 64-bit registers and use uint32_t instead of
1514 unsigned int for 32-bit registers.
1515
9cf12d57
PA
15162016-07-26 Pedro Alves <palves@redhat.com>
1517
1518 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1519 to 'ptrace'.
1520
305450ed
TT
15212016-07-21 Tom Tromey <tom@tromey.com>
1522
1523 * configure: Rebuild.
1524
2583da7c
YQ
15252016-07-21 Yao Qi <yao.qi@linaro.org>
1526
1527 * mem-break.c (find_gdb_breakpoint): Cast bp to
1528 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1529
21536b36
YQ
15302016-07-21 Yao Qi <yao.qi@linaro.org>
1531
1532 * server.c (handle_v_requests): Support s and S actions
1533 if target_supports_software_single_step return true.
1534
8901d193
YQ
15352016-07-21 Yao Qi <yao.qi@linaro.org>
1536
1537 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1538 is resume_step, call maybe_hw_step.
1539 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1540 and unstop them.
1541 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1542 breakpoints or not.
1543 (proceed_one_lwp): If resume request is resume_step, install
1544 reinsert breakpoints and call maybe_hw_step.
1545
0e9a339e
YQ
15462016-07-21 Yao Qi <yao.qi@linaro.org>
1547
1548 * linux-low.c (proceed_one_lwp): Declare.
1549 (linux_resume_one_thread): Remove local variable 'step'.
1550 Lift code enqueue signal. Call proceed_one_lwp instead of
1551 linux_resume_one_lwp.
1552
4281b351
YQ
15532016-07-21 Yao Qi <yao.qi@linaro.org>
1554
1555 * linux-low.c (linux_resume_one_thread): Call
1556 enqueue_pending_signal.
1557
984a2c04
YQ
15582016-07-21 Yao Qi <yao.qi@linaro.org>
1559
1560 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1561 * inferiors.c (do_restore_current_thread_cleanup): New function.
1562 (make_cleanup_restore_current_thread): Likewise.
1563 * linux-low.c (install_software_single_step_breakpoints): Call
1564 make_cleanup_restore_current_thread. Switch current_thread to
1565 thread.
1566
bec903c9
YQ
15672016-07-21 Yao Qi <yao.qi@linaro.org>
1568
1569 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1570 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1571 (clone_one_breakpoint): Likewise.
1572 (delete_reinsert_breakpoints): Change parameter to thread.
1573 Callers updated.
1574 (has_reinsert_breakpoints): Likewise.
1575 (uninsert_reinsert_breakpoints): Likewise.
1576 (reinsert_reinsert_breakpoints): Likewise.
1577 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1578 (delete_reinsert_breakpoints): Likewise.
1579 (reinsert_reinsert_breakpoints): Likewise.
1580 (uninsert_reinsert_breakpoints): Likewise.
1581 (has_reinsert_breakpoints): Likewise.
1582
63c40ec7
YQ
15832016-07-21 Yao Qi <yao.qi@linaro.org>
1584
1585 * inferiors.c (get_thread_process): Make parameter const.
1586 * inferiors.h (get_thread_process): Update declaration.
1587 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1588 Add new parameters child_thread and parent_thread. Callers
1589 updated.
1590 * mem-break.h (clone_all_breakpoints): Update declaration.
1591
9aa76cd0
YQ
15922016-07-21 Yao Qi <yao.qi@linaro.org>
1593
1594 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1595 <command_list, handler>: Remove.
1596 (struct gdb_breakpoint): New.
1597 (struct other_breakpoint): New.
1598 (struct reinsert_breakpoint): New.
1599 (is_gdb_breakpoint): New function.
1600 (any_persistent_commands): Update command_list if
1601 is_gdb_breakpoint returns true.
1602 (set_breakpoint): Create breakpoints according to their types.
1603 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1604 (set_gdb_breakpoint_1): Likewise.
1605 (set_gdb_breakpoint): Likewise.
1606 (clear_breakpoint_conditions): Change parameter type to
1607 'struct gdb_breakpoint *'.
1608 (clear_breakpoint_commands): Likewise.
1609 (clear_breakpoint_conditions_and_commands): Likewise.
1610 (add_condition_to_breakpoint): Likewise.
1611 (add_breakpoint_condition): Likewise.
1612 (add_commands_to_breakpoint): Likewise.
1613 (check_breakpoints): Check other_breakpoint.
1614 (clone_one_breakpoint): Clone breakpopint according to its type.
1615 * mem-break.h (struct gdb_breakpoint): Declare.
1616 (set_gdb_breakpoint): Update declaration.
1617 (clear_breakpoint_conditions_and_commands): Likewise.
1618 (add_breakpoint_condition): Likewise.
1619 (add_breakpoint_commands): Likewise.
1620 * server.c (process_point_options): Change parameter type to
1621 'struct gdb_breakpoint *'.
1622
811f8301
YQ
16232016-07-21 Yao Qi <yao.qi@linaro.org>
1624
1625 * mem-break.c (set_breakpoint_at): Rename it to ...
1626 (set_breakpoint_type_at): ... it.
1627 (set_breakpoint_at): Call set_breakpoint_type_at.
1628 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1629 * mem-break.h (set_breakpoint_at): Update comments.
1630
b1c51e36
CLT
16312016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1632
1633 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1634 to buf parameter.
1635 (nios2_store_gregset): Likewise.
1636
ced2dffb
PA
16372016-07-01 Pedro Alves <palves@redhat.com>
1638 Antoine Tremblay <antoine.tremblay@ericsson.com>
1639
1640 * linux-low.c: Change interface to take the target lwp_info
1641 pointer directly and return void. Handle detaching from a zombie
1642 thread.
1643 (linux_detach_lwp_callback): New function.
1644 (linux_detach): Detach from the leader thread after detaching from
1645 the clone threads.
1646
2ac09a5b
YQ
16472016-06-28 Yao Qi <yao.qi@linaro.org>
1648
1649 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1650 for variable new_offset.
1651 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1652 (aarch64_ftrace_insn_reloc_cb): Likewise.
1653 (aarch64_ftrace_insn_reloc_tb): Likewise.
1654 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1655 PRIx64 instead of PRIx32.
1656
79e7fd4f
YQ
16572016-06-28 Yao Qi <yao.qi@linaro.org>
1658
1659 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1660 (the_low_target): Install arm_get_syscall_trapinfo.
1661
061fc021
YQ
16622016-06-28 Yao Qi <yao.qi@linaro.org>
1663
1664 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1665 function.
1666 (the_low_target): Install aarch64_get_syscall_trapinfo.
1667
4cc32bec
YQ
16682016-06-28 Yao Qi <yao.qi@linaro.org>
1669
1670 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1671 Callers updated.
1672 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1673 Remove parameter sysno.
1674 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1675 sysret.
1676
782c1122
AA
16772016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1678
1679 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1680 (s390_emit_ne_goto): Likewise.
1681 (s390_emit_lt_goto): Likewise.
1682 (s390_emit_le_goto): Likewise.
1683 (s390_emit_gt_goto): Likewise.
1684 (s390_emit_ge_goto): Likewise.
1685 (s390x_emit_eq_goto): Likewise.
1686 (s390x_emit_ne_goto): Likewise.
1687 (s390x_emit_lt_goto): Likewise.
1688 (s390x_emit_le_goto): Likewise.
1689 (s390x_emit_gt_goto): Likewise.
1690 (s390x_emit_ge_goto): Likewise.
1691 (s390_emit_ops_impl): Mark variable static.
1692 (s390x_emit_ops): Likewise.
1693
2e7b624b
YQ
16942016-06-17 Yao Qi <yao.qi@linaro.org>
1695
1696 * linux-low.c (handle_extended_wait): Call
1697 uninsert_reinsert_breakpoints for the parent process. Remove
1698 reinsert breakpoints from the child process. Reinsert them to
1699 the parent process when vfork is done.
1700 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1701 (reinsert_reinsert_breakpoints): New function.
1702 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1703 (reinsert_reinsert_breakpoints): Declare.
1704
8a81c5d7
YQ
17052016-06-17 Yao Qi <yao.qi@linaro.org>
1706
1707 * linux-low.c (handle_extended_wait): If the parent is doing
1708 step-over, remove the reinsert breakpoints from the forked child.
1709
f50bf8e5
YQ
17102016-06-17 Yao Qi <yao.qi@linaro.org>
1711
1712 * linux-low.c (unsuspend_all_lwps): Declare.
1713 (linux_low_filter_event): If thread exited, call finish_step_over.
1714 If step-over is finished, unsuspend other threads.
1715
8376a3cb
YQ
17162016-06-17 Yao Qi <yao.qi@linaro.org>
1717
1718 * linux-low.c (linux_resume_one_lwp_throw): Assert
1719 has_reinsert_breakpoints returns false.
1720 * mem-break.c (delete_disabled_breakpoints): Assert
1721 bp type isn't reinsert_breakpoint.
1722
f79b145d
YQ
17232016-06-17 Yao Qi <yao.qi@linaro.org>
1724
1725 * linux-low.c (maybe_hw_step): New function.
1726 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1727 (finish_step_over): Switch current_thread to lwp temporarily,
1728 and assert has_reinsert_breakpoints returns true.
1729 (proceed_one_lwp): Call maybe_hw_step.
1730 * mem-break.c (has_reinsert_breakpoints): New function.
1731 * mem-break.h (has_reinsert_breakpoints): Declare.
1732
0ae534d2
JT
17332016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1734
1735 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1736
fcdad592
YQ
17372016-05-17 Yao Qi <yao.qi@linaro.org>
1738
1739 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1740 instead of find_inferior.
1741
9e784964
YQ
17422016-05-05 Yao Qi <yao.qi@linaro.org>
1743
1744 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1745 Initialize res to zero.
1746
cf2ebb6e
YQ
17472016-05-05 Yao Qi <yao.qi@linaro.org>
1748
1749 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1750 to uint32_t.
1751
c1aebf87
UW
17522016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1753
1754 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1755 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1756 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1757
35fd2deb 17582016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1759 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1760
1761 * tracepoint.c (write_inferior_int8): New function.
1762 (cmd_qtenable_disable): Write enable flag using
1763 write_inferior_int8.
1764
484b3c32
YQ
17652016-04-25 Yao Qi <yao.qi@linaro.org>
1766
1767 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1768 (need_step_over_p): Return zero if the LWP has pending signals
1769 can be delivered on software single step target.
1770
85ba7d86
YQ
17712016-04-25 Yao Qi <yao.qi@linaro.org>
1772
1773 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1774 return instead of error.
1775
3539aa13
YQ
17762016-04-22 Yao Qi <yao.qi@linaro.org>
1777
1778 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1779 to 23.
1780
5b061e98
YQ
17812016-04-22 Yao Qi <yao.qi@linaro.org>
1782
1783 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1784 signal when stepping over breakpoint with software single
1785 step.
1786
3451269c
PA
17872016-04-21 Pedro Alves <palves@redhat.com>
1788
1789 * linux-s390-low.c (s390_collect_ptrace_register)
1790 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1791 add casts.
1792 (s390_check_regset): Use void * instead of gdb_byte *.
1793
a2358508
PA
17942016-04-20 Pedro Alves <palves@redhat.com>
1795
1796 * configure: Renegerate.
1797
6885166d
YQ
17982016-04-20 Yao Qi <yao.qi@linaro.org>
1799
1800 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1801 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1802 number 16.
1803 (arm_store_gregset): Likewise.
1804
2b863f51
WT
18052016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1806
1807 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1808 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1809 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1810 (amd64-avx-mpx-linux.c): New rules.
1811 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1812 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1813 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1814 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1815 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1816 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1817 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1818 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1819 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1820 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1821 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1822 * linux-x86-low.c (x86_linux_read_description): Add case for
1823 X86_XSTATE_AVX_MPX_MASK.
1824 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1825 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1826 init_registers_i386_avx_mpx_linux.
1827 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1828 (initialize_low_tracepoint): Call
1829 init_registers_i386_avx_mpx_linux.
1830 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1831 (initialize_low_tracepoint): Call
1832 init_registers_amd64_avx_mpx_linux.
1833 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1834 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1835 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1836 declarations.
1837
9b30624b
PA
18382016-04-18 Pedro Alves <palves@redhat.com>
1839
1840 * configure: Regenerate.
1841
45e3745e
AT
18422016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1843
1844 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1845 (aarch64_emit_sub): Likewise.
1846
2afc13ff
PA
18472016-04-12 Pedro Alves <palves@redhat.com>
1848
1849 * utils.c (prepare_to_throw_exception): Delete.
1850
6e774b13
SM
18512016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1852
1853 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1854
4dca19f8
MK
18552016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1856
1857 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1858
d0a9981f
MK
18592016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1860
1861 * linux-aarch64-ipa.c: Add <elf.h> include.
1862 * linux-ppc-ipa.c: Add <elf.h> include.
1863 * linux-s390-ipa.c: Add <elf.h> include.
1864
252db07e
MK
18652016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1866
1867 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1868 (get_raw_reg_ptr): Likewise.
1869 (get_trace_state_variable_value_ptr): Likewise.
1870 (set_trace_state_variable_value_ptr): Likewise.
1871 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1872 char *.
1873
14e2b6d9
MK
18742016-03-31 Wei-cheng Wang <cole945@gmail.com>
1875 Marcin Kościelnicki <koriakin@0x04.net>
1876
1877 PR/17221
1878 * linux-ppc-low.c (emit_insns): New function.
1879 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1880 (ppc_emit_prologue): New function.
1881 (ppc_emit_epilogue): New function.
1882 (ppc_emit_add): New function.
1883 (ppc_emit_sub): New function.
1884 (ppc_emit_mul): New function.
1885 (ppc_emit_lsh): New function.
1886 (ppc_emit_rsh_signed): New function.
1887 (ppc_emit_rsh_unsigned): New function.
1888 (ppc_emit_ext): New function.
1889 (ppc_emit_zero_ext): New function.
1890 (ppc_emit_log_not): New function.
1891 (ppc_emit_bit_and): New function.
1892 (ppc_emit_bit_or): New function.
1893 (ppc_emit_bit_xor): New function.
1894 (ppc_emit_bit_not): New function.
1895 (ppc_emit_equal): New function.
1896 (ppc_emit_less_signed): New function.
1897 (ppc_emit_less_unsigned): New function.
1898 (ppc_emit_ref): New function.
1899 (ppc_emit_const): New function.
1900 (ppc_emit_reg): New function.
1901 (ppc_emit_pop): New function.
1902 (ppc_emit_stack_flush): New function.
1903 (ppc_emit_swap): New function.
1904 (ppc_emit_stack_adjust): New function.
1905 (ppc_emit_call): New function.
1906 (ppc_emit_int_call_1): New function.
1907 (ppc_emit_void_call_2): New function.
1908 (ppc_emit_if_goto): New function.
1909 (ppc_emit_goto): New function.
1910 (ppc_emit_eq_goto): New function.
1911 (ppc_emit_ne_goto): New function.
1912 (ppc_emit_lt_goto): New function.
1913 (ppc_emit_le_goto): New function.
1914 (ppc_emit_gt_goto): New function.
1915 (ppc_emit_ge_goto): New function.
1916 (ppc_write_goto_address): New function.
1917 (ppc_emit_ops_impl): New static variable.
1918 (ppc64v1_emit_prologue): New function.
1919 (ppc64v2_emit_prologue): New function.
1920 (ppc64_emit_epilogue): New function.
1921 (ppc64_emit_add): New function.
1922 (ppc64_emit_sub): New function.
1923 (ppc64_emit_mul): New function.
1924 (ppc64_emit_lsh): New function.
1925 (ppc64_emit_rsh_signed): New function.
1926 (ppc64_emit_rsh_unsigned): New function.
1927 (ppc64_emit_ext): New function.
1928 (ppc64_emit_zero_ext): New function.
1929 (ppc64_emit_log_not): New function.
1930 (ppc64_emit_bit_and): New function.
1931 (ppc64_emit_bit_or): New function.
1932 (ppc64_emit_bit_xor): New function.
1933 (ppc64_emit_bit_not): New function.
1934 (ppc64_emit_equal): New function.
1935 (ppc64_emit_less_signed): New function.
1936 (ppc64_emit_less_unsigned): New function.
1937 (ppc64_emit_ref): New function.
1938 (ppc64_emit_const): New function.
1939 (ppc64v1_emit_reg): New function.
1940 (ppc64v2_emit_reg): New function.
1941 (ppc64_emit_pop): New function.
1942 (ppc64_emit_stack_flush): New function.
1943 (ppc64_emit_swap): New function.
1944 (ppc64v1_emit_call): New function.
1945 (ppc64v2_emit_call): New function.
1946 (ppc64v1_emit_int_call_1): New function.
1947 (ppc64v2_emit_int_call_1): New function.
1948 (ppc64v1_emit_void_call_2): New function.
1949 (ppc64v2_emit_void_call_2): New function.
1950 (ppc64_emit_if_goto): New function.
1951 (ppc64_emit_eq_goto): New function.
1952 (ppc64_emit_ne_goto): New function.
1953 (ppc64_emit_lt_goto): New function.
1954 (ppc64_emit_le_goto): New function.
1955 (ppc64_emit_gt_goto): New function.
1956 (ppc64_emit_ge_goto): New function.
1957 (ppc64v1_emit_ops_impl): New static variable.
1958 (ppc64v2_emit_ops_impl): New static variable.
1959 (ppc_emit_ops): New function.
1960 (linux_low_target): Wire in ppc_emit_ops.
1961
a2174ba4
MK
19622016-03-31 Wei-cheng Wang <cole945@gmail.com>
1963 Marcin Kościelnicki <koriakin@0x04.net>
1964
1965 PR/17221
1966 * Makefile.in: Add powerpc-*-ipa.o
1967 * configure.srv: Add ipa_obj for powerpc*-linux.
1968 * linux-ppc-ipa.c: New file.
1969 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1970 includes.
1971 (PPC_FIELD): New macro.
1972 (PPC_SEXT): New macro.
1973 (PPC_OP6): New macro.
1974 (PPC_BO): New macro.
1975 (PPC_LI): New macro.
1976 (PPC_BD): New macro.
1977 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1978 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1979 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1980 (ppc_get_thread_area): New function.
1981 (is_elfv2_inferior): New function.
1982 (gen_ds_form): New function.
1983 (GEN_STD): New macro.
1984 (GEN_STDU): New macro.
1985 (GEN_LD): New macro.
1986 (GEN_LDU): New macro.
1987 (gen_d_form): New function.
1988 (GEN_ADDI): New macro.
1989 (GEN_ADDIS): New macro.
1990 (GEN_LI): New macro.
1991 (GEN_LIS): New macro.
1992 (GEN_ORI): New macro.
1993 (GEN_ORIS): New macro.
1994 (GEN_LWZ): New macro.
1995 (GEN_STW): New macro.
1996 (GEN_STWU): New macro.
1997 (gen_xfx_form): New function.
1998 (GEN_MFSPR): New macro.
1999 (GEN_MTSPR): New macro.
2000 (GEN_MFCR): New macro.
2001 (GEN_MTCR): New macro.
2002 (GEN_SYNC): New macro.
2003 (GEN_LWSYNC): New macro.
2004 (gen_x_form): New function.
2005 (GEN_OR): New macro.
2006 (GEN_MR): New macro.
2007 (GEN_LWARX): New macro.
2008 (GEN_STWCX): New macro.
2009 (GEN_CMPW): New macro.
2010 (gen_md_form): New function.
2011 (GEN_RLDICL): New macro.
2012 (GEN_RLDICR): New macro.
2013 (gen_i_form): New function.
2014 (GEN_B): New macro.
2015 (GEN_BL): New macro.
2016 (gen_b_form): New function.
2017 (GEN_BNE): New macro.
2018 (GEN_LOAD): New macro.
2019 (GEN_STORE): New macro.
2020 (gen_limm): New function.
2021 (gen_atomic_xchg): New function.
2022 (gen_call): New function.
2023 (ppc_relocate_instruction): New function.
2024 (ppc_install_fast_tracepoint_jump_pad): New function.
2025 (ppc_get_min_fast_tracepoint_insn_len): New function.
2026 (ppc_get_ipa_tdesc_idx): New function.
2027 (the_low_target): Wire in the new functions.
2028 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2029 tdescs.
2030 * linux-ppc-tdesc.h: New file.
2031
a13c4696
MK
20322016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2033
2034 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2035 (alloc_jump_pad_buffer): New function.
2036 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2037 (alloc_jump_pad_buffer): New function.
2038 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2039 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2040 (alloc_jump_pad_buffer): New function.
2041 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2042 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2043 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2044 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2045
1cda1512
MK
20462016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2047
2048 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2049 * linux-amd64-ipa.c: Likewise.
2050 * linux-i386-ipa.c: Likewise.
2051 * linux-s390-ipa.c: Likewise.
2052 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2053 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2054 set_trace_state_variable_value_ptr.
2055 (struct ipa_sym_addresses): Likewise.
2056 (symbol_list): Likewise.
2057 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2058 accessing gdb_collect directly.
2059 (gdb_collect_ptr_type): New typedef.
2060 (get_raw_reg_ptr_type): New typedef.
2061 (get_trace_state_variable_value_ptr_type): New typedef.
2062 (set_trace_state_variable_value_ptr_type): New typedef.
2063 (gdb_collect_ptr): New global.
2064 (get_raw_reg_ptr): New global.
2065 (get_trace_state_variable_value_ptr): New global.
2066 (set_trace_state_variable_value_ptr): New global.
2067 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2068 accessing get_raw_reg directly.
2069 (get_get_tsv_func_addr): Likewise for
2070 get_trace_state_variable_value_ptr.
2071 (get_set_tsv_func_addr): Likewise for
2072 set_trace_state_variable_value_ptr.
2073 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2074
72fb5488
SM
20752016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2076
2077 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2078
28170b88
MK
20792016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2080
2081 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2082 packets.
2083 (relocate_instruction): Remove own_buf.
2084 * server.c (own_buf): Make global.
2085 (handle_v_requests): Make global.
2086 * server.h (own_buf): New declaration.
2087 (handle_v_requests): New prototype.
2088
f39e8743
MK
20892016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2090
2091 PR 18377
2092 * linux-s390-low.c (add_insns): New function.
2093 (s390_emit_prologue): New function.
2094 (s390_emit_epilogue): New function.
2095 (s390_emit_add): New function.
2096 (s390_emit_sub): New function.
2097 (s390_emit_mul): New function.
2098 (s390_emit_lsh): New function.
2099 (s390_emit_rsh_signed): New function.
2100 (s390_emit_rsh_unsigned): New function.
2101 (s390_emit_ext): New function.
2102 (s390_emit_log_not): New function.
2103 (s390_emit_bit_and): New function.
2104 (s390_emit_bit_or): New function.
2105 (s390_emit_bit_xor): New function.
2106 (s390_emit_bit_not): New function.
2107 (s390_emit_equal): New function.
2108 (s390_emit_less_signed): New function.
2109 (s390_emit_less_unsigned): New function.
2110 (s390_emit_ref): New function.
2111 (s390_emit_if_goto): New function.
2112 (s390_emit_goto): New function.
2113 (s390_write_goto_address): New function.
2114 (s390_emit_litpool): New function.
2115 (s390_emit_const): New function.
2116 (s390_emit_call): New function.
2117 (s390_emit_reg): New function.
2118 (s390_emit_pop): New function.
2119 (s390_emit_stack_flush): New function.
2120 (s390_emit_zero_ext): New function.
2121 (s390_emit_swap): New function.
2122 (s390_emit_stack_adjust): New function.
2123 (s390_emit_set_r2): New function.
2124 (s390_emit_int_call_1): New function.
2125 (s390_emit_void_call_2): New function.
2126 (s390_emit_eq_goto): New function.
2127 (s390_emit_ne_goto): New function.
2128 (s390_emit_lt_goto): New function.
2129 (s390_emit_le_goto): New function.
2130 (s390_emit_gt_goto): New function.
2131 (s390_emit_ge_goto): New function.
2132 (s390x_emit_prologue): New function.
2133 (s390x_emit_epilogue): New function.
2134 (s390x_emit_add): New function.
2135 (s390x_emit_sub): New function.
2136 (s390x_emit_mul): New function.
2137 (s390x_emit_lsh): New function.
2138 (s390x_emit_rsh_signed): New function.
2139 (s390x_emit_rsh_unsigned): New function.
2140 (s390x_emit_ext): New function.
2141 (s390x_emit_log_not): New function.
2142 (s390x_emit_bit_and): New function.
2143 (s390x_emit_bit_or): New function.
2144 (s390x_emit_bit_xor): New function.
2145 (s390x_emit_bit_not): New function.
2146 (s390x_emit_equal): New function.
2147 (s390x_emit_less_signed): New function.
2148 (s390x_emit_less_unsigned): New function.
2149 (s390x_emit_ref): New function.
2150 (s390x_emit_if_goto): New function.
2151 (s390x_emit_const): New function.
2152 (s390x_emit_call): New function.
2153 (s390x_emit_reg): New function.
2154 (s390x_emit_pop): New function.
2155 (s390x_emit_stack_flush): New function.
2156 (s390x_emit_zero_ext): New function.
2157 (s390x_emit_swap): New function.
2158 (s390x_emit_stack_adjust): New function.
2159 (s390x_emit_int_call_1): New function.
2160 (s390x_emit_void_call_2): New function.
2161 (s390x_emit_eq_goto): New function.
2162 (s390x_emit_ne_goto): New function.
2163 (s390x_emit_lt_goto): New function.
2164 (s390x_emit_le_goto): New function.
2165 (s390x_emit_gt_goto): New function.
2166 (s390x_emit_ge_goto): New function.
2167 (s390_emit_ops): New function.
2168 (struct linux_target_ops): Fill in emit_ops hook.
2169
abd9baf9
MK
21702016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2171
2172 PR 18377
2173 * Makefile.in: Add s390 IPA files.
2174 * configure.srv: Build IPA for s390.
2175 * linux-s390-ipa.c: New file.
2176 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2177 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2178 (tdesc_s390_linux32): Likewise.
2179 (init_registers_s390_linux32v1): Likewise.
2180 (tdesc_s390_linux32v1): Likewise.
2181 (init_registers_s390_linux32v2): Likewise.
2182 (tdesc_s390_linux32v2): Likewise.
2183 (init_registers_s390_linux64): Likewise.
2184 (tdesc_s390_linux64): Likewise.
2185 (init_registers_s390_linux64v1): Likewise.
2186 (tdesc_s390_linux64v1): Likewise.
2187 (init_registers_s390_linux64v2): Likewise.
2188 (tdesc_s390_linux64v2): Likewise.
2189 (init_registers_s390_te_linux64): Likewise.
2190 (tdesc_s390_te_linux64): Likewise.
2191 (init_registers_s390_vx_linux64): Likewise.
2192 (tdesc_s390_vx_linux64): Likewise.
2193 (init_registers_s390_tevx_linux64): Likewise.
2194 (tdesc_s390_tevx_linux64): Likewise.
2195 (init_registers_s390x_linux64): Likewise.
2196 (tdesc_s390x_linux64): Likewise.
2197 (init_registers_s390x_linux64v1): Likewise.
2198 (tdesc_s390x_linux64v1): Likewise.
2199 (init_registers_s390x_linux64v2): Likewise.
2200 (tdesc_s390x_linux64v2): Likewise.
2201 (init_registers_s390x_te_linux64): Likewise.
2202 (tdesc_s390x_te_linux64): Likewise.
2203 (init_registers_s390x_vx_linux64): Likewise.
2204 (tdesc_s390x_vx_linux64): Likewise.
2205 (init_registers_s390x_tevx_linux64): Likewise.
2206 (tdesc_s390x_tevx_linux64): Likewise.
2207 (have_hwcap_s390_vx): New static variable.
2208 (s390_arch_setup): Fill have_hwcap_s390_vx.
2209 (s390_get_thread_area): New function.
2210 (s390_ft_entry_gpr_esa): New const.
2211 (s390_ft_entry_gpr_zarch): New const.
2212 (s390_ft_entry_misc): New const.
2213 (s390_ft_entry_fr): New const.
2214 (s390_ft_entry_vr): New const.
2215 (s390_ft_main_31): New const.
2216 (s390_ft_main_64): New const.
2217 (s390_ft_exit_fr): New const.
2218 (s390_ft_exit_vr): New const.
2219 (s390_ft_exit_misc): New const.
2220 (s390_ft_exit_gpr_esa): New const.
2221 (s390_ft_exit_gpr_zarch): New const.
2222 (append_insns): New function.
2223 (s390_relocate_instruction): New function.
2224 (s390_install_fast_tracepoint_jump_pad): New function.
2225 (s390_get_min_fast_tracepoint_insn_len): New function.
2226 (s390_get_ipa_tdesc_idx): New function.
2227 (struct linux_target_ops): Wire in the above functions.
2228 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2229 * linux-s390-tdesc.h: New file.
2230
a4105d04
MK
22312016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2232
2233 * linux-s390-low.c (s390_supports_tracepoints): New function.
2234 (struct linux_target_ops): Fill supports_tracepoints hook.
2235
35ac8b3e
YQ
22362016-03-18 Yao Qi <yao.qi@linaro.org>
2237
2238 * linux-low.c (lwp_signal_can_be_delivered): New function.
2239 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2240
94610ec4
YQ
22412016-03-18 Yao Qi <yao.qi@linaro.org>
2242
2243 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2244 0 if signal is enqueued. Remove 'signal' from one debugging
2245 message. Move one debugging message to some lines below.
2246 Remove code setting 'signal' to 0.
2247
80aea927
YQ
22482016-03-18 Yao Qi <yao.qi@linaro.org>
2249
2250 * linux-low.c (linux_low_filter_event): Remove redundant
2251 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2252
b04fd3be
MK
22532016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2254
2255 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2256 (struct linux_target_ops): Wire in the above.
2257
c40c8d4b
YQ
22582016-03-03 Yao Qi <yao.qi@linaro.org>
2259
2260 * linux-low.c: Update comments to start_step_over.
2261
0f8288ae
YQ
22622016-03-03 Yao Qi <yao.qi@linaro.org>
2263
2264 PR server/19736
2265 * linux-low.c (handle_extended_wait): Set child suspended
2266 if event_lwp->bp_reinsert isn't zero.
2267
fdbd04a8
YQ
22682016-03-02 Yao Qi <yao.qi@linaro.org>
2269
2270 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2271 enqueue_pending_signal.
2272
6896a8fa
MK
22732016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2274
2275 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2276 is actually loaded.
2277
ab503087
MK
22782016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2279
2280 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2281 (s390_regmap_3264) [!__s390x__]: New global.
2282 (s390_collect_ptrace_register): Skip map entries containing -1.
2283 (s390_supply_ptrace_register): Ditto.
2284 (s390_fill_gprs_high): New function.
2285 (s390_store_gprs_high): New function.
2286 (s390_regsets): Add NT_S390_HIGH_GPRS.
2287 (s390_get_hwcap): Enable on 31-bit.
2288 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2289 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2290 Detect NT_S390_HIGH_GPRS.
2291 (s390_usrregs_info_3264): Enable on 31-bit.
2292 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2293 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2294
ae91f625
MK
22952016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2296
2297 PR gdb/13808
2298 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2299 * configure.srv: Ditto.
2300 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2301 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2302 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2303 (init_registers_amd64_linux): Remove prototype.
2304 (tdesc_amd64_linux): Remove declaration.
2305 (get_ipa_tdesc): New function.
2306 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2307 initialize remaining tdescs.
2308 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2309 (init_registers_i386_linux): Remove prototype.
2310 (tdesc_i386_linux): Remove declaration.
2311 (get_ipa_tdesc): New function.
2312 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2313 initialize remaining tdescs.
2314 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2315 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2316 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2317 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2318 (x86_get_ipa_tdesc_idx): New function.
2319 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2320 * linux-x86-tdesc.h: New file.
2321 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2322 (target_get_ipa_tdesc_idx): New macro.
2323 * tracepoint.c (ipa_tdesc_idx): New macro.
2324 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2325 (symbol_list): Add ipa_tdesc_idx.
2326 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2327 (ipa_tdesc): Remove.
2328 (ipa_tdesc_idx): New variable.
2329 (get_context_regcache): Use get_ipa_tdesc.
2330 (gdb_collect): Ditto.
2331 (gdb_probe): Ditto.
2332 * tracepoint.h (get_ipa_tdesc): New prototype.
2333 (ipa_tdesc): Remove.
2334
e7ad2f14
PA
23352016-02-24 Pedro Alves <palves@redhat.com>
2336
2337 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2338 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2339 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2340 Factor out common code between the USE_SIGTRAP_SIGINFO and
2341 !USE_SIGTRAP_SIGINFO blocks.
2342 (linux_low_filter_event): Call save_stop_reason instead of
2343 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2344 Update comments.
2345 (linux_wait_1): Update comments.
2346
657f9cde
WW
23472016-02-24 Wei-cheng Wang <cole945@gmail.com>
2348
2349 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2350 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2351 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2352 ppc_insert_point, ppc_remove_point.
2353
b00b61e1
MK
23542016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2355
2356 * linux-s390-low.c (s390_supports_z_point_type): New function.
2357 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2358
553cb527
YQ
23592016-02-16 Yao Qi <yao.qi@linaro.org>
2360
2361 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2362 PC. Get pc from regcache_read_pc.
2363
a5652c21
YQ
23642016-02-12 Yao Qi <yao.qi@linaro.org>
2365
2366 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2367 or linux_get_pc_32bit.
2368 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2369
ed443b61
YQ
23702016-02-12 Yao Qi <yao.qi@linaro.org>
2371
2372 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2373 arm_linux_get_next_pcs_fixup.
2374
020ecd38
MK
23752016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2376
2377 * tracepoint.c (x_tracepoint_action_download): Change
2378 write_inferior_data_ptr to write_inferior_data_pointer.
2379 (cmd_qtstart): Likewise.
2380 (write_inferior_data_ptr): Remove.
2381 (download_agent_expr): Change write_inferior_data_ptr to
2382 write_inferior_data_pointer.
2383 (download_tracepoint_1): Likewise.
2384 (download_tracepoint): Likewise.
2385 (download_trace_state_variables): Likewise.
2386
7cae9051
WW
23872016-02-11 Wei-cheng Wang <cole945@gmail.com>
2388 Marcin Kościelnicki <koriakin@0x04.net>
2389
2390 * tracepoint.c (struct tracepoint_action_ops): Remove.
2391 (struct tracepoint_action): Remove ops.
2392 (m_tracepoint_action_download, r_tracepoint_action_download)
2393 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2394 size and offset accordingly.
2395 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2396 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2397 (tracepoint_action_send, tracepoint_action_download): New functions.
2398 Helpers for trace action handlers.
2399 (add_tracepoint_action): Remove setup actions ops.
2400 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2401
9f6a71b4
YQ
24022016-02-10 Yao Qi <yao.qi@linaro.org>
2403
2404 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2405
1e94266c
SM
24062016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2407
2408 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2409 to AC_OUTPUT.
2410 * configure: Regenerate.
2411
8adce034
SM
24122016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2413
2414 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2415 void * to gdb_byte *.
2416 * linux-low.c (siginfo_fixup): Likewise.
2417 (linux_xfer_siginfo): Likewise.
2418 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2419 Likewise.
2420 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2421
93813b37
WT
24222016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2423
2424 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2425 to srv_tgtobj.
2426 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2427 to srv_tgtobj.
2428 * linux-x86-low.c [__x86_64__]: Include
2429 "nat/amd64-linux-siginfo.h".
2430 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2431 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2432 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2433 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2434 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2435 (cpt_si_fd, si_timerid, si_overrun): Move from
2436 nat/amd64-linux-siginfo.c.
2437 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2438
8424cc97
SM
24392016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2440
2441 * server.c (skip_to_semicolon): Remove.
2442 (process_point_options): Use strchrnul instead of
2443 skip_to_semicolon.
2444
4d18591b
YQ
24452016-01-26 Yao Qi <yao.qi@linaro.org>
2446
2447 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2448 * linux-low.c (install_software_single_step_breakpoints): Don't
2449 call regcache_read_pc.
2450 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2451 argument pc.
2452
d8020970
YQ
24532016-01-26 Yao Qi <yao.qi@linaro.org>
2454
2455 * linux-low.c (install_software_single_step_breakpoints): Call
2456 regcache_read_pc instead of get_pc.
2457
8b207339
YQ
24582016-01-26 Yao Qi <yao.qi@linaro.org>
2459
2460 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2461 (unblock_async_io): Rename to ...
2462 (block_unblock_async_io): ... it. New function.
2463 (enable_async_io): Don't install SIGIO handler. Unblock it
2464 instead.
2465 (disable_async_io): Don't ignore SIGIO. Block it instead.
2466 (initialize_async_io): Install SIGIO handler. Don't call
2467 unblock_async_io.
2468
18879fef
YQ
24692016-01-26 Yao Qi <yao.qi@linaro.org>
2470
2471 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2472 first character is '\003', call *the_target->request_interrupt.
2473
a0f8e08a
YQ
24742016-01-25 Yao Qi <yao.qi@linaro.org>
2475
2476 * remote-utils.c (new_thread_notify): Remove.
2477 (dead_thread_notify): Likewise.
2478 * remote-utils.h (new_thread_notify): Remove declaration.
2479 (dead_thread_notify): Likewise.
2480
cc5fd9ab
MK
24812016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2482
2483 * gdb.trace/pending.exp: Fix expected message on continue.
2484
99e8eb11
MK
24852016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2486
2487 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2488 it works properly on big-endian machines where sizeof (CORE_ADDR)
2489 != sizeof (void *).
2490
a994041d
PA
24912016-01-21 Pedro Alves <palves@redhat.com>
2492
2493 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2494 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2495 * configure: Regenerate.
2496
f7a6a40d
YQ
24972016-01-21 Yao Qi <yao.qi@linaro.org>
2498
2499 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2500 is_thumb and set it according to CPSR saved on the stack.
2501 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2502 arm_sigreturn_next_pc.
2503
6f69e520
YQ
25042016-01-18 Yao Qi <yao.qi@linaro.org>
2505
2506 * linux-low.c (linux_set_pc_64bit): New function.
2507 (linux_get_pc_64bit): New function.
2508 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2509 Declare.
2510 * linux-sparc-low.c (debug_threads): Remove declaration.
2511 (sparc_get_pc): Remove.
2512 (the_low_target): Use linux_get_pc_64bit instead of
2513 sparc_get_pc.
2514 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2515 (the_low_target): Use linux_get_pc_64bit and
2516 linux_set_pc_64bit.
2517
276d4552
YQ
25182016-01-18 Yao Qi <yao.qi@linaro.org>
2519
2520 * linux-arm-low.c (debug_threads): Remove declaration.
2521 (arm_get_pc, arm_set_pc): Remove.
2522 (the_low_target): Use linux_get_pc_32bit and
2523 linux_set_pc_32bit.
2524 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2525 (the_low_target): Use linux_get_pc_32bit and
2526 linux_set_pc_32bit.
2527 * linux-cris-low.c (debug_threads): Remove declaration.
2528 (cris_get_pc, cris_set_pc,): Remove.
2529 (the_low_target): Use linux_get_pc_32bit and
2530 linux_set_pc_32bit.
2531 * linux-crisv32-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-low.c: Include inttypes.h.
2536 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2537 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2538 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2539 (the_low_target): Use linux_get_pc_32bit and
2540 linux_set_pc_32bit.
2541 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2542 (the_low_target): Use linux_get_pc_32bit and
2543 linux_set_pc_32bit.
2544 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2545 (the_low_target): Use linux_get_pc_32bit and
2546 linux_set_pc_32bit.
2547 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2548 (the_low_target): Use linux_get_pc_32bit and
2549 linux_set_pc_32bit.
2550 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2551 (the_low_target): Use linux_get_pc_32bit and
2552 linux_set_pc_32bit.
2553
eb0edac8
GB
25542016-01-18 Gary Benson <gbenson@redhat.com>
2555
2556 * configure.ac (AC_FUNC_FORK): New check.
2557 * config.in: Regenerate.
2558 * configure: Likewise.
2559
1b451dda
YQ
25602016-01-14 Yao Qi <yao.qi@linaro.org>
2561
2562 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2563 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2564 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2565 arm_get_next_pcs_ctor.
2566
82075af2
JS
25672016-01-12 Josh Stone <jistone@redhat.com>
2568 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2569
2570 * inferiors.h: Include "gdb_vecs.h".
2571 (struct process_info): Add syscalls_to_catch.
2572 * inferiors.c (remove_process): Free syscalls_to_catch.
2573 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2574 syscall_return stops.
2575 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2576 * server.c (handle_general_set): Handle QCatchSyscalls.
2577 (handle_query): Report support for QCatchSyscalls.
2578 * target.h (struct target_ops): Add supports_catch_syscall.
2579 (target_supports_catch_syscall): New macro.
2580 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2581 (struct lwp_info): Add syscall_state.
2582 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2583 Maintain syscall_state and syscalls_to_catch across exec.
2584 (get_syscall_trapinfo): New function, proxy to the_low_target.
2585 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2586 (linux_low_filter_event): Toggle syscall_state entry/return for
2587 syscall traps, and set it ignored for all others.
2588 (gdb_catching_syscalls_p): New function.
2589 (gdb_catch_this_syscall_p): New function.
2590 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2591 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2592 (linux_supports_catch_syscall): New function.
2593 (linux_target_ops): Install it.
2594 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2595 (the_low_target): Install it.
2596
8f13a3ce
MF
25972016-01-12 Mike Frysinger <vapier@gentoo.org>
2598
2599 * acinclude.m4: Include new ../warning.m4 file.
2600 * configure: Regenerated.
2601 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2602
5b3da067
MF
26032016-01-12 Mike Frysinger <vapier@gentoo.org>
2604
2605 * ax.c (is_goto_target): Mark static.
2606 * linux-low.c (register_addr): Likewise.
2607 (linux_fetch_registers, linux_store_registers): Likewise.
2608 * mem-break.c (any_persistent_commands): Fix old prototype.
2609 (add_commands_to_breakpoint): Mark static.
2610 * regcache.c (find_register_by_name): Delete unused func.
2611 * remote-utils.c (hex_or_minus_one): Mark static.
2612 * server.c (monitor_show_help): Mark static.
2613 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2614 handle_v_requests): Likewise.
2615
bc504a31
PA
26162016-01-12 Pedro Alves <palves@redhat.com>
2617
2618 Remove use of the registered trademark symbol throughout.
2619
5a0dd67a
YQ
26202016-01-08 Yao Qi <yao.qi@linaro.org>
2621
2622 * remote-utils.c (getpkt): If c is '\003', call target hook
2623 request_interrupt.
2624
b2ca446f
YQ
26252016-01-06 Yao Qi <yao.qi@linaro.org>
2626
2627 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2628 linux-aarch32-low.c.
2629 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2630 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2631 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2632 (thumb2_breakpoint): Declare.
2633 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2634 linux-aarch32-low.h.
2635 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2636 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2637 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2638
edd88788
JB
26392016-01-01 Joel Brobecker <brobecker@adacore.com>
2640
2641 * gdbreplay.c (gdbreplay_version): Change copyright year in
2642 version message.
2643 * server.c (gdbserver_version): Likewise.
2644
65da7f14
PP
26452015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2646
2647 * server.c (crc32_table): Delete.
2648 (crc32): Use libiberty's xcrc32 function.
2649
4abd5ed2
JB
26502015-12-22 Joel Brobecker <brobecker@adacore.com>
2651
2652 * lynx-low.c (lynx_delete_thread_callback): New function.
2653 (lynx_mourn): Properly delete our process and all of its
2654 threads. Remove call to clear_inferiors.
2655
0e50fe5c
JB
26562015-12-22 Joel Brobecker <brobecker@adacore.com>
2657
2658 * target.c (thread_search_callback): Add check that
2659 the thread_stopped target callback is not NULL before
2660 calling it.
2661
35adc03f
YQ
26622015-12-21 Yao Qi <yao.qi@linaro.org>
2663
2664 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2665 arm breakpoint.
2666
bd2b2909
AT
26672015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2668
2669 * server.c (handle_query): Call target_supports_software_single_step.
2670
7fe5e27e
AT
26712015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2672
2673 * linux-low.c (single_step): New function.
2674 (linux_resume_one_lwp_throw): Call single_step.
2675 (start_step_over): Likewise.
2676
d9311bfa
AT
26772015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2678
2679 * Makefile.in (SFILES): Append arch/arm-linux.c,
2680 arch/arm-get-next-pcs.c.
2681 (arm-linux.o): New rule.
2682 (arm-get-next-pcs.o): New rule.
2683 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2684 arm-linux.o.
2685 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2686 to linux-aarch32-low.c.
2687 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2688 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2689 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2690 (thumb2_breakpoint_len): Likewise.
2691 (arm_is_thumb_mode): Make non-static.
2692 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2693 from linux-aarch32-low.c.
2694 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2695 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2696 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2697 (thumb2_breakpoint_len): Likewise.
2698 (arm_is_thumb_mode): New declaration.
2699 * linux-arm-low.c: Include arch/arm-linux.h
2700 aarch/arm-get-next-pcs.h, sys/syscall.h.
2701 (get_next_pcs_ops): New struct.
2702 (get_next_pcs_addr_bits_remove): New function.
2703 (get_next_pcs_is_thumb): New function.
2704 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2705 (arm_sigreturn_next_pc): Likewise.
2706 (get_next_pcs_syscall_next_pc): Likewise.
2707 (arm_gdbserver_get_next_pcs): Likewise.
2708 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2709 Initialize.
2710 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2711 * server.h: Include gdb_vecs.h.
2712
68ce2059
AT
27132015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2714
2715 * Makefile.in (SFILES): Append common/common-regcache.c.
2716 (OBS): Append common-regcache.o.
2717 (common-regcache.o): New rule.
2718 * regcache.c (init_register_cache): Initialize cache to
2719 REG_UNAVAILABLE.
2720 (regcache_raw_read_unsigned): New function.
2721 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2722 register_status enum.
2723
fa5308bd
AT
27242015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2725
2726 * linux-aarch64-low.c (the_low_targets): Rename
2727 breakpoint_reinsert_addr to get_next_pcs.
2728 * linux-arm-low.c (the_low_targets): Likewise.
2729 * linux-bfin-low.c (the_low_targets): Likewise.
2730 * linux-cris-low.c (the_low_targets): Likewise.
2731 * linux-crisv32-low.c (the_low_targets): Likewise.
2732 * linux-low.c (can_software_single_step): Likewise.
2733 (install_software_single_step_breakpoints): New function.
2734 (start_step_over): Use install_software_single_step_breakpoints.
2735 * linux-low.h: New CORE_ADDR vector.
2736 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2737 get_next_pcs.
2738 * linux-mips-low.c (the_low_targets): Likewise.
2739 * linux-nios2-low.c (the_low_targets): Likewise.
2740 * linux-sparc-low.c (the_low_targets): Likewise.
2741
4a6ed09b
PA
27422015-12-17 Pedro Alves <palves@redhat.com>
2743
2744 * linux-low.c (linux_kill_one_lwp): Remove references to
2745 LinuxThreads.
2746 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2747 to 'kill'.
2748 (linux_init_signals): Delete.
2749 (initialize_low): Adjust.
2750 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2751
7544db95
PA
27522015-12-16 Pedro Alves <palves@redhat.com>
2753
2754 * configure.ac (compiler warning flags): When testing a
2755 -Wno-foo option, check whether -Wfoo works instead.
2756 * configure: Regenerate.
2757
8020350c
DB
27582015-12-11 Don Breazeal <donb@codesourcery.com>
2759
2760 * server.c (process_serial_event): Don't exit from gdbserver
2761 in remote mode if there are still active inferiors.
2762
db91f502
YQ
27632015-12-11 Yao Qi <yao.qi@linaro.org>
2764
2765 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2766 arm_breakpoint_at if the process is 32-bit.
2767
b37a6290
YQ
27682015-12-11 Yao Qi <yao.qi@linaro.org>
2769
2770 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2771 arm breakpoint.
2772
17b1509a
YQ
27732015-12-07 Yao Qi <yao.qi@linaro.org>
2774
2775 * configure.srv: Append arm.o to srv_tgtobj for
2776 aarch64*-*-linux* target.
2777 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2778 from linux-arm-low.c.
2779 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2780 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2781 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2782 (thumb2_breakpoint_len): Likewise.
2783 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2784 (arm_breakpoint_kinds): Likewise.
2785 (arm_breakpoint_kind_from_pc): Likewise.
2786 (arm_sw_breakpoint_from_kind): Likewise.
2787 (arm_breakpoint_kind_from_current_state): Likewise.
2788 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2789 (arm_sw_breakpoint_from_kind): Declare.
2790 (arm_breakpoint_kind_from_current_state): Declare.
2791 (arm_breakpoint_at): Declare.
2792 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2793 arm_sw_breakpoint_from_kind if process is 32-bit.
2794 (aarch64_breakpoint_kind_from_pc): New function.
2795 (aarch64_breakpoint_kind_from_current_state): New function.
2796 (the_low_target): Initialize fields breakpoint_kind_from_pc
2797 and breakpoint_kind_from_current_state.
2798 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2799 linux-aarch32-low.c.
2800 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2801 (arm_breakpoint, arm_breakpoint_len): Likewise.
2802 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2803 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2804 (arm_is_thumb_mode): Likewise.
2805 (arm_breakpoint_at): Likewise.
2806 (arm_breakpoint_kind_from_pc): Likewise.
2807 (arm_sw_breakpoint_from_kind): Likewise.
2808 (arm_breakpoint_kind_from_current_state): Likewise.
2809
2810 Revert:
2811 2015-08-04 Yao Qi <yao.qi@linaro.org>
2812
2813 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2814 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2815 * server.c (extended_protocol): Remove "static".
2816 * server.h (extended_protocol): Declare it.
2817
ece66d65
JS
28182015-12-04 Josh Stone <jistone@redhat.com>
2819
2820 * target.h (struct target_ops) <arch_setup>: Rename to ...
2821 (struct target_ops) <post_create_inferior>: ... this.
2822 (target_arch_setup): Rename to ...
2823 (target_post_create_inferior): ... this, calling post_create_inferior.
2824 * server.c (start_inferior): Update target_arch_setup calls to
2825 target_post_create_inferior.
2826 * linux-low.c (linux_low_ptrace_options): Forward declare.
2827 (linux_arch_setup): Update its comment for general use.
2828 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2829 (struct linux_target_ops): Use linux_post_create_inferior.
2830 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2831 to post_create_inferior.
2832 * nto-low.c (struct nto_target_ops): Likewise.
2833 * spu-low.c (struct spu_target_ops): Likewise.
2834 * win32-low.c (struct win32_target_ops): Likewise.
2835
e58c48b4
AT
28362015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2837
2838 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2839
fbec8956
AT
28402015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2841
2842 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2843 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2844 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2845 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2846 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2847 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2848 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2849 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2850 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2851 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2852 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2853 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2854
9b4c5f87
AT
28552015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2856
2857 * linux-low.c (linux_look_up_symbols): Don't call
2858 linux_supports_traceclone.
2859 * linux-low.h (thread_db_init): Remove use_events argument.
2860 * thread-db.c (thread_db_use_event): Remove global variable.
2861 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2862 (struct thread_db) <td_create_bp>: Remove field.
2863 (thread_db_create_event): Remove function.
2864 (thread_db_enable_reporting): Likewise.
2865 (find_one_thread): Don't check for thread_db_use_events.
2866 (attach_thread): Likewise.
2867 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2868 (try_thread_db_load_1): Don't check for thread_db_use_events.
2869 (thread_db_init): Remove use_events argument and thread events
2870 handling.
2871 (remove_thread_event_breakpoints): Remove function.
2872 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2873
7d00775e
AT
28742015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2875
2876 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2877 New function.
2878 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2879 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2880 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2881 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2882 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2883 Initialize.
2884 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2885 New function.
2886 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2887 * linux-low.c (can_hardware_single_step): Use
2888 supports_hardware_single_step.
2889 (can_software_single_step): New function.
2890 (start_step_over): Call can_software_single_step.
2891 (linux_supports_hardware_single_step): New function.
2892 (struct target_ops) <supports_software_single_step>: Initialize.
2893 * linux-low.h (struct linux_target_ops)
2894 <supports_hardware_single_step>: Initialize.
2895 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2896 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2897 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2898 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2899 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2900 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2901 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2902 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2903 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2904 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2905 Initialize.
2906 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2907 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2908 Initialize.
2909 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2910 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2911 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2912 New function.
2913 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2914 * target.h (struct target_ops): <supports_software_single_step>:
2915 New field.
2916 (target_supports_software_single_step): New macro.
2917
2d97cd35
AT
29182015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2919
2920 * linux-low.c (linux_wait_1): Fix pc advance condition.
2921 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2922 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2923
769ef81f
AT
29242015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2925
2926 * linux-arm-low.c (arm_is_thumb_mode): New function.
2927 (arm_breakpoint_at): Use arm_is_thumb_mode.
2928 (arm_breakpoint_kind_from_current_state): New function.
2929 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2930 Initialize.
2931 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2932 (linux_breakpoint_kind_from_current_state): New function.
2933 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2934 * linux-low.h (struct linux_target_ops)
2935 <breakpoint_kind_from_current_state>: New field.
2936 * target.h (struct target_ops): Likewise.
2937 (target_breakpoint_kind_from_current_state): New macro.
2938
1bebeeca
PA
29392015-11-30 Pedro Alves <palves@redhat.com>
2940
2941 * linux-low.c (linux_resume): Wake up the event loop before
2942 returning.
2943
a67a9fae
PA
29442015-11-30 Pedro Alves <palves@redhat.com>
2945
2946 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2947 check.
2948 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2949 to -1.
2950 * target.c (struct thread_search): New structure.
2951 (thread_search_callback): New function.
2952 (prev_general_thread): New global.
2953 (prepare_to_access_memory, done_accessing_memory): New functions.
2954 * target.h (prepare_to_access_memory, done_accessing_memory):
2955 Replace macros with function declarations.
2956
f2faf941
PA
29572015-11-30 Pedro Alves <palves@redhat.com>
2958
2959 PR 14618
2960 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2961 report TARGET_WAITKIND_NO_RESUMED.
2962 * remote-utils.c (prepare_resume_reply): Handle
2963 TARGET_WAITKIND_NO_RESUMED.
2964 * server.c (report_no_resumed): New global.
2965 (handle_query) <qSupported>: Handle "no-resumed+". Report
2966 "no-resumed+" support.
2967 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2968 return error if the client doesn't support no-resumed events.
2969 (push_stop_notification): New function.
2970 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2971 events if the client supports them.
2972
a681f9c9
PA
29732015-11-30 Pedro Alves <palves@redhat.com>
2974
2975 * linux-low.c (thread_still_has_status_pending_p): Don't check
2976 vCont;t here.
2977 (lwp_resumed): New function.
2978 (status_pending_p_callback): Return early if the LWP is not
2979 supposed to be resumed.
2980
65706a29
PA
29812015-11-30 Pedro Alves <palves@redhat.com>
2982
2983 * linux-low.c (handle_extended_wait): Assert that the LWP's
2984 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2985 thread create events, leave the new child's status pending.
2986 (linux_low_filter_event): If GDB wants to hear about thread exit
2987 events, leave the LWP marked dead and don't delete it.
2988 (linux_wait_for_event_filtered): Don't check for thread exit.
2989 (filter_exit_event): New function.
2990 (linux_wait_1): Use it, when returning an exit event.
2991 (linux_resume_one_lwp_throw): Assert that the LWP's
2992 waitstatus is TARGET_WAITKIND_IGNORE.
2993 * remote-utils.c (prepare_resume_reply): Handle
2994 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2995 * server.c (report_thread_events): New global.
2996 (handle_general_set): Handle QThreadEvents.
2997 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2998 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2999 TARGET_WAITKIND_THREAD_EXITED.
3000 * server.h (report_thread_events): Declare.
3001
56cf4bed
PA
30022015-11-30 Pedro Alves <palves@redhat.com>
3003
3004 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3005 the thread's last_resume_kind was resume_stop.
3006
500c1d85
PA
30072015-11-30 Pedro Alves <palves@redhat.com>
3008
3009 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3010 before returning.
3011
de979965
PA
30122015-11-30 Pedro Alves <palves@redhat.com>
3013
3014 * server.c (handle_v_requests): Handle vCtrlC.
3015
34c65914
PA
30162015-11-30 Pedro Alves <palves@redhat.com>
3017
3018 * gdbthread.h (find_any_thread_of_pid): Declare.
3019 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3020 functions.
3021 * server.c (handle_query): If current_thread is NULL, look for
3022 another thread of the selected process.
3023
79efa585 30242015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3025 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3026
3027 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3028 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3029 name in reply.
3030 * target.h (struct target_ops) <thread_name>: New field.
3031 (target_thread_name): New macro.
3032
80d82c19
JB
30332015-11-23 Joel Brobecker <brobecker@adacore.com>
3034
3035 * regcache.h (regcache_invalidate_pid): Add declaration.
3036 * regcache.c (regcache_invalidate_pid): New function, extracted
3037 from regcache_invalidate.
3038 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3039 Add trivial documentation comment.
3040 * lynx-low.c: Use regcache_invalidate_pid instead of
3041 regcache_invalidate.
3042
64da5dd5
JB
30432015-11-23 Joel Brobecker <brobecker@adacore.com>
3044
3045 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3046 and Elf64_auxv_t if the target is Android.
3047
37ce4055
DE
30482015-11-22 Doug Evans <xdje42@gmail.com>
3049
3050 * target.h: #include <sys/types.h>.
3051
06e03fff
PA
30522015-11-19 Pedro Alves <palves@redhat.com>
3053
3054 * linux-low.c (linux_process_qsupported): Change prototype.
3055 Adjust.
3056 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3057 Change prototype.
3058 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3059 and adjust to loop over all features.
3060 * server.c (handle_query) <qSupported>: Adjust to call
3061 target_process_qsupported once, passing it a vector of unprocessed
3062 features.
3063 * target.h (struct target_ops) <process_qsupported>: Change
3064 prototype.
3065 (target_process_qsupported): Adjust.
3066
9a084706
PA
30672015-11-19 Pedro Alves <palves@redhat.com>
3068
3069 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3070 mode.
3071 * configure: Regenerate.
3072
dad44a1f
PA
30732015-11-19 Pedro Alves <palves@redhat.com>
3074
3075 * configure: Regenerate.
3076
231c0592
YQ
30772015-11-19 Yao Qi <yao.qi@linaro.org>
3078
3079 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3080 type to uint32_t.
3081
6c1c9a8b
YQ
30822015-11-19 Yao Qi <yao.qi@linaro.org>
3083
3084 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3085 (struct aarch64_operand): Move enum out.
3086
9caa3311
YQ
30872015-11-19 Yao Qi <yao.qi@linaro.org>
3088
3089 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3090 struct user_fpsimd_state *.
3091 (aarch64_store_fpregset): Likewise.
3092
6a69a054
YQ
30932015-11-19 Yao Qi <yao.qi@linaro.org>
3094
3095 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3096 struct user_pt_regs *.
3097 (aarch64_store_gregset): Likewise.
3098
1798301e
PA
30992015-11-18 Pedro Alves <palves@redhat.com>
3100
3101 * Makefile.in (all_object_files): Add $IPA_OBJS.
3102
ce7715e2
PA
31032015-11-17 Pedro Alves <palves@redhat.com>
3104
3105 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3106 GDB_SIGNAL_0 and gdb_signal_to_string.
3107
c0879059
PA
31082015-11-17 Pedro Alves <palves@redhat.com>
3109
3110 * win32-low.c (handle_output_debug_string): Remove parameter.
3111 (win32_kill): Remove our_status local and adjust call to
3112 handle_output_debug_string.
3113 (get_child_debug_event): Adjust call to
3114 handle_output_debug_string.
3115
1996e237
SM
31162015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3117
3118 * linux-mips-low.c (mips_fill_gregset): Add cast.
3119 (mips_store_gregset): Likewise.
3120 (mips_fill_fpregset): Likewise.
3121 (mips_store_fpregset): Likewise.
3122
cbec665b
SM
31232015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3124
3125 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3126 priv.
3127
eb3e3c67
SM
31282015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3129
3130 * linux-mips-low.c (mips_linux_new_thread): Change type of
3131 watch_type to enum target_hw_bp_type.
3132
171de4b8
SM
31332015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3134
3135 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3136 Change return type to arm_hwbp_type.
3137
04248ead
SM
31382015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3139
3140 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3141 (arm_store_gregset): Likewise.
3142 * linux-arm-low.c (arm_get_hwcap): Likewise.
3143 (arm_read_description): Likewise.
3144
04b3479c
SM
31452015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3146
3147 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3148
2bc84e8a
SM
31492015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3150
3151 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3152 (ppc_fill_vsxregset): Likewise.
3153 (ppc_store_vsxregset): Likewise.
3154 (ppc_fill_vrregset): Likewise.
3155 (ppc_store_vrregset): Likewise.
3156 (ppc_fill_evrregset): Likewise.
3157 (ppc_store_evrregset): Likewise.
3158
e6c5bb05
SM
31592015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3160
3161 * linux-ppc-low.c (ppc_usrregs_info): Remove
3162 forward-declaration.
3163 (ppc_arch_setup): Move lower in file.
3164
7ea45d72
SM
31652015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3166
3167 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3168 (ps_pdwrite): Likewise.
3169
69291610
HW
31702015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3171
3172 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3173 to after assert checks.
3174
b42945fd
SM
31752015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3176
3177 * proc-service.c (ps_pdread): Add/adjust casts.
3178 (ps_pdwrite): Add/adjust casts.
3179
d6f85c84
SM
31802015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3181
3182 * server.c (handle_search_memory_1): Cast return value of
3183 memmem.
3184
f98cd059
SM
31852015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3186
3187 * server.c (write_qxfer_response): Change type of data to
3188 gdb_byte *.
3189
d2412fa5
PA
31902015-10-29 Pedro Alves <palves@redhat.com>
3191
3192 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3193
c17414a2
PA
31942015-10-29 Pedro Alves <palves@redhat.com>
3195
3196 * tracepoint.c (clear_installed_tracepoints): Add casts.
3197
e053fbc4
PA
31982015-10-29 Pedro Alves <palves@redhat.com>
3199
3200 * server.c (handle_v_cont, process_serial_event): Add enum
3201 gdb_signal casts to signal parsing code.
3202
add67df8
PA
32032015-10-29 Pedro Alves <palves@redhat.com>
3204
3205 * linux-low.h (NULL_REGSET): Define.
3206 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3207 * linux-arm-low.c (arm_regsets): Likewise.
3208 * linux-crisv32-low.c (cris_regsets): Likewise.
3209 * linux-m68k-low.c (m68k_regsets): Likewise.
3210 * linux-mips-low.c (mips_regsets): Likewise.
3211 * linux-nios2-low.c (nios2_regsets): Likewise.
3212 * linux-ppc-low.c (ppc_regsets): Likewise.
3213 * linux-s390-low.c (s390_regsets): Likewise.
3214 * linux-sh-low.c (sh_regsets): Likewise.
3215 * linux-sparc-low.c (sparc_regsets): Likewise.
3216 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3217 * linux-tile-low.c (tile_regsets): Likewise.
3218 * linux-x86-low.c (x86_regsets): Likewise.
3219 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3220
50bc912a
PA
32212015-10-29 Pedro Alves <palves@redhat.com>
3222
3223 * linux-low.h (NULL_REGSET): Define.
3224 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3225 * linux-arm-low.c (arm_regsets): Likewise.
3226 * linux-crisv32-low.c (cris_regsets): Likewise.
3227 * linux-m68k-low.c (m68k_regsets): Likewise.
3228 * linux-mips-low.c (mips_regsets): Likewise.
3229 * linux-nios2-low.c (nios2_regsets): Likewise.
3230 * linux-ppc-low.c (ppc_regsets): Likewise.
3231 * linux-s390-low.c (s390_regsets): Likewise.
3232 * linux-sh-low.c (sh_regsets): Likewise.
3233 * linux-sparc-low.c (sparc_regsets): Likewise.
3234 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3235 * linux-tile-low.c (tile_regsets): Likewise.
3236 * linux-x86-low.c (x86_regsets): Likewise.
3237 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3238
682b2546
DE
32392015-10-26 Doug Evans <dje@google.com>
3240
3241 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3242
963843d4
DE
32432015-10-26 Doug Evans <dje@google.com>
3244
3245 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3246
d41401ac
DE
32472015-10-26 Doug Evans <dje@google.com>
3248
3249 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3250 for debug_printf.
3251 (attach_thread, find_new_threads_callback): Ditto.
3252
3db28855
AT
32532015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3254
3255 * mem-break.h (set_breakpoint_data): Remove.
3256
fb78e89c
AT
32572015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3258
3259 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3260 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3261 (initialize_low): Remove set_breakpoint_data call.
3262 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3263 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3264 (initialize_low): Remove set_breakpoint_data call.
3265 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3266 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3267 (initialize_low): Remove set_breakpoint_data call.
3268
2e6ee069
AT
32692015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3270
3271 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3272 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3273 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3274 * target.h (target_breakpoint_kind_from_pc): New macro.
3275
1652a986
AT
32762015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3277
3278 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3279 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3280 the default breakpoint kind.
3281
abeead09
AT
32822015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3283
3284 * linux-arm-low.c (arm_supports_z_point_type): Add software
3285 breakpoint support.
3286
b0b4b501
AT
32872015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3288
3289 * linux-arm-low.c: Refactor breakpoint definitions.
3290 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3291 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3292
8689682c
AT
32932015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3294
3295 * Makefile.in: Add arm.c/o.
3296 * configure.srv: Likewise.
3297 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3298 (arm_breakpoint_kind_from_pc): New function.
3299 (arm_sw_breakpoint_from_kind): Return proper kind.
3300 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3301
27165294
AT
33022015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3303
3304 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3305 removal.
3306 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3307 (struct raw_breakpoint) <size>: Remove.
3308 (struct raw_breakpoint) <kind>: Add.
3309 (bp_size): New function.
3310 (bp_opcode): Likewise.
3311 (find_raw_breakpoint_at): Adjust for kind.
3312 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3313 (remove_memory_breakpoint): Adjust for kind call bp_size.
3314 (set_raw_breakpoint_at): Adjust for kind.
3315 (set_breakpoint): Likewise.
3316 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3317 (delete_raw_breakpoint): Adjust for kind.
3318 (delete_breakpoint): Likewise.
3319 (find_gdb_breakpoint): Likewise.
3320 (set_gdb_breakpoint_1): Likewise.
3321 (set_gdb_breakpoint): Likewise.
3322 (delete_gdb_breakpoint_1): Likewise.
3323 (delete_gdb_breakpoint): Likewise.
3324 (uninsert_raw_breakpoint): Likewise.
3325 (reinsert_raw_breakpoint): Likewise.
3326 (set_breakpoint_data): Remove.
3327 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3328 (check_mem_read): Adjust for kind call bp_size.
3329 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3330 (clone_one_breakpoint): Adjust for kind.
3331 * mem-break.h (set_gdb_breakpoint): Likewise.
3332 (delete_gdb_breakpoint): Likewise.
3333 * server.c (process_serial_event): Likewise.
3334
dd373349
AT
33352015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3336
3337 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3338 (struct linux_target_ops) <breakpoint>: Remove.
3339 (struct linux_target_ops) <breakpoint_len>: Remove.
3340 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3341 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3342 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3343 (arm_sw_breakpoint_from_kind): New function.
3344 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3345 (struct linux_target_ops) <breakpoint>: Remove.
3346 (struct linux_target_ops) <breakpoint_len>: Remove.
3347 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3348 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3349 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3350 (struct linux_target_ops) <breakpoint>: Remove.
3351 (struct linux_target_ops) <breakpoint_len>: Remove.
3352 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3353 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3354 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3355 (struct linux_target_ops) <breakpoint>: Remove.
3356 (struct linux_target_ops) <breakpoint_len>: Remove.
3357 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3358 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3359 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3360 and sw_breakpoint_from_kind to increment the pc.
3361 (linux_breakpoint_kind_from_pc): New function.
3362 (linux_sw_breakpoint_from_kind): New function.
3363 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3364 (initialize_low): Call breakpoint_kind_from_pc and
3365 sw_breakpoint_from_kind to replace breakpoint_data/len.
3366 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3367 New field.
3368 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3369 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3370 (struct linux_target_ops) <breakpoint>: Remove.
3371 (struct linux_target_ops) <breakpoint_len>: Remove.
3372 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3373 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3374 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3375 (struct linux_target_ops) <breakpoint>: Remove.
3376 (struct linux_target_ops) <breakpoint_len>: Remove.
3377 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3378 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3379 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3380 (struct linux_target_ops) <breakpoint>: Remove.
3381 (struct linux_target_ops) <breakpoint_len>: Remove.
3382 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3383 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3384 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3385 (struct linux_target_ops) <breakpoint>: Remove.
3386 (struct linux_target_ops) <breakpoint_len>: Remove.
3387 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3388 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3389 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3390 (struct linux_target_ops) <breakpoint>: Remove.
3391 (struct linux_target_ops) <breakpoint_len>: Remove.
3392 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3393 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3394 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3395 (struct linux_target_ops) <breakpoint>: Remove.
3396 (struct linux_target_ops) <breakpoint_len>: Remove.
3397 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3398 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3399 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3400 (struct linux_target_ops) <breakpoint>: Remove.
3401 (struct linux_target_ops) <breakpoint_len>: Remove.
3402 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3403 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3404 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3405 (struct linux_target_ops) <breakpoint>: Remove.
3406 (struct linux_target_ops) <breakpoint_len>: Remove.
3407 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3408 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3409 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3410 (struct linux_target_ops) <breakpoint>: Remove.
3411 (struct linux_target_ops) <breakpoint_len>: Remove.
3412 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3413 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3414 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3415 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3416 (struct linux_target_ops) <breakpoint>: Remove.
3417 (struct linux_target_ops) <breakpoint_len>: Remove.
3418 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3419 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3420 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3421 (struct linux_target_ops) <breakpoint>: Remove.
3422 (struct linux_target_ops) <breakpoint_len>: Remove.
3423 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3424 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3425
4cd98a19
AT
34262015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3427
3428 * linux-cris-low.c (cris_get_pc): Remove void arg.
3429
774ee6d2
AR
34302015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3431
3432 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3433 variable name.
3434
833dcd29
AR
34352015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3436
3437 * inferiors.c (thread_pid_matches_callback): New function.
3438 (find_thread_process): New function.
3439 (remove_thread): Reset current_thread.
3440 (remove_process): Assert threads have been removed first.
3441
8d689ee5
YQ
34422015-10-15 Yao Qi <yao.qi@linaro.org>
3443
3444 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3445 if it is 3.
3446 (aarch64_remove_point): Likewise.
3447 * regcache.c (regcache_register_size): New function.
3448
1c2e1515
YQ
34492015-10-12 Yao Qi <yao.qi@linaro.org>
3450
3451 * linux-aarch64-low.c: Update all callers as emit_load_store
3452 is renamed to aarch64_emit_load_store.
3453
e1c587c3
YQ
34542015-10-12 Yao Qi <yao.qi@linaro.org>
3455
3456 * linux-aarch64-low.c: Update all callers of function renaming
3457 from emit_insn to aarch64_emit_insn.
3458
b6542f81
YQ
34592015-10-12 Yao Qi <yao.qi@linaro.org>
3460
3461 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3462 arch/aarch64-insn.h.
3463 (struct aarch64_memory_operand): Likewise.
3464 (ENCODE): Likewise.
3465 (emit_insn): Move to arch/aarch64-insn.c.
3466 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3467 (emit_load_store): Move to arch/aarch64-insn.c.
3468 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3469 (can_encode_int32): Remove.
3470
246994ce
YQ
34712015-10-12 Yao Qi <yao.qi@linaro.org>
3472
3473 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3474 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3475 (aarch64_relocate_instruction): Likewise.
3476 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3477 (struct aarch64_insn_visitor): Likewise.
3478
0badd99f
YQ
34792015-10-12 Yao Qi <yao.qi@linaro.org>
3480
3481 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3482 (struct aarch64_insn_visitor): New.
3483 (struct aarch64_insn_relocation_data): New.
3484 (aarch64_ftrace_insn_reloc_b): New function.
3485 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3486 (aarch64_ftrace_insn_reloc_cb): Likewise.
3487 (aarch64_ftrace_insn_reloc_tb): Likewise.
3488 (aarch64_ftrace_insn_reloc_adr): Likewise.
3489 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3490 (aarch64_ftrace_insn_reloc_others): Likewise.
3491 (visitor): New.
3492 (aarch64_relocate_instruction): Use visitor.
3493
dfaffe9d
YQ
34942015-10-12 Yao Qi <yao.qi@linaro.org>
3495
3496 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3497 int. Add argument buf.
3498 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3499 aarch64_relocate_instruction.
3500
70b439f0
YQ
35012015-10-12 Yao Qi <yao.qi@linaro.org>
3502
3503 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3504 argument insn. Remove local variable insn. Don't call
3505 target_read_uint32.
3506 (aarch64_install_fast_tracepoint_jump_pad): Call
3507 target_read_uint32.
3508
7781c06f
YQ
35092015-09-30 Yao Qi <yao.qi@linaro.org>
3510
3511 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3512 (emit_load_store_pair): Likewise.
3513
9a3c8263
SM
35142015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3515
3516 * dll.c (match_dll): Add cast(s).
3517 (unloaded_dll): Likewise.
3518 * linux-low.c (second_thread_of_pid_p): Likewise.
3519 (delete_lwp_callback): Likewise.
3520 (count_events_callback): Likewise.
3521 (select_event_lwp_callback): Likewise.
3522 (linux_set_resume_request): Likewise.
3523 * server.c (accumulate_file_name_length): Likewise.
3524 (emit_dll_description): Likewise.
3525 (handle_qxfer_threads_worker): Likewise.
3526 (visit_actioned_threads): Likewise.
3527 * thread-db.c (any_thread_of): Likewise.
3528 * tracepoint.c (same_process_p): Likewise.
3529 (match_blocktype): Likewise.
3530 (build_traceframe_info_xml): Likewise.
3531
224c3ddb
SM
35322015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3533
3534 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3535 assignment.
3536 (gdb_unparse_agent_expr): Likewise.
3537 * hostio.c (require_data): Likewise.
3538 (handle_pread): Likewise.
3539 * linux-low.c (disable_regset): Likewise.
3540 (fetch_register): Likewise.
3541 (store_register): Likewise.
3542 (get_dynamic): Likewise.
3543 (linux_qxfer_libraries_svr4): Likewise.
3544 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3545 (set_fast_tracepoint_jump): Likewise.
3546 (uninsert_fast_tracepoint_jumps_at): Likewise.
3547 (reinsert_fast_tracepoint_jumps_at): Likewise.
3548 (validate_inserted_breakpoint): Likewise.
3549 (clone_agent_expr): Likewise.
3550 * regcache.c (init_register_cache): Likewise.
3551 * remote-utils.c (putpkt_binary_1): Likewise.
3552 (decode_M_packet): Likewise.
3553 (decode_X_packet): Likewise.
3554 (look_up_one_symbol): Likewise.
3555 (relocate_instruction): Likewise.
3556 (monitor_output): Likewise.
3557 * server.c (handle_search_memory): Likewise.
3558 (handle_qxfer_exec_file): Likewise.
3559 (handle_qxfer_libraries): Likewise.
3560 (handle_qxfer): Likewise.
3561 (handle_query): Likewise.
3562 (handle_v_cont): Likewise.
3563 (handle_v_run): Likewise.
3564 (captured_main): Likewise.
3565 * target.c (write_inferior_memory): Likewise.
3566 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3567 * tracepoint.c (init_trace_buffer): Likewise.
3568 (add_tracepoint_action): Likewise.
3569 (add_traceframe): Likewise.
3570 (add_traceframe_block): Likewise.
3571 (cmd_qtdpsrc): Likewise.
3572 (cmd_qtdv): Likewise.
3573 (cmd_qtstatus): Likewise.
3574 (response_source): Likewise.
3575 (response_tsv): Likewise.
3576 (cmd_qtnotes): Likewise.
3577 (gdb_collect): Likewise.
3578 (initialize_tracepoint): Likewise.
3579
afbe19f8
PL
35802015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3581
3582 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3583 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3584 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3585 <NOP>: New.
3586 (enum aarch64_condition_codes): New enum.
3587 (w0): New static global.
3588 (fp): Likewise.
3589 (lr): Likewise.
3590 (struct aarch64_memory_operand) <type>: New
3591 MEMORY_OPERAND_POSTINDEX type.
3592 (postindex_memory_operand): New helper function.
3593 (emit_ret): New function.
3594 (emit_load_store_pair): New function, factored out of emit_stp
3595 with support for MEMORY_OPERAND_POSTINDEX.
3596 (emit_stp): Rewrite using emit_load_store_pair.
3597 (emit_ldp): New function.
3598 (emit_load_store): Likewise.
3599 (emit_ldr): Mention post-index instruction in comment.
3600 (emit_ldrh): New function.
3601 (emit_ldrb): New function.
3602 (emit_ldrsw): Mention post-index instruction in comment.
3603 (emit_str): Likewise.
3604 (emit_subs): New function.
3605 (emit_cmp): Likewise.
3606 (emit_and): Likewise.
3607 (emit_orr): Likewise.
3608 (emit_orn): Likewise.
3609 (emit_eor): Likewise.
3610 (emit_mvn): Likewise.
3611 (emit_lslv): Likewise.
3612 (emit_lsrv): Likewise.
3613 (emit_asrv): Likewise.
3614 (emit_mul): Likewise.
3615 (emit_sbfm): Likewise.
3616 (emit_sbfx): Likewise.
3617 (emit_ubfm): Likewise.
3618 (emit_ubfx): Likewise.
3619 (emit_csinc): Likewise.
3620 (emit_cset): Likewise.
3621 (emit_nop): Likewise.
3622 (emit_ops_insns): New helper function.
3623 (emit_pop): Likewise.
3624 (emit_push): Likewise.
3625 (aarch64_emit_prologue): New function.
3626 (aarch64_emit_epilogue): Likewise.
3627 (aarch64_emit_add): Likewise.
3628 (aarch64_emit_sub): Likewise.
3629 (aarch64_emit_mul): Likewise.
3630 (aarch64_emit_lsh): Likewise.
3631 (aarch64_emit_rsh_signed): Likewise.
3632 (aarch64_emit_rsh_unsigned): Likewise.
3633 (aarch64_emit_ext): Likewise.
3634 (aarch64_emit_log_not): Likewise.
3635 (aarch64_emit_bit_and): Likewise.
3636 (aarch64_emit_bit_or): Likewise.
3637 (aarch64_emit_bit_xor): Likewise.
3638 (aarch64_emit_bit_not): Likewise.
3639 (aarch64_emit_equal): Likewise.
3640 (aarch64_emit_less_signed): Likewise.
3641 (aarch64_emit_less_unsigned): Likewise.
3642 (aarch64_emit_ref): Likewise.
3643 (aarch64_emit_if_goto): Likewise.
3644 (aarch64_emit_goto): Likewise.
3645 (aarch64_write_goto_address): Likewise.
3646 (aarch64_emit_const): Likewise.
3647 (aarch64_emit_call): Likewise.
3648 (aarch64_emit_reg): Likewise.
3649 (aarch64_emit_pop): Likewise.
3650 (aarch64_emit_stack_flush): Likewise.
3651 (aarch64_emit_zero_ext): Likewise.
3652 (aarch64_emit_swap): Likewise.
3653 (aarch64_emit_stack_adjust): Likewise.
3654 (aarch64_emit_int_call_1): Likewise.
3655 (aarch64_emit_void_call_2): Likewise.
3656 (aarch64_emit_eq_goto): Likewise.
3657 (aarch64_emit_ne_goto): Likewise.
3658 (aarch64_emit_lt_goto): Likewise.
3659 (aarch64_emit_le_goto): Likewise.
3660 (aarch64_emit_gt_goto): Likewise.
3661 (aarch64_emit_ge_got): Likewise.
3662 (aarch64_emit_ops_impl): New static global variable.
3663 (aarch64_emit_ops): New target function, return
3664 &aarch64_emit_ops_impl.
3665 (struct linux_target_ops): Install it.
3666
bb903df0
PL
36672015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3668
3669 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3670 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3671 aarch64-ipa.o.
3672 * linux-aarch64-ipa.c: New file.
3673 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3674 and endian.h.
3675 (aarch64_get_thread_area): New target method.
3676 (extract_signed_bitfield): New helper function.
3677 (aarch64_decode_ldr_literal): New function.
3678 (enum aarch64_opcodes): New enum.
3679 (struct aarch64_register): New struct.
3680 (struct aarch64_operand): New struct.
3681 (x0): New static global.
3682 (x1): Likewise.
3683 (x2): Likewise.
3684 (x3): Likewise.
3685 (x4): Likewise.
3686 (w2): Likewise.
3687 (ip0): Likewise.
3688 (sp): Likewise.
3689 (xzr): Likewise.
3690 (aarch64_register): New helper function.
3691 (register_operand): Likewise.
3692 (immediate_operand): Likewise.
3693 (struct aarch64_memory_operand): New struct.
3694 (offset_memory_operand): New helper function.
3695 (preindex_memory_operand): Likewise.
3696 (enum aarch64_system_control_registers): New enum.
3697 (ENCODE): New macro.
3698 (emit_insn): New helper function.
3699 (emit_b): New function.
3700 (emit_bcond): Likewise.
3701 (emit_cb): Likewise.
3702 (emit_tb): Likewise.
3703 (emit_blr): Likewise.
3704 (emit_stp): Likewise.
3705 (emit_ldp_q_offset): Likewise.
3706 (emit_stp_q_offset): Likewise.
3707 (emit_load_store): Likewise.
3708 (emit_ldr): Likewise.
3709 (emit_ldrsw): Likewise.
3710 (emit_str): Likewise.
3711 (emit_ldaxr): Likewise.
3712 (emit_stxr): Likewise.
3713 (emit_stlr): Likewise.
3714 (emit_data_processing_reg): Likewise.
3715 (emit_data_processing): Likewise.
3716 (emit_add): Likewise.
3717 (emit_sub): Likewise.
3718 (emit_mov): Likewise.
3719 (emit_movk): Likewise.
3720 (emit_mov_addr): Likewise.
3721 (emit_mrs): Likewise.
3722 (emit_msr): Likewise.
3723 (emit_sevl): Likewise.
3724 (emit_wfe): Likewise.
3725 (append_insns): Likewise.
3726 (can_encode_int32_in): New helper function.
3727 (aarch64_relocate_instruction): New function.
3728 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3729 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3730 (struct linux_target_ops): Install aarch64_get_thread_area,
3731 aarch64_install_fast_tracepoint_jump_pad and
3732 aarch64_get_min_fast_tracepoint_insn_len.
3733
787749ea
PL
37342015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3735
3736 * Makefile.in (aarch64-insn.o): New rule.
3737 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3738
9812b2e6
YQ
37392015-09-21 Yao Qi <yao.qi@linaro.org>
3740
3741 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3742
18fe412b
YQ
37432015-09-21 Yao Qi <yao.qi@linaro.org>
3744
3745 * tracepoint.c (max_jump_pad_size): Remove.
3746
a0cc84cd
YQ
37472015-09-18 Yao Qi <yao.qi@linaro.org>
3748
3749 * linux-aarch64-low.c: Don't include sys/uio.h.
3750 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3751
d78908cf
WW
37522015-09-16 Wei-cheng Wang <cole945@gmail.com>
3753
3754 * tracepoint.c (eval_result_type): Change prototype.
3755 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3756
d57e0d50
PA
37572015-09-15 Pedro Alves <palves@redhat.com>
3758
3759 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3760 Check whether to report exec events instead of checking whether
3761 multiprocess is enabled.
3762
5a676acc
PA
37632015-09-15 Pedro Alves <palves@redhat.com>
3764
3765 PR remote/18965
3766 * remote-utils.c (prepare_resume_reply): Merge
3767 TARGET_WAITKIND_VFORK_DONE switch case with the
3768 TARGET_WAITKIND_FORKED case.
3769
7c5d0fad
YQ
37702015-09-15 Yao Qi <yao.qi@linaro.org>
3771
3772 * server.c (handle_query): Check string comparison using
3773 "else if" instead of "if".
3774
750ce8d1
YQ
37752015-09-15 Yao Qi <yao.qi@linaro.org>
3776
3777 * server.c (vCont_supported): New global variable.
3778 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3779 matches. Append ";vContSupported+" to own_buf.
3780 (handle_v_requests): Append ";s;S" to own_buf if target supports
3781 hardware single step or vCont_supported is false.
3782 (capture_main): Set vCont_supported to zero.
3783
70b90b91
YQ
37842015-09-15 Yao Qi <yao.qi@linaro.org>
3785
3786 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3787 it to ...
3788 (linux_supports_hardware_single_step): ... New function.
3789 (linux_target_ops): Update.
3790 * lynx-low.c (lynx_target_ops): Set field
3791 supports_hardware_single_step to target_can_do_hardware_single_step.
3792 * nto-low.c (nto_target_ops): Likewise.
3793 * spu-low.c (spu_target_ops): Likewise.
3794 * win32-low.c (win32_target_ops): Likewise.
3795 * target.c (target_can_do_hardware_single_step): New function.
3796 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3797 Remove. <supports_hardware_single_step>: New field.
3798 (target_supports_conditional_breakpoints): Remove.
3799 (target_supports_hardware_single_step): New macro.
3800 (target_can_do_hardware_single_step): Declare.
3801 * server.c (handle_query): Use target_supports_hardware_single_step
3802 instead of target_supports_conditional_breakpoints.
3803
ade90bde
YQ
38042015-09-15 Yao Qi <yao.qi@linaro.org>
3805
3806 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3807 function.
3808 (struct linux_target_ops the_low_target): Install
3809 aarch64_linux_siginfo_fixup.
3810
94585166
DB
38112015-09-11 Don Breazeal <donb@codesourcery.com>
3812 Luis Machado <lgustavo@codesourcery.com>
3813
3814 * linux-low.c (linux_mourn): Static declaration.
3815 (linux_arch_setup): Move in front of
3816 handle_extended_wait.
3817 (linux_arch_setup_thread): New function.
3818 (handle_extended_wait): Handle exec events. Call
3819 linux_arch_setup_thread. Make event_lwp argument a
3820 pointer-to-a-pointer.
3821 (check_zombie_leaders): Do not check stopped threads.
3822 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3823 (linux_low_filter_event): Add lwp and thread for exec'ing
3824 non-leader thread if leader thread has been deleted.
3825 Refactor code into linux_arch_setup_thread and call it.
3826 Pass child lwp pointer by reference to handle_extended_wait.
3827 (linux_wait_for_event_filtered): Update comment.
3828 (linux_wait_1): Prevent clobbering exec event status.
3829 (linux_supports_exec_events): New function.
3830 (linux_target_ops) <supports_exec_events>: Initialize new member.
3831 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3832 new member.
3833 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3834 * server.c (report_exec_events): New global variable.
3835 (handle_query): Handle qSupported query for exec-events feature.
3836 (captured_main): Initialize report_exec_events.
3837 * server.h (report_exec_events): Declare new global variable.
3838 * target.h (struct target_ops) <supports_exec_events>: New
3839 member.
3840 (target_supports_exec_events): New macro.
3841 * win32-low.c (win32_target_ops) <supports_exec_events>:
3842 Initialize new member.
3843
0568462b
MM
38442015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3845
3846 * linux-low.c (linux_low_enable_btrace): Remove.
3847 (linux_target_ops): Replace linux_low_enable_btrace with
3848 linux_enable_btrace.
3849
39edd165
YQ
38502015-09-03 Yao Qi <yao.qi@linaro.org>
3851
3852 * linux-aarch64-low.c (aarch64_insert_point): Call
3853 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3854 returns true.
3855
1db33b5a
UW
38562015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3857
3858 * linux-low.c (check_stopped_by_breakpoint): Use
3859 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3860
ab290430
PA
38612015-08-27 Pedro Alves <palves@redhat.com>
3862
3863 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3864
8d749320
SM
38652015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3866
6711b7f8
SM
3867 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3868 the XNEW-family equivalent.
8d749320
SM
3869 (compile_bytecodes): Likewise.
3870 * dll.c (loaded_dll): Likewise.
3871 * event-loop.c (append_callback_event): Likewise.
3872 (create_file_handler): Likewise.
3873 (create_file_event): Likewise.
3874 * hostio.c (handle_open): Likewise.
3875 * inferiors.c (add_thread): Likewise.
3876 (add_process): Likewise.
3877 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3878 * linux-arm-low.c (arm_new_process): Likewise.
3879 (arm_new_thread): Likewise.
3880 * linux-low.c (add_to_pid_list): Likewise.
3881 (linux_add_process): Likewise.
3882 (handle_extended_wait): Likewise.
3883 (add_lwp): Likewise.
3884 (enqueue_one_deferred_signal): Likewise.
3885 (enqueue_pending_signal): Likewise.
3886 (linux_resume_one_lwp_throw): Likewise.
3887 (linux_resume_one_thread): Likewise.
3888 (linux_read_memory): Likewise.
3889 (linux_write_memory): Likewise.
3890 * linux-mips-low.c (mips_linux_new_process): Likewise.
3891 (mips_linux_new_thread): Likewise.
3892 (mips_add_watchpoint): Likewise.
3893 * linux-x86-low.c (initialize_low_arch): Likewise.
3894 * lynx-low.c (lynx_add_process): Likewise.
3895 * mem-break.c (set_raw_breakpoint_at): Likewise.
3896 (set_breakpoint): Likewise.
3897 (add_condition_to_breakpoint): Likewise.
3898 (add_commands_to_breakpoint): Likewise.
3899 (clone_agent_expr): Likewise.
3900 (clone_one_breakpoint): Likewise.
3901 * regcache.c (new_register_cache): Likewise.
3902 * remote-utils.c (look_up_one_symbol): Likewise.
3903 * server.c (queue_stop_reply): Likewise.
3904 (start_inferior): Likewise.
3905 (queue_stop_reply_callback): Likewise.
3906 (handle_target_event): Likewise.
3907 * spu-low.c (fetch_ppc_memory): Likewise.
3908 (store_ppc_memory): Likewise.
3909 * target.c (set_target_ops): Likewise.
3910 * thread-db.c (thread_db_load_search): Likewise.
3911 (try_thread_db_load_1): Likewise.
3912 * tracepoint.c (add_tracepoint): Likewise.
3913 (add_tracepoint_action): Likewise.
3914 (create_trace_state_variable): Likewise.
3915 (cmd_qtdpsrc): Likewise.
3916 (cmd_qtro): Likewise.
3917 (add_while_stepping_state): Likewise.
3918 * win32-low.c (child_add_thread): Likewise.
3919 (get_image_name): Likewise.
3920
ed8b7b42
YQ
39212015-08-25 Yao Qi <yao.qi@linaro.org>
3922
3923 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3924
db3cb7cb
YQ
39252015-08-25 Yao Qi <yao.qi@linaro.org>
3926
3927 * Makefile.in (aarch64-linux.o): New rule.
3928 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3929 srv_tgtobj.
3930 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3931 (aarch64_init_debug_reg_state): Make it extern.
3932 (aarch64_linux_prepare_to_resume): Remove.
3933
f6011a1c
YQ
39342015-08-25 Yao Qi <yao.qi@linaro.org>
3935
3936 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3937 lwp_arch_private_info and ptid_of_lwp.
3938
88e2cf7e
YQ
39392015-08-25 Yao Qi <yao.qi@linaro.org>
3940
3941 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3942 Find proc_info by find_process_pid. All callers updated.
3943
5e35436e
YQ
39442015-08-25 Yao Qi <yao.qi@linaro.org>
3945
3946 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3947 Remove.
3948 (debug_reg_change_callback): Remove.
3949 (aarch64_notify_debug_reg_change): Remove.
3950
4a8a7965
YQ
39512015-08-25 Yao Qi <yao.qi@linaro.org>
3952
3953 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3954 Call current_lwp_ptid.
3955
32a271ee
YQ
39562015-08-25 Yao Qi <yao.qi@linaro.org>
3957
3958 * linux-aarch64-low.c (debug_reg_change_callback): Use
3959 debug_printf.
3960
0d51c8d7
YQ
39612015-08-25 Yao Qi <yao.qi@linaro.org>
3962
3963 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3964
31a43dd5
YQ
39652015-08-25 Yao Qi <yao.qi@linaro.org>
3966
3967 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3968
8ee52567
YQ
39692015-08-25 Yao Qi <yao.qi@linaro.org>
3970
3971 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3972 the code.
3973
ff3f0f45
YQ
39742015-08-25 Yao Qi <yao.qi@linaro.org>
3975
3976 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3977 Remove.
3978 (debug_reg_change_callback): Remove argument entry and add argument
3979 lwp. Remove local variable thread. Don't print thread id in the
3980 debugging output. Don't check whether pid of thread equals to pid.
3981 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3982 iterate_over_lwps instead find_inferior.
3983
3d40fbb5
PA
39842015-08-24 Pedro Alves <palves@redhat.com>
3985
3986 * inferiors.c (get_first_process): New function.
3987 * inferiors.h (get_first_process): New declaration.
3988 * remote-utils.c (read_ptid): Default to the first process in the
3989 list, instead of to the current thread's process.
3990
438e1e42
PA
39912015-08-24 Pedro Alves <palves@redhat.com>
3992
3993 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3994 * event-loop.c: Likewise.
3995 * remote-utils.c: Likewise.
3996 * tracepoint.c: Likewise.
3997
a8c6d4fc
PA
39982015-08-24 Pedro Alves <palves@redhat.com>
3999
4000 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4001 ptid_get_lwp.
4002
99b0bb12
PA
40032015-08-21 Pedro Alves <palves@redhat.com>
4004
4005 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4006 instead of literal 1.
4007
f8904751
PA
40082015-08-21 Pedro Alves <palves@redhat.com>
4009
4010 * tdesc.c (default_description): Explicitly zero-initialize.
4011
465a859e
PA
40122015-08-21 Pedro Alves <palves@redhat.com>
4013
4014 PR gdb/18749
4015 * inferiors.c (remove_thread): Discard any pending stop reply for
4016 this thread.
4017 * server.c (remove_all_on_match_pid): Rename to ...
4018 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4019 instead of a pid.
4020 (discard_queued_stop_replies): Change parameter to a ptid. Now
4021 extern.
4022 (handle_v_kill, kill_inferior_callback, captured_main)
4023 (process_serial_event): Adjust.
4024 * server.h (discard_queued_stop_replies): Declare.
4025
f0db101d
PA
40262015-08-21 Pedro Alves <palves@redhat.com>
4027
4028 * linux-low.c (wait_for_sigstop): Always switch to no thread
4029 selected if the previously current thread dies.
4030 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4031 process instead of the current thread's.
4032 * remote-utils.c (input_interrupt): Don't check if there's no
4033 current thread.
4034 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4035 current thread to the general thread fails, error out.
4036 (handle_qxfer_auxv, handle_qxfer_libraries)
4037 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4038 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4039 (handle_query): Check if there's a thread selected instead of
4040 checking whether there's any thread in the thread list.
4041 (handle_qxfer_threads, handle_qxfer_btrace)
4042 (handle_qxfer_btrace_conf): Don't error out early if there's no
4043 thread in the thread list.
4044 (handle_v_cont, myresume): Don't set the current thread to the
4045 continue thread.
4046 (process_serial_event) <Hg handling>: Also set thread_id if the
4047 previous general thread is still alive.
4048 (process_serial_event) <g/G handling>: If setting the current
4049 thread to the general thread fails, error out.
4050 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4051 thread's lwp instead of the current thread's.
4052 * target.c (set_desired_thread): If the desired thread was not
4053 found, leave the current thread pointing to NULL. Return an int
4054 (boolean) indicating success.
4055 * target.h (set_desired_thread): Change return type to int.
4056
40045d91
MF
40572015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4058
4059 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4060 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4061 #includes.
4062 (ps_get_thread_area): New function.
4063
45face3b
GB
40642015-08-19 Gary Benson <gbenson@redhat.com>
4065
4066 * hostio.c (handle_pread): Do not attempt to read more data
4067 than hostio_reply_with_data can fit in a packet.
4068
16d5f642
JB
40692015-08-18 Joel Brobecker <brobecker@adacore.com>
4070
4071 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4072
a738da3a
MF
40732015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4074
4075 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4076
33ebda9d
PA
40772015-08-06 Pedro Alves <palves@redhat.com>
4078
4079 * tracepoint.c (expr_eval_result): Now an int.
4080
a44892be
PA
40812015-08-06 Pedro Alves <palves@redhat.com>
4082
4083 * gdbthread.h (struct regcache): Forward declare.
4084 (struct thread_info) <regcache_data>: Now a struct regcache
4085 pointer.
4086 * inferiors.c (inferior_regcache_data)
4087 (set_inferior_regcache_data): Now work with struct regcache
4088 pointers.
4089 * inferiors.h (struct regcache): Forward declare.
4090 (inferior_regcache_data, set_inferior_regcache_data): Now work
4091 with struct regcache pointers.
4092 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4093 (free_register_cache_thread): Remove struct regcache pointer
4094 casts.
4095
608a1e46
PA
40962015-08-06 Pedro Alves <palves@redhat.com>
4097
4098 * server.c (captured_main): On error, print the exception message
4099 to stderr, and if run_once is set, throw a quit.
4100
f0ce0d3a
PA
41012015-08-06 Pedro Alves <palves@redhat.com>
4102
4103 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4104 the current thread.
4105
bf47e248
PA
41062015-08-06 Pedro Alves <palves@redhat.com>
4107
4108 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4109 reading beyond the passed in buffer length.
4110
b6b9ffcc
PL
41112015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4112
4113 * tracepoint.c (symbol_list) <required>: Remove.
4114
863d01bd
PA
41152015-08-06 Pedro Alves <palves@redhat.com>
4116
4117 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4118 count if stopping and suspending threads.
4119 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4120 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4121 (linux_detach): Complete an ongoing step-over.
4122 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4123 throughout.
4124 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4125 (linux_wait_1): If passing a signal to the inferior after
4126 finishing a step-over, unsuspend and re-resume all lwps. If we
4127 see a single-step event but the thread should be continuing, don't
4128 pass the trap to gdb.
4129 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4130 internal_error instead of gdb_assert.
4131 (enqueue_pending_signal): New function.
4132 (check_ptrace_stopped_lwp_gone): Add debug output.
4133 (start_step_over): Use internal_error instead of gdb_assert.
4134 (complete_ongoing_step_over): New function.
4135 (linux_resume_one_thread): Don't resume a suspended thread.
4136 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4137 it stepping.
4138
00db26fa
PA
41392015-08-06 Pedro Alves <palves@redhat.com>
4140
4141 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4142 (linux_thread_alive): Use lwp_is_marked_dead.
4143 (extended_event_reported): Delete.
4144 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4145 instead of extended_event_reported.
4146 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4147 as well.
4148 (lwp_is_marked_dead): New function.
4149 (lwp_running): Use lwp_is_marked_dead.
4150 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4151 comment.
4152
ad071a30
PA
41532015-08-06 Pedro Alves <palves@redhat.com>
4154
4155 * linux-low.c (linux_wait_1): Move fork event output out of the
4156 !report_to_gdb check. Pass event_child->waitstatus to
4157 target_waitstatus_to_string instead of ourstatus.
4158
524b57e6
YQ
41592015-08-04 Yao Qi <yao.qi@linaro.org>
4160
4161 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4162 if current_thread is 32 bit.
4163
6085d6f6
YQ
41642015-08-04 Yao Qi <yao.qi@linaro.org>
4165
4166 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4167 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4168 * server.c (extended_protocol): Remove "static".
4169 * server.h (extended_protocol): Declare it.
4170
8a7e4587
YQ
41712015-08-04 Yao Qi <yao.qi@linaro.org>
4172
4173 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4174 both aarch64 and aarch32.
4175 (aarch64_set_pc): Likewise.
4176
3b53ae99
YQ
41772015-08-04 Yao Qi <yao.qi@linaro.org>
4178
4179 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4180 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4181 arm-with-neon.xml to srv_xmlfiles.
4182 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4183 (is_64bit_tdesc): New function.
4184 (aarch64_linux_read_description): New function.
4185 (aarch64_arch_setup): Call aarch64_linux_read_description.
4186 (regs_info): Rename to regs_info_aarch64.
4187 (aarch64_regs_info): Return right regs_info.
4188 (initialize_low_arch): Call initialize_low_arch_aarch32.
4189
bd9e6534
YQ
41902015-08-04 Yao Qi <yao.qi@linaro.org>
4191
4192 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4193 * linux-aarch32-low.c: New file.
4194 * linux-aarch32-low.h: New file.
4195 * linux-arm-low.c (arm_fill_gregset): Move it to
4196 linux-aarch32-low.c.
4197 (arm_store_gregset): Likewise.
4198 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4199 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4200 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4201 (regs_info): Rename to regs_info_arm.
4202 (arm_regs_info): Return regs_info_aarch32 if
4203 have_ptrace_getregset is 1 and target description is
4204 arm_with_neon or arm_with_vfpv3.
4205 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4206 Call initialize_low_arch_aarch32 instead.
4207
ded48a5e
YQ
42082015-08-04 Yao Qi <yao.qi@linaro.org>
4209
4210 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4211 * linux-low.c: ... here.
4212 * linux-low.h (have_ptrace_getregset): Declare it.
4213
96e9210f
PA
42142015-08-04 Pedro Alves <palves@redhat.com>
4215
4216 * thread-db.c (struct thread_db): Use new typedefs.
4217 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4218 CHK calls.
4219 (disable_thread_event_reporting): Cast result of dlsym to
4220 destination function pointer type.
4221 (thread_db_mourn): Use td_ta_delete_ftype.
4222
af60a1ef
SL
42232015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4224
4225 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4226 arch variant.
4227 (CDX_BREAKPOINT): Define for R2.
4228 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4229 (the_low_target): Add comments.
4230
e8b41681
YQ
42312015-07-30 Yao Qi <yao.qi@linaro.org>
4232
4233 * linux-arm-low.c (arm_hwcap): Remove it.
4234 (arm_read_description): New local variable arm_hwcap. Don't
4235 set arm_hwcap to zero.
4236
89abb039
YQ
42372015-07-30 Yao Qi <yao.qi@linaro.org>
4238
4239 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4240 Use regcache->tdesc instead.
4241 (arm_store_wmmxregset): Likewise.
4242 (arm_fill_vfpregset): Likewise.
4243 (arm_store_vfpregset): Likewise.
4244
deca266c
YQ
42452015-07-30 Yao Qi <yao.qi@linaro.org>
4246
4247 * linux-arm-low.c: Include arch/arm.h.
4248 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4249 (arm_store_gregset): Likewise.
4250
aa58a496
SM
42512015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4252
4253 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4254 ptrace's 4th parameter.
4255
50904b25
YQ
42562015-07-27 Yao Qi <yao.qi@linaro.org>
4257
4258 * configure.srv (case aarch64*-*-linux*): Don't set
4259 srv_linux_usrregs.
4260
5826e159
PA
42612015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4262
4263 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4264 sys/ptrace.h.
4265 * linux-arm-low.c: Likewise.
4266 * linux-cris-low.c: Likewise.
4267 * linux-crisv32-low.c: Likewise.
4268 * linux-low.c: Likewise.
4269 * linux-m68k-low.c: Likewise.
4270 * linux-mips-low.c: Likewise.
4271 * linux-nios2-low.c: Likewise.
4272 * linux-s390-low.c: Likewise.
4273 * linux-sparc-low.c: Likewise.
4274 * linux-tic6x-low.c: Likewise.
4275 * linux-tile-low.c: Likewise.
4276 * linux-x86-low.c: Likewise.
4277
54019719
PA
42782015-07-24 Pedro Alves <palves@redhat.com>
4279
4280 * config.in: Regenerate.
4281 * configure: Regenerate.
4282
eb7aa561
PA
42832015-07-24 Pedro Alves <palves@redhat.com>
4284
4285 * acinclude.m4: Include ../ptrace.m4.
4286 * configure.ac: Call GDB_AC_PTRACE.
4287 * config.in, configure: Regenerate.
4288
55d7b841
YQ
42892015-07-24 Yao Qi <yao.qi@linaro.org>
4290
4291 * linux-low.c (linux_create_inferior): Remove setting to
4292 proc->priv->new_inferior.
4293 (linux_attach): Likewise.
4294 (linux_low_filter_event): Likewise.
4295 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4296
c06cbd92
YQ
42972015-07-24 Yao Qi <yao.qi@linaro.org>
4298
4299 * linux-low.c (linux_arch_setup): New function.
4300 (linux_low_filter_event): If proc->tdesc is NULL and
4301 proc->attached is true, call the_low_target.arch_setup.
4302 Otherwise, keep status pending, and return.
4303 (linux_resume_one_lwp_throw): Don't call get_pc if
4304 thread->while_stepping isn't NULL. Don't call
4305 get_thread_regcache if proc->tdesc is NULL.
4306 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4307 (linux_target_ops): Install arch_setup.
4308 * server.c (start_inferior): Call the_target->arch_setup.
4309 * target.h (struct target_ops) <arch_setup>: New field.
4310 (target_arch_setup): New marco.
4311 * lynx-low.c (lynx_target_ops): Update.
4312 * nto-low.c (nto_target_ops): Update.
4313 * spu-low.c (spu_target_ops): Update.
4314 * win32-low.c (win32_target_ops): Update.
4315
5ae3ebba
YQ
43162015-07-24 Yao Qi <yao.qi@linaro.org>
4317
4318 * linux-low.c (linux_add_process): Don't set
4319 proc->priv->new_inferior.
4320 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4321 (linux_attach): Likewise.
4322
eb97750b
YQ
43232015-07-24 Yao Qi <yao.qi@linaro.org>
4324
4325 * server.c (start_inferior): Code refactor.
4326
51aee833
YQ
43272015-07-24 Yao Qi <yao.qi@linaro.org>
4328
4329 * server.c (process_serial_event): Set general_thread.
4330
af1b22f3
YQ
43312015-07-21 Yao Qi <yao.qi@linaro.org>
4332
4333 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4334 aarch64_linux_get_debug_reg_capacity.
4335
554717a3
YQ
43362015-07-17 Yao Qi <yao.qi@linaro.org>
4337
4338 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4339 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4340 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4341 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4342 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4343 (AARCH64_HWP_ALIGNMENT): Likewise.
4344 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4345 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4346 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4347 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4348 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4349 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4350 (struct aarch64_debug_reg_state): Likewise.
4351 (struct arch_lwp_info): Likewise.
4352 (aarch64_align_watchpoint): Likewise.
4353 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4354 (aarch64_watchpoint_length): Likewise.
4355 (aarch64_point_encode_ctrl_reg): Likewise
4356 (aarch64_point_is_aligned): Likewise.
4357 (aarch64_align_watchpoint): Likewise.
4358 (aarch64_linux_set_debug_regs):
4359 (aarch64_dr_state_insert_one_point): Likewise.
4360 (aarch64_dr_state_remove_one_point): Likewise.
4361 (aarch64_handle_breakpoint): Likewise.
4362 (aarch64_handle_aligned_watchpoint): Likewise.
4363 (aarch64_handle_unaligned_watchpoint): Likewise.
4364 (aarch64_handle_watchpoint): Likewise.
4365
c67ca4de
YQ
43662015-07-17 Yao Qi <yao.qi@linaro.org>
4367
4368 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4369 and don't aarch64_get_debug_reg_state. All callers update.
4370 (aarch64_handle_aligned_watchpoint): Likewise.
4371 (aarch64_handle_unaligned_watchpoint): Likewise.
4372 (aarch64_handle_watchpoint): Likewise.
4373 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4374 (aarch64_remove_point): Likewise.
4375
25abf979
YQ
43762015-07-17 Yao Qi <yao.qi@linaro.org>
4377
4378 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4379 debug_printf.
4380 (aarch64_handle_unaligned_watchpoint): Likewise.
4381
db1ff28b
JK
43822015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4383
4384 Revert the previous 3 commits:
4385 Move gdb_regex* to common/
4386 Move linux_find_memory_regions_full & co.
4387 gdbserver build-id attribute generator
4388
700ca40f
JK
43892015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4390 Jan Kratochvil <jan.kratochvil@redhat.com>
4391
4392 gdbserver build-id attribute generator.
4393 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4394 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4395 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4396 (find_phdr): New.
4397 (get_dynamic): Use find_pdhr to traverse program headers.
4398 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4399 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4400 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4401 (get_hex_build_id): New.
4402 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4403 to reply XML document.
4404
9904185c
JK
44052015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4406 Jan Kratochvil <jan.kratochvil@redhat.com>
4407
4408 * target.c: Include target/target-utils.h and fcntl.h.
4409 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4410 (target_fileio_read_stralloc): New functions.
4411
6e5b4429
JK
44122015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4413
4414 * Makefile.in (OBS): Add gdb_regex.o.
4415 (gdb_regex.o): New.
4416 * config.in: Rebuilt.
4417 * configure: Rebuilt.
4418
ddc98fbf
JK
44192015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4420 Jan Kratochvil <jan.kratochvil@redhat.com>
4421
4422 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4423 * Makefile.in (OBS): Add target-utils.o.
4424 (linux-maps.o, target-utils.o): New.
4425 * configure.srv (srv_linux_obj): Add linux-maps.o.
4426
e57bb7a0
PL
44272015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4428
4429 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4430 function, return 1.
4431 (the_low_target): Install it.
4432
586b02a9
PA
44332015-07-14 Pedro Alves <palves@redhat.com>
4434
4435 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4436 Instead, ignore ECHILD, and throw an error for other errnos.
4437
58c1b36c
PA
44382015-07-10 Pedro Alves <palves@redhat.com>
4439
4440 * event-loop.c (struct callback_event) <data>: Change type to
4441 gdb_client_data instance instead of gdb_client_data pointer.
4442 (append_callback_event): Adjust.
4443
421530db
PL
44442015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4445
4446 * linux-aarch64-low.c: Add comments for each linux_target_ops
4447 method. Remove comments already covered in target_ops and
4448 linux_target_ops definitions.
4449 (the_low_target): Add comments for each unimplemented method.
4450
c2d65f38
YQ
44512015-07-09 Yao Qi <yao.qi@linaro.org>
4452
4453 * linux-aarch64-low.c (aarch64_regmap): Remove.
4454 (aarch64_usrregs_info): Remove.
4455 (regs_info): Set field usrregs to NULL.
4456
b20a6524
MM
44572015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4458
4459 * linux-low.c: Include "rsp-low.h"
4460 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4461 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4462 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4463 (handle_btrace_enable_pt): New.
4464 (handle_btrace_general_set): Support "pt".
4465 (handle_btrace_conf_general_set): Support "pt:size".
4466
96c97461
PL
44672015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4468
4469 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4470 Z_PACKET_SW_BP.
4471
37d66942
PL
44722015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4473
4474 * linux-aarch64-low.c: Remove comment about endianness.
4475 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4476 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4477 memcmp.
4478
dc06243f
GB
44792015-06-24 Gary Benson <gbenson@redhat.com>
4480
4481 * linux-i386-ipa.c (stdint.h): Do not include.
4482 * lynx-i386-low.c (stdint.h): Likewise.
4483 * lynx-ppc-low.c (stdint.h): Likewise.
4484 * mem-break.c (stdint.h): Likewise.
4485 * thread-db.c (stdint.h): Likewise.
4486 * tracepoint.c (stdint.h): Likewise.
4487 * win32-low.c (stdint.h): Likewise.
4488
124e13d9
SM
44892015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4490
4491 * server.c (write_qxfer_response): Update call to
4492 remote_escape_output.
4493
909c2cda
JK
44942015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4495 Jan Kratochvil <jan.kratochvil@redhat.com>
4496
4497 Merge multiple hex conversions.
4498 * gdbreplay.c (tohex): Rename to 'fromhex'.
4499 (logchar): Use fromhex.
4500
24c05f46
JK
45012015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4502
4503 * server.c (handle_qxfer_libraries): Set `version' attribute for
4504 <library-list>.
4505
14d2069a
GB
45062015-06-10 Gary Benson <gbenson@redhat.com>
4507
4508 * target.h (struct target_ops) <multifs_open>: New field.
4509 <multifs_unlink>: Likewise.
4510 <multifs_readlink>: Likewise.
4511 * linux-low.c (nat/linux-namespaces.h): New include.
4512 (linux_target_ops): Initialize the_target->multifs_open,
4513 the_target->multifs_unlink and the_target->multifs_readlink.
4514 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4515 * hostio.c (hostio_fs_pid): New static variable.
4516 (hostio_handle_new_gdb_connection): New function.
4517 (handle_setfs): Likewise.
4518 (handle_open): Use the_target->multifs_open as appropriate.
4519 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4520 (handle_readlink): Use the_target->multifs_readlink as
4521 appropriate.
4522 (handle_vFile): Handle vFile:setfs packets.
4523 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4524 after target_handle_new_gdb_connection.
4525
4b8b5e72
GB
45262015-06-10 Gary Benson <gbenson@redhat.com>
4527
4528 * configure.ac (AC_CHECK_FUNCS): Add setns.
4529 * config.in: Regenerate.
4530 * configure: Likewise.
4531 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4532 (linux-namespaces.o): New rule.
4533 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4534
3ac2e371
GB
45352015-06-09 Gary Benson <gbenson@redhat.com>
4536
4537 * hostio.c (handle_open): Process mode argument with
4538 fileio_to_host_mode.
4539
ca9b78ce
YQ
45402015-06-01 Yao Qi <yao.qi@linaro.org>
4541
4542 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4543 * linux-x86-low.c: Likewise.
4544
bfacd19d
DB
45452015-05-28 Don Breazeal <donb@codesourcery.com>
4546
4547 * linux-low.c (handle_extended_wait): Initialize
4548 thread_info.last_resume_kind for new fork children.
4549
452003ef
PA
45502015-05-15 Pedro Alves <palves@redhat.com>
4551
4552 * target.h (target_handle_new_gdb_connection): Rewrite using if
4553 wrapped in do/while.
4554
1041a03c
JB
45552015-05-14 Joel Brobecker <brobecker@adacore.com>
4556
4557 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4558 * configure, config.in: Regenerate.
4559 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4560 Declare typedef.
4561
c269dbdb
DB
45622015-05-12 Don Breazeal <donb@codesourcery.com>
4563
4564 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4565 PTRACE_EVENT_VFORK_DONE.
4566 (linux_low_ptrace_options, extended_event_reported): Add vfork
4567 events.
4568 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4569 and "vforkdone" for RSP 'T' Stop Reply Packet.
4570 * server.h (report_vfork_events): Declare
4571 global variable.
4572
3a8a0396
DB
45732015-05-12 Don Breazeal <donb@codesourcery.com>
4574
4575 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4576 (the_low_target) <new_fork>: Initialize new member.
4577 * linux-arm-low.c (arm_new_fork): New function.
4578 (the_low_target) <new_fork>: Initialize new member.
4579 * linux-low.c (handle_extended_wait): Call new target function
4580 new_fork.
4581 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4582 * linux-mips-low.c (mips_add_watchpoint): New function
4583 extracted from mips_insert_point.
4584 (the_low_target) <new_fork>: Initialize new member.
4585 (mips_linux_new_fork): New function.
4586 (mips_insert_point): Call mips_add_watchpoint.
4587 * linux-x86-low.c (x86_linux_new_fork): New function.
4588 (the_low_target) <new_fork>: Initialize new member.
4589
de0d863e
DB
45902015-05-12 Don Breazeal <donb@codesourcery.com>
4591
4592 * linux-low.c (handle_extended_wait): Implement return value,
4593 rename argument 'event_child' to 'event_lwp', handle
4594 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4595 (linux_low_ptrace_options): New function.
4596 (linux_low_filter_event): Call linux_low_ptrace_options,
4597 use different argument fo linux_enable_event_reporting,
4598 use return value from handle_extended_wait.
4599 (extended_event_reported): New function.
4600 (linux_wait_1): Call extended_event_reported and set
4601 status to report fork events.
4602 (linux_write_memory): Add pid to debug message.
4603 (reset_lwp_ptrace_options_callback): New function.
4604 (linux_handle_new_gdb_connection): New function.
4605 (linux_target_ops): Initialize new structure member.
4606 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4607 * lynx-low.c: Initialize new structure member.
4608 * remote-utils.c (prepare_resume_reply): Implement stop reason
4609 "fork" for "T" stop message.
4610 * server.c (handle_query): Call handle_new_gdb_connection.
4611 * server.h (report_fork_events): Declare global flag.
4612 * target.h (struct target_ops) <handle_new_gdb_connection>:
4613 New member.
4614 (target_handle_new_gdb_connection): New macro.
4615 * win32-low.c: Initialize new structure member.
4616
ddcbc397
DB
46172015-05-12 Don Breazeal <donb@codesourcery.com>
4618
4619 * mem-break.c (APPEND_TO_LIST): Define macro.
4620 (clone_agent_expr): New function.
4621 (clone_one_breakpoint): New function.
4622 (clone_all_breakpoints): New function.
4623 * mem-break.h: Declare new functions.
4624
89245bc0
DB
46252015-05-12 Don Breazeal <donb@codesourcery.com>
4626
4627 * linux-low.c (linux_supports_fork_events): New function.
4628 (linux_supports_vfork_events): New function.
4629 (linux_target_ops): Initialize new structure members.
4630 (initialize_low): Call linux_check_ptrace_features.
4631 * lynx-low.c (lynx_target_ops): Initialize new structure
4632 members.
4633 * server.c (report_fork_events, report_vfork_events):
4634 New global flags.
4635 (handle_query): Add new features to qSupported packet and
4636 response.
4637 (captured_main): Initialize new global variables.
4638 * target.h (struct target_ops) <supports_fork_events>:
4639 New member.
4640 <supports_vfork_events>: New member.
4641 (target_supports_fork_events): New macro.
4642 (target_supports_vfork_events): New macro.
4643 * win32-low.c (win32_target_ops): Initialize new structure
4644 members.
4645
835205d0
GB
46462015-05-12 Gary Benson <gbenson@redhat.com>
4647
4648 * server.c (handle_qxfer_exec_file): Use current process
4649 if annex is empty.
4650
21e94bd9
SL
46512015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4652
4653 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4654 Remove HAVE_PTRACE_GETREGS conditionals.
4655 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4656 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4657
45614f15
YQ
46582015-05-08 Yao Qi <yao.qi@linaro.org>
4659
4660 * linux-low.c (linux_supports_conditional_breakpoints): New
4661 function.
4662 (linux_target_ops): Install new target method.
4663 * lynx-low.c (lynx_target_ops): Install NULL hook for
4664 supports_conditional_breakpoints.
4665 * nto-low.c (nto_target_ops): Likewise.
4666 * spu-low.c (spu_target_ops): Likewise.
4667 * win32-low.c (win32_target_ops): Likewise.
4668 * server.c (handle_query): Check
4669 target_supports_conditional_breakpoints.
4670 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4671 New field.
4672 (target_supports_conditional_breakpoints): New macro.
4673
80ad801e
PA
46742015-05-06 Pedro Alves <palves@redhat.com>
4675
4676 PR server/18081
4677 * server.c (start_inferior): If the process exits, mourn it.
4678
819843c7
GB
46792015-04-21 Gary Benson <gbenson@redhat.com>
4680
4681 * hostio.c (fileio_open_flags_to_host): Factored out to
4682 fileio_to_host_openflags in common/fileio.c. Single use
4683 updated.
4684
a2d5a9d7
MF
46852015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4686
4687 * linux-xtensa-low.c (xtensa_fill_gregset)
4688 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4689 XCHAL_HAVE_LOOP.
4690
deb44829
MF
46912015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4692
4693 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4694 (regs_info): Replace usrregs pointer with NULL.
4695
e57f1de3
GB
46962015-04-17 Gary Benson <gbenson@redhat.com>
4697
4698 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4699 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4700 * server.c (handle_qxfer_exec_file): New function.
4701 (qxfer_packets): Add exec-file entry.
4702 (handle_query): Report qXfer:exec-file:read as supported packet.
4703
62828379
RN
47042015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4705
4706 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4707
b88bb450
GB
47082015-04-09 Gary Benson <gbenson@redhat.com>
4709
4710 * hostio-errno.c (errno_to_fileio_error): Remove function.
4711 Update caller to use remote_fileio_to_fio_error.
4712
c8f4bfdd
YQ
47132015-04-09 Yao Qi <yao.qi@linaro.org>
4714
4715 * linux-low.c (linux_insert_point): Call
4716 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4717 (linux_remove_point): Call remove_memory_breakpoint if type is
4718 raw_bkpt_type_sw.
4719 * linux-x86-low.c (x86_insert_point): Don't call
4720 insert_memory_breakpoint.
4721 (x86_remove_point): Don't call remove_memory_breakpoint.
4722
41f98f02
PA
47232015-04-01 Pedro Alves <palves@redhat.com>
4724 Cleber Rosa <crosa@redhat.com>
4725
4726 * server.c (gdbserver_usage): Reorganize and extend the usage
4727 message.
4728
2bf6fb9d
PA
47292015-03-24 Pedro Alves <palves@redhat.com>
4730
4731 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4732 output. Also dump TRAP_TRACE.
4733 (linux_low_filter_event): In debug output, distinguish a
4734 resume_stop SIGSTOP from a delayed SIGSTOP.
4735
369f6daa
GB
47362015-03-24 Gary Benson <gbenson@redhat.com>
4737
4738 * linux-x86-low.c (x86_linux_new_thread): Moved to
4739 nat/x86-linux.c.
4740 (x86_linux_prepare_to_resume): Likewise.
4741
8e5d4070
GB
47422015-03-24 Gary Benson <gbenson@redhat.com>
4743
4744 * Makefile.in (x86-linux-dregs.o): New rule.
4745 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4746 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4747 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4748 (x86_linux_dr_get): Likewise.
4749 (x86_linux_dr_set): Likewise.
4750 (update_debug_registers_callback): Likewise.
4751 (x86_linux_dr_set_addr): Likewise.
4752 (x86_linux_dr_get_addr): Likewise.
4753 (x86_linux_dr_set_control): Likewise.
4754 (x86_linux_dr_get_control): Likewise.
4755 (x86_linux_dr_get_status): Likewise.
4756 (x86_linux_update_debug_registers): Likewise.
4757
2b95d440
GB
47582015-03-24 Gary Benson <gbenson@redhat.com>
4759
4760 * linux-x86-low.c (x86_linux_update_debug_registers):
4761 New function, factored out from...
4762 (x86_linux_prepare_to_resume): ...this.
4763
14b0bc68
GB
47642015-03-24 Gary Benson <gbenson@redhat.com>
4765
4766 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4767 (x86_linux_dr_set): Likewise.
4768 (update_debug_registers_callback): Likewise.
4769 (x86_linux_dr_set_addr): Likewise.
4770 (x86_linux_dr_get_addr): Likewise.
4771 (x86_linux_dr_set_control): Likewise.
4772 (x86_linux_dr_get_control): Likewise.
4773 (x86_linux_dr_get_status): Likewise.
4774 (x86_linux_prepare_to_resume): Likewise.
4775
5dfe6ca8
GB
47762015-03-24 Gary Benson <gbenson@redhat.com>
4777
4778 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4779 Use perror_with_name. Pass string through gettext.
4780 (x86_linux_dr_set): Likewise.
4781
d33472ad
GB
47822015-03-24 Gary Benson <gbenson@redhat.com>
4783
4784 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4785 (x86_linux_dr_set_addr): ...this.
4786 (x86_dr_low_get_addr): Rename to...
4787 (x86_linux_dr_get_addr): ...this.
4788 (x86_dr_low_set_control): Rename to...
4789 (x86_linux_dr_set_control): ...this.
4790 (x86_dr_low_get_control): Rename to...
4791 (x86_linux_dr_get_control): ...this.
4792 (x86_dr_low_get_status): Rename to...
4793 (x86_linux_dr_get_status): ...this.
4794 (x86_dr_low): Update with new function names.
4795
4b134ca1
GB
47962015-03-24 Gary Benson <gbenson@redhat.com>
4797
4798 * Makefile.in (x86-linux.o): New rule.
4799 * configure.srv: Add x86-linux.o to relevant targets.
4800 * linux-low.c (lwp_set_arch_private_info): New function.
4801 (lwp_arch_private_info): Likewise.
4802 * linux-x86-low.c: Include nat/x86-linux.h.
4803 (arch_lwp_info): Removed structure.
4804 (update_debug_registers_callback):
4805 Use lwp_set_debug_registers_changed.
4806 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4807 and lwp_set_debug_registers_changed.
4808 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4809
34c703da
GB
48102015-03-24 Gary Benson <gbenson@redhat.com>
4811
4812 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4813 * linux-arm-low.c (arm_new_thread): Likewise.
4814 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4815 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4816 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4817 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4818
cff068da
GB
48192015-03-24 Gary Benson <gbenson@redhat.com>
4820
4821 * linux-low.c (ptid_of_lwp): New function.
4822 (lwp_is_stopped): Likewise.
4823 (lwp_stop_reason): Likewise.
4824 * linux-x86-low.c (update_debug_registers_callback):
4825 Use lwp_is_stopped.
4826 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4827 lwp_stop_reason.
4828
b2f7c7e8
GB
48292015-03-24 Gary Benson <gbenson@redhat.com>
4830
4831 * linux-low.h (linux_stop_lwp): Remove declaration.
4832
6d4ee8c6
GB
48332015-03-24 Gary Benson <gbenson@redhat.com>
4834
4835 * linux-low.h: Include nat/linux-nat.h.
4836 * linux-low.c (iterate_over_lwps_args): New structure.
4837 (iterate_over_lwps_filter): New function.
4838 (iterate_over_lwps): Likewise.
4839 * linux-x86-low.c (update_debug_registers_callback):
4840 Update signature to what iterate_over_lwps expects.
4841 Remove PID check that iterate_over_lwps now performs.
4842 (x86_dr_low_set_addr): Use iterate_over_lwps.
4843 (x86_dr_low_set_control): Likewise.
4844
70a0bb6b
GB
48452015-03-24 Gary Benson <gbenson@redhat.com>
4846
4847 * linux-x86-low.c (x86_debug_reg_state): New function.
4848 (x86_linux_prepare_to_resume): Use the above.
4849
7b669087
GB
48502015-03-24 Gary Benson <gbenson@redhat.com>
4851
4852 * linux-low.c (current_lwp_ptid): New function.
4853 * linux-x86-low.c: Include nat/linux-nat.h.
4854 (x86_dr_low_get_addr): Use current_lwp_ptid.
4855 (x86_dr_low_get_control): Likewise.
4856 (x86_dr_low_get_status): Likewise.
4857
eef49a3d
PA
48582015-03-20 Pedro Alves <palves@redhat.com>
4859
4860 * tracepoint.c (cmd_qtstatus): Make "str" const.
4861
b2333d22
PA
48622015-03-20 Pedro Alves <palves@redhat.com>
4863
4864 * server.c (handle_general_set): Make "req_str" const.
4865
23f238d3
PA
48662015-03-19 Pedro Alves <palves@redhat.com>
4867
4868 * linux-low.c (linux_resume_one_lwp): Rename to ...
4869 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4870 instead call perror_with_name.
4871 (check_ptrace_stopped_lwp_gone): New function.
4872 (linux_resume_one_lwp): Reimplement as wrapper around
4873 linux_resume_one_lwp_throw that swallows errors if the LWP is
4874 gone.
4875
91baf43f
PA
48762015-03-19 Pedro Alves <palves@redhat.com>
4877
4878 * linux-low.c (count_events_callback, select_event_lwp_callback):
4879 No longer check whether the thread has resume_stop as last resume
4880 kind.
4881
8bf3b159
PA
48822015-03-19 Pedro Alves <palves@redhat.com>
4883
4884 * linux-low.c (count_events_callback, select_event_lwp_callback):
4885 Use the lwp's status_pending_p field, not the thread's.
4886
b90fc188
PA
48872015-03-19 Pedro Alves <palves@redhat.com>
4888
4889 * linux-low.c (select_event_lwp_callback): Update comments to
4890 no longer mention SIGTRAP.
4891
464b0089
GB
48922015-03-18 Gary Benson <gbenson@redhat.com>
4893
4894 * server.c (handle_query): Do not report vFile:fstat as supported.
4895
aa9e327f
GB
48962015-03-11 Gary Benson <gbenson@redhat.com>
4897
4898 * hostio.c (sys/types.h): New include.
4899 (sys/stat.h): Likewise.
4900 (common-remote-fileio.h): Likewise.
4901 (handle_fstat): New function.
4902 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4903
791c0056
GB
49042015-03-11 Gary Benson <gbenson@redhat.com>
4905
4906 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4907 struct stat.st_blocks and struct stat.st_blksize.
4908 * configure: Regenerate.
4909 * config.in: Likewise.
4910 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4911 (OBS): Add common-remote-fileio.o.
4912 (common-remote-fileio.o): New rule.
4913
9a9df970
PA
49142015-03-09 Pedro Alves <palves@redhat.com>
4915
4916 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4917 'struct sockaddr' pointer in 'accept' call.
4918
9eb1356e
PA
49192015-03-09 Pedro Alves <palves@redhat.com>
4920
4921 Revert:
4922 2015-03-07 Pedro Alves <palves@redhat.com>
4923 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4924 or <winsock2.h> here. Instead include "gdb_socket.h".
4925 (remote_open): Use union gdb_sockaddr_u.
4926 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4927 or <winsock2.h> here. Instead include "gdb_socket.h".
4928 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4929 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4930 or <sys/un.h>.
4931 (init_named_socket, gdb_agent_helper_thread): Use union
4932 gdb_sockaddr_u.
4933
aac331e4
PA
49342015-03-07 Pedro Alves <palves@redhat.com>
4935
4936 * configure.ac (build_warnings): Move
4937 -Wdeclaration-after-statement to the C-specific set.
4938 * configure: Regenerate.
4939
366c75fc
PA
49402015-03-07 Pedro Alves <palves@redhat.com>
4941
4942 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4943 or <winsock2.h> here. Instead include "gdb_socket.h".
4944 (remote_open): Use union gdb_sockaddr_u.
4945 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4946 or <winsock2.h> here. Instead include "gdb_socket.h".
4947 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4948 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4949 or <sys/un.h>.
4950 (init_named_socket, gdb_agent_helper_thread): Use union
4951 gdb_sockaddr_u.
4952
492d29ea
PA
49532015-03-07 Pedro Alves <palves@redhat.com>
4954
4955 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4956 instead.
4957
60a191ed
YQ
49582015-03-06 Yao Qi <yao.qi@linaro.org>
4959
4960 * linux-aarch64-low.c (aarch64_insert_point): Use
4961 show_debug_regs as a boolean.
4962 (aarch64_remove_point): Likewise.
4963
f5771b1d
PA
49642015-03-05 Pedro Alves <palves@redhat.com>
4965
4966 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4967 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4968 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4969 * nto-low.c (nto_target_ops): Likewise.
4970 * spu-low.c (spu_target_ops): Likewise.
4971 * win32-low.c (win32_target_ops): Likewise.
4972
3e572f71
PA
49732015-03-04 Pedro Alves <palves@redhat.com>
4974
72f4393d 4975 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4976 Decide whether a breakpoint triggered based on the SIGTRAP's
4977 siginfo.si_code.
72f4393d
L
4978 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4979 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4980 (linux_low_filter_event): Check for breakpoints before checking
4981 watchpoints.
4982 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4983 siginfo.si_code.
72f4393d
L
4984 (linux_stopped_by_sw_breakpoint)
4985 (linux_supports_stopped_by_sw_breakpoint)
4986 (linux_stopped_by_hw_breakpoint)
4987 (linux_supports_stopped_by_hw_breakpoint): New functions.
4988 (linux_target_ops): Install new target methods.
3e572f71 4989
1ec68e26
PA
49902015-03-04 Pedro Alves <palves@redhat.com>
4991
4992 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4993 * server.c (swbreak_feature, hwbreak_feature): New globals.
4994 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4995 (captured_main): Clear swbreak_feature and hwbreak_feature.
4996 * server.h (swbreak_feature, hwbreak_feature): Declare.
4997 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4998 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4999 supports_stopped_by_hw_breakpoint>: New fields.
5000 (target_supports_stopped_by_sw_breakpoint)
5001 (target_stopped_by_sw_breakpoint)
5002 (target_supports_stopped_by_hw_breakpoint)
5003 (target_stopped_by_hw_breakpoint): Declare.
5004
15c66dd6
PA
50052015-03-04 Pedro Alves <palves@redhat.com>
5006
5007 enum lwp_stop_reason -> enum target_stop_reason
5008 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5009 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5010 (linux_wait_1, stuck_in_jump_pad_callback)
5011 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5012 (linux_stopped_by_watchpoint):
5013 * linux-low.h (enum lwp_stop_reason): Delete.
5014 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5015 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5016
98fc70d6
YQ
50172015-03-04 Yao Qi <yao.qi@linaro.org>
5018
5019 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5020
dd2ac174
GB
50212015-03-03 Gary Benson <gbenson@redhat.com>
5022
5023 * hostio.c (handle_vFile): Fix prefix lengths.
5024
d68e53f4
MM
50252015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5026
5027 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5028 ptr_bits.
5029
bf2d68ab
AA
50302015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5031
5032 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5033 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5034 (clean): Add "rm -f" for above C files.
5035 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5036 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5037 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5038 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5039 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5040 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5041 (init_registers_s390x_vx_linux64)
5042 (init_registers_s390x_tevx_linux64)
5043 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5044 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5045 declarations.
5046 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5047 (s390_store_vxrs_high): New functions.
5048 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5049 NT_S390_VXRS_HIGH.
5050 (s390_arch_setup): Add logic for selecting one of the new target
5051 descriptions. Activate the new vector regsets if applicable.
5052 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5053 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5054 and init_registers_s390x_tevx_linux64.
5055
c966a859
PA
50562015-03-01 Pedro Alves <palves@redhat.com>
5057
5058 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5059 parameter.
5060
4180215b
PA
50612015-02-27 Pedro Alves <palves@redhat.com>
5062
5063 * linux-x86-low.c (u_debugreg_offset): New function.
5064 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5065
749bab01
PA
50662015-02-27 Pedro Alves <palves@redhat.com>
5067
5068 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5069 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5070 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5071 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5072 (ps_lsetfpregs, ps_getpid)
5073 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5074 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5075 (ps_lsetxregs, ps_plog): Declare.
5076
3c14e5a3
PA
50772015-02-27 Pedro Alves <palves@redhat.com>
5078
5079 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5080 IP_AGENT_EXPORT_FUNC.
5081 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5082 IP_AGENT_EXPORT_FUNC.
5083 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5084 (IP_AGENT_EXPORT): Delete.
5085 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5086 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5087 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5088 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5089 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5090 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5091 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5092 (traceframe_read_count, traceframe_write_count)
5093 (traceframes_created, trace_state_variables, get_raw_reg)
5094 (get_trace_state_variable_value, set_trace_state_variable_value)
5095 (ust_loaded, helper_thread_id, cmd_buf): Use
5096 IPA_SYM_EXPORTED_NAME.
5097 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5098 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5099 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5100 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5101 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5102 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5103 EXTERN_C_PUSH/EXTERN_C_POP.
5104 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5105 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5106 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5107 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5108 (traceframe_write_count, traceframe_read_count)
5109 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5110 (about_to_request_buffer_space, get_trace_state_variable_value)
5111 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5112 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5113 EXTERN_C_PUSH/EXTERN_C_POP.
5114 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5115 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5116 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5117 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5118 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5119 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5120 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5121 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5122 Define.
5123 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5124 (IP_AGENT_EXPORT_VAR_DECL): Define.
5125 (tracing): Declare.
5126 (gdb_agent_get_raw_reg): Declare.
5127
fe978cb0
PA
51282015-02-27 Tom Tromey <tromey@redhat.com>
5129 Pedro Alves <palves@redhat.com>
5130
5131 Rename symbols whose names are reserved C++ keywords throughout.
5132
3bc3d82a
PA
51332015-02-27 Pedro Alves <palves@redhat.com>
5134
5135 * Makefile.in (COMPILER): New, get it from autoconf.
5136 (CXX): Get from autoconf instead.
5137 (COMPILE.pre): Use COMPILER.
5138 (CC-LD): Rename to ...
5139 (CC_LD): ... this. Use COMPILER.
5140 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5141 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5142 * acinclude.m4: Include build-with-cxx.m4.
5143 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5144 Disable -Werror by default if building in C++ mode.
5145 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5146 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5147 the C++ compiler. Save/restore CXXFLAGS too.
5148 * configure: Regenerate.
5149
07697489
PA
51502015-02-27 Pedro Alves <palves@redhat.com>
5151
5152 * acinclude.m4: Include libiberty.m4.
5153 * configure.ac: Call libiberty_INIT.
5154 * config.in, configure: Regenerate.
5155
9beb7c4e
PA
51562015-02-26 Pedro Alves <palves@redhat.com>
5157
5158 * linux-low.c (linux_wait_1): When incrementing the PC past a
5159 program breakpoint always use the_low_target.breakpoint_len as
5160 increment, rather than the maximum between that and
5161 the_low_target.decr_pc_after_break.
5162
8090aef2
PA
51632015-02-23 Pedro Alves <palves@redhat.com>
5164
5165 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5166 thread was doing a step-over; always adjust the PC if
5167 we stepped over a permanent breakpoint.
5168 (linux_wait_1): If we stepped over breakpoint that was on top of a
5169 permanent breakpoint, manually advance the PC past it.
5170
bc9540e8
PA
51712015-02-23 Pedro Alves <palves@redhat.com>
5172
5173 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5174 modes.
5175 (x86_fill_gregset, x86_store_gregset): Use it when handling
5176 $orig_eax.
5177
2db9a427
PA
51782015-02-20 Pedro Alves <palves@redhat.com>
5179
5180 * thread-db.c: Include "nat/linux-procfs.h".
5181 (thread_db_init): Skip listing new threads if the kernel supports
5182 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5183
afa8d396
PA
51842015-02-20 Pedro Alves <palves@redhat.com>
5185
5186 * linux-low.c (status_pending_p_callback): Use ptid_match.
5187
c9587f88
AT
51882015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5189
5190 PR breakpoints/16812
5191 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5192 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5193 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5194
b05ec7a5
AT
51952015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5196
5197 PR breakpoints/15956
5198 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5199
d33501a5
MM
52002015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5201
5202 * linux-low.c (linux_low_btrace_conf): Print size.
5203 * server.c (handle_btrace_conf_general_set): New.
5204 (hanle_general_set): Call handle_btrace_conf_general_set.
5205 (handle_query): Report Qbtrace-conf:bts:size as supported.
5206
f4abbc16
MM
52072015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5208
5209 * linux-low.c (linux_low_enable_btrace): Update parameters.
5210 (linux_low_btrace_conf): New.
5211 (linux_target_ops)<to_btrace_conf>: Initialize.
5212 * server.c (current_btrace_conf): New.
5213 (handle_btrace_enable): Rename to ...
5214 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5215 to target_enable_btrace. Update comment. Update users.
5216 (handle_qxfer_btrace_conf): New.
5217 (qxfer_packets): Add btrace-conf entry.
5218 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5219 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5220 (target_ops)<read_btrace_conf>: New.
5221 (target_enable_btrace): Update parameters.
5222 (target_read_btrace_conf): New.
5223
043c3577
MM
52242015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5225
5226 * server.c (handle_btrace_general_set): Remove call to
5227 target_supports_btrace.
5228 (supported_btrace_packets): New.
5229 (handle_query): Call supported_btrace_packets.
5230 * target.h: include btrace-common.h.
5231 (btrace_target_info): Removed.
5232 (supports_btrace, target_supports_btrace): Update parameters.
5233
734b0e4b
MM
52342015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5235
5236 * Makefile.in (SFILES): Add common/btrace-common.c.
5237 (OBS): Add common/btrace-common.o.
5238 (btrace-common.o): Add build rules.
5239 * linux-low: Include btrace-common.h.
5240 (linux_low_read_btrace): Use struct btrace_data. Call
5241 btrace_data_init and btrace_data_fini.
5242
d6c146e9
PA
52432015-02-06 Pedro Alves <palves@redhat.com>
5244
5245 * thread-db.c (find_new_threads_callback): Add debug output.
5246
20ba1ce6
PA
52472015-02-04 Pedro Alves <palves@redhat.com>
5248
5249 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5250 (resume_stopped_resumed_lwps): New function.
5251 (linux_wait_for_event_filtered): Use it.
5252
8cc73a39
SDJ
52532015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5254
5255 * Makefile.in (SFILES): Add linux-personality.c.
5256 (linux-personality.o): New rule.
5257 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5258 list of objects to be built.
5259 * linux-low.c: Include nat/linux-personality.h.
5260 (linux_create_inferior): Remove code to disable address space
5261 randomization (moved to ../nat/linux-personality.c). Create
5262 cleanup to disable address space randomization.
5263
fb23d554
SDJ
52642015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5265
5266 * Makefile.in (posix-strerror.o): New rule.
5267 (mingw-strerror.o): Likewise.
5268 * configure: Regenerated.
5269 * configure.ac: Source file ../common/common.host. Initialize new
5270 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5271
cdf43629
YQ
52722015-01-14 Yao Qi <yao@codesourcery.com>
5273
5274 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5275 (ppc-linux.o): New rule.
5276 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5277 * configure.ac: AC_CHECK_FUNCS(getauxval).
5278 * config.in: Re-generated.
5279 * configure: Re-generated.
5280 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5281 ppc64_64bit_inferior_p
5282
514c5338
YQ
52832015-01-14 Yao Qi <yao@codesourcery.com>
5284
5285 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5286 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5287 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5288 (PT_ORIG_R3, PT_TRAP): Likewise.
5289 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5290 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5291 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5292
3368c1e5
JB
52932015-01-10 Joel Brobecker <brobecker@adacore.com>
5294
5295 * i387-fp.c (i387_cache_to_xsave): In look over
5296 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5297 zmmh_low_space field by use of zmmh_high_space.
5298
582511be
PA
52992015-01-09 Pedro Alves <palves@redhat.com>
5300
5301 * linux-low.c (step_over_bkpt): Move higher up in the file.
5302 (handle_extended_wait): Don't store the stop_pc here.
5303 (get_stop_pc): Adjust comments and rename to ...
5304 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5305 stopped for a software breakpoint or hardware breakpoint.
5306 (thread_still_has_status_pending_p): New function.
5307 (status_pending_p_callback): Use
5308 thread_still_has_status_pending_p. If the event is no longer
5309 interesting, resume the LWP.
5310 (handle_tracepoints): Add assert.
5311 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5312 (wstatus_maybe_breakpoint): New function.
5313 (cancel_breakpoint): Delete function.
5314 (check_stopped_by_watchpoint): New function, factored out from
5315 linux_low_filter_event.
5316 (lp_status_maybe_breakpoint): Delete function.
5317 (linux_low_filter_event): Remove filter_ptid argument.
5318 Leave thread group exits pending here. Store the LWP's stop PC.
5319 Always leave events pending.
5320 (linux_wait_for_event_filtered): Pull all events out of the
5321 kernel, and leave them all pending.
5322 (count_events_callback, select_event_lwp_callback): Consider all
5323 events.
5324 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5325 (select_event_lwp): Only give preference to the stepping LWP in
5326 all-stop mode. Adjust comments.
5327 (ignore_event): New function.
5328 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5329 references to cancel_breakpoints. Adjust to renames. Also give
5330 equal priority to all LWPs that have had events in non-stop mode.
5331 If reporting a software breakpoint event, unadjust the LWP's PC.
5332 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5333 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5334 Adjust.
5335 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5336 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5337 (linux_stopped_by_watchpoint): Adjust.
5338 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5339 * linux-low.h (enum lwp_stop_reason): New.
5340 (struct lwp_info) <stop_pc>: Adjust comment.
5341 <stopped_by_watchpoint>: Delete field.
5342 <stop_reason>: New field.
5343 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5344 * mem-break.c (software_breakpoint_inserted_here)
5345 (hardware_breakpoint_inserted_here): New function.
5346 * mem-break.h (software_breakpoint_inserted_here)
5347 (hardware_breakpoint_inserted_here): Declare.
5348 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5349 (cancel_breakpoints): Delete.
5350 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5351 (upload_fast_traceframes): Remove references to
5352 cancel_breakpoints.
5353
a33e3959
PA
53542015-01-09 Pedro Alves <palves@redhat.com>
5355
5356 * thread-db.c (find_new_threads_callback): Ignore thread if the
5357 kernel thread ID is -1.
5358
8784d563
PA
53592015-01-09 Pedro Alves <palves@redhat.com>
5360
5361 * linux-low.c (linux_attach_fail_reason_string): Move to
5362 nat/linux-ptrace.c, and rename.
5363 (linux_attach_lwp): Update comment.
5364 (attach_proc_task_lwp_callback): New function.
5365 (linux_attach): Adjust to rename and use
5366 linux_proc_attach_tgid_threads.
5367 (linux_attach_fail_reason_string): Delete declaration.
5368
76f2b779
JB
53692015-01-01 Joel Brobecker <brobecker@adacore.com>
5370
5371 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5372 * server.c (gdbserver_version): Likewise.
5373
fafcc06a
SDJ
53742014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5375
5376 * remote-utils.c: Include ctype.h.
5377 (input_interrupt): Explicitly handle the case when the char
5378 received is the NUL byte. Improve the printing of non-ASCII
5379 characters.
5380
beed38b8
JB
53812014-12-16 Joel Brobecker <brobecker@adacore.com>
5382
5383 * linux-low.c (linux_low_filter_event): Update call to
5384 linux_enable_event_reporting following the addition of
5385 a new parameter to that function.
5386
bf330350
CU
53872014-12-16 Catalin Udma <catalin.udma@freescale.com>
5388
5389 PR server/17457
5390 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5391 (AARCH64_FPCR_REGNO): Likewise.
5392 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5393 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5394 (aarch64_store_fpregset): Likewise.
5395
5227d625
JB
53962014-12-15 Joel Brobecker <brobecker@adacore.com>
5397
5398 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5399 Remove FIXME comment about assumption about N.
5400
f93b65a0
JB
54012014-12-13 Joel Brobecker <brobecker@adacore.com>
5402
5403 * configure.ac: If large-file support is disabled in GDBserver,
5404 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5405 * configure: Regenerate.
5406
e5a9158d
AA
54072014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5408
5409 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5410 warning upon ENODATA from ptrace.
5411 * linux-s390-low.c (s390_store_tdb): New.
5412 (s390_regsets): Add regset for NT_S390_TDB.
5413
feea5f36
AA
54142014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5415
5416 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5417 without a fill_function.
5418 * linux-s390-low.c (s390_fill_last_break): Remove.
5419 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5420 (s390_arch_setup): Use regset's size instead of fill_function for
5421 loop end condition.
5422
098dbe61
AA
54232014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5424
5425 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5426 the regset's store function when ptrace returned an error.
5427 * regcache.c (get_thread_regcache): Invalidate register cache
5428 before fetching inferior's registers.
5429
28eef672
AA
54302014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5431
5432 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5433 while-loop as for-loop.
5434 (regsets_store_inferior_registers): Likewise.
5435
bdca27a2
YQ
54362014-11-28 Yao Qi <yao@codesourcery.com>
5437
5438 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5439 * config.in, configure: Re-generate.
5440 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5441 is defined.
5442
9c232dda
YQ
54432014-11-21 Yao Qi <yao@codesourcery.com>
5444
5445 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5446 (AC_CHECK_HEADERS): Remove malloc.h.
5447 * configure: Re-generated.
5448 * config.in: Re-generated.
5449 * server.h: Don't include alloca.h and malloc.h.
5450 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5451 Don't include malloc.h.
5452
43968415
JB
54532014-11-17 Joel Brobecker <brobecker@adacore.com>
5454
5455 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5456 corresponding ERRNO check in same block.
5457
40e91bc7
PA
54582014-11-12 Pedro Alves <palves@redhat.com>
5459
5460 * server.c (cont_thread): Update comment.
5461 (start_inferior, attach_inferior): No longer clear cont_thread.
5462 (handle_v_cont): No longer set cont_thread.
5463 (captured_main): Clear cont_thread each time a GDB connects.
5464
c2c118cf
PA
54652014-11-12 Pedro Alves <palves@redhat.com>
5466
5467 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5468 thread, and don't resume all threads if the Hc thread has exited.
5469
78708b7c
PA
54702014-11-12 Pedro Alves <palves@redhat.com>
5471
5472 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5473 the process group instead of to a specific LWP.
5474
a2abc7de
PA
54752014-10-15 Pedro Alves <palves@redhat.com>
5476
5477 PR server/17487
5478 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5479 parameter.
5480 (arm_set_thread_context): Delete.
5481 (the_low_target): Adjust.
5482 * win32-i386-low.c (debug_registers_changed)
5483 (debug_registers_used): Delete.
5484 (update_debug_registers_callback): New function.
5485 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5486 needing to update their debug registers.
5487 (win32_get_current_dr): New function.
5488 (x86_dr_low_get_addr, x86_dr_low_get_control)
5489 (x86_dr_low_get_status): Fetch the debug register from the thread
5490 record's context.
5491 (i386_initial_stuff): Adjust.
5492 (i386_get_thread_context): Remove current_event parameter. Don't
5493 clear debug_registers_changed nor copy DR values to
5494 debug_reg_state.
5495 (i386_set_thread_context): Delete.
5496 (i386_prepare_to_resume): New function.
5497 (i386_thread_added): Mark the thread as needing to update irs
5498 debug registers.
5499 (the_low_target): Remove i386_set_thread_context and install
5500 i386_prepare_to_resume.
5501 * win32-low.c (win32_get_thread_context): Adjust.
5502 (win32_set_thread_context): Use SetThreadContext
5503 directly.
5504 (win32_prepare_to_resume): New function.
5505 (win32_require_context): New function, factored out from ...
5506 (thread_rec): ... this.
5507 (continue_one_thread): Call win32_prepare_to_resume on each thread
5508 we're about to continue.
5509 (win32_resume): Call win32_prepare_to_resume on the event thread.
5510 * win32-low.h (struct win32_thread_info)
5511 <debug_registers_changed>: New field.
5512 (struct win32_target_ops): Change prototype of set_thread_context,
5513 delete set_thread_context and add prepare_to_resume.
5514 (win32_require_context): New declaration.
5515
a442d071
GB
55162014-10-08 Gary Benson <gbenson@redhat.com>
5517
5518 * server.h: Do not include common-exceptions.h.
5519
6f1947e8
GB
55202014-10-08 Gary Benson <gbenson@redhat.com>
5521
5522 * server.h: Do not include cleanups.h.
5523
63b434a4
JH
55242014-09-30 James Hogan <james.hogan@imgtec.com>
5525
5526 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5527 mips64-dsp-linux.c.
5528
c4d9ceb6
YQ
55292014-09-23 Yao Qi <yao@codesourcery.com>
5530
5531 * linux-low.c (lp_status_maybe_breakpoint): New function.
5532 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5533 (count_events_callback): Likewise.
5534 (select_event_lwp_callback): Likewise.
5535 (cancel_breakpoints_callback): Likewise.
5536
89a5711c
DB
55372014-09-19 Don Breazeal <donb@codesourcery.com>
5538
5539 * linux-low.c (handle_extended_wait): Call
5540 linux_ptrace_get_extended_event.
5541 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5542 linux_is_extended_waitstatus.
5543
bffc0964
JB
55442014-09-16 Joel Brobecker <brobecker@adacore.com>
5545
5546 * Makefile.in (CPPFLAGS): Define.
5547 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5548 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5549
0bfdf32f
GB
55502014-09-16 Gary Benson <gbenson@redhat.com>
5551
5552 * inferiors.h (current_inferior): Renamed as...
5553 (current_thread): New variable. All uses updated.
5554 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5555 (maybe_move_out_of_jump_pad): Likewise.
5556 (cancel_breakpoint): Likewise.
5557 (linux_low_filter_event): Likewise.
5558 (wait_for_sigstop): Likewise.
5559 (linux_resume_one_lwp): Likewise.
5560 (need_step_over_p): Likewise.
5561 (start_step_over): Likewise.
5562 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5563 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5564 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5565 and save_inferior as saved_thread.
5566 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5567 saved_thread.
5568 (regcache_invalidate_thread): Likewise.
5569 * remote-utils.c (prepare_resume_reply): Likewise.
5570 * thread-db.c (thread_db_get_tls_address): Likewise.
5571 (disable_thread_event_reporting): Likewise.
5572 (remove_thread_event_breakpoints): Likewise.
5573 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5574 as saved_thread.
5575 * target.h (set_desired_inferior): Renamed as...
5576 (set_desired_thread): New declaration. All uses updated.
5577 * server.c (myresume): Updated comment to reference thread instead
5578 of inferior.
5579 (handle_serial_event): Likewise.
5580 (handle_target_event): Likewise.
5581
361c8ade
GB
55822014-09-12 Tom Tromey <tromey@redhat.com>
5583 Gary Benson <gbenson@redhat.com>
5584
5585 * regcache.h: Include common-regcache.h.
5586 (regcache_read_pc): Don't declare.
5587 * regcache.c (get_thread_regcache_for_ptid): New function.
5588
bd9269f7
GB
55892014-09-11 Tom Tromey <tromey@redhat.com>
5590 Gary Benson <gbenson@redhat.com>
5591
5592 * symbol.c: New file.
5593 * Makefile.in (SFILES): Add symbol.c.
5594 (OBS): Add symbol.o.
5595
f8c1d06b
GB
55962014-09-11 Gary Benson <gbenson@redhat.com>
5597
5598 * target.c (target_stop_ptid, target_continue_ptid): New
5599 functions.
5600
721ec300
GB
56012014-09-11 Tom Tromey <tromey@redhat.com>
5602 Gary Benson <gbenson@redhat.com>
5603
5604 * target.h: Include target/target.h.
5605 * target.c (target_read_memory, target_read_uint32)
5606 (target_write_memory): New functions.
5607
c5e92cca
GB
56082014-09-11 Gary Benson <gbenson@redhat.com>
5609
5610 * server.h (debug_hw_points): Don't declare.
5611 * server.c (debug_hw_points): Don't define. Replace all uses
5612 with show_debug_regs.
5613 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5614 all uses with show_debug_regs.
5615
2e4bb98a
EBM
56162014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5617
5618 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5619 endianness into account.
5620 (ppc_supply_ptrace_register): Likewise.
5621
ac740bc7
JH
56222014-09-03 James Hogan <james.hogan@imgtec.com>
5623
5624 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5625 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5626
97ea6506
GB
56272014-09-03 Gary Benson <gbenson@redhat.com>
5628
5629 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5630 ALL_DEBUG_ADDRESS_REGISTERS.
5631
df7e5265
GB
56322014-09-02 Gary Benson <gbenson@redhat.com>
5633
5634 * i386-low.h: Renamed as...
5635 * x86-low.h: New file. All type, function and variable name
5636 prefixes changed from "i386_" to "x86_". All references updated.
5637 * i386-low.c: Renamed as...
5638 * x86-low.c: New file. All type, function and variable name
5639 prefixes changed from "i386_" to "x86_". All references updated.
5640
ed859da7
GB
56412014-09-02 Gary Benson <gbenson@redhat.com>
5642
5643 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5644 (x86_linux_new_thread): Likewise.
5645
860789c7
GB
56462014-08-29 Gary Benson <gbenson@redhat.com>
5647
5648 * server.h (setjmp.h): Do not include.
5649 (toplevel): Do not declare.
5650 (common-exceptions.h): Include.
5651 (cleanups.h): Likewise.
5652 * server.c (toplevel): Do not define.
5653 (exit_code): New static global.
5654 (detach_or_kill_for_exit_cleanup): New function.
5655 (main): New function. Original main renamed to...
5656 (captured_main): New function.
5657 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5658
ff55e1b5
GB
56592014-08-29 Gary Benson <gbenson@redhat.com>
5660
5661 * Makefile.in (SFILES): Add common/common-exceptions.c.
5662 (OBS): Add common-exceptions.o.
5663 (common-exceptions.o): New rule.
5664 * utils.c (prepare_to_throw_exception): New function.
5665
e9bcb658
GB
56662014-08-29 Gary Benson <gbenson@redhat.com>
5667
5668 * config.in: Regenerate.
5669 * configure: Likewise.
5670
e3180625
GB
56712014-08-29 Gary Benson <gbenson@redhat.com>
5672
5673 * Makefile.in (SFILES): Add common/cleanups.c.
5674 (OBS): cleanups.o.
5675 (cleanups.o): New rule.
5676
e3d6ba5d
GB
56772014-08-29 Gary Benson <gbenson@redhat.com>
5678
5679 * utils.c (internal_vwarning): New function.
5680
7096e886
GB
56812014-08-28 Gary Benson <gbenson@redhat.com>
5682
5683 * utils.h (fatal): Remove declaration.
5684 * utils.c (fatal): Remove function.
5685
14ce3192
GB
56862014-08-28 Gary Benson <gbenson@redhat.com>
5687
5688 * tracepoint.c (gdb_agent_init): Replace fatal with
5689 perror_with_name.
5690 (initialize_tracepoint): Likewise.
5691
50278d59
GB
56922014-08-28 Gary Benson <gbenson@redhat.com>
5693
5694 * remote-utils.c (remote_prepare): Replace fatal with error.
5695
aa96c426
GB
56962014-08-28 Gary Benson <gbenson@redhat.com>
5697
5698 * linux-low.c (linux_async): Replace fatal with warning.
5699 Tidy up and return.
5700 (linux_start_non_stop): Return -1 if linux_async failed.
5701
f7160e97
GB
57022014-08-28 Gary Benson <gbenson@redhat.com>
5703
5704 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5705 gdb_assert.
5706 (i386_dr_low_get_addr): Remove vague comment.
5707 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5708 gdb_assert.
5709
38e08fca
GB
57102014-08-28 Gary Benson <gbenson@redhat.com>
5711
5712 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5713 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5714 internal_error.
5715 (linux_resume_one_lwp): Likewise.
5716 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5717 gdb_assert.
5718 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5719 with internal_error.
5720 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5721 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5722 (find_register_by_name): Replace fatal with internal_error.
5723 (find_regno): Likewise.
5724 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5725 * thread-db.c (thread_db_create_event): Likewise.
5726 (thread_db_load_search): Likewise.
5727 (try_thread_db_load_1): Likewise.
5728 * tracepoint.c (get_jump_space_head): Replace fatal with
5729 internal_error.
5730 (claim_trampoline_space): Likewise.
5731 (have_fast_tracepoint_trampoline_buffer): Likewise.
5732 (cmd_qtstart): Likewise.
5733 (stop_tracing): Likewise.
5734 (fast_tracepoint_collecting): Likewise.
5735 (target_malloc): Likewise.
5736 (download_tracepoint): Likewise.
5737 (download_trace_state_variables): Replace check with gdb_assert.
5738 (upload_fast_traceframes): Replace fatal with internal_error.
5739
34abf635
GB
57402014-08-19 Tom Tromey <tromey@redhat.com>
5741 Gary Benson <gbenson@redhat.com>
5742
5743 * Makefile.in (SFILES): Add common/common-debug.c.
5744 (OBS): Add common-debug.o.
5745 (common-debug.o): New rule.
5746 * debug.h (debug_printf): Don't declare.
5747 * debug.c (debug_printf): Renamed and rewritten as...
5748 (debug_vprintf): New function.
5749
f6e94d78
GB
57502014-08-19 Gary Benson <gbenson@redhat.com>
5751
5752 * utils.h: Do not include print-utils.h.
5753
9239eeab
GB
57542014-08-19 Tom Tromey <tromey@redhat.com>
5755 Gary Benson <gbenson@redhat.com>
5756
5757 * server.h: Add static assertion.
5758 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5759
ef87c8bb
GB
57602014-08-19 Tom Tromey <tromey@redhat.com>
5761 Gary Benson <gbenson@redhat.com>
5762
5763 * Makefile.in (SFILES): Add common/errors.c.
5764 (OBS): Add errors.o.
5765 (IPA_OBS): Add errors-ipa.o.
5766 (errors.o): New rule.
5767 (errors-ipa.o): Likewise.
5768 * utils.h (perror_with_name, error, warning): Don't declare.
5769 * utils.c (warning): Renamed and rewritten as...
5770 (vwarning): New function.
5771 (error): Renamed and rewritten as...
5772 (verror): New function.
5773 (internal_error): Renamed and rewritten as...
5774 (internal_verror): New function.
5775
bb974a24
GB
57762014-08-07 Gary Benson <gbenson@redhat.com>
5777
5778 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5779 * configure: Regenerate.
5780 * config.in: Likewise.
5781 * server.h: Do not include errno.h.
5782 * event-loop.c: Likewise.
5783 * hostio-errno.c: Likewise.
5784 * linux-low.c: Likewise.
5785 * remote-utils.c: Likewise.
5786 * spu-low.c: Likewise.
5787 * utils.c: Likewise.
5788 * gdbreplay.c: Unconditionally include errno.h.
5789
6d3d12eb
GB
57902014-08-07 Gary Benson <gbenson@redhat.com>
5791
5792 * server.h: Do not include string.h.
5793 * event-loop.c: Likewise.
5794 * linux-low.c: Likewise.
5795 * regcache.c: Likewise.
5796 * remote-utils.c: Likewise.
5797 * spu-low.c: Likewise.
5798 * utils.c: Likewise.
5799
dccbb609
GB
58002014-08-07 Gary Benson <gbenson@redhat.com>
5801
5802 * server.h: Do not include gdb_assert.h.
5803
e76df0d0
GB
58042014-08-07 Gary Benson <gbenson@redhat.com>
5805
5806 * server.h: Do not include common-utils.h.
5807
4cb9c816
GB
58082014-08-07 Gary Benson <gbenson@redhat.com>
5809
5810 * server.h: Do not include ptid.h.
5811 * notif.h: Likewise.
5812
3995eeee
GB
58132014-08-07 Gary Benson <gbenson@redhat.com>
5814
5815 * server.h: Do not include gdb_locale.h.
5816
cb9f1a9b
GB
58172014-08-07 Gary Benson <gbenson@redhat.com>
5818
5819 * server.h: Do not include gdb/signals.h.
5820 * win32-low.c: Likewise.
5821
a5fceff8
GB
58222014-08-07 Gary Benson <gbenson@redhat.com>
5823
5824 * server.h: Do not include pathmax.h.
5825
b9391142
GB
58262014-08-07 Gary Benson <gbenson@redhat.com>
5827
5828 * server.h: Do not include libiberty.h.
5829 * linux-bfin-low.c: Likewise.
5830
0e443c87
GB
58312014-08-07 Gary Benson <gbenson@redhat.com>
5832
5833 * server.h: Do not include ansidecl.h.
5834
8ebb3f56
GB
58352014-08-07 Gary Benson <gbenson@redhat.com>
5836
5837 * linux-x86-low.c: Do not include stddef.h.
5838 * lynx-ppc-low.c: Likewise.
5839 * tracepoint.c: Likewise.
5840
8980bdf6
GB
58412014-08-07 Gary Benson <gbenson@redhat.com>
5842
5843 * server.h: Do not include stdarg.h.
5844 * nto-low.c: Likewise.
5845
d7096f71
GB
58462014-08-07 Gary Benson <gbenson@redhat.com>
5847
5848 * server.h: Do not include stdlib.h.
5849 * inferiors.c: Likewise.
5850 * linux-low.c: Likewise.
5851 * regcache.c: Likewise.
5852 * spu-low.c: Likewise.
5853 * tracepoint.c: Likewise.
5854 * utils.c: Likewise.
5855
d02f550d
GB
58562014-08-07 Gary Benson <gbenson@redhat.com>
5857
5858 * server.h: Do not include stdio.h.
5859 * linux-low.c: Likewise.
5860 * remote-utils.c: Likewise.
5861 * spu-low.c: Likewise.
5862 * utils.c: Likewise.
5863 * wincecompat.c: Likewise.
5864
87f6c4e3
GB
58652014-08-06 Gary Benson <gbenson@redhat.com>
5866
5867 * regcache.c (init_register_cache): Move conditionals inside if.
5868
7089dca4
GB
58692014-08-06 Gary Benson <gbenson@redhat.com>
5870
5871 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5872
462f517e
GB
58732014-07-31 Gary Benson <gbenson@redhat.com>
5874
5875 * ax.h: Do not include server.h.
5876 * gdbthread.h: Likewise.
5877 * lynx-low.h: Likewise.
5878 * notif.h: Likewise.
5879
976411d6
GB
58802014-07-30 Gary Benson <gbenson@redhat.com>
5881
5882 * server.h: Include common-defs.h.
5883 Do not include config.h or build-gnulib-gdbserver/config.h.
5884
d41f6d8e
GB
58852014-07-30 Gary Benson <gbenson@redhat.com>
5886
5887 * hostio-errno.c: Move server.h to top of includes list.
5888 * inferiors.c: Likewise.
5889 * linux-x86-low.c: Likewise.
5890 * notif.c: Include server.h.
5891
314c6a35
TT
58922014-07-24 Tom Tromey <tromey@redhat.com>
5893 Gary Benson <gbenson@redhat.com>
5894
5895 * server.h (CORE_ADDR): Now unsigned.
5896
69ff6be5
PA
58972014-07-16 Pedro Alves <palves@redhat.com>
5898
5899 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5900
ce9e3fe7
PA
59012014-07-15 Pedro Alves <palves@redhat.com>
5902
5903 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5904 copy.
5905
e76126e8
PA
59062014-07-11 Pedro Alves <palves@redhat.com>
5907
5908 * linux-low.c (kill_wait_lwp): New function, based on
5909 kill_one_lwp_callback, but use my_waitpid directly.
5910 (kill_one_lwp_callback, linux_kill): Use it.
5911
8e9db26e
PA
59122014-06-23 Pedro Alves <palves@redhat.com>
5913
5914 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5915 before setting DR0..DR3.
5916
698b3e08
GB
59172014-06-20 Gary Benson <gbenson@redhat.com>
5918
5919 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5920 * configure: Regenerated.
5921 * config.in: Likewise.
5922
125f8a3d
GB
59232014-06-20 Gary Benson <gbenson@redhat.com>
5924
5925 * Makefile.in (SFILES): Update locations for files moved
5926 from common to nat.
5927 (object file files): Reordered.
5928
42995dbd
GB
59292014-06-20 Gary Benson <gbenson@redhat.com>
5930
5931 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5932 (i386_dr_low_set_addr): Likewise.
5933 (i386_dr_low_get_addr): Likewise.
5934 (i386_dr_low_can_set_control): Likewise.
5935 (i386_dr_low_set_control): Likewise.
5936 (i386_dr_low_get_control): Likewise.
5937 (i386_dr_low_get_status): Likewise.
5938 (i386_get_debug_register_length): Likewise.
5939 * linux-x86-low.c (i386_dr_low_set_addr):
5940 Changed signature. Made static.
5941 (i386_dr_low_get_addr): Likewise.
5942 (i386_dr_low_set_control): Likewise.
5943 (i386_dr_low_get_control): Likewise.
5944 (i386_dr_low_get_status): Likewise.
5945 (i386_dr_low): New global variable.
5946 * win32-i386-low.c (i386_dr_low_set_addr):
5947 Changed signature. Made static.
5948 (i386_dr_low_get_addr): Likewise.
5949 (i386_dr_low_set_control): Likewise.
5950 (i386_dr_low_get_control): Likewise.
5951 (i386_dr_low_get_status): Likewise.
5952 (i386_dr_low): New global variable.
5953
e1d2394b
MS
59542014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5955
5956 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5957 * Makefile.in (AR, AR_FLAGS): Define.
5958 * configure: Regenerate.
5959
3a8ee006
GB
59602014-06-19 Gary Benson <gbenson@redhat.com>
5961
5962 * Makefile.in (i386-dregs.o): New rule.
5963 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5964 * i386-low.c (target.h): Remove include.
5965 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5966 (DR_CONTROL_SHIFT): Likewise.
5967 (DR_CONTROL_SIZE): Likewise.
5968 (DR_RW_EXECUTE): Likewise.
5969 (DR_RW_WRITE): Likewise.
5970 (DR_RW_READ): Likewise.
5971 (DR_RW_IORW): Likewise.
5972 (DR_LEN_1): Likewise.
5973 (DR_LEN_2): Likewise.
5974 (DR_LEN_4): Likewise.
5975 (DR_LEN_8): Likewise.
5976 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5977 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5978 (DR_ENABLE_SIZE): Likewise.
5979 (DR_LOCAL_SLOWDOWN): Likewise.
5980 (DR_GLOBAL_SLOWDOWN): Likewise.
5981 (DR_CONTROL_RESERVED): Likewise.
5982 (I386_DR_CONTROL_MASK): Likewise.
5983 (I386_DR_VACANT): Likewise.
5984 (I386_DR_LOCAL_ENABLE): Likewise.
5985 (I386_DR_GLOBAL_ENABLE): Likewise.
5986 (I386_DR_DISABLE): Likewise.
5987 (I386_DR_SET_RW_LEN): Likewise.
5988 (I386_DR_GET_RW_LEN): Likewise.
5989 (I386_DR_WATCH_HIT): Likewise.
5990 (i386_wp_op_t): Likewise.
5991 (i386_show_dr): Likewise.
5992 (i386_length_and_rw_bits): Likewise.
5993 (i386_insert_aligned_watchpoint): Likewise.
5994 (i386_remove_aligned_watchpoint): Likewise.
5995 (i386_handle_nonaligned_watchpoint): Likewise.
5996 i386_update_inferior_debug_regs(): Likewise.
5997 (i386_dr_insert_watchpoint): Likewise.
5998 (i386_dr_remove_watchpoint): Likewise.
5999 (i386_dr_region_ok_for_watchpoint): Likewise.
6000 (i386_dr_stopped_data_address): Likewise.
6001 (i386_dr_stopped_by_watchpoint): Likewise.
6002
8f26655c
GB
60032014-06-19 Gary Benson <gbenson@redhat.com>
6004
6005 * i386-low.c (i386_dr_show): Renamed to
6006 i386_show_dr and made static. All uses updated.
6007 (i386_dr_length_and_rw_bits): Renamed to
6008 i386_length_and_rw_bits and made static.
6009 All uses updated.
6010 (i386_dr_insert_aligned_watchpoint): Renamed to
6011 i386_insert_aligned_watchpoint and made static.
6012 All uses updated.
6013 (i386_dr_remove_aligned_watchpoint): Renamed to
6014 i386_remove_aligned_watchpoint and made static.
6015 All uses updated.
6016 (i386_dr_update_inferior_debug_regs): Renamed to
6017 i386_update_inferior_debug_regs and made static.
6018 All uses updated.
6019
b9228891
GB
60202014-06-18 Gary Benson <gbenson@redhat.com>
6021
5171def3
GB
6022 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6023 (i386_dr_low_can_set_control): Likewise.
6024 (i386_get_debug_register_length): Likewise.
6025 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6026 (i386_dr_low_can_set_control): Likewise.
6027 (i386_get_debug_register_length): Likewise.
6028
60292014-06-17 Gary Benson <gbenson@redhat.com>
6030
b9228891
GB
6031 * i386-low.h (i386-dregs.h): New include.
6032 (DR_FIRSTADDR): Now in i386-dregs.h.
6033 (DR_LASTADDR): Likewise.
6034 (DR_NADDR): Likewise.
6035 (DR_STATUS): Likewise.
6036 (DR_CONTROL): Likewise.
6037 (i386_debug_reg_state): Likewise.
6038 (i386_dr_insert_watchpoint): Likewise.
6039 (i386_dr_remove_watchpoint): Likewise.
6040 (i386_dr_region_ok_for_watchpoint): Likewise.
6041 (i386_dr_stopped_data_address): Likewise.
6042 (i386_dr_stopped_by_watchpoint): Likewise.
6043 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6044
4be83cc2
GB
60452014-06-18 Gary Benson <gbenson@redhat.com>
6046
6047 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6048 i386_dr_insert_watchpoint.
6049 (i386_low_remove_watchpoint): Renamed to
6050 i386_dr_remove_watchpoint.
6051 (i386_low_region_ok_for_watchpoint): Renamed to
6052 i386_dr_region_ok_for_watchpoint.
6053 (i386_low_stopped_data_address): Renamed to
6054 i386_dr_stopped_data_address.
6055 (i386_low_stopped_by_watchpoint): Renamed to
6056 i386_dr_stopped_by_watchpoint.
6057 * i386-low.c (i386_show_dr): Renamed to
6058 i386_dr_show and made nonstatic. All uses updated.
6059 (i386_length_and_rw_bits): Renamed to
6060 i386_dr_length_and_rw_bits and made nonstatic.
6061 All uses updated.
6062 (i386_insert_aligned_watchpoint): Renamed to
6063 i386_dr_insert_aligned_watchpoint and made nonstatic.
6064 All uses updated.
6065 (i386_remove_aligned_watchpoint): Renamed to
6066 i386_dr_remove_aligned_watchpoint and made nonstatic.
6067 All uses updated.
6068 (i386_update_inferior_debug_regs): Renamed to
6069 i386_dr_update_inferior_debug_regs and made nonstatic.
6070 All uses updated.
6071 (i386_low_insert_watchpoint): Renamed to
6072 i386_dr_insert_watchpoint. All uses updated.
6073 (i386_low_remove_watchpoint): Renamed to
6074 i386_dr_remove_watchpoint. All uses updated.
6075 (i386_low_region_ok_for_watchpoint): Renamed to
6076 i386_dr_region_ok_for_watchpoint. All uses updated.
6077 (i386_low_stopped_data_address): Renamed to
6078 i386_dr_stopped_data_address. All uses updated.
6079 (i386_low_stopped_by_watchpoint): Renamed to
6080 i386_dr_stopped_by_watchpoint. All uses updated.
6081
131aa0d4
GB
60822014-06-18 Gary Benson <gbenson@redhat.com>
6083
6084 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6085 (i386_dr_low_can_set_control): Likewise.
6086 (i386_insert_aligned_watchpoint): New check.
6087
d9305f7f
GB
60882014-06-18 Gary Benson <gbenson@redhat.com>
6089
6090 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6091 Renamed to state.
6092
e927c9fc
GB
60932014-06-18 Gary Benson <gbenson@redhat.com>
6094
6095 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6096 instead of fatal and error.
6097 (i386_handle_nonaligned_watchpoint): Likewise.
6098
1b6d4134
GB
60992014-06-18 Gary Benson <gbenson@redhat.com>
6100
6101 * i386-low.c (i386_get_debug_register_length): New macro.
6102 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6103 (i386_show_dr): Use debug_printf instead of fprintf. Use
6104 phex to format values.
6105
6e62758f
GB
61062014-06-18 Gary Benson <gbenson@redhat.com>
6107
6108 * i386-low.h: Comment changes.
6109 * i386-low.c: Likewise.
6110
fc6e2f03
GB
61112014-06-18 Gary Benson <gbenson@redhat.com>
6112
6113 * i386-low.c: Whitespace changes.
6114
f9d1eeed
TT
61152014-06-12 Tom Tromey <tromey@redhat.com>
6116
6117 * utils.c (freeargv): Remove.
6118
0b04e523
TT
61192014-06-12 Tom Tromey <tromey@redhat.com>
6120
6121 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6122 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6123 (parse_debug_format_options): Likewise.
6124 (gdbserver_usage): Likewise.
6125 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6126 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6127 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6128 against libiberty.
6129 ($(LIBGNU)): Depend on libiberty.
6130 (all-lib): Recurse into all subdirs.
6131 (install-only): Invoke "install" target in subdirs.
6132 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6133 targets.
6134 * configure: Rebuild.
6135 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6136 for vasprintf, vsnprintf, or gettimeofday.
6137 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6138 srv_tgtobj.
6139
270c9937
JB
61402014-06-05 Joel Brobecker <brobecker@adacore.com>
6141
6142 * development.sh: Delete.
6143 * Makefile.in (config.status): Adjust dependency on development.sh.
6144 * configure.ac: Adjust development.sh source call.
6145 * configure: Regenerate.
6146
0a261ed8
PA
61472014-06-02 Pedro Alves <palves@redhat.com>
6148
6149 * ax.c (gdb_free_agent_expr): New function.
6150 * ax.h (gdb_free_agent_expr): New declaration.
6151 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6152 list.
6153 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6154 static.
6155 (clear_breakpoint_conditions_and_commands): New function.
6156 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6157 (clear_breakpoint_conditions_and_commands): New declaration.
6158
e9dae05e
RR
61592014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6160
6161 * linux-aarch64-low.c (asm/ptrace.h): Include.
6162
5876f503
JK
61632014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6164
6165 Fix TLS access for -static -pthread.
6166 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6167 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6168 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6169
802e8e6d
PA
61702014-05-20 Pedro Alves <palves@redhat.com>
6171
6172 * linux-aarch64-low.c (aarch64_insert_point)
6173 (aarch64_remove_point): No longer check whether the type is
6174 supported here. Adjust to new interface.
6175 (the_low_target): Install aarch64_supports_z_point_type as
6176 supports_z_point_type method.
6177 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6178 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6179 instead of a Z packet char. Adjust.
6180 (arm_supports_z_point_type): New function.
6181 (arm_insert_point, arm_remove_point): Adjust to new interface.
6182 (the_low_target): Install arm_supports_z_point_type.
6183 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6184 (cris_insert_point, cris_remove_point): Adjust to new interface.
6185 Don't check whether the type is supported here.
6186 (the_low_target): Install cris_supports_z_point_type.
6187 * linux-low.c (linux_supports_z_point_type): New function.
6188 (linux_insert_point, linux_remove_point): Adjust to new interface.
6189 * linux-low.h (struct linux_target_ops) <insert_point,
6190 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6191 raw_breakpoint pointer parameter.
6192 <supports_z_point_type>: New method.
6193 * linux-mips-low.c (mips_supports_z_point_type): New function.
6194 (mips_insert_point, mips_remove_point): Adjust to new interface.
6195 Use mips_supports_z_point_type.
6196 (the_low_target): Install mips_supports_z_point_type.
6197 * linux-ppc-low.c (the_low_target): Install NULL as
6198 supports_z_point_type method.
6199 * linux-s390-low.c (the_low_target): Install NULL as
6200 supports_z_point_type method.
6201 * linux-sparc-low.c (the_low_target): Install NULL as
6202 supports_z_point_type method.
6203 * linux-x86-low.c (x86_supports_z_point_type): New function.
6204 (x86_insert_point): Adjust to new insert_point interface. Use
6205 insert_memory_breakpoint. Adjust to new
6206 i386_low_insert_watchpoint interface.
6207 (x86_remove_point): Adjust to remove_point interface. Use
6208 remove_memory_breakpoint. Adjust to new
6209 i386_low_remove_watchpoint interface.
6210 (the_low_target): Install x86_supports_z_point_type.
6211 * lynx-low.c (lynx_target_ops): Install NULL as
6212 supports_z_point_type callback.
6213 * nto-low.c (nto_supports_z_point_type): New.
6214 (nto_insert_point, nto_remove_point): Adjust to new interface.
6215 (nto_target_ops): Install nto_supports_z_point_type.
6216 * mem-break.c: Adjust intro comment.
6217 (struct raw_breakpoint) <raw_type, size>: New fields.
6218 <inserted>: Update comment.
6219 <shlib_disabled>: Delete field.
6220 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6221 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6222 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6223 (raw_bkpt_type_to_target_hw_bp_type): New function.
6224 (find_enabled_raw_code_breakpoint_at): New function.
6225 (find_raw_breakpoint_at): New type and size parameters. Use them.
6226 (insert_memory_breakpoint): New function, based off
6227 set_raw_breakpoint_at.
6228 (remove_memory_breakpoint): New function.
6229 (set_raw_breakpoint_at): Reimplement.
6230 (set_breakpoint): New, based on set_breakpoint_at.
6231 (set_breakpoint_at): Reimplement.
6232 (delete_raw_breakpoint): Go through the_target->remove_point
6233 instead of assuming memory breakpoints.
6234 (find_gdb_breakpoint_at): Delete.
6235 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6236 (find_gdb_breakpoint): New function.
6237 (set_gdb_breakpoint_at): Delete.
6238 (z_type_supported): New function.
6239 (set_gdb_breakpoint_1): New function, loosely based off
6240 set_gdb_breakpoint_at.
6241 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6242 (delete_gdb_breakpoint_at): Delete.
6243 (delete_gdb_breakpoint_1): New function, loosely based off
6244 delete_gdb_breakpoint_at.
6245 (delete_gdb_breakpoint): New function.
6246 (clear_gdb_breakpoint_conditions): Rename to ...
6247 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6248 breakpoint.
6249 (add_condition_to_breakpoint): Make static.
6250 (add_breakpoint_condition): Take a struct breakpoint pointer
6251 instead of an address. Adjust.
6252 (gdb_condition_true_at_breakpoint): Rename to ...
6253 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6254 z_type parameter.
6255 (gdb_condition_true_at_breakpoint): Reimplement.
6256 (add_breakpoint_commands): Take a struct breakpoint pointer
6257 instead of an address. Adjust.
6258 (gdb_no_commands_at_breakpoint): Rename to ...
6259 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6260 parameter. Return true if no breakpoint was found. Change debug
6261 output.
6262 (gdb_no_commands_at_breakpoint): Reimplement.
6263 (run_breakpoint_commands): Rename to ...
6264 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6265 and change return type to boolean.
6266 (run_breakpoint_commands): New function.
6267 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6268 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6269 breakpoint. Go through the_target->remove_point instead of
6270 assuming memory breakpoint.
6271 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6272 software and hardware breakpoints.
6273 (reinsert_raw_breakpoint): Go through the_target->insert_point
6274 instead of assuming memory breakpoint.
6275 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6276 software and hardware breakpoints.
6277 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6278 Check both software and hardware breakpoints.
6279 (validate_inserted_breakpoint): Assert the breakpoint is a
6280 software breakpoint. Set the inserted flag to -1 instead of
6281 setting shlib_disabled.
6282 (delete_disabled_breakpoints): Adjust.
6283 (validate_breakpoints): Only validate software breakpoints.
6284 Adjust to inserted flag change.
6285 (check_mem_read, check_mem_write): Skip breakpoint types other
6286 than software breakpoints. Adjust to inserted flag change.
6287 * mem-break.h (enum raw_bkpt_type): New enum.
6288 (raw_breakpoint, struct process_info): Forward declare.
6289 (Z_packet_to_target_hw_bp_type): Delete declaration.
6290 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6291 (set_gdb_breakpoint, delete_gdb_breakpoint)
6292 (clear_breakpoint_conditions): New declarations.
6293 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6294 (breakpoint_inserted_here): Update comment.
6295 (add_breakpoint_condition, add_breakpoint_commands): Replace
6296 address parameter with a breakpoint pointer parameter.
6297 (gdb_breakpoint_here): Update comment.
6298 (delete_gdb_breakpoint_at): Delete.
6299 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6300 * server.c (process_point_options): Take a struct breakpoint
6301 pointer instead of an address. Adjust.
6302 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6303 delete_gdb_breakpoint.
6304 * spu-low.c (spu_target_ops): Install NULL as
6305 supports_z_point_type method.
6306 * target.h: Include mem-break.h.
6307 (struct target_ops) <prepare_to_access_memory>: Update comment.
6308 <supports_z_point_type>: New field.
6309 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6310 instead of a char. Also take a raw breakpoint pointer.
6311 * win32-arm-low.c (the_low_target): Install NULL as
6312 supports_z_point_type.
6313 * win32-i386-low.c (i386_supports_z_point_type): New function.
6314 (i386_insert_point, i386_remove_point): Adjust to new interface.
6315 (the_low_target): Install i386_supports_z_point_type.
6316 * win32-low.c (win32_supports_z_point_type): New function.
6317 (win32_insert_point, win32_remove_point): Adjust to new interface.
6318 (win32_target_ops): Install win32_supports_z_point_type.
6319 * win32-low.h (struct win32_target_ops):
6320 <supports_z_point_type>: New method.
6321 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6322 instead of a char. Also take a raw breakpoint pointer.
6323
932539e3
PA
63242014-05-20 Pedro Alves <palves@redhat.com>
6325
6326 * mem-break.h: Include break-common.h.
6327 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6328 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6329 (Z_packet_to_target_hw_bp_type): New declaration.
6330 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6331 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6332 (Z_PACKET_ACCESS_WP): Delete macros.
6333 (Z_packet_to_hw_type): Delete function.
6334 * i386-low.h: Don't include break-common.h here.
6335 (Z_packet_to_hw_type): Delete declaration.
6336 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6337 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6338 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6339 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6340 * linux-aarch64-low.c: Don't include break-common.h here.
6341 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6342 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6343 (Z_packet_to_target_hw_bp_type): Delete function.
6344 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6345 function.
6346 (mips_insert_point, mips_remove_point): Use
6347 Z_packet_to_target_hw_bp_type.
6348
4ff0d3d8
PA
63492014-05-20 Pedro Alves <palves@redhat.com>
6350
6351 * linux-aarch64-low.c: Include break-common.h.
6352 (enum target_point_type): Delete.
6353 (Z_packet_to_point_type): Rename to ...
6354 (Z_packet_to_target_hw_bp_type): ... this, and return a
6355 target_hw_bp_type instead.
6356 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6357 instead of an enum target_point_type.
6358 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6359 breakpoint type.
6360 (aarch64_dr_state_insert_one_point)
6361 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6362 (aarch64_handle_aligned_watchpoint)
6363 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6364 Take an enum target_hw_bp_type instead of an enum
6365 target_point_type.
6366 (aarch64_supports_z_point_type): New function.
6367 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6368 use Z_packet_to_target_hw_bp_type.
6369
786dc519
JB
63702014-05-20 Joel Brobecker <brobecker@adacore.com>
6371
6372 * configure.ac: Only use -Werror by default when DEVELOPMENT
6373 is true.
6374 * configure: Regenerate.
6375
9e0aa64f
JK
63762014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6377
6378 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6379 * linux-x86-low.c (X86_64_USER_REGS): New.
6380 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6381
2b577b92
YQ
63822014-04-28 Yao Qi <yao@codesourcery.com>
6383
6384 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6385 name.
6386
94611da2
PA
63872014-04-25 Pedro Alves <palves@redhat.com>
6388
6389 PR server/16255
6390 * linux-low.c (linux_attach_fail_reason_string): New function.
6391 (linux_attach_lwp): Delete.
6392 (linux_attach_lwp_1): Rename to ...
6393 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6394 argument. Remove "initial" parameter. Return int instead of
6395 void. Don't error or warn here.
6396 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6397 failure to attach to the tgid. Call warning when failing to
6398 attach to an lwp.
6399 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6400 argument. Remove "initial" parameter. Return int instead of
6401 void. Don't error or warn here.
6402 (linux_attach_fail_reason_string): New declaration.
6403 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6404 interface change. Use linux_attach_fail_reason_string.
6405
01f9f808
MS
64062014-04-24 Michael Sturm <michael.sturm@mintel.com>
6407 Walfred Tedeschi <walfred.tedeschi@intel.com>
6408
6409 * Makefile.in: Added rules to handle new files
6410 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6411 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6412 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6413 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6414 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6415 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6416 x32-avx512-linux.o.
6417 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6418 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6419 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6420 i386/x32-avx512.xml.
6421 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6422 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6423 i386/x32-avx512-linux.xml.
6424 * i387-fp.c (num_avx512_k_registers): New constant for number
6425 of K registers.
6426 (num_avx512_zmmh_low_registers): New constant for number of
6427 lower ZMM registers (0-15).
6428 (num_avx512_zmmh_high_registers): New constant for number of
6429 higher ZMM registers (16-31).
6430 (num_avx512_ymmh_registers): New contant for number of higher
6431 YMM registers (ymm16-31 added by avx521 on x86_64).
6432 (num_avx512_xmm_registers): New constant for number of higher
6433 XMM registers (xmm16-31 added by AVX512 on x86_64).
6434 (struct i387_xsave): Add space for AVX512 registers.
6435 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6436 Add code to handle AVX512 registers.
6437 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6438 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6439 prototypei from generated file.
6440 (tdesc_amd64_avx512_linux): Likewise.
6441 (init_registers_x32_avx512_linux): Likewise.
6442 (tdesc_x32_avx512_linux): Likewise.
6443 (init_registers_i386_avx512_linux): Likewise.
6444 (tdesc_i386_avx512_linux): Likewise.
6445 (x86_64_regmap): Add AVX512 registers.
6446 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6447 mask.
6448 (initialize_low_arch): Add code to initialize AVX512 registers.
6449
51aa91f9
PA
64502014-04-23 Pedro Alves <palves@redhat.com>
6451
6452 * mem-break.c (find_gdb_breakpoint_at): Make static.
6453 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6454
a4165e94
PA
64552014-04-23 Pedro Alves <palves@redhat.com>
6456
6457 * i386-low.c: Don't include break-common.h here.
6458 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6459 prototype to take target_hw_bp_type as argument instead of a Z
6460 packet char.
6461 * i386-low.h: Include break-common.h here.
6462 (Z_packet_to_hw_type): Declare.
6463 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6464 prototypes.
6465 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6466 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6467 (x86_remove_point): Convert the packet number to a
6468 target_hw_bp_type before calling i386_low_remove_watchpoint.
6469 * win32-i386-low.c (i386_insert_point): Convert the packet number
6470 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6471 (i386_remove_point): Convert the packet number to a
6472 target_hw_bp_type before calling i386_low_remove_watchpoint.
6473
b8acf843
PA
64742014-04-23 Pedro Alves <palves@redhat.com>
6475
6476 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6477
d708bcd1
PA
64782014-04-10 Pedro Alves <palves@redhat.com>
6479
6480 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6481 Check if the condition or command is NULL before checking if the
6482 breakpoint is known. On success, return true.
6483 * mem-break.h (add_breakpoint_condition): Document return.
6484 (add_breakpoint_commands): Add describing comment.
6485 * server.c (skip_to_semicolon): New function.
6486 (process_point_options): Use it.
6487
2eec7d5b
PA
64882014-04-09 Pedro Alves <palves@redhat.com>
6489
6490 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6491 to lwpid_of.
6492
fa96cb38
PA
64932014-02-27 Pedro Alves <palves@redhat.com>
6494
6495 PR 12702
6496 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6497 macros.
6498 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6499 output.
6500 (last_thread_of_process_p): Take a PID argument instead of a
6501 thread pointer.
6502 (linux_wait_for_lwp): Delete.
6503 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6504 functions.
6505 (linux_low_filter_event): New function, party factored out from
6506 linux_wait_for_event.
6507 (linux_wait_for_event): Rename to ...
6508 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6509 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6510 sigsuspend. Check for zombie leaders.
6511 (linux_wait_for_event): Reimplement as wrapper around
6512 linux_wait_for_event_filtered.
6513 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6514 a normal or signal exit is seen, it's the whole process exiting.
6515 (wait_for_sigstop): No longer a for_each_inferior callback.
6516 Rewrite on top of linux_wait_for_event_filtered.
6517 (stop_all_lwps): Call wait_for_sigstop directly.
6518 * server.c (resume, handle_target_event): Handle
6519 TARGET_WAITKIND_NO_RESUMED.
6520
d763de10
JB
65212014-02-26 Joel Brobecker <brobecker@adacore.com>
6522
6523 * win32-low.c (psapi_get_dll_name,
6524 * win32_CreateToolhelp32Snapshot): Delete.
6525 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6526 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6527 Delete.
6528 (handle_load_dll): Add function description.
6529 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6530
850a0f76
JB
65312014-02-26 Joel Brobecker <brobecker@adacore.com>
6532
6533 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6534 Add comment.
6535 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6536 base address when calling win32_add_one_solib.
6537 (handle_load_dll): Delete local variable load_addr.
6538 Remove 0x1000 offset applied to DLL base address when calling
6539 win32_add_one_solib.
6540 (handle_unload_dll): Add comment.
6541
f25b3fc3
JB
65422014-02-26 Joel Brobecker <brobecker@adacore.com>
6543
6544 * win32-low.c (win32_add_all_dlls): Renames
6545 win32_ensure_ntdll_loaded. Rewrite function documentation.
6546 Adjust implementation to always load all DLLs.
6547 Add 0x1000 offset to DLL base address when calling
6548 win32_add_one_solib.
6549 (child_initialization_done): New static global.
6550 (do_initial_child_stuff): Set child_initialization_done to
6551 zero during child initialization, and 1 after. Replace call
6552 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6553 Add comment.
6554 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6555 (handle_unload_dll): Add function documentation.
6556 (get_child_debug_event): Ignore load and unload DLL events
6557 during child initialization.
6558
d86d4aaf
DE
65592014-02-20 Doug Evans <dje@google.com>
6560
3bc32da3 6561 Remove global all_lwps.
d86d4aaf
DE
6562 * inferiors.h (ptid_of): Move here from linux-low.h.
6563 (pid_of, lwpid_of): Ditto.
6564 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6565 parameter is a struct thread_info * now.
6566 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6567 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6568 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6569 directly.
6570 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6571 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6572 * linux-arm-low.c (update_registers_callback): Update, "entry"
6573 parameter is a struct thread_info * now.
6574 Fetch lwpid from current_inferior directly.
6575 (arm_insert_point): Pass &all_threads to find_inferior instead of
6576 &all_lwps.
6577 (arm_remove_point): Ditto.
6578 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6579 (arm_prepare_to_resume): Fetch pid from thread.
6580 (arm_read_description): Fetch lwpid from current_inferior directly.
6581 * linux-low.c (all_lwps): Delete.
6582 (delete_lwp): Delete call to remove_inferior.
6583 (handle_extended_wait): Fetch lwpid from thread.
6584 (add_lwp): Don't set lwp->entry.id. Remove call to
6585 add_inferior_to_list.
6586 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6587 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6588 (kill_one_lwp_callback): Ditto.
6589 (linux_kill): Don't dereference NULL pointer.
6590 Fetch ptid,lwpid from thread.
6591 (get_detach_signal): Fetch ptid from thread.
6592 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6593 Simplify call to regcache_invalidate_thread.
6594 (delete_lwp_callback): Update, "entry" parameter is a
6595 struct thread_info * now. Fetch pid from thread.
6596 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6597 (status_pending_p_callback): Update, "entry" parameter is a
6598 struct thread_info * now. Fetch ptid from thread.
6599 (find_lwp_pid): Update, "entry" parameter is a
6600 struct thread_info * now.
6601 (linux_wait_for_lwp): Fetch pid from thread.
6602 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6603 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6604 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6605 (dequeue_one_deferred_signal): Ditto.
6606 (cancel_breakpoint): Fetch ptid from current_inferior.
6607 (linux_wait_for_event): Pass &all_threads to find_inferior,
6608 not &all_lwps. Fetch ptid, lwpid from thread.
6609 (count_events_callback): Update, "entry" parameter is a
6610 struct thread_info * now.
6611 (select_singlestep_lwp_callback): Ditto.
6612 (select_event_lwp_callback): Ditto.
6613 (cancel_breakpoints_callback): Ditto.
6614 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6615 not &all_lwps.
6616 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6617 (unsuspend_one_lwp): Update, "entry" parameter is a
6618 struct thread_info * now.
6619 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6620 not &all_lwps.
6621 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6622 Fetch lwpid from thread, not lwp.
6623 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6624 Pass &all_threads to find_inferior, not &all_lwps.
6625 (send_sigstop): Fetch lwpid from thread, not lwp.
6626 (send_sigstop_callback): Update, "entry" parameter is a
6627 struct thread_info * now.
6628 (suspend_and_send_sigstop_callback): Ditto.
6629 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6630 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6631 struct thread_info * now.
6632 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6633 from thread, lwp.
6634 (lwp_running): Update, "entry" parameter is a
6635 struct thread_info * now.
6636 (stop_all_lwps): Fetch ptid from thread.
6637 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6638 (linux_resume_one_lwp): Fetch lwpid from thread.
6639 (linux_set_resume_request): Update, "entry" parameter is a
6640 struct thread_info * now. Fetch pid, lwpid from thread.
6641 (resume_status_pending_p): Update, "entry" parameter is a
6642 struct thread_info * now.
6643 (need_step_over_p): Ditto. Fetch lwpid from thread.
6644 (start_step_over): Fetch lwpid from thread.
6645 (linux_resume_one_thread): Update, "entry" parameter is a
6646 struct thread_info * now. Fetch lwpid from thread.
6647 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6648 (proceed_one_lwp): Update, "entry" parameter is a
6649 struct thread_info * now. Fetch lwpid from thread.
6650 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6651 struct thread_info * now.
6652 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6653 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6654 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6655 directly.
6656 (regsets_store_inferior_registers): Ditto.
6657 (fetch_register, store_register): Ditto.
6658 (linux_read_memory, linux_write_memory): Ditto.
6659 (linux_request_interrupt): Ditto.
6660 (linux_read_auxv): Ditto.
6661 (linux_xfer_siginfo): Ditto.
6662 (linux_qxfer_spu): Ditto.
6663 (linux_qxfer_libraries_svr4): Ditto.
6664 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6665 moved to inferiors.h.
6666 (get_lwp): Delete.
6667 (get_thread_lwp): Update.
6668 (struct lwp_info): Delete member "entry". Simplify comment for
6669 member "thread".
6670 (all_lwps): Delete.
6671 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6672 current_inferior directly.
6673 (update_watch_registers_callback): Update, "entry" parameter is a
6674 struct thread_info * now. Fetch pid from thread.
6675 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6676 (mips_insert_point): Fetch lwpid from current_inferior.
6677 Pass &all_threads to find_inferior, not &all_lwps.
6678 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6679 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6680 directly.
6681 (mips_stopped_data_address): Ditto.
6682 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6683 directly.
6684 * linux-tile-low.c (tile_arch_setup): Ditto.
6685 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6686 (update_debug_registers_callback): Update, "entry" parameter is a
6687 struct thread_info * now. Fetch pid from thread.
6688 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6689 Pass &all_threads to find_inferior, not &all_lwps.
6690 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6691 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6692 Pass &all_threads to find_inferior, not &all_lwps.
6693 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6694 (i386_dr_low_get_status): Ditto.
6695 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6696 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6697 (x86_linux_read_description): Ditto.
6698 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6699
3b8361aa
DE
67002014-02-20 Doug Evans <dje@google.com>
6701
6702 * inferiors.c (get_first_inferior): Fix buglet.
6703
f7667f0d
DE
67042014-02-19 Doug Evans <dje@google.com>
6705
6706 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6707 * inferiors.c (add_thread): Change result type to struct thread_info *.
6708 All callers updated.
6709 (add_lwp): Call add_thread here instead of in callers.
6710 All callers updated.
6711 * linux-low.h (get_lwp_thread): Rewrite.
6712 (struct lwp_info): New member "thread".
6713
b3312d80
DE
67142014-02-19 Doug Evans <dje@google.com>
6715
6716 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6717 All callers updated.
6718
ecc6f45c
DE
67192014-02-19 Doug Evans <dje@google.com>
6720
6721 * inferiors.c (add_thread): Fix whitespace.
6722
649ebbca
DE
67232014-02-19 Doug Evans <dje@google.com>
6724
6725 * dll.c (clear_dlls): Replace accessing list implemention details
6726 with API function.
6727 * gdbthread.h (get_first_thread): Declare.
6728 * inferiors.c (for_each_inferior_with_data): New function.
6729 (get_first_thread): New function.
6730 (find_thread_ptid): Simplify.
6731 (get_first_inferior): New function.
6732 (clear_list): Delete.
6733 (one_inferior_p): New function.
6734 (clear_inferior_list): New function.
6735 (clear_inferiors): Update.
6736 * inferiors.h (for_each_inferior_with_data): Declare.
6737 (clear_inferior_list): Declare.
6738 (one_inferior_p): Declare.
6739 (get_first_inferior): Declare.
6740 * linux-low.c (linux_wait_for_event): Replace accessing list
6741 implemention details with API function.
6742 * server.c (target_running): Ditto.
6743 (accumulate_file_name_length): New function.
6744 (emit_dll_description): New function.
6745 (handle_qxfer_libraries): Replace accessing list implemention
6746 details with API function.
6747 (handle_qxfer_threads_worker): New function.
6748 (handle_qxfer_threads_proper): Replace accessing list implemention
6749 details with API function.
6750 (handle_query): Ditto.
6751 (visit_actioned_threads_callback_ftype): New typedef.
6752 (visit_actioned_threads_data): New struct.
6753 (visit_actioned_threads): Rewrite to be find_inferior callback.
6754 (resume): Call find_inferior.
6755 (handle_status): Replace accessing list implemention
6756 details with API function.
6757 (process_serial_event): Replace accessing list implemention details
6758 with API function.
6759 * target.c (set_desired_inferior): Replace accessing list implemention
6760 details with API function.
6761 * tracepoint.c (same_process_p): New function.
6762 (gdb_agent_about_to_close): Replace accessing list implemention
6763 details with API function.
6764 * win32-low.c (child_delete_thread): Replace accessing list
6765 implemention details with API function.
6766 (match_dll_by_basename): New function.
6767 (dll_is_loaded_by_basename): New function.
6768 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6769 details call to dll_is_loaded_by_basename.
6770
80894984
DE
67712014-02-19 Doug Evans <dje@google.com>
6772
6773 * dll.h (struct dll_info): Add comment.
6774 * gdbthread.h (struct thread_info): Add comment.
6775 (current_ptid): Simplify.
6776 * inferiors.c (add_process): Update.
6777 (remove_process): Update.
6778 * inferiors.h (struct process_info): Rename member "head" to "entry".
6779 * linux-low.c (delete_lwp): Update.
6780 (add_lwp): Update.
6781 (last_thread_of_process_p): Update.
6782 (kill_one_lwp_callback, linux_kill): Update.
6783 (status_pending_p_callback): Update.
6784 (wait_for_sigstop): Update. Simplify read of ptid.
6785 (start_step_over): Update.
6786 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6787 (get_lwp_thread): Update.
6788 (struct lwp_info): Rename member "head" to "entry".
6789 * regcache.h (inferior_list_entry): Delete.
6790 * server.c (kill_inferior_callback): Update.
6791 (detach_or_kill_inferior_callback): Update.
6792 (print_started_pid): Update.
6793 (print_attached_pid): Update.
6794 (process_serial_event): Simplify read of ptid.
6795 * thread-db.c (thread_db_create_event): Update.
6796 (thread_db_get_tls_address): Update.
6797 * win32-low.c (current_inferior_ptid): Simplify.
6798
46917d26
TT
67992014-02-19 Tom Tromey <tromey@redhat.com>
6800
6801 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6802 argument.
6803 (target_supports_btrace): Update.
6804
0759a81e
YQ
68052014-02-14 Yao Qi <yao@codesourcery.com>
6806
6807 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6808 (rsp-low-ipa.o): New target.
6809
a7191e8b
TT
68102014-02-12 Tom Tromey <tromey@redhat.com>
6811
6812 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6813 convert_ascii_to_int.
6814 * regcache.c (registers_to_string): Likewise.
6815 * remote-utils.c (decode_M_packet): Likewise.
6816 * server.c (process_serial_event): Likewise.
6817
ff0e980e
TT
68182014-02-12 Tom Tromey <tromey@redhat.com>
6819
6820 * server.c (handle_query, handle_v_run): Use hex2bin, not
6821 unhexify.
6822 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6823
e9371aff
TT
68242014-02-12 Tom Tromey <tromey@redhat.com>
6825
6826 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6827 convert_int_to_ascii.
6828 * regcache.c (registers_to_string, collect_register_as_string):
6829 Likewise.
6830 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6831 Likewise.
6832 * server.c (process_serial_event): Likewise.
6833 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6834 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6835
971dc0b8
TT
68362014-02-12 Tom Tromey <tromey@redhat.com>
6837
6838 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6839 bin2hex, not hexify.
6840 * tracepoint.c (cmd_qtstatus): Likewise.
6841
0a822afb
TT
68422014-02-12 Tom Tromey <tromey@redhat.com>
6843
6844 * remote-utils.c (monitor_output): Pass explicit length to
6845 hexify.
6846
9c3d6531
TT
68472014-02-12 Tom Tromey <tromey@redhat.com>
6848
6849 * tracepoint.c: Include rsp-low.h.
6850 * server.c: Include rsp-low.h.
6851 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6852 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6853 declare.
6854 * remote-utils.c: Include rsp-low.h.
6855 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6856 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6857 (convert_int_to_ascii, convert_ascii_to_int): Move to
6858 common/rsp-low.c.
6859 * regcache.c: Include rsp-low.h.
6860 * ax.c: Include rsp-low.h.
6861 * Makefile.in (SFILES): Add common/rsp-low.c.
6862 (OBS): Add rsp-low.o.
6863 (rsp-low.o): New target.
6864
01fd3ea5
TT
68652014-02-12 Tom Tromey <tromey@redhat.com>
6866
6867 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6868 Include print-utils.h.
6869 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6870 (plongest, thirty_two, phex_nz): Remove.
6871 * Makefile.in (SFILES): Add common/print-utils.c.
6872 (OBS): Add print-utils.o.
6873 (print-utils-ipa.o): New target.
6874 (print-utils.o): New target.
6875 (IPA_OBJS): Add print-utils-ipa.o.
6876
e99dc820
TT
68772014-02-06 Tom Tromey <tromey@redhat.com>
6878
6879 * Makefile.in (SFILES): Fix indentation.
6880
ee1e2d4f
DE
68812014-02-05 Doug Evans <dje@google.com>
6882
6883 * linux-low.c (linux_wait_for_event): Improve comment.
6884 (linux_wait_1): Keep current_inferior in sync with event_child.
6885
f5a02773
DE
68862014-01-22 Doug Evans <dje@google.com>
6887
6888 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6889
87ce2a04
DE
68902014-01-22 Doug Evans <dje@google.com>
6891
6892 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6893 * configure: Regenerate.
6894 * config.in: Regenerate.
6895 * Makefile.in (SFILES): Add debug.c.
6896 (OBS): Add debug.o.
6897 * debug.c: New file.
6898 * debug.h: New file.
6899 * linux-aarch64-low.c (*): Update all debugging printfs to use
6900 debug_printf instead of fprintf.
6901 * linux-arm-low.c (*): Ditto.
6902 * linux-cris-low.c (*): Ditto.
6903 * linux-crisv32-low.c (*): Ditto.
6904 * linux-m32r-low.c (*): Ditto.
6905 * linux-sparc-low.c (*): Ditto.
6906 * linux-x86.c (*): Ditto.
6907 * linux-low.c (*): Ditto.
6908 (linux_wait_1): Add calls to debug_enter, debug_exit.
6909 (linux_wait): Remove redundant debugging printf.
6910 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6911 (linux_resume, unstop_all_lwps): Ditto.
6912 * mem-break.c (*): Update all debugging printfs to use
6913 debug_printf instead of fprintf.
6914 * remote-utils.c (*): Ditto.
6915 * thread-db.c (*): Ditto.
6916 * server.c #include <ctype.h>, "gdb_vecs.h".
6917 (debug_threads): Moved to debug.c.
6918 (*): Update all debugging printfs to use debug_printf instead of
6919 fprintf.
6920 (start_inferior): Replace call to fflush with call to debug_flush.
6921 (monitor_show_help): Mention set debug-format.
6922 (parse_debug_format_options): New function.
6923 (handle_monitor_command): Handle "monitor set debug-format".
6924 (gdbserver_usage): Mention --debug-format.
6925 (main): Parse --debug-format.
6926 * server.h (debug_threads): Declaration moved to debug.h.
6927 #include "debug.h".
6928 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6929 trace_debug_1 that uses debug_printf.
6930 (tracepoint_look_up_symbols): Update all debugging printfs to use
6931 debug_printf instead of fprintf.
6932
e671835b
BS
69332014-01-20 Baruch Siach <baruch@tkos.co.il>
6934
6935 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6936 sys/ptrace.h.
6937
b5737fa9
PA
69382014-01-17 Pedro Alves <palves@redhat.com>
6939
ea38d2a9 6940 PR build/16445
c7faa97a
PA
6941 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6942 defined after including gdb_proc_service.h.
b5737fa9 6943
40ed484e
DE
69442014-01-16 Doug Evans <dje@google.com>
6945
6946 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6947 (match_dll): Use it.
6948
969c39fb
MM
69492014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6950
6951 * target.h (target_ops) <read_btrace>: Change parameters and
6952 return type to allow error reporting.
6953 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6954 trace reading errors on.
6955 * linux-low.c (linux_low_read_btrace): Pass trace reading
6956 errors on.
6957 (linux_low_disable_btrace): New.
6958
ab7f45ba
DE
69592014-01-15 Doug Evans <dje@google.com>
6960
6961 * inferiors.c (thread_id_to_gdb_id): Delete.
6962 * inferiors.h (thread_id_to_gdb_id): Delete.
6963
66af0f44
EZ
69642014-01-13 Eli Zaretskii <eliz@gnu.org>
6965
6966 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6967 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6968 versions.
6969
9939e131
PA
69702014-01-08 Pedro Alves <palves@redhat.com>
6971
6972 * server.c (handle_status): Don't discard previous queued stop
6973 replies or thread's pending status here.
6974 (main) <disconnection>: Do it here instead.
6975
b7ea362b
PA
69762014-01-08 Pedro Alves <palves@redhat.com>
6977
6978 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6979 * server.c (visit_actioned_threads, handle_pending_status): New
6980 function.
6981 (handle_v_cont): Factor out parts to ...
6982 (resume): ... this new function. If in all-stop, and a thread
6983 being resumed has a pending status, report it without actually
6984 resuming.
6985 (myresume): Adjust to use the new 'resume' function.
6986 (clear_pending_status_callback, set_pending_status_callback)
6987 (find_status_pending_thread_callback): New functions.
6988 (handle_status): Handle the case of multiple threads having
6989 interesting statuses to report. Report threads' real last signal
6990 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6991 with an interesting thread to report the status for, instead of
6992 always reporting the status of the first thread.
6993
28498c42
JB
69942014-01-01 Joel Brobecker <brobecker@adacore.com>
6995
6996 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6997 * gdbreplay.c (gdbreplay_version): Likewise.
6998
f45c82da
YZ
69992013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7000
7001 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7002 iov.iov_len with the real length in use.
7003
379a5e2d
JB
70042013-12-13 Joel Brobecker <brobecker@adacore.com>
7005
7006 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7007 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7008 for all targets that use win32-low.c.
7009 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7010 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7011
4210d83e
PA
70122013-12-13 Pedro Alves <palves@redhat.com>
7013
7014 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7015 if equal to TARGET_WAITKIND_LOADED.
7016 * win32-low.c (cached_status): New static global.
7017 (win32_wait): Add declaration.
7018 (do_initial_child_stuff): Flush all initial pending debug events
7019 up to the initial breakpoint.
7020 (win32_wait): If CACHED_STATUS was set, return that instead
7021 of doing a real wait. Remove the code resuming the execution
7022 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7023 during the initial phase. Also remove the code changing
7024 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7025 TARGET_WAITKIND_STOPPED.
7026
e7f0d979
YQ
70272013-12-11 Yao Qi <yao@codesourcery.com>
7028
7029 * notif.c (handle_notif_ack): Return 0 if no notification
7030 matches.
7031
ebcf782c
DE
70322013-11-20 Doug Evans <dje@google.com>
7033
7034 * linux-low.c (linux_set_resume_request): Fix comment.
7035
20ad9378
DE
70362013-11-20 Doug Evans <dje@google.com>
7037
7038 * linux-low.c (resume_status_pending_p): Tweak comment.
7039
a196ebeb
WT
70402013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7041
7042 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7043 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7044 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7045 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7046 (srv_amd64_regobj): Add amd64-mpx.o.
7047 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7048 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7049 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7050 * i387-fp.c (num_pl_bnd_register) Added constant.
7051 (num_pl_bnd_cfg_registers) Added constant.
7052 (struct i387_xsave) Added reserved area and MPX fields.
7053 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7054 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7055 function.
7056 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7057 (init_registers_amd64_mpx_linux): Declare new function.
7058 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7059 (x86_64_regmap): Add MPX registers.
7060 (x86_linux_read_description): Add MPX case.
7061 (initialize_low_arch): Initialize MPX targets.
7062
0080a2f6
TT
70632013-11-18 Tom Tromey <tromey@redhat.com>
7064
7065 * configure: Rebuild.
7066 * configure.ac: Don't check for stdlib.h.
7067 * gdbreplay.c: Unconditionally include stdlib.h.
7068
2978b111
TT
70692013-11-18 Tom Tromey <tromey@redhat.com>
7070
7071 * config.in: Rebuild.
7072 * configure: Rebuild.
7073 * configure.ac: Don't use AC_HEADER_DIRENT.
7074
a3d08894
TT
70752013-11-18 Tom Tromey <tromey@redhat.com>
7076
7077 * server.h: Don't check HAVE_STRING_H.
7078 * gdbreplay.c: Don't check HAVE_STRING_H.
7079 * configure: Rebuild.
7080
0a5dd17d
TT
70812013-11-18 Tom Tromey <tromey@redhat.com>
7082
7083 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7084 LIBGNU.
7085
1bd2f0ba
TT
70862013-11-08 Tom Tromey <tromey@redhat.com>
7087
7088 * configure, config.in: Rebuild.
7089 * configure.ac: Remove unused configury.
7090
3266f10b
TT
70912013-11-08 Tom Tromey <tromey@redhat.com>
7092
7093 * acinclude.m4: Include common.m4, codeset.m4.
7094 * configure, config.in: Rebuild.
7095 * configure.ac: Use GDB_AC_COMMON.
7096
6682d959
AA
70972013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7098
7099 * linux-s390-low.c (HWCAP_S390_TE): New define.
7100 (s390_arch_setup): Consider the TE field in the HWCAP for
7101 determining 'have_regset_tdb'.
7102
fd0a4d76
SDJ
71032013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7104
7105 PR gdb/16014
7106 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7107 call to sizeof.
7108
1a3d890b
PA
71092013-10-02 Pedro Alves <palves@redhat.com>
7110
7111 * server.c (process_serial_event): Don't output "GDBserver
7112 exiting" if GDB is connected through stdio.
7113 * target.c (mywait): Likewise, be silent if GDB is connected
7114 through stdio.
7115
97ad4581
JB
71162013-10-01 Joel Brobecker <brobecker@adacore.com>
7117
7118 * lynx-low.c (lynx_add_threads_after_attach): New function.
7119 (lynx_attach): Remove call to add_thread. Add call to
7120 lynx_add_threads_after_attach instead.
7121
5b4e221c
MF
71222013-09-28 Mike Frysinger <vapier@gentoo.org>
7123
7124 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7125 * config.in, configure: Regenerated.
7126
ee47b2f8
YQ
71272013-09-18 Yao Qi <yao@codesourcery.com>
7128
7129 PR server/15959
7130 * server.c (start_inferior): Clear 'resume_info'.
7131
d6707650 71322013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7133
d6707650
JW
7134 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7135 for each register.
7136
9243dd0e 71372013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7138
9243dd0e
JW
7139 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7140 linux-tile-low.o to srv_tgtobj.
7141
c623a6ef
WN
71422013-09-16 Will Newton <will.newton@linaro.org>
7143
7144 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7145 out regs.
7146
fb71d39e
PA
71472013-09-06 Pedro Alves <palves@redhat.com>
7148
7149 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7150 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7151 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7152 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7153 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7154 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7155
8e7e9910
PA
71562013-09-06 Pedro Alves <palves@redhat.com>
7157
7158 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7159 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7160
7c3a12ca
PA
71612013-09-06 Pedro Alves <palves@redhat.com>
7162
7163 * linux-amd64-ipa.c: Include tracepoint.h.
7164 * linux-i386-ipa.c: Include tracepoint.h.
7165
8eb3d7b6
RW
71662013-09-06 Ricard Wanderlof <ricardw@axis.com>
7167
7168 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7169 (ps_get_thread_area): New function.
7170
eddddb9d
RW
71712013-09-06 Ricard Wanderlof <ricardw@axis.com>
7172
7173 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7174 (initialize_low_arch): Call init_registers_crisv32 rather than
7175 init_register_crisv32.
7176
533b0600
PA
71772013-09-05 Pedro Alves <palves@redhat.com>
7178
7179 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7180 to ...
7181 * hostio.h: ... this new file.
7182 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7183 win32-low.c: Include hostio.h.
7184
0ce3d3b5
PA
71852013-09-05 Pedro Alves <palves@redhat.com>
7186
7187 * server.h (gdb_client_data, handler_func, callback_handler_func)
7188 (delete_file_handler, add_file_handler, append_callback_event)
7189 (delete_callback_event, start_event_loop, initialize_event_loop):
7190 Move to event-loop.h and include it.
7191 * event-loop.h: New file.
7192
799cdc37
PA
71932013-09-05 Pedro Alves <palves@redhat.com>
7194
7195 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7196 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7197 (loaded_dll, unloaded_dll): Move to ...
7198 * dll.h: ... this new file.
7199 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7200
6a6bbd9d
PA
72012013-09-05 Pedro Alves <palves@redhat.com>
7202
7203 * server.h (current_process, get_thread_process, all_processes)
7204 (add_inferior_to_list, for_each_inferior, current_inferior)
7205 (remove_inferior, add_process, remove_process, find_process_pid)
7206 (have_started_inferiors_p, have_attached_inferiors_p)
7207 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7208 (clear_inferiors, find_inferior, find_inferior_id)
7209 (inferior_target_data, set_inferior_target_data)
7210 (inferior_regcache_data, set_inferior_regcache_data): Move to
7211 inferiors.h, and include it.
7212 * inferiors.h: New file.
7213
f699aaba
PA
72142013-09-05 Pedro Alves <palves@redhat.com>
7215
7216 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7217 Move ...
72f4393d 7218 * ax.h: ... here.
f699aaba 7219
c144c7a0
PA
72202013-09-05 Pedro Alves <palves@redhat.com>
7221
7222 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7223 tracepoint.h.
7224 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7225 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7226 (handle_tracepoint_general_set, handle_tracepoint_query)
7227 (tracepoint_finished_step, tracepoint_was_hit)
7228 (release_while_stepping_state_list, current_traceframe)
7229 (in_readonly_region, traceframe_read_mem)
7230 (fetch_traceframe_registers, traceframe_read_sdata)
7231 (traceframe_read_info, struct fast_tpoint_collect_status)
7232 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7233 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7234 (supply_fast_tracepoint_registers)
7235 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7236 (ipa_tdesc, claim_trampoline_space)
7237 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7238 (agent_mem_read, agent_get_trace_state_variable_value)
7239 (agent_set_trace_state_variable_value, agent_tsv_read)
7240 (agent_mem_read_string, get_raw_reg_func_addr)
7241 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7242 * tracepoint.h: ... this new file.
7243
ff42e6ab
PA
72442013-09-05 Pedro Alves <palves@redhat.com>
7245
7246 * server.h (perror_with_name, error, fatal, warning, paddress)
7247 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7248 include it.
7249 * utils.h: New file.
7250
541af0f4
PA
72512013-09-05 Pedro Alves <palves@redhat.com>
7252
7253 * server.h (remote_debug, noack_mode, transport_is_reliable)
7254 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7255 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7256 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7257 (write_enn, initialize_async_io, enable_async_io)
7258 (disable_async_io, check_remote_input_interrupt_request)
7259 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7260 (dead_thread_notify, prepare_resume_reply)
7261 (decode_address_to_semicolon, decode_address, decode_m_packet)
7262 (decode_M_packet, decode_X_packet, decode_xfer_write)
7263 (decode_search_memory_packet, unhexify, hexify)
7264 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7265 (look_up_one_symbol, relocate_instruction)
7266 (monitor_output): Move to remote-utils.h, and include it.
7267 * remote-utils.h: New file.
7268
eebdf26b
PA
72692013-09-05 Pedro Alves <palves@redhat.com>
7270
7271 * server.h (_): Delete.
7272
3aafd2ff
PA
72732013-09-02 Pedro Alves <palves@redhat.com>
7274
7275 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7276 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7277 allocated.
7278 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7279
cee83bcb
PM
72802013-09-02 Pierre Muller <muller@sourceware.org>
7281
7282 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7283 or WriteProcessMemory complete successfully and handle
7284 ERROR_PARTIAL_COPY error.
7285
9a13b2fa
PA
72862013-09-02 Pedro Alves <palves@redhat.com>
7287
7288 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7289 error instead of EIO.
7290
602e3198
JK
72912013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7292
7293 PR server/15604
7294 * linux-low.c: Include filestuff.h.
7295 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7296 * lynx-low.c: Include filestuff.h.
7297 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7298 * server.c: Include filestuff.h.
7299 (main): Call notice_open_fds.
7300 * spu-low.c: Include filestuff.h.
7301 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7302
96d7229d
LM
73032013-08-22 Luis Machado <lgustavo@codesourcery.com>
7304
7305 * Makefile.in: Explain why ../target and ../nat are not
7306 listed as include file search paths.
7307 (linux-waitpid.o): New object file rule.
7308 * configure.srv (srv_native_linux_obj): New variable.
7309 Replace all occurrences of linux native object files with
7310 $srv_native_linux_obj.
7311 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7312 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7313 (linux_enable_event_reporting): Remove declaration.
7314 (my_waitpid): Moved to common/linux-waitpid.c.
7315 (linux_wait_for_event): Pass ptid when calling
7316 linux_enable_event_reporting.
7317 (linux_supports_tracefork_flag): Remove.
7318 (linux_enable_event_reporting): Likewise.
7319 (linux_tracefork_grandchild): Remove.
7320 (STACK_SIZE): Moved to common/linux-ptrace.c.
7321 (linux_tracefork_child): Remove.
7322 (linux_test_for_tracefork): Remove.
7323 (linux_look_up_symbols): Call linux_supports_traceclone.
7324 (initialize_low): Remove call to linux_test_for_tracefork.
7325 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7326 common/linux-ptrace.h.
7327 (PTRACE_TYPE_ARG4): Likewise.
7328 Include linux-ptrace.h.
7329
32940073
PA
73302013-08-21 Pedro Alves <palves@redhat.com>
7331
7332 * config.in: Renegerate.
7333
33b60d58 73342013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7335
33b60d58
LM
7336 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7337 (SFILES): Remove $(srcdir)/common/target-common.c and
7338 add $(srcdir)/target/waitstatus.c.
7339 (OBS): Remove target-common.o and add waitstatus.o.
7340 (server_h): Remove $(srcdir)/../common/target-common.h and
7341 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7342 and $(srcdir)/../target/waitstatus.h.
7343 (target-common.o): Remove.
7344 (waitstatus.o): New target object file.
7345 * target.h: Do not include target-common.h and
7346 include target/resume.h, target/wait.h and
7347 target/waitstatus.h.
7348
b8e1b30e
LM
73492013-08-13 Luis Machado <lgustavo@codesourcery.com>
7350
7351 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7352 to PTRACE_TYPE_ARG3.
7353 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7354 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7355 PTRACE_TYPE_ARG4.
7356 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7357 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7358
7a60ad40
YQ
73592013-07-27 Jie Zhang <jie@codesourcery.com>
7360 Daniel Jacobowitz <dan@codesourcery.com>
7361 Yao Qi <yao@codesourcery.com>
7362
7363 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7364 (mips-linux-watch.o): New rule.
7365 (mips_linux_watch_h): New variable.
7366 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7367 srv_tgtobj.
7368 * linux-mips-low.c: Include mips-linux-watch.h.
7369 (struct arch_process_info, struct arch_lwp_info): New.
7370 (update_watch_registers_callback): New function.
7371 (mips_linux_new_process, mips_linux_new_thread) New functions.
7372 (mips_linux_prepare_to_resume, mips_insert_point): New
7373 functions.
7374 (mips_remove_point, mips_stopped_by_watchpoint): New
7375 functions.
7376 (rsp_bp_type_to_target_hw_bp_type): New function.
7377 (mips_stopped_data_address): New function.
7378 (the_low_target): Add watchpoint support functions.
7379
de6f69ad
YQ
73802013-07-27 Yao Qi <yao@codesourcery.com>
7381
7382 * i386-low.c: Include break-common.h.
7383 (enum target_hw_bp_type): Remove.
7384
3360c0bf
LM
73852013-07-24 Luis Machado <lgustavo@codesourcery.com>
7386
7387 * Makefile.in (SFILES): /common/target-common.c.
7388 (OBS): Add target-common.o.
7389 (server_h): Add $(srcdir)/../common/target-common.h.
7390 (target-common.o): New target.
7391 * server.c (queue_stop_reply_callback): Free
7392 status string after use.
7393 * target.c (target_waitstatus_to_string): Remove.
7394 * target.h: Include target-common.h.
7395 (resume_kind): Likewise.
7396 (target_waitkind): Likewise.
7397 (target_waitstatus): Likewise.
7398 (TARGET_WNOHANG): Likewise.
7399
bd885420
YQ
74002013-07-04 Yao Qi <yao@codesourcery.com>
7401
7402 * Makefile.in (host_alias): Use @host_noncanonical@.
7403 (target_alias): Use @target_noncanonical@.
7404 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7405 ACX_NONCANONICAL_HOST.
7406 * configure: Regenerated.
7407
7408 Revert:
7409 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7410
7411 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7412 * configure: Rebuild.
7413 * Makefile.in (version_host, version_target): Get from configure.
7414 (version.c): Use $(version_host) and $(version_target).
7415
17ef446e
PA
74162013-07-03 Pedro Alves <palves@redhat.com>
7417
7418 * Makefile.in (config.status): Depend on development.sh.
7419 * acinclude.m4: Include libmcheck.m4.
7420 * configure: Regenerate.
7421
7a9a7487
MG
74222013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7423
7424 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7425 attribute inside the parentheses.
7426 (winapi_DebugSetProcessKillOnExit): Ditto.
7427 (winapi_DebugBreakProcess): Ditto.
7428 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7429
49b64de6
MG
74302013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7431
7432 * notif.h (notif_event): Add a dummy member to avoid compiler
7433 errors.
7434
d5749ee7
PA
74352013-07-01 Pedro Alves <palves@redhat.com>
7436
7437 * hostio.c (HOSTIO_PATH_MAX): Define.
7438 (require_filename, handle_open, handle_unlink, handle_readlink):
7439 Use it.
7440
d8d2a3ee
PA
74412013-07-01 Pedro Alves <palves@redhat.com>
7442
7443 * server.h: Include "pathmax.h".
7444 * linux-low.c: Don't include sys/param.h.
7445 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7446 MAXPATHLEN.
7447 * win32-low.c: Don't include sys/param.h.
7448 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7449
bc7dea8d
PA
74502013-07-01 Pedro Alves <palves@redhat.com>
7451
7452 * event-loop.c: Don't check HAVE_UNISTD_H before including
7453 <unistd.h>.
7454 * gdbreplay.c: Likewise.
7455 * remote-utils.c: Likewise.
7456 * server.c: Likewise.
7457 * configure.ac: Don't check for unistd.h.
7458 * configure: Regenerate.
7459
d6c2da54
TT
74602013-06-28 Tom Tromey <tromey@redhat.com>
7461
7462 * Makefile.in (version.c): Use version.in, not
7463 common/version.in.
7464
257b6bec
MG
74652013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7466
7467 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7468 * configure: Rebuild.
7469 * Makefile.in (version_host, version_target): Get from configure.
7470 (version.c): Use $(version_host) and $(version_target).
7471
86ebe149
DK
74722013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7473
7474 Fix trace-status to output user name without trailing colon.
7475 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7476
f30aa5af
DK
74772013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7478
7479 Fix trace-status to output proper start-time and stop-time.
7480 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7481 output start time and stop time in hex as gdb expects.
7482
28a93511
YQ
74832013-06-26 Pedro Alves <pedro@codesourcery.com>
7484
7485 * tracepoint.c (build_traceframe_info_xml): Output trace state
7486 variables present in the trace buffer.
7487
01208463
TT
74882013-06-24 Tom Tromey <tromey@redhat.com>
7489
7490 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7491 create-version.sh.
7492 (version.o): Remove.
7493 * gdbreplay.c: Include version.h.
7494 (version, host_name): Don't declare.
7495 * server.h: Include version.h.
7496 (version, host_name): Don't declare.
7497
760256f9
PA
74982013-06-12 Pedro Alves <palves@redhat.com>
7499
7500 * linux-x86-low.c (linux_is_elf64): Delete global.
7501 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7502 with local linux_pid_exe_is_elf_64_file use.
7503
030031ee
PA
75042013-06-11 Pedro Alves <palves@redhat.com>
7505
7506 * linux-low.c (regset_disabled, disable_regset): New functions.
7507 (regsets_fetch_inferior_registers)
7508 (regsets_store_inferior_registers): Use them.
7509 (initialize_regsets_info); Don't allocate the disabled_regsets
7510 array here.
7511 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7512 comment.
7513
5da6eb0a
PA
75142013-06-11 Pedro Alves <palves@redhat.com>
7515
7516 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7517 xmalloc.
7518
7e5aaa09
PA
75192013-06-11 Pedro Alves <palves@redhat.com>
7520
7521 * linux-x86-low.c (initialize_low_arch): Call
7522 init_registers_x32_avx_linux.
7523
d878444c
JK
75242013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7525
7526 Fix compatibility with Android Bionic.
7527 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7528 it is not empty.
7529
3aee8918
PA
75302013-06-07 Pedro Alves <palves@redhat.com>
7531
5f2b57b5 7532 PR server/14823
3aee8918
PA
7533 * Makefile.in (OBS): Add tdesc.o.
7534 (IPA_OBJS): Add tdesc-ipa.o.
7535 (tdesc-ipa.o): New rule.
7536 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7537 interface.
7538 * linux-low.c (new_inferior): Delete.
7539 (disabled_regsets, num_regsets): Delete.
7540 (linux_add_process): Adjust to set the new per-process
7541 new_inferior flag.
7542 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7543 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7544 was a stop. When calling arch_setup, switch the current inferior
7545 to the thread that got an event.
7546 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7547 (regsets_fetch_inferior_registers)
7548 (regsets_store_inferior_registers): New regsets_info parameter.
7549 Adjust to use it.
7550 (linux_register_in_regsets): New regs_info parameter. Adjust to
7551 use it.
7552 (register_addr, fetch_register, store_register): New usrregs_info
7553 parameter. Adjust to use it.
7554 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7555 parameter regs_info. Adjust to use it.
7556 (linux_fetch_registers): Get the current inferior's regs_info, and
7557 adjust to use it.
7558 (linux_store_registers): Ditto.
7559 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7560 (initialize_low): Don't initialize the target_regsets here. Call
7561 initialize_low_arch.
7562 * linux-low.h (target_regsets): Delete declaration.
7563 (struct regsets_info): New.
7564 (struct usrregs_info): New.
7565 (struct regs_info): New.
7566 (struct process_info_private) <new_inferior>: New field.
7567 (struct linux_target_ops): Delete the num_regs, regmap, and
7568 regset_bitmap fields. New field regs_info.
7569 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7570 * i387-fp.c (num_xmm_registers): Delete.
7571 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7572 calls to new interface.
7573 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7574 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7575 Infer the number of xmm registers from the regcache's target
7576 description.
7577 * i387-fp.h (num_xmm_registers): Delete.
7578 * inferiors.c (add_thread): Don't install the thread's regcache
7579 here.
7580 * proc-service.c (gregset_info): Fetch the current inferior's
7581 regs_info. Adjust to use it.
7582 * regcache.c: Include tdesc.h.
7583 (register_bytes, reg_defs, num_registers)
7584 (gdbserver_expedite_regs): Delete.
7585 (get_thread_regcache): If the thread doesn't have a regcache yet,
7586 create one, instead of aborting gdbserver.
7587 (regcache_invalidate_one): Rename to ...
7588 (regcache_invalidate_thread): ... this.
7589 (regcache_invalidate_one): New.
7590 (regcache_invalidate): Only invalidate registers of the current
7591 process.
7592 (init_register_cache): Add target_desc parameter, and use it.
7593 (new_register_cache): Ditto. Assert the target description has a
7594 non zero registers_size.
7595 (regcache_cpy): Add assertions. Adjust.
7596 (realloc_register_cache, set_register_cache): Delete.
7597 (registers_to_string, registers_from_string): Adjust.
7598 (find_register_by_name, find_regno, find_register_by_number)
7599 (register_cache_size): Add target_desc parameter, and use it.
7600 (free_register_cache_thread, free_register_cache_thread_one)
7601 (regcache_release, register_cache_size): New.
7602 (register_size): Add target_desc parameter, and use it.
7603 (register_data, supply_register, supply_register_zeroed)
7604 (supply_regblock, supply_register_by_name, collect_register)
7605 (collect_register_as_string, collect_register_by_name): Adjust.
7606 * regcache.h (struct target_desc): Forward declare.
7607 (struct regcache) <tdesc>: New field.
7608 (init_register_cache, new_register_cache): Add target_desc
7609 parameter.
7610 (regcache_invalidate_thread): Declare.
7611 (regcache_invalidate_one): Delete declaration.
7612 (regcache_release): Declare.
7613 (find_register_by_number, register_cache_size, register_size)
7614 (find_regno): Add target_desc parameter.
7615 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7616 declarations.
7617 * remote-utils.c: Include tdesc.h.
7618 (outreg, prepare_resume_reply): Adjust.
7619 * server.c: Include tdesc.h.
7620 (gdbserver_xmltarget): Delete declaration.
7621 (get_features_xml, process_serial_event): Adjust.
7622 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7623 declare.
7624 (struct process_info) <tdesc>: New field.
7625 (ipa_tdesc): Declare.
7626 * tdesc.c: New file.
7627 * tdesc.h: New file.
7628 * tracepoint.c: Include tdesc.h.
7629 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7630 (get_context_regcache): Adjust to pass ipa_tdesc down.
7631 (do_action_at_tracepoint): Adjust to get the register cache size
7632 from the context regcache's description.
7633 (traceframe_walk_blocks): Adjust to get the register cache size
7634 from the current trace frame's description.
7635 (traceframe_get_pc): Adjust to get current trace frame's
7636 description and pass it down.
7637 (gdb_collect): Adjust to get the register cache size from the
7638 IPA's description.
7639 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7640 (gdbserver_xmltarget): Delete.
7641 (initialize_low_tracepoint): Set the ipa's target description.
7642 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7643 (initialize_low_tracepoint): Set the ipa's target description.
7644 * linux-x86-low.c: Include tdesc.h.
7645 [__x86_64__] (is_64bit_tdesc): New.
7646 (ps_get_thread_area, x86_get_thread_area): Use it.
7647 (i386_cannot_store_register): Rename to ...
7648 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7649 (i386_cannot_fetch_register): Rename to ...
7650 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7651 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7652 to new interface.
7653 (target_regsets): Rename to ...
7654 (x86_regsets): ... this.
7655 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7656 interface.
7657 (x86_siginfo_fixup): Use is_64bit_tdesc.
7658 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7659 (tdesc_x32_avx_linux, tdesc_x32_linux)
7660 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7661 Declare.
7662 (x86_linux_update_xmltarget): Delete.
7663 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7664 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7665 (AMD64_LINUX_USER64_CS): New.
7666 (x86_linux_read_description): New, based on
7667 x86_linux_update_xmltarget.
7668 (same_process_callback): New.
7669 (x86_arch_setup_process_callback): New.
7670 (x86_linux_update_xmltarget): New.
7671 (x86_regsets_info): New.
7672 (amd64_linux_regs_info): New.
7673 (i386_linux_usrregs_info): New.
7674 (i386_linux_regs_info): New.
7675 (x86_linux_regs_info): New.
7676 (x86_arch_setup): Reimplement.
7677 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7678 (x86_emit_ops): Ditto.
7679 (the_low_target): Adjust. Install x86_linux_regs_info,
7680 x86_cannot_fetch_register, and x86_cannot_store_register.
7681 (initialize_low_arch): New.
7682 * linux-ia64-low.c (tdesc_ia64): Declare.
7683 (ia64_fetch_register): Adjust.
7684 (ia64_usrregs_info, regs_info): New globals.
7685 (ia64_regs_info): New function.
7686 (the_low_target): Adjust.
7687 (initialize_low_arch): New function.
7688 * linux-sparc-low.c (tdesc_sparc64): Declare.
7689 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7690 Adjust.
7691 (sparc_arch_setup): New function.
7692 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7693 (the_low_target): Adjust.
7694 (initialize_low_arch): New function.
7695 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7696 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7697 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7698 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7699 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7700 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7701 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7702 (tdesc_powerpc_isa205_vsx64l): Declare.
7703 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7704 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7705 (ppc_set_pc, ppc_get_hwcap): Adjust.
7706 (ppc_usrregs_info): Forward declare.
7707 (!__powerpc64__) ppc_regmap_adjusted: New global.
7708 (ppc_arch_setup): Adjust to the current process'es target
7709 description.
7710 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7711 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7712 (ppc_store_evrregset): Adjust.
7713 (target_regsets): Rename to ...
7714 (ppc_regsets): ... this, and make static.
7715 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7716 (ppc_regs_info): New function.
7717 (the_low_target): Adjust.
7718 (initialize_low_arch): New function.
7719 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7720 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7721 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7722 (tdesc_s390x_linux64v2): Declare.
7723 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7724 (s390_fill_gregset, s390_store_last_break): Adjust.
7725 (target_regsets): Rename to ...
7726 (s390_regsets): ... this, and make static.
7727 (s390_get_pc, s390_set_pc): Adjust.
7728 (s390_get_hwcap): New target_desc parameter, and use it.
7729 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7730 (s390_arch_setup): Adjust to set the current process'es target
7731 description. Don't adjust the regmap.
7732 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7733 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7734 (regs_info_3264): New globals.
7735 (s390_regs_info): New function.
7736 (the_low_target): Adjust.
7737 (initialize_low_arch): New function.
7738 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7739 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7740 [__mips64] (init_registers_mips_linux)
7741 (init_registers_mips_dsp_linux): Delete defines.
7742 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7743 (have_dsp): New global.
7744 (mips_read_description): New, based on mips_arch_setup.
7745 (mips_arch_setup): Reimplement.
7746 (get_usrregs_info): New function.
7747 (mips_cannot_fetch_register, mips_cannot_store_register)
7748 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7749 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7750 (target_regsets): Rename to ...
7751 (mips_regsets): ... this, and make static.
7752 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7753 (dsp_regs_info, regs_info): New globals.
7754 (mips_regs_info): New function.
7755 (the_low_target): Adjust.
7756 (initialize_low_arch): New function.
7757 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7758 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7759 Declare.
7760 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7761 (arm_read_description): New, with bits factored from
7762 arm_arch_setup.
7763 (arm_arch_setup): Reimplement.
7764 (target_regsets): Rename to ...
7765 (arm_regsets): ... this, and make static.
7766 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7767 (arm_regs_info): New function.
7768 (the_low_target): Adjust.
7769 (initialize_low_arch): New function.
7770 * linux-m68k-low.c (tdesc_m68k): Declare.
7771 (target_regsets): Rename to ...
7772 (m68k_regsets): ... this, and make static.
7773 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7774 (m68k_regs_info): New function.
7775 (m68k_arch_setup): New function.
7776 (the_low_target): Adjust.
7777 (initialize_low_arch): New function.
7778 * linux-sh-low.c (tdesc_sharch): Declare.
7779 (target_regsets): Rename to ...
7780 (sh_regsets): ... this, and make static.
7781 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7782 (sh_regs_info, sh_arch_setup): New functions.
7783 (the_low_target): Adjust.
7784 (initialize_low_arch): New function.
7785 * linux-bfin-low.c (tdesc_bfin): Declare.
7786 (bfin_arch_setup): New function.
7787 (bfin_usrregs_info, regs_info): New globals.
7788 (bfin_regs_info): New function.
7789 (the_low_target): Adjust.
7790 (initialize_low_arch): New function.
7791 * linux-cris-low.c (tdesc_cris): Declare.
7792 (cris_arch_setup): New function.
7793 (cris_usrregs_info, regs_info): New globals.
7794 (cris_regs_info): New function.
7795 (the_low_target): Adjust.
7796 (initialize_low_arch): New function.
7797 * linux-cris-low.c (tdesc_crisv32): Declare.
7798 (cris_arch_setup): New function.
7799 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7800 (cris_regs_info): New function.
7801 (the_low_target): Adjust.
7802 (initialize_low_arch): New function.
7803 * linux-m32r-low.c (tdesc_m32r): Declare.
7804 (m32r_arch_setup): New function.
7805 (m32r_usrregs_info, regs_info): New globals.
7806 (m32r_regs_info): Adjust.
7807 (initialize_low_arch): New function.
7808 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7809 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7810 (tic6x_usrregs_info): Forward declare.
7811 (tic6x_read_description): New function, based on ...
7812 (tic6x_arch_setup): ... this. Reimplement.
7813 (target_regsets): Rename to ...
7814 (tic6x_regsets): ... this, and make static.
7815 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7816 (tic6x_regs_info): New function.
7817 (the_low_target): Adjust.
7818 (initialize_low_arch): New function.
7819 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7820 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7821 (target_regsets): Rename to ...
7822 (xtensa_regsets): ... this, and make static.
7823 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7824 globals.
7825 (xtensa_arch_setup, xtensa_regs_info): New functions.
7826 (the_low_target): Adjust.
7827 (initialize_low_arch): New function.
7828 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7829 (nios2_arch_setup): Set the current process'es tdesc.
7830 (target_regsets): Rename to ...
7831 (nios2_regsets): ... this.
7832 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7833 (nios2_regs_info): New function.
7834 (the_low_target): Adjust.
7835 (initialize_low_arch): New function.
a261b8f5
PA
7836 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7837 (aarch64_arch_setup): Set the current process'es tdesc.
7838 (target_regsets): Rename to ...
7839 (aarch64_regsets): ... this.
7840 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7841 (aarch64_regs_info): New function.
7842 (the_low_target): Adjust.
7843 (initialize_low_arch): New function.
3aee8918
PA
7844 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7845 globals.
7846 (target_regsets): Rename to ...
7847 (tile_regsets): ... this.
7848 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7849 (tile_regs_info): New function.
7850 (tile_arch_setup): Set the current process'es tdesc.
7851 (the_low_target): Adjust.
7852 (initialize_low_arch): New function.
7853 * spu-low.c (tdesc_spu): Declare.
7854 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7855 * win32-arm-low.c (tdesc_arm): Declare.
7856 (arm_arch_setup): New function.
7857 (the_low_target): Install arm_arch_setup instead of
7858 init_registers_arm.
7859 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7860 (init_windows_x86): Rename to ...
7861 (i386_arch_setup): ... this. Set `win32_tdesc'.
7862 (the_low_target): Adjust.
7863 * win32-low.c (win32_tdesc): New global.
7864 (child_add_thread): Don't create the thread cache here.
7865 (do_initial_child_stuff): Set the new process'es tdesc.
7866 * win32-low.h (struct target_desc): Forward declare.
7867 (win32_tdesc): Declare.
7868 * lynx-i386-low.c (tdesc_i386): Declare global.
7869 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7870 * lynx-low.c (lynx_tdesc): New global.
7871 (lynx_add_process): Set the new process'es tdesc.
7872 * lynx-low.h (struct target_desc): Forward declare.
7873 (lynx_tdesc): Declare global.
7874 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7875 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7876 * nto-low.c (nto_tdesc): New global.
7877 (do_attach): Set the new process'es tdesc.
7878 * nto-low.h (struct target_desc): Forward declare.
7879 (nto_tdesc): Declare.
7880 * nto-x86-low.c (tdesc_i386): Declare.
7881 (nto_x86_arch_setup): Set `nto_tdesc'.
7882
b1fbec62
GB
78832013-06-04 Gary Benson <gbenson@redhat.com>
7884
7885 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7886 to qSupported response when appropriate.
7887 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7888 with nonzero-length annex.
7889 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7890 arguments supplied in annex.
7891
d1ec4ce7
DE
78922013-05-31 Doug Evans <dje@google.com>
7893
ac44adcb 7894 PR server/15594
d1ec4ce7
DE
7895 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7896 64 bits in 64-cross-32 environment.
7897
9b25f2d3
PA
78982013-05-28 Pedro Alves <palves@redhat.com>
7899
7900 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7901 (aarch64-without-fpu.c): Delete rule.
7902 * configure.srv (aarch64*-*-linux*): Remove references to
7903 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7904 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7905 declaration.
7906
6740dc9c
PA
79072013-05-24 Pedro Alves <palves@redhat.com>
7908
7909 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7910 instead of strchr/decode_address. Error if the range isn't split
7911 with a ','. Don't assume there's be a ':' in the action.
7912
c2d6af84
PA
79132013-05-23 Yao Qi <yao@codesourcery.com>
7914 Pedro Alves <palves@redhat.com>
7915
7916 * linux-low.c (lwp_in_step_range): New function.
7917 (linux_wait_1): If the thread was range stepping and stopped
7918 outside the stepping range, report the stop to GDB. Otherwise,
7919 continue stepping. Add range stepping debug output.
7920 (linux_set_resume_request): Copy the step range from the resume
7921 request to the lwp.
7922 (linux_supports_range_stepping): New.
7923 (linux_target_ops) <supports_range_stepping>: Set to
7924 linux_supports_range_stepping.
7925 * linux-low.h (struct linux_target_ops)
7926 <supports_range_stepping>: New field.
7927 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7928 * linux-x86-low.c (x86_supports_range_stepping): New.
7929 (the_low_target) <supports_range_stepping>: Set to
7930 x86_supports_range_stepping.
7931 * server.c (handle_v_cont): Handle 'r' action.
7932 (handle_v_requests): Append ";r" if the target supports range
7933 stepping.
7934 * target.h (struct thread_resume) <step_range_start,
7935 step_range_end>: New fields.
7936 (struct target_ops) <supports_range_stepping>:
7937 New field.
7938 (target_supports_range_stepping): New macro.
7939
58794e1a
JB
79402013-05-17 Joel Brobecker <brobecker@adacore.com>
7941
7942 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7943 confusion in comment.
7944
d631c5a7
JB
79452013-05-17 Joel Brobecker <brobecker@adacore.com>
7946
7947 * lynx-low.c (struct process_info_private): New type.
7948 (lynx_add_process): New function.
7949 (lynx_create_inferior, lynx_attach): Replace calls to
7950 add_process by calls to lynx_add_process.
7951 (lynx_resume): If PTID is null, then try using
7952 current_process()->private->last_wait_event_ptid.
7953 Add comments.
7954 (lynx_clear_inferiors): Delete. The contents of that function
7955 has been inlined in lynx_mourn;
7956 (lynx_wait_1): Save the ptid in the process's private data.
7957 (lynx_mourn): Free the process' private data. Replace call
7958 to lynx_clear_inferiors by call to clear_inferiors.
7959
96f7a20f
YQ
79602013-05-17 Yao Qi <yao@codesourcery.com>
7961
7962 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7963 the right place.
7964
db0dfaa0
LM
79652013-05-16 Luis Machado <lgustavo@codesourcery.com>
7966
7967 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7968 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7969 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7970 PT_TEXT_END_ADDR guards. Update comments.
7971 (linux_target_op) <read_offsets>: Conditionally define to
7972 linux_read_offsets if the target is UCLIBC and if it defines
7973 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7974
68f5f838
SL
79752013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7976 Andrew Jenner <andrew@codesourcery.com>
7977
7978 * Makefile.in (SFILES): Add linux-nios2-low.c.
7979 (clean): Add action to delete nios2-linux.c.
7980 (nios2-linux.c): New rule.
7981 * configure.srv: Add nios2*-*-linux*.
7982 * linux-nios2-low.c: New.
7983
1ebff1fd
HAQ
79842013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7985
7986 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7987
f6150862
HZ
79882013-04-25 Hui Zhu <hui@codesourcery.com>
7989
7990 PR gdb/15186
f6150862
HZ
7991 * ax.c (ax_printf): Add fflush.
7992
614c279d
TT
79932013-04-22 Tom Tromey <tromey@redhat.com>
7994
7995 * Makefile.in (SFILES): Add filestuff.c.
7996 (OBS): Add filestuff.o.
7997 (filestuff.o): New target.
7998 * config.in, configure: Rebuild.
7999 * configure.ac: Check for fdwalk, pipe2.
8000
7d4e5717
PA
80012013-04-17 Pedro Alves <palves@redhat.com>
8002
8003 * configure.ac (USE_THREAD_DB): Delete variable.
8004 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8005 Don't AC_SUBST USE_THREAD_DB.
8006 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8007 * config.in, configure: Regenerate.
8008
d5c93e41
PA
80092013-04-16 Pedro Alves <palves@redhat.com>
8010
8011 * linux-low.h (struct lwp_info) <thread_known>: Move under
8012 the USE_THREAD_DB #ifdef.
8013
04f5fe89
PA
80142013-04-16 Pedro Alves <palves@redhat.com>
8015
8016 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8017 (linux-low.o): Delete rule.
8018 * linux-low.h: Always include "gdb_thread_db.h" instead of
8019 conditionally including thread_db.h.
8020 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8021 HAVE_THREAD_DB_H.
8022
480b27bf
JK
80232013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8024
8025 * Makefile.in (install-only): Fix make install regression.
8026
43662968
JK
80272013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8028
8029 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8030 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8031 installation.
8032 * gdbserver.1: Remove.
8033
3e74e146
PA
80342013-03-22 Pedro Alves <palves@redhat.com>
8035
8036 * linux-low.c (handle_extended_wait): Don't call
8037 linux_enable_event_reporting.
8038
a8347a2a
TT
80392013-03-15 Tony Theodore <tonyt@logyst.com>
8040
8041 PR build/9098:
8042 * Makefile.in (SHELL): Use @SHELL@.
8043
eeb56fa7
SDJ
80442013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8045
8046 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8047 compiler warning.
8048
4fa7e2ff
JB
80492013-03-13 Joel Brobecker <brobecker@adacore.com>
8050
8051 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8052 Remove extraneous NULL element.
8053
8ddb1965
YQ
80542013-03-13 Yao Qi <yao@codesourcery.com>
8055
8056 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8057 'V' block in trace frame.
8058
9accd112
MM
80592013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8060
8061 * target.h (struct target_ops): Add btrace ops.
8062 (target_supports_btrace): New macro.
8063 (target_enable_btrace): New macro.
8064 (target_disable_btrace): New macro.
8065 (target_read_btrace): New macro.
8066 * gdbthread.h (struct thread_info): Add btrace field.
8067 * server.c: Include btrace-common.h.
8068 (handle_btrace_general_set): New function.
8069 (handle_btrace_enable): New function.
8070 (handle_btrace_disable): New function.
8071 (handle_general_set): Call handle_btrace_general_set.
8072 (handle_qxfer_btrace): New function.
8073 (struct qxfer qxfer_packets[]): Add btrace entry.
8074 * inferiors.c (remove_thread): Disable btrace.
8075 * linux-low: Include linux-btrace.h.
8076 (linux_low_enable_btrace): New function.
8077 (linux_low_read_btrace): New function.
8078 (linux_target_ops): Add btrace ops.
8079 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8080 Add srv_linux_btrace=yes.
8081 (x86_64-*-linux*): Add linux-btrace.o.
8082 Add srv_linux_btrace=yes.
8083 * configure.ac: Define HAVE_LINUX_BTRACE.
8084 * config.in: Regenerated.
8085 * configure: Regenerated.
8086
5cc22e4c
MM
80872013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8088
8089 * server.c (handle_qxfer): Preserve error message if -3 is
8090 returned.
8091 (qxfer): Document the -3 return value.
8092
7c97f91e
MM
80932013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8094
8095 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8096 (linux_btrace_h): New variable.
8097 (linux-btrace.o): New rule.
8098
be9a119c 80992013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8100 Hafiz Abid Qadeer <abidh@codesourcery.com>
8101
8102 * tracepoint.c (trace_buffer_size): New global.
8103 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8104 (init_trace_buffer): Change to one-argument function. Allocate
8105 trace buffer memory.
8106 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8107 handle QTBuffer:size packet.
8108 (cmd_bigqtbuffer_size): New function.
8109 (initialize_tracepoint): Call init_trace_buffer with
8110 DEFAULT_TRACE_BUFFER_SIZE.
8111 * server.c (handle_query): Add QTBuffer:size in the
8112 supported packets.
8113
e64f7499
YQ
81142013-03-07 Yao Qi <yao@codesourcery.com>
8115
8116 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8117 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8118 of -1.
8119 (cmd_qtsp): Adjust condition. Do post increment.
8120 Set cur_action and cur_step_action back to 0.
8121
f0ae6fc3
PA
81222013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8123
8124 PR server/15236
8125 * linux-low.c (linux_write_memory): Return early success if LEN is
8126 zero.
8127
b5b0b0af
CV
81282013-03-05 Corinna Vinschen <vinschen@redhat.de>
8129
334ad4a8 8130 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8131
589bc927
TT
81322013-02-28 Tom Tromey <tromey@redhat.com>
8133
8134 * configure.ac: Invoke AC_SYS_LARGEFILE.
8135 * configure, config.in: Rebuild.
8136
dfe07582
CV
81372013-02-28 Corinna Vinschen <vinschen@redhat.com>
8138
8139 * win32-low.c: Throughout, fix format strings and casts of
8140 printf-like functions to avoid type related warnings on all
8141 platforms.
8142 (get_child_debug_event): Print dwDebugEventCode as hex since
8143 that's how it's usually documented.
8144
736cd585
YQ
81452013-02-28 Yao Qi <yao@codesourcery.com>
8146
8147 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8148 pulongest.
8149
e1f58301
JW
81502013-02-27 Jiong Wang <jiwang@tilera.com>
8151
8152 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8153 (reg-tilegx32.c): New rule.
8154 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8155 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8156 different register info initializer according to elf class.
8157 (init_registers_tilgx32): New function. The tilegx32 register info
8158 initializer.
8159 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8160 (tile_store_gregset): Likewise.
8161
d171ca78
YQ
81622013-02-27 Yao Qi <yao@codesourcery.com>
8163
8164 * server.c (process_point_options): Print debug message when
8165 debug_threads is true.
8166
282bbdf3
YQ
81672013-02-26 Yao Qi <yao@codesourcery.com>
8168
8169 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8170
aca22551
PA
81712013-02-19 Pedro Alves <palves@redhat.com>
8172 Kai Tietz <ktietz@redhat.com>
8173
8174 PR gdb/15161
8175
8176 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8177 instead of strtoul to extract address from packet.
8178 (process_serial_event) <'z'>: Likewise.
8179
4f3cee1c
YQ
81802013-02-18 Yao Qi <yao@codesourcery.com>
8181
8182 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8183
8e1d55a3
PA
81842013-02-14 Pedro Alves <palves@redhat.com>
8185
8186 Plug memory leak.
8187
8188 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8189 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8190
458820da
PA
81912013-02-14 Pedro Alves <palves@redhat.com>
8192
8193 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8194
baea0dae
PA
81952013-02-14 Pedro Alves <palves@redhat.com>
8196
8197 * tracepoint.c (save_string): Delete.
8198 (add_tracepoint_action): Use savestring instead of save_string.
8199
0b1afbb3
PA
82002013-02-12 Pedro Alves <palves@redhat.com>
8201
8202 * linux-xtensa-low.c: Ditto.
8203 * xtensa-xtregs.c: Ditto.
8204
8a4ac37e
PA
82052013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8206
8207 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8208 thread_db.
8209
148de6bb
MS
82102013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8211
8212 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8213 aarch64_num_wp_regs and aarch64_num_bp_regs to
8214 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8215
55fac6e0
MS
82162013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8217
8218 * linux-aarch64-low.c (ps_get_thread_area): Replace
8219 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8220
176eb98c
MS
82212013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8222 Marcus Shawcroft <marcus.shawcroft@arm.com>
8223 Nigel Stephens <nigel.stephens@arm.com>
8224 Yufeng Zhang <yufeng.zhang@arm.com>
8225
8226 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8227 (aarch64.c, aarch64-without-fpu.c): New targets.
8228 * configure.srv (aarch64*-*-linux*): New.
8229 * linux-aarch64-low.c: New file.
8230
56f7af9c
MS
82312013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8232
43aaf8b6 8233 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8234 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8235 (dequeue_one_deferred_signal, linux_resume_one_thread)
8236 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8237 (linux_tracefork_grandchild, linux_test_for_tracefork)
8238 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8239 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8240 where the argument is 0.
8241
60f662b0
YQ
82422013-01-25 Yao Qi <yao@codesourcery.com>
8243
8244 * event-loop.c: Include "queue.h".
8245 (gdb_event_p): New typedef.
8246 (struct gdb_event) <next_event>: Remove.
8247 (event_queue): Change to QUEUE(gdb_event_p).
8248 (async_queue_event): Remove.
8249 (gdb_event_xfree): New.
8250 (initialize_event_loop): New.
8251 (process_event): Use API from QUEUE.
8252 (wait_for_event): Likewise.
8253 * server.c (main): Call initialize_event_loop.
8254 * server.h (initialize_event_loop): Declare.
8255
5ae4861a
YQ
82562013-01-18 Yao Qi <yao@codesourcery.com>
8257
8258 * ax.h (struct eval_agent_expr_context): New.
8259 (gdb_eval_agent_expr): Update declaration.
8260 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8261 TFRAME. Add new argument CTX.
8262 * server.h (struct eval_agent_expr_context): Declare.
8263 (agent_mem_read, agent_tsv_read): Update declaration.
8264 (agent_mem_read_string): Likewise.
8265 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8266 (add_traceframe_block): Add new argument TPOINT.
8267 Increase TPOINT->traceframe_usage.
8268 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8269 eval_tracepoint_agent_expr.
8270 (condition_true_at_tracepoint): Likewise.
8271 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8272 (agent_mem_read_string, agent_tsv_read): Likewise.
8273
85e00e85
YQ
82742013-01-16 Yao Qi <yao@codesourcery.com>
8275
8276 * linux-low.c (linux_resume_one_lwp): Don't check
8277 'lwp->bp_reinsert != 0'.
8278
4039cf45
JB
82792013-01-07 Joel Brobecker <brobecker@adacore.com>
8280 Pedro Alves <palves@redhat.com>
8281
8282 * lynx-low.c (ptrace_request_to_str): Define a temporary
8283 macro and use it to simplify this function's implementation.
8284
9044dee2
JB
82852013-01-07 Joel Brobecker <brobecker@adacore.com>
8286
8287 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8288 sets errno.
8289
e6352c8f
JB
82902013-01-07 Joel Brobecker <brobecker@adacore.com>
8291
8292 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8293
50681a27
JB
82942013-01-07 Joel Brobecker <brobecker@adacore.com>
8295
8296 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8297
3f6e77ef
JB
82982013-01-07 Joel Brobecker <brobecker@adacore.com>
8299
8300 * lynx-low.c (lynx_resume): Use the resume_info parameter
8301 to determine the ptid for the lynx_ptrace call, unless
8302 it is equal to minus_one_ptid, in which case we use the
8303 ptid of the current_inferior.
8304 (lynx_wait_1): After having received a thread create/exit
8305 event, resume the inferior's execution using the signaling
8306 thread's ptid, rather than the old ptid.
8307
7fda33ae
JB
83082013-01-07 Joel Brobecker <brobecker@adacore.com>
8309
8310 * lynx-low.c (lynx_resume): Delete variable ret.
8311
b9786c74
JB
83122013-01-01 Joel Brobecker <brobecker@adacore.com>
8313
8314 * gdbreplay.c (gdbreplay_version): Update copyright year.
8315 * server.c (gdbserver_version): Likewise.
8316
8b93d60f
JB
83172012-12-17 Joel Brobecker <brobecker@adacore.com>
8318
8319 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8320 new thread.
8321
037335a7
JB
83222012-12-17 Joel Brobecker <brobecker@adacore.com>
8323
8324 * lynx-low.c (ptrace_request_to_str): Add handling for
8325 PTRACE_GETTRACESIG.
8326
52d4cbd8
JB
83272012-12-17 Joel Brobecker <brobecker@adacore.com>
8328
8329 * lynx-low.c (lynx_attach): Delete variable new_process.
8330
ab8f6ca9
JB
83312012-12-17 Joel Brobecker <brobecker@adacore.com>
8332
8333 * lynx-low.c (lynx_create_inferior): Delete variable
8334 new_process.
8335
78cbc024
JB
83362012-12-17 Joel Brobecker <brobecker@adacore.com>
8337
8338 * lynx-low.c (ptrace_request_to_str): Do not handle
8339 PTRACE_GETTHREADLIST if this macro does not exist.
8340
14a00470
YQ
83412012-12-15 Yao Qi <yao@codesourcery.com>
8342
8343 * Makefile.in (OBS): Add notif.o.
8344 * notif.c, notif.h: New.
8345 * server.c: Include "notif.h".
8346 (struct vstop_notif) <next>: Remove.
8347 <base>: New field.
8348 (queue_stop_reply): Update.
8349 (push_event, send_next_stop_reply): Remove.
8350 (discard_queued_stop_replies): Update.
8351 (notif_stop): New variable.
8352 (handle_v_stopped): Remove.
8353 (handle_v_requests): Don't call handle_v_stopped. Call
8354 handle_ack_notif instead.
8355 (queue_stop_reply_callback): Call notif_event_enque instead
8356 of queue_stop_reply.
8357 (handle_status): Don't call send_next_stop_reply, call
8358 notif_write_event instead.
8359 (kill_inferior_callback): Likewise.
8360 (detach_or_kill_inferior_callback): Likewise.
8361 (main): Call initialize_notif.
8362 (process_serial_event): Call QUEUE_is_empty.
8363 (handle_target_event): Call notif_push instead of push event.
8364 * server.h (push_event): Remove declaration.
8365
61c125b9
TT
83662012-12-10 Tom Tromey <tromey@redhat.com>
8367
8368 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8369 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8370 macros.
8371 (.c.o): Rewrite.
8372 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8373 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8374 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8375 (amd64-linux-ipa.o, ax.o): Rewrite.
8376 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8377 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8378 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8379 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8380 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8381 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8382 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8383 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8384 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8385 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8386 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8387 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8388 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8389 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8390 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8391 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8392 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8393 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8394 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8395 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8396 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8397 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8398 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8399 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8400 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8401 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8402 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8403 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8404 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8405 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8406 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8407 (reg-tilegx.o): Remove.
8408 (all_object_files): New macro.
8409 Include .deps files.
8410 * aclocal.m4, configure: Rebuild.
8411 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8412 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8413 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8414
e90e9ad9
TT
84152012-12-05 Tom Tromey <tromey@redhat.com>
8416
8417 PR gdb/14917:
8418 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8419
02d403bf 84202012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8421
8422 * configure.ac: Check for linux/perf_event.h.
8423 * config.in: Regenerated.
8424 * configure: Regenerated.
8425
0270a750
PA
84262012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8427
8428 * hostio.c (handle_readlink): Decrease buffer size
8429 parameter passed to readlink by one byte.
8430
8c29b58e
YQ
84312012-11-26 Yao Qi <yao@codesourcery.com>
8432
8433 * configure.ac (build_warnings): Append '-Wempty-body'.
8434 * configure: Regenerated.
8435 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8436 body.
8437
8bdce1ff
PM
84382012-11-15 Pierre Muller <muller@sourceware.org>
8439
8440 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8441 * config.in: Regenerate.
8442 * configure: Regenerate.
8443 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8444 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8445 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8446 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8447 header.
8448 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8449 instead of <sys/wait.h> header.
8450 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8451
02d403bf 84522012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8453
8454 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8455 (various make rules): Remove -DGDBSERVER
8456
fbd5db48
YQ
84572012-11-09 Yao Qi <yao@codesourcery.com>
8458
8459 * spu-low.c (current_ptid): Move it to ..
8460 * gdbthread.h: ... here. New.
8461 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8462 * server.c (myresume, process_serial_event): Likewise.
8463 * thread-db.c (thread_db_find_new_threads): Likewise.
8464 * tracepoint.c (run_inferior_command): Likewise.
8465
b3dc46ff
AB
84662012-10-01 Andrew Burgess <aburgess@broadcom.com>
8467
8468 * server.c (handle_search_memory_1): Include access length in
8469 warning message.
8470
07c04788
HPN
84712012-09-05 Michael Brandt <michael.brandt@axis.com>
8472
8473 * linux-crisv32-low.c: Fix compile errors.
8474
918d227b
YQ
84752012-09-04 Yao Qi <yao@codesourcery.com>
8476
8477 * tracepoint.c (cmd_qtsv): Adjust debug message.
8478 Don't check CUR_TPOINT.
8479
18c1b81a
YQ
84802012-08-28 Yao Qi <yao@codesourcery.com>
8481
8482 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8483 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8484 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8485 Remove declarations of xmalloc, xreallloc, xstrdup and
8486 freeargv.
8487 * Makefile.in (libiberty_h): New.
8488 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8489 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8490
dc82f37b
YQ
84912012-08-23 Yao Qi <yao@codesourcery.com>
8492
8493 * server.h: Remove declaration of 'xsnprintf'.
8494
406b1477
KS
84952012-08-22 Keith Seitz <keiths@redhat.com>
8496
8497 * server.h: Include build-gnulib-gbserver/config.h.
8498 * gdbreplay.c: Likewise.
8499
e6712ff1
DE
85002012-08-08 Doug Evans <dje@google.com>
8501
8502 * Makefile.in (SFILES): Add gdb_vecs.c.
8503 (OBS): Add gdb_vecs.o.
8504 (gdb_vecs_h, host_defs_h): New variables.
8505 (thread-db.o): Add $(gdb_vecs_h) dependency.
8506 (gdb_vecs.o): New rule.
8507 * thread-db.c: #include "gdb_vecs.h".
8508 (thread_db_load_search): Use a vector to iterate over path elements.
8509 Handle text appearing after "$pdir".
8510
8511 * configure.ac: Add check for strstr.
8512 * config.in: Regenerate.
8513 * configure: Regenerate.
8514
7c3270ae
UW
85152012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8516
8517 * hostio.c (handle_pread): If pread fails, fall back to attempting
8518 lseek/read.
8519 (handle_pwrite): Likewise for pwrite.
8520
b62e2b27
UW
85212012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8522
8523 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8524 between unsupported TYPE and unimplementable ADDR/LEN combination.
8525 (arm_insert_point): Act on new return value.
8526
78a99e91
PA
85272012-07-31 Pedro Alves <palves@redhat.com>
8528
8529 * server.c (process_point_options): Only skip tokens if we find
8530 one that is unrecognized. Don't treat 'X' specially while
8531 skipping unrecognized tokens.
8532
fcf303ab
UW
85332012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8534
8535 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8536 to 4-byte-align HW breakpoint addresses for Thumb.
8537
7255706c
YQ
85382012-07-27 Yao Qi <yao@codesourcery.com>
8539
8540 PR remote/14161.
8541
8542 * server.h: Declare gdb_agent_about_to_close.
8543 * target.c (kill_inferior): Include "agent.h".
8544 New. Send command 'kill'.
8545 * target.h (kill_inferior): Removed macro.
8546 * tracepoint.c (gdb_agent_about_to_close): New.
8547 (gdb_agent_helper_thread): Handle command 'close'.
8548 Wait endlessly until the inferior stops.
8549 Install gdb_agent_remove_socket to atexit hook.
8550 (agent_socket_name): New static variable.
8551 (gdb_agent_socket_init): Replace local variable 'name' with
8552 'agent_socket_name'.
8553 (gdb_agent_remove_socket): New.
8554
5a3f286f
YQ
85552012-07-27 Yao Qi <yao@codesourcery.com>
8556
8557 * server.c (process_point_options): Stop at 'X' when parsing.
8558
961bd387
ME
85592012-07-19 Michael Eager <eager@eagercon.com>
8560
a261b8f5 8561 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8562 to hw_execute.
8563 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8564 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8565 hardware breakpoint.
8566
aa7c7447
JK
85672012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8568
8569 * gdbserver/linux-low.c (initialize_low): Call
8570 linux_ptrace_init_warnings.
8571
7f216e7c
DE
85722012-07-02 Doug Evans <dje@google.com>
8573
8574 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8575 pointer to int.
8576
d3ce09f5
SS
85772012-07-02 Stan Shebs <stan@codesourcery.com>
8578
8579 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8580 (ax.o): Add it to build rule.
8581 (ax-ipa.o): Ditto.
8582 (OBS): Add format.o.
8583 (IPA_OBS): Add format.o.
8584 * server.c (handle_query): Claim support for breakpoint commands.
8585 (process_point_options): Add command case.
8586 (process_serial_event): Leave running if there are printfs in
8587 effect.
8588 * mem-break.h (any_persistent_commands): Declare.
8589 (add_breakpoint_commands): Declare.
8590 (gdb_no_commands_at_breakpoint): Declare.
8591 (run_breakpoint_commands): Declare.
8592 * mem-break.c (struct point_command_list): New struct.
8593 (struct breakpoint): New field command_list.
8594 (any_persistent_commands): New function.
8595 (add_commands_to_breakpoint): New function.
8596 (add_breakpoint_commands): New function.
8597 (gdb_no_commands_at_breakpoint): New function.
8598 (run_breakpoint_commands): New function.
8599 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8600 locally.
8601 * ax.c: Include format.h.
8602 (ax_printf): New function.
8603 (gdb_eval_agent_expr): Add printf opcode.
8604
2f8f6aed
YQ
86052012-06-13 Yao Qi <yao@codesourcery.com>
8606
8607 * server.c (start_inferior): Remove duplicated writes to fields
8608 'last_resume_kind' and 'last_status' of 'current_inferior'.
8609
0c9070b3
YQ
86102012-06-12 Yao Qi <yao@codesourcery.com>
8611 Pedro Alves <palves@redhat.com>
8612
8613 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8614 comment.
8615 * server.c (handle_v_cont): Extend comment.
8616
c52daf70
YQ
86172012-06-11 Yao Qi <yao@codesourcery.com>
8618
8619 * linux-low.c (linux_attach): Add 'static'.
8620
d38bbb0a
YQ
86212012-06-06 Yao Qi <yao@codesourcery.com>
8622
8623 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8624
89dc0afd
JK
86252012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8626
8627 Fix gcc -flto compilation warning.
8628 * server.c (main): Make variable multi_mode and attach volatile.
8629
75f62ce7
TJB
86302012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8631
8632 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8633 if the platform doesn't know about it.
8634
65f479b6
PA
86352012-05-30 Jeff Kenton <jkenton@tilera.com>
8636
8637 * Makefile.in (SFILES): Add linux-tile-low.c.
8638 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8639 * configure.srv: Handle tilegx-*-linux*.
8640 * linux-tile-low.c: New file.
8641
0c5bf5a9
JK
86422012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8643
8644 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8645
a493e3e2
PA
86462012-05-24 Pedro Alves <palves@redhat.com>
8647
8648 PR gdb/7205
8649
43aaf8b6 8650 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8651
2ea28649
PA
86522012-05-24 Pedro Alves <palves@redhat.com>
8653
8654 PR gdb/7205
8655
8656 Replace target_signal with gdb_signal throughout.
8657
8d409d16
MR
86582012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8659
8660 * linux-low.c (linux_store_registers): Avoid the copying sequence
8661 when no data has been retrieved by ptrace.
8662
23512c01
MGD
86632012-05-22 Will Deacon <will.deacon@arm.com>
8664
8665 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8666 Include asm/ptrace.h.
8667 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8668 already defined.
8669
4934b29e
MR
86702012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8671
8672 * linux-low.c (linux_store_registers): Don't re-retrieve data
8673 with ptrace that has already been obtained from /proc. Always
8674 copy any data retrieved with ptrace to the buffer supplied.
8675
bde24c0a
PA
86762012-05-11 Yao Qi <yao@codesourcery.com>
8677 Pedro Alves <palves@redhat.com>
8678
8679 * linux-low.c (enum stopping_threads_kind): New.
8680 (stopping_threads): Change type to `enum stopping_threads_kind'.
8681 (handle_extended_wait): If stopping and suspending threads, leave
8682 the new_lwp suspended too.
8683 (linux_wait_for_event): Adjust.
8684 (stop_all_lwps): Set `stopping_threads' to
8685 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8686 whether we're suspending threads or just stopping them. Assert no
8687 recursion happens.
8688
623b6bdf
YQ
86892012-04-29 Yao Qi <yao@codesourcery.com>
8690
8691 * server.h: Move some code to ...
8692 * gdbthread.h: ... here. New.
8693 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8694 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8695 (nto-low.o, win32-low.o): Likewise.
8696 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8697 * regcache.c, remote-utils.c, server.c: Likewise.
8698 * target.c, tracepoint.c, win32-low.c: Likewise.
8699
f15f9948
TJB
87002012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8701
8702 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8703 (PTRACE_ARG4_TYPE): Likewise.
8704 (PTRACE_XFER_TYPE): Likewise.
8705 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8706 ptrace to PTRACE_ARG3_TYPE.
8707 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8708 (PTRACE_ARG4_TYPE): Likewise.
8709 (PTRACE_XFER_TYPE): Likewise.
8710 (linux_detach_one_lwp): Cast fourth argument of
8711 ptrace to long then PTRACE_ARG4_TYPE.
8712 (regsets_fetch_inferior_registers): Cast third argument of
8713 ptrace to long then PTRACE_ARG3_TYPE.
8714 (regsets_store_inferior_registers): Likewise.
8715
38ea300a
PA
87162012-04-20 Pedro Alves <palves@redhat.com>
8717
8718 * configure: Regenerate.
8719
c971b7fa
PA
87202012-04-19 Pedro Alves <palves@redhat.com>
8721
43aaf8b6 8722 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8723 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8724 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8725 (all, install-only, uninstall, clean-info, all-lib, clean): No
8726 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8727 (maintainer-clean realclean distclean): Use subdir_do.
8728 (subdir_do): New.
8729 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8730 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8731 * acinclude.m4: Include acx_configure_dir.m4.
8732 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8733 calls. Call AC_PROG_RANLIB. Configure gnulib using
8734 ACX_CONFIGURE_DIR.
8735 (GNULIB): New.
8736 (GNULIB_STDINT_H): Adjust.
8737 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8738 * gdbreplay.c: Include build-gnulib/config.h.
8739 * server.h: Likewise.
8740 * aclocal.m4: Regenerate.
8741 * config.in: Regenerate.
8742 * configure: Regenerate.
c971b7fa 8743
809277f8
PA
87442012-04-19 Pedro Alves <palves@redhat.com>
8745
8746 * Makefile.in (LIBGNU, INCGNU): Adjust.
8747 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8748 (all, install-only, uninstall, clean-info, all-lib, clean)
8749 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8750 * configure.ac: Adjust AC_OUTPUT output.
8751 * aclocal.m4: Regenerate.
8752 * configure: Regenerate.
8753
fd9bb8b8
PA
87542012-04-19 Pedro Alves <palves@redhat.com>
8755
8756 * Makefile.in (generated_files): New.
8757 (server_h): Remove the explicit dependency on config.h, and depend
8758 on $generated_files.
8759
1c298c66
PA
87602012-04-19 Pedro Alves <palves@redhat.com>
8761
8762 * Makefile.in (INCGNU): Add -Ignulib.
8763
57c4b50b
PA
87642012-04-19 Pedro Alves <palves@redhat.com>
8765
8766 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8767 (INCGNU): ... this, and spell out -I here.
8768 (GNULIB_LIB): Rename to ...
8769 (LIBGNU): ... this.
8770 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8771
1030e047
PA
87722012-04-19 Pedro Alves <palves@redhat.com>
8773
8774 * config.in: Regenerate.
8775
447d4319
PA
87762012-04-19 Pedro Alves <palves@redhat.com>
8777
8778 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8779 * server.h (memmem): Remove declaration.
8780 * config.in: Regenerate.
8781 * configure: Regenerate.
8782
aad9eab9
YQ
87832012-04-19 Yao Qi <yao@codesourcery.com>
8784
8785 * Makefile.in (SFILES): Add common/vec.c.
8786 (OBS): Add vec.o.
8787 (vec.o): New rule.
8788
3e10640f
YQ
87892012-04-19 Yao Qi <yao@codesourcery.com>
8790
8791 * remote-utils.c (prepare_resume_reply): Replace with macro
8792 target_core_of_thread.
8793 * server.c (handle_qxfer_threads_proper): Likewise.
8794 * target.h (traget_core_of_thread): New macro.
8795
71622373
PA
87962012-04-18 Pedro Alves <palves@redhat.com>
8797
8798 * aclocal.m4: Regenerate.
8799 * configure: Regenerate.
8800
80d26939
YQ
88012012-04-16 Yao Qi <yao@codesourcery.com>
8802
8803 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8804 duplicated on address.
8805
42476b70
YQ
88062012-04-16 Yao Qi <yao@codesourcery.com>
8807
8808 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8809 (struct tracepoint_action_ops) <send>: New field.
8810 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8811 (agent_expr_send, x_tracepoint_action_send): New.
8812 (l_tracepoint_action_send): New.
8813 (cmd_qtdp): Download and install tracepoint
8814 according to `use_agent'.
8815 (run_inferior_command): Add one more parameter `len'.
8816 Update callers.
8817 (tracepoint_send_agent): New.
8818 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8819
7bc83639
YQ
88202012-04-16 Yao Qi <yao@codesourcery.com>
8821
8822 * tracepoint.c (download_tracepoints): Moved to ...
8823 (cmd_qtstart): ... here.
8824
5f18041e
YQ
88252012-04-14 Yao Qi <yao@codesourcery.com>
8826
8827 * tracepoint.c: Include inttypes.h.
8828 (struct collect_memory_action): Use sized types.
8829 (struct tracepoint): Likewise.
8830 (cmd_qtdp, stop_tracing): Update print specifiers.
8831 (cmd_qtp, response_tracepoint): Likewise.
8832 (collect_data_at_tracepoint): Likewise.
8833 (collect_data_at_step): Likewise.
8834
55a8c076
YQ
88352012-04-14 Yao Qi <yao@codesourcery.com>
8836
8837 Import gnulib module inttypes.
8838 * aclocal.m4, config.in, configure: Regenerated.
8839
dc750257
YQ
88402012-04-14 Yao Qi <yao@codesourcery.com>
8841
8842 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8843 Makefile and config.status at last.
8844
0ab5faf9
YQ
88452012-04-13 Yao Qi <yao@codesourcery.com>
8846
8847 * tracepoint.c: Include stdint.h unconditionally.
8848
18f5fd81
TJB
88492012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8850
8851 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8852 on BFD_HAVE_SYS_PROCFS_TYPE.
8853 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8854 * configure: Regenerate.
8855 * config.in: Likewise.
8856
4d47af5c
L
88572012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8858
8859 * Makefile.in (clean): Also remove x32.c x32-linux.c
8860 x32-avx.c x32-avx-linux.c.
8861 (x32.o): New target.
8862 (x32.c): Likewise.
8863 (x32-linux.o): Likewise.
8864 (x32-linux.c): Likewise.
8865 (x32-avx.o): Likewise.
8866 (x32-avx.c): Likewise.
8867 (x32-avx-linux.o): Likewise.
8868 (x32-avx-linux.c): Likewise.
8869
8870 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8871 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8872 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8873 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8874 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8875 i386/x32-avx-linux.xml.
8876
8877 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8878 (init_registers_x32_avx_linux): Likwise.
8879 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8880 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8881
ecedbe58
PA
88822012-04-13 Pedro Alves <palves@redhat.com>
8883
8884 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8885 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8886 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8887 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8888 the sub-make.
8889
c92b5177
L
88902012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8891
8892 * linux-x86-low.c (compat_x32_clock_t): New.
8893 (compat_x32_siginfo_t): Likewise.
8894 (compat_x32_siginfo_from_siginfo): Likewise.
8895 (siginfo_from_compat_x32_siginfo): Likewise.
8896 (linux_is_elf64): Likewise.
8897 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8898 and siginfo_from_compat_x32_siginfo for x32.
8899 (x86_arch_setup): Set linux_is_elf64.
8900
214d508e
L
89012012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8902
8903 PR gdb/13969
8904 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8905 e_machine field.
8906 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8907 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8908 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8909 compatible with process.
8910
c9a1864a
YQ
89112012-04-12 Yao Qi <yao@codesourcery.com>
8912
8913 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8914 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8915 (install-only, install-info, clean): Handle sub dir gnulib.
8916 (all-lib, am--refresh): New targets.
8917 (memmem.o): Remove target.
8918 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8919 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8920 (AC_REPLACE_FUNCS): Remove memmem.
8921 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8922 (AC_OUTPUT): Generate Makefile in gnulib/.
8923 * aclocal.m4, config.in, configure: Regenerated.
8924
367ba2c2
MR
89252012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8926
8927 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8928
9d236627
PA
89292012-04-05 Pedro Alves <palves@redhat.com>
8930
8931 -Werror=strict-aliasing
8932
8933 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8934 pointer.
8935
111217b3
PA
89362012-04-04 Pedro Alves <palves@redhat.com>
8937
8938 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8939 (sparc_store_gregset_from_stack, sparc_store_gregset)
8940 (sparc_breakpoint_at): Fix formatting.
8941
8365dcf5
TJB
89422012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8943
8944 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8945 are available.
8946 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8947 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8948 * config.in: Regenerate.
8949 * configure: Likewise.
8950
689cc2ae
PA
89512012-03-29 Pedro Alves <palves@redhat.com>
8952
8953 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8954 Correct ptrace arguments.
8955
c14dfd32
PA
89562012-03-28 Pedro Alves <palves@redhat.com>
8957
8958 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8959 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8960 (IA64_FR1_REGNUM): New defines.
8961 (ia64_fetch_register): New.
8962 (the_low_target): Install it.
8963 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8964 field.
8965 * linux-low.c (linux_fetch_registers): Try the
8966 the_low_target.fetch_register hook first.
8967
8968 * linux-arm-low.c (the_low_target): Adjust.
8969 * linux-bfin-low.c (the_low_target): Adjust.
8970 * linux-cris-low.c (the_low_target): Adjust.
8971 * linux-crisv32-low.c (the_low_target): Adjust.
8972 * linux-m32r-low.c (the_low_target): Adjust.
8973 * linux-m68k-low.c (the_low_target): Adjust.
8974 * linux-mips-low.c (the_low_target): Adjust.
8975 * linux-ppc-low.c (the_low_target): Adjust.
8976 * linux-s390-low.c (the_low_target): Adjust.
8977 * linux-sh-low.c (the_low_target): Adjust.
8978 * linux-sparc-low.c (the_low_target): Adjust.
8979 * linux-tic6x-low.c (the_low_target): Adjust.
8980 * linux-x86-low.c (the_low_target): Adjust.
8981 * linux-xtensa-low.c (the_low_target): Adjust.
8982
63c88e13
PA
89832012-03-26 Pedro Alves <palves@redhat.com>
8984
8985 * server.c (handle_qxfer_libraries): Don't bail early if
8986 the_target->qxfer_libraries_svr4 is not NULL.
8987
fb723180
PA
89882012-03-26 Pedro Alves <palves@redhat.com>
8989
8990 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8991
0afae3cf
PA
89922012-03-23 Pedro Alves <palves@redhat.com>
8993
8994 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8995 "library-list-svr4" element's start tag when the the DSO list is
8996 empty.
8997
485f1ee4
PA
89982012-03-23 Pedro Alves <palves@redhat.com>
8999
9000 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9001 a variable whose type size is the same as the inferior's pointer
9002 size.
9003
a5362b9a
TS
90042012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9005
9006 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9007 struct siginfo.
9008 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9009 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9010 * linux-low.h: Include <signal.h>.
9011 (struct siginfo): Remove forward declaration.
9012 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9013 struct siginfo.
9014
d226c142
MF
90152012-03-21 Mike Frysinger <vapier@gentoo.org>
9016
9017 * .gitignore: Ignore more files.
9018
122f36ef
PA
90192012-03-19 Pedro Alves <palves@redhat.com>
9020 Jan Kratochvil <jan.kratochvil@redhat.com>
9021
9022 * server.c (cont_thread, general_thread): Add describing comments.
9023 (start_inferior): Clear `cont_thread'.
9024 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9025 of a process.
9026
fc3e5175
YQ
90272012-03-15 Yao Qi <yao@codesourcery.com>
9028
9029 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9030 handling to ...
9031 (cmd_qtdp): ... here.
9032
8d0d92cd
YQ
90332012-03-15 Yao Qi <yao@codesourcery.com>
9034
9035 * tracepoint.c (struct tracepoint_action_ops): New.
9036 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9037 (m_tracepoint_action_download): New.
9038 (r_tracepoint_action_download): New.
9039 (x_tracepoint_action_download): New.
9040 (l_tracepoint_action_download): New.
9041 (add_tracepoint_action): Install `action->ops' according type.
9042 (download_tracepoint_1): Move code `download' function pointer
9043 of various tracepoint_action_ops.
9044
87b0bb13
JK
90452012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9046
9047 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9048 linux_ptrace_attach_warnings.
9049
5f572dec
JK
90502012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9051
9052 * Makefile.in (linux-ptrace.o): New.
9053 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9054 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9055 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9056 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9057 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9058 of these targets.
9059 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9060
f4647387
YQ
90612012-03-08 Yao Qi <yao@codesourcery.com>
9062 Pedro Alves <palves@redhat.com>
9063
9064 Fix PR server/13392.
9065 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9066 offset of JMP insn.
9067 * tracepoint.c (remove_tracepoint): New.
9068 (cmd_qtdp): Call remove_tracepoint when failed to install.
9069
9b224c5e
PA
90702012-03-07 Pedro Alves <palves@redhat.com>
9071
9072 * linux-low.c (get_detach_signal): New.
9073 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9074 Pass on pending signals to PTRACE_DETACH. Check the result of the
9075 ptrace call.
9076 * server.c (program_signals, program_signals_p): New.
9077 (handle_general_set): Handle QProgramSignals.
9078 * server.h (program_signals, program_signals_p): Declare.
9079
e237a7e2
JK
90802012-03-05 Pedro Alves <palves@redhat.com>
9081 Jan Kratochvil <jan.kratochvil@redhat.com>
9082
9083 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9084 New comment why.
9085
5808517f
YQ
90862012-03-03 Yao Qi <yao@codesourcery.com>
9087
9088 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9089 agent_look_up_symbols.
9090
58b4daa5
YQ
90912012-03-03 Yao Qi <yao@codesourcery.com>
9092
9093 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9094 (linux-x86-low.o): Likewise.
9095 * server.h: Remove in_process_agent_loaded.
9096 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9097 common/agent.c.
9098 Update callers.
9099
8ffcbaaf
YQ
91002012-03-03 Yao Qi <yao@codesourcery.com>
9101
9102 * tracepoint.c (gdb_agent_capability): New global.
9103 (in_process_agent_loaded_ust): Renamed to
9104 `in_process_agent_supports_ust'.
9105 Update callers.
9106 (in_process_agent_supports_ust): Call agent_capability_check.
9107 (clear_installed_tracepoints): Assert that agent supports
9108 agent.
9109
d1feda86
YQ
91102012-03-03 Yao Qi <yao@codesourcery.com>
9111
9112 * linux-low.c (linux_supports_agent): New.
9113 (linux_target_ops): Initialize field `supports_agent' with
9114 linux_supports_agent.
9115 * target.h (struct target_ops) <supports_agent>: New.
9116 (target_supports_agent): New macro.
9117 * server.c (handle_general_set): Handle packet 'QAgent'.
9118 (handle_query): Send `QAgent+'.
9119 * Makefile.in (server.o): Depends on agent.h.
9120
2fa291ac
YQ
91212012-03-03 Yao Qi <yao@codesourcery.com>
9122
9123 * Makefile.in (OBS): Add agent.o.
9124 Add new rule for agent.o.
9125 Track dependence of tracepoint.c on agent.h.
9126 * tracepoint.c (run_inferior_command_1):
9127 (run_inferior_command): Call agent_run_command.
9128 (gdb_ust_connect_sync_socket): Deleted. Move it to
9129 common/agent.c.
9130 (resume_thread, stop_thread): Likewise.
9131 (gdb_ust_socket_init): Renamed to ...
9132 (gdb_agent_socket_init): ... New.
9133 (gdb_ust_thread): Renamed to ...
9134 (gdb_agent_helper_thread): ... New.
9135 (gdb_ust_init): Move some code to ...
9136 (gdb_agent_init): ... here. New.
9137 [HAVE_UST]: Call gdb_ust_init.
9138 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9139 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9140 * config.in, configure: Regenerated.
9141
05044653
PA
91422012-03-02 Pedro Alves <palves@redhat.com>
9143
9144 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9145 * linux-low.c (struct simple_pid_list): New.
9146 (stopped_pids): New a struct simple_pid_list pointer.
9147 (add_to_pid_list, pull_pid_from_list): New.
9148 (handle_extended_wait): Don't assume the first signal new children
9149 report is SIGSTOP. Adjust call to pull_pid_from_list.
9150 (linux_wait_for_lwp): Adjust.
9151
8d00225b
YQ
91522012-03-02 Yao Qi <yao@codesourcery.com>
9153
9154 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9155 debug log.
9156
19560ba5
YQ
91572012-03-02 Yao Qi <yao@codesourcery.com>
9158
9159 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9160 `stop_pc' and `tpoint'. Update caller.
9161
1faeff08
MR
91622012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9163
9164 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9165 * linux-low.c (use_linux_regsets): New macro.
9166 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9167 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9168 (linux_register_in_regsets): New function.
9169 (usr_fetch_inferior_registers): Skip registers covered by
9170 regsets.
9171 (usr_store_inferior_registers): Likewise.
9172 (usr_fetch_inferior_registers): New macro.
9173 (usr_store_inferior_registers): Likewise.
9174 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9175 (linux_store_registers): Likewise.
9176 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9177 prototype.
9178 (init_registers_mips64_dsp_linux): Likewise.
9179 (init_registers_mips_linux): New macro.
9180 (init_registers_mips_dsp_linux): Likewise.
9181 (mips_dsp_num_regs): Likewise.
9182 (DSP_BASE, DSP_CONTROL): New fallback macros.
9183 (mips_base_regs): New macro.
9184 (mips_regmap): Use it. Fix the size.
9185 (mips_dsp_regmap): New variable.
9186 (mips_dsp_regset_bitmap): Likewise.
9187 (mips_arch_setup): New function.
9188 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9189 than mips_regmap.
9190 (mips_cannot_store_register): Likewise.
9191 (the_low_target): Update .arch_setup, .num_regs and .regmap
9192 initializers. Add .regset_bitmap initializer.
9193 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9194 initializer.
9195 * linux-bfin-low.c (the_low_target): Likewise.
9196 * linux-cris-low.c (the_low_target): Likewise.
9197 * linux-crisv32-low.c (the_low_target): Likewise.
9198 * linux-ia64-low.c (the_low_target): Likewise.
9199 * linux-m32r-low.c (the_low_target): Likewise.
9200 * linux-m68k-low.c (the_low_target): Likewise.
9201 * linux-ppc-low.c (the_low_target): Likewise.
9202 * linux-s390-low.c (the_low_target): Likewise.
9203 * linux-sh-low.c (the_low_target): Likewise.
9204 * linux-sparc-low.c (the_low_target): Likewise.
9205 * linux-tic6x-low.c (the_low_target): Likewise.
9206 * linux-x86-low.c (the_low_target): Likewise.
9207 * linux-xtensa-low.c (the_low_target): Likewise.
9208 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9209 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9210 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9211 srv_xmlfiles.
9212 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9213 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9214
c03e6ccc
YQ
92152012-02-29 Yao Qi <yao@codesourcery.com>
9216 Pedro Alves <palves@redhat.com>
9217
9218 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9219 `step_over_finished' is true.
9220
644cebc9
PA
92212012-02-27 Pedro Alves <palves@redhat.com>
9222
9223 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9224 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9225
c14d7ab2
PA
92262012-02-27 Pedro Alves <palves@redhat.com>
9227
9228 PR server/9684
9229 * linux-low.c (pid_is_stopped): New.
9230 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9231
412c89dd
LM
92322012-02-25 Luis Machado <lgustavo@codesourcery.com>
9233
9234 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9235 of conditions.
9236
b745defe
MR
92372012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9238
9239 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9240
9f3a5c85
LM
92412012-02-24 Luis Machado <lgustavo@codesourcery>
9242
9243 * server.c (handle_query): Advertise support for target-side
9244 breakpoint condition evaluation.
9245 (process_point_options): New function.
9246 (process_serial_event): When inserting a breakpoint, check for
9247 a target-side condition that should be evaluated.
9248
9249 * mem-break.c: Include regcache.h and ax.h.
9250 (point_cond_list_t): New data structure.
9251 (breakpoint) <cond_list>: New field.
9252 (find_gdb_breakpoint_at): Make non-static.
9253 (delete_gdb_breakpoint_at): Clear any target-side
9254 conditions.
9255 (clear_gdb_breakpoint_conditions): New function.
9256 (add_condition_to_breakpoint): Likewise.
9257 (add_breakpoint_condition): Likewise.
9258 (gdb_condition_true_at_breakpoint): Likewise.
9259 (gdb_breakpoint_here): Return result directly instead
9260 of going through a local variable.
9261
9262 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9263 (clear_gdb_breakpoint_conditions): Likewise.
9264 (add_breakpoint_condition): Likewise.
9265 (gdb_condition_true_at_breakpoint): Likewise.
9266
9267 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9268 (need_step_over_p): Take target-side breakpoint condition into
9269 consideration.
9270
5e1dc496
LM
92712012-02-24 Luis Machado <lgustavo@codesourcery>
9272
9273 * server.h: Include tracepoint.h.
9274 (agent_mem_read, agent_get_trace_state_variable_value,
9275 agent_set_trace_state_variable_value,
9276 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9277 get_set_tsv_func_addr): New prototypes.
9278
9279 * ax.h: New include file.
9280 * ax.c: New source file.
9281
9282 * tracepoint.c: Include ax.h.
9283 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9284 agent_expr, eval_result_type): Move to ax.h.
9285 (parse_agent_expr): Rename to ...
9286 (gdb_parse_agent_expr): ... this, make it non-static and move
9287 to ax.h.
9288 (unparse_agent_expr) Rename to ...
9289 (gdb_unparse_agent_expr): ... this, make it non-static and move
9290 to ax.h.
9291 (eval_agent_expr): Rename to ...
9292 (eval_tracepoint_agent_expr): ... this.
9293 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9294 forward declarations.
9295 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9296 (agent_get_trace_state_variable_value): New function.
9297 (agent_set_trace_state_variable_value): New function.
9298 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9299 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9300 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9301 (condition_true_at_tracepoint): Likewise.
9302 (parse_agent_expr): Rename to ...
9303 (gdb_parse_agent_expr): ... this and move to ax.c.
9304 (unparse_agent_expr): Rename to ...
9305 (gdb_unparse_agent_expr): ... this and move to ax.c.
9306 (gdb_agent_op_name): Move to ax.c.
9307 (eval_agent_expr): Rename to ...
9308 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9309 and move to ax.c.
9310 (eval_tracepoint_agent_expr): New function.
9311 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9312 non-static.
5e1dc496
LM
9313 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9314 ax.c.
9315 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9316 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9317 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9318 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9319 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9320 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9321 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9322 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9323 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9324 (compile_bytecodes): Remove forward declaration.
9325 (is_goto_target): Move to ax.c.
9326 (compile_bytecodes): Move to ax.c and call
9327 agent_get_trace_state_variable_value (...) and
9328 agent_set_trace_state_variable_value (...).
9329
9330 * Makefile.in: Update ax.c and IPA dependencies.
9331
277e4e52
PA
93322012-02-24 Pedro Alves <palves@redhat.com>
9333
9334 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9335 (cmd_bigqtbuffer_circular): ... this. Only handle
9336 'QTBuffer:circular:'.
9337 (handle_tracepoint_general_set): Adjust.
9338
bf4c19f7
YQ
93392012-02-16 Yao Qi <yao@codesourcery.com>
9340
9341 * inferiors.c: Move code to ...
9342 * dll.c: .... here. New.
9343 * server.h: Declare clear_dlls.
9344 * Makefile.in (SFILES): Add dll.c.
9345 (OBS): Add dll.o
9346 (dll.o): New rule.
9347
d73f2619
YQ
93482012-02-11 Yao Qi <yao@codesourcery.com>
9349
9350 * server.c: (handle_monitor_command): Add a new parameter
9351 `own_buf'.
9352 (handle_query): Update caller.
9353
f8255c2a
JB
93542012-02-09 Joel Brobecker <brobecker@adacore.com>
9355
9356 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9357 * configure, config.in: Regenerate.
9358 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9359 is not defined.
9360
da84f473
PA
93612012-02-02 Pedro Alves <palves@redhat.com>
9362
9363 Try SIGKILL first, then PTRACE_KILL.
9364 * linux-low.c (linux_kill_one_lwp): New.
9365 (linux_kill_one_lwp): Rename to ...
9366 (kill_one_lwp_callback): ... this. Use the new
9367 linux_kill_one_lwp.
9368
e886a173
PA
93692012-02-02 Pedro Alves <palves@redhat.com>
9370
9371 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9372 inferior.
9373
be07f1a2
PA
93742012-01-27 Pedro Alves <palves@redhat.com>
9375
9376 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9377 (elf_64_file_p): Make static.
9378 (linux_pid_exe_is_elf_64_file): New.
9379 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9380 Delete declarations.
9381 (linux_pid_exe_is_elf_64_file): Declare.
9382 * linux-x86-low.c (x86_arch_setup): Use
9383 linux_pid_exe_is_elf_64_file.
9384
d8301ad1
JK
93852012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9386
9387 * linux-low.c (linux_wait_for_event_1): Rename to ...
9388 (linux_wait_for_event): ... here and merge it with former
9389 linux_wait_for_event - new variable wait_ptid, use it.
9390 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9391
01b17894
PA
93922012-01-23 Pedro Alves <palves@redhat.com>
9393
9394 * server.c (main): Avoid yet another case of infinite loop while
9395 detaching/killing after a longjmp.
9396
e825046f
JK
93972012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9398
9399 Code cleanup.
9400 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9401
b9e7b9c3
UW
94022012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9403
9404 * hostio.c (handle_readlink): New function.
9405 (handle_vFile): Call it to handle "vFile:readlink" packets.
9406
901f9912
UW
94072012-01-20 Pedro Alves <palves@redhat.com>
9408 Ulrich Weigand <ulrich.weigand@linaro.org>
9409
9410 * server.c (handle_v_requests): Only support vAttach and vRun to
9411 start multiple processes when in extended protocol mode.
9412
fc1ab1a0
PA
94132012-01-17 Pedro Alves <palves@redhat.com>
9414
9415 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9416 memalign plus mprotect to allocate the scratch buffer.
9417
7d5d4e98
PA
94182012-01-13 Pedro Alves <palves@redhat.com>
9419
9420 * server.c (attach_inferior): Clear `cont_thread'.
9421
f128d5e9
PA
94222012-01-13 Pedro Alves <palves@redhat.com>
9423
9424 * server.c (main): Avoid infinite loop while detaching/killing
9425 after a longjmp.
9426
06db92f0
DE
94272012-01-09 Doug Evans <dje@google.com>
9428
9429 * server.c (start_inferior): Set last_ptid in --wrapper case.
9430
32d92999
YQ
94312012-01-06 Yao Qi <yao@codesourcery.com>
9432
9433 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9434 defined.
9435 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9436
5e0a92a9
YQ
94372012-01-04 Yao Qi <yao@codesourcery.com>
9438
9439 * tracepoint.c (cmd_qtdp): Print debug message
9440 for static tracepoint.
9441
ae639e8c
YQ
94422012-01-04 Yao Qi <yao@codesourcery.com>
9443
9444 * tracepoint.c (trace_vdebug): Differentiate debug message
9445 between gdbserver and IPA.
9446
f72429c5
YQ
94472012-01-03 Yao Qi <yao@codesourcery.com>
9448
9449 * tracepoint.c (tracepoint_was_hit): Don't collect for
9450 static tracepoint.
9451
12c3e59c
JB
94522012-01-02 Joel Brobecker <brobecker@adacore.com>
9453
9454 * terminal.h: Reformat copyright header.
9455
67827812
JB
94562012-01-02 Joel Brobecker <brobecker@adacore.com>
9457
9458 * server.c (gdbserver_version): Update copyright year.
9459 * gdbreplay.c (gdbreplay_version): Likewise.
9460
3e52c33d
JK
94612011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9462
9463 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9464
9465 Revert:
9466 2011-12-18 Hui Zhu <teawater@gmail.com>
9467 * linux-low.c (linux_create_inferior): Save return value to ret.
9468
66f1260e
HZ
94692011-12-18 Hui Zhu <teawater@gmail.com>
9470
9471 * linux-low.c (linux_create_inferior): Save return value to ret.
9472
e77616d7
DE
94732011-12-16 Doug Evans <dje@google.com>
9474
e7b06c57
DE
9475 * linux-low.c (linux_create_inferior): If stdio connection,
9476 redirect stdin from /dev/null, stdout to stderr.
9477 * remote-utils.c (remote_is_stdio): New static global.
9478 (remote_connection_is_stdio): New function.
9479 (remote_prepare): Handle stdio connection.
9480 (remote_open): Ditto.
9481 (remote_close): Don't close stdin for stdio connections.
9482 (read_prim,write_prim): New functions. Replace all calls to
9483 read/write to these.
9484 * server.c (main): Watch for "-" argument. Move call to
9485 remote_prepare before start_inferior.
9486 * server.h (STDIO_CONNECTION_NAME): New macro.
9487 (remote_connection_is_stdio): Declare.
9488
e77616d7
DE
9489 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9490 in debugging output.
9491
82067193
YQ
94922011-12-15 Yao Qi <yao@codesourcery.com>
9493
9494 * tracepoint.c: Include sys/syscall.h.
9495 (gdb_ust_thread): Remove preprocessor conditional.
9496
82bfbe7e
PA
94972011-12-14 Pedro Alves <pedro@codesourcery.com>
9498
9499 * linux-low.c (linux_detach_one_lwp): Call
9500 the_low_target.prepare_to_resume before detaching.
9501
712c6575
YQ
95022011-12-14 Yao Qi <yao@codesourcery.com>
9503
9504 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9505 of write.
9506
d54d1edf
YQ
95072011-12-14 Yao Qi <yao@codesourcery.com>
9508
9509 * i386-low.c (i386_low_stopped_data_address): Initialize local
9510 variable `control'.
9511
6210a125
PA
95122011-12-13 Pedro Alves <pedro@codesourcery.com>
9513
9514 PR remote/13492
9515
9516 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9517 DR_CONTROL unless necessary. Extend comments.
9518 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9519 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9520
2ece8244
YQ
95212011-12-13 Yao Qi <yao@codesourcery.com>
9522
9523 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9524 macros.
9525 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9526
784867a5
JK
95272011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9528
9529 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9530 Print new debug message for such case.
9531
6bf36717
JK
95322011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9533
9534 Fix overlapping memcpy.
9535 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9536 the read_inferior_memory transfer.
9537 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9538 write_inferior_memory transfer.
9539 (set_fast_tracepoint_jump): New variable buf. Use it for the
9540 read_inferior_memory and write_inferior_memory transfers.
9541 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9542 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9543 Use it for the write_inferior_memory transfer.
9544 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9545 buffers.
9546
50275556
MR
95472011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9548
9549 * linux-low.c (fetch_register, store_register): Make code
9550 consistent, fix formatting.
9551
7325beb4
MR
95522011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9553
9554 * linux-low.c (usr_store_inferior_registers): Factor out code
9555 to handle individual registers into...
9556 (store_register): ... this new function.
9557
c642a434
UW
95582011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9559
9560 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9561 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9562 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9563 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9564 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9565 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9566 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9567 (srv_xmlfiles): Add new XML files.
9568
9569 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9570 and <sys/uio.h>.
9571 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9572 (init_registers_s390_linux32v1): Add prototype.
9573 (init_registers_s390_linux32v2): Likewise.
9574 (init_registers_s390_linux64v1): Likewise.
9575 (init_registers_s390_linux64v2): Likewise.
9576 (init_registers_s390x_linux64v1): Likewise.
9577 (init_registers_s390x_linux64v2): Likewise.
9578 (s390_num_regs): Increment to 52.
9579 (s390_regmap): Add orig_r2 register.
9580 (s390_num_regs_3264): Increment to 68.
9581 (s390_regmap_3264): Add orig_r2 register.
9582 (s390_collect_ptrace_register): Handle orig_r2 register.
9583 (s390_supply_ptrace_register): Likewise.
9584 (s390_fill_last_break): New function.
9585 (s390_store_last_break): Likewise.
9586 (s390_fill_system_call): New function.
9587 (s390_store_system_call): Likewise.
9588 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9589 register sets.
9590 (s390_check_regset): New function.
9591 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9592 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9593 Update target_regsets for available register sets.
9594
2268b414
JK
95952011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9596 Jan Kratochvil <jan.kratochvil@redhat.com>
9597
9598 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9599 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9600 New.
9601 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9602 * linux-low.h (struct process_info_private): New member r_debug.
9603 * server.c (handle_qxfer_libraries): Call
9604 the_target->qxfer_libraries_svr4.
9605 (handle_qxfer_libraries_svr4): New function.
9606 (qxfer_packets): New entry "libraries-svr4".
9607 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9608 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9609 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9610 PACKET_qXfer_libraries_svr4.
9611
d6db1fab
UW
96122011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9613
9614 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9615 PSW address/mask between 8-byte and 16-byte formats.
9616 (s390_supply_ptrace_register): Likewise.
9617 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9618 basic addressing mode bit.
9619
242f5f1c
SS
96202011-11-24 Stan Shebs <stan@codesourcery.com>
9621
9622 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9623
f196051f
SS
96242011-11-17 Stan Shebs <stan@codesourcery.com>
9625
9626 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9627 (tracing_start_time): New global.
9628 (tracing_stop_time): New global.
9629 (tracing_user_name): New global.
9630 (tracing_notes): New global.
9631 (tracing_stop_note): New global.
9632 (cmd_qtstart): Set traceframe_usage, start_time.
9633 (stop_tracing): Set stop_time.
9634 (cmd_qtstatus): Report additional status.
9635 (cmd_qtp): New function.
9636 (handle_tracepoint_query): Call it.
9637 (cmd_qtnotes): New function.
9638 (handle_tracepoint_general_set): Call it.
9639 (get_timestamp): Rename from tsv_get_timestamp.
9640
405f8e94
SS
96412011-11-14 Stan Shebs <stan@codesourcery.com>
9642 Kwok Cheung Yeung <kcy@codesourcery.com>
9643
9644 * linux-x86-low.c (small_jump_insn): New.
9645 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9646 trampoline and error message, build a trampoline and issue a small
9647 jump instruction to it.
9648 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9649 trampoline and error message.
9650 (x86_get_min_fast_tracepoint_insn_len): New.
9651 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9652 * linux-low.h (struct linux_target_ops): Add arguments to
9653 install_fast_tracepoint_jump_pad operation, add new operation.
9654 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9655 arguments.
9656 (linux_get_min_fast_tracepoint_insn_len): New function.
9657 (linux_target_op): Add new operation.
9658 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9659 (gdb_trampoline_buffer_end): Ditto.
9660 (gdb_trampoline_buffer_error): Ditto.
9661 (struct ipa_sym_addresses): Add fields for new IPA variables.
9662 (symbol_list): Add entries for new IPA variables.
9663 (struct tracepoint): Add fields to hold the address range of the
9664 trampoline used by the tracepoint.
9665 (trampoline_buffer_head): New static variable.
9666 (trampoline_buffer_tail): Ditto.
9667 (claim_trampoline_space): New function.
9668 (have_fast_tracepoint_trampoline_buffer): New function.
9669 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9670 structure.
9671 (install_fast_tracepoint): Ditto, also add error buffer argument.
9672 (cmd_qtminftpilen): New function.
9673 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9674 (fast_tracepoint_from_trampoline_address): New function.
9675 (fast_tracepoint_collecting): Handle trampoline as part of jump
9676 pad space.
9677 (set_trampoline_buffer_space): New function.
9678 (initialize_tracepoint): Initialize new IPA variables.
9679 * target.h (struct target_ops): Add arguments to
9680 install_fast_tracepoint_jump_pad operation, add new
9681 get_min_fast_tracepoint_insn_len operation.
9682 (target_get_min_fast_tracepoint_insn_len): New.
9683 (install_fast_tracepoint_jump_pad): Add arguments.
9684 * server.h (IPA_BUFSIZ): Define.
9685 * linux-i386-ipa.c: Include extra header files.
9686 (initialize_fast_tracepoint_trampoline_buffer): New function.
9687 (initialize_low_tracepoint): Call it.
9688 * server.h (set_trampoline_buffer_space): Declare.
9689 (claim_trampoline_space): Ditto.
9690 (have_fast_tracepoint_trampoline_buffer): Ditto.
9691
1e4d1764
YQ
96922011-11-14 Yao Qi <yao@codesourcery.com>
9693
9694 * server.c (handle_query): Handle InstallInTrace for qSupported.
9695 * tracepoint.c (add_tracepoint): Sort list.
9696 (install_tracepoint, download_tracepoint): New.
9697 (cmd_qtdp): Call them to install and download tracepoints.
9698 (sort_tracepoints): Removed.
9699 (cmd_qtstart): Update.
9700
5c73ff4e
YQ
97012011-11-14 Yao Qi <yao@codesourcery.com>
9702
9703 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9704 * mem-break.h: Declare.
9705 * tracepoint.c (cmd_qtstart): Move some code to ...
9706 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9707 New.
9708 (download_tracepoints): Move some code to ...
9709 (download_tracepoint_1): ... here. New.
9710
86a30030
YQ
97112011-11-08 Yao Qi <yao@codesourcery.com>
9712
9713 * remote-utils.c (relocate_instruction): A comment fix.
9714
8d26e50c
JB
97152011-11-07 Joel Brobecker <brobecker@adacore.com>
9716
9717 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9718 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9719 dr_status_mirror and dr_control_mirror from debug_reg_state.
9720 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9721 (i386_initial_stuff): Remove use of deleted globals.
9722 (i386_get_thread_context, i386_set_thread_context,
9723 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9724 from debug_reg_state.
9725
a59306a3
YQ
97262011-11-05 Yao Qi <yao@codesourcery.com>
9727
9728 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9729 address as TPOINT's.
9730
3065dfb6
SS
97312011-11-02 Stan Shebs <stan@codesourcery.com>
9732
9733 * tracepoint.c (agent_mem_read_string): New function.
9734 (eval_agent_expr): Call it for tracenz.
9735 * server.c (handle_query): Report support for tracenz.
9736
fd0d8c7c
YQ
97372011-11-02 Yao Qi <yao@codesourcery.com>
9738
9739 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9740
609086b1
YQ
97412011-11-02 Yao Qi <yao@codesourcery.com>
9742
9743 * target.h: Fix a typo in comment.
9744
b9fd1791
PA
97452011-10-31 Pedro Alves <pedro@codesourcery.com>
9746
9747 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9748 clobber the breakpoints' shadows with fast tracepoint jumps.
9749 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9750 * target.c (write_inferior_memory): Also pass MYADDR down to
9751 check_mem_write.
9752
03583c20
UW
97532011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9754
9755 * configure.ac: Check support for personality routine.
9756 * configure: Regenerate.
9757 * config.in: Likewise.
9758 * linux-low.c: Include <sys/personality.h>.
9759 Define ADDR_NO_RANDOMIZE if necessary.
9760 (linux_create_inferior): Disable address space randomization when
9761 forking inferior, if requested.
9762 (linux_supports_disable_randomization): New function.
9763 (linux_target_ops): Install it.
9764 * server.h (disable_randomization): Declare.
9765 * server.c (disable_randomization): New global variable.
9766 (handle_general_set): Handle QDisableRandomization.
9767 (handle_query): Likewise for qSupported.
9768 (main): Support --disable-randomization and --no-disable-randomization
9769 command line arguments.
9770 * target.h (struct target_ops): Add supports_disable_randomization.
9771 (target_supports_disable_randomization): New macro.
9772
723b724b
MF
97732011-09-29 Mike Frysinger <vapier@gentoo.org>
9774
9775 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9776 ifdef check.
9777 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9778 [!PT_GETDSBT] (target_loadmap): New definition.
9779 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9780 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9781 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9782 and PT_GETDSBT to LINUX_LOADMAP.
9783 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9784 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9785
55329a5c 97862011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9787
9788 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9789 (arm_linux_hwbp_cap): New static variable.
9790 (arm_linux_get_hwbp_cap): Replace by ...
9791 (arm_linux_init_hwbp_cap): ... this new function.
9792 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9793 (arm_linux_get_hw_watchpoint_count): Likewise.
9794 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9795 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9796 (arm_prepare_to_resume): Use perror_with_name instead of error.
9797
55329a5c 97982011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9799
9800 * linux-arm-low.c: Include <signal.h>.
9801 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9802 (struct arm_linux_hwbp_cap): New data type.
9803 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9804 (struct arm_linux_hw_breakpoint): New data type.
9805 (MAX_BPTS, MAX_WPTS): Define.
9806 (struct arch_process_info, struct arch_lwp_info): New data types.
9807 (arm_linux_get_hwbp_cap): New function.
9808 (arm_linux_get_hw_breakpoint_count): Likewise.
9809 (arm_linux_get_hw_watchpoint_count): Likewise.
9810 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9811 (arm_hwbp_control_initialize): Likewise.
9812 (arm_hwbp_control_is_enabled): Likewise.
9813 (arm_hwbp_control_is_initialized): Likewise.
9814 (arm_hwbp_control_disable): Likewise.
9815 (arm_linux_hw_breakpoint_equal): Likewise.
9816 (arm_linux_hw_point_initialize): Likewise.
9817 (struct update_registers_data): New data structure.
9818 (update_registers_callback: New function.
9819 (arm_insert_point): Likewise.
9820 (arm_remove_point): Likewise.
9821 (arm_stopped_by_watchpoint): Likewise.
9822 (arm_stopped_data_address): Likewise.
9823 (arm_new_process): Likewise.
9824 (arm_new_thread): Likewise.
9825 (arm_prepare_to_resume): Likewise.
9826 (the_low_target): Register arm_insert_point, arm_remove_point,
9827 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9828 arm_new_thread, and arm_prepare_to_resume.
9829
6b9801d4
SS
98302011-09-15 Stan Shebs <stan@codesourcery.com>
9831
9832 * server.h (struct emit_ops): Add compare-goto fields.
9833 * tracepoint.c (gdb_agent_op_sizes): New table.
9834 (emit_eq_goto): New function.
9835 (emit_ne_goto): New function.
9836 (emit_lt_goto): New function.
9837 (emit_le_goto): New function.
9838 (emit_gt_goto): New function.
9839 (emit_ge_goto): New function.
9840 (is_goto_target): New function.
9841 (compile_bytecodes): Recognize special cases of compare-goto
9842 combinations and call specialized emitters for them.
9843 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9844 (amd64_emit_ne_goto): New function.
9845 (amd64_emit_lt_goto): New function.
9846 (amd64_emit_le_goto): New function.
9847 (amd64_emit_gt_goto): New function.
9848 (amd64_emit_ge_goto): New function.
9849 (amd64_emit_ops): Add the new functions.
9850 (i386_emit_eq_goto): New function.
9851 (i386_emit_ne_goto): New function.
9852 (i386_emit_lt_goto): New function.
9853 (i386_emit_le_goto): New function.
9854 (i386_emit_gt_goto): New function.
9855 (i386_emit_ge_goto): New function.
9856 (i386_emit_ops): Add the new functions.
9857
bf15cbda
SS
98582011-09-08 Stan Shebs <stan@codesourcery.com>
9859
9860 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9861 (i386_emit_epilogue): Restore %ebx.
9862
943ca1dd
JZ
98632011-08-31 Jie Zhang <jzhang918@gmail.com>
9864
9865 * server.c (step_thread): Remove definition.
9866 (process_serial_event): Don't handle Hs.
9867 * server.h (step_thread): Remove declaration.
9868 * target.c (set_desired_inferior): Remove use of step_thread.
9869
e3deef73
LM
98702011-08-24 Luis Machado <lgustavo@codesourcery.com>
9871
9872 * linux-low.c: Include linux-procfs.h.
9873 (linux_attach_lwp_1): Update comments.
9874 (linux_attach): Scan for existing threads when attaching to a
9875 process that is the tgid.
9876 * Makefile.in: Update dependencies.
9877
13da1c97
LM
98782011-08-24 Luis Machado <lgustavo@codesourcery.com>
9879
9880 * configure.srv: Add linux-procfs.o dependencies.
9881
881127c9
YQ
98822011-08-14 Yao Qi <yao@codesourcery.com>
9883
9884 * target.h (struct target_ops): Fix indent.
9885 * win32-low.c (win32_target_ops): Fix comment.
9886
58dbd541
YQ
98872011-08-14 Andrew Jenner <andrew@codesourcery.com>
9888 Yao Qi <yao@codesourcery.com>
9889
9890 * Makefile.in (clean): Remove tic6x-*.c files.
9891 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9892 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9893 (tic6x-c64xp-linux.c): Likewise.
9894 * configure.srv: Add support for tic6x-*-uclinux.
9895 * linux-tic6x-low.c: New.
9896 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9897
78d85199
YQ
98982011-08-14 Andrew Stubbs <ams@codesourcery.com>
9899 Yao Qi <yao@codesourcery.com>
9900
9901 * target.h (struct target_ops): Add read_loadmap.
9902 * linux-low.c (struct target_loadseg): New type.
9903 (struct target_loadmap): New type.
9904 (linux_read_loadmap): New function.
9905 (linux_target_ops): Add linux_read_loadmap.
9906 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9907 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9908 to NULL.
78d85199 9909
a959a88d
EZ
99102011-08-05 Eli Zaretskii <eliz@gnu.org>
9911
9912 * win32-low.c: Include <stdint.h>.
9913
1ced966e
PA
99142011-07-22 Pedro Alves <pedro@codesourcery.com>
9915
9916 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9917 to the inferior here.
9918 (i386_remove_aligned_watchpoint): Ditto.
9919 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9920 fit part of the watchpoint in the debug registers.
9921 (i386_update_inferior_debug_regs): New.
9922 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9923 registers, and only update the inferior on success.
9924 (i386_low_remove_watchpoint): Ditto.
9925
d26e3629
KY
99262011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9927
9928 * linux-low.c (compare_ints, unique, list_threads, show_process,
9929 linux_core_of_thread): Delete.
9930 (linux_target_ops): Change linux_core_of_thread to
9931 linux_common_core_of_thread.
9932 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9933 * utils.c (malloc_failure): Change type of argument.
9934 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9935 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9936 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9937 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9938 (IPA_OBJS): Add common-utils-ipa.o.
9939 (ptid_h, linux_osdata_h): New macros.
9940 (server_h): Add common/common-utils.h, common/xml-utils.h,
9941 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9942 common/ptid.h.
9943 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9944 ptid.o, buffer.o): New rules.
9945 (linux-low.o): Add common/linux-osdata.h as a dependency.
9946 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9947 * configure.ac: Add AC_HEADER_DIRENT check.
9948 * config.in: Regenerate.
9949 * configure: Regenerate.
9950 * remote-utils.c (xml_escape_text): Delete.
9951 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9952 buffer_xml_printf): Move to common/buffer.c.
9953 * server.c (main): Remove call to initialize_inferiors.
9954 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9955 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9956 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9957 internal_error, gdb_assert, gdb_assert_fail): Delete.
9958 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9959 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9960 common/buffer.h.
9961 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9962 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9963 initialize_inferiors): Delete.
9964
2275a1a7
PA
99652011-07-20 Pedro Alves <pedro@codesourcery.com>
9966
9967 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9968 symbol error.
9969
0a5b1e09
PA
99702011-05-31 Pedro Alves <pedro@codesourcery.com>
9971
9972 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9973 assertion.
9974 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9975
6938fd34
YQ
99762011-05-26 Yao Qi <yao@codesourcery.com>
9977
9978 * Makefile.in (thread-db.o): Track dependence to
9979 common/gdb_thread_db.h.
9980 * thread-db.c: include gdb_thread_db.h from right place.
9981
b481f9e0
TT
99822011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9983
9984 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9985 __FILE__ and __LINE__ to internal_error.
9986
98a5dd13
DE
99872011-05-13 Doug Evans <dje@google.com>
9988
9989 * thread-db.c (try_thread_db_load_from_sdir): New function.
9990 (try_thread_db_load_from_dir): New function.
9991 (thread_db_load_search): Handle $sdir, ignore $pdir.
9992 Remove trying of system directories if search of
9993 libthread-db-search-path fails, that is now done via $sdir.
9994
d248b706
KY
99952011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9996
9997 * server.c (handle_query): Add EnableDisableTracepoints to the list
9998 of supported features.
43aaf8b6 9999 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10000 tracepoints.
43aaf8b6
PA
10001 (cmd_qtenable_disable): New.
10002 (cmd_qtstart): Install tracepoints even if disabled.
10003 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10004 receiving a QTEnable or QTDisable packet.
10005 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10006 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10007 tracepoints.
10008 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10009
84e578fb
DE
100102011-05-10 Doug Evans <dje@google.com>
10011
10012 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10013
71f55dd8
DE
100142011-05-04 Doug Evans <dje@google.com>
10015
10016 * linux-low.c (linux_join): Skip process lookup.
10017 * spu-low.c (spu_join): Ditto.
10018 * server.c (join_inferiors_callback): Delete.
10019 (process_serial_event): For 'D' packet (detach) call join_inferior
10020 directly.
10021
4d393d60
JM
100222011-05-04 Joseph Myers <joseph@codesourcery.com>
10023
10024 * README: Don't mention xscale*-*-linux*.
10025 * configure.srv (xscale*-*-linux*): Don't handle target.
10026
b00ad6ff
NF
100272011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10028
10029 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10030 casting pointers.
10031 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10032 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10033 (i386_emit_void_call_2): Likewise.
10034
af96c192
YQ
100352011-04-26 Yao Qi <yao@codesourcery.com>
10036
43aaf8b6
PA
10037 * linux-low.c: Move common macros to linux-ptrace.h.
10038 Include linux-ptrace.h.
af96c192
YQ
10039 * Makefile.in (linux_ptrace_h): New.
10040 (linux-low.o): Depends on linux-ptrace.h.
10041
03f2bd59
JK
100422011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10043
10044 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10045 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10046 (remote_prepare): New function with most of the TCP code from ...
10047 (remote_open): ... here. Detect PORT here unconditionally. Move also
10048 setting transport_is_reliable.
10049 * server.c (run_once): New variable.
10050 (gdbserver_usage): Document it.
10051 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10052 the first run if RUN_ONCE.
10053 * server.h (run_once, remote_prepare): New declarations.
10054
7a9dd1b2
TT
100552011-04-19 Tom Tromey <tromey@redhat.com>
10056
10057 * win32-low.c (handle_load_dll): Remove duplicate "the".
10058
81239425
PM
100592011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10060
10061 Remove support for old Cygwin 1.5 versions.
10062 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10063 function to avoid warning.
10064 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10065 warning.
10066
9e0627f1
PM
100672011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10068
10069 * gdbserver/server.h (Macro _): Define it if not available.
10070
588eebee
MS
100712011-03-14 Michael Snyder <msnyder@vmware.com>
10072
348af9f7 10073 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10074
43f70d4c
JB
100752011-03-10 Joel Brobecker <brobecker@adacore.com>
10076
10077 * Makefile.in (maintainer-clean realclean distclean): Remove
10078 "make ... subdir_do" command.
10079
348af9f7
MS
100802011-03-10 Michael Snyder <msnyder@vmware.com>
10081
10082 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10083
10084 * server.c (handle_v_run): Free alloced buffer on early return.
10085
e637a4f5
YQ
100862011-03-09 Yao Qi <yao@codesourcery.com>
10087
10088 Revert:
10089 2011-03-04 Yao Qi <yao@codesourcery.com>
10090
10091 * Makefile.in: Remove GNU make feature --directory.
10092
10093 2011-03-05 Yao Qi <yao@codesourcery.com>
10094
10095 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10096 (subdir_do): New make target. Copied from gdb/Makefile.
10097 (maintainer-clean, realclean, distclean, clean): Call corresponding
10098 make targets in common/Makefile.
10099
10100 2011-02-11 Yao Qi <yao@codesourcery.com>
10101
10102 * configure.ac: Call AC_PROG_RANLIB.
10103 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10104 * configure: Regenerate.
10105
e6edda56
JK
101062011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10107
10108 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10109
e5141119
JB
101102011-03-06 Yao Qi <yao@codesourcery.com>
10111
10112 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10113
64794aa4
JB
101142011-03-05 Yao Qi <yao@codesourcery.com>
10115
10116 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10117 (subdir_do): New make target. Copied from gdb/Makefile.
10118 (maintainer-clean, realclean, distclean, clean): Call corresponding
10119 make targets in common/Makefile.
10120
7a762829
YQ
101212011-03-04 Yao Qi <yao@codesourcery.com>
10122
10123 * Makefile.in: Remove GNU make feature --directory.
10124
348af9f7
MS
101252011-03-04 Michael Snyder <msnyder@vmware.com>
10126
10127 * server.c (queue_stop_reply): Call xmalloc not malloc.
10128
101292011-03-02 Michael Snyder <msnyder@vmware.com>
10130
10131 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10132
9f72fee2
MS
101332011-02-28 Michael Snyder <msnyder@vmware.com>
10134
588eebee
MS
10135 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10136 (cmd_qtframe): Ditto.
10137 (cmd_qtbuffer): Ditto.
10138 (cmd_bigqtbuffer): Ditto.
10139
9f72fee2
MS
10140 * utils.c (decimal2str): Initialize 'width' to nine, then
10141 don't mess with it.
10142
8040bd49
UW
101432011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10144
10145 * hostio.c (require_data): Free *data, not data.
10146
7e52cbd0
JK
101472011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10148
10149 * hostio.c (require_data): Use free, not xfree.
10150
9130f83e
MS
101512011-02-27 Michael Snyder <msnyder@vmware.com>
10152
4b812f4e
MS
10153 * server.c (handle_query): Discard unused value.
10154
9130f83e
MS
10155 * hostio.c (require_data): Free malloc memory before returning
10156 error.
10157
69d37113
MS
101582011-02-26 Michael Snyder <msnyder@vmware.com>
10159
10160 * linux-low.c (list_threads): Call closedir for dirent.
10161
35f5825a
MS
101622011-02-27 Michael Snyder <msnyder@vmware.com>
10163
2a589cef
MS
10164 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10165 a case statement falls through.
10166
0adea5f7
MS
10167 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10168
35f5825a
MS
10169 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10170 in comparison.
10171
238f1c74
MS
101722011-02-26 Michael Snyder <msnyder@vmware.com>
10173
10174 * utils.c (decimal2str): Eliminate dead code and dead param.
10175 (pulongest): Drop dead param from call to decimal2str.
10176 (plongest): Ditto.
10177
633ff500
JB
101782011-02-24 Joel Brobecker <brobecker@adacore.com>
10179
10180 Revert the following patch (not approved yet):
10181 2011-02-21 Hui Zhu <teawater@gmail.com>
10182 * tracepoint.c (tp_printf): New function.
10183 (eval_agent_expr): Handle gdb_agent_op_printf.
10184
f9c6ff72
HZ
101852011-02-21 Hui Zhu <teawater@gmail.com>
10186
10187 * tracepoint.c (tp_printf): New function.
10188 (eval_agent_expr): Handle gdb_agent_op_printf.
10189
94d5e490
TT
101902011-02-18 Tom Tromey <tromey@redhat.com>
10191
10192 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10193 (tracepoint.o): Likewise.
10194 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10195 (gdb_agent_op_names): Likewise.
10196
c7f96d2b
TT
101972011-02-18 Tom Tromey <tromey@redhat.com>
10198
10199 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10200 gdb_agent_op_rot>: New constants.
10201 (gdb_agent_op_names): Add pick and roll.
10202 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10203 cases.
10204
0feedb2c
JK
102052011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10206
10207 * aclocal.m4: Regenerated with aclocal-1.11.1.
10208
b3b9301e
PA
102092011-02-14 Pedro Alves <pedro@codesourcery.com>
10210
10211 * server.c (handle_qxfer_traceframe_info): New.
10212 (qxfer_packets): Register "traceframe-info".
10213 (handle_query): Report support for qXfer:traceframe-info:read+.
10214 * tracepoint.c (match_blocktype): New.
10215 (traceframe_find_block_type): Rename to ...
10216 (traceframe_walk_blocks): ... this. Add callback filter argument,
10217 and use it.
10218 (traceframe_find_block_type): New, reimplemented on top of
10219 traceframe_walk_blocks.
10220 (build_traceframe_info_xml): New.
10221 (traceframe_read_info): New.
10222 * server.h (traceframe_read_info): Declare.
10223
4f3e6fb7
YQ
102242011-02-11 Yao Qi <yao@codesourcery.com>
10225
10226 * configure.ac: Call AC_PROG_RANLIB.
10227 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10228 * configure: Regenerate.
10229
764880b7
PA
102302011-02-07 Pedro Alves <pedro@codesourcery.com>
10231
10232 * server.c (gdb_read_memory): Change return semantics to allow
10233 partial transfers.
10234 (handle_search_memory_1): Adjust.
10235 (process_serial_event) <'m' packet>: Handle partial transfers.
10236 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10237
1c79eb8a
PA
102382011-01-28 Pedro Alves <pedro@codesourcery.com>
10239
10240 * regcache.c (init_register_cache): Initialize
10241 regcache->register_status.
10242 (free_register_cache): Release regcache->register_status.
10243 (regcache_cpy): Copy register_status.
10244 (registers_to_string): Print 'x's for unavailable registers.
10245 (supply_register): Mark the register's status valid or
10246 unavailable, depending on whether a buffer was passed in or not.
10247 (supply_register_zeroed): New.
10248 (supply_regblock): Mark the registers' status valid or
10249 unavailable, depending on whether a buffer was passed in or not.
10250 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10251 (struct regcache): New `register_status' field.
10252 (supply_register_zeroed): Declare.
10253 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10254 supply_register_zeroed, rather than passing a NULL buffer to
10255 supply_register.
10256 * tracepoint.c (fetch_traceframe_registers): Update comment.
10257
85724a0e
PA
102582011-01-28 Pedro Alves <pedro@codesourcery.com>
10259
10260 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10261 buffer explicit.
10262
d08aafef
PA
102632011-01-25 Pedro Alves <pedro@codesourcery.com>
10264
10265 * server.h (decode_xfer_write): Change prototype.
10266 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10267 and don't extract the annex here.
10268 * server.c (decode_xfer_read): Remove `annex' parameter,
10269 and don't extract the annex here.
10270 (decode_xfer): New.
10271 (struct qxfer): New.
10272 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10273 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10274 (handle_qxfer_statictrace): New functions, abstracted out from
10275 handle_query, and made to use the struct qxfer interface.
10276 (handle_threads_qxfer_proper): Rename to ...
10277 (handle_qxfer_threads_proper): ... this.
10278 (handle_threads_qxfer): Rename to ...
10279 (handle_qxfer_threads): ... this. Adjust.
10280 (qxfer_packets): New array.
10281 (handle_qxfer): New function.
10282 (handle_query): Use handle_qxfer.
10283
493e2a69
MS
102842011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10285
10286 * gdbreplay.c: Shorten lines of >= 80 columns.
10287 * linux-low.c: Ditto.
10288 * linux-ppc-low.c: Ditto.
10289 * linux-s390-low.c: Ditto.
10290 * linux-sparc-low.c: Ditto.
10291 * linux-x86-low.c: Ditto.
10292 * linux-xtensa-low.c: Ditto.
10293 * mem-break.c: Ditto.
10294 * nto-low.c: Ditto.
10295 * regcache.h: Ditto.
10296 * remote-utils.c: Ditto.
10297 * server.c: Ditto.
10298 * server.h: Ditto.
10299 * thread-db.c: Ditto.
10300 * tracepoint.c: Ditto.
10301 * utils.c: Ditto.
10302 * win32-low.h: Ditto.
10303
44944448
JB
103042011-01-05 Joel Brobecker <brobecker@adacore.com>
10305
10306 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10307 update.
10308
71ce852c
JB
103092011-01-01 Joel Brobecker <brobecker@adacore.com>
10310
10311 * server.c (gdbserver_version): Update copyright year in version
10312 output.
10313 * gdbreplay.c (gdbreplay_version): Ditto.
10314
eb826dc6
MF
103152010-12-29 Jie Zhang <jie.zhang@analog.com>
10316
10317 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10318 * linux-bfin-low.c: New file.
10319 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10320 PT_DATA_ADDR for BFIN targets.
10321 * Makefile.in (SFILES): Add linux-bfin-low.c.
10322 (clean): Remove reg-bfin.c.
10323 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10324 * README: Mention supported Blackfin targets.
10325
39ab222a
MF
103262010-12-23 Mike Frysinger <vapier@gentoo.org>
10327
10328 * .gitignore: New file.
10329
a1f2ce7d
MF
103302010-11-16 Mike Frysinger <vapier@gentoo.org>
10331
10332 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10333
f474844c
JZ
103342010-10-22 Jie Zhang <jie@codesourcery.com>
10335
10336 * Makefile.in: Add FLAGS_TO_PASS variable.
10337 (install): Remove dependency of install-only and recursively
10338 invoke make for install-only.
10339
f1048712
DE
103402010-10-04 Doug Evans <dje@google.com>
10341
10342 * Makefile.in (uninstall): Use $(DESTDIR).
10343
b53a1623
PA
103442010-09-24 Pedro Alves <pedro@codesourcery.com>
10345
e6ee044d
PA
10346 PR gdb/11842
10347
b53a1623
PA
10348 * linux-x86-low.c (compat_siginfo_from_siginfo)
10349 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10350 si_code is < 0. Check for si_code == SI_TIMER before checking for
10351 si_code < 0.
10352
fa1bd1e4
JB
103532010-09-13 Joel Brobecker <brobecker@adacore.com>
10354
10355 * lynx-i386-low.c: New file.
10356 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10357
47fac8f8
JB
103582010-09-13 Joel Brobecker <brobecker@adacore.com>
10359
10360 * lynx-low.c (ptrace_request_to_str): Remove handling for
10361 request values that have been removed in LynxOS 5.x.
10362
1adfc54d
JB
103632010-09-13 Joel Brobecker <brobecker@adacore.com>
10364
10365 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10366 <ptrace.h>
10367
c2a66c29
NS
103682010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10369
10370 * configure.ac: Add --enable-inprocess-agent option.
10371 * configure: Rebuilt.
10372
32fcada3
YQ
103732010-09-06 Yao Qi <yao@codesourcery.com>
10374
10375 * linux-low.c (linux_kill): Remove unused variable.
10376 (linux_stabilize_threads): Likewise.
10377 * server.c (start_inferior): Likewise.
10378 (queue_stop_reply_callback): Likewise.
10379 * tracepoint.c (do_action_at_tracepoint): Likewise.
10380
0cccb683
YQ
103812010-09-06 Yao Qi <yao@codesourcery.com>
10382
10383 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10384 on return.
10385
423ec54c
JK
103862010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10387
10388 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10389
12ac6819
PA
103902010-09-06 Pedro Alves <pedro@codesourcery.com>
10391
10392 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10393 "$(IPA_DEPFILES)".
10394
8ed54b31
JB
103952010-09-01 Joel Brobecker <brobecker@adacore.com>
10396
10397 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10398 gdbserver/lynx-ppc-low.c: New files.
10399 * Makefile.in (lynx_low_h): New variable.
10400 (lynx-low.o, lynx-ppc-low.o): New rules.
10401 * configure.ac: On LynxOS, link with -lnetinet.
10402 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10403 * configure: regenerate.
10404
bb0116a4
JB
104052010-09-01 Joel Brobecker <brobecker@adacore.com>
10406
10407 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10408 * configure.ac: Add check for vasprintf and vsnprintf.
10409 * configure, config.in: Regenerate.
10410 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10411
a778ab81 104122010-09-01 Joel Brobecker <brobecker@adacore.com>
10413
10414 * gdbreplay.c: Move include of alloca.h up, next to include of
10415 malloc.h.
10416 * server.h: Add include of malloc.h.
10417 * mem-break.c: Remove include of malloc.h.
10418 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10419
8b034a19 104202010-09-01 Joel Brobecker <brobecker@adacore.com>
10421
10422 * Makefile.in (memmem.o): Build with -Wno-error.
10423
104242010-09-01 Joel Brobecker <brobecker@adacore.com>
10425
10426 * utils.c (xsnprintf): Make non-static.
10427 * server.h: Add xsnprintf declaration.
10428 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10429 replace calls to snprintf by calls to xsnprintf throughout.
10430
104312010-09-01 Joel Brobecker <brobecker@adacore.com>
10432
10433 * configure.ac: Add configure check for alloca.
10434 * configure, config.in: Regenerate.
10435 * server.h: Include alloca.h if it exists.
10436 * gdbreplay.c: Include alloca.h if it exists.
10437
1a981360
PA
104382010-08-28 Pedro Alves <pedro@codesourcery.com>
10439
10440 * linux-low.c (__SIGRTMIN): Define if not already defined.
10441 (linux_create_inferior): Check for __ANDROID__ rather than
10442 __SIGRTMIN.
10443 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10444 are already deferred.
10445 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10446 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10447 stopped and already has a pending signal to report.
10448 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10449 a pending signal to report or is moving out of a jump pad.
10450 (linux_init_signals): Check for __ANDROID__ rather than
10451 __SIGRTMIN.
10452
b4d51a55
PA
104532010-08-28 Pedro Alves <pedro@codesourcery.com>
10454
10455 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10456 debug_threads check. Avoid a linear search when not doing debug
10457 output.
10458
ec48365d
PA
104592010-08-27 Pedro Alves <pedro@codesourcery.com>
10460
10461 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10462 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10463 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10464 (process_event): Change local fd's type to gdb_fildes_t.
10465 (create_file_handler): Adjust prototype.
10466 (delete_file_handler): Adjust prototype.
10467 (handle_file_event): Adjust prototype. Use pfildes.
10468 (create_file_event): Adjsut prototype.
10469 * remote-utils.c (remote_desc, listen_desc): Change type to
10470 gdb_fildes_t.
10471 * server.h: New gdb_fildes_t typedef.
10472 [USE_WIN32API]: Include winsock2.h.
10473 (delete_file_handler, add_file_handler): Adjust prototypes.
10474 (pfildes): Declare.
10475 * utils.c (pfildes): New.
10476
854d88f0
PA
104772010-08-27 Pedro Alves <pedro@codesourcery.com>
10478
10479 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10480 * configure: Regenerate.
10481
0146f85b
PA
104822010-08-27 Pedro Alves <pedro@codesourcery.com>
10483
10484 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10485 (linux_done_accessing_memory): ... this.
10486 (linux_target_ops): Adjust.
10487 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10488 * nto-low.c (nto_target_ops): Adjust comment.
10489 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10490 * spu-low.c (spu_target_ops): Adjust comment.
10491 * target.h (target_ops): Rename unprepare_to_access_memory field
10492 to done_accessing_memory.
10493 (unprepare_to_access_memory): Rename to ...
10494 (done_accessing_memory): ... this.
10495
90d74c30
PA
104962010-08-26 Pedro Alves <pedro@codesourcery.com>
10497
10498 * linux-low.c (linux_prepare_to_access_memory): New.
10499 (linux_unprepare_to_access_memory): New.
10500 (linux_target_ops): Install them.
10501 * server.c (read_memory): Rename to ...
10502 (gdb_read_memory): ... this. Use
10503 prepare_to_access_memory/prepare_to_access_memory.
10504 (write_memory): Rename to ...
10505 (gdb_write_memory): ... this. Use
10506 prepare_to_access_memory/prepare_to_access_memory.
10507 (handle_search_memory_1): Adjust.
10508 (process_serial_event): Adjust.
10509 * target.h (struct target_ops): New fields
10510 prepare_to_access_memory and unprepare_to_access_memory.
10511 (prepare_to_access_memory, unprepare_to_access_memory): New.
10512 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10513 prepare_to_access_memory/prepare_to_access_memory.
10514 * nto-low.c (nto_target_ops): Adjust.
10515 * spu-low.c (spu_target_ops): Adjust.
10516 * win32-low.c (win32_target_ops): Adjust.
10517
fd467969
PA
105182010-08-26 Pedro Alves <pedro@codesourcery.com>
10519
10520 * Makefile.in (WARN_CFLAGS): Get it from configure.
10521 (WERROR_CFLAGS): New.
10522 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10523 * configure.ac: Introduce --enable-werror, which adds -Werror to
10524 the compiler command line. Enabled by default. Disable with
10525 --disable-werror. Add -Wdeclaration-after-statement
10526 Wpointer-arith and -Wformat-nonliteral to warning flags.
10527 * configure: Regenerate.
10528
331e2f5f
PA
105292010-08-26 Pedro Alves <pedro@codesourcery.com>
10530
10531 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10532
e581f2b4
PA
105332010-08-26 Pedro Alves <pedro@codesourcery.com>
10534
10535 * gdbreplay.c (remote_error): New.
10536 (gdbchar): New.
10537 (expect): Use gdbchar. Check for error reading from GDB.
10538 Clarify sync error output.
10539 (play): Check for errors writing to GDB.
10540 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10541 * remote-utils.c (getpkt): Check for errors writing to the remote
10542 descriptor.
10543
3c11dd79
PA
105442010-08-25 Pedro Alves <pedro@codesourcery.com>
10545
10546 * linux-low.c (linux_wait_1): Move non-debugging code out of
10547 `debug_threads' control.
10548
d20a8ad9
PA
105492010-08-25 Pedro Alves <pedro@codesourcery.com>
10550
10551 * linux-low.c (linux_wait_1): Don't set last_status here.
10552 * server.c (push_event, queue_stop_reply_callback): Assert we're
10553 not pushing a TARGET_WAITKIND_IGNORE event.
10554 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10555 (myresume, handle_target_event): Set the thread's last_resume_kind
10556 and last_status from the target returned status.
10557
964e4306
PA
105582010-08-25 Pedro Alves <pedro@codesourcery.com>
10559
10560 PR threads/10729
10561
10562 * linux-x86-low.c (update_debug_registers_callback): New.
10563 (i386_dr_low_set_addr): Use it.
10564 (i386_dr_low_get_addr): New.
10565 (i386_dr_low_set_control): Use update_debug_registers_callback.
10566 (i386_dr_low_get_control): New.
10567 (i386_dr_low_get_status): Adjust.
10568 * linux-low.c (linux_stop_lwp): New.
10569 * linux-low.h (linux_stop_lwp): Declare.
10570
10571 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10572 argument instead of a i386_debug_reg_state.
10573 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10574 a i386_debug_reg_state.
10575 (i386_insert_aligned_watchpoint): Adjust.
10576 (i386_remove_aligned_watchpoint): Adjust.
10577 (i386_low_stopped_data_address): Read the debug registers from the
10578 inferior instead of from the mirrors.
10579 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10580 (i386_dr_low_get_addr): Declare.
10581 (i386_dr_low_get_control): Declare.
10582 (i386_dr_low_get_status): Change prototype.
10583
10584 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10585 (i386_dr_low_get_addr): New.
10586 (i386_dr_low_get_control): New.
10587 (i386_dr_low_get_status): Adjust prototype. Return
10588 dr_status_mirror.
10589 (i386_initial_stuff): Clear dr_status_mirror and
10590 dr_control_mirror.
10591 (i386_get_thread_context): Adjust.
10592 (i386_set_thread_context): Adjust.
10593 (i386_thread_added): Adjust.
10594
5f21a75b
PA
105952010-08-24 Pedro Alves <pedro@codesourcery.com>
10596
10597 * linux-low.h (linux_thread_area): Delete declaration.
10598
3e4c1235
TS
105992010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10600
10601 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10602 after its termination.
10603
1971b033
PA
106042010-08-09 Pedro Alves <pedro@codesourcery.com>
10605
10606 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10607 (gdb_wants_all_stopped): Delete.
10608 (linux_wait_1): Don't call them.
10609 * server.c (handle_v_cont): Tag all threads as want-stopped.
10610 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10611 stopped as "client-wants-stopped".
10612
310444ac
PA
106132010-07-31 Pedro Alves <pedro@codesourcery.com>
10614
10615 * Makefile.in (signals_h): New.
10616 (server_h): Depend on it.
10617 (server.o): Don't depend on $(signals_def).
10618 (signals.o): Depend on $(signals_def).
10619
a19cae16
JK
106202010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10621
10622 * Makefile.in (signals_def): New.
10623 (server_h): Append include/gdb/signals.h and signals_def.
10624 (server.o): Append signals_def.
10625
30d50328
JK
106262010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10627
10628 * server.c (handle_target_event): Use target_signal_to_host for
10629 resume_info.sig initialization.
10630 * target.h (struct thread_resume) <sig>: New comment.
10631
5c3216e2
OS
106322010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10633
c6f46ca0
OS
10634 * server.c (handle_query): strcpy() the returned string from paddress()
10635 instead of sprintf().
5c3216e2
OS
10636 * utils.c (paddress): Return phex_nz().
10637
6bd31874
JB
106382010-07-07 Joel Brobecker <brobecker@adacore.com>
10639
10640 * server.c (handle_v_cont): Call mourn_inferior if process
10641 just exited.
10642 (myresume): Likewise.
10643
0fb4aa4b
PA
106442010-07-01 Pedro Alves <pedro@codesourcery.com>
10645
10646 Static tracepoints, and integration with UST.
10647
10648 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10649 * mem-break.c (uninsert_all_breakpoints)
10650 (reinsert_all_breakpoints): New.
10651 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10652 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10653 (gdb_agent_ust_loaded, helper_thread_id)
10654 (gdb_agent_helper_thread_id): New macros.
10655 (struct ipa_sym_addresses): Add addr_ust_loaded,
10656 addr_helper_thread_id, addr_cmd_buf.
10657 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10658 (in_process_agent_loaded_ust): New.
10659 (write_e_ust_not_loaded): New.
10660 (maybe_write_ipa_ust_not_loaded): New.
10661 (struct collect_static_trace_data_action): New.
10662 (enum tracepoint_type) <static_tracepoint>: New.
10663 (struct tracepoint) <handle>: Mention static tracepoints.
10664 (struct static_tracepoint_ctx): New.
10665 (CMD_BUF_SIZE): New.
10666 (add_tracepoint_action): Handle static tracepoint actions.
10667 (unprobe_marker_at): New.
10668 (clear_installed_tracepoints): Handle static tracepoints.
10669 (cmd_qtdp): Handle static tracepoints.
10670 (probe_marker_at): New.
10671 (cmd_qtstart): Handle static tracepoints.
10672 (response_tracepoint): Handle static tracepoints.
10673 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10674 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10675 (get_context_regcache): Handle static tracepoints.
10676 (do_action_at_tracepoint): Handle static tracepoint actions.
10677 (traceframe_find_block_type): Handle static trace data blocks.
10678 (traceframe_read_sdata): New.
10679 (download_tracepoints): Download static tracepoint actions.
10680 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10681 (GDB_PROBE_NAME): New.
10682 (ust_ops): New.
10683 (GET_UST_SYM): New.
10684 (USTF): New.
10685 (dlsym_ust): New.
10686 (ust_marker_to_static_tracepoint): New.
10687 (gdb_probe): New.
10688 (collect_ust_data_at_tracepoint): New.
10689 (gdb_ust_probe): New.
10690 (UNIX_PATH_MAX, SOCK_DIR): New.
10691 (gdb_ust_connect_sync_socket): New.
10692 (resume_thread, stop_thread): New.
10693 (run_inferior_command): New.
10694 (init_named_socket): New.
10695 (gdb_ust_socket_init): New.
10696 (cstr_to_hexstr): New.
10697 (next_st): New.
10698 (first_marker, next_marker): New.
10699 (response_ust_marker): New.
10700 (cmd_qtfstm, cmd_qtsstm): New.
10701 (unprobe_marker_at, probe_marker_at): New.
10702 (cmd_qtstmat, gdb_ust_thread): New.
10703 (gdb_ust_init): New.
10704 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10705 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10706 (ST_REGENTRY): New.
10707 (x86_64_st_collect_regmap): New.
10708 (X86_64_NUM_ST_COLLECT_GREGS): New.
10709 (AMD64_RIP_REGNUM): New.
10710 (supply_static_tracepoint_registers): New.
10711 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10712 (ST_REGENTRY): New.
10713 (i386_st_collect_regmap): New.
10714 (i386_NUM_ST_COLLECT_GREGS): New.
10715 (supply_static_tracepoint_registers): New.
10716 * server.c (handle_query): Handle qXfer:statictrace:read.
10717 <qSupported>: Report support for StaticTracepoints, and
10718 qXfer:statictrace:read features.
10719 * server.h (traceframe_read_sdata)
10720 (supply_static_tracepoint_registers): Declare.
10721 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10722 (unpack_varlen_hex): Include in IPA build.
10723 * Makefile.in (ustlibs, ustinc): New.
10724 (IPA_OBJS): Add remote-utils-ipa.o.
10725 ($(IPA_LIB)): Link -ldl and -lpthread.
10726 (UST_CFLAGS): New.
10727 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10728 * config.in, configure: Regenerate.
10729
9e4344e5
PA
107302010-06-20 Ian Lance Taylor <iant@google.com>
10731 Pedro Alves <pedro@codesourcery.com>
10732
10733 * linux-x86-low.c (always_true): Delete.
10734 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10735 trying to fool the compiler with always_true.
10736
c6beb2cb
PA
107372010-06-20 Pedro Alves <pedro@codesourcery.com>
10738
10739 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10740 conditions in gdbserver.
10741
d2ed6730
UW
107422010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10743
10744 * spu-low.c (spu_read_memory): Wrap around local store limit.
10745 (spu_write_memory): Likewise.
10746
4e29fb54
PA
107472010-06-15 Pedro Alves <pedro@codesourcery.com>
10748
10749 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10750 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10751 LONGEST uses.
10752 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10753 uses.
10754 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10755 uses with LONGEST uses.
10756
6a271cae
PA
107572010-06-14 Stan Shebs <stan@codesourcery.com>
10758 Pedro Alves <pedro@codesourcery.com>
10759
10760 Bytecode compiler.
10761
10762 * linux-x86-low.c: Include limits.h.
10763 (add_insns): New.
10764 (always_true): New.
10765 (EMIT_ASM): New.
10766 (EMIT_ASM32): New.
10767 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10768 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10769 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10770 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10771 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10772 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10773 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10774 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10775 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10776 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10777 (amd64_emit_void_call_2): New.
10778 (amd64_emit_ops): New.
10779 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10780 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10781 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10782 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10783 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10784 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10785 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10786 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10787 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10788 (i386_emit_stack_adjust, i386_emit_int_call_1)
10789 (i386_emit_void_call_2): New.
10790 (i386_emit_ops): New.
10791 (x86_emit_ops): New.
10792 (the_low_target): Install x86_emit_ops.
10793 * server.h (struct emit_ops): New.
10794 (get_raw_reg_func_addr): Declare.
10795 (current_insn_ptr, emit_error): Declare.
10796 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10797 (set_trace_state_variable_value): New defines.
10798 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10799 addr_get_trace_state_variable_value and
10800 addr_set_trace_state_variable_value.
10801 (symbol_list): New fields for get_raw_reg,
10802 get_trace_state_variable_value and set_trace_state_variable_value.
10803 (condfn): New typedef.
10804 (struct tracepoint): New field `compiled_cond'.
10805 (do_action_at_tracepoint): Clear compiled_cond.
10806 (get_trace_state_variable_value, set_trace_state_variable_value):
10807 Export in the IPA.
10808 (condition_true_at_tracepoint): If there's a compiled condition,
10809 run that.
10810 (current_insn_ptr, emit_error): New globals.
10811 (struct bytecode_address): New.
10812 (get_raw_reg_func_addr): New.
10813 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10814 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10815 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10816 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10817 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10818 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10819 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10820 (compile_tracepoint_condition, compile_bytecodes): New.
10821 * target.h (emit_ops): Forward declare.
10822 (struct target_ops): New field emit_ops.
10823 (target_emit_ops): New.
10824 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10825 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10826 * linux-low.c (linux_emit_ops): New.
10827 (linux_target_ops): Install it.
10828 * linux-low.h (struct linux_target_ops): New field emit_ops.
10829
92b72907
UW
108302010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10831
10832 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10833 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10834
fa593d66
PA
108352010-06-01 Pedro Alves <pedro@codesourcery.com>
10836 Stan Shebs <stan@codesourcery.com>
10837
10838 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10839 (all): Depend on $(extra_libraries).
10840 (install-only): Install the IPA.
10841 (IPA_OBJS, IPA_LIB): New.
10842 (clean): Remove the IPA lib.
10843 (IPAGENT_CFLAGS): New.
10844 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10845 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10846 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10847 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10848 * configure.ac: Check for atomic builtins support in the compiler.
10849 (IPA_DEPFILES, extra_libraries): Define.
10850 * configure.srv (ipa_obj): Add description.
10851 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10852 (i[34567]86-*-linux*): Set ipa_obj.
10853 (x86_64-*-linux*): Set ipa_obj.
10854 * linux-low.c (stabilizing_threads): New.
10855 (supports_fast_tracepoints): New.
10856 (linux_detach): Stabilize threads before detaching.
10857 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10858 the lwp is either not stabilizing, or is moving out of a jump pad.
10859 (linux_fast_tracepoint_collecting): New.
10860 (maybe_move_out_of_jump_pad): New.
10861 (enqueue_one_deferred_signal): New.
10862 (dequeue_one_deferred_signal): New.
10863 (linux_wait_for_event_1): If moving out of a jump pad, defer
10864 pending signals to later.
10865 (linux_stabilize_threads): New.
10866 (linux_wait_1): Check if threads need moving out of jump pads, and
10867 do it if so.
10868 (stuck_in_jump_pad_callback): New.
10869 (move_out_of_jump_pad_callback): New.
10870 (lwp_running): New.
10871 (linux_resume_one_lwp): Handle moving out of jump pads.
10872 (linux_set_resume_request): Dequeue deferred signals.
10873 (need_step_over_p): Also step over fast tracepoint jumps.
10874 (start_step_over): Also uninsert fast tracepoint jumps.
10875 (finish_step_over): Also reinsert fast tracepoint jumps.
10876 (linux_install_fast_tracepoint_jump): New.
10877 (linux_target_ops): Install linux_stabilize_threads and
10878 linux_install_fast_tracepoint_jump_pad.
10879 * linux-low.h (linux_target_ops) <get_thread_area,
10880 install_fast_tracepoint_jump_pad>: New fields.
10881 (struct lwp_info) <collecting_fast_tracepoint,
10882 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10883 (linux_get_thread_area): Declare.
10884 * linux-x86-low.c (jump_insn): New.
10885 (x86_get_thread_area): New.
10886 (append_insns): New.
10887 (push_opcode): New.
10888 (amd64_install_fast_tracepoint_jump_pad): New.
10889 (i386_install_fast_tracepoint_jump_pad): New.
10890 (x86_install_fast_tracepoint_jump_pad): New.
10891 (the_low_target): Install x86_get_thread_area and
10892 x86_install_fast_tracepoint_jump_pad.
10893 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10894 (struct fast_tracepoint_jump): New.
10895 (fast_tracepoint_jump_insn): New.
10896 (fast_tracepoint_jump_shadow): New.
10897 (find_fast_tracepoint_jump_at): New.
10898 (fast_tracepoint_jump_here): New.
10899 (delete_fast_tracepoint_jump): New.
10900 (set_fast_tracepoint_jump): New.
10901 (uninsert_fast_tracepoint_jumps_at): New.
10902 (reinsert_fast_tracepoint_jumps_at): New.
10903 (set_breakpoint_at): Use write_inferior_memory.
10904 (uninsert_raw_breakpoint): Use write_inferior_memory.
10905 (check_mem_read): Mask out fast tracepoint jumps.
10906 (check_mem_write): Mask out fast tracepoint jumps.
10907 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10908 (set_fast_tracepoint_jump): Declare.
10909 (delete_fast_tracepoint_jump)
10910 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10911 (reinsert_fast_tracepoint_jumps_at): Declare.
10912 * regcache.c: Don't compile many functions when building the
10913 in-process agent library.
10914 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10915 the register buffer in the heap.
10916 (free_register_cache): If the register buffer isn't owned by the
10917 regcache, don't free it.
10918 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10919 pre-existing register caches.
10920 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10921 type.
10922 (convert_ascii_to_int): : Constify `from' parameter type.
10923 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10924 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10925 the needed buffer in-place.
10926 (relocate_instruction): New.
10927 * server.c (handle_query) <qSymbols>: If the target supports
10928 tracepoints, give it a chance of looking up symbols. Report
10929 support for fast tracepoints.
10930 (handle_status): Stabilize threads.
10931 (process_serial_event): Adjust.
10932 * server.h (struct fast_tracepoint_jump): Forward declare.
10933 (struct process_info) <fast_tracepoint_jumps>: New field.
10934 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10935 (decode_X_packet, decode_M_packet): Adjust.
10936 (relocate_instruction): Declare.
10937 (in_process_agent_loaded): Declare.
10938 (tracepoint_look_up_symbols): Declare.
10939 (struct fast_tpoint_collect_status): Declare.
10940 (fast_tracepoint_collecting): Declare.
10941 (force_unlock_trace_buffer): Declare.
10942 (handle_tracepoint_bkpts): Declare.
10943 (initialize_low_tracepoint)
10944 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10945 * target.h (struct target_ops) <stabilize_threads,
10946 install_fast_tracepoint_jump_pad>: New fields.
10947 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10948 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10949 [HAVE_STDINT_H]: Include stdint.h.
10950 (trace_debug_1): Rename to ...
10951 (trace_vdebug): ... this.
10952 (trace_debug): Rename to ...
10953 (trace_debug_1): ... this. Add `level' parameter.
10954 (trace_debug): New.
10955 (ATTR_USED, ATTR_NOINLINE): New.
10956 (IP_AGENT_EXPORT): New.
10957 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10958 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10959 (about_to_request_buffer_space, trace_buffer_is_full)
10960 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10961 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10962 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10963 (traceframe_write_count, traceframes_created)
10964 (trace_state_variables)
10965 New renaming defines.
10966 (struct ipa_sym_addresses): New.
10967 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10968 (symbol_list): New.
10969 (ipa_sym_addrs): New.
10970 (all_tracepoint_symbols_looked_up): New.
10971 (in_process_agent_loaded): New.
10972 (write_e_ipa_not_loaded): New.
10973 (maybe_write_ipa_not_loaded): New.
10974 (tracepoint_look_up_symbols): New.
10975 (debug_threads) [IN_PROCESS_AGENT]: New.
10976 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10977 (UNKNOWN_SIDE_EFFECTS): New.
10978 (stop_tracing): New.
10979 (flush_trace_buffer): New.
10980 (stop_tracing_bkpt): New.
10981 (flush_trace_buffer_bkpt): New.
10982 (read_inferior_integer): New.
10983 (read_inferior_uinteger): New.
10984 (read_inferior_data_pointer): New.
10985 (write_inferior_data_pointer): New.
10986 (write_inferior_integer): New.
10987 (write_inferior_uinteger): New.
10988 (struct collect_static_trace_data_action): Delete.
10989 (enum tracepoint_type): New.
10990 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10991 <actions_str, step_actions, step_actions_str>: Only include in
10992 GDBserver.
fa593d66
PA
10993 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10994 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10995 (tracepoints): Use IP_AGENT_EXPORT.
10996 (last_tracepoint): Don't include in the IPA.
10997 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10998 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10999 (alloced_trace_state_variables): New.
11000 (trace_state_variables): Use IP_AGENT_EXPORT.
11001 (traceframe_t): Delete unused variable.
11002 (circular_trace_buffer): Don't include in the IPA.
11003 (trace_buffer_start): Delete.
11004 (struct trace_buffer_control): New.
11005 (trace_buffer_free): Delete.
11006 (struct ipa_trace_buffer_control): New.
11007 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11008 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11009 New.
11010 (trace_buffer_ctrl): New.
11011 (TRACE_BUFFER_CTRL_CURR): New.
11012 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11013 Reimplement as macros.
11014 (trace_buffer_wrap): Delete.
11015 (traceframe_write_count, traceframe_read_count)
11016 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11017 (struct tracepoint_hit_ctx) <type>: New field.
11018 (struct fast_tracepoint_ctx): New.
11019 (memory_barrier): New.
11020 (cmpxchg): New.
11021 (record_tracepoint_error): Update atomically in the IPA.
11022 (clear_inferior_trace_buffer): New.
11023 (about_to_request_buffer_space): New.
11024 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11025 updating the same buffer.
11026 (add_tracepoint): Default the tracepoint's type to trap
11027 tracepoint, and orig_size to -1.
11028 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11029 internal variables.
11030 (create_trace_state_variable): New parameter `gdb'. Handle it.
11031 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11032 (cmd_qtdp): Handle fast tracepoints.
11033 (cmd_qtdv): Adjust.
11034 (max_jump_pad_size): New.
11035 (gdb_jump_pad_head): New.
11036 (get_jump_space_head): New.
11037 (claim_jump_space): New.
11038 (sort_tracepoints): New.
11039 (MAX_JUMP_SIZE): New.
11040 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11041 IPA.
11042 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11043 support. Upload fast traceframes, and delete internal IPA
11044 breakpoints.
11045 (stop_tracing_handler): New.
11046 (flush_trace_buffer_handler): New.
11047 (cmd_qtstop): Upload fast tracepoints.
11048 (response_tracepoint): Handle fast tracepoints.
11049 (tracepoint_finished_step): Upload fast traceframes. Set the
11050 tracepoint hit context's tracepoint type.
11051 (handle_tracepoint_bkpts): New.
11052 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11053 type. Add comment about fast tracepoints.
11054 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11055 non-existing action_str field.
11056 (get_context_regcache): Handle fast tracepoints.
11057 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11058 to the regcache.
11059 (fast_tracepoint_from_jump_pad_address): New.
11060 (fast_tracepoint_from_ipa_tpoint_address): New.
11061 (collecting_t): New.
11062 (force_unlock_trace_buffer): New.
11063 (fast_tracepoint_collecting): New.
11064 (collecting): New.
11065 (gdb_collect): New.
11066 (write_inferior_data_ptr): New.
11067 (target_tp_heap): New.
11068 (target_malloc): New.
11069 (download_agent_expr): New.
11070 (UALIGN): New.
11071 (download_tracepoints): New.
11072 (download_trace_state_variables): New.
11073 (upload_fast_traceframes): New.
11074 (IPA_FIRST_TRACEFRAME): New.
11075 (IPA_NEXT_TRACEFRAME_1): New.
11076 (IPA_NEXT_TRACEFRAME): New.
11077 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11078 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11079 (gdb_jump_pad_buffer_end): New.
11080 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11081 (initialize_tracepoint): Adjust.
11082 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11083 buffer. Initialize the low module.
11084 * utils.c (PREFIX, TOOLNAME): New.
11085 (malloc_failure): Use PREFIX.
11086 (error): In the IPA, an error causes an exit.
11087 (fatal, warning): Use PREFIX.
11088 (internal_error): Use TOOLNAME.
11089 (NUMCELLS): Increase to 10.
11090 * configure, config.in: Regenerate.
11091
d149dd1d
PA
110922010-06-01 Pedro Alves <pedro@codesourcery.com>
11093
11094 * server.c (handle_query) <qSupported>: Do two passes over the
11095 qSupported string to avoid nesting strtok.
11096
f6528abd
JK
110972010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11098
11099 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11100 (CDEPS): New.
11101 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11102 -Wl,--dynamic-list.
11103 * configure: Regenerate.
11104 * proc-service.list: New.
11105
ca2a87a0
JK
111062010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11107
11108 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11109 New comment.
11110
363a6e9f
OS
111112010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11112
11113 * gdbreplay.c (remote_open): Check error return from socket() call by
11114 its equality to -1 not by it being negative.
11115 * remote-utils.c (remote_open): Likewise.
11116
d23b6cb1
PA
111172010-05-23 Pedro Alves <pedro@codesourcery.com>
11118
11119 * config.h: Regenerate.
11120
28d3cf85
MK
111212010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11122
11123 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11124 doesn't provide PTRACE_GET_THREAD_AREA.
11125
fea36a59
MK
111262010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11127
11128 * linux-m68k-low.c: Include <asm/ptrace.h>
11129 (ps_get_thread_area): Implement.
11130
24b066ba
DE
111312010-05-03 Doug Evans <dje@google.com>
11132
11133 * event-loop.c (struct callback_event): New struct.
11134 (callback_list): New global.
11135 (append_callback_event, delete_callback_event): New functions.
11136 (process_callback): New function.
11137 (start_event_loop): Call it.
11138 * remote-utils.c (NOT_SCHEDULED): Define.
11139 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11140 moved out of readchar.
11141 (readchar): Rewrite. Call reschedule before returning.
11142 (reset_readchar): New function.
11143 (remote_close): Call it.
11144 (process_remaining, reschedule): New functions.
11145 * server.h (callback_handler_func): New typedef.
11146 (append_callback_event, delete_callback_event): Declare.
11147
9836d6ea
PA
111482010-05-03 Pedro Alves <pedro@codesourcery.com>
11149
11150 * proc-service.c (ps_pglobal_lookup): Use
11151 thread_db_look_up_one_symbol.
11152 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11153 parameter. Use it instead of all_symbols_looked_up.
11154 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11155 field.
11156 (all_symbols_looked_up): Don't declare.
11157 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11158 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11159 field.
11160 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11161 Set all_symbols_looked_up here.
11162 (thread_db_look_up_one_symbol): New.
11163 (thread_db_get_tls_address): Adjust.
11164 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11165 thread_db object on the heap, and tentatively set it in the
11166 process structure.
11167 (thread_db_init): Don't set all_symbols_looked_up here.
11168 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11169
7984d532
PA
111702010-05-03 Pedro Alves <pedro@codesourcery.com>
11171
11172 * linux-low.c (linux_kill, linux_detach): Adjust.
11173 (status_pending_p_callback): Remove redundant statement. Check
11174 for !TARGET_WAITIKIND_IGNORE, instead of
11175 TARGET_WAITKIND_STOPPED.
11176 (handle_tracepoints): Make sure LWP is locked. Adjust.
11177 (linux_wait_for_event_1): Adjust.
11178 (linux_cancel_breakpoints): New.
11179 (unsuspend_one_lwp): New.
11180 (unsuspend_all_lwps): New.
11181 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11182 (send_sigstop_callback): Change return type to int, add new
11183 `except' parameter and handle it.
11184 (suspend_and_send_sigstop_callback): New.
11185 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11186 pass them down. If SUSPEND, also increment the lwp's suspend
11187 count.
11188 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11189 (need_step_over_p): Don't consider suspended LWPs.
11190 (start_step_over): Adjust.
11191 (proceed_one_lwp): Change return type to int, add new `except'
11192 parameter and handle it.
11193 (unsuspend_and_proceed_one_lwp): New.
11194 (proceed_all_lwps): Use find_inferior instead of
11195 for_each_inferior.
11196 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11197 also decrement the suspend count of LWPs. Pass `except' down,
11198 instead of hacking its suspend count.
11199 (linux_pause_all): Add `freeze' parameter. Adjust.
11200 (linux_unpause_all): New.
11201 (linux_target_ops): Install linux_unpause_all.
11202 * server.c (handle_status): Adjust.
11203 * target.h (struct target_ops): New fields `unpause_all' and
11204 `cancel_breakpoints'. Add new parameter to `pause_all'.
11205 (pause_all): Add new `freeze' parameter.
11206 (unpause_all): New.
11207 (cancel_breakpoints): New.
11208 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11209 cancel breakpoints.
11210 (cmd_qtstart): Pause threads.
11211 (stop_tracing): Pause threads, and cancel breakpoints.
11212 * win32-low.c (win32_target_ops): Adjust.
11213
e471f25b
PA
112142010-05-03 Pedro Alves <pedro@codesourcery.com>
11215
11216 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11217 the inferior right away from here...
11218 (linux_wait_1): ... to here, and adjust to check the thread's
11219 last_resume_kind instead of the lwp's step or stop_expected flags.
11220
1915ef4f
PA
112212010-05-02 Pedro Alves <pedro@codesourcery.com>
11222
11223 * README: Use consistent `GDB' and `GDBserver' spellings.
11224
f9e39928
PA
112252010-05-02 Pedro Alves <pedro@codesourcery.com>
11226
11227 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11228 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11229 (linux_detach_one_lwp): Assume the lwp is stopped.
11230 (any_thread_of): Delete.
11231 (linux_detach): Stop all lwps here. Don't blindly delete all
11232 breakpoints.
11233 (delete_lwp_callback): New.
11234 (linux_mourn): Delete all lwps of the process that is gone.
11235 (linux_wait_1): Don't delete the last lwp of the process here.
11236 * mem-break.h (mark_breakpoints_out): Declare.
11237 * mem-break.c (mark_breakpoints_out): New.
11238 (free_all_breakpoints): Use it.
11239 * server.c (handle_target_event): If the process is gone, mark
11240 breakpoints out.
11241 * thread-db.c (struct thread_db) <create_bp>: New field.
11242 (thread_db_enable_reporting): Fix prototype. Store a thread event
11243 breakpoint reference in the thread_db struct.
11244 (thread_db_load_search): Clear the thread_db object.
11245 (try_thread_db_load_1): Ditto.
11246 (switch_to_process): New.
11247 (disable_thread_event_reporting): Use it.
11248 (remove_thread_event_breakpoints): New.
11249 (thread_db_detach, thread_db_mourn): Use it.
11250
1e7fc18c
PA
112512010-05-01 Pedro Alves <pedro@codesourcery.com>
11252
11253 * linux-low.c (linux_enable_event_reporting): New.
11254 (linux_wait_for_event_1, handle_extended_wait): Use it.
11255
02fc4de7
PA
112562010-04-30 Pedro Alves <pedro@codesourcery.com>
11257
11258 * linux-low.c (linux_kill_one_lwp, linux_kill)
11259 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11260 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11261 SIGSTOP even if the LWP is stopped.
11262 (send_sigstop_callback): New.
11263 (stop_all_lwps): Use send_sigstop_callback instead.
11264 (linux_resume_one_thread): Adjust.
11265 (proceed_one_lwp): Still proceed an LWP that the client has
11266 requested to stop, if we haven't reported it as stopped yet. Make
11267 sure that LWPs the client want stopped, have a pending SIGSTOP.
11268
bc3b5632
DE
112692010-04-26 Doug Evans <dje@google.com>
11270
ae1ada35
DE
11271 * server.c (handle_general_set): Make static.
11272
bc3b5632
DE
11273 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11274 Print received char after testing for error/eof instead of before.
11275 (input_interrupt): Tweak comment.
11276
65730243
DE
112772010-04-23 Doug Evans <dje@google.com>
11278
11279 * server.c (start_inferior): Print inferior argv if --debug.
11280
a8ae7dc0
AR
112812010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11282
11283 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11284 * nto-x86-low.c: Include server.h
11285
1c07cc19
PM
112862010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11287
11288 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11289 be consistent with other sources of this directory.
11290 (init_registers_amd64): Correct name of source file of this function
11291 in the comment.
11292
e0a61e09
PM
112932010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11294
11295 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11296 64-bit executables.
11297
54709339
PM
112982010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11299
11300 * win32-i386-low.c: Add 64-bit support.
11301 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11302 (init_registers_amd64): Declare.
11303 (mappings): Add 64-bit version of array.
11304 (init_windows_x86): New function.
11305 (the_low_target): Change init_arch field to init_windows_x86.
11306
e8f0053d
PM
113072010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11308
11309 * win32-low.c: Adapt to support also 64-bit architecture.
11310 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11311 (get_image_name): Use SIZE_T type for local variable `done'.
11312 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11313 (toolhelp_get_dll_name): Idem.
11314 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11315 Use uintptr_t typecast to avoid warning.
11316 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11317 (handle_exception): Use phex_nz to avoid warning.
11318 (win32_wait): Remove unused local variable `process'.
11319
c481e77e
PM
113202010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11321
11322 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11323 `amd64-avx.o'.
11324
12ea4b69
PM
113252010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11326
11327 * configure.ac: Use `ws2_32' library for srv_mingw.
11328 * configure: Regenerate.
11329 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11330 * remote-utils.c: Likewise.
11331
f6d1620c
L
113322010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11333
11334 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11335 if __x86_64__ is defined.
11336
8e642873
PM
113372010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11338
11339 * configure: Regenerate.
11340
711e434b
PM
113412010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11342
11343 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11344 * target.h (target_ops): New get_tib_address field.
11345 * win32-low.h (win32_thread_info): Add thread_local_base field.
11346 * win32-low.c (child_add_thread): Add tlb argument.
11347 Set thread_local_base field to TLB.
11348 (get_child_debug_event): Adapt to child_add_thread change.
11349 (win32_get_tib_address): New function.
11350 (win32_target_ops): Set get_tib_address field to
11351 win32_get_tib_address.
11352 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11353
505106cd
PA
113542010-04-12 Pedro Alves <pedro@codesourcery.com>
11355
505106cd
PA
11356 * linux-low.c (linux_mourn): Also remove the process.
11357 * server.c (handle_target_event): Don't remove the process here.
11358 * nto-low.c (nto_mourn): New.
11359 (nto_target_ops): Install it.
11360 * spu-low.c (spu_mourn): New.
11361 (spu_target_ops): Install it.
11362 * win32-low.c (win32_mourn): New.
11363 (win32_target_ops): Install it.
11364
e8470a06
PA
113652010-04-12 Pedro Alves <pedro@codesourcery.com>
11366
11367 * server.h (buffer_xml_printf): Remove redundant `;'.
11368
45ba0d02
PA
113692010-04-12 Pedro Alves <pedro@codesourcery.com>
11370
11371 * regcache.c (set_register_cache): Invalidate regcaches before
11372 changing the register cache layout.
11373 (regcache_invalidate_one): Allow a NULL regcache.
11374 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11375 regcaches before changing the register cache layout or the target
11376 regsets.
11377
59e04013
L
113782010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11379
11380 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11381 variable warning on Linux/x86-64.
11382
8336d594
PA
113832010-04-11 Pedro Alves <pedro@codesourcery.com>
11384
11385 GDBserver disconnected tracing support.
11386
11387 * linux-low.c (linux_remove_process): Delete.
11388 (add_lwp): Don't set last_resume_kind here.
11389 (linux_kill): Use `mourn'.
11390 (linux_detach): Use `thread_db_detach', and `mourn'.
11391 (linux_mourn): New.
11392 (linux_attach_lwp_1): Adjust comment.
11393 (linux_attach): last_resume_kind moved the thread_info; adjust.
11394 (status_pending_p_callback): Adjust.
11395 (linux_wait_for_event_1): Adjust.
11396 (count_events_callback, select_singlestep_lwp_callback)
11397 (select_event_lwp_callback, cancel_breakpoints_callback)
11398 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11399 (proceed_one_lwp): Adjust.
11400 (linux_async): Add debug output.
11401 (linux_thread_stopped): New.
11402 (linux_pause_all): New.
11403 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11404 linux_pause_all.
11405 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11406 (thread_db_free): Delete declaration.
11407 (thread_db_detach, thread_db_mourn): Declare.
11408 * thread-db.c (thread_db_init): Use thread_db_mourn.
11409 (thread_db_free): Delete, split in two.
11410 (disable_thread_event_reporting): New.
11411 (thread_db_detach): New.
11412 (thread_db_mourn): New.
11413
11414 * server.h (struct thread_info) <last_resume_kind>: New field.
11415 <attached>: Add comment.
11416 <gdb_detached>: New field.
11417 (handler_func): Change return type to int.
11418 (handle_serial_event, handle_target_event): Ditto.
11419 (gdb_connected): Declare.
11420 (tracing): Delete.
11421 (disconnected_tracing): Declare.
11422 (stop_tracing): Declare.
11423
11424 * server.c (handle_query) <qSupported>: Report support for
11425 disconnected tracing.
11426 (queue_stop_reply_callback): Account for running threads.
11427 (gdb_wants_thread_stopped): New.
11428 (gdb_wants_all_threads_stopped): New.
11429 (gdb_reattached_process): New.
11430 (handle_status): Clear the `gdb_detached' flag of all processes.
11431 In all-stop, stop all threads.
11432 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11433 (process_serial_event): If the remote connection breaks, or if an
11434 exit was forced with "monitor exit", force an event loop exit.
11435 Handle disconnected tracing on detach.
11436 (handle_serial_event): Adjust.
11437 (handle_target_event): If GDB isn't connected, forward events back
11438 to the inferior, unless the last process exited, in which case,
11439 exit gdbserver. Adjust interface.
11440
11441 * remote-utils.c (remote_open): Don't block in accept. Instead
11442 register an event loop source on the listen socket file
11443 descriptor. Refactor bits into ...
11444 (listen_desc): ... this new global.
11445 (gdb_connected): ... this new function.
11446 (enable_async_notification): ... this new function.
11447 (handle_accept_event): ... this new function.
11448 (remote_close): Clear remote_desc.
11449
11450 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11451
11452 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11453 New fields.
11454 (mourn_inferior): Define.
11455 (target_process_qsupported): Avoid the dangling else problem.
11456 (thread_stopped): Define.
11457 (pause_all): Define.
11458 (target_waitstatus_to_string): Declare.
11459 * target.c (target_waitstatus_to_string): New.
11460
11461 * tracepoint.c (tracing): Make extern.
11462 (disconnected_tracing): New.
11463 (stop_tracing): Make extern. Handle tracing stops due to GDB
11464 disconnecting.
11465 (cmd_qtdisconnected): New.
11466 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11467 (handle_tracepoint_general_set): Handle QTDisconnected.
11468
11469 * event-loop.c (event_handler_func): Change return type to int.
11470 (process_event): Bail out if the event handler wants the event
11471 loop to stop.
11472 (handle_file_event): Ditto.
11473 (start_event_loop): Bail out if the event handler wants the event
11474 loop to stop.
11475
11476 * nto-low.c (nto_target_ops): Adjust.
11477 * spu-low.c (spu_wait): Don't remove the process here.
11478 (spu_target_ops): Adjust.
11479 * win32-low.c (win32_wait): Don't remove the process here.
11480 (win32_target_ops): Adjust.
11481
5d267c4c
PA
114822010-04-11 Pedro Alves <pedro@codesourcery.com>
11483
11484 * regcache.c (realloc_register_cache): Invalidate inferior's
11485 regcache before recreating it.
11486
623ccd72
PA
114872010-04-09 Pedro Alves <pedro@codesourcery.com>
11488
11489 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11490
219f2f23
PA
114912010-04-09 Stan Shebs <stan@codesourcery.com>
11492 Pedro Alves <pedro@codesourcery.com>
11493
11494 * server.h (LONGEST): New.
11495 (struct thread_info) <while_stepping>: New field.
11496 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11497 Declare.
11498 (initialize_tracepoint, handle_tracepoint_general_set)
11499 (handle_tracepoint_query, tracepoint_finished_step)
11500 (tracepoint_was_hit, release_while_stepping_state_list):
11501 (current_traceframe): Declare.
11502 * server.c (handle_general_set): Handle tracepoint packets.
11503 (read_memory): New.
11504 (write_memory): New.
11505 (handle_search_memory_1): Use read_memory.
11506 (handle_query): Report support for conditional tracepoints, trace
11507 state variables, and tracepoint sources. Handle tracepoint
11508 queries.
11509 (main): Initialize the tracepoints module.
11510 (process_serial_event): Handle traceframe reads/writes.
11511
11512 * linux-low.c (handle_tracepoints): New.
11513 (linux_wait_1): Call it.
11514 (linux_resume_one_lwp): Handle while-stepping.
11515 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11516 (linux_target_ops): Install them.
11517 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11518 New field.
11519 * linux-x86-low.c (x86_supports_tracepoints): New.
11520 (the_low_target). Install it.
11521
11522 * mem-break.h (delete_breakpoint): Declare.
11523 * mem-break.c (delete_breakpoint): Make external.
11524
11525 * target.h (struct target_ops): Add `supports_tracepoints',
11526 `read_pc', and `write_pc' fields.
11527 (target_supports_tracepoints): Define.
11528 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11529 (phex_nz): New.
11530
11531 * regcache.h (struct regcache) <registers_owned>: New field.
11532 (init_register_cache, regcache_cpy): Declare.
11533 (regcache_read_pc, regcache_write_pc): Declare.
11534 (register_cache_size): Declare.
11535 (supply_regblock): Declare.
11536 * regcache.c (init_register_cache): New.
11537 (new_register_cache): Use it.
11538 (regcache_cpy): New.
11539 (register_cache_size): New.
11540 (supply_regblock): New.
11541 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11542
219f2f23
PA
11543 * tracepoint.c: New.
11544
11545 * Makefile.in (OBS): Add tracepoint.o.
11546 (tracepoint.o): New rule.
11547
3a13a53b
L
115482010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11549
11550 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11551 (i386-mmx.o): New.
11552 (i386-mmx.c): Likewise.
11553 (i386-mmx-linux.o): Likewise.
11554 (i386-mmx-linux.c): Likewise.
11555
11556 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11557 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11558 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11559 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11560
11561 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11562 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11563 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11564
1570b33e
L
115652010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11566
11567 * Makefile.in (clean): Updated.
11568 (i386-avx.o): New.
11569 (i386-avx.c): Likewise.
11570 (i386-avx-linux.o): Likewise.
11571 (i386-avx-linux.c): Likewise.
11572 (amd64-avx.o): Likewise.
11573 (amd64-avx.c): Likewise.
11574 (amd64-avx-linux.o): Likewise.
11575 (amd64-avx-linux.c): Likewise.
11576
11577 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11578 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11579 (srv_amd64_regobj): Add amd64-avx.o.
11580 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11581 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11582 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11583 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11584 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11585 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11586 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11587
11588 * i387-fp.c: Include "i386-xstate.h".
11589 (i387_xsave): New.
11590 (i387_cache_to_xsave): Likewise.
11591 (i387_xsave_to_cache): Likewise.
11592 (x86_xcr0): Likewise.
11593
11594 * i387-fp.h (i387_cache_to_xsave): Likewise.
11595 (i387_xsave_to_cache): Likewise.
11596 (x86_xcr0): Likewise.
11597
11598 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11599 * linux-crisv32-low.c (target_regsets): Likewise.
11600 * linux-m68k-low.c (target_regsets): Likewise.
11601 * linux-mips-low.c (target_regsets): Likewise.
11602 * linux-ppc-low.c (target_regsets): Likewise.
11603 * linux-s390-low.c (target_regsets): Likewise.
11604 * linux-sh-low.c (target_regsets): Likewise.
11605 * linux-sparc-low.c (target_regsets): Likewise.
11606 * linux-xtensa-low.c (target_regsets): Likewise.
11607
11608 * linux-low.c: Include <sys/uio.h>.
11609 (regsets_fetch_inferior_registers): Support nt_type.
11610 (regsets_store_inferior_registers): Likewise.
11611 (linux_process_qsupported): New.
11612 (linux_target_ops): Add linux_process_qsupported.
11613
11614 * linux-low.h (regset_info): Add nt_type.
11615 (linux_target_ops): Add process_qsupported.
11616
11617 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11618 and <sys/uio.h>.
11619 (init_registers_i386_avx_linux): New.
11620 (init_registers_amd64_avx_linux): Likewise.
11621 (xmltarget_i386_linux_no_xml): Likewise.
11622 (xmltarget_amd64_linux_no_xml): Likewise.
11623 (PTRACE_GETREGSET): Likewise.
11624 (PTRACE_SETREGSET): Likewise.
11625 (x86_fill_xstateregset): Likewise.
11626 (x86_store_xstateregset): Likewise.
11627 (use_xml): Likewise.
11628 (x86_linux_update_xmltarget): Likewise.
11629 (x86_linux_process_qsupported): Likewise.
11630 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11631 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11632 init_registers_i386_linux here. Call
11633 x86_linux_update_xmltarget.
11634 (the_low_target): Add x86_linux_process_qsupported.
11635
11636 * server.c (handle_query): Call target_process_qsupported.
11637
11638 * target.h (target_ops): Add process_qsupported.
11639 (target_process_qsupported): New.
11640
fc7238bb
PA
116412010-04-03 Pedro Alves <pedro@codesourcery.com>
11642
11643 * inferiors.c (add_thread): Set last_status kind to
11644 TARGET_WAITKIND_IGNORE.
11645 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11646 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11647 (linux_wait_1): Move `thread' local definition to block that uses
11648 it. Don't NULL initialize `event_child'.
11649 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11650 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11651 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11652
bdabb078
PA
116532010-04-01 Pedro Alves <pedro@codesourcery.com>
11654
11655 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11656 an extended waitstatus, or by a watchpoint.
11657 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11658 thread was stepping or has been stopped by a watchpoint.
11659
d3bbe7a0
PA
116602010-04-01 Pedro Alves <pedro@codesourcery.com>
11661
11662 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11663 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11664 of another, then delete the previous, and validate all
11665 breakpoints.
11666 (validate_inserted_breakpoint): New.
11667 (delete_disabled_breakpoints): New.
11668 (validate_breakpoints): New.
11669 (check_mem_read): Validate breakpoints before trusting their
11670 shadow. Delete disabled breakpoints.
11671 (check_mem_write): Validate breakpoints before trusting they
11672 should be inserted. Delete disabled breakpoints.
11673 * mem-break.h (validate_breakpoints):
11674 * server.c (handle_query): Validate breakpoints when we see a
11675 qSymbol query.
11676
8b07ae33
PA
116772010-04-01 Pedro Alves <pedro@codesourcery.com>
11678
11679 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11680 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11681 if we could tell there's a GDB breakpoint at stop_pc.
11682 (need_step_over_p): Don't do a step over if we find a GDB
11683 breakpoint at the resume PC.
11684
11685 * mem-break.c (struct raw_breakpoint): New.
11686 (enum bkpt_type): New type `gdb_breakpoint'.
11687 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11688 fields. New field `raw'.
11689 (find_raw_breakpoint_at): New.
11690 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11691 breakpoint instead.
11692 (set_breakpoint_at): Adjust.
11693 (delete_raw_breakpoint): New.
11694 (release_breakpoint): New.
11695 (delete_breakpoint): Rename to...
11696 (delete_breakpoint_1): ... this. Add proc parameter. Use
11697 release_breakpoint. Return ENOENT.
11698 (delete_breakpoint): Reimplement.
11699 (find_breakpoint_at): Delete.
11700 (find_gdb_breakpoint_at): New.
11701 (delete_breakpoint_at): Delete.
11702 (set_gdb_breakpoint_at): New.
11703 (delete_gdb_breakpoint_at): New.
11704 (gdb_breakpoint_here): New.
11705 (set_reinsert_breakpoint): Use release_breakpoint.
11706 (uninsert_breakpoint): Rename to ...
11707 (uninsert_raw_breakpoint): ... this.
11708 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11709 (reinsert_raw_breakpoint): Change parameter type to
11710 raw_breakpoint.
11711 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11712 instead.
11713 (check_breakpoints): Adjust. Use release_breakpoint.
11714 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11715 (breakpoint_inserted_here): Ditto.
11716 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11717 Don't trust the breakpoint's shadow if it is not inserted.
11718 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11719 (delete_all_breakpoints): Adjust.
11720 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11721 use delete_breakpoint_1.
11722
11723 * mem-break.h (breakpoints_supported): Delete declaration.
11724 (set_gdb_breakpoint_at): Declare.
11725 (gdb_breakpoint_here): Declare.
11726 (delete_breakpoint_at): Delete.
11727 (delete_gdb_breakpoint_at): Declare.
11728
11729 * server.h (struct raw_breakpoint): Forward declare.
11730 (struct process_info): New field `raw_breakpoints'.
11731
11732 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11733 breakpoints.
11734
6bf5e0ba
PA
117352010-03-24 Pedro Alves <pedro@codesourcery.com>
11736
11737 * linux-low.c (status_pending_p_callback): Fix comment.
11738 (linux_wait_for_event_1): Move most of the internal breakpoint
11739 handling from here...
11740 (linux_wait_1): ... to here.
11741 (count_events_callback): New.
11742 (select_singlestep_lwp_callback): New.
11743 (select_event_lwp_callback): New.
11744 (cancel_breakpoints_callback): New.
11745 (select_event_lwp): New.
11746 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11747 priority to all LWPs that have had events that should be reported
11748 to the client. Cancel breakpoints when about to reporting the
11749 event to the client, not while stopping lwps. No longer cancel
11750 finished single-steps here.
11751 (cancel_finished_single_step): Delete.
11752 (cancel_finished_single_steps): Delete.
11753
414a389f
PA
117542010-03-24 Pedro Alves <pedro@codesourcery.com>
11755
11756 * mem-break.c (enum bkpt_type): New.
11757 (struct breakpoint): New field `type'.
11758 (set_breakpoint_at): Change return type to struct breakpoint
11759 pointer. Set type to `other_breakpoint' by default.
11760 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11761 in the breakpoint list.
11762 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11763 (reinsert_breakpoint): Rename to ...
11764 (reinsert_raw_breakpoint): ... this.
11765 (reinsert_breakpoints_at): Adjust.
11766 * mem-break.h (struct breakpoint): Declare.
11767 (set_breakpoint_at): Change return type to struct breakpoint
11768 pointer.
11769
2280c721
PA
117702010-03-24 Pedro Alves <pedro@codesourcery.com>
11771
11772 * server.c (handle_query): Assign, not compare.
11773
d50171e4
PA
117742010-03-24 Pedro Alves <pedro@codesourcery.com>
11775
11776 Teach linux gdbserver to step-over-breakpoints.
11777
11778 * linux-low.c (can_hardware_single_step): New.
11779 (supports_breakpoints): New.
11780 (handle_extended_wait): If stopping threads, read the stop pc of
11781 the new cloned LWP.
11782 (get_pc): New.
11783 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11784 low target doesn't support retrieving the PC.
11785 (add_lwp): Set last_resume_kind to resume_continue.
11786 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11787 (linux_attach): Don't clear stop_expected. Set the lwp's
11788 last_resume_kind to resume_stop.
11789 (linux_detach_one_lwp): Don't check for removed breakpoints.
11790 (check_removed_breakpoint): Delete.
11791 (status_pending_p): Rename to ...
11792 (status_pending_p_callback): ... this. Don't check for removed
11793 breakpoints. Don't consider threads that are stopped from GDB's
11794 perspective.
11795 (linux_wait_for_lwp): Always read the stop_pc here.
11796 (cancel_breakpoint): New.
11797 (step_over_bkpt): New global.
11798 (linux_wait_for_event_1): Implement stepping over breakpoints.
11799 (gdb_wants_lwp_stopped): New.
11800 (gdb_wants_all_stopped): New.
11801 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11802 single-step traps here. Store the thread's last reported target
11803 wait status.
11804 (send_sigstop): Don't clear stop_expected. Always set it,
11805 instead.
11806 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11807 (cancel_finished_single_step): New.
11808 (cancel_finished_single_steps): New.
11809 (wait_for_sigstop): Don't cancel finished single-step traps here.
11810 (linux_resume_one_lwp): Don't check for removed breakpoints.
11811 Don't set `step' on non-hardware step archs.
11812 (linux_set_resume_request): Ignore resume_stop requests if already
11813 stopping or stopped. Set the lwp's last_resume_kind.
11814 (resume_status_pending_p): Don't check for removed breakpoints.
11815 (need_step_over_p): New.
11816 (start_step_over): New.
11817 (finish_step_over): New.
11818 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11819 requests. Clear the thread's last reported target waitstatus.
11820 Don't use the `suspended' flag. Don't consider pending breakpoints.
11821 (linux_resume): Start a step-over if necessary.
11822 (proceed_one_lwp): New.
11823 (proceed_all_lwps): New.
11824 (unstop_all_lwps): New.
11825 * linux-low.h (struct lwp_info): Rewrite comment for the
11826 `suspended' flag. Add the `stop_pc' field. Delete the
11827 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11828 Add `'last_resume_kind' and `need_step_over' fields.
11829 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11830 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11831 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11832 (set_raw_breakpoint_at): New.
11833 (set_breakpoint_at): Rewrite to use it.
11834 (reinsert_breakpoint_handler): Delete.
11835 (set_reinsert_breakpoint): New.
11836 (reinsert_breakpoint_by_bp): Delete.
11837 (delete_reinsert_breakpoints): New.
11838 (uninsert_breakpoint): Rewrite.
11839 (uninsert_breakpoints_at): New.
11840 (reinsert_breakpoint): Rewrite.
11841 (reinsert_breakpoints_at): New.
11842 (check_breakpoints): Rewrite.
11843 (breakpoint_here): New.
11844 (breakpoint_inserted_here): New.
11845 (check_mem_read): Adjust.
11846 * mem-break.h (breakpoints_supported, breakpoint_here)
11847 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11848 (reinsert_breakpoint_by_bp): Delete declaration.
11849 (delete_reinsert_breakpoints): Declare.
11850 (reinsert_breakpoint): Delete declaration.
11851 (reinsert_breakpoints_at): Declare.
11852 (uninsert_breakpoint): Delete declaration.
11853 (uninsert_breakpoints_at): Declare.
11854 (check_breakpoints): Adjust prototype.
11855 * server.h: Adjust include order.
11856 (struct thread_info): Declare here. Add a `last_status' field.
11857
30ba68cb
MS
118582010-03-23 Michael Snyder <msnyder@vmware.com>
11859
11860 * server.c (crc32): New function.
11861 (handle_query): Add handling for 'qCRC:' request.
11862
b9a881c2
PA
118632010-03-23 Pedro Alves <pedro@codesourcery.com>
11864
11865 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11866 lwp had been stopped by a watchpoint.
11867
e92d13d5
PA
118682010-03-16 Pedro Alves <pedro@codesourcery.com>
11869
11870 * server.h (internal_error): Declare.
11871 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11872 * utils.c (internal_error): New function.
11873
64daa791
AS
118742010-03-15 Andreas Schwab <schwab@redhat.com>
11875
11876 * configure.srv: Fix typo setting srv_regobj.
11877
f52cd8cd
PA
118782010-03-15 Pedro Alves <pedro@codesourcery.com>
11879
11880 * linux-low.c (fetch_register): Avoid passing a non string literal
11881 format to `error'.
11882 (usr_store_inferior_registers): Ditto.
11883
93ae6fdc
PA
118842010-03-14 Pedro Alves <pedro@codesourcery.com>
11885
11886 * linux-low.c (linux_write_memory): Bail out early if peeking
11887 memory failed.
11888
c3adc08c
PA
118892010-03-14 Pedro Alves <pedro@codesourcery.com>
11890
11891 * linux-low.h (struct lwp_info): New fields
11892 `stopped_by_watchpoint' and `stopped_data_address'.
11893 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11894 here, and cache them in the lwp object.
11895 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11896 directly.
11897 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11898 field.
11899 (linux_stopped_by_watchpoint): Rewrite.
11900 (linux_stopped_data_address): Rewrite.
11901
bce522a2
PA
119022010-03-06 Simo Melenius <simo.melenius@iki.fi>
11903
11904 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11905 switching the current inferior, not before.
11906
90884b2b
L
119072010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11908
11909 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11910 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11911 i386-linux.c and amd64-linux.c.
11912 (reg-i386.o): Removed.
11913 (reg-i386.c): Likewise.
11914 (reg-i386-linux.o): Likewise.
11915 (reg-i386-linux.c): Likewise.
11916 (reg-x86-64.o): Likewise.
11917 (reg-x86-64.c): Likewise.
11918 (reg-x86-64-linux.o): Likewise.
11919 (reg-x86-64-linux.c): Likewise.
11920 (i386.o): New.
11921 (i386.c): Likewise.
11922 (i386-linux.o): Likewise.
11923 (i386-linux.c): Likewise.
11924 (amd64.o): Likewise.
11925 (amd64.c): Likewise.
11926 (amd64-linux.o): Likewise.
11927 (amd64-linux.c): Likewise.
11928
11929 * configure.srv (srv_i386_regobj): New.
11930 (srv_i386_linux_regobj): Likewise.
11931 (srv_amd64_regobj): Likewise.
11932 (srv_amd64_linux_regobj): Likewise.
11933 (srv_i386_32bit_xmlfiles): Likewise.
11934 (srv_i386_64bit_xmlfiles): Likewise.
11935 (srv_i386_xmlfiles): Likewise.
11936 (srv_amd64_xmlfiles): Likewise.
11937 (srv_i386_linux_xmlfiles): Likewise.
11938 (srv_amd64_linux_xmlfiles): Likewise.
11939 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11940 srv_xmlfiles to $srv_i386_xmlfiles.
11941 (i[34567]86-*-mingw32ce*): Likewise.
11942 (i[34567]86-*-mingw*): Likewise.
11943 (i[34567]86-*-nto*): Likewise.
11944 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11945 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11946 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11947 (x86_64-*-linux*): Likewise.
11948
11949 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11950 (init_registers_amd64_linux): New.
11951 (x86_arch_setup): Replace init_registers_x86_64_linux with
11952 init_registers_amd64_linux.
11953
193f13e6
MK
119542010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11955
11956 * configure.ac: Check for libdl. If it is not available link against
11957 static libthread_db.
11958 * configure: Regenerate.
11959
85d721b8
PA
119602010-02-22 Pedro Alves <pedro@codesourcery.com>
11961
11962 PR9605
11963
11964 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11965 handing a read watchpoint.
11966 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11967
6076632b
DE
119682010-02-12 Doug Evans <dje@google.com>
11969
11970 * linux-low.c (linux_supports_tracefork_flag): Document.
11971 (linux_look_up_symbols): Add comment.
11972
3327ccf7
L
119732010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11974
11975 * regcache.c (supply_register): Clear regcache if buf is NULL.
11976
0718675c 119772010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11978 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11979
11980 * inferiors.c (find_inferior): Add function documentation.
11981 (unloaded_dll): Handle the case where the unloaded dll has not
11982 been previously registered in the dll list.
11983
177321bd
DJ
119842010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11985
11986 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11987 (thumb2_breakpoint): New.
11988 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11989
2b009048
DJ
119902010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11991
11992 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11993 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11994 breakpoints.
11995
3be029c7
PA
119962010-01-21 Pedro Alves <pedro@codesourcery.com>
11997
11998 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11999
18f5de3b
JK
120002010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12001
12002 * linux-s390-low.c (s390_collect_ptrace_register)
12003 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12004
3743bb4f
DE
120052010-01-21 Doug Evans <dje@google.com>
12006
14ce3065
DE
12007 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12008 (PTRACE_ARG4_TYPE): New macro.
12009 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12010 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12011 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12012 (usr_store_inferior_registers): Ditto.
12013 (linux_read_memory, linux_write_memory): Ditto.
12014 (linux_test_for_tracefork): Ditto.
12015
3743bb4f
DE
12016 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12017 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12018
8b315be5
PA
120192010-01-21 Pedro Alves <pedro@codesourcery.com>
12020
12021 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12022 target.
12023
85492558
PA
120242010-01-21 Pedro Alves <pedro@codesourcery.com>
12025
12026 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12027 prototype to take a regcache. Adjust.
12028
442ea881
PA
120292010-01-20 Pedro Alves <pedro@codesourcery.com>
12030
12031 * regcache.h (struct thread_info): Forward declare.
12032 (struct regcache): New.
12033 (new_register_cache): Adjust prototype.
12034 (get_thread_regcache): Declare.
12035 (free_register_cache): Adjust prototype.
12036 (registers_to_string, registers_from_string): Ditto.
12037 (supply_register, supply_register_by_name, collect_register)
12038 (collect_register_as_string, collect_register_by_name): Ditto.
12039 * regcache.c (struct inferior_regcache_data): Delete.
12040 (get_regcache): Rename to ...
12041 (get_thread_regcache): ... this. Adjust. Switch inferior before
12042 fetching registers.
12043 (regcache_invalidate_one): Adjust.
12044 (regcache_invalidate): Fix prototype.
12045 (new_register_cache): Return the new register cache.
12046 (free_register_cache): Change prototype.
12047 (realloc_register_cache): Adjust.
12048 (registers_to_string): Change prototype to take a regcache. Adjust.
12049 (registers_from_string): Ditto.
12050 (register_data): Ditto.
12051 (supply_register): Ditto.
12052 (supply_register_by_name): Ditto.
12053 (collect_register): Ditto.
12054 (collect_register_as_string): Ditto.
12055 (collect_register_by_name): Ditto.
12056 * server.c (process_serial_event): Adjust.
12057 * linux-low.h (regset_fill_func, regset_store_func): Change
12058 prototype.
12059 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12060 Change prototype.
12061 * linux-low.c (get_stop_pc): Adjust.
12062 (check_removed_breakpoint): Adjust.
12063 (linux_wait_for_event): Adjust.
12064 (linux_resume_one_lwp): Adjust.
12065 (fetch_register): Add regcache parameter. Adjust.
12066 (usr_store_inferior_registers): Ditto.
12067 (regsets_fetch_inferior_registers): Ditto.
12068 (regsets_store_inferior_registers): Ditto.
12069 (linux_fetch_registers, linux_store_registers): Ditto.
12070 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12071 regcache. Adjust.
43aaf8b6
PA
12072 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12073 Ditto.
442ea881
PA
12074 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12075 prototype to take a regcache.
12076 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12077 * remote-utils.c (convert_ascii_to_int, outreg)
12078 (prepare_resume_reply): Change prototype to take a regcache.
12079 Adjust.
12080 * target.h (struct target_ops) <fetch_registers, store_registers>:
12081 Change prototype to take a regcache.
12082 (fetch_inferior_registers, store_inferior_registers): Change
12083 prototype to take a regcache. Adjust.
12084 * proc-service.c (ps_lgetregs): Adjust.
12085 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12086 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12087 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12088 take a regcache. Adjust.
12089 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12090 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12091 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12092 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12093 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12094 (cris_cannot_fetch_register):
12095 (cris_breakpoint_at): Change prototype to take a regcache.
12096 Adjust.
12097 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12098 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12099 to take a regcache. Adjust.
12100 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12101 Adjust.
12102 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12103 take a regcache. Adjust.
12104 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12105 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12106 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12107 * linux-mips-low.c (mips_get_pc):
12108 (mips_set_pc): Change prototype to take a regcache. Adjust.
12109 (mips_reinsert_addr): Adjust.
12110 (mips_collect_register): Change prototype to take a regcache.
12111 Adjust.
12112 (mips_supply_register):
12113 (mips_collect_register_32bit, mips_supply_register_32bit)
12114 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12115 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12116 * linux-ppc-low.c (ppc_supply_ptrace_register)
12117 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12118 (parse_spufs_run): Adjust.
12119 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12120 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12121 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12122 take a regcache. Adjust.
12123 * linux-s390-low.c (s390_collect_ptrace_register)
12124 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12125 (s390_set_pc): Change prototype to take a regcache. Adjust.
12126 (s390_arch_setup): Adjust.
12127 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12128 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12129 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12130 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12131 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12132 regcache. Adjust.
12133 (sparc_breakpoint_at): Adjust.
12134 * linux-xtensa-low.c (xtensa_fill_gregset):
12135 (xtensa_store_gregset):
12136 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12137 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12138 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12139 prototype to take a regcache. Adjust.
12140 * win32-arm-low.c (arm_fetch_inferior_register)
12141 (arm_store_inferior_register): Change prototype to take a
12142 regcache. Adjust.
12143 * win32-i386-low.c (i386_fetch_inferior_register)
12144 (i386_store_inferior_register): Change prototype to take a
12145 regcache. Adjust.
12146 * win32-low.c (child_fetch_inferior_registers)
12147 (child_store_inferior_registers): Change prototype to take a
12148 regcache. Adjust.
12149 (win32_wait): Adjust.
12150 (win32_fetch_inferior_registers): Change prototype to take a
12151 regcache. Adjust.
12152 (win32_store_inferior_registers): Adjust.
12153 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12154 store_inferior_register>: Change prototype to take a regcache.
12155
60c3d7b0
DE
121562010-01-20 Doug Evans <dje@google.com>
12157
12158 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12159 #ifdef.
12160 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12161 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12162
dc146f7c
VP
121632010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12164
12165 * linux-low.c (linux_core_of_thread): New.
12166 (compare_ints, show_process, list_threads): New.
12167 (linux_qxfer_osdata): Report threads and cores.
12168 (linux_target_op): Register linux_core_of_thread.
12169 * remote-utils.c (prepare_resume_reply): Report the core.
12170 (buffer_xml_printf): Support %d specifier.
12171 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12172 New.
12173 (handle_query): Handle qXfer:threads. Announce availability
12174 thereof.
12175 * target.h (struct target_ops): New field core_of_thread.
12176
7803799a
UW
121772010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12178
12179 * Makefile.in (clean): Remove new generated files.
12180 (reg-s390.o, reg-s390.c): Remove rules.
12181 (reg-s390x.o, reg-s390x.c): Likewise.
12182 (s390-linux32.o, s390-linux32.c): Add rules.
12183 (s390-linux64.o, s390-linux64.c): Likewise.
12184 (s390x-linux64.o, s390x-linux64.c): Likewise.
12185 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12186 * linux-s390-low.c: Include <elf.h>.
12187 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12188 (init_registers_s390): Remove prototype.
12189 (init_registers_s390x): Likewise.
12190 (init_registers_s390_linux32): Add prototype.
12191 (init_registers_s390_linux64): Likewise.
12192 (init_registers_s390x_linux64): Likewise.
12193 (s390_num_regs_3264): New define.
12194 (s390_regmap_3264): New global variable.
12195 (s390_cannot_fetch_register): Remove obsolete check.
12196 (s390_cannot_store_register): Likewise.
12197 (s390_collect_ptrace_register): Handle upper/lower register halves.
12198 (s390_supply_ptrace_register): Likewise.
12199 (s390_fill_gregset): Update to register number changes.
12200 (s390_get_hwcap): New routine.
12201 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12202 Install appropriate regmap and register set.
12203
6e7ffa39
JB
122042010-01-01 Joel Brobecker <brobecker@adacore.com>
12205
12206 * server.c (gdbserver_version): Update copyright year to 2010.
12207 * gdbreplay.c (gdbreplay_version): Likewise.
12208
957f3f49
DE
122092009-12-28 Doug Evans <dje@google.com>
12210
12211 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12212 elf/external.h. Include <elf.h> instead but only if necessary.
12213
ca5c370d
PA
122142009-12-28 Pedro Alves <pedro@codesourcery.com>
12215
12216 * linux-low.c (linux_remove_process): Remove `detaching'
12217 parameter. Don't release/detach from thread_db here.
12218 (linux_kill): Release/detach from thread_db here, ...
12219 (linux_detach): ... and here, before actually detaching.
12220 (linux_wait_1): ... and here, when a process exits.
12221 * thread-db.c (any_thread_of): New.
12222 (thread_db_free): Switch the current inferior to a thread of the
12223 passed in process.
12224
4ee62156
DE
122252009-12-21 Doug Evans <dje@google.com>
12226
d90e6a88
DE
12227 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12228
c5f62d5f
DE
12229 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12230 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12231 warning ifndef __NR_tkill. Move setting of errno there too.
12232 Delete unnecessary resetting of errno after syscall.
12233 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12234
10e86dd7
DE
12235 * configure.ac: Check for dladdr.
12236 * config.in: Regenerate.
12237 * configure: Regenerate.
12238 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12239 (try_thread_db_load): Update.
12240
4ee62156
DE
12241 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12242
00f515da
DE
122432009-12-18 Doug Evans <dje@google.com>
12244
e9464885
DE
12245 * event-loop.c: Include unistd.h if it exists.
12246
07d4f67e
DE
12247 * linux-low.c (my_waitpid): Move definition away from being in
12248 between linux_tracefork_child/linux_test_for_tracefork.
12249
00f515da
DE
12250 * gdb_proc_service.h (psaddr_t): Fix type.
12251 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12252 signature to match glibc.
12253
1de1badb
DE
122542009-12-16 Doug Evans <dje@google.com>
12255
12256 * linux-low.c (linux_read_memory): Fix argument to read.
12257
aeeb81d1
PA
122582009-11-26 Pedro Alves <pedro@codesourcery.com>
12259
12260 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12261 events, don't leave current_inferior pointing at null.
12262
10357975
PA
122632009-11-26 Pedro Alves <pedro@codesourcery.com>
12264
12265 * win32-low.c (LOG): Delete.
12266 (OUTMSG): Output to stderr.
12267 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12268 on compile time LOG macro.
12269 (win32_wait): Fix debug output.
12270
cf6e3471
PA
122712009-11-26 Pedro Alves <pedro@codesourcery.com>
12272
12273 * win32-low.c (win32_add_one_solib): If the dll name is
12274 "ntdll.dll", prepend the system directory to the dll path.
12275
0c85e18e
MK
122762009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12277
12278 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12279
9ac544ce 122802009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12281 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12282
12283 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12284 * configure.ac: Check for __mcoldfire__ and set
12285 gdb_cv_m68k_is_coldfire.
12286 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12287 reg-cf.o and reg-m68k.o.
12288 * configure: Regenerated.
12289
fd7dd3e6
PA
122902009-11-16 Pedro Alves <pedro@codesourcery.com>
12291
12292 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12293 Pass it to thread_db_free.
12294 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12295 proper `detaching' argument to linux_remove_process.
12296 * linux-low.h (thread_db_free): Add `detaching' parameter.
12297 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12298 to thread_db_free.
12299 (thread_db_free): Add `detaching' parameter. Only
12300 call td_ta_clear_event if detaching from process.
12301
75aa492e
MK
123022009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12303
12304 * thread-db.c (thread_db_free): Fix typo.
12305
21e1bee4
PP
123062009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12307
12308 PR gdb/10838
12309 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12310
8838b45e
NS
123112009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12312
12313 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12314 with an i686 compiler.
12315 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12316 needed.
12317 * configure: Rebuilt.
12318
8a35fb51
SL
123192009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12320
12321 PR gdb/10783
12322
12323 * server.c (handle_search_memory_1): Correct read_addr initialization
12324 in loop for searching subsequent chunks.
12325
96f15937
PP
123262009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12327
12328 * configure.ac: New --with-libthread-db option.
12329 * thread-db.c: Allow direct dependence on libthread_db.
12330 (thread_db_free): Adjust.
12331 * config.in: Regenerate.
12332 * configure: Likewise.
889bf7c5 12333
5f7d1694
PP
123342009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12335
12336 PR gdb/10757
12337 * thread-db.c (attach_thread): New function.
12338 (maybe_attach_thread): Return success/failure.
12339 (find_new_threads_callback): Adjust.
889bf7c5
PA
12340 (thread_db_find_new_threads): Loop until no new threads.
12341
88e3b899
PA
123422009-10-13 Pedro Alves <pedro@codesourcery.com>
12343
12344 * proc-service.c (ps_lgetregs): Formatting.
12345
cdbfd419
PP
123462009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12347
12348 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12349 * configure.ac: Adjust.
12350 * linux-low.h (struct process_info_private): Move members to struct
12351 thread_db.
12352 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12353 * linux-low.c (linux_remove_process): Adjust.
12354 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12355 * server.c (handle_query): Move code ...
12356 (handle_monitor_command): ... here. New function.
12357 * target.h (struct target_ops): New member.
12358 * thread-db.c (struct thread_db): New.
12359 (libthread_db_search_path): New variable.
12360 (thread_db_create_event, thread_db_enable_reporting)
12361 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12362 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12363 (try_thread_db_load_1, dladdr_to_soname): New functions.
12364 (try_thread_db_load, thread_db_load_search): New functions.
12365 (thread_db_init): Search for libthread_db.
12366 (thread_db_free): New function.
12367 (thread_db_handle_monitor_command): Likewise.
12368 * config.in: Regenerate.
12369 * configure: Regenerate.
889bf7c5 12370
4168d2d6
UW
123712009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12372
12373 * spu-low.c (spu_kill): Wait for inferior to terminate.
12374 Call clear_inferiors.
12375 (spu_detach): Call clear_inferiors.
12376
81ecdfbb
RW
123772009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12378
12379 * aclocal.m4: Regenerate.
12380 * config.in: Likewise.
12381 * configure: Likewise.
12382
0b9ff2c0
UW
123832009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12384
12385 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12386 (parse_spufs_run): New function.
12387 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12388 (ppc_breakpoint_at): Handle SPU breakpoints.
12389
efcbbd14
UW
123902009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12391
12392 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12393 (SPUFS_MAGIC): Define.
12394 (spu_enumerate_spu_ids): New function.
12395 (linux_qxfer_spu): New function.
12396 (linux_target_ops): Install linux_qxfer_spu.
12397
f4d9bade
UW
123982009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12399
12400 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12401 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12402 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12403 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12404 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12405 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12406 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12407 (init_registers_powerpc_cell32l): Add prototype.
12408 (init_registers_powerpc_cell64l): Likewise.
12409 (ppc_arch_setup): Detect Cell/B.E. architecture.
12410
96e946ca
RW
124112009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12412
12413 * Makefile.in (datarootdir): New variable.
12414
58d6951d
DJ
124152009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12416
12417 * linux-low.c (linux_write_memory): Update debugging output.
12418 * Makefile.in (clean): Add new descriptions.
12419 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12420 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12421 * configure.srv: Add new files for arm*-*-linux*.
12422 * linux-arm-low.c: Add new declarations.
12423 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12424 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12425 (HWCAP_VFPv3D16): New.
12426 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12427 instead of __IWMMXT__.
12428 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12429 (arm_arch_setup): New.
12430 (target_regsets): Remove #ifdef. Add VFP regset.
12431 (the_low_target): Use arm_arch_setup.
12432
12b42a12
DJ
124332009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12434
12435 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12436 the main thread again.
12437
ac8c974e
AR
124382009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12439
12440 Adding Neutrino gdbserver.
12441 * configure: Regenerated.
12442 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12443 * configure.srv (i[34567]86-*-nto*): New target.
12444 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12445 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12446 (nto_comctrl) [__QNX__]: New function.
12447 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12448
4424e0c3 124492009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12450
12451 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12452 srv_tgtobj.
12453
912cf4ba
PA
124542009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12455 Pedro Alves <pedro@codesourcery.com>
12456
12457 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12458 don't support CONTEXT_EXTENDED_REGISTERS.
12459 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12460 (the_low_target): Install them.
12461 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12462 failing with ERROR_PIPE_NOT_CONNECTED.
12463
aa5ca48f
DE
124642009-06-30 Doug Evans <dje@google.com>
12465 Pierre Muller <muller@ics.u-strasbg.fr>
12466
12467 Add h/w watchpoint support to x86-linux, win32-i386.
12468 * Makefile.in (SFILES): Add i386-low.c
12469 (i386_low_h): Define.
12470 (i386-low.o): Add dependencies.
12471 (linux-x86-low.o): Add i386-low.h dependency.
12472 (win32-i386-low.o): Ditto.
12473 * i386-low.c: New file.
12474 * i386-low.h: New file.
12475 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12476 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12477 * linux-low.c (linux_add_process): Initialize arch_private.
12478 (linux_remove_process): Free arch_private.
12479 (add_lwp): Initialize arch_private.
12480 (delete_lwp): Free arch_private.
12481 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12482 provided.
12483 * linux-low.h (process_info_private): New member arch_private.
12484 (lwp_info): New member arch_private.
12485 (linux_target_ops): New members new_process, new_thread,
12486 prepare_to_resume.
12487 (ptid_of): New macro.
12488 * linux-x86-low.c: Include stddef.h, i386-low.h.
12489 (arch_process_info): New struct.
12490 (arch_lwp_info): New struct.
12491 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12492 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12493 (i386_dr_low_get_status): New function.
12494 (x86_insert_point, x86_remove_point): New functions.
12495 (x86_stopped_by_watchpoint): New function.
12496 (x86_stopped_data_address): New function.
12497 (x86_linux_new_process, x86_linux_new_thread): New functions.
12498 (x86_linux_prepare_to_resume): New function.
12499 (the_low_target): Add entries for insert_point, remove_point,
12500 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12501 prepare_to_resume.
12502 * server.c (debug_hw_points): New global.
12503 (monitor_show_help): Document set debug-hw-points.
12504 (handle_query): Process "set debug-hw-points".
12505 * server.h (debug_hw_points): Declare.
12506 (paddress): Declare.
12507 * utils.c (NUMCELLS, CELLSIZE): New macros.
12508 (get_sell, xsnprintf, paddress): New functions.
12509 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12510 remove_point, stopped_by_watchpoint, stopped_data_address.
12511 * win32-i386-low.c: Include i386-low.h.
12512 (debug_reg_state): Replaces dr.
12513 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12514 (i386_dr_low_get_status): New function.
12515 (i386_insert_point, i386_remove_point): New functions.
12516 (i386_stopped_by_watchpoint): New function.
12517 (i386_stopped_data_address): New function.
12518 (i386_initial_stuff): Update.
12519 (get_thread_context,set_thread_context,i386_thread_added): Update.
12520 (the_low_target): Add entries for insert_point,
12521 remove_point, stopped_by_watchpoint, stopped_data_address.
12522 * win32-low.c (win32_insert_watchpoint): New function.
12523 (win32_remove_watchpoint): New function.
12524 (win32_stopped_by_watchpoint): New function.
12525 (win32_stopped_data_address): New function.
12526 (win32_target_ops): Add entries for insert_watchpoint,
12527 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12528 * win32-low.h (win32_target_ops): New members insert_point,
12529 remove_point, stopped_by_watchpoint, stopped_data_address.
12530
d993e290
PA
125312009-06-25 Pedro Alves <pedro@codesourcery.com>
12532
12533 * server.c (process_serial_event): Re-return unsupported, not
12534 error, if the type isn't recognized. Re-allow supporting only
12535 insert or remove packets. Also call require_running for
12536 breakpoints. Add missing break statement to default case. Tidy.
12537 * target.h (struct target_ops): Rename insert_watchpoint to
12538 insert_point, and remove_watchpoint to remove_point.
12539
12540 * linux-low.h (struct linux_target_ops): Likewise.
12541 * linux-low.c (linux_insert_watchpoint): Rename to ...
12542 (linux_insert_point): ... this. Adjust.
12543 (linux_remove_watchpoint): Rename to ...
12544 (linux_remove_point): ... this. Adjust.
12545 (linux_target_ops): Adjust.
12546 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12547 (cris_insert_point): ... this.
12548 (cris_remove_watchpoint): Rename to ...
12549 (cris_remove_point): ... this.
12550 (the_low_target): Adjust.
12551
0f54c268
PM
125522009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12553
12554 * server.c (handle_v_kill): Pass signal_pid to
12555 kill_inferior if multi_process is zero.
12556
c6314022
AR
125572009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12558
12559 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12560 * target.h (target_ops): Comment for *_watchpoint to make it clear
12561 the functions can get types '0' and '1'.
12562
4463ce24
AR
125632009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12564
12565 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12566 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12567 * regcache.c (get_regcache): Likewise.
12568 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12569 * win32-low.c (child_fetch_inferior_registers): Remove check for
12570 regno 0.
12571
cf8fd78b
PA
125722009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12573 Pedro Alves <pedro@codesourcery.com>
12574
12575 * target.h (struct target_ops) <supports_multi_process>: New
12576 callback.
12577 (target_supports_multi_process): New.
12578 * server.c (handle_query): Even if GDB reports support, only
12579 enable multi-process if the target also supports it. Report
12580 multi-process support only if the target backend supports it.
12581 * linux-low.c (linux_supports_multi_process): New function.
12582 (linux_target_ops): Install it as target_supports_multi_process
12583 callback.
12584
47c0c975
DE
125852009-05-24 Doug Evans <dje@google.com>
12586
e09875d4
DE
12587 Global renaming of find_thread_pid to find_thread_ptid.
12588 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12589 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12590 All callers updated.
12591
e27d73f6
DE
12592 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12593 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12594 directly.
12595
47c0c975
DE
12596 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12597 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12598 (linux_resume_one_lwp): Ditto.
12599
2acc282a
DE
126002009-05-23 Doug Evans <dje@google.com>
12601
12602 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12603 from struct inferior_list_entry * to struct lwp_info *.
12604 All callers updated.
12605
9f1036c1
DE
126062009-05-13 Doug Evans <dje@google.com>
12607
12608 * linux-x86-low.c: Don't include assert.h.
12609 (x86_siginfo_fixup): Use fatal, not assert.
12610 (x86_arch_setup): Fix comment.
12611
d0722149
DE
126122009-05-12 Doug Evans <dje@google.com>
12613
12614 Biarch support for i386/amd64 gdbserver.
12615 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12616 Add linux-x86-low.c.
12617 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12618 (linux-x86-low.o): Add.
12619 * linux-x86-64-low.c: Delete.
12620 * linux-i386-low.c: Delete.
12621 * linux-x86-low.c: New file.
12622 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12623 linux-x86-low.o.
12624 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12625 linux-x86-low.o.
12626 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12627 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12628 (linux_child_pid_to_exec_file): New function.
12629 (elf_64_header_p, elf_64_file_p): New functions.
12630 (siginfo_fixup): New function.
12631 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12632 give target a chance to convert layout.
12633 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12634 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12635
fdeb2a12
DE
126362009-05-07 Doug Evans <dje@google.com>
12637
12638 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12639 (regsets_store_inferior_registers): Ditto.
12640
a6dbe5df
PA
126412009-05-06 Pedro Alves <pedro@codesourcery.com>
12642
12643 PR server/10048
12644
12645 * linux-low.c (must_set_ptrace_flags): Delete.
12646 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12647 of the global.
12648 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12649 `lwp->must_set_ptrace_flags' instead.
ba42693b 12650 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12651 (linux_wait_1): ... not here.
12652
5091eb23
DE
126532009-04-30 Doug Evans <dje@google.com>
12654
9f767825
DE
12655 * inferiors.c (started_inferior_callback): New function.
12656 (attached_inferior_callback): New function.
12657 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12658 * server.c (print_started_pid, print_attached_pid): New functions.
12659 (detach_or_kill_for_exit): New function.
12660 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12661 * server.h (have_started_inferiors_p): Declare.
12662 (have_attached_inferiors_p): Declare.
12663
5091eb23
DE
12664 * inferiors.c (remove_process): Fix memory leak, free process.
12665 * linux-low.c (linux_remove_process): New function.
12666 (linux_kill): Call it instead of remove_process.
12667 (linux_detach, linux_wait_1): Ditto.
12668
155c8968
PA
126692009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12670
12671 * configure.srv: Add x86 Windows CE target.
12672
7fe519cb
UW
126732009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12674
12675 * inferiors.c (get_thread_process): Make global.
12676 * server.h (get_thread_process): Add prototype.
12677 * thread-db.c (find_one_thread): Use get_thread_process
12678 instead of current_process.
12679 (thread_db_get_tls_address): Do not crash if called when
12680 thread layer is not yet initialized.
12681
5472f405
UW
126822009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12683
12684 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12685 * spu-low.c (current_tid): Rename to ...
12686 (current_ptid): ... this.
12687 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12688 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12689 ptid_get_lwp (current_ptid) instead of current_tid.
12690 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12691 instead of current_tid. Use find_process_pid to verify pid
12692 argument is valid. Pass proper argument to remove_process.
12693 (spu_thread_alive): Compare current_ptid instead of current_tid.
12694 (spu_resume): Likewise.
12695
55ac2b99
PA
126962009-04-02 Pedro Alves <pedro@codesourcery.com>
12697
12698 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12699 variable.
12700
95954743
PA
127012009-04-01 Pedro Alves <pedro@codesourcery.com>
12702
12703 Implement the multiprocess extensions, and add linux multiprocess
12704 support.
12705
12706 * server.h (ULONGEST): Declare.
12707 (struct ptid, ptid_t): New.
12708 (minus_one_ptid, null_ptid): Declare.
12709 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12710 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12711 (struct inferior_list_entry): Change `id' type from unsigned from
12712 to ptid_t.
12713 (struct sym_cache, struct breakpoint, struct
12714 process_info_private): Forward declare.
12715 (struct process_info): Declare.
12716 (current_process): Declare.
12717 (all_processes): Declare.
12718 (initialize_inferiors): Declare.
12719 (add_thread): Adjust to use ptid_t.
12720 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12721 (add_process, remove_process, find_thread_pid): Declare.
12722 (find_inferior_id): Adjust to use ptid_t.
12723 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12724 (multi_process): Declare.
12725 (push_event): Adjust to use ptid_t.
12726 (read_ptid, write_ptid): Declare.
12727 (prepare_resume_reply): Adjust to use ptid_t.
12728 (clear_symbol_cache): Declare.
12729 * inferiors.c (all_processes): New.
12730 (null_ptid, minus_one_ptid): New.
12731 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12732 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12733 (add_thread): Change unsigned long to ptid. Remove gdb_id
12734 parameter. Adjust.
12735 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12736 (gdb_id_to_thread): Rename to ...
12737 (find_thread_pid): ... this. Change unsigned long to ptid.
12738 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12739 (loaded_dll, pull_pid_from_list): Adjust.
12740 (add_process, remove_process, find_process_pid)
12741 (get_thread_process, current_process, initialize_inferiors): New.
12742 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12743 (struct target_waitstatus) <related_pid>: Ditto.
12744 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12745 return type to int.
12746 (struct target_ops) <join>: Add `pid' argument.
12747 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12748 (struct target_ops) <wait>: Add `ptid' field. Change return type
12749 to ptid.
12750 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12751 (mywait): Add `ptid' argument. Change return type to ptid_t.
12752 (target_pid_to_str): Declare.
12753 * target.c (set_desired_inferior): Adjust to use ptids.
12754 (mywait): Add new `ptid' argument. Adjust.
12755 (target_pid_to_str): New.
12756 * mem-break.h (free_all_breakpoints): Declare.
12757 * mem-break.c (breakpoints): Delelete.
12758 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12759 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12760 to use per-process breakpoint list.
12761 (free_all_breakpoints): New.
12762 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12763 (symbol_cache, all_symbols_looked_up): Delete.
12764 (hexchars): New.
12765 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12766 read_ptid): New.
12767 (prepare_resume_reply): Change ptid argument's type from unsigned
12768 long to ptid_t. Adjust. Implement W;process and X;process.
12769 (free_sym_cache, clear_symbol_cache): New.
12770 (look_up_one_symbol): Adjust to per-process symbol cache. *
12771 * server.c (cont_thread, general_thread, step_thread): Change type
12772 to ptid_t.
12773 (attached): Delete.
12774 (multi_process): New.
12775 (last_ptid): Change type to ptid_t.
12776 (struct vstop_notif) <ptid>: Change type to ptid_t.
12777 (queue_stop_reply, push_event): Change `ptid' argument's type to
12778 ptid_t.
12779 (discard_queued_stop_replies): Add `pid' argument.
12780 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12781 changes. Don't reference the `attached' global.
12782 (attach_inferior): Adjust to mywait interface changes.
12783 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12784 features. Handle and report "multiprocess+". Handle
12785 "qAttached:PID".
12786 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12787 changes.
12788 (handle_v_kill): New.
12789 (handle_v_stopped): Adjust to use target_pid_to_str.
12790 (handle_v_requests): Allow multiple attaches and runs when
12791 multiprocess extensions are in effect. Handle "vKill".
12792 (myresume): Adjust to use ptids.
12793 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12794 (handle_status): Adjust to discard_queued_stop_replies interface
12795 change.
12796 (first_thread_of, kill_inferior_callback)
12797 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12798 (main): Call initialize_inferiors. Adjust to use ptids, killing
12799 and detaching from all inferiors. Handle multiprocess packet
12800 variants.
12801 * linux-low.h: Include gdb_proc_service.h.
12802 (struct process_info_private): New.
12803 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12804 <lwpid_of>: Use ptid_get_lwp.
12805 (get_lwp_thread): Adjust.
12806 (struct lwp_info): Add `dead' member.
12807 (find_lwp_pid): Declare.
12808 * linux-low.c (thread_db_active): Delete.
12809 (new_inferior): Adjust comment.
12810 (inferior_pid): Delete.
12811 (linux_add_process): New.
12812 (handle_extended_wait): Adjust.
12813 (add_lwp): Change unsigned long to ptid.
12814 (linux_create_inferior): Add process to processes table. Adjust
12815 to use ptids. Don't set new_inferior here.
12816 (linux_attach_lwp): Rename to ...
12817 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12818 it. Adjust to use ptids.
12819 (linux_attach_lwp): New.
12820 (linux_attach): Add process to processes table. Don't set
12821 new_inferior here.
12822 (struct counter): New.
12823 (second_thread_of_pid_p, last_thread_of_process_p): New.
12824 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12825 multiple processes.
12826 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12827 processes. Remove process from process table.
12828 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12829 to multiple processes.
12830 (any_thread_of): New.
12831 (linux_detach): Add `pid' argument, and handle it. Remove process
12832 from processes table.
12833 (linux_join): Add `pid' argument. Handle it.
12834 (linux_thread_alive): Change unsighed long argument to ptid_t.
12835 Consider dead lwps as not being alive.
12836 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12837 threads we're not interested in.
12838 (same_lwp, find_lwp_pid): New.
12839 (linux_wait_for_lwp): Change `pid' argument's type from int to
12840 ptid_t. Adjust.
12841 (linux_wait_for_event): Rename to ...
12842 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12843 from int to ptid_t. Adjust.
12844 (linux_wait_for_event): New.
12845 (linux_wait_1): Add `ptid' argument. Change return type to
12846 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12847 that exit from the process table.
12848 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12849 Adjust.
12850 (mark_lwp_dead): New.
12851 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12852 stopping all threads, mark its main lwp as dead.
12853 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12854 ptids.
12855 (fetch_register, usr_store_inferior_registers)
12856 (regsets_fetch_inferior_registers)
12857 (regsets_store_inferior_registers, linux_read_memory)
12858 (linux_write_memory): Inline `inferior_pid'.
12859 (linux_look_up_symbols): Adjust to use per-process
12860 `thread_db_active'.
12861 (linux_request_interrupt): Adjust to use ptids.
12862 (linux_read_auxv): Inline `inferior_pid'.
12863 (initialize_low): Don't reference thread_db_active.
12864 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12865 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12866 (ps_getpid): Return the pid of the current inferior.
12867 * thread-db.c (proc_handle, thread_agent): Delete.
12868 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12869 per-process data.
12870 (find_one_thread): Change argument type to ptid_t. Adjust to
12871 per-process data.
12872 (maybe_attach_thread): Adjust to per-process data and ptids.
12873 (thread_db_find_new_threads): Ditto.
12874 (thread_db_init): Ditto.
12875 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12876 processes table. Adjust to use ptids.
12877 (spu_kill, spu_detach): Adjust interface. Remove process from
12878 processes table.
12879 (spu_join, spu_thread_alive): Adjust interface.
12880 (spu_wait): Adjust interface. Remove process from processes
12881 table. Adjust to use ptids.
12882 * win32-low.c (current_inferior_tid): Delete.
12883 (current_inferior_ptid): New.
12884 (debug_event_ptid): New.
12885 (thread_rec): Take a ptid. Adjust.
12886 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12887 (child_delete_thread): Ditto.
12888 (do_initial_child_stuff): Add `attached' argument. Add process to
12889 processes table.
12890 (child_fetch_inferior_registers, child_store_inferior_registers):
12891 Adjust.
12892 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12893 (win32_attach): Pass 1 to do_initial_child_stuff.
12894 (win32_kill): Adjust interface. Remove process from processes
12895 table.
12896 (win32_detach): Ditto.
12897 (win32_join): Adjust interface.
12898 (win32_thread_alive): Take a ptid.
12899 (win32_resume): Adjust to use ptids.
12900 (get_child_debug_event): Ditto.
12901 (win32_wait): Adjust interface. Remove exiting process from
12902 processes table.
12903
bd99dc85
PA
129042009-04-01 Pedro Alves <pedro@codesourcery.com>
12905
12906 Non-stop mode support.
12907
12908 * server.h (non_stop): Declare.
12909 (gdb_client_data, handler_func): Declare.
12910 (delete_file_handler, add_file_handler, start_event_loop):
12911 Declare.
12912 (handle_serial_event, handle_target_event, push_event)
12913 (putpkt_notif): Declare.
12914 * target.h (enum resume_kind): New.
12915 (struct thread_resume): Replace `step' field by `kind' field.
12916 (TARGET_WNOHANG): Define.
12917 (struct target_ops) <wait>: Add `options' argument.
12918 <supports_non_stop, async, start_non_stop>: New fields.
12919 (target_supports_non_stop, target_async): New.
12920 (start_non_stop): Declare.
12921 (mywait): Add `options' argument.
12922 * target.c (mywait): Add `options' argument. Print child exit
12923 notifications here.
12924 (start_non_stop): New.
12925 * server.c (non_stop, own_buf, mem_buf): New globals.
12926 (struct vstop_notif): New.
12927 (notif_queue): New global.
12928 (queue_stop_reply, push_event, discard_queued_stop_replies)
12929 (send_next_stop_reply): New.
12930 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12931 interface changes.
12932 (attach_inferior): In non-stop mode, don't wait for the target
12933 here.
12934 (handle_general_set): Handle QNonStop.
12935 (handle_query): When handling qC, return the current general
12936 thread, instead of the first thread of the list.
12937 (handle_query): If the backend supports non-stop mode, include
12938 QNonStop+ in the qSupported query response.
12939 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12940 and non-stop mode.
12941 (handle_v_attach, handle_v_run): Handle non-stop mode.
12942 (handle_v_stopped): New.
12943 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12944 (myresume): Adjust to use resume_kind. Handle non-stop.
12945 (queue_stop_reply_callback): New.
12946 (handle_status): Handle non-stop mode.
12947 (main): Clear non_stop flag on reconnection. Use the event-loop.
12948 Refactor serial protocol handling from here ...
12949 (process_serial_event): ... to this new function. When GDB
12950 selects any thread, select one here. In non-stop mode, wait until
12951 GDB acks all pending events before exiting.
12952 (handle_serial_event, handle_target_event): New.
12953 * remote-utils.c (remote_open): Install remote_desc in the event
12954 loop.
12955 (remote_close): Remove remote_desc from the event loop.
12956 (putpkt_binary): Rename to...
12957 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12958 (putpkt_binary): New as wrapper around putpkt_binary_1.
12959 (putpkt_notif): New.
12960 (prepare_resume_reply): In non-stop mode, don't change the
12961 general_thread.
12962 * event-loop.c: New.
12963 * Makefile.in (OBJ): Add event-loop.o.
12964 (event-loop.o): New rule.
12965
12966 * linux-low.h (pid_of): Moved here.
12967 (lwpid_of): New.
12968 (get_lwp_thread): Use lwpid_of.
12969 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12970 * linux-low.c (pid_of): Delete.
12971 (inferior_pid): Use lwpid_of.
12972 (linux_event_pipe): New.
12973 (target_is_async_p): New.
12974 (delete_lwp): New.
12975 (handle_extended_wait): Use lwpid_of.
12976 (add_lwp): Don't set lwpid field.
12977 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12978 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12979 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12980 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12981 first. Adjust to linux_wait_for_event interface changes. Use
12982 lwpid_of.
12983 (linux_detach): Don't delete the main lwp here.
12984 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12985 (status_pending_p): Don't consider explicitly suspended lwps.
12986 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12987 pointer. Add OPTIONS argument. Change return type to int. Use
12988 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12989 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12990 pointer. Add status pointer argument. Return a pid instead of a
12991 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12992 changes. In non-stop mode, don't switch to a random thread.
12993 (linux_wait): Rename to...
12994 (linux_wait_1): ... this. Add target_options argument, and handle
12995 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12996 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12997 clean exit and signal exit code. Don't stop all threads in
12998 non-stop mode. In all-stop mode, only stop all threads when
12999 reporting a stop to GDB. Handle explicit thread stop requests.
13000 (async_file_flush, async_file_mark): New.
13001 (linux_wait): New.
13002 (send_sigstop): Use lwpid_of.
13003 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13004 interface changes. In non-stop mode, don't switch to a random
13005 thread.
13006 (linux_resume_one_lwp): Use lwpid_of.
13007 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13008 (linux_resume_one_thread): ... this. Handle resume_stop. In
13009 non-stop mode, don't look for pending flag in all threads.
13010 (resume_status_pending_p): Don't consider explicitly suspended
13011 threads.
13012 (my_waitpid): Reimplement. Emulate __WALL.
13013 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13014 Use lwpid_of.
13015 (sigchld_handler, linux_supports_non_stop, linux_async)
13016 (linux_start_non_stop): New.
13017 (linux_target_ops): Register linux_supports_non_stop, linux_async
13018 and linux_start_non_stop.
13019 (initialize_low): Install SIGCHLD handler.
13020 * thread-db.c (thread_db_create_event, find_one_thread)
13021 (thread_db_get_tls_address): Use lwpid_of.
13022 * win32-low.c (win32_detach): Adjust to use resume_kind.
13023 (win32_wait): Add `options' argument.
13024 * spu-low.c (spu_resume): Adjust to use resume_kind.
13025 (spu_wait): Add `options' argument.
13026
5b1c542e
PA
130272009-04-01 Pedro Alves <pedro@codesourcery.com>
13028
13029 Decouple target code from remote protocol.
13030
13031 * target.h (enum target_waitkind): New.
13032 (struct target_waitstatus): New.
13033 (struct target_ops) <wait>: Return an unsigned long. Take a
13034 target_waitstatus pointer instead of a char pointer.
13035 (mywait): Likewise.
13036 * target.c (mywait): Change prototype to return an unsigned long.
13037 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13038 * server.h (thread_from_wait, old_thread_from_wait): Delete
13039 declarations.
13040 (prepare_resume_reply): Change prototype to take a
13041 target_waitstatus.
13042 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13043 (last_status, last_ptid): New.
13044 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13045 pid instead of a signal.
13046 (attach_inferior): Remove "status" and "signal" parameters.
13047 Adjust.
13048 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13049 not as an address.
13050 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13051 (handle_v_requests, myresume): Remove "status" and "signal"
13052 parameters. Adjust.
13053 (handle_status): New.
13054 (main): Delete local `status'. Adjust.
13055 * remote-utils.c: Include target.h.
13056 (prepare_resume_reply): Change prototype to take a
13057 target_waitstatus. Adjust.
13058
13059 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13060 interface.
13061 * spu-low.c (spu_wait): Adjust.
13062 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13063 Delete.
13064 (win32_wait): Adjust.
13065
2bd7c093
PA
130662009-04-01 Pedro Alves <pedro@codesourcery.com>
13067
13068 * target.h (struct thread_resume): Delete leave_stopped member.
13069 (struct target_ops): Add a `n' argument to the `resume' callback.
13070 * server.c (start_inferior): Adjust.
13071 (handle_v_cont, myresume): Adjust.
13072 * linux-low.c (check_removed_breakpoint): Adjust to resume
13073 interface change, and to removed leave_stopped field.
13074 (resume_ptr): Delete.
13075 (struct thread_resume_array): New.
13076 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13077 resume interface change.
13078 (linux_continue_one_thread, linux_queue_one_thread)
13079 (resume_status_pending_p): Check if the resume field is NULL
13080 instead of checking the leave_stopped member.
13081 (linux_resume): Adjust to the target resume interface change.
13082 * spu-low.c (spu_resume): Adjust to the target resume interface
13083 change.
13084 * win32-low.c (win32_detach, win32_resume): Ditto.
13085
c35fafde
PA
130862009-04-01 Pedro Alves <pedro@codesourcery.com>
13087
13088 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13089 flag.
13090 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13091 pending.
13092 (linux_continue_one_thread): Only preserve the stepping flag if
13093 there's a pending breakpoint.
13094
0a59d50b
PA
130952009-03-31 Pedro Alves <pedro@codesourcery.com>
13096
13097 * server.c (main): After the inferior having exited, call
13098 remote_close before exiting gdbserver.
13099
f04c6d38
TJB
131002009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13101
13102 Fix size of FPSCR in Power 7 processors.
13103 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13104 (PPC_FEATURE_HAS_DFP): New #define.
13105 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13106 size of the FPSCR.
13107
78e5cee6
PA
131082009-03-23 Pedro Alves <pedro@codesourcery.com>
13109
13110 * server.c (handle_query) Whitespace and formatting.
13111
1b3f6016
PA
131122009-03-22 Pedro Alves <pedro@codesourcery.com>
13113
13114 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13115 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13116 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13117 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13118 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13119 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13120 Makefile.in, configure.ac: Fix whitespace throughout.
13121 * configure: Regenerate.
13122
a07b2135
PA
131232009-03-22 Pedro Alves <pedro@codesourcery.com>
13124
13125 * inferiors.c (find_inferior): Make it safe for the callback
13126 function to delete the currently iterated inferior.
13127
67cc2626
PA
131282009-03-22 Pedro Alves <pedro@codesourcery.com>
13129
13130 * Makefile.in (linuw_low_h): Move higher.
13131 (thread-db.o): Depend on $(linux_low_h).
13132
54a0b537
PA
131332009-03-17 Pedro Alves <pedro@codesourcery.com>
13134
13135 Rename "process" to "lwp" throughout.
13136
13137 * linux-low.c (all_processes): Rename to...
13138 (all_lwps): ... this.
13139 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13140 (add_process): Rename to ...
13141 (add_lwp): ... this. Adjust.
13142 (linux_create_inferior): Adjust.
13143 (linux_attach_lwp): Adjust.
13144 (linux_attach): Adjust.
13145 (linux_kill_one_process): Rename to ...
13146 (linux_kill_one_lwp): ... this. Adjust.
13147 (linux_kill): Adjust.
13148 (linux_detach_one_process): Rename to ...
13149 (linux_detach_one_lwp): ... this. Adjust.
13150 (linux_detach): Adjust.
13151 (check_removed_breakpoint): Adjust.
13152 (status_pending_p): Adjust.
13153 (linux_wait_for_process): Rename to ...
13154 (linux_wait_for_lwp): ... this. Adjust.
13155 (linux_wait_for_event): Adjust.
13156 (send_sigstop): Adjust.
13157 (wait_for_sigstop): Adjust.
13158 (stop_all_processes): Rename to ...
13159 (stop_all_lwps): ... this.
13160 (linux_resume_one_process): Rename to ...
13161 (linux_resume_one_lwp): ... this. Adjust.
13162 (linux_set_resume_request, linux_continue_one_thread)
13163 (linux_queue_one_thread, resume_status_pending_p)
13164 (usr_store_inferior_registers, regsets_store_inferior_registers)
13165 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13166 Adjust.
13167 * linux-low.h (get_process): Rename to ...
13168 (get_lwp): ... this. Adjust.
13169 (get_thread_process): Rename to ...
13170 (get_thread_lwp): ... this. Adjust.
13171 (get_process_thread): Rename to ...
13172 (get_lwp_thread): ... this. Adjust.
13173 (struct process_info): Rename to ...
13174 (struct lwp_info): ... this.
13175 (all_processes): Rename to ...
13176 (all_lwps): ... this.
13177 * proc-service.c (ps_lgetregs): Adjust.
13178 * thread-db.c (thread_db_create_event, find_one_thread)
13179 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13180
0b16c5cf
PA
131812009-03-14 Pedro Alves <pedro@codesourcery.com>
13182
13183 * server.c (handle_query): Handle "qAttached".
13184
32de4b9d
NS
131852009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13186
13187 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13188 GPLv3, update license URL.
13189
2aecd87f
DE
131902009-03-01 Doug Evans <dje@google.com>
13191
93efd302 13192 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13193 (server_h): Add gdb_signals.h.
13194 (signals.o): Update.
13195 * server.h (target_signal_from_host,target_signal_to_host_p)
13196 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13197
86b1f9c5
PM
131982009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13199
13200 * remote-utils.c (getpkt): Also generate remote-debug
13201 information if noack_mode is set.
13202
4aa995e1
PA
132032009-02-06 Pedro Alves <pedro@codesourcery.com>
13204
13205 * server.c (handle_query): Report qXfer:siginfo:read and
13206 qXfer:siginfo:write as supported and handle them.
13207 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13208 * linux-low.c (linux_xfer_siginfo): New.
13209 (linux_target_ops): Set it.
13210
62709adf
PA
132112009-01-26 Pedro Alves <pedro@codesourcery.com>
13212
13213 * server.c (gdbserver_usage): Mention --remote-debug.
13214 (main): Accept '--remote-debug' switch.
13215
aef93bd7
DE
132162009-01-18 Doug Evans <dje@google.com>
13217
13218 * regcache.c (new_register_cache): No need to check result of xcalloc.
13219 * server.c (handle_search_memory): Back out calls to xmalloc,
13220 result is checked and error is returned to user upon failure.
13221 (handle_query): Ditto. Add more checks for result of malloc.
13222 (handle_v_cont): Check result of malloc, report error back to
13223 user upon failure.
13224 (handle_v_run): Ditto. Call freeargv.
13225 * server.h (freeargv): Declare.
13226 * utils.c (freeargv): New fn.
13227
54363045
DE
132282009-01-15 Doug Evans <dje@google.com>
13229
f626972c
DE
13230 * gdbreplay.c (perror_with_name): Make arg const char *.
13231 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13232 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13233 * utils.c (perror_with_name): Make arg const char *.
54363045 13234
18aae699
PA
132352009-01-14 Pedro Alves <pedro@codesourcery.com>
13236
13237 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13238 when handling a EXIT_PROCESS_DEBUG_EVENT.
13239
ff703abe
JB
132402009-01-06 Joel Brobecker <brobecker@adacore.com>
13241
13242 * gdbreplay.c (gdbreplay_version): Update copyright year.
13243 * server.c (gdbserver_version): Likewise.
13244
f21cc1a2 132452009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13246
13247 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13248 (handle_extended_wait): Improve comment.
0e21c1ec 13249
bca929d3
DE
132502008-12-13 Doug Evans <dje@google.com>
13251
13252 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13253 * server.h (ATTR_MALLOC): New macro.
13254 (xmalloc,xcalloc,xstrdup): Declare.
13255 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13256 * inferiors.c: Ditto.
13257 * linux-low.c: Ditto.
13258 * mem-break.c: Ditto.
13259 * regcache.c: Ditto.
13260 * remote-utils.c: Ditto.
13261 * server.c: Ditto.
13262 * target.c: Ditto.
13263 * win32-low.c: Ditto.
13264
97438e3f
DE
132652008-12-12 Doug Evans <dje@google.com>
13266
896c7fbb
DE
13267 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13268 in debugging printf.
13269
97438e3f
DE
13270 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13271
e3b886f8
DE
132722008-12-09 Doug Evans <dje@google.com>
13273
13274 * linux-low.h (struct process_info): Delete member tid, unused.
13275 * thread-db.c (find_one_thread): Update.
13276 (maybe_attach_thread): Update.
13277
07e059b5
VP
132782008-12-02 Pedro Alves <pedro@codesourcery.com>
13279
889bf7c5
PA
13280 * target.h (struct target_ops): Add qxfer_osdata member.
13281 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13282 and dirent.h.
13283 (linux_qxfer_osdata): New functions.
13284 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13285 callback.
13286 * server.c (handle_query): Handle "qXfer:osdata:read:".
13287 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13288 (buffer_xml_printf): New functions.
13289 * server.h (struct buffer): New.
13290 (buffer_grow_str, buffer_grow_str0): New macros.
13291 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13292 (buffer_xml_printf): Declare.
07e059b5 13293
4cab47ab
DE
132942008-11-24 Doug Evans <dje@google.com>
13295
13296 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13297
f142445f
DJ
132982008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13299
13300 * server.c (handle_v_run): Always use the supplied argument list.
13301
d0107bb6 133022008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13303
d0107bb6
BW
13304 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13305 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13306
2c4ad781
TJB
133072008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13308
13309 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13310 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13311 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13312 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13313 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13314 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13315 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13316 XML target descriptions.
13317 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13318 when inferior is running on an ISA 2.05 or later processor. Add
13319 special case to return offset for full 64-bit slot of FPSCR when
13320 in 32-bits.
13321
dfb64f85
DJ
133222008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13323
13324 * Makefile.in (SFILES, clean): Added sparc64 files.
13325 (reg-sparc64.o, reg-sparc64.c): New.
13326 * configure.srv (sparc*-*-linux*): New configuration.
13327 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13328 syscall arguments for SPARC.
13329 (regsets_store_inferior_registers): Likewise.
13330 * linux-sparc-low.c: New file.
13331
66b6e1dd
DE
133322008-10-21 Doug Evans <dje@google.com>
13333
13334 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13335 (READLINE_DIR,READLINE_DEP): Delete.
13336 (INTERNAL_CFLAGS): Update.
13337 (LINTFLAGS): Update.
13338
9b710a42
PA
133392008-10-10 Pedro Alves <pedro@codesourcery.com>
13340
13341 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13342 whole argv from the last run, not just argv[0].
13343
5822d809
PA
133442008-09-08 Pedro Alves <pedro@codesourcery.com>
13345
13346 * regcache.c (new_register_cache): Return NULL if the register
13347 cache size isn't known yet.
13348 (free_register_cache): Avoid dereferencing a NULL regcache.
13349
74aac56f
DJ
133502008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13351
13352 * configure.srv: Merge MIPS and MIPS64.
13353
400b20f5
MR
133542008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13355
13356 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13357
677c5bb1
LM
133582008-08-18 Luis Machado <luisgpm@br.ibm.com>
13359
13360 * Makefile.in: Add required vsx dependencies.
13361
13362 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13363 Declare init_registers_powerpc_vsx32l.
13364 Declare init_registers_powerpc_vsx64l.
13365 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13366 (ppc_arch_setup): Check for VSX in hwcap.
13367 (ppc_fill_vsxregset): New function.
13368 (ppc_store_vsxregset): New function.
13369 Add new VSX entry in regset_info target_regsets.
13370
13371 * configure.srv: Add new VSX dependencies.
13372
a6f3e723
SL
133732008-08-12 Pedro Alves <pedro@codesourcery.com>
13374
13375 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13376 (remote_open): Set or clear transport_is_reliable.
13377 (putpkt_binary): Don't expect acks in noack mode.
13378 (getpkt): Don't send ack/nac in noack mode.
13379 * server.c (handle_general_set): Handle QStartNoAckMode.
13380 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13381 qSupported.
13382 (main): Reset noack_mode on every connection.
13383 * server.h (noack_mode): Declare.
13384
a417dc56
RW
133852008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13386
13387 * Makefile.in (GDBREPLAY_OBS): New variable.
13388 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13389
3221518c
UW
133902008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13391 Daniel Jacobowitz <dan@codesourcery.com>
13392
13393 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13394 (usr_store_inferior_registers): Likewise.
13395 (regsets_store_inferior_registers): Likewise.
13396
ec56be1b
PA
133972008-07-31 Rolf Jansen <rj@surtec.com>
13398 Pedro Alves <pedro@codesourcery.com>
13399
13400 * configure.ac: Check for memmem declaration.
13401 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13402 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13403 (disable_packet_qfThreadInfo): Unconditionally compile.
13404 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13405 * configure, config.in: Regenerate.
13406
2fe5e3ff
DE
134072008-07-28 Doug Kwan <dougkwan@google.com>
13408
13409 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13410 (linux_write_memory): Remove declaration of errno.
13411
836acd6d
UW
134122008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13413
13414 * linux-low.c (handle_extended_wait): Do not use "status"
13415 variable uninitialized.
13416
aeba519e
PA
134172008-07-07 Pedro Alves <pedro@codesourcery.com>
13418
13419 * server.c (handle_v_attach): Inhibit reporting dll changes.
13420
db42f210
PA
134212008-06-27 Pedro Alves <pedro@codesourcery.com>
13422
13423 * remote-utils.c (prepare_resume_reply): If requested, don't
13424 output "thread:TID" in the T stop reply.
13425
13426 * server.c (disable_packet_vCont, disable_packet_Tthread)
13427 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13428 (handle_query): If requested, disable support for qC, qfThreadInfo
13429 and qsThreadInfo.
13430 (handle_v_requests): If requested, disable support for vCont.
13431 (gdbserver_show_disableable): New.
13432 (main): Handle --disable-packet and --disable-packet=LIST.
13433
13434 * server.h (disable_packet_vCont, disable_packet_Tthread)
13435 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13436
8e4c5421
CD
134372008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13438
13439 * server.c (gdbserver_usage): Mention --version.
13440
6e23a804
DJ
134412008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13442
13443 * Makefile.in (gdbreplay.o): New rule.
13444
90aa6a40
JM
134452008-06-06 Joseph Myers <joseph@codesourcery.com>
13446
13447 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13448 message, not gdbserver.
13449
c16158bc 134502008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13451 Nathan Sidwell <nathan@codesourcery.com>
13452 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13453
13454 * acinclude.m4: Include ../../config/acx.m4.
13455 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13456 * configure, config.in: Regenerate.
13457 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13458 * server.c (gdbserver_version): Print PKGVERSION.
13459 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13460 (main): Adjust gdbserver_usage calls.
13461 * gdbreplay.c (version, host_name): Add declarations.
13462 (gdbreplay_version, gdbreplay_usage): New.
13463 (main): Accept --version and --help options.
13464
aeb75bf5
DJ
134652008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13466
13467 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13468 (arm_breakpoint_at): Handle Thumb.
13469 (the_low_target): Add comment.
13470
76b233dd
UW
134712008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13472
13473 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13474
08388c79
DE
134752008-05-09 Doug Evans <dje@google.com>
13476
a3c83fae
DE
13477 * server.h (decode_search_memory_packet): Declare.
13478 * remote-utils.c (decode_search_memory_packet): New fn.
13479 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13480 (handle_search_memory): New fn.
13481 (handle_query): Process qSearch:memory packets.
13482
bb9c3d36
UW
134832008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13484
13485 * regcache.c (registers_length): Remove.
13486 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13487 full register packet.
13488 * regcache.h (registers_length): Remove prototype.
13489 * server.h (PBUFSIZ): Define to 16384.
13490
7284e1be
UW
134912008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13492
13493 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13494 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13495 powerpc-64l.o, and powerpc-altivec64l.o.
13496 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13497 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13498 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13499 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13500 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13501 to srv_xmlfiles.
13502
13503 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13504 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13505 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13506 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13507 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13508 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13509 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13510 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13511 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13512 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13513 (clean): Update.
13514
13515 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13516 (init_registers_powerpc_32l): ... this new prototype.
13517 (init_registers_powerpc_32): Remove, replace by ...
13518 (init_registers_powerpc_altivec32l): ... this new prototype.
13519 (init_registers_powerpc_e500): Remove, replace by ...
13520 (init_registers_powerpc_e500l): ... this new prototype.
13521 (init_registers_ppc64): Remove, replace by ...
13522 (init_registers_powerpc_64l): ... this new prototype.
13523 (init_registers_powerpc_64): Remove, replace by ...
13524 (init_registers_powerpc_altivec64l): ... this new prototype.
13525 (ppc_num_regs): Set to 73.
13526 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13527 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13528 (ppc_cannot_store_register): Handle orig_r3 and trap.
13529 (ppc_arch_setup): Update init_registers_... calls.
13530 (ppc_fill_gregset): Handle orig_r3 and trap.
13531
13532 * inferiors.c (clear_inferiors): Reset current_inferior.
13533
fdc59709
PB
135342008-04-23 Paolo Bonzini <bonzini@gnu.org>
13535
889bf7c5
PA
13536 * acinclude.m4: Add override.m4.
13537 * configure: Regenerate.
fdc59709 13538
c9b2f845
UW
135392008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13540
13541 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13542 initial call to init_register_ppc64.
13543
550512b8
UW
135442008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13545
43aaf8b6
PA
13546 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13547 single powerpc*-*-linux* case.
550512b8
UW
13548 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13549
b6430ec3
UW
135502008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13551
13552 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13553 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13554 from reg_xmlfiles.
13555 * linux-ppc-low.c: Include <elf.h>.
13556 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13557 (ppc_hwcap): New global variable.
13558 (ppc_regmap): Remove __SPE__ #ifdef sections.
13559 (ppc_regmap_e500): New global variable.
13560 (ppc_cannot_store_register): Update __SPE__ special case.
13561 (ppc_get_hwcap): New function.
13562 (ppc_arch_setup): Use it to determine whether inferior supports
13563 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13564 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13565 Do not access registers if target does not support AltiVec.
13566 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13567 Do not access registers if target does not support SPE.
13568 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13569
52fa2412
UW
135702008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13571
13572 * linux-low.c (disabled_regsets, num_regsets): New.
13573 (use_regsets_p): Delete.
13574 (linux_wait_for_process): Clear disabled_regsets.
13575 (regsets_fetch_inferior_registers): Check and set it.
13576 (regsets_store_inferior_registers): Likewise.
13577 (linux_fetch_registers, linux_store_registers): Do not use
13578 use_regsets_p.
13579 (initialize_low): Allocate disabled_regsets.
13580
e28b3332
DJ
135812008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13582
13583 * Makefile.in (LIBOBJS): New.
13584 (OBS): Use LIBOBJS.
13585 (memmem.o): New rule.
13586 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13587 * configure: Regenerated.
13588
4536995d
UW
135892008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13590
13591 * server.c (handle_query): Never return "unsupported" for
13592 qXfer:features:read queries.
13593
221c031f
UW
135942008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13595
13596 * server.c (get_features_xml): Fix inverted condition.
13597 (handle_query): Always support qXfer:feature:read.
13598
ccd213ac
DJ
135992008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13600
13601 * server.c (wrapper_argv): New.
13602 (start_inferior): Handle wrapper_argv. If set, expect an extra
13603 trap.
13604 (gdbserver_usage): Document --wrapper.
13605 (main): Parse --wrapper.
13606
6fe305f7
UW
136072008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13608
13609 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13610 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13611 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13612 (ppc_set_pc): Likewise.
13613 (ppc_arch_setup): New function.
13614 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13615 of collect_register.
889bf7c5 13616 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13617
5b0a002e
UW
136182008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13619
13620 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13621 instead of linux-ppc64-low.o.
13622 * linux-ppc64-low.c: Remove file.
13623 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13624 (linux-ppc64-low.o): Remove rule.
13625
13626 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13627 (init_registers_powerpc_64): Likewise.
13628 (ppc_regmap): Conditionally define depending on __powerpc64__.
13629 (ppc_cannot_store_register): Do not special-case "fpscr" when
13630 compiled on __powerpc64__.
13631 (ppc_collect_ptrace_register): New function.
13632 (ppc_supply_ptrace_register): New function.
13633 (ppc_breakpoint): Change type to "unsigned int".
13634 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13635 (the_low_target): Conditionally provide initializers for the
889bf7c5 13636 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13637 collect_ptrace_register and supply_ptrace_register members.
13638
9b4b61c8
UW
136392008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13640
13641 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13642 * server.c (gdbserver_xmltarget): Define.
13643 (get_features_xml): Use it to replace "target.xml" and arch_string.
13644
13645 * configure.srv: Remove srv_xmltarget. Add XML files that were
13646 mentioned there to srv_xmlfiles instead. Remove conditional tests
13647 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13648 srv_xmlfiles and srv_regobj to include all possible choices.
13649 * configure.ac (srv_xmltarget): Remove.
13650 (srv_xmlfiles): Do not add "target.xml".
13651 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13652 checks for supplementary target information.
13653 * configure: Regenerate.
13654 * Makefile.in (XML_TARGET): Remove.
13655 (target.xml): Remove rule.
13656 (clean): Do not clean up target.xml.
13657 (.PRECIOUS): Do not mention target.xml.
13658
13659 * target.h (struct target_ops): Remove arch_string member.
13660 * linux-low.c (linux_arch_string): Remove.
13661 (linux_target_ops): Remove arch_string initializer.
13662 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13663 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13664 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13665 * spu-low.c (spu_arch_string): Remove.
13666 (spu_target_ops): Remove arch_string initializer.
13667 * win32-low.c (win32_arch_string): Remove.
13668 (win32_target_ops): Remove arch_string initializer.
13669 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13670 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13671 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13672
ee1a7ae4
UW
136732008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13674
13675 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13676 by collect_ptrace_register and supply_ptrace_register hooks.
13677 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13678 instead of checking for the_low_target.left_pad_xfer.
13679 (usr_store_inferior_registers): Use collect_ptrace_register callback
13680 instead of checking for the_low_target.left_pad_xfer.
13681
13682 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13683 (s390_supply_ptrace_register): Likewise.
13684 (s390_fill_gregset): Call s390_collect_ptrace_register.
13685 (the_low_target): Update.
13686
13687 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13688 (ppc_supply_ptrace_register): Likewise.
13689 (the_low_target): Update.
13690
13691 * linux-i386-low.c (the_low_target): Update.
13692 * linux-x86-64-low.c (the_low_target): Update.
13693
d61ddec4
UW
136942008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13695
13696 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13697 reg-s390.o and reg-s390x.o.
13698
13699 * linux-low.c (new_inferior): New global variable.
13700 (linux_create_inferior, linux_attach): Set it.
13701 (linux_wait_for_process): Call the_low_target.arch_setup after the
13702 target has stopped for the first time.
13703 (initialize_low): Do not call the_low_target.arch_setup.
13704
13705 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13706 (s390_set_pc): Likewise.
13707 (s390_arch_setup): New function.
13708 (the_low_target): Use s390_arch_setup as arch_setup routine.
13709
13710 * regcache.c (realloc_register_cache): New function.
13711 (set_register_cache): Call it for each existing regcache.
13712
d05b4ac3
UW
137132008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13714
13715 * server.h (init_registers): Remove prototype.
13716
13717 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13718 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13719 instead of init_registers ().
13720 * linux-arm-low.c (init_registers_arm): Add prototype.
13721 (init_registers_arm_with_iwmmxt): Likewise.
13722 (the_low_target): Add initializer for arch_setup field.
13723 * linux-cris-low.c (init_registers_cris): Add prototype.
13724 (the_low_target): Add initializer for arch_setup field.
13725 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13726 (the_low_target): Add initializer for arch_setup field.
13727 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13728 (the_low_target): Add initializer for arch_setup field.
13729 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13730 (the_low_target): Add initializer for arch_setup field.
13731 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13732 (the_low_target): Add initializer for arch_setup field.
13733 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13734 (the_low_target): Add initializer for arch_setup field.
13735 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13736 (init_registers_mips64_linux): Likewise.
13737 (the_low_target): Add initializer for arch_setup field.
13738 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13739 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13740 (the_low_target): Add initializer for arch_setup field.
13741 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13742 (init_registers_powerpc_64): Likewise.
13743 (the_low_target): Add initializer for arch_setup field.
13744 * linux-s390-low.c (init_registers_s390): Add prototype.
13745 (init_registers_s390x): Likewise.
13746 (the_low_target): Add initializer for arch_setup field.
13747 * linux-sh-low.c (init_registers_sh): Add prototype.
13748 (the_low_target): Add initializer for arch_setup field.
13749 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13750 (the_low_target): Add initializer for arch_setup field.
13751 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13752 (the_low_target): Add initializer for arch_setup field.
13753
13754 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13755 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13756 instead of init_registers ().
13757 * win32-arm-low.c (init_registers_arm): Add prototype.
13758 (the_low_target): Add initializer for arch_setup field.
13759 * win32-i386-low.c (init_registers_i386): Add prototype.
13760 (the_low_target): Add initializer for arch_setup field.
13761
13762 * spu-low.c (init_registers_spu): Add prototype.
13763 (initialize_low): Call initialie_registers_spu () instead of
13764 initialize_registers ().
13765
fd96d250
PA
137662008-02-19 Pedro Alves <pedro@codesourcery.com>
13767
13768 * server.c (handle_v_requests): When handling the vRun and vAttach
13769 packets, if already debugging a process, don't kill it. Return an
13770 error instead.
13771
d41b6bb4
DJ
137722008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13773
13774 * server.c (handle_query): Correct length check.
13775
5ac588cf
PA
137762008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13777
13778 * win32-low.c (do_initial_child_stuff): Add process handle
13779 parameter. Set current_process_handle and current_process_id from the
13780 parameters. Clear globals.
13781 (win32_create_inferior): Don't set current_process_handle and
13782 current_process_id here. Instead pass them on the call to
13783 do_initial_child_stuff.
13784 (win32_attach): Likewise.
13785 (win32_clear_inferiors): New.
13786 (win32_kill): Don't close the current process handle or the
13787 current thread handle here. Instead call win32_clear_inferiors.
13788 (win32_detach): Don't open a new handle to the process. Call
13789 win32_clear_inferiors.
13790 (win32_join): Don't rely on current_process_handle; open a new
13791 handle using the process id.
13792 (win32_wait): Call win32_clear_inferiors when the inferior process
13793 has exited.
13794
ecd7ecbc
DJ
137952008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13796
13797 * server.c (monitor_show_help): Add "exit".
13798
1525d545
MG
137992008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13800
ecd7ecbc 13801 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13802 (clean): Add reg-xtensa.c.
13803 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13804 * configure.srv (xtensa*-*-linux*) New target.
13805 * linux-xtensa-low.c: New.
13806 * xtensa-xtregs.c: New.
1525d545 13807
59a016f0
PA
138082008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13809
13810 * hostio.c: Don't include errno.h.
13811 (errno_to_fileio_errno): Move to hostio-errno.
13812 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13813 error number outputting to the target->hostio_last_error callback.
13814 (hostio_packet_error): Use FILEIO_EINVAL directly.
13815 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13816 calls to hostio_error.
13817 * hostio-errno.c: New.
13818 * server.h (hostio_last_error_from_errno): Declare.
13819 * target.h (target_ops): Add hostio_last_error member.
13820 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13821 as hostio_last_error handler.
889bf7c5 13822 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13823 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13824 (wince_hostio_last_error): New functions.
13825 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13826 as hostio_last_error handler.
13827 (win32_target_ops) [!_WIN32_WCE]: Register
13828 hostio_last_error_from_errno as hostio_last_error handler.
13829 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13830 (hostio-errno.o): New rule.
13831 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13832 * configure.srv (srv_hostio_err_objs): New variable. Default to
13833 hostio-errno.o.
13834 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13835 * configure: Regenerate.
13836
2d717e4f
DJ
138372008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13838
13839 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13840 (linux_kill, linux_detach): Clean up the process list.
13841 * remote-utils.c (remote_open): Improve port number parsing.
13842 (putpkt_binary, input_interrupt): Only send interrupts if the target
13843 is running.
13844 * server.c (extended_protocol): Make static.
13845 (attached): Define earlier.
13846 (exit_requested, response_needed, program_argv): New variables.
13847 (target_running): New.
13848 (start_inferior): Clear attached here.
13849 (attach_inferior): Set attached here.
13850 (require_running): Define.
13851 (handle_query): Use require_running and target_running. Implement
13852 "monitor exit".
13853 (handle_v_attach, handle_v_run): New.
13854 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13855 (gdbserver_usage): Update.
13856 (main): Redo argument parsing. Handle --debug and --multi. Handle
13857 --attach along with other options or after the port. Save
13858 program_argv. Support no initial program. Resynchronize
13859 communication with GDB after an error. Handle "monitor exit".
13860 Use require_running and target_running. Always allow the extended
13861 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13862 restart in extended mode.
13863 * README: Refer to the GDB manual. Update --attach usage.
13864
7407e2de
AS
138652007-12-20 Andreas Schwab <schwab@suse.de>
13866
13867 * linux-low.c (STACK_SIZE): Define.
13868 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13869 (linux_test_for_tracefork): Likewise.
13870
b65d95c5
DJ
138712007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13872
13873 * linux-low.c (linux_wait_for_event): Update messages. Do not
13874 reinsert auto-delete breakpoints.
13875 * mem-break.c (struct breakpoint): Change return type of handler to
13876 int.
13877 (set_breakpoint_at): Update handler type.
13878 (reinsert_breakpoint_handler): Return 1 instead of calling
13879 delete_breakpoint.
13880 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13881 setting a new one.
13882 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13883 * mem-break.h (set_breakpoint_at): Update handler type.
13884 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13885 * win32-low.c (auto_delete_breakpoint): New.
13886 (get_child_debug_event): Use it.
13887
4e799345
DJ
138882007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13889
13890 * configure.ac: Check for pread and pwrite.
13891 * hostio.c (handle_pread): Fall back to lseek and read.
13892 (handle_pwrite): Fall back to lseek and write.
13893 * config.in, configure: Regenerated.
13894
27524b67
DJ
138952007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13896
13897 * server.c (myresume): Add own_buf argument.
13898 (main): Update calls.
13899
a20d5e98
DJ
139002007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13901
13902 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13903 * remote-utils.c (remote_open): Do not call disable_async_io.
13904 (block_async_io): Delete.
13905 (unblock_async_io): Make static.
13906 (initialize_async_io): New.
13907 * server.c (handle_v_cont): Handle async I/O here.
13908 (myresume): Likewise. Move other common resume tasks here...
13909 (main): ... from here. Call initialize_async_io. Disable async
13910 I/O before the main loop.
13911 * server.h (initialize_async_io): Declare.
13912 (block_async_io, unblock_async_io): Delete prototypes.
13913 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13914
b79d787e
DJ
139152007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13916
13917 * remote-utils.c (readchar): Allow binary data in received messages.
13918
d97903b2
PA
139192007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13920
13921 * win32-low.c (attaching): New global.
13922 (win32_create_inferior): Clear the `attaching' global.
13923 (win32_attach): Set the `attaching' global.
13924 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13925 attaching. Only set a breakpoint at the entry point if not
13926 attaching.
13927
311de423
PA
139282007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13929
13930 * server.c (main): Don't report dll events on the initial
13931 connection on attaches.
13932
6c2d16d2
PA
139332007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13934
13935 * server.c (main): Relax numerical bases supported for the pid of
13936 the --attach command line argument.
13937
5ca906e6
PA
139382007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13939
13940 * win32-low.c (win32_attach): Call OpenProcess before
13941 DebugActiveProcess, not after. Add last error output to error
13942 call.
13943
9c6c8194
PA
139442007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13945
13946 * win32-low.c (win32_get_thread_context)
13947 (win32_set_thread_context): New functions.
13948 (thread_rec): Use win32_get_thread_context.
13949 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13950 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13951 field.
13952
4d5d1aaa
PA
139532007-12-03 Leo Zayas
13954 Pedro Alves <pedro_alves@portugalmail.pt>
13955
13956 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13957 global variables.
13958 (child_add_thread): Minor cleanup.
13959 (child_continue): Resume artificially suspended threads before
13960 calling ContinueDebugEvent.
13961 (suspend_one_thread): New.
13962 (fake_breakpoint_event): New.
13963 (get_child_debug_event): Change return type to int. Check here if
13964 gdb sent an interrupt request. If a soft interrupt was requested,
13965 fake a breakpoint event. Return 0 if there is no event to handle,
13966 and 1 otherwise.
13967 (win32_wait): Don't check here if gdb sent an interrupt request.
13968 Ensure there is a valid event to handle.
13969 (win32_request_interrupt): Add soft interruption method as last
13970 resort.
13971
c436e841
PA
139722007-12-03 Leo Zayas
13973 Pedro Alves <pedro_alves@portugalmail.pt>
13974
13975 * win32-low.h (win32_thread_info): Add descriptions to the
13976 structure members. Replace `suspend_count' counter by a
13977 `suspended' flag.
13978 * win32-low.c (thread_rec): Update condition of when to get the
13979 context from the inferior. Rely on ContextFlags being set if it
13980 has already been retrieved. Only suspend the inferior thread if
13981 we haven't already. Warn if that fails.
13982 (continue_one_thread): s/suspend_count/suspended/. Only call
13983 ResumeThread once. Warn if that fails.
13984
e7b5fa67
PA
139852007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13986
13987 * win32-low.c (win32_wait): Don't read from the inferior when it
13988 has already exited.
13989
a385171d
PA
139902007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13991
13992 * Makefile.in (win32_low_h): New variable.
13993 (win32-low.o): Add dependency on $(win32_low_h).
13994 (win32-arm-low.o, win32-i386-low.o): New rules.
13995
f80c84b3
DJ
139962007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13997
13998 * hostio.c: Correct copyright year.
13999
a6b151f1
DJ
140002007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14001
14002 * Makefile.in (OBS): Add hostio.o.
14003 (hostio.o): New rule.
14004 * server.h (handle_vFile): Declare.
14005 * hostio.c: New file.
14006 * server.c (handle_v_requests): Take packet_len and new_packet_len
14007 for binary packets. Call handle_vFile.
14008 (main): Update call to handle_v_requests.
14009
f9387fc3
DJ
140102007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14011
14012 * linux-low.c: Include <sched.h>.
14013
51c2684e
DJ
140142007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14015
14016 * linux-low.c (linux_tracefork_grandchild): New.
14017 (linux_tracefork_child): Use clone.
14018 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14019
75f83163
JB
140202007-10-31 Joel Brobecker <brobecker@adacore.com>
14021
14022 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14023
da5898ce
DJ
140242007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14025
14026 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14027
24a09b5f
DJ
140282007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14029
14030 * inferiors.c (change_inferior_id): Delete.
14031 (add_pid_to_list, pull_pid_from_list): New.
14032 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14033 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14034 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14035 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14036 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14037 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14038 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14039 (using_threads): Always set to 1.
14040 (handle_extended_wait): New.
14041 (add_process): Do not set TID.
14042 (linux_create_inferior): Set must_set_ptrace_flags.
14043 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14044 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14045 (linux_thread_alive): Rename TID argument to LWPID.
14046 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14047 (linux_wait_for_event): Do not use TID or check using_threads. Update
14048 call to dead_thread_notify. Call handle_extended_wait.
14049 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14050 (send_sigstop): Delete sigstop_sent.
14051 (wait_for_sigstop): Avoid TID.
14052 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14053 (linux_test_for_tracefork): New.
14054 (linux_lookup_signals): Use thread_db_active and
14055 linux_supports_tracefork_flag.
14056 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14057 * linux-low.h (get_process_thread): Avoid TID.
14058 (struct process_ifo): Move thread_known and tid to the end. Remove
14059 sigstop_sent.
14060 (linux_attach_lwp, thread_db_init): Update prototypes.
14061 * server.h (change_inferior_id): Delete prototype.
14062 (add_pid_to_list, pull_pid_from_list): New prototypes.
14063 * thread-db.c (thread_db_use_events): New.
14064 (find_first_thread): Rename to...
14065 (find_one_thread): ...this. Update callers and messages. Do not
14066 call fatal. Check thread_db_use_events. Do not call
14067 change_inferior_id or new_thread_notify.
14068 (maybe_attach_thread): Update. Do not call new_thread_notify.
14069 (thread_db_init): Set thread_db_use_events. Check use_events.
14070 * utils.c (fatal, warning): Correct message prefix.
14071
30ed0a8f
DJ
140722007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14073
14074 * Makefile.in (clean): Remove new files.
14075 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14076 (powerpc-64.o, powerpc-64.c): New rules.
14077 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14078 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14079 with SPE.
14080 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14081 SPE targets.
14082 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14083 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14084 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14085 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14086 (target_regsets): Add AltiVec and SPE register sets.
14087 * configure.ac: Check for AltiVec and SPE.
14088 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14089 (ppc_fill_vrregset, ppc_store_vrregset): New.
14090 (target_regsets): Add AltiVec register set.
14091 * configure: Regenerated.
14092
fd462a61
DJ
140932007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14094
14095 * linux-low.c (O_LARGEFILE): Define.
14096 (linux_read_memory): Use /proc/PID/mem.
14097 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14098 * configure, config.in: Regenerated.
14099
69f223ed
DJ
141002007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14101
14102 * linux-low.c (linux_wait_for_event): Do not pass signals while
14103 single-stepping.
14104
aec18585
PA
141052007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14106
14107 * win32-low.c (create_process): New.
14108 (win32_create_inferior): Use create_process instead of
14109 CreateProcess. If create_process failed retry appending an ".exe"
14110 suffix. Store the GetLastError result immediatelly after
14111 create_process calls and use it on the call to error.
14112
34d86ddd
PA
141132007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14114
14115 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14116
5a0e3bd0
JB
141172007-08-23 Joel Brobecker <brobecker@adacore.com>
14118
14119 * configure.ac: Switch license to GPLv3.
14120
f88c79e6
MS
141212007-08-01 Michael Snyder <msnyder@access-company.com>
14122
14123 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14124
6b3d9b83
PA
141252007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14126
14127 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14128 typedef.
14129 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14130 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14131 CloseToolhelp32Snapshot.
14132 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14133 CloseToolhelp32Snapshot.
14134
c588c53c
MS
141352007-07-27 Michael Snyder <michael.snyder@access-company.com>
14136
14137 * server.c (main): Check for inferior exit before main loop.
14138
aa0403d9
PA
141392007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14140
14141 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14142 instead of on tmp_desc.
14143
255e7678
DJ
141442007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14145 Daniel Jacobowitz <dan@codesourcery.com>
14146
14147 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14148 (add_thread): Minor cleanups.
14149 (clear_inferiors): Move lower in the file. Clear the DLL
14150 list.
14151 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14152 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14153 (xml_escape_text): New.
14154 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14155 for qSupported.
14156 (handle_v_cont): Report errors.
14157 (gdbserver_version): Update.
14158 (main): Correct size of own_buf. Do not report initial DLL events.
14159 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14160 (unloaded_dll, xml_escape_text): New.
14161 * win32-low.c (enum target_waitkind): Update comments.
14162 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14163 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14164 (win32_EnumProcessModules, win32_GetModuleInformation)
14165 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14166 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14167 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14168 (win32_Module32First, win32_Module32Next, load_toolhelp)
14169 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14170 (get_child_debug_event): Handle DLL events.
14171 (win32_wait): Likewise.
14172
0d37add9
DJ
141732007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14174
14175 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14176 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14177
45e2715e
PA
141782007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14179
14180 * win32-low.c (handle_output_debug_string): Ignore event if not
14181 waiting.
14182
c5674cf1
PA
141832007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14184
14185 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14186
2bbe3cc1
DJ
141872007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14188
14189 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14190
ae13219e
DJ
141912007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14192
14193 * inferiors.c (change_inferior_id): Add comment.
14194 * linux-low.c (check_removed_breakpoint): Add an early
14195 prototype. Improve debug output.
14196 (linux_attach): Doc update.
14197 (linux_detach_one_process, linux_detach): Clean up before releasing
14198 each process.
14199 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14200 * linux-low.h (struct process_info): Doc improvement.
14201 * mem-break.c (delete_all_breakpoints): New.
14202 * mem-break.h (delete_all_breakpoints): New prototype.
14203 * thread-db.c (find_first_thread): New.
14204 (thread_db_create_event): Call it instead of
14205 thread_db_find_new_threads. Clean up unused variables.
14206 (maybe_attach_thread): Remove first thread handling.
14207 (thread_db_find_new_threads): Use find_first_thread.
14208 (thread_db_get_tls_address): Likewise.
14209
4105de34
DJ
142102007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14211
14212 * thread-db.c (thread_db_find_new_threads): Add prototype.
14213 (thread_db_create_event): Check for the main thread before adding
14214 a new thread.
14215 (maybe_attach_thread): Only enable event reporting if TID == 0.
14216 (thread_db_get_tls_address): Check for new threads.
14217
2b876972
DJ
142182007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14219
14220 * linux-low.c (linux_create_inferior): Try execv before execvp.
14221 * spu-low.c (spu_create_inferior): Likewise.
14222
7a245884
DJ
142232007-06-13 Mike Frysinger <vapier@gentoo.org>
14224
14225 * linux-low.c (linux_create_inferior): Change execv to execvp.
14226 * spu-low.c (spu_create_inferior): Likewies.
14227
117ce543
DJ
142282007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14229
14230 * Makefile.in (clean): Clean new files instead of deleted ones.
14231 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14232 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14233 rules.
14234 * configure.srv: Specify XML files and new regformats for MIPS and
14235 MIPS64 GNU/Linux.
14236 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14237 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14238 an entry for the restart register.
14239 (mips_cannot_fetch_register, mips_cannot_store_register)
14240 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14241 register names to match the XML descriptions.
14242 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14243 restart register instead of $0.
14244
0e7f50da
UW
142452007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14246 Markus Deuling <deuling@de.ibm.com>
14247
14248 * remote-utils.c (decode_xfer_write): New function.
14249 * server.h (decode_xfer_write): Add prototype.
14250 * server.c (handle_query): Add PACKET_LEN argument. Support
14251 qXfer:spu:read and qXfer:spu:write packets.
14252 (main): Pass packet_len to handle_query.
14253 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14254 * target.h (target_ops): Add qxfer_spu.
14255
374c1d38
UW
142562007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14257
14258 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14259 accessing non-seekable spufs files.
14260
bb63802a
UW
142612007-05-16 Markus Deuling <deuling@de.ibm.com>
14262
889bf7c5 14263 * server.c (handle_query): Add reply for qC packet.
bb63802a 14264
7390519e
PA
142652007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14266 Leo Zayas <lerele@champenstudios@com>
14267
14268 * server.h (check_remote_input_interrupt_request): New function.
14269 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14270 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14271 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14272 (check_remote_input_interrupt_request): New function.
14273 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14274 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14275 winapi_GenerateConsoleCtrlEvent): New typedefs.
14276 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14277 to 250 ms.
14278 (win32_wait): Check for remote interrupt request
14279 with check_remote_input_interrupt_request.
14280 (win32_request_interrupt): New function.
14281 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14282
34b34921
PA
142832007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14284
14285 * win32-low.c (debug_registers_changed,
14286 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14287 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14288 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14289 (thread_rec): Get context using the low target.
14290 (child_add_thread): Call thread_added on the low target,
14291 which does the same thing.
14292 (regptr): Delete.
14293 (do_initial_child_stuff): Remove debug registers references.
14294 Set context using the low target. Resume threads after
14295 setting the contexts.
14296 (child_continue): Remove dead variable. Remove debug
14297 registers references.
14298 (child_fetch_inferior_registers): Go through the low target.
14299 (do_child_store_inferior_registers): Remove.
14300 (child_store_inferior_registers): Go through the low target.
14301 (win32_resume): Remove debug registers references.
14302 Set context using the low target.
14303 (handle_exception): Change return type to void. Don't record
14304 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14305 first chance exception.
889bf7c5 14306 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14307 goto loop. Always return after waiting for debug event.
14308 (win32_wait): Convert to switch statement. Handle spurious
14309 events.
14310
14311 * win32-i386-low.c (debug_registers_changed,
14312 debug_registers_used): New.
14313 (initial_stuff): Rename to ...
14314 (i386_initial_stuff): ... this. Clear debug registers
14315 state variables.
14316 (store_debug_registers): Delete.
14317 (i386_get_thread_context): New.
14318 (load_debug_registers): Delete.
14319 (i386_set_thread_context): New.
14320 (i386_thread_added): New.
14321 (single_step): Rename to ...
14322 (i386_single_step): ... this.
14323 (do_fetch_inferior_registers): Rename to ...
14324 (i386_fetch_inferior_register): ... this.
14325 (i386_store_inferior_register): New.
14326 (the_low_target): Adapt to new interface.
14327
14328 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14329 (arm_get_thread_context): New.
14330 (arm_set_thread_context): New.
14331 (regptr): New.
14332 (do_fetch_inferior_registers): Rename to ...
14333 (arm_fetch_inferior_register): ... this.
14334 (arm_store_inferior_register): New.
14335 (arm_wince_breakpoint): Reimplement as unsigned long.
14336 (arm_wince_breakpoint_len): Define.
14337 (the_low_target): Adapt to new interface.
14338
14339 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14340 load_debug_registers. Add get_thread_context, set_thread_context,
14341 thread_added and store_inferior_register. Rename
14342 fetch_inferior_registers to fetch_inferior_register.
14343 (regptr): Remove declaration.
14344
dd6953e1
PA
143452007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14346
14347 * linux-low.c (linux_detach): Change return type to int. Return 0.
14348 * spu-low.c (spu_detach): Likewise.
14349
444d6139
PA
143502007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14351
14352 * target.h (target_ops): Change return type of detach to int.
14353 Add join.
14354 (join_inferior): New.
14355 * server.c (main): Don't skip detach support on mingw32.
14356 If the inferior doesn't support detaching return error.
14357 Call join_inferior instead of using waitpid.
14358 * linux-low.c (linux_join): New.
14359 (linux_target_op): Add linux_join.
14360 * spu-low.c (spu_join): New.
14361 (spu_target_ops): Add spu_join.
14362 * win32-low.c (win32_detach): Adapt to new interface.
14363 Reopen current_process_handle before detaching. Issue a child
14364 resume before detaching.
14365 (win32_join): New.
14366 (win32_target_op): Add win32_join.
14367
1d5315fe
PA
143682007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14369
14370 * win32-low.c (win32-attach): Fix return value.
14371 * target.h (target_ops): Describe ATTACH return values.
14372
bf914831
PA
143732007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14374
14375 * win32-low.c (GETPROCADDRESS): Define.
14376 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14377 (winapi_DebugSetProcessKillOnExit): Likewise.
14378 (win32_create_inferior): Force usage of ansi CreateProcessA.
14379 (win32_attach): Use GETPROCADDRESS.
14380 (win32_detach): Likewise.
14381
f72f3e60
PA
143822007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14383
14384 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14385
ed50f18f
PA
143862007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14387
14388 * win32-low.c: Commit leftover changes from 2007-03-29.
14389
0c2ead7e
DJ
143902007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14391
14392 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14393 fields short instead of int. Add explicit padding.
14394 (i387_cache_to_fsave): Remove unnecessary casts.
14395 (i387_fsave_to_cache): Doc fix.
14396 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14397
73725ff3
DJ
143982007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14399
14400 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14401 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14402
d99f33d8
PA
144032007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14404
14405 * configure.srv (arm*-*-mingw32ce*): Move near the other
14406 arm targets.
14407
68070c10
PA
144082007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14409
2482afc6 14410 * configure.ac: Add errno checking.
68070c10
PA
14411 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14412 sys/file.h and malloc.h.
14413 (AC_CHECK_DECLS): Add perror.
14414 (srv_mingwce): Handle.
2482afc6 14415 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14416 win32-i386-low.o to srv_tgtobj.
14417 (i[34567]86-*-mingw*): Likewise.
14418 (arm*-*-mingw32ce*): Add case.
14419 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14420 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14421 [__MINGW32CE__] (strerror): New function.
14422 [__MINGW32CE__] (errno): Define to GetLastError.
14423 [__MINGW32CE__] (COUNTOF): New macro.
14424 (remote_open): Remove extra close call.
14425 * mem-break.c (delete_breakpoint_at): New function.
14426 * mem-break.h (delete_breakpoint_at): Declare.
14427 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14428 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14429 [USE_WIN32API] (read, write): Add char* casts.
14430 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14431 * server.h: Include wincecompat.h on Windows CE.
14432 [HAVE_ERRNO_H]: Check.
14433 (perror): Declare if not declared.
14434 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14435 (perror_with_name): Remove errno declaration.
14436 * wincecompat.h: New.
14437 * wincecompat.c: New.
14438 * win32-low.h: New.
14439 * win32-arm-low.c: New.
14440 * win32-i386-low.c: New.
14441 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14442 (OUTMSG2): Make it safe.
14443 (_T): New macro.
14444 (COUNTOF): New macro.
14445 (NUM_REGS): Get it from the low target.
14446 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14447 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14448 (thread_rec): Let low target handle debug registers.
14449 (child_add_thread): Likewise.
14450 (child_init_thread_list): Likewise.
14451 (continue_one_thread): Likewise.
14452 (regptr): New.
14453 (do_child_fetch_inferior_registers): Move to ...
14454 * win32-i386-low.c: ... here, and rename to ...
14455 (do_fetch_inferior_registers): ... this.
889bf7c5 14456 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14457 Go through the low target.
14458 (do_child_store_inferior_registers): Use regptr.
14459 (strwinerror): New function.
14460 (win32_create_inferior): Handle Windows CE.
14461 Use strwinerror instead of strerror on Windows error
14462 codes. Add program to the error output.
14463 Don't close the main thread handle on Windows CE.
14464 (win32_attach): Use coredll.dll on Windows CE.
14465 (win32_kill): Close current process and current
14466 thread handles.
14467 (win32_detach): Use coredll.dll on Windows CE.
14468 (win32_resume): Let low target handle debug registers, and
14469 step request.
14470 (handle_exception): Add/Remove initial breakpoint. Avoid
14471 non-existant WSTOPSIG on Windows CE.
14472 (win32_read_inferior_memory): Cast to remove warning.
14473 (win32_arch_string): Go through the low target.
14474 (initialize_low): Call set_breakpoint_data with the low
14475 target's breakpoint.
14476 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14477 FOP_REGNUM, mappings): Move to ...
14478 * win32-i386-low.c: ... here.
14479 * win32-low.c (win32_thread_info): Move to ...
14480 * win32-low.h: ... here.
14481 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14482 win32-arm-low.c and wincecompat.c.
14483 (all:): Add $EXEEXT.
14484 (install-only:): Likewise.
14485 (gdbserver:): Likewise.
14486 (gdbreplay:): Likewise.
14487 * config.in: Regenerate.
14488 * configure: Regenerate.
14489
41093d81
PA
144902007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14491
14492 * win32-low.c: Rename typedef thread_info to
14493 win32_thread_info throughout.
14494
544afa54
PA
144952007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14496
14497 * win32-i386-low.c: Rename to ...
14498 * win32-low.c: ... this.
14499 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14500 * Makefile.in: Likewise.
14501
bce7165d
PA
145022007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14503
14504 * remote-utils.c (monitor_output): Constify msg parameter.
14505 * server.h (monitor_output): Likewise.
14506 * win32-i386-low.c (handle_output_debug_string): New.
14507 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14508 handle_output_debug_string.
14509 (get_child_debug_event): Likewise.
14510
506c7aa0
DJ
145112007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14512
14513 * server.c (main): Correct strtoul check.
14514
42c81e2a
DJ
145152007-03-27 Jon Ringle <jon@ringle.org>
14516
14517 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14518
9453113a
DJ
145192007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14520
14521 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14522
64a69107
DJ
145232007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14524
14525 * terminal.h: Check HAVE_SGTTY_H.
14526
145272007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14528
14529 * remote-utils.c (remote_open): Print out the assigned port number.
14530
c74d0ad8
DJ
145312007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14532
14533 * remote-utils.c (monitor_output): New function.
14534 * server.c (debug_threads): Define here.
14535 (monitor_show_help): New function.
14536 (handle_query): Handle qRcmd.
14537 (main): Do not handle 'd' packet.
14538 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14539 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14540 of debug_threads.
14541
de7c3b4a
PA
145422007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14543
14544 * Makefile.in (EXEEXT): New.
14545 (clean): Use $(EXEEXT).
14546
ef57601b
PA
145472007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14548
14549 * target.h (target_ops): Rename send_signal to request_interrupt,
14550 and remove enum target_signal parameter.
14551 * linux-low.c (linux_request_interrupt): Rename from
14552 linux_send_signal, and always send SIGINT.
14553 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14554 and always send SIGINT.
14555 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14556 of send_signal.
14557 (input_interrupt): Likewise.
14558
820f2bda
PA
145592007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14560
14561 * server.c (get_features_xml): Check if target implemented
14562 arch_string.
14563 * win32-i386-low.c (win32_arch_string): New.
14564 (win32_target_ops): Add win32_arch_string as arch_string member.
14565
ab39bf24
UW
145662007-02-22 Markus Deuling <deuling@de.ibm.com>
14567
14568 * spu-low.c (spu_arch_string): New.
14569 (spu_target_ops): Add spu_arch_string.
14570
61ff6e04
DJ
145712007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14572
14573 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14574 * configure.ac: Do not check for terminal.h.
14575 * configure, config.in: Regenerated.
14576
fb1e4ffc
DJ
145772007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14578
14579 * Makefile.in (OBS): Add $(XML_BUILTIN).
14580 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14581 (clean): Update.
14582 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14583 (arm-with-iwmmxt.c): New.
14584 * config.in, configure: Regenerate.
14585 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14586 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14587 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14588 (arm*-*-linux*): Add iWMMXt and regset support.
14589 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14590 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14591 (arm_store_wmmxregset, target_regsets): New.
14592 * server.c (get_features_xml): Take annex argument. Check builtin
14593 XML documents.
14594 (handle_query): Handle multiple annexes.
14595
0f48aa01
DJ
145962007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14597
14598 * remote-utils.c [USE_WIN32API] (read, write): Define.
14599 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14600 write.
14601
23181151
DJ
146022007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14603
14604 * linux-i386-low.c (the_low_target): Set arch_string.
14605 * linux-x86-64-low.c (the_low_target): Likewise.
14606 * linux-low.c (linux_arch_string): New.
14607 (linux_target_ops): Add it.
14608 * linux-low.h (struct linux_target_ops): Add arch_string.
14609 * server.c (write_qxfer_response): Use const void * for DATA.
14610 (get_features_xml): New.
14611 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14612 * target.h (struct target_ops): Add arch_string method.
14613
9d606399
DJ
146142007-01-03 Denis Pilat <denis.pilat@st.com>
14615 Daniel Jacobowitz <dan@codesourcery.com>
14616
14617 * linux-low.c (linux_kill): Handle being called with no threads.
14618 * win32-i386-low.c (win32_kill): Likewise.
14619 (get_child_debug_event): Clear current_process_handle.
14620
146212006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14622 Daniel Jacobowitz <dan@codesourcery.com>
14623
14624 * remote-utils.c (remote_open): Check the type of specified
14625 serial port devices before opening them.
14626 * server.c (main): Kill the inferior if an error occurs during
14627 the first remote_open.
14628
a5e13d24
DJ
146292006-12-05 Markus Deuling <deuling@de.ibm.com>
14630
14631 * README: Update supported targets.
14632
186947f7
DJ
146332006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14634
14635 * Makefile.in (clean): Remove reg-mips64.c.
14636 (reg-mips64.c, reg-mips64.o): New rules.
14637 * configure.srv: Handle mips64. Include regset support for mips.
14638 * linux-mips-low.c (union mips_register): New.
14639 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14640 (mips_breakpoint, mips_breakpoint_at): Use int.
14641 (mips_collect_register, mips_supply_register)
14642 (mips_collect_register_32bit, mips_supply_register_32bit)
14643 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14644 (mips_store_fpregset, target_regsets): New.
14645 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14646
a13e2c95
UW
146472006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14648
14649 * configure.srv: Add target "spu*-*-*".
14650 * Makefile.in (clean): Remove reg-spu.c.
14651 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14652 * spu-low.c: New file.
14653
cb7283db
DJ
146542006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14655
14656 * configure.ac: Correct td_thr_tls_get_addr test.
14657 * configure: Regenerated.
14658
89be2091
DJ
146592006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14660
14661 * linux-low.c (linux_wait_for_event): Reformat. Use the
14662 pass_signals array.
14663 * remote-utils.c (decode_address_to_semicolon): New.
14664 * server.c (pass_signals, handle_general_set): New.
14665 (handle_query): Mention QPassSignals for qSupported.
14666 (main): Call handle_general_set.
14667 * server.h (pass_signals, decode_address_to_semicolon): New.
14668
000ef4f0
DJ
146692006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14670
14671 * server.c (handle_query): Correct error handling for read_auxv.
14672
b7149293
UW
146732005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14674
14675 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14676 and srv_linux_thread_db to yes.
14677 * linux-s390-low.c (s390_fill_gregset): New function.
14678 (target_regsets): Define data structure.
14679
dae5f5cf
DJ
146802006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14681
14682 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14683 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14684 * config.in, configure: Regenerated.
14685 * inferiors.c (gdb_id_to_thread): New function.
14686 (gdb_id_to_thread_id): Use it.
14687 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14688 * linux-low.h (struct process_info): Add th member.
14689 (thread_db_get_tls_address): New prototype.
14690 * remote-utils.c (decode_address): Make non-static.
14691 * server.c (handle_query): Handle qGetTLSAddr.
14692 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14693 * target.h (struct target_ops): Add get_tls_address.
14694 * thread-db.c (maybe_attach_thread): Save the thread handle.
14695 (thread_db_get_tls_address): New.
14696
32ca6d61
DJ
146972006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14698
14699 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14700 (linux_resume_one_process): Take a siginfo_t *. Update all
14701 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14702 (struct pending_signals): Add a siginfo_t.
14703 (linux_wait_for_process): Always set last_status.
14704 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14705 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14706 * linux-low.h (struct process_info): Add last_status.
14707
5ffff7c1
DJ
147082006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14709
14710 * remote-utils.c (try_rle): New function.
14711 (putpkt_binary): Use it.
14712
8695c747
DJ
147132006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14714
14715 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14716 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14717 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14718 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14719 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14720 point registers.
14721
290fadea
RS
147222006-08-08 Richard Sandiford <richard@codesourcery.com>
14723
14724 * server.c (terminal_fd): New variable.
14725 (old_foreground_pgrp): Likewise.
14726 (restore_old_foreground_pgrp): New function.
14727 (start_inferior): Record the terminal file descriptor in terminal_fd
14728 and its original foreground group in old_foreground_pgrp. Register
14729 restore_old_foreground_pgrp with atexit().
14730
9f2e1e63
DJ
147312006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14732
14733 * server.c (handle_query): Correct qPart to qXfer.
14734
b80864fb
DJ
147352006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14736
14737 * configure.ac: Check for more headers which are missing on
14738 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14739 * configure.srv: Add Cygwin and mingw32.
14740 * remote-utils.c: Don't include headers unconditionally which
14741 are missing on mingw32. Include <winsock.h> for mingw32.
14742 (remote_open): Adjust for mingw32 support. Flush
14743 standard error after writing to it.
14744 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14745 (unblock_async_io, enable_async_io, disable_async_io)
14746 (readchar, getpkt): Update for Winsock support.
14747 (prepare_resume_reply): Expect a protocol signal number.
14748 * server.c: Disable <sys/wait.h> on mingw32.
14749 (start_inferior): Adjust for mingw32 support. Flush
14750 standard error after writing to it.
14751 (attach_inferior): Likewise. Use protocol signal
14752 numbers.
14753 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14754 and names.
14755 * win32-i386-low.c: New file.
14756 * Makefile.in (XM_CLIBS): Set.
14757 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14758 (win32-i386-low.o): New dependency rule.
14759 * linux-low.c (linux_wait): Use target signal numbers.
14760 * target.h (struct target_ops): Doc fix.
14761 * server.h (target_signal_to_name): New prototype.
14762 * gdbreplay.c: Don't include headers unconditionally which
14763 are missing on mingw32. Include <winsock.h> for mingw32.
14764 (remote_close, remote_open): Adjust for Winsock support.
14765 * configure, config.in: Regenerated.
14766
0876f84a
DJ
147672006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14768
14769 * server.c (decode_xfer_read, write_qxfer_response): New.
14770 (handle_query): Take a packet length argument. Handle
14771 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14772 the qSupported response.
14773 (main): Update call to handle_query.
14774
01f9e8fa
DJ
147752006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14776
14777 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14778 (putpkt_binary): Renamed from putpkt and adjusted for binary
14779 data.
14780 (putpkt): New wrapper for putpkt_binary.
14781 (readchar): Don't mask off the high bit.
14782 (decode_X_packet): New function.
14783 * server.c (main): Call putpkt_binary if a handler sets the packet
14784 length. Save the length of the incoming packet. Handle 'X'.
14785 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14786
be2a5f71
DJ
147872006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14788
14789 * server.c (handle_query): Handle qSupported.
14790
ea025f5f
DJ
147912006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14792
14793 * remote-utils.c (all_symbols_looked_up): New variable.
14794 (look_up_one_symbol): Check it.
14795 * server.h (look_up_one_symbol): New declaration.
14796 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14797
9308fc88
DJ
147982006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14799
14800 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14801 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14802 (PTRACE_GET_THREAD_AREA): Define.
14803 (ps_get_thread_area): New function.
14804
52fb6437
NS
148052006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14806
14807 * configure.srv (m68k*-*-uclinux*): New target.
14808 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14809 (linux_resume_one_process): Remove extraneous cast.
14810 (linux_read_offsets): New.
14811 (linux_target_op): Add linux_read_offsets on mmuless systems.
14812 * server.c (handle_query): Add qOffsets logic.
14813 * target.h (struct target_ops): Add read_offsets.
14814
21b0f40c
DJ
148152006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14816
14817 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14818 (PTRACE_GET_THREAD_AREA): Define.
14819 (ps_get_thread_area): New function.
14820 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14821 (linux-x86-64-low.o): Update.
14822
0050a760
DJ
148232006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14824
14825 * configure.ac: Remove checks for prfpregset_t.
14826 * gdb_proc_service.h: New file.
14827 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14828 new "gdb_proc_service.h".
14829 * proc-service.c: Likewise.
14830 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14831 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14832 * Makefile.in (gdb_proc_service_h): Updated.
14833 * configure, config.in: Regenerated.
14834
b92a518e
DJ
148352006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14836
14837 * remote-utils.c (prepare_resume_reply): Move declaration
14838 of gdb_id_from_wait to the top of the block.
14839
545587ee
DJ
148402006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14841
14842 * linux-low.c (regsets_store_inferior_registers): Read the regset
14843 from the target before filling it.
14844
9db87ebd
DJ
148452006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14846
14847 * server.c (attach_inferior): Return SIGTRAP for a successful
14848 attach.
14849
dd24457d
DJ
148502006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14851
14852 * Makefile.in (OBS): Add version.o.
14853 (STAGESTUFF): Delete.
14854 (version.o): Add dependencies.
14855 (version.c): Replace rule.
14856 (clean): Remove version.c.
14857 * server.c (gdbserver_version): New.
14858 (gdbserver_usage): Use printf.
14859 (main): Handle --version and --help.
14860 * server.h (version, host_name): Add declarations.
14861
6f0f660e
EZ
148622005-12-23 Eli Zaretskii <eliz@gnu.org>
14863
889bf7c5
PA
14864 * linux-arm-low.c:
14865 * linux-arm-low.c:
14866 * inferiors.c:
14867 * i387-fp.h:
14868 * i387-fp.c:
14869 * gdbreplay.c:
14870 * regcache.c:
14871 * proc-service.c:
14872 * mem-break.h:
14873 * mem-break.c:
14874 * linux-x86-64-low.c:
14875 * linux-sh-low.c:
14876 * linux-s390-low.c:
14877 * linux-ppc64-low.c:
14878 * linux-ppc-low.c:
14879 * linux-mips-low.c:
14880 * linux-m68k-low.c:
14881 * linux-m32r-low.c:
14882 * linux-low.h:
14883 * linux-low.c:
14884 * linux-ia64-low.c:
14885 * linux-i386-low.c:
14886 * linux-crisv32-low.c:
14887 * thread-db.c:
14888 * terminal.h:
14889 * target.h:
14890 * target.c:
14891 * server.h:
14892 * server.c:
14893 * remote-utils.c:
14894 * regcache.h:
14895 * utils.c:
14896 * Makefile.in:
14897 * configure.ac:
6f0f660e
EZ
14898 * gdbserver.1: Add (C) after Copyright. Update the FSF
14899 address.
14900
9d1fb177
DJ
149012005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14902
14903 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14904 (arm_breakpoint_at): Recognize both breakpoints.
14905 (the_low_target): Use the correct breakpoint instruction.
14906
011a70c2
DJ
149072005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14908
14909 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14910 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14911 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14912 (the_low_target): Update.
14913
7fb85e41
AS
149142005-10-25 Andreas Schwab <schwab@suse.de>
14915
14916 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14917
14918 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14919 (ia64_num_regs): Reduce to 462.
14920
3db0444b
DJ
149212005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14922
14923 * acinclude.m4: Correct quoting.
14924 * aclocal.m4: Regenerated.
14925
14926 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14927 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14928 (thread_db_init): Call thread_db_err_str.
14929 * configure.ac: Check for TD_VERSION.
14930 * config.in, configure: Regenerated.
14931
bee0189a
DJ
149322005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14933
14934 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14935
e9d25b98
DJ
149362005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14937
14938 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14939 is not available. Define HAVE_PTRACE_GETREGS if it is.
14940 * config.in, configure: Regenerated.
14941 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14942 * linux-i386-low.c, linux-m68k-low.c: Update to use
14943 HAVE_PTRACE_GETREGS.
14944 * linux-low.c (regsets_fetch_inferior_registers)
14945 (regsets_store_inferior_registers): Only return 0 if we processed
14946 GENERAL_REGS.
14947 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14948 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14949
a06660f7
DJ
149502005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14951
14952 * inferiors.c (struct thread_info): Add gdb_id.
14953 (add_thread): Add gdb_id argument.
14954 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14955 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14956 calls to add_thread.
14957 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14958 * server.c (handle_query): Use thread_to_gdb_id.
14959 (handle_v_cont, main): Use gdb_id_to_thread_id.
14960 * server.h (add_thread): Update prototype.
14961 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14962 prototypes.
14963
5a1f5858
DJ
149642005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14965
14966 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14967 left-padded registers.
14968 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14969 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14970
e122f1f5
SE
149712005-07-01 Steve Ellcey <sje@cup.hp.com>
14972
14973 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14974 * configure: Regenerate.
14975 * config.in: Regenerate.
14976 * server.h (NEED_DECLARATION_STRERROR):
14977 Replace with !HAVE_DECL_STRERROR.
14978
d592fa2f
DJ
149792005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14980
14981 * linux-low.c (linux_wait, linux_send_signal): Don't test
14982 an unsigned long variable for > 0 if it could be MAX_ULONG.
14983 * server.c (myresume): Likewise.
14984 * target.c (set_desired_inferior): Likewise.
14985
ccbd4912
MK
149862005-06-13 Mark Kettenis <kettenis@gnu.org>
14987
14988 * configure.ac: Simplify and improve check for socklen_t.
14989 * configure, config.in: Regenerate.
14990
f450004a
DJ
149912005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14992
14993 * acconfig.h: Remove.
14994 * configure.ac: Add a test for socklen_t. Use three-argument
14995 AC_DEFINE throughout.
14996 * config.in: Regenerated using autoheader 2.59.
14997 * configure: Regenerated.
14998
14999 * gdbreplay.c (socklen_t): Provide a default.
15000 (remote_open): Use socklen_t.
15001 * remote-utils.c (socklen_t): Provide a default.
15002 (remote_open): Use socklen_t.
15003 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15004 unsigned char.
15005
15006 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15007 char for buffers.
15008 * linux-low.c (linux_read_memory, linux_write_memory)
15009 (linux_read_auxv): Likewise.
15010 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15011 (check_mem_write): Likewise.
15012 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15013 Likewise.
15014 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15015 (registers_from_string, register_data): Likewise.
15016 * server.c (handle_query, main): Likewise.
15017 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15018 (decode_M_packet): Likewise.
15019 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15020 * target.h (struct target_ops): Update read_memory, write_memory,
15021 and read_auxv.
15022 (read_inferior_memory, write_inferior_memory): Update.
15023 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15024 to unsigned char *.
15025 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15026 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15027 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15028 linux-s390-low.c, linux-sh-low.c: Update for changes in
15029 read_inferior_memory and the_low_target->breakpoint.
15030
eee84df1
DJ
150312005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15032
15033 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15034 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15035 * configure.srv: Add powerpc64-*-linux*.
15036 * linux-ppc64-low.c: New file.
15037
45b134e5
OF
150382005-05-23 Orjan Friberg <orjanf@axis.com>
15039
15040 * linux-cris-low.c: New file with support for CRIS.
15041 * linux-crisv32-low.c: Ditto for CRISv32.
15042 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15043 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15044 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15045 reg-crisv32.o, and reg-crisv32.c to make rules.
15046 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15047 recognized targets.
15048
48d93c75
UW
150492005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15050
15051 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15052 of sizeof (PTRACE_XFER_TYPE).
15053 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15054
e013ee27
OF
150552005-05-12 Orjan Friberg <orjanf@axis.com>
15056
889bf7c5 15057 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15058 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15059 pointers for hardware watchpoint support.
15060 * linux-low.h (struct linux_target_ops): Ditto.
15061 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15062 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15063 to linux_target_ops.
15064 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15065 reply packet.
15066 * server.c (main): Recognize 'Z' and 'z' packets.
15067
b0ded00b
UW
150682005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15069
15070 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15071 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15072 (the_low_target): Add new members.
15073
8643e2ad
DJ
150742005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15075
15076 * proc-service.c (ps_lgetregs): Search all_processes instead of
15077 all_threads.
15078
fc620387
DJ
150792005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15080
15081 * server.c (start_inferior): Change return type to int.
15082 (attach_inferior): Change sigptr to int *.
15083 (handle_v_cont, handle_v_requests): Change signal to int *.
15084 (main): Change signal to int.
15085
150862005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15087
15088 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15089 * configure.srv: Add m32r*-*-linux*.
15090 * linux-m32r-low.c: New file.
15091
e0e76420
DJ
150922005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15093
15094 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15095
a1928bad
DJ
150962005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15097
15098 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15099 Take unsigned long arguments for PIDs.
15100 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15101 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15102 (wait_for_sigstop, linux_resume_one_process)
15103 (regsets_fetch_inferior_registers, linux_send_signal)
15104 (linux_read_auxv): Likewise. Update the types of variables holding
15105 PIDs. Update format string specifiers.
15106 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15107 * remote-utils.c (prepare_resume_reply): Likewise.
15108 * server.c (cont_thread, general_thread, step_thread)
15109 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15110 unsigned long.
15111 (handle_query): Update format specifiers.
15112 (handle_v_cont, main): Use strtoul for thread IDs.
15113 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15114 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15115 (general_thread, step_thread, thread_from_wait)
15116 (old_thread_from_wait): Update.
15117 * target.h (struct thread_resume): Use unsigned long for THREAD.
15118 (struct target_ops): Use unsigned long for arguments to attach and
15119 thread_alive.
15120
dcdb98d2
DJ
151212005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15122
15123 * acinclude.m4: Include bfd/bfd.m4 directly.
15124 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15125 <agriffis@toolchain.org>.
15126 * aclocal.m4, configure: Regenerated.
15127
bec39cab
AC
151282005-01-07 Andrew Cagney <cagney@gnu.org>
15129
15130 * configure.ac: Rename configure.in, require autoconf 2.59.
15131 * configure: Re-generate.
15132
434c4c77
DJ
151332004-12-08 Daniel Jacobowitz <dan@debian.org>
15134
15135 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15136 LIBS when finished.
15137 * aclocal.m4: Regenerated.
15138 * configure: Regenerated.
15139
db1d3e1b
AS
151402004-11-21 Andreas Schwab <schwab@suse.de>
15141
15142 * linux-m68k-low.c (m68k_num_gregs): Define.
15143 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15144 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15145 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15146 (m68k_breakpoint_at): New. Add to the_low_target.
15147
15148 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15149 srv_linux_thread_db to yes.
15150
43360365
JB
151512004-10-20 Joel Brobecker <brobecker@gnat.com>
15152
15153 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15154 (ARCH_SET_FS): Likewise.
15155 (ARCH_GET_FS): Likewise.
15156 (ARCH_GET_GS): Likewise.
15157
fd500816
DJ
151582004-10-16 Daniel Jacobowitz <dan@debian.org>
15159
15160 * linux-i386-low.c (ps_get_thread_area): New.
15161 * linux-x86-64-low.c (ps_get_thread_area): New.
15162 * linux-low.c: Include <sys/syscall.h>.
15163 (linux_kill_one_process): Don't kill the first thread here.
15164 (linux_kill): Kill the first thread here.
15165 (kill_lwp): New function.
15166 (send_sigstop, linux_send_signal): Use it.
15167 * proc-service.c: Clean up #ifdefs.
15168 (fpregset_info): Delete.
15169 (ps_lgetregs): Update and enable implementation.
15170 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15171 implementations.
15172 * remote-utils.c (struct sym_cache, symbol_cache): New.
15173 (input_interrupt): Print a clearer message.
15174 (async_io_enabled): New variable.
15175 (enable_async_io, disable_async_io): Use it. Update comments.
15176 (look_up_one_symbol): Use the symbol cache.
15177 * thread-db.c (thread_db_look_up_symbols): New function.
15178 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15179
f6de3c42
DJ
151802004-10-16 Daniel Jacobowitz <dan@debian.org>
15181
15182 * configure.in: Test for -rdynamic.
15183 * configure: Regenerated.
15184 * Makefile (INTERNAL_LDFLAGS): New.
15185 (gdbserver, gdbreplay): Use it.
15186
2c0fc042
AC
151872004-09-02 Andrew Cagney <cagney@gnu.org>
15188
15189 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15190
075b3282
DJ
151912004-03-23 Daniel Jacobowitz <drow@mvista.com>
15192
15193 * linux-low.c (linux_wait): Clear all_processes list also.
15194
fa6a77dc
DJ
151952004-03-12 Daniel Jacobowitz <drow@mvista.com>
15196
15197 * linux-low.c: Include <errno.h>. Remove extern declaration of
15198 errno.
15199
6d782a97
DJ
152002004-03-12 Daniel Jacobowitz <drow@mvista.com>
15201
15202 * gdbreplay.c, server.h, utils.c: Update copyright years.
15203
3a7fb99b
DJ
152042004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15205
15206 * server.c (main): Print child status or termination signal from
15207 variable 'signal', not 'sig'.
15208
c3e735a6
DJ
152092004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15210
15211 * linux-low.c (linux_read_memory): Change return type to
15212 int. Check for and return error from ptrace().
15213 * target.c (read_inferior_memory): Change return type to int. Pass
15214 back return status from the_target->read_memory().
15215 * target.h (struct target_ops): Adapt *read_memory() prototype.
15216 Update comment.
15217 (read_inferior_memory): Adapt prototype.
15218 * server.c (main): Return an error packet if
15219 read_inferior_memory() returns an error.
15220
a59d1c82
DJ
152212004-03-04 Daniel Jacobowitz <drow@mvista.com>
15222
15223 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15224 Unify with other clean targets.
15225
dc3f8883
DJ
152262004-02-29 Daniel Jacobowitz <drow@mvista.com>
15227
15228 * server.c (handle_v_cont): Call set_desired_inferior.
15229
89a208da
DJ
152302004-02-29 Daniel Jacobowitz <drow@mvista.com>
15231
15232 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15233
62ea82f5
DJ
152342004-02-29 Daniel Jacobowitz <drow@mvista.com>
15235
15236 * linux-low.c (linux_wait): Unblock async I/O.
15237 (linux_resume): Block and enable async I/O.
15238 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15239 * server.h (block_async_io, unblock_async_io): Add prototypes.
15240
6910d122
DJ
152412004-02-29 Daniel Jacobowitz <drow@mvista.com>
15242
15243 * remote-utils.c (remote_open): Print a status notice after
15244 opening a TCP port.
15245 * server.c (attach_inferior): Print a status notice after
15246 attaching.
15247
152482004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15249
15250 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15251
c89dc5d4
DJ
152522004-02-26 Daniel Jacobowitz <drow@mvista.com>
15253
15254 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15255 error packet.
15256 * server.c, target.h: Update copyright years.
15257
4b8dad4a
RM
152582004-02-25 Roland McGrath <roland@redhat.com>
15259
15260 * target.h (struct target_ops): New member `read_auxv'.
15261 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15262 * linux-low.c (linux_read_auxv): New function.
15263 (linux_target_ops): Initialize `read_auxv' member to that.
15264
d7446758
JB
152652004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15266
15267 Committed by Jim Blandy <jimb@redhat.com>.
15268
15269 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15270 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15271 instead of GPR_SIZE to distiguish s390 and s390x targets.
15272
5544ad89
DJ
152732004-01-31 Daniel Jacobowitz <drow@mvista.com>
15274
15275 * linux-low.c: Update copyright year.
15276 (check_removed_breakpoint): Clear pending_is_breakpoint.
15277 (linux_set_resume_request, linux_queue_one_thread)
15278 (resume_status_pending_p): New functions.
15279 (linux_continue_one_thread): Use process->resume.
15280 (linux_resume): Only resume threads if there are no pending events.
15281 * linux-low.h (struct process_info): Add resume request
15282 pointer.
15283
2a68b70e
DJ
152842004-01-30 Daniel Jacobowitz <drow@mvista.com>
15285
15286 * regcache.c (new_register_cache): Clear the allocated register
15287 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15288
64386c31
DJ
152892003-10-13 Daniel Jacobowitz <drow@mvista.com>
15290
15291 * linux-low.c (linux_resume): Take a struct thread_resume *
15292 argument.
15293 (linux_wait): Update call.
15294 (resume_ptr): New static variable.
15295 (linux_continue_one_thread): Renamed from
15296 linux_continue_one_process. Use resume_ptr.
15297 (linux_resume): Use linux_continue_one_thread.
15298 * server.c (handle_v_cont, handle_v_requests): New functions.
15299 (myresume): New function.
15300 (main): Handle 'v' case.
15301 * target.h (struct thread_resume): New type.
15302 (struct target_ops): Change argument of "resume" to struct
15303 thread_resume *.
15304 (myresume): Delete macro.
15305
c938e9b0
L
153062003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15307
15308 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15309 (uninstall): Support DESTDIR.
15310
7f313d07
BC
15311Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15312
15313 * configure.srv: Add xscale*linux copy of arm*linux entry.
15314
3b2fc2ea
DJ
153152003-07-24 Daniel Jacobowitz <drow@mvista.com>
15316
15317 * linux-arm-low.c (arm_reinsert_addr): New function.
15318 (the_low_target): Add arm_reinsert_addr.
15319
1c0a559e
MK
153202003-07-08 Mark Kettenis <kettenis@gnu.org>
15321
15322 * mem-break.c: Remove whitespace at end of file.
15323
43d5792c
DJ
153242003-06-28 Daniel Jacobowitz <drow@mvista.com>
15325
15326 * configure.in: Check whether we need to prototype strerror.
15327 * server.h: Optionally prototype strerror.
15328 * gdbreplay.c (perror_with_name): Use strerror.
15329 * linux-low.c (linux_attach_lwp): Use strerror.
15330 * utils.c (perror_with_name): Use strerror.
15331 * config.in, configure: Regenerated.
15332
c8a86edf
DJ
153332003-06-28 Daniel Jacobowitz <drow@mvista.com>
15334
15335 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15336 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15337
73d37363
DJ
153382003-06-20 Daniel Jacobowitz <drow@mvista.com>
15339
15340 * Makefile.in (SFILES): Update.
15341 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15342 low-sun3.c: Remove files.
15343
6ad8ae5c
DJ
153442003-06-17 Daniel Jacobowitz <drow@mvista.com>
15345
15346 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15347 (linux_detach_one_process, linux_detach): New functions.
15348 (linux_target_ops): Add linux_detach.
15349 * server.c (main): Handle 'D' packet.
15350 * target.h (struct target_ops): Add "detach" member.
15351 (detach_inferior): Define.
15352
1581182a
MK
153532003-06-13 Mark Kettenis <kettenis@gnu.org>
15354
15355 From Kelley Cook <kelleycook@wideopenwest.com>:
15356 * configure.srv: Accept i[34567]86 variants.
15357
e5379b03
DJ
153582003-06-05 Daniel Jacobowitz <drow@mvista.com>
15359
15360 * linux-low.c (linux_wait_for_event): Correct comment typos.
15361 (linux_resume_one_process): Call check_removed_breakpoint.
15362 (linux_send_signal): New function.
15363 (linux_target_ops): Add linux_send_signal.
15364 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15365 of kill.
15366 * target.h (struct target_ops): Add send_signal.
15367
2ff29de4
JB
153682003-05-29 Jim Blandy <jimb@redhat.com>
15369
15370 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15371 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15372 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15373 away part of the register's value.
15374
254787d4
DJ
153752003-03-26 Daniel Jacobowitz <drow@mvista.com>
15376
15377 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15378 (linux_wait_for_event, linux_init_signals): Likewise.
15379
94e10508
DJ
153802003-03-17 Daniel Jacobowitz <drow@mvista.com>
15381
15382 * configure.in: Check for stdlib.h.
15383 * configure: Regenerated.
15384 * config.in: Regenerated.
15385
4c0711e0
DJ
153862003-01-04 Andreas Schwab <schwab@suse.de>
15387
15388 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15389
ef66e766
AC
153902003-01-02 Andrew Cagney <ac131313@redhat.com>
15391
15392 * Makefile.in: Remove obsolete code.
15393
a1358604
DJ
153942002-11-20 Daniel Jacobowitz <drow@mvista.com>
15395
15396 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15397 defined(PT_FPR0_HI).
15398
23ce3b1c
DJ
153992002-11-17 Stuart Hughes <seh@zee2.com>
15400
15401 * linux-arm-low.c (arm_num_regs): Increase.
15402 (arm_regmap): Include status register.
15403
154042002-11-17 Daniel Jacobowitz <drow@mvista.com>
15405
15406 * linux-low.c (register_addr): Remove incorrect -1 check.
15407
a9fa9f7d
DJ
154082002-08-29 Daniel Jacobowitz <drow@mvista.com>
15409
15410 * linux-low.c (linux_create_inferior): Call setpgid. Return
15411 the new PID.
15412 (unstopped_p, linux_signal_pid): Remove.
15413 (linux_target_ops): Remove linux_signal_pid.
15414 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15415 global instead of target method.
15416 * target.h (struct target_ops): Remove signal_pid. Update comment
15417 for create_inferior.
15418 * server.c (signal_pid): New variable.
15419 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15420 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15421 (attach_inferior): Set signal_pid.
15422
17574093
DJ
154232002-08-23 Daniel Jacobowitz <drow@mvista.com>
15424
15425 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15426
154272002-08-20 Jim Blandy <jimb@redhat.com>
15428
15429 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15430 default for this.
15431
154322002-08-01 Andrew Cagney <cagney@redhat.com>
15433
15434 * Makefile.in: Make chill references obsolete.
15435
154362002-07-24 Kevin Buettner <kevinb@redhat.com>
15437
15438 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15439 * configure: Regenerate.
15440 * config.in: Regenerate.
15441
154422002-07-09 David O'Brien <obrien@FreeBSD.org>
15443
15444 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15445 (perror_with_name, remote_close, remote_open, expect, play): Static.
15446
154472002-07-04 Michal Ludvig <mludvig@suse.cz>
15448
4b8dad4a 15449 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15450 byte offsets instead of an array of indexes.
15451 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15452
154532002-06-13 Daniel Jacobowitz <drow@mvista.com>
15454
15455 * regcache.c: Add comment.
15456
154572002-06-11 Daniel Jacobowitz <drow@mvista.com>
15458
15459 * thread-db.c: New file.
15460 * proc-service.c: New file.
15461 * acinclude.m4: New file.
15462 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15463 proc-service.o, and thread-db.o.
15464 (linux-low.o): Add USE_THREAD_DB.
15465 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15466 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15467 * aclocal.m4: Regenerated.
15468 * config.in: Regenerated.
15469 * configure: Regenerated.
15470 * configure.in: Check for proc_service.h, sys/procfs.h,
15471 thread_db.h, and linux/elf.h headrs.
15472 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15473 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15474 Check for -lthread_db and thread support.
15475 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15476 PowerPC, and SuperH.
15477 * i387-fp.c: Constify arguments.
15478 * i387-fp.h: Likewise.
15479 * inferiors.c: (struct thread_info): Renamed from
15480 `struct inferior_info'. Remove PID member. Use generic inferior
15481 list header. All uses updated.
15482 (inferiors, signal_pid): Removed.
15483 (all_threads): New variable.
15484 (get_thread): Define.
15485 (add_inferior_to_list): New function.
15486 (for_each_inferior): New function.
15487 (change_inferior_id): New function.
15488 (add_inferior): Removed.
15489 (remove_inferior): New function.
15490 (add_thread): New function.
15491 (free_one_thread): New function.
15492 (remove_thread): New function.
15493 (clear_inferiors): Use for_each_inferior and free_one_thread.
15494 (find_inferior): New function.
15495 (find_inferior_id): New function.
15496 (inferior_target_data): Update argument type.
15497 (set_inferior_target_data): Likewise.
15498 (inferior_regcache_data): Likewise.
15499 (set_inferior_regcache_data): Likewise.
15500 * linux-low.c (linux_bp_reinsert): Remove.
15501 (all_processes, stopping_threads, using_thrads)
15502 (struct pending_signals, debug_threads, pid_of): New.
15503 (inferior_pid): Replace with macro.
15504 (struct inferior_linux_data): Remove.
15505 (get_stop_pc, add_process): New functions.
15506 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15507 Use add_process and add_thread.
15508 (linux_attach_lwp): New function, based on old linux_attach. Use
15509 add_process and add_thread. Set stop_expected for new threads.
15510 (linux_attach): New function.
15511 (linux_kill_one_process): New function.
15512 (linux_kill): Kill all LWPs.
15513 (linux_thread_alive): Use find_inferior_id.
15514 (check_removed_breakpoints, status_pending_p): New functions.
15515 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15516 Update. Use WNOHANG. Wait for cloned processes also. Update process
15517 struct for the found process.
15518 (linux_wait_for_event): New function.
15519 (linux_wait): Use it. Support LWPs.
15520 (send_sigstop, wait_for_sigstop, stop_all_processes)
15521 (linux_resume_one_process, linux_continue_one_process): New functions.
15522 (linux_resume): Support LWPs.
15523 (REGISTER_RAW_SIZE): Remove.
15524 (fetch_register): Use register_size instead. Call supply_register.
15525 (usr_store_inferior_registers): Likewise. Call collect_register.
15526 Fix recursive case.
15527 (regsets_fetch_inferior_registers): Improve error message.
15528 (regsets_store_inferior_registers): Add debugging.
15529 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15530 (unstopped_p, linux_signal_pid): New functions.
15531 (linux_target_ops): Add linux_signal_pid.
15532 (linux_init_signals): New function.
15533 (initialize_low): Call it. Initialize using_threads.
15534 * regcache.c (inferior_regcache_data): Add valid
15535 flag.
15536 (get_regcache): Fetch registers lazily. Add fetch argument
15537 and update all callers.
15538 (regcache_invalidate_one, regcache_invalidate): New
15539 functions.
15540 (new_register_cache): Renamed from create_register_cache.
15541 Return the new regcache.
15542 (free_register_cache): Change argument to a void *.
15543 (registers_to_string, registers_from_string): Call get_regcache
15544 with fetch flag set.
15545 (register_data): Make static. Pass fetch flag to get_regcache.
15546 (supply_register): Call get_regcache with fetch flag clear.
15547 (collect_register): Call get_regcache with fetch flag set.
15548 (collect_register_as_string): New function.
15549 * regcache.h: Update.
15550 * remote-utils.c (putpkt): Flush after debug output and use
15551 stderr.
15552 Handle input interrupts while waiting for an ACK.
15553 (input_interrupt): Use signal_pid method.
15554 (getpkt): Flush after debug output and use stderr.
15555 (outreg): Use collect_register_as_string.
15556 (new_thread_notify, dead_thread_notify): New functions.
15557 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15558 and general_thread.
15559 (look_up_one_symbol): Flush after debug output.
15560 * server.c (step_thread, server_waiting): New variables.
15561 (start_inferior): Don't use signal_pid. Update call to mywait.
15562 (attach_inferior): Update call to mywait.
15563 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15564 (main): Don't fetch/store registers explicitly. Use
15565 set_desired_inferior. Support proposed ``Hs'' packet. Update
15566 calls to mywait.
15567 * server.h: Update.
15568 (struct inferior_list, struct_inferior_list_entry): New.
15569 * target.c (set_desired_inferior): New.
15570 (write_inferior_memory): Constify.
15571 (mywait): New function.
15572 * target.h: Update.
15573 (struct target_ops): New signal_pid method.
15574 (mywait): Removed macro, added prototype.
15575
15576 * linux-low.h (regset_func): Removed.
15577 (regset_fill_func, regset_store_func): New.
15578 (enum regset_type): New.
15579 (struct regset_info): Add type field. Use new operation types.
15580 (struct linux_target_ops): stop_pc renamed to get_pc.
15581 Add decr_pc_after_break and breakpoint_at.
15582 (get_process, get_thread_proess, get_process_thread)
15583 (strut process_info, all_processes, linux_attach_lwp)
15584 (thread_db_init): New.
15585
15586 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15587 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15588 (the_low_target): Add new members.
15589 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15590 (i386_store_fpxregset): Constify.
15591 (target_regsets): Add new kind identifier.
15592 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15593 (i386_set_pc): Add debugging.
15594 (i386_breakpoint_at): New function.
15595 (the_low_target): Add new members.
15596 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15597 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15598 (mips_breakpoint_at): New.
15599 (the_low_target): Add new members.
15600 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15601 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15602 (the_low_target): Add new members.
15603 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15604 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15605 (the_low_target): Add new members.
15606 * linux-x86-64-low.c (target_regsets): Add new kind
15607 identifier.
15608
156092002-05-15 Daniel Jacobowitz <drow@mvista.com>
15610
15611 From Martin Pool <mbp@samba.org>:
15612 * server.c (gdbserver_usage): New function.
15613 (main): Call it.
15614
156152002-05-14 Daniel Jacobowitz <drow@mvista.com>
15616
15617 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15618 stop_at -> stop_pc.
15619
156202002-05-04 Andrew Cagney <ac131313@redhat.com>
15621
15622 * Makefile.in: Remove obsolete code.
15623
156242002-04-24 Michal Ludvig <mludvig@suse.cz>
15625
15626 * linux-low.c (regsets_fetch_inferior_registers),
15627 (regsets_store_inferior_registers): Removed cast to int from
15628 ptrace() calls.
15629 * regcache.h: Added declaration of struct inferior_info.
15630
156312002-04-20 Daniel Jacobowitz <drow@mvista.com>
15632
15633 * inferiors.c (struct inferior_info): Add regcache_data.
15634 (add_inferior): Call create_register_cache.
15635 (clear_inferiors): Call free_register_cache.
15636 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15637 * regcache.c (struct inferior_regcache_data): New.
15638 (registers): Remove.
15639 (get_regcache): New function.
15640 (create_register_cache, free_register_cache): New functions.
15641 (set_register_cache): Don't initialize the register cache here.
15642 (registers_to_string, registers_from_string, register_data): Call
15643 get_regcache.
15644 * regcache.h: Add prototypes.
15645 * server.h: Likewise.
15646
156472002-04-20 Daniel Jacobowitz <drow@mvista.com>
15648
15649 * mem-break.c: New file.
15650 * mem-break.h: New file.
15651 * Makefile.in: Add mem-break.o rule; update server.h
15652 dependencies.
15653 * inferiors.c (struct inferior_info): Add target_data
15654 member.
15655 (clear_inferiors): Free target_data member if set.
15656 (inferior_target_data, set_inferior_target_data): New functions.
15657 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15658 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15659 * linux-low.c (linux_bp_reinsert): New variable.
15660 (struct inferior_linux_data): New.
15661 (linux_create_inferior): Use set_inferior_target_data.
15662 (linux_attach): Likewise. Call add_inferior.
15663 (linux_wait_for_one_inferior): New function.
15664 (linux_wait): Call it.
15665 (linux_write_memory): Add const.
15666 (initialize_low): Call set_breakpoint_data.
15667 * linux-low.h (struct linux_target_ops): Add breakpoint
15668 handling members.
15669 * server.c (attach_inferior): Remove extra add_inferior
15670 call.
15671 * server.h: Include mem-break.h. Update inferior.c
15672 prototypes.
15673 * target.c (read_inferior_memory)
15674 (write_inferior_memory): New functions.
15675 * target.h (read_inferior_memory)
15676 (write_inferior_memory): Change macros to prototypes.
15677 (struct target_ops): Update comments. Add const to write_memory
15678 definition.
15679
156802002-04-11 Daniel Jacobowitz <drow@mvista.com>
15681
15682 * linux-low.c (usr_store_inferior_registers): Support
15683 registers which are allowed to fail to store.
15684 * linux-low.h (linux_target_ops): Likewise.
15685 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15686 (ppc_cannot_store_register): FPSCR may not be storable.
15687
156882002-04-09 Daniel Jacobowitz <drow@mvista.com>
15689
15690 * server.h: Include <string.h> if HAVE_STRING_H.
15691 * ChangeLog: Correct paths in last ChangeLog entry.
15692
156932002-04-09 Daniel Jacobowitz <drow@mvista.com>
15694
15695 * linux-low.h: Remove obsolete prototypes.
15696 (struct linux_target_ops): New.
15697 (extern the_low_target): New.
15698 * linux-low.c (num_regs, regmap): Remove declarations.
15699 (register_addr): Use the_low_target explicitly.
15700 (fetch_register): Likewise.
15701 (usr_fetch_inferior_registers): Likewise.
15702 (usr_store_inferior_registers): Likewise.
15703 * linux-arm-low.c (num_regs): Remove.
15704 (arm_num_regs): Define.
15705 (arm_regmap): Renamed from regmap, made static.
15706 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15707 made static.
15708 (arm_cannot_store_register): Renamed from cannot_store_register,
15709 made static.
15710 (the_low_target): New.
15711 * linux-i386-low.c (num_regs): Remove.
15712 (i386_num_regs): Define.
15713 (i386_regmap): Renamed from regmap, made static.
15714 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15715 made static.
15716 (i386_cannot_store_register): Renamed from cannot_store_register,
15717 made static.
15718 (the_low_target): New.
15719 * linux-ia64-low.c (num_regs): Remove.
15720 (ia64_num_regs): Define.
15721 (ia64_regmap): Renamed from regmap, made static.
15722 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15723 made static.
15724 (ia64_cannot_store_register): Renamed from cannot_store_register,
15725 made static.
15726 (the_low_target): New.
15727 * linux-m68k-low.c (num_regs): Remove.
15728 (m68k_num_regs): Define.
15729 (m68k_regmap): Renamed from regmap, made static.
15730 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15731 made static.
15732 (m68k_cannot_store_register): Renamed from cannot_store_register,
15733 made static.
15734 (the_low_target): New.
15735 * linux-mips-low.c (num_regs): Remove.
15736 (mips_num_regs): Define.
15737 (mips_regmap): Renamed from regmap, made static.
15738 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15739 made static.
15740 (mips_cannot_store_register): Renamed from cannot_store_register,
15741 made static.
15742 (the_low_target): New.
15743 * linux-ppc-low.c (num_regs): Remove.
15744 (ppc_num_regs): Define.
15745 (ppc_regmap): Renamed from regmap, made static.
15746 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15747 made static.
15748 (ppc_cannot_store_register): Renamed from cannot_store_register,
15749 made static.
15750 (the_low_target): New.
15751 * linux-s390-low.c (num_regs): Remove.
15752 (s390_num_regs): Define.
15753 (s390_regmap): Renamed from regmap, made static.
15754 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15755 made static.
15756 (s390_cannot_store_register): Renamed from cannot_store_register,
15757 made static.
15758 (the_low_target): New.
15759 * linux-sh-low.c (num_regs): Remove.
15760 (sh_num_regs): Define.
15761 (sh_regmap): Renamed from regmap, made static.
15762 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15763 made static.
15764 (sh_cannot_store_register): Renamed from cannot_store_register,
15765 made static.
15766 (the_low_target): New.
15767 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15768 (the_low_target): New.
15769
157702002-04-09 Daniel Jacobowitz <drow@mvista.com>
15771
15772 * Makefile.in: Add stamp-h target.
15773 * configure.in: Create stamp-h.
15774 * configure: Regenerated.
15775
157762002-04-09 Daniel Jacobowitz <drow@mvista.com>
15777
15778 * inferiors.c: New file.
15779 * target.c: New file.
15780 * target.h: New file.
15781 * Makefile.in: Add target.o and inferiors.o. Update
15782 dependencies.
15783 * linux-low.c (inferior_pid): New static variable,
15784 moved from server.c.
15785 (linux_create_inferior): Renamed from create_inferior.
15786 Call add_inferior. Return 0 on success instead of a PID.
15787 (linux_attach): Renamed from myattach.
15788 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15789 (linux_thread_alive): Renamed from mythread_alive.
15790 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15791 child dies.
15792 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15793 (regsets_store_inferior_registers): Correct error message.
15794 Add missing ``return 0''.
15795 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15796 (linux_store_registers): Renamed from store_inferior_registers.
15797 (linux_read_memory): Renamed from read_inferior_memory.
15798 (linux_write_memory): Renamed from write_inferior_memory.
15799 (linux_target_ops): New structure.
15800 (initialize_low): Call set_target_ops ().
15801 * remote-utils.c (unhexify): New function.
15802 (hexify): New function.
15803 (input_interrupt): Send signals to ``signal_pid''.
15804 * server.c (inferior_pid): Remove.
15805 (start_inferior): Update create_inferior call.
15806 (attach_inferior): Call add_inferior.
15807 (handle_query): New function.
15808 (main): Call handle_query for `q' packets.
15809 * server.h: Include "target.h". Remove obsolete prototypes.
15810 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15811
158122002-04-09 Daniel Jacobowitz <drow@mvista.com>
15813
15814 * Makefile.in: Add WARN_CFLAGS. Update configury
15815 dependencies.
15816 * configure.in: Check for <string.h>
15817 * configure: Regenerate.
15818 * config.in: Regenerate.
15819 * gdbreplay.c: Include needed system headers.
15820 (remote_open): Remove strchr prototype.
15821 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15822 * regcache.c (supply_register): Change buf argument to const void *.
15823 (supply_register_by_name): Likewise.
15824 (collect_register): Change buf argument to void *.
15825 (collect_register_by_name): Likewise.
15826 * regcache.h: Add missing prototypes.
15827 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15828 * server.c (handle_query): New function.
15829 (attached): New static variable, moved out of main.
15830 (main): Quiet longjmp clobber warnings.
15831 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15832 * utils.c (error): Remove NORETURN.
15833 (fatal): Likewise.
This page took 2.464533 seconds and 4 git commands to generate.