]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Remove usages of find_inferior in stop_all_lwps
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
df3e4dbe
SM
12017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * linux-low.c (send_sigstop_callback): Return void, change
4 parameter type. Rename to...
5 (send_sigstop): ... this.
6 (suspend_and_send_sigstop_callback): Return void, change parameter
7 type. Rename to...
8 (suspend_and_send_sigstop): ... this.
9 (stop_all_lwps): Use for_each_thread.
10
5a6b0a41
SM
112017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
12
13 * linux-low.c (lwp_running): Return bool, remove unused
14 argument.
15 (linux_stabilize_threads): Use find_thread.
16
39a64da5
SM
172017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
18
19 * linux-low.c (select_singlestep_lwp_callback): Remove.
20 (count_events_callback): Remove.
21 (select_event_lwp_callback): Remove.
22 (select_event_lwp): Use find_thread/for_each_thread.
23
a1385b7b
SM
242017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
25
26 * linux-low.c (not_stopped_callback): Return bool, take filter
27 argument directly.
28 (linux_wait_for_event_filtered): Use find_thread.
29 (linux_wait_1): Likewise.
30
454296a2
SM
312017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
32
33 * linux-low.c (same_lwp): Remove.
34 (find_lwp_pid): Use find_thread.
35
6b2a85da
SM
362017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
37
38 * linux-low.c (delete_lwp_callback): Remove.
39 (linux_mourn): Use for_each_thread.
40
798a38e8
SM
412017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
42
43 * linux-low.c (linux_detach_lwp_callback): Return void, remove
44 args parameter, don't check for pid.
45 (linux_detach): Use for_each_thread.
46
e4eb0dec
SM
472017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
48
49 * linux-low.c (struct counter): Remove.
50 (second_thread_of_pid_p): Remove.
51 (last_thread_of_process_p): Use find_thread.
52
83e1b6c1
SM
532017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
54
55 * inferiors.c (find_inferior_in_random): Remove.
56 * inferiors.h (find_inferior_in_random): Remove.
57 * linux-low.c (status_pending_p_callback): Return bool, accept
58 parameter ptid directly.
59 (linux_wait_for_event_filtered): Use find_thread_in_random.
60 (linux_wait_1): Likewise.
61
8dc7b443
SM
622017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
63
64 * inferiors.c (find_inferior_id): Remove.
65 (find_thread_ptid): Move implemention from find_inferior_id to
66 here.
67 * inferiors.h (find_inferior_id): Remove.
68 * server.c (handle_status): Use find_thread_ptid.
69 (process_serial_event): Likewise.
70 * thread-db.c (find_one_thread): Likewise.
71 (thread_db_thread_handle): Likewise.
72 * win32-low.c (thread_rec): Likewise.
73 (child_delete_thread): Likewise.
74 (win32_thread_alive): Likewise.
75 (get_child_debug_event): Likewise.
76
da25033c
SM
772017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
78
79 * linux-mips-low.c (update_watch_registers_callback): Return
80 void, remove pid_p parameter, don't check for pid.
81 (mips_insert_point, mips_remove_point): Use for_each_thread.
82
c91bb56b
SM
832017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
84
85 * lynx.low (lynx_delete_thread_callback): Remove.
86 (lynx_mourn): Use for_each_thread.
87
634a3254
SM
882017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
89
90 * regcache.c (regcache_invalidate_one): Remove.
91 (regcache_invalidate_pid): use for_each_thread.
92
41272101
TT
932017-11-26 Tom Tromey <tom@tromey.com>
94
95 * linux-low.c (linux_create_inferior): Update.
96
f5291a6f
UW
972017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
98
99 * spu-low.c (spu_create_inferior): Fix typo in argument name.
100
6654d750
AH
1012017-11-24 Alan Hayward <alan.hayward@arm.com>
102
103 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
104 * linux-aarch64-low.c (initialize_low_arch): Call init func.
105 * linux-aarch64-tdesc-selftest.c: New file.
106 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
107
1082017-11-24 Alan Hayward <alan.hayward@arm.com>
109
110 * configure.srv: Add new file.
111 * linux-aarch64-low.c (initialize_low_arch): Call init func.
112 * linux-aarch64-tdesc-selftest.c: New file.
113 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
114
49bdb7ee
AH
1152017-11-24 Alan Hayward <alan.hayward@arm.com>
116
117 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
118 * linux-aarch64-low.c (initialize_low_arch): Remove init.
119 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
120
d6d7ce56
AH
1212017-11-24 Alan Hayward <alan.hayward@arm.com>
122
123 * configure.srv: Add new files.
124 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
125 aarch64_linux_read_description.
126 * linux-aarch64-low.c (aarch64_linux_read_description):
127 Merge with aarch64_arch_setup.
128 (aarch64_arch_setup): Call aarch64_linux_read_description.
129 * linux-aarch64-tdesc.c: New file.
130 * linux-aarch64-tdesc.h: New file.
131
506fe5f4
YQ
1322017-11-24 Yao Qi <yao.qi@linaro.org>
133
134 * configure.srv: Set $srv_regobj for tic6x-linux.
135 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
136 (tic6x_read_description): Move some code to tic6x_arch_setup.
137 (tic6x_tdesc_test): New function.
138 (initialize_low_arch): Call selftests::register_test.
139
29f9a567
YQ
1402017-11-22 Yao Qi <yao.qi@linaro.org>
141
142 * remote-utils.c (prepare_resume_reply): Use memcpy.
143
578290ec
SM
1442017-11-19 Simon Marchi <simon.marchi@ericsson.com>
145
146 * linux-low.c (kill_one_lwp_callback): Return void, take
147 argument directly, don't filter on pid.
148 (linux_kill): Use for_each_thread.
149
eca55aec
SM
1502017-11-19 Simon Marchi <simon.marchi@ericsson.com>
151
152 * linux-low.c (need_step_over_p): Return bool, remove dummy
153 argument.
154 (linux_resume, proceed_all_lwps): Use find_thread.
155
25c28b4d
SM
1562017-11-19 Simon Marchi <simon.marchi@ericsson.com>
157
158 * linux-low.c (resume_status_pending_p): Return bool, remove
159 flag_p argument.
160 (linux_resume): Use find_thread.
161
5fdda392
SM
1622017-11-19 Simon Marchi <simon.marchi@ericsson.com>
163
164 * linux-low.c (struct thread_resume_array): Remove.
165 (linux_set_resume_request): Return void, take arguments
166 directly.
167 (linux_resume): Use for_each_thread.
168
fcb056a5
SM
1692017-11-19 Simon Marchi <simon.marchi@ericsson.com>
170
171 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
172 return bool, remove data argument.
173 (linux_stabilize_threads): Use find_thread.
174
139720c5
SM
1752017-11-19 Simon Marchi <simon.marchi@ericsson.com>
176
177 * linux-low.c (unsuspend_one_lwp): Remove.
178 (unsuspend_all_lwps): Use for_each_thread, inline code from
179 unsuspend_one_lwp.
180
6d1e5673
SM
1812017-11-19 Simon Marchi <simon.marchi@ericsson.com>
182
183 * gdbthread.h (find_thread): Add overload with ptid_t filter.
184 * linux-low.c (struct iterate_over_lwps_args): Remove.
185 (iterate_over_lwps_filter): Remove.
186 (iterate_over_lwps): Use find_thread.
187
bbf550d5
SM
1882017-11-19 Simon Marchi <simon.marchi@ericsson.com>
189
190 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
191 (linux_handle_new_gdb_connection): Use for_each_thread, inline
192 code from reset_lwp_ptrace_options_callback.
193
00192f77
SM
1942017-11-19 Simon Marchi <simon.marchi@ericsson.com>
195
196 * linux-arm-low.c (struct update_registers_data): Remove.
197 (update_registers_callback): Return void, take arguments
198 directly, don't check thread's pid.
199 (arm_insert_point, arm_remove_point): Use for_each_thread.
200
2bee2b6c
SM
2012017-11-19 Simon Marchi <simon.marchi@ericsson.com>
202
203 * win32-low.c (continue_one_thread): Return void, take argument
204 directly.
205 (child_continue): Use for_each_thread.
206
0b360f19
SM
2072017-11-19 Simon Marchi <simon.marchi@ericsson.com>
208
209 * win32-i386-low.c (update_debug_registers_callback): Rename
210 to ...
211 (update_debug_registers): ... this, return void, remove pid_p arg.
212 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
213
f27866ba
SM
2142017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
215
216 * inferiors.h (struct process_info): Add constructor, initialize
217 fields..
218 <syscalls_to_catch>: Change type to std::vector<int>.
219 * inferiors.c (add_process): Allocate process_info with new.
220 (remove_process): Free process_info with delete.
221 * linux-low.c (handle_extended_wait): Adjust.
222 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
223 * server.c (handle_general_set): Adjust.
224
e849ea89
PA
2252017-11-16 Pedro Alves <palves@redhat.com>
226
227 * remote-utils.c (remote_close): Block SIGIO signals instead of
228 uninstalling the SIGIO handler.
229
1d0aa65c
AH
2302017-11-16 Alan Hayward <alan.hayward@arm.com>
231
232 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
233
3491a34c
YQ
2342017-11-16 Yao Qi <yao.qi@linaro.org>
235
236 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
237 (tic6x_store_gregset): Likewise.
238 (tic6x_usrregs_info): Move it up.
239
a602f924
AH
2402017-11-15 Alan Hayward <alan.hayward@arm.com>
241
242 * Makefile.in: Update arch rules.
243 * configure.srv: Explicitly mark arch/ files.
244
5616b6c3
AS
2452017-11-13 Andreas Schwab <schwab@suse.de>
246
247 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
248 function.
249 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
250
d1928160
PA
2512017-11-06 Pedro Alves <palves@redhat.com>
252
253 * config.in, configure: Regenerate.
254
bac608e7
SM
2552017-10-27 Simon Marchi <simon.marchi@ericsson.com>
256
257 * target.c (struct thread_search): Remove.
258 (thread_search_callback): Remove.
259 (prepare_to_access_memory): Use for_each_thread instead of
260 find_inferior. Inline code from thread_search_callback.
261
eaddb425
SM
2622017-10-27 Simon Marchi <simon.marchi@ericsson.com>
263
264 * server.c (struct visit_actioned_threads_data): Remove.
265 (visit_actioned_threads): Change prototype to take arguments
266 directly.
267 (resume): Use find_thread instead of find_inferior.
268
99078d34
SM
2692017-10-27 Simon Marchi <simon.marchi@ericsson.com>
270
271 * server.c (queue_stop_reply_callback): Change prototype, return
272 void.
273 (find_status_pending_thread_callback): Remove.
274 (handle_status): Replace find_inferior with find_thread and
275 for_each_thread.
276
cc628f3d
AH
2772017-10-25 Alan Hayward <alan.hayward@arm.com>
278
279 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
280 with REGNO.
281 (aarch64_store_gregset): Likewise.
282 (aarch64_fill_fpregset): Likewise.
283 (aarch64_store_fpregset): Likewise.
284
4d3bb80e
SM
2852017-10-21 Simon Marchi <simon.marchi@ericsson.com>
286
287 * gdbthread.h (find_thread, for_each_thread): New functions.
288 * inferiors.c (thread_of_pid): Remove.
289 (find_any_thread_of_pid): Use find_thread.
290 * linux-low.c (num_lwps): Use for_each_thread.
291
7a7cdfa0
YQ
2922017-10-17 Yao Qi <yao.qi@linaro.org>
293
294 * Makefile.in: Remove one rule.
295 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
296
e675d170
YQ
2972017-10-17 Yao Qi <yao.qi@linaro.org>
298
299 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
300 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
301
7eb4e0f9
YQ
3022017-10-17 Yao Qi <yao.qi@linaro.org>
303
304 * configure.srv: Rename arm.o with arch/arm.o.
305
60d6cfc9
YQ
3062017-10-17 Yao Qi <yao.qi@linaro.org>
307
308 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
309 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
310 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
311 (arch-i386.o, arch-amd64.o): Remove rules.
312 (arch/%.o): New rule.
313 Update POSTCOMPILE and COMPILE.pre.
314 * configure.ac: Invoke AC_CONFIG_COMMANDS.
315 * configure: Re-generated.
316 * configure.srv: Replace arch-i386.o with arch/i386.o.
317 Replace arch-amd64.o with arch/amd64.o.
318
5bfda255
YQ
3192017-10-16 Yao Qi <yao.qi@linaro.org>
320
321 * configure: Regenerated.
322
9c80ecd6
SM
3232017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
324
325 * inferiors.h: (struct inferior_list): Remove.
326 (struct inferior_list_entry); Remove.
327 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
328 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
329 get_first_inferior): Remove.
330 (for_each_inferior, for_each_inferior_with_data, find_inferior,
331 find_inferior_id, find_inferior_in_random): Change signature.
332 * inferiors.c (all_threads): Change type to
333 std::list<thread_info *>.
334 (get_thread): Remove macro.
335 (find_inferior, find_inferior_id): Change signature, implement
336 using find_thread.
337 (find_inferior_in_random): Change signature, implement using
338 find_thread_in_random.
339 (for_each_inferior, for_each_inferior_with_data): Change
340 signature, implement using for_each_thread.
341 (add_inferior_to_list, remove_inferior): Remove.
342 (add_thread, get_first_thread, thread_of_pid,
343 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
344 (get_first_inferior, one_inferior_p, clear_inferior_list):
345 Remove.
346 (clear_inferiors, get_thread_process): Update.
347 * gdbthread.h: Include <list>.
348 (struct thread_info) <entry>: Remove field.
349 <id>: New field.
350 (all_threads): Change type to std::list<thread_info *>.
351 (get_first_inferior): Add doc.
352 (find_thread, for_each_thread, find_thread_in_random): New
353 functions.
354 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
355 * linux-arm-low.c (update_registers_callback): Update.
356 * linux-low.c (second_thread_of_pid_p): Update.
357 (kill_one_lwp_callback, linux_detach_lwp_callback,
358 delete_lwp_callback, status_pending_p_callback, same_lwp,
359 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
360 iterate_over_lwps, not_stopped_callback,
361 resume_stopped_resumed_lwps, count_events_callback,
362 select_singlestep_lwp_callback, select_event_lwp_callback,
363 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
364 suspend_and_send_sigstop_callback, wait_for_sigstop,
365 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
366 lwp_running, linux_set_resume_request, resume_status_pending_p,
367 need_step_over_p, start_step_over, linux_resume_one_thread,
368 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
369 reset_lwp_ptrace_options_callback): Update.
370 * linux-mips-low.c (update_watch_registers_callback): Update.
371 * regcache.c (regcache_invalidate_one, regcache_invalidate):
372 Update.
373 (free_register_cache_thread_one): Remove.
374 (regcache_release): Update.
375 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
376 handle_qxfer_threads_worker): Update.
377 (handle_query): Update, use list iterator.
378 (visit_actioned_threads, handle_pending_status,
379 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
380 clear_pending_status_callback, set_pending_status_callback,
381 find_status_pending_thread_callback, handle_status,
382 process_serial_event): Update.
383 * target.c (thread_search_callback): Update.
384 * thread-db.c (thread_db_get_tls_address): Update.
385 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
386 Update.
387 * win32-i386-low.c (update_debug_registers_callback): Update.
388 * win32-low.c (delete_thread_info, child_delete_thread,
389 continue_one_thread, suspend_one_thread,
390 get_child_debug_event): Adjust.
391
9179355e
SM
3922017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
393
394 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
395 * inferiors.h: Include <list>.
396 (struct process_info) <entry>: Remove field.
397 <pid>: New field.
398 (pid_of): Change macro to function.
399 (ptid_of, lwpid_of): Remove macro.
400 (all_processes): Change type to std::list<process_info *>.
401 (ALL_PROCESSES): Remove macro.
402 (for_each_process, find_process): New function.
403 * inferiors.c (all_processes): Change type to
404 std::list<process_info *>.
405 (find_thread_process): Adjust.
406 (add_process): Likewise.
407 (remove_process): Likewise.
408 (find_process_pid): Likewise.
409 (get_first_process): Likewise.
410 (started_inferior_callback): Remove.
411 (have_started_inferiors_p): Adjust.
412 (attached_inferior_callback): Remove.
413 (have_attached_inferiors_p): Adjust.
414 * linux-low.c (check_zombie_leaders): Likewise.
415 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
416 (x86_linux_update_xmltarget): Adjust.
417 * server.c (handle_query): Likewise.
418 (gdb_reattached_process): Remove.
419 (handle_status): Adjust.
420 (kill_inferior_callback): Likewise.
421 (detach_or_kill_inferior): Remove.
422 (print_started_pid): Likewise.
423 (print_attached_pid): Likewise.
424 (detach_or_kill_for_exit): Update.
425 (process_serial_event): Likewise.
426 * linux-arm-low.c (arm_new_fork): Likewise.
427
c9cb8905
SM
4282017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
429
430 * dll.h: Include <list>.
431 (struct dll_info): Add constructor.
432 <entry>: Remove field.
433 (all_dlls): Change type to std::list<dll_info>.
434 * dll.c: Include <algorithm>.
435 (get_dll): Remove macro.
436 (all_dlls): Change type to std::list<dll_info *>.
437 (free_one_dll): Remove.
438 (match_dll): Likewise.
439 (loaded_dll): Adjust.
440 (unloaded_dll): Adjust to all_dlls type change, use
441 std::find_if. Inline code from match_dll.
442 (clear_dlls): Adjust to all_dlls type change.
443 * server.c (emit_dll_description): Remove.
444 (handle_qxfer_libraries): Adjust to all_dlls type change,
445 integrate emit_dll_description's functionality.
446
04ec7890
SM
4472017-10-12 Simon Marchi <simon.marchi@ericsson.com>
448
449 * linux-low.h (struct linux_target_ops) <delete_process>: New
450 field.
451 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
452 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
453 (struct linux_target_ops): Add delete_process callback.
454 * linux-arm-low.c (arm_delete_process): New.
455 (struct linux_target_ops): Add delete_process callback.
456 * linux-bfin-low.c (struct linux_target_ops): Likewise.
457 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
458 * linux-m32r-low.c (struct linux_target_ops): Likewise.
459 * linux-mips-low.c (mips_linux_delete_process): New.
460 (struct linux_target_ops): Add delete_process callback.
461 * linux-ppc-low.c (struct linux_target_ops): Likewise.
462 * linux-s390-low.c (struct linux_target_ops): Likewise.
463 * linux-sh-low.c (struct linux_target_ops): Likewise.
464 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
465 * linux-tile-low.c (struct linux_target_ops): Likewise.
466 * linux-x86-low.c (x86_linux_delete_process): New.
467 (struct linux_target_ops): Add delete_process callback.
468 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
469
466eecee
SM
4702017-10-12 Simon Marchi <simon.marchi@ericsson.com>
471
472 * linux-aarch64-low.c (the_low_target): Add thread delete
473 callback.
474 * linux-arm-low.c (arm_delete_thread): New function.
475 (the_low_target): Add thread delete callback.
476 * linux-bfin-low.c (the_low_target): Likewise.
477 * linux-crisv32-low.c (the_low_target): Likewise.
478 * linux-low.c (delete_lwp): Invoke delete_thread callback if
479 set.
480 * linux-low.h (struct linux_target_ops) <delete_thread>: New
481 field.
482 * linux-m32r-low.c (the_low_target): Add thread delete callback.
483 * linux-mips-low.c (mips_linux_delete_thread): New function.
484 (the_low_target): Add thread delete callback.
485 * linux-ppc-low.c (the_low_target): Likewise.
486 * linux-s390-low.c (the_low_target): Likewise.
487 * linux-sh-low.c (the_low_target): Likewise.
488 * linux-tic6x-low.c (the_low_target): Likewise.
489 * linux-tile-low.c (the_low_target): Likewise.
490 * linux-x86-low.c (the_low_target): Likewise.
491 * linux-xtensa-low.c (the_low_target): Likewise.
492
b79f7801
YZ
4932017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
494
495 * win32-low.c: Include "common-inferior.h".
496
bc3b087d
SDJ
4972017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
498
499 * inferiors.c (set_inferior_cwd): New function.
500 * server.c (handle_general_set): Handle QSetWorkingDir packet.
501 (handle_query): Inform that QSetWorkingDir is supported.
502 * win32-low.c (create_process): Pass the inferior's cwd to
503 CreateProcess.
504
d092c5a2
SDJ
5052017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
506
507 * inferiors.c (current_inferior_cwd): New global variable.
508 (get_inferior_cwd): New function.
509 * inferiors.h (struct process_info) <cwd>: New field.
510
7da0a886
SDJ
5112017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
512
513 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
514 (OBS): Add gdb_tilde_expand.o.
515
289a6840
SM
5162017-10-02 Simon Marchi <simon.marchi@ericsson.com>
517
518 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
519 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
520
256642e8
PA
5212017-09-29 Pedro Alves <palves@redhat.com>
522
523 * ax.c (gdb_parse_agent_expr): Constify.
524 * ax.h (gdb_parse_agent_expr): Constify.
525 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
526 Constify.
527 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
528 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
529 * remote-utils.h (read_ptid): Constify.
530 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
531 (process_point_options, process_serial_event): Constify.
532 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
533 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
534 (cmd_qtbuffer): Constify.
535
5b9ca4d4
PA
5362017-09-29 Pedro Alves <palves@redhat.com>
537
538 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
539 fails.
540
94c207e0
PA
5412017-09-29 Pedro Alves <palves@redhat.com>
542
543 * linux-low.c (handle_extended_wait): Pass parent thread instead
544 of process to thread_db_notice_clone.
545 * linux-low.h (thread_db_notice_clone): Replace parent process
546 parameter with parent thread parameter.
547 * thread-db.c (find_one_thread): Add comment.
548 (thread_db_notice_clone): Replace parent process parameter with
549 parent thread parameter. Temporarily switch to the parent thread.
550
75352e28
SDJ
5512017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
552
553 * gdbthread.h: Include "common-gdbthread.h".
554 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
555 "if" when validating the ptid.
556 * remote-utils.c: Include "gdbthread.h".
557 (prepare_resume_reply): Use "switch_to_thread".
558 * target.c (done_accessing_memory): Likewise.
559
ad339634
AA
5602017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
561
562 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
563 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
564 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
565 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
566 s390x-gs-linux64-ipa.o to ipa_obj.
567 * linux-s390-low.c (HWCAP_S390_GS): New define.
568 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
569 New functions.
570 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
571 (s390_arch_setup): Check for guarded-storage support and choose
572 appropriate tdesc.
573 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
574 init_registers_s390x_gs_linux64.
575 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
576 enum value.
577 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
578 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
579
cc4d742f
SM
5802017-09-22 Simon Marchi <simon.marchi@ericsson.com>
581
582 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
583
f6327dcb
KB
5842017-09-21 Kevin Buettner <kevinb@redhat.com>
585
586 * linux-low.h (struct lwp_info): Add new field, thread_handle.
587 (thread_db_thread_handle): Declare.
588 * linux-low.c (linux_target_ops): Initialize thread_handle.
589 * server.c (handle_qxfer_threads_worker): Add support for
590 "handle" attribute.
591 * target.h (struct target_ops): Add new function pointer,
592 thread_handle.
593 (target_thread_handle): Define.
594 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
595 field in lwp.
596 (thread_db_thread_handle): New function.
597
86299109
KB
5982017-09-21 Kevin Buettner <kevinb@redhat.com>
599
600 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
601 * linux-low.h (thread_db_notice_clone): Declare.
602 * thread-db.c (thread_db_notice_clone): New function.
603
f557a88a
PA
6042017-09-21 Pedro Alves <palves@redhat.com>
605
606 * server.c (gdb_read_memory, handle_status, process_serial_event)
607 (handle_serial_event, handle_target_event): Adjust to
608 set_desired_thread prototype change.
609 * target.c (set_desired_thread): Remove 'use_general' parameter
610 and adjust.
611 * target.h (set_desired_thread): Remove 'use_general' parameter.
612
223ffa71
TT
6132017-09-20 Tom Tromey <tom@tromey.com>
614
615 * target.c (target_terminal::terminal_state): Define.
616 (target_terminal::init): Rename from target_terminal_init.
617 (target_terminal::inferior): Rename from
618 target_terminal_inferior.
619 (target_terminal::ours): Rename from target_terminal_ours.
620 (target_terminal::ours_for_output, target_terminal::info): New.
621
04fd3ba9
SM
6222017-09-16 Simon Marchi <simon.marchi@ericsson.com>
623
624 * server.c (accumulate_file_name_length): Remove.
625 (emit_dll_description): Adjust to std::string change.
626 (handle_qxfer_libraries): Use std::string to hold document.
627
5e187554
SM
6282017-09-16 Simon Marchi <simon.marchi@ericsson.com>
629
630 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
631 return type of xml_escape_text.
632 * server.c (emit_dll_description): Likewise.
633
1526853e
SM
6342017-09-16 Simon Marchi <simon.marchi@ericsson.com>
635
636 * server.c (captured_main): Accept argument for --selftest.
637 Update run_tests call.
638 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
639 when registering selftests.
640
c4dfafab
SDJ
6412017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
642
643 * regcache.c (get_thread_regcache): Update code to use "std::vector"
644 instead of "VEC" for "target_desc.reg_defs".
645 (regcache_cpy): Likewise.
646 (registers_to_string): Likewise.
647 (registers_from_string): Likewise.
648 (find_regno): Likewise.
649 (supply_regblock): Likewise.
650 (regcache_raw_read_unsigned): Likewise.
651 * tdesc.c (init_target_desc): Likewise.
652 (tdesc_create_reg): Likewise.
653 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
654 (struct target_desc) <reg_defs>: Convert to "std::vector".
655 (target_desc): Do not initialize "reg_defs".
656 (~target_desc): Update code to use "std::vector" instead of "VEC"
657 for "target_desc.reg_defs".
658 (operator==): Likewise.
659
124aceb4
SM
6602017-09-15 Simon Marchi <simon.marchi@ericsson.com>
661
662 * inferiors.h (thread_to_gdb_id): Remove.
663 * inferiors.c (thread_to_gdb_id): Remove.
664 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
665 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
666 lynx_store_registers, lynx_read_memory, lynx_write_memory):
667 Likewise.
668 * nto-low.c (nto_fetch_registers, nto_store_registers,
669 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
670
96cde54f
SM
6712017-09-15 Simon Marchi <simon.marchi@ericsson.com>
672
673 * inferiors.h (gdb_id_to_thread_id): Remove.
674 * inferiors.c (gdb_id_to_thread_id): Remove.
675 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
676 removal. Move pid declaration closer to where it's used.
677
e8ca139e
SM
6782017-09-15 Simon Marchi <simon.marchi@ericsson.com>
679
680 * server.c (handle_detach): New function.
681 (process_serial_event): Move code out, call handle_detach.
682
f8a4e119
SM
6832017-09-15 Simon Marchi <simon.marchi@ericsson.com>
684
685 * server.c (require_running): Rename to ...
686 (require_running_or_return): ... this ...
687 (require_running_or_break): ... and this.
688 (handle_query, process_serial_event): Adjust.
689
0eb0a407
SM
6902017-09-15 Simon Marchi <simon.marchi@ericsson.com>
691
692 * linux-low.c (linux_set_resume_request): Remove unused
693 variables.
694
785922a5
SM
6952017-09-15 Simon Marchi <simon.marchi@ericsson.com>
696
697 * server.c (first_thread_of): Remove.
698 (process_serial_event): Replace usage of first_thread_of with
699 find_any_thread_of_pid.
700 * tracepoint.c (same_process_p): Remove.
701 (gdb_agent_about_to_close): Replace usage of same_process_p with
702 find_any_thread_of_pid.
703 * linux-x86-low.c (same_process_callback): Remove.
704 (x86_arch_setup_process_callback): Replace usage of
705 same_process_callback with find_any_thread_of_pid.
706 * thread-db.c (any_thread_of): Remove.
707 (switch_to_process): Replace usage of any_thread_of with
708 find_any_thread_of_pid.
709 * inferiors.c (thread_pid_matches_callback): Remove.
710 (find_thread_process): Adjust to use find_any_thread_of_pid.
711
a059f00c
SDJ
7122017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
713
714 * regcache.c (get_thread_regcache): Guard calls to "memset"
715 with "!VEC_empty".
716
cc397f3a
SDJ
7172017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
718
719 * linux-low.c (handle_extended_wait): Use
720 "allocate_target_description" instead of "XNEW".
721 * linux-x86-low.c (initialize_low_arch): Likewise.
722
22916b07
YQ
7232017-09-05 Yao Qi <yao.qi@linaro.org>
724
725 * configure.srv (srv_i386_regobj): Remove.
726 (srv_amd64_regobj): Remove.
727 (srv_regobj): Set it to "" for x86 non-linux targets.
728 * linux-x86-tdesc.c (i386_linux_read_description):
729 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
730 (init_registers_i386): Remove the declaration.
731 (tdesc_i386): Remove the declaration.
732 (lynx_i386_arch_setup): Call i386_create_target_description.
733 * nto-x86-low.c: Likewise.
734 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
735 [!__x86_64__]: include arch/i386.h.
736 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
737
38602d55
YQ
7382017-09-05 Yao Qi <yao.qi@linaro.org>
739
740 * configure.srv (srv_amd64_linux_xmlfiles): Remove
741 i386/amd64-XXX-linux from it.
742
44b886ff
YQ
7432017-09-05 Yao Qi <yao.qi@linaro.org>
744
745 * configure.srv: Empty srv_amd64_linux_regobj if $development is
746 false.
747 (ipa_amd64_linux_regobj): Remove.
748 (ipa_x32_linux_regobj): Remove.
749
b4570e4b
YQ
7502017-09-05 Yao Qi <yao.qi@linaro.org>
751
752 * Makefile.in (arch-amd64.o): New rule.
753 * configure.srv: Append arch-amd64.o.
754 * linux-amd64-ipa.c: Include common/x86-xstate.h.
755 (get_ipa_tdesc): Call amd64_linux_read_description.
756 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
757 and init_registers_amd64_XXX.
758 * linux-x86-low.c (x86_linux_read_description): Call
759 amd64_linux_read_description.
760 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
761 (initialize_low_arch): Don't call init_registers_x32_XXX and
762 init_registers_amd64_XXX.
763 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
764 and tdesc_amd64_XXX.
765 [__x86_64__] (amd64_tdesc_test): New function.
766 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
767 and init_registers_amd64_XXX.
768 * linux-x86-tdesc.c: Include arch/amd64.h.
769 (xcr0_to_tdesc_idx): New function.
770 (i386_linux_read_description): New function.
771 (amd64_get_ipa_tdesc_idx): New function.
772 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
773 (amd64_get_ipa_tdesc): Declare.
774
d1f28ea2
YQ
7752017-09-05 Yao Qi <yao.qi@linaro.org>
776
777 * configure.srv (srv_i386_linux_xmlfiles): Remove
778 i386/i386-XXX-linux.xml from it.
779
25a93583
YQ
7802017-09-05 Yao Qi <yao.qi@linaro.org>
781
782 * configure.srv: Set srv_i386_linux_regobj empty if $development
783 is false.
784 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
785 initialize_low_tdesc.
786 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
787 with #if initialize_low_tdesc.
788 * linux-x86-tdesc-selftest.c: New file.
789 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
790
5f035c07
YQ
7912017-09-05 Yao Qi <yao.qi@linaro.org>
792
793 * Makefile.in (arch-i386.o): New rule.
794 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
795 (x86_64-*-linux*): Likewise.
796 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
797 include arch/i386.h.
798 (i386_linux_read_description): Remove code and call
799 i386_create_target_description.
800 * tdesc.c (allocate_target_description): New function.
801 * tdesc.h (set_tdesc_architecture): Remove declaration.
802 (set_tdesc_osabi): Likewise.
803
0abe8a89
YQ
8042017-09-05 Yao Qi <yao.qi@linaro.org>
805
806 * linux-x86-tdesc.c: Don't include <inttypes.h>.
807 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
808 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
809 .xmltarget.
810 * server.c (get_features_xml): Call tdesc_get_features_xml.
811 * tdesc.c (set_tdesc_architecture): New function.
812 (set_tdesc_osabi): New function.
813 (tdesc_get_features_xml): New function.
814 (tdesc_create_feature): Add an argument.
815 * tdesc.h (struct target_desc) <features>: New field.
816 <arch, osabi>: New field.
817 (~target_desc): xfree features, arch, and osabi.
818 (target_desc::oerator==): Don't compare .xmltarget.
819 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
820 (set_tdesc_osabi): Likewise.
821 (tdesc_get_features_xml): Likewise.
822
0a188386
YQ
8232017-09-05 Yao Qi <yao.qi@linaro.org>
824
825 * linux-x86-tdesc.c: Include selftest.h.
826 (i386_tdesc_test): New function.
827 (initialize_low_tdesc): Call selftests::register_test.
828 * tdesc.h: Include regdef.h.
829 (target_desc): Override operator == and !=.
830
f49ff000
YQ
8312017-09-05 Yao Qi <yao.qi@linaro.org>
832
833 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
834 (ipa_obj): Likewise.
835 * linux-i386-ipa.c: Include common/x86-xstate.h
836 (get_ipa_tdesc): Call i386_linux_read_description.
837 (initialize_low_tracepoint): Don't call init_registers_XXX
838 functions, call initialize_low_tdesc instead.
839 * linux-x86-low.c (x86_linux_read_description): Call
840 i386_linux_read_description.
841 (initialize_low_arch): Don't call init_registers_i386_XXX
842 functions, call initialize_low_tdesc.
843 * linux-x86-tdesc.c: New file.
844 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
845 (i386_get_ipa_tdesc_idx): Declare.
846 (i386_get_ipa_tdesc): Declare.
847 (initialize_low_tdesc): Declare.
848
2b68ef2f
YQ
8492017-09-05 Yao Qi <yao.qi@linaro.org>
850
851 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
852 instead of 0.
853
f7000548
YQ
8542017-09-05 Yao Qi <yao.qi@linaro.org>
855
856 * Makefile.in (IPA_OBJS): Add vec-ipa.o
857 * regcache.c (get_thread_regcache): Use VEC_length.
858 (init_register_cache): Likewise.
859 (regcache_cpy): Likewise.
860 (registers_to_string): Iterate reg_defs via VEC_iterate.
861 (find_regno): Likewise.
862 (find_register_by_number): Use VEC_index.
863 (register_size): Call find_register_by_number.
864 (register_data): Call find_register_by_number.
865 (supply_regblock): Use VEC_length.
866 (regcache_raw_read_unsigned): Likewise.
867 * tdesc.c (init_target_desc): Iterate reg_defs via
868 VEC_iterate.
869 (default_description): Update initializer.
870 (copy_target_description): Don't update field num_registers.
871 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
872 <num_registers>: Remove.
873
50a421ac
SM
8742017-09-04 Simon Marchi <simon.marchi@ericsson.com>
875
876 * Makefile.in (.SECONDARY): Define target.
877
23fdd69e
SM
8782017-09-03 Simon Marchi <simon.marchi@ericsson.com>
879
880 * linux-low.c (linux_wait_1): Adjust.
881 * server.c (queue_stop_reply_callback): Adjust.
882
0a2dde4a
SDJ
8832017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
884
885 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
886 QEnvironmentUnset and QEnvironmentReset packets.
887 (handle_query): Inform remote that QEnvironmentHexEncoded,
888 QEnvironmentUnset and QEnvironmentReset are supported.
889
6afd337d
SM
8902017-08-25 Simon Marchi <simon.marchi@ericsson.com>
891
892 * inferiors.h (inferior_target_data): Rename to ...
893 (thread_target_data): ... this.
894 (inferior_regcache_data): Rename to ...
895 (thread_regcache_data): ... this.
896 (set_inferior_regcache_data): Rename to ...
897 (set_thread_regcache_data): ... this.
898 * inferiors.c (inferior_target_data): Rename to ...
899 (thread_target_data): ... this.
900 (inferior_regcache_data): Rename to ...
901 (thread_regcache_data): ... this.
902 (set_inferior_regcache_data): Rename to ...
903 (set_thread_regcache_data): ... this.
904 (free_one_thread): Update.
905 * linux-low.h (get_thread_lwp): Update.
906 * regcache.c (get_thread_regcache): Update.
907 (regcache_invalidate_thread): Update.
908 (free_register_cache_thread): Update.
909 * win32-i386-low.c (update_debug_registers_callback): Update.
910 (win32_get_current_dr): Update.
911 * win32-low.c (thread_rec): Update.
912 (delete_thread_info): Update.
913 (continue_one_thread): Update.
914 (suspend_one_thread): Update.
915
a160cc46
SM
9162017-08-24 Simon Marchi <simon.marchi@ericsson.com>
917
918 * inferiors.c (set_inferior_target_data): Remove.
919 * inferiors.h (set_inferior_target_data): Remove.
920
6d580b63
YQ
9212017-08-18 Yao Qi <yao.qi@linaro.org>
922
923 * Makefile.in (OBS): Add selftest.o.
924 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
925 * configure, config.in: Re-generated.
926 * server.c: Include common/sefltest.h.
927 (captured_main): Handle option --selftest.
928
f5a29eb0
YQ
9292017-08-09 Yao Qi <yao.qi@linaro.org>
930
931 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
932 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
933 i386-avx-mpx.o and i386-mmx.o.
934 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
935 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
936 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
937 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
938 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
939 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
940 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
941 i386/amd64-avx-mpx.xml.
942
57757c2f
YQ
9432017-08-09 Yao Qi <yao.qi@linaro.org>
944
945 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
946 and x32-avx-avx512.o.
947 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
948 i386/x32-avx-avx512.xml.
949
229d26fc
SM
9502017-07-26 Simon Marchi <simon.marchi@ericsson.com>
951
952 * tracepoint.h (enum class fast_tpoint_collect_result): New
953 enumeration.
954 (fast_tracepoint_collecting): Change return type to
955 fast_tpoint_collect_result.
956 * tracepoint.c (fast_tracepoint_collecting): Likewise.
957 * linux-low.h: Include tracepoint.h.
958 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
959 fast_tpoint_collect_result.
960 * linux-low.c (handle_tracepoints): Adjust.
961 (linux_fast_tracepoint_collecting): Change return type to
962 fast_tpoint_collect_result.
963 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
964 linux_wait_1, stuck_in_jump_pad_callback,
965 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
966 proceed_one_lwp): Adjust to type change.
967
2e1e43e1
YQ
9682017-07-10 Yao Qi <yao.qi@linaro.org>
969
970 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
971
adc764e7
YQ
9722017-06-29 Yao Qi <yao.qi@linaro.org>
973
974 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
975 Remove.
976 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
977
a206891a
SM
9782017-06-20 Simon Marchi <simon.marchi@ericsson.com>
979
980 * Makefile.in (IPA_OBJS): Sort and format one item per line.
981
9a6c7d9c
SDJ
9822017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
983
984 * linux-low.c (linux_create_inferior): Adjust code to access the
985 environment information via 'gdb_environ' class.
986 * lynx-low.c (lynx_create_inferior): Likewise.
987 * server.c (our_environ): Make it an instance of 'gdb_environ'.
988 (get_environ): Return a pointer to 'our_environ'.
989 (captured_main): Initialize 'our_environ'.
990 * server.h (get_environ): Adjust prototype.
991 * spu-low.c (spu_create_inferior): Adjust code to access the
992 environment information via 'gdb_environ' class.
993
ae3e2ccf
SM
9942017-06-17 Simon Marchi <simon.marchi@ericsson.com>
995
996 * linux-low.c (linux_read_memory, linux_write_memory): Remove
997 usage of "register" keyword.
998
3e019bdc
SM
9992017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1000
1001 * configure: Re-generate.
1002
8465943a
SM
10032017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1004
1005 * configure: Re-generate.
1006
cf0dd6f0
SM
10072017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1008
1009 * Makefile.in (COMPILE.pre): Add "-x c++".
1010
9845682b
SDJ
10112017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1012
1013 * fork-child.c: Conditionally include <signal.h>.
1014
aefd8b33
SDJ
10152017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1016
1017 * server.c (handle_general_set): Handle new packet
1018 "QStartupWithShell".
1019 (handle_query): Add "QStartupWithShell" to the list of supported
1020 packets.
1021 (gdbserver_usage): Add help text explaining the
1022 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1023 options.
1024 (captured_main): Recognize and act upon the presence of the new
1025 CLI options.
1026
2090129c
SDJ
10272017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1028 Pedro Alves <palves@redhat.com>
1029
1030 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1031 * configure: Regenerate.
1032 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1033 "fork-inferior.o".
1034 (i[34567]86-*-lynxos*): Likewise.
1035 (spu*-*-*): Likewise.
1036 * fork-child.c: New file.
1037 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1038 and "environ.h".
1039 (linux_ptrace_fun): New function.
1040 (linux_create_inferior): Adjust function prototype to reflect
1041 change on "target.h". Adjust function code to use
1042 "fork_inferior".
1043 (linux_request_interrupt): Delete "signal_pid".
1044 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1045 (lynx_ptrace_fun): New function.
1046 (lynx_create_inferior): Adjust function prototype to reflect
1047 change on "target.h". Adjust function code to use
1048 "fork_inferior".
1049 * nto-low.c (nto_create_inferior): Adjust function prototype and
1050 code to reflect change on "target.h". Update comments.
1051 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1052 "common-terminal.h" and "environ.h".
1053 (terminal_fd): Moved to fork-child.c.
1054 (old_foreground_pgrp): Likewise.
1055 (restore_old_foreground_pgrp): Likewise.
1056 (last_status): Make it global.
1057 (last_ptid): Likewise.
1058 (our_environ): New variable.
1059 (startup_with_shell): Likewise.
1060 (program_name): Likewise.
1061 (program_argv): Rename to...
1062 (program_args): ...this.
1063 (wrapper_argv): New variable.
1064 (start_inferior): Delete function.
1065 (get_exec_wrapper): New function.
1066 (get_exec_file): Likewise.
1067 (get_environ): Likewise.
1068 (prefork_hook): Likewise.
1069 (post_fork_inferior): Likewise.
1070 (postfork_hook): Likewise.
1071 (postfork_child_hook): Likewise.
1072 (handle_v_run): Update code to deal with arguments coming from the
1073 remote host. Update calls from "start_inferior" to
1074 "create_inferior".
1075 (captured_main): Likewise. Initialize environment variable. Call
1076 "have_job_control".
1077 * server.h (post_fork_inferior): New prototype.
1078 (get_environ): Likewise.
1079 (last_status): Declare.
1080 (last_ptid): Likewise.
1081 (signal_pid): Likewise.
1082 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1083 (spu_ptrace_fun): New function.
1084 (spu_create_inferior): Adjust function prototype to reflect change
1085 on "target.h". Adjust function code to use "fork_inferior".
1086 * target.c (target_terminal_init): New function.
1087 (target_terminal_inferior): Likewise.
1088 (target_terminal_ours): Likewise.
1089 * target.h: Include <vector>.
1090 (struct target_ops) <create_inferior>: Update prototype.
1091 (create_inferior): Update macro.
1092 * utils.c (gdb_flush_out_err): New function.
1093 * win32-low.c (win32_create_inferior): Adjust function prototype
1094 and code to reflect change on "target.h".
1095
043a4934
SDJ
10962017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1097
1098 * inferiors.c (switch_to_thread): New function.
1099
15652511
SDJ
11002017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1101
1102 * Makefile.in (SFILE): Add "common/job-control.c".
1103 (OBS): Add "job-control.o".
1104
21ea5acd
SDJ
11052017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1106
1107 * Makefile: Remove "@host_makefile_frag@".
1108
e13cb306
PA
11092017-05-05 Pedro Alves <palves@redhat.com>
1110
1111 * configure: Regenerate.
1112
c94fee56
SDJ
11132017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1114
1115 * configure: Regenerate.
1116
a0ff9e1a
SM
11172017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1118
1119 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1120 software_single_step change of return type to
1121 std::vector<CORE_ADDR>.
1122 * linux-low.c (install_software_single_step_breakpoints):
1123 Likewise.
1124 * linux-low.h (install_software_single_step_breakpoints):
1125 Likewise.
1126
be628ab8
SDJ
11272017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1128
1129 * remote-utils.c: Include "gdb_termios.h" instead of
1130 "terminal.h".
1131 * terminal.h: Delete file.
1132
7c5ded6a
SDJ
11332017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1134
1135 * server.c: Include <vector>.
1136 <program_argv, wrapper_argv>: Convert to std::vector.
1137 (start_inferior): Rewrite function to use C++.
1138 (handle_v_run): Likewise. Update code that calculates the argv
1139 based on the vRun packet; use C++.
1140 (captured_main): Likewise.
1141
436252de
SM
11422017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1143
1144 * server.c (handle_v_cont): Initialize thread_resume::thread
1145 with null_ptid.
1146
9bf2a700
PA
11472017-04-05 Pedro Alves <palves@redhat.com>
1148
1149 * configure: Regenerate.
1150
a121b7c1
PA
11512017-04-05 Pedro Alves <palves@redhat.com>
1152
1153 * gdbreplay.c (sync_error): Constify.
1154 * linux-x86-low.c (push_opcode): Constify.
1155
21c8a587
PA
11562017-04-05 Pedro Alves <palves@redhat.com>
1157
1158 * win32-low.c (get_child_debug_event)
1159 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1160 Report TARGET_WAITKIND_SPURIOUS instead.
1161
fb32b4f7
PA
11622017-04-05 Pedro Alves <palves@redhat.com>
1163
1164 * remote-utils.c (remote_prepare, remote_open): Constify.
1165 * remote-utils.h (remote_prepare, remote_open): Constify.
1166 * server.c (captured_main): Constify 'port' handling.
1167
65dd1e59
SM
11682017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1169
1170 * Makefile.in (clean): Clear .deps.
1171
8fa5b777
SM
11722017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1173
1174 * .gitignore: Remove generated files, replace with wildcard.
1175 * (clean): Replace removal of generated files with wildcard.
1176 (version.c): Replace with...
1177 (version-generated.c): ...this.
1178 (xml-builtin.c): Replace with...
1179 (xml-builtin-generated.c): ...this.
1180 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1181 (%.c: *regformats*): Replace with...
1182 (%-generated.c: *regformats*): ...this.
1183
a12e714b
MF
11842017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1185
1186 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1187 (xtensa_fill_gregset): Call collect_register_by_name for
1188 threadptr register.
1189 (xtensa_store_gregset): Call supply_register_by_name for
1190 threadptr register.
1191
1a09b50a
MF
11922017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1193
1194 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1195 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1196 (xtensa_store_gregset): Call supply_register for all registers in
1197 a0_regnum..a0_regnum + C0_NREGS range.
1198
1a01e7c6
SM
11992017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1200
1201 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1202 (ax-ipa.o: ax.c): Remove.
1203 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1204 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1205 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1206 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1207 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1208
36bc18a8
SM
12092017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1210
1211 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1212 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1213 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1214 (errors-ipa.o: ../common/errors.c): Remove.
1215 (format-ipa.o: ../common/format.c): Remove.
1216 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1217
a8ebe3d5
SM
12182017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1219
1220 * Makefile.in (%-ipa.o: %.c): New rule.
1221 (tracepoint-ipa.o: tracepoint.c): Remove.
1222 (utils-ipa.o: utils.c): Remove.
1223 (remote-utils-ipa.o: remote-utils.c): Remove.
1224 (regcache-ipa.o: regcache.c): Remove.
1225 (i386-linux-ipa.o: i386-linux.c): Remove.
1226 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1227 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1228 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1229 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1230 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1231 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1232 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1233 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1234 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1235 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1236 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1237 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1238 (aarch64-ipa.o: aarch64.c): Remove.
1239 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1240 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1241 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1242 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1243 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1244 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1245 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1246 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1247 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1248 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1249 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1250 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1251 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1252 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1253 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1254 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1255 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1256 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1257 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1258 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1259 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1260 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1261 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1262 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1263 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1264 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1265 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1266 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1267 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1268 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1269 (tdesc-ipa.o: tdesc.c): Remove.
1270 (x32-linux-ipa.o: x32-linux.c): Remove.
1271 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1272 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1273
50cfacb7
SM
12742017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1275
1276 * Makefile.in (%.o: ../arch/%.c): New rule.
1277 (arm.o: ../arch/arm.c): Remove.
1278 (arm-linux.o: ../arch/arm-linux.c): Remove.
1279 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1280 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1281
c5a22423
SM
12822017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1283
1284 * Makefile.in (%.o: ../nat/%.c): New rule.
1285 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1286 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1287 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1288 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1289 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1290 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1291 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1292 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1293 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1294 (linux-personality.o: ../nat/linux-personality.c): Remove.
1295 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1296 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1297 (x86-linux.o: ../nat/x86-linux.c): Remove.
1298 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1299 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1300
6bda016b
SM
13012017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1302
1303 * Makefile.in (%.o: ../common/%.c): New rule.
1304 (signals.o: ../common/signals.c): Remove.
1305 (print-utils.o: ../common/print-utils.c): Remove.
1306 (rsp-low.o: ../common/rsp-low.c): Remove.
1307 (common-utils.o: ../common/common-utils.c): Remove.
1308 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1309 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1310 (vec.o: ../common/vec.c): Remove.
1311 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1312 (xml-utils.o: ../common/xml-utils.c): Remove.
1313 (ptid.o: ../common/ptid.c): Remove.
1314 (buffer.o: ../common/buffer.c): Remove.
1315 (format.o: ../common/format.c): Remove.
1316 (filestuff.o: ../common/filestuff.c): Remove.
1317 (agent.o: ../common/agent.c): Remove.
1318 (errors.o: ../common/errors.c): Remove.
1319 (environ.o: ../common/environ.c): Remove.
1320 (common-debug.o: ../common/common-debug.c): Remove.
1321 (cleanups.o: ../common/cleanups.c): Remove.
1322 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1323 (fileio.o: ../common/fileio.c): Remove.
1324 (common-regcache.o: ../common/common-regcache.c): Remove.
1325 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1326 (new-op.o: ../common/new-op.c): Remove.
1327 (btrace-common.o: ../common/btrace-common.c): Remove.
1328
21122961
SM
13292017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1330
1331 * Makefile.in (%.o: ../target/%.c): New rule.
1332 (waitstatus.o: ../target/waitstatus.c): Remove.
1333
c362e621
SM
13342017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1335
1336 * Makefile.in
1337 (%.c: ../regformats/%.dat,
1338 (%.c: ../regformats/arm/%.dat,
1339 (%.c: ../regformats/i386/%.dat,
1340 (%.c: ../regformats/rs6000/%.dat): New rules.
1341 (aarch64.c): Remove.
1342 (reg-arm.c): Remove.
1343 (arm-with-iwmmxt.c): Remove.
1344 (arm-with-vfpv2.c): Remove.
1345 (arm-with-vfpv3.c): Remove.
1346 (arm-with-neon.c): Remove.
1347 (reg-bfin.c): Remove.
1348 (reg-cris.c): Remove.
1349 (reg-crisv32.c): Remove.
1350 (i386.c): Remove.
1351 (i386-linux.c): Remove.
1352 (i386-avx.c): Remove.
1353 (i386-avx-linux.c): Remove.
1354 (i386-avx-avx512.c): Remove.
1355 (i386-avx-avx512-linux.c): Remove.
1356 (i386-mpx.c): Remove.
1357 (i386-mpx-linux.c): Remove.
1358 (i386-avx-mpx-avx512-pku.c): Remove.
1359 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1360 (i386-avx-mpx.c): Remove.
1361 (i386-avx-mpx-linux.c): Remove.
1362 (i386-mmx.c): Remove.
1363 (i386-mmx-linux.c): Remove.
1364 (reg-ia64.c): Remove.
1365 (reg-m32r.c): Remove.
1366 (reg-m68k.c): Remove.
1367 (reg-cf.c): Remove.
1368 (mips-linux.c): Remove.
1369 (mips-dsp-linux.c): Remove.
1370 (mips64-linux.c): Remove.
1371 (mips64-dsp-linux.c): Remove.
1372 (nios2-linux.c): Remove.
1373 (powerpc-32.c): Remove.
1374 (powerpc-32l.c): Remove.
1375 (powerpc-altivec32l.c): Remove.
1376 (powerpc-cell32l.c): Remove.
1377 (powerpc-vsx32l.c): Remove.
1378 (powerpc-isa205-32l.c): Remove.
1379 (powerpc-isa205-altivec32l.c): Remove.
1380 (powerpc-isa205-vsx32l.c): Remove.
1381 (powerpc-e500l.c): Remove.
1382 (powerpc-64l.c): Remove.
1383 (powerpc-altivec64l.c): Remove.
1384 (powerpc-cell64l.c): Remove.
1385 (powerpc-vsx64l.c): Remove.
1386 (powerpc-isa205-64l.c): Remove.
1387 (powerpc-isa205-altivec64l.c): Remove.
1388 (powerpc-isa205-vsx64l.c): Remove.
1389 (s390-linux32.c): Remove.
1390 (s390-linux32v1.c): Remove.
1391 (s390-linux32v2.c): Remove.
1392 (s390-linux64.c): Remove.
1393 (s390-linux64v1.c): Remove.
1394 (s390-linux64v2.c): Remove.
1395 (s390-te-linux64.c): Remove.
1396 (s390-vx-linux64.c): Remove.
1397 (s390-tevx-linux64.c): Remove.
1398 (s390x-linux64.c): Remove.
1399 (s390x-linux64v1.c): Remove.
1400 (s390x-linux64v2.c): Remove.
1401 (s390x-te-linux64.c): Remove.
1402 (s390x-vx-linux64.c): Remove.
1403 (s390x-tevx-linux64.c): Remove.
1404 (tic6x-c64xp-linux.c): Remove.
1405 (tic6x-c64x-linux.c): Remove.
1406 (tic6x-c62x-linux.c): Remove.
1407 (reg-sh.c): Remove.
1408 (reg-sparc64.c): Remove.
1409 (reg-spu.c): Remove.
1410 (amd64.c): Remove.
1411 (amd64-linux.c): Remove.
1412 (amd64-avx.c): Remove.
1413 (amd64-avx-linux.c): Remove.
1414 (amd64-avx-avx512.c): Remove.
1415 (amd64-avx-avx512-linux.c): Remove.
1416 (amd64-mpx.c): Remove.
1417 (amd64-mpx-linux.c): Remove.
1418 (amd64-avx-mpx-avx512-pku.c): Remove.
1419 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1420 (amd64-avx-mpx.c): Remove.
1421 (amd64-avx-mpx-linux.c): Remove.
1422 (x32.c): Remove.
1423 (x32-linux.c): Remove.
1424 (x32-avx.c): Remove.
1425 (x32-avx-linux.c): Remove.
1426 (x32-avx-avx512.c): Remove.
1427 (x32-avx-avx512-linux.c): Remove.
1428 (reg-xtensa.c): Remove.
1429 (reg-tilegx.c): Remove.
1430 (reg-tilegx32.c): Remove.
1431
1672e0d9
SDJ
14322017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1433
1434 * Makefile.in (SFILES): Add "common/environ.c".
1435 (OBJS): Add "common/environ.h".
1436
239b6d10
WT
14372017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1438
1439 * configure.ac: Check if the fs_base and gs_base members of
1440 `struct user_regs_struct' exist.
1441 * config.in: Regenerated.
1442 * configure: Likewise.
1443
694b382c
AT
14442017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1445
1446 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1447 target_read_memory.
1448 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1449 (get_next_pcs_syscall_next_pc): Likewise.
1450
7dc53023
LM
14512016-12-23 Luis Machado <lgustavo@codesourcery.com>
1452
1453 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1454 * nto-x86-low.c: Likewise.
1455
ad02e4fe
SM
14562016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1457
1458 * Makefile.in: Include disable-implicit-rules.mk.
1459
dcb07cfa
PA
14602016-11-23 Pedro Alves <palves@redhat.com>
1461
1462 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1463 (debug_vprintf): Use std::chrono::steady_clock instead of
1464 gettimeofday. Use '.' instead of ':'.
1465 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1466 (get_timestamp): Use std::chrono::steady_clock instead of
1467 gettimeofday.
1468
8629c02c
SM
14692016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1470
1471 * Makefile.in: Fix whitespace formatting.
1472
b593ecca
SM
14732016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1474
1475 * Makefile.in (SFILES, OBS): Flatten list and order
1476 alphabetically.
1477
9986ba08
PA
14782016-11-23 Pedro Alves <palves@redhat.com>
1479
1480 * event-loop.c (handle_file_event): Use warning.
1481 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1482 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1483 Use warning.
1484
4eefa7bc
PA
14852016-11-23 Pedro Alves <palves@redhat.com>
1486
1487 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1488 output.
1489 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1490 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1491 debug_printf and debug_flush for debug output.
1492 * server.c (handle_general_set): Likewise.
1493 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1494 output.
1495
5443506e
SM
14962016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1497
1498 * Makefile.in (.c.o): Replace rule with ...
1499 (%.o: %.c): ... this one.
1500
3b165252
SM
15012016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1502
1503 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1504 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1505 make.
1506 * configure.ac: Remove checks for the make program.
1507 * configure: Re-generate.
1508
0bcda685
PA
15092016-10-28 Pedro Alves <palves@redhat.com>
1510
1511 * Makefile.in (CXX_DIALECT): Get from configure.
1512 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1513 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1514 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1515 * config.in: Regenerate.
1516 * configure: Regenerate.
1517
c3805894
YQ
15182016-10-27 Yao Qi <yao.qi@linaro.org>
1519
1520 * linux-low.c (linux_supports_range_stepping): Return true if
1521 can_software_single_step return true.
1522
89342618
YQ
15232016-10-27 Yao Qi <yao.qi@linaro.org>
1524
1525 * inferiors.c (find_inferior_in_random): New function.
1526 * inferiors.h (find_inferior_in_random): Declare.
1527 * linux-low.c (linux_wait_for_event_filtered): Call
1528 find_inferior_in_random instead of find_inferior.
1529
e3652c84
YQ
15302016-10-27 Yao Qi <yao.qi@linaro.org>
1531
1532 * linux-low.c (linux_wait_1): If single-step breakpoints are
1533 inserted, remove them.
1534
5a04c4cf
PA
15352016-10-26 Pedro Alves <palves@redhat.com>
1536
1537 * linux-low.c (handle_extended_wait): Link parent/child fork
1538 threads.
1539 (linux_wait_1): Unlink them.
1540 (linux_set_resume_request): Ignore resume requests for
1541 already-resumed and unhandled fork child threads.
1542 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1543 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1544 New functions.
1545 (handle_v_requests) <vCont>: Don't call require_running.
1546 * server.h (in_queued_stop_replies): New declaration.
1547
cb93dc7f
YQ
15482016-10-24 Yao Qi <yao.qi@linaro.org>
1549
1550 PR server/20733
1551 * linux-aarch64-low.c (append_insns): Cast the return value to
1552 'uint32_t *'.
1553
a1078bea
YQ
15542016-10-10 Yao Qi <yao.qi@linaro.org>
1555
1556 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1557
1fb77080
SDJ
15582016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1559
1560 * target.c (target_supports_multi_process): New function, moved
1561 from...
1562 * target.h (target_supports_multi_process): ... here. Remove
1563 macro.
1564
39b5a3b9
TT
15652016-10-05 Tom Tromey <tom@tromey.com>
1566
1567 PR remote/20655:
1568 * tracepoint.c (handle_tracepoint_bkpts): Check
1569 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1570
c1d0b70a
YQ
15712016-10-05 Yao Qi <yao.qi@linaro.org>
1572
1573 * configure.srv: Update the path of arm-*.xml files.
1574
0a69eedb
YQ
15752016-10-05 Terry Guo <terry.guo@arm.com>
1576 Yao Qi <yao.qi@linaro.org>
1577
1578 * Makefile.in: Adjust the path of rules.
1579 * configure.srv: Update the path of xml files.
1580 * regformats/arm-with-iwmmxt.dat: Regenerated.
1581 * regformats/arm-with-neon.dat: Likewise.
1582 * regformats/arm-with-vfpv2.dat: Likewise.
1583 * regformats/arm-with-vfpv3.dat Likewise.
1584
17e16485
YQ
15852016-09-30 Yao Qi <yao.qi@linaro.org>
1586
1587 PR gdbserver/20627
1588 * target.c (target_stop_and_wait): Don't call
1589 target_continue_no_signal, use resume_stop instead.
1590
edeeb602
YQ
15912016-09-26 Yao Qi <yao.qi@linaro.org>
1592
1593 * linux-low.c (linux_wait_1): Call debug_exit.
1594
503b1c39
PA
15952016-09-23 Pedro Alves <palves@redhat.com>
1596
1597 * Makefile.in (SFILES): Add common/new-op.c.
1598 (OBS): Add common/new-op.o.
1599 (new-op.o): New rule.
1600
74172ecf
SM
16012016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1602
1603 * .gitinore: Ignore more files.
1604
fc6cda2e
YQ
16052016-09-21 Yao Qi <yao.qi@linaro.org>
1606
1607 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1608 23.
1609
bc1e6c81
SDJ
16102016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1611
1612 * server.c (start_inferior): Call target_mourn_inferior instead of
1613 mourn_inferior; pass ptid_t argument to it.
1614 (resume): Likewise.
1615 (handle_target_event): Likewise.
1616 * target.c (target_mourn_inferior): New function.
1617 * target.h (mourn_inferior): Delete macro.
1618
0e00e962
AA
16192016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1620
1621 * linux-low.c (lwp_is_stepping): New function.
1622
1d8cb77d
CL
16232016-09-06 Carl Love <cel@us.ibm.com>
1624
1625 * server.c (start_inferior): Fixed comment, requested comment change
1626 didn't get updated correctly. Removed reference to ptrace () call as
1627 it is only true on Linux systems.
1628
7313bced
CL
16292016-09-06 Carl Love <cel@us.ibm.com>
1630
1631 * server.c (start_inferior): Do not call
1632 function target_post_create_inferior () if the
1633 inferior process has already exited.
1634
cf6de44d
PA
16352016-09-05 Pedro Alves <palves@redhat.com>
1636
1637 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1638 (COMPILE.pre, CC_LD): Use CXX directly.
1639 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1640 * acinclude.m4: Don't include build-with-cxx.m4.
1641 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1642 * configure: Regenerate.
1643
c1da6748
AT
16442016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1645
1646 PR gdb/19495
1647 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1648 call writing data to own_buf.
1649
f2b9e3df
SDJ
16502016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1651
1652 * target.c (mywait): Call target_wait instead of
1653 the_target->wait.
1654 (target_wait): New function.
1655
049a8570
SDJ
16562016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1657
1658 * server.c (start_inferior): New variable 'ptid'. Replace calls
1659 to the_target->resume by target_continue{,_no_signal}, depending
1660 on the case.
1661 * target.c (target_stop_and_wait): Call target_continue_no_signal
1662 instead of the_target->resume.
1663 (target_continue): New function.
1664
3aa5cfa0
AT
16652016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1666
1667 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1668
754653a7
AZ
16692016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1670
1671 PR server/20491
1672 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1673 ps_prochandle.
1674 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1675 * linux-arm-low.c (ps_get_thread_area): Likewise.
1676 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1677 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1678 * linux-mips-low.c (ps_get_thread_area): Likewise.
1679 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1680 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1681 * linux-x86-low.c (ps_get_thread_area): Likewise.
1682 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1683
ed036b40
PA
16842016-08-19 Pedro Alves <palves@redhat.com>
1685
1686 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1687
c8ef42ee
PA
16882016-08-19 Pedro Alves <palves@redhat.com>
1689
1690 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1691 comment. Use memcpy instead of casting through unsigned long.
1692
9c235a72
PA
16932016-08-19 Pedro Alves <palves@redhat.com>
1694
1695 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1696 allocating around 0x80000000.
1697
201506da
PA
16982016-08-19 Pedro Alves <palves@redhat.com>
1699
1700 PR gdb/20415
1701 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1702 (x32-avx512-linux-ipa.o): New rules.
1703 * configure.ac (x86_64-*-linux*): New x32 check.
1704 * configure.srv (ipa_x32_linux_regobj): New.
1705 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1706 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1707 descriptions.
1708 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1709 descriptions.
1710 * configure: Regenerate.
1711
f348d89a
PA
17122016-08-09 Pedro Alves <palves@redhat.com>
1713
1714 PR gdb/18653
1715 * Makefile.in (OBS): Add signals-state-save-restore.o.
1716 (signals-state-save-restore.o): New rule.
1717 * config.in: Regenerate.
1718 * configure: Regenerate.
1719 * linux-low.c: Include "signals-state-save-restore.h".
1720 (linux_create_inferior): Call
1721 restore_original_signals_state.
1722 * server.c: Include "dispositions-save-restore.h".
1723 (captured_main): Call save_original_signals_state.
1724
1baf5149
PA
17252016-08-05 Pedro Alves <palves@redhat.com>
1726
1727 * configure: Regenerate.
1728
fcd4a73d
YQ
17292016-08-04 Yao Qi <yao.qi@linaro.org>
1730
1731 * linux-low.c (regsets_fetch_inferior_registers): Check
1732 errno is ESRCH or not.
1733
979659d0
YQ
17342016-08-02 Yao Qi <yao.qi@linaro.org>
1735
1736 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1737 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1738 (thread_db_load_search): Update.
1739 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1740 td_ta_set_event and td_ta_event_getmsg.
1741
6598661d
PA
17422016-07-26 Pedro Alves <palves@redhat.com>
1743
1744 PR server/20414
1745 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1746 of unsigned long for 64-bit registers and use uint32_t instead of
1747 unsigned int for 32-bit registers.
1748
9cf12d57
PA
17492016-07-26 Pedro Alves <palves@redhat.com>
1750
1751 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1752 to 'ptrace'.
1753
305450ed
TT
17542016-07-21 Tom Tromey <tom@tromey.com>
1755
1756 * configure: Rebuild.
1757
2583da7c
YQ
17582016-07-21 Yao Qi <yao.qi@linaro.org>
1759
1760 * mem-break.c (find_gdb_breakpoint): Cast bp to
1761 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1762
21536b36
YQ
17632016-07-21 Yao Qi <yao.qi@linaro.org>
1764
1765 * server.c (handle_v_requests): Support s and S actions
1766 if target_supports_software_single_step return true.
1767
8901d193
YQ
17682016-07-21 Yao Qi <yao.qi@linaro.org>
1769
1770 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1771 is resume_step, call maybe_hw_step.
1772 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1773 and unstop them.
1774 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1775 breakpoints or not.
1776 (proceed_one_lwp): If resume request is resume_step, install
1777 reinsert breakpoints and call maybe_hw_step.
1778
0e9a339e
YQ
17792016-07-21 Yao Qi <yao.qi@linaro.org>
1780
1781 * linux-low.c (proceed_one_lwp): Declare.
1782 (linux_resume_one_thread): Remove local variable 'step'.
1783 Lift code enqueue signal. Call proceed_one_lwp instead of
1784 linux_resume_one_lwp.
1785
4281b351
YQ
17862016-07-21 Yao Qi <yao.qi@linaro.org>
1787
1788 * linux-low.c (linux_resume_one_thread): Call
1789 enqueue_pending_signal.
1790
984a2c04
YQ
17912016-07-21 Yao Qi <yao.qi@linaro.org>
1792
1793 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1794 * inferiors.c (do_restore_current_thread_cleanup): New function.
1795 (make_cleanup_restore_current_thread): Likewise.
1796 * linux-low.c (install_software_single_step_breakpoints): Call
1797 make_cleanup_restore_current_thread. Switch current_thread to
1798 thread.
1799
bec903c9
YQ
18002016-07-21 Yao Qi <yao.qi@linaro.org>
1801
1802 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1803 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1804 (clone_one_breakpoint): Likewise.
1805 (delete_reinsert_breakpoints): Change parameter to thread.
1806 Callers updated.
1807 (has_reinsert_breakpoints): Likewise.
1808 (uninsert_reinsert_breakpoints): Likewise.
1809 (reinsert_reinsert_breakpoints): Likewise.
1810 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1811 (delete_reinsert_breakpoints): Likewise.
1812 (reinsert_reinsert_breakpoints): Likewise.
1813 (uninsert_reinsert_breakpoints): Likewise.
1814 (has_reinsert_breakpoints): Likewise.
1815
63c40ec7
YQ
18162016-07-21 Yao Qi <yao.qi@linaro.org>
1817
1818 * inferiors.c (get_thread_process): Make parameter const.
1819 * inferiors.h (get_thread_process): Update declaration.
1820 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1821 Add new parameters child_thread and parent_thread. Callers
1822 updated.
1823 * mem-break.h (clone_all_breakpoints): Update declaration.
1824
9aa76cd0
YQ
18252016-07-21 Yao Qi <yao.qi@linaro.org>
1826
1827 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1828 <command_list, handler>: Remove.
1829 (struct gdb_breakpoint): New.
1830 (struct other_breakpoint): New.
1831 (struct reinsert_breakpoint): New.
1832 (is_gdb_breakpoint): New function.
1833 (any_persistent_commands): Update command_list if
1834 is_gdb_breakpoint returns true.
1835 (set_breakpoint): Create breakpoints according to their types.
1836 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1837 (set_gdb_breakpoint_1): Likewise.
1838 (set_gdb_breakpoint): Likewise.
1839 (clear_breakpoint_conditions): Change parameter type to
1840 'struct gdb_breakpoint *'.
1841 (clear_breakpoint_commands): Likewise.
1842 (clear_breakpoint_conditions_and_commands): Likewise.
1843 (add_condition_to_breakpoint): Likewise.
1844 (add_breakpoint_condition): Likewise.
1845 (add_commands_to_breakpoint): Likewise.
1846 (check_breakpoints): Check other_breakpoint.
1847 (clone_one_breakpoint): Clone breakpopint according to its type.
1848 * mem-break.h (struct gdb_breakpoint): Declare.
1849 (set_gdb_breakpoint): Update declaration.
1850 (clear_breakpoint_conditions_and_commands): Likewise.
1851 (add_breakpoint_condition): Likewise.
1852 (add_breakpoint_commands): Likewise.
1853 * server.c (process_point_options): Change parameter type to
1854 'struct gdb_breakpoint *'.
1855
811f8301
YQ
18562016-07-21 Yao Qi <yao.qi@linaro.org>
1857
1858 * mem-break.c (set_breakpoint_at): Rename it to ...
1859 (set_breakpoint_type_at): ... it.
1860 (set_breakpoint_at): Call set_breakpoint_type_at.
1861 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1862 * mem-break.h (set_breakpoint_at): Update comments.
1863
b1c51e36
CLT
18642016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1865
1866 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1867 to buf parameter.
1868 (nios2_store_gregset): Likewise.
1869
ced2dffb
PA
18702016-07-01 Pedro Alves <palves@redhat.com>
1871 Antoine Tremblay <antoine.tremblay@ericsson.com>
1872
1873 * linux-low.c: Change interface to take the target lwp_info
1874 pointer directly and return void. Handle detaching from a zombie
1875 thread.
1876 (linux_detach_lwp_callback): New function.
1877 (linux_detach): Detach from the leader thread after detaching from
1878 the clone threads.
1879
2ac09a5b
YQ
18802016-06-28 Yao Qi <yao.qi@linaro.org>
1881
1882 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1883 for variable new_offset.
1884 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1885 (aarch64_ftrace_insn_reloc_cb): Likewise.
1886 (aarch64_ftrace_insn_reloc_tb): Likewise.
1887 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1888 PRIx64 instead of PRIx32.
1889
79e7fd4f
YQ
18902016-06-28 Yao Qi <yao.qi@linaro.org>
1891
1892 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1893 (the_low_target): Install arm_get_syscall_trapinfo.
1894
061fc021
YQ
18952016-06-28 Yao Qi <yao.qi@linaro.org>
1896
1897 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1898 function.
1899 (the_low_target): Install aarch64_get_syscall_trapinfo.
1900
4cc32bec
YQ
19012016-06-28 Yao Qi <yao.qi@linaro.org>
1902
1903 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1904 Callers updated.
1905 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1906 Remove parameter sysno.
1907 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1908 sysret.
1909
782c1122
AA
19102016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1911
1912 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1913 (s390_emit_ne_goto): Likewise.
1914 (s390_emit_lt_goto): Likewise.
1915 (s390_emit_le_goto): Likewise.
1916 (s390_emit_gt_goto): Likewise.
1917 (s390_emit_ge_goto): Likewise.
1918 (s390x_emit_eq_goto): Likewise.
1919 (s390x_emit_ne_goto): Likewise.
1920 (s390x_emit_lt_goto): Likewise.
1921 (s390x_emit_le_goto): Likewise.
1922 (s390x_emit_gt_goto): Likewise.
1923 (s390x_emit_ge_goto): Likewise.
1924 (s390_emit_ops_impl): Mark variable static.
1925 (s390x_emit_ops): Likewise.
1926
2e7b624b
YQ
19272016-06-17 Yao Qi <yao.qi@linaro.org>
1928
1929 * linux-low.c (handle_extended_wait): Call
1930 uninsert_reinsert_breakpoints for the parent process. Remove
1931 reinsert breakpoints from the child process. Reinsert them to
1932 the parent process when vfork is done.
1933 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1934 (reinsert_reinsert_breakpoints): New function.
1935 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1936 (reinsert_reinsert_breakpoints): Declare.
1937
8a81c5d7
YQ
19382016-06-17 Yao Qi <yao.qi@linaro.org>
1939
1940 * linux-low.c (handle_extended_wait): If the parent is doing
1941 step-over, remove the reinsert breakpoints from the forked child.
1942
f50bf8e5
YQ
19432016-06-17 Yao Qi <yao.qi@linaro.org>
1944
1945 * linux-low.c (unsuspend_all_lwps): Declare.
1946 (linux_low_filter_event): If thread exited, call finish_step_over.
1947 If step-over is finished, unsuspend other threads.
1948
8376a3cb
YQ
19492016-06-17 Yao Qi <yao.qi@linaro.org>
1950
1951 * linux-low.c (linux_resume_one_lwp_throw): Assert
1952 has_reinsert_breakpoints returns false.
1953 * mem-break.c (delete_disabled_breakpoints): Assert
1954 bp type isn't reinsert_breakpoint.
1955
f79b145d
YQ
19562016-06-17 Yao Qi <yao.qi@linaro.org>
1957
1958 * linux-low.c (maybe_hw_step): New function.
1959 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1960 (finish_step_over): Switch current_thread to lwp temporarily,
1961 and assert has_reinsert_breakpoints returns true.
1962 (proceed_one_lwp): Call maybe_hw_step.
1963 * mem-break.c (has_reinsert_breakpoints): New function.
1964 * mem-break.h (has_reinsert_breakpoints): Declare.
1965
0ae534d2
JT
19662016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1967
1968 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1969
fcdad592
YQ
19702016-05-17 Yao Qi <yao.qi@linaro.org>
1971
1972 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1973 instead of find_inferior.
1974
9e784964
YQ
19752016-05-05 Yao Qi <yao.qi@linaro.org>
1976
1977 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1978 Initialize res to zero.
1979
cf2ebb6e
YQ
19802016-05-05 Yao Qi <yao.qi@linaro.org>
1981
1982 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1983 to uint32_t.
1984
c1aebf87
UW
19852016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1986
1987 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1988 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1989 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1990
35fd2deb 19912016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1992 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1993
1994 * tracepoint.c (write_inferior_int8): New function.
1995 (cmd_qtenable_disable): Write enable flag using
1996 write_inferior_int8.
1997
484b3c32
YQ
19982016-04-25 Yao Qi <yao.qi@linaro.org>
1999
2000 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2001 (need_step_over_p): Return zero if the LWP has pending signals
2002 can be delivered on software single step target.
2003
85ba7d86
YQ
20042016-04-25 Yao Qi <yao.qi@linaro.org>
2005
2006 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2007 return instead of error.
2008
3539aa13
YQ
20092016-04-22 Yao Qi <yao.qi@linaro.org>
2010
2011 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2012 to 23.
2013
5b061e98
YQ
20142016-04-22 Yao Qi <yao.qi@linaro.org>
2015
2016 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2017 signal when stepping over breakpoint with software single
2018 step.
2019
3451269c
PA
20202016-04-21 Pedro Alves <palves@redhat.com>
2021
2022 * linux-s390-low.c (s390_collect_ptrace_register)
2023 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2024 add casts.
2025 (s390_check_regset): Use void * instead of gdb_byte *.
2026
a2358508
PA
20272016-04-20 Pedro Alves <palves@redhat.com>
2028
2029 * configure: Renegerate.
2030
6885166d
YQ
20312016-04-20 Yao Qi <yao.qi@linaro.org>
2032
2033 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2034 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2035 number 16.
2036 (arm_store_gregset): Likewise.
2037
2b863f51
WT
20382016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2039
2040 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2041 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2042 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2043 (amd64-avx-mpx-linux.c): New rules.
2044 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2045 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2046 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2047 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2048 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2049 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2050 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2051 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2052 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2053 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2054 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2055 * linux-x86-low.c (x86_linux_read_description): Add case for
2056 X86_XSTATE_AVX_MPX_MASK.
2057 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2058 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2059 init_registers_i386_avx_mpx_linux.
2060 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2061 (initialize_low_tracepoint): Call
2062 init_registers_i386_avx_mpx_linux.
2063 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2064 (initialize_low_tracepoint): Call
2065 init_registers_amd64_avx_mpx_linux.
2066 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2067 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2068 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2069 declarations.
2070
9b30624b
PA
20712016-04-18 Pedro Alves <palves@redhat.com>
2072
2073 * configure: Regenerate.
2074
45e3745e
AT
20752016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2076
2077 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2078 (aarch64_emit_sub): Likewise.
2079
2afc13ff
PA
20802016-04-12 Pedro Alves <palves@redhat.com>
2081
2082 * utils.c (prepare_to_throw_exception): Delete.
2083
6e774b13
SM
20842016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2085
2086 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2087
4dca19f8
MK
20882016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2089
2090 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2091
d0a9981f
MK
20922016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2093
2094 * linux-aarch64-ipa.c: Add <elf.h> include.
2095 * linux-ppc-ipa.c: Add <elf.h> include.
2096 * linux-s390-ipa.c: Add <elf.h> include.
2097
252db07e
MK
20982016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2099
2100 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2101 (get_raw_reg_ptr): Likewise.
2102 (get_trace_state_variable_value_ptr): Likewise.
2103 (set_trace_state_variable_value_ptr): Likewise.
2104 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2105 char *.
2106
14e2b6d9
MK
21072016-03-31 Wei-cheng Wang <cole945@gmail.com>
2108 Marcin Kościelnicki <koriakin@0x04.net>
2109
2110 PR/17221
2111 * linux-ppc-low.c (emit_insns): New function.
2112 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2113 (ppc_emit_prologue): New function.
2114 (ppc_emit_epilogue): New function.
2115 (ppc_emit_add): New function.
2116 (ppc_emit_sub): New function.
2117 (ppc_emit_mul): New function.
2118 (ppc_emit_lsh): New function.
2119 (ppc_emit_rsh_signed): New function.
2120 (ppc_emit_rsh_unsigned): New function.
2121 (ppc_emit_ext): New function.
2122 (ppc_emit_zero_ext): New function.
2123 (ppc_emit_log_not): New function.
2124 (ppc_emit_bit_and): New function.
2125 (ppc_emit_bit_or): New function.
2126 (ppc_emit_bit_xor): New function.
2127 (ppc_emit_bit_not): New function.
2128 (ppc_emit_equal): New function.
2129 (ppc_emit_less_signed): New function.
2130 (ppc_emit_less_unsigned): New function.
2131 (ppc_emit_ref): New function.
2132 (ppc_emit_const): New function.
2133 (ppc_emit_reg): New function.
2134 (ppc_emit_pop): New function.
2135 (ppc_emit_stack_flush): New function.
2136 (ppc_emit_swap): New function.
2137 (ppc_emit_stack_adjust): New function.
2138 (ppc_emit_call): New function.
2139 (ppc_emit_int_call_1): New function.
2140 (ppc_emit_void_call_2): New function.
2141 (ppc_emit_if_goto): New function.
2142 (ppc_emit_goto): New function.
2143 (ppc_emit_eq_goto): New function.
2144 (ppc_emit_ne_goto): New function.
2145 (ppc_emit_lt_goto): New function.
2146 (ppc_emit_le_goto): New function.
2147 (ppc_emit_gt_goto): New function.
2148 (ppc_emit_ge_goto): New function.
2149 (ppc_write_goto_address): New function.
2150 (ppc_emit_ops_impl): New static variable.
2151 (ppc64v1_emit_prologue): New function.
2152 (ppc64v2_emit_prologue): New function.
2153 (ppc64_emit_epilogue): New function.
2154 (ppc64_emit_add): New function.
2155 (ppc64_emit_sub): New function.
2156 (ppc64_emit_mul): New function.
2157 (ppc64_emit_lsh): New function.
2158 (ppc64_emit_rsh_signed): New function.
2159 (ppc64_emit_rsh_unsigned): New function.
2160 (ppc64_emit_ext): New function.
2161 (ppc64_emit_zero_ext): New function.
2162 (ppc64_emit_log_not): New function.
2163 (ppc64_emit_bit_and): New function.
2164 (ppc64_emit_bit_or): New function.
2165 (ppc64_emit_bit_xor): New function.
2166 (ppc64_emit_bit_not): New function.
2167 (ppc64_emit_equal): New function.
2168 (ppc64_emit_less_signed): New function.
2169 (ppc64_emit_less_unsigned): New function.
2170 (ppc64_emit_ref): New function.
2171 (ppc64_emit_const): New function.
2172 (ppc64v1_emit_reg): New function.
2173 (ppc64v2_emit_reg): New function.
2174 (ppc64_emit_pop): New function.
2175 (ppc64_emit_stack_flush): New function.
2176 (ppc64_emit_swap): New function.
2177 (ppc64v1_emit_call): New function.
2178 (ppc64v2_emit_call): New function.
2179 (ppc64v1_emit_int_call_1): New function.
2180 (ppc64v2_emit_int_call_1): New function.
2181 (ppc64v1_emit_void_call_2): New function.
2182 (ppc64v2_emit_void_call_2): New function.
2183 (ppc64_emit_if_goto): New function.
2184 (ppc64_emit_eq_goto): New function.
2185 (ppc64_emit_ne_goto): New function.
2186 (ppc64_emit_lt_goto): New function.
2187 (ppc64_emit_le_goto): New function.
2188 (ppc64_emit_gt_goto): New function.
2189 (ppc64_emit_ge_goto): New function.
2190 (ppc64v1_emit_ops_impl): New static variable.
2191 (ppc64v2_emit_ops_impl): New static variable.
2192 (ppc_emit_ops): New function.
2193 (linux_low_target): Wire in ppc_emit_ops.
2194
a2174ba4
MK
21952016-03-31 Wei-cheng Wang <cole945@gmail.com>
2196 Marcin Kościelnicki <koriakin@0x04.net>
2197
2198 PR/17221
2199 * Makefile.in: Add powerpc-*-ipa.o
2200 * configure.srv: Add ipa_obj for powerpc*-linux.
2201 * linux-ppc-ipa.c: New file.
2202 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2203 includes.
2204 (PPC_FIELD): New macro.
2205 (PPC_SEXT): New macro.
2206 (PPC_OP6): New macro.
2207 (PPC_BO): New macro.
2208 (PPC_LI): New macro.
2209 (PPC_BD): New macro.
2210 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2211 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2212 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2213 (ppc_get_thread_area): New function.
2214 (is_elfv2_inferior): New function.
2215 (gen_ds_form): New function.
2216 (GEN_STD): New macro.
2217 (GEN_STDU): New macro.
2218 (GEN_LD): New macro.
2219 (GEN_LDU): New macro.
2220 (gen_d_form): New function.
2221 (GEN_ADDI): New macro.
2222 (GEN_ADDIS): New macro.
2223 (GEN_LI): New macro.
2224 (GEN_LIS): New macro.
2225 (GEN_ORI): New macro.
2226 (GEN_ORIS): New macro.
2227 (GEN_LWZ): New macro.
2228 (GEN_STW): New macro.
2229 (GEN_STWU): New macro.
2230 (gen_xfx_form): New function.
2231 (GEN_MFSPR): New macro.
2232 (GEN_MTSPR): New macro.
2233 (GEN_MFCR): New macro.
2234 (GEN_MTCR): New macro.
2235 (GEN_SYNC): New macro.
2236 (GEN_LWSYNC): New macro.
2237 (gen_x_form): New function.
2238 (GEN_OR): New macro.
2239 (GEN_MR): New macro.
2240 (GEN_LWARX): New macro.
2241 (GEN_STWCX): New macro.
2242 (GEN_CMPW): New macro.
2243 (gen_md_form): New function.
2244 (GEN_RLDICL): New macro.
2245 (GEN_RLDICR): New macro.
2246 (gen_i_form): New function.
2247 (GEN_B): New macro.
2248 (GEN_BL): New macro.
2249 (gen_b_form): New function.
2250 (GEN_BNE): New macro.
2251 (GEN_LOAD): New macro.
2252 (GEN_STORE): New macro.
2253 (gen_limm): New function.
2254 (gen_atomic_xchg): New function.
2255 (gen_call): New function.
2256 (ppc_relocate_instruction): New function.
2257 (ppc_install_fast_tracepoint_jump_pad): New function.
2258 (ppc_get_min_fast_tracepoint_insn_len): New function.
2259 (ppc_get_ipa_tdesc_idx): New function.
2260 (the_low_target): Wire in the new functions.
2261 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2262 tdescs.
2263 * linux-ppc-tdesc.h: New file.
2264
a13c4696
MK
22652016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2266
2267 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2268 (alloc_jump_pad_buffer): New function.
2269 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2270 (alloc_jump_pad_buffer): New function.
2271 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2272 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2273 (alloc_jump_pad_buffer): New function.
2274 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2275 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2276 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2277 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2278
1cda1512
MK
22792016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2280
2281 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2282 * linux-amd64-ipa.c: Likewise.
2283 * linux-i386-ipa.c: Likewise.
2284 * linux-s390-ipa.c: Likewise.
2285 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2286 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2287 set_trace_state_variable_value_ptr.
2288 (struct ipa_sym_addresses): Likewise.
2289 (symbol_list): Likewise.
2290 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2291 accessing gdb_collect directly.
2292 (gdb_collect_ptr_type): New typedef.
2293 (get_raw_reg_ptr_type): New typedef.
2294 (get_trace_state_variable_value_ptr_type): New typedef.
2295 (set_trace_state_variable_value_ptr_type): New typedef.
2296 (gdb_collect_ptr): New global.
2297 (get_raw_reg_ptr): New global.
2298 (get_trace_state_variable_value_ptr): New global.
2299 (set_trace_state_variable_value_ptr): New global.
2300 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2301 accessing get_raw_reg directly.
2302 (get_get_tsv_func_addr): Likewise for
2303 get_trace_state_variable_value_ptr.
2304 (get_set_tsv_func_addr): Likewise for
2305 set_trace_state_variable_value_ptr.
2306 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2307
72fb5488
SM
23082016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2309
2310 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2311
28170b88
MK
23122016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2313
2314 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2315 packets.
2316 (relocate_instruction): Remove own_buf.
2317 * server.c (own_buf): Make global.
2318 (handle_v_requests): Make global.
2319 * server.h (own_buf): New declaration.
2320 (handle_v_requests): New prototype.
2321
f39e8743
MK
23222016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2323
2324 PR 18377
2325 * linux-s390-low.c (add_insns): New function.
2326 (s390_emit_prologue): New function.
2327 (s390_emit_epilogue): New function.
2328 (s390_emit_add): New function.
2329 (s390_emit_sub): New function.
2330 (s390_emit_mul): New function.
2331 (s390_emit_lsh): New function.
2332 (s390_emit_rsh_signed): New function.
2333 (s390_emit_rsh_unsigned): New function.
2334 (s390_emit_ext): New function.
2335 (s390_emit_log_not): New function.
2336 (s390_emit_bit_and): New function.
2337 (s390_emit_bit_or): New function.
2338 (s390_emit_bit_xor): New function.
2339 (s390_emit_bit_not): New function.
2340 (s390_emit_equal): New function.
2341 (s390_emit_less_signed): New function.
2342 (s390_emit_less_unsigned): New function.
2343 (s390_emit_ref): New function.
2344 (s390_emit_if_goto): New function.
2345 (s390_emit_goto): New function.
2346 (s390_write_goto_address): New function.
2347 (s390_emit_litpool): New function.
2348 (s390_emit_const): New function.
2349 (s390_emit_call): New function.
2350 (s390_emit_reg): New function.
2351 (s390_emit_pop): New function.
2352 (s390_emit_stack_flush): New function.
2353 (s390_emit_zero_ext): New function.
2354 (s390_emit_swap): New function.
2355 (s390_emit_stack_adjust): New function.
2356 (s390_emit_set_r2): New function.
2357 (s390_emit_int_call_1): New function.
2358 (s390_emit_void_call_2): New function.
2359 (s390_emit_eq_goto): New function.
2360 (s390_emit_ne_goto): New function.
2361 (s390_emit_lt_goto): New function.
2362 (s390_emit_le_goto): New function.
2363 (s390_emit_gt_goto): New function.
2364 (s390_emit_ge_goto): New function.
2365 (s390x_emit_prologue): New function.
2366 (s390x_emit_epilogue): New function.
2367 (s390x_emit_add): New function.
2368 (s390x_emit_sub): New function.
2369 (s390x_emit_mul): New function.
2370 (s390x_emit_lsh): New function.
2371 (s390x_emit_rsh_signed): New function.
2372 (s390x_emit_rsh_unsigned): New function.
2373 (s390x_emit_ext): New function.
2374 (s390x_emit_log_not): New function.
2375 (s390x_emit_bit_and): New function.
2376 (s390x_emit_bit_or): New function.
2377 (s390x_emit_bit_xor): New function.
2378 (s390x_emit_bit_not): New function.
2379 (s390x_emit_equal): New function.
2380 (s390x_emit_less_signed): New function.
2381 (s390x_emit_less_unsigned): New function.
2382 (s390x_emit_ref): New function.
2383 (s390x_emit_if_goto): New function.
2384 (s390x_emit_const): New function.
2385 (s390x_emit_call): New function.
2386 (s390x_emit_reg): New function.
2387 (s390x_emit_pop): New function.
2388 (s390x_emit_stack_flush): New function.
2389 (s390x_emit_zero_ext): New function.
2390 (s390x_emit_swap): New function.
2391 (s390x_emit_stack_adjust): New function.
2392 (s390x_emit_int_call_1): New function.
2393 (s390x_emit_void_call_2): New function.
2394 (s390x_emit_eq_goto): New function.
2395 (s390x_emit_ne_goto): New function.
2396 (s390x_emit_lt_goto): New function.
2397 (s390x_emit_le_goto): New function.
2398 (s390x_emit_gt_goto): New function.
2399 (s390x_emit_ge_goto): New function.
2400 (s390_emit_ops): New function.
2401 (struct linux_target_ops): Fill in emit_ops hook.
2402
abd9baf9
MK
24032016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2404
2405 PR 18377
2406 * Makefile.in: Add s390 IPA files.
2407 * configure.srv: Build IPA for s390.
2408 * linux-s390-ipa.c: New file.
2409 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2410 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2411 (tdesc_s390_linux32): Likewise.
2412 (init_registers_s390_linux32v1): Likewise.
2413 (tdesc_s390_linux32v1): Likewise.
2414 (init_registers_s390_linux32v2): Likewise.
2415 (tdesc_s390_linux32v2): Likewise.
2416 (init_registers_s390_linux64): Likewise.
2417 (tdesc_s390_linux64): Likewise.
2418 (init_registers_s390_linux64v1): Likewise.
2419 (tdesc_s390_linux64v1): Likewise.
2420 (init_registers_s390_linux64v2): Likewise.
2421 (tdesc_s390_linux64v2): Likewise.
2422 (init_registers_s390_te_linux64): Likewise.
2423 (tdesc_s390_te_linux64): Likewise.
2424 (init_registers_s390_vx_linux64): Likewise.
2425 (tdesc_s390_vx_linux64): Likewise.
2426 (init_registers_s390_tevx_linux64): Likewise.
2427 (tdesc_s390_tevx_linux64): Likewise.
2428 (init_registers_s390x_linux64): Likewise.
2429 (tdesc_s390x_linux64): Likewise.
2430 (init_registers_s390x_linux64v1): Likewise.
2431 (tdesc_s390x_linux64v1): Likewise.
2432 (init_registers_s390x_linux64v2): Likewise.
2433 (tdesc_s390x_linux64v2): Likewise.
2434 (init_registers_s390x_te_linux64): Likewise.
2435 (tdesc_s390x_te_linux64): Likewise.
2436 (init_registers_s390x_vx_linux64): Likewise.
2437 (tdesc_s390x_vx_linux64): Likewise.
2438 (init_registers_s390x_tevx_linux64): Likewise.
2439 (tdesc_s390x_tevx_linux64): Likewise.
2440 (have_hwcap_s390_vx): New static variable.
2441 (s390_arch_setup): Fill have_hwcap_s390_vx.
2442 (s390_get_thread_area): New function.
2443 (s390_ft_entry_gpr_esa): New const.
2444 (s390_ft_entry_gpr_zarch): New const.
2445 (s390_ft_entry_misc): New const.
2446 (s390_ft_entry_fr): New const.
2447 (s390_ft_entry_vr): New const.
2448 (s390_ft_main_31): New const.
2449 (s390_ft_main_64): New const.
2450 (s390_ft_exit_fr): New const.
2451 (s390_ft_exit_vr): New const.
2452 (s390_ft_exit_misc): New const.
2453 (s390_ft_exit_gpr_esa): New const.
2454 (s390_ft_exit_gpr_zarch): New const.
2455 (append_insns): New function.
2456 (s390_relocate_instruction): New function.
2457 (s390_install_fast_tracepoint_jump_pad): New function.
2458 (s390_get_min_fast_tracepoint_insn_len): New function.
2459 (s390_get_ipa_tdesc_idx): New function.
2460 (struct linux_target_ops): Wire in the above functions.
2461 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2462 * linux-s390-tdesc.h: New file.
2463
a4105d04
MK
24642016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2465
2466 * linux-s390-low.c (s390_supports_tracepoints): New function.
2467 (struct linux_target_ops): Fill supports_tracepoints hook.
2468
35ac8b3e
YQ
24692016-03-18 Yao Qi <yao.qi@linaro.org>
2470
2471 * linux-low.c (lwp_signal_can_be_delivered): New function.
2472 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2473
94610ec4
YQ
24742016-03-18 Yao Qi <yao.qi@linaro.org>
2475
2476 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2477 0 if signal is enqueued. Remove 'signal' from one debugging
2478 message. Move one debugging message to some lines below.
2479 Remove code setting 'signal' to 0.
2480
80aea927
YQ
24812016-03-18 Yao Qi <yao.qi@linaro.org>
2482
2483 * linux-low.c (linux_low_filter_event): Remove redundant
2484 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2485
b04fd3be
MK
24862016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2487
2488 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2489 (struct linux_target_ops): Wire in the above.
2490
c40c8d4b
YQ
24912016-03-03 Yao Qi <yao.qi@linaro.org>
2492
2493 * linux-low.c: Update comments to start_step_over.
2494
0f8288ae
YQ
24952016-03-03 Yao Qi <yao.qi@linaro.org>
2496
2497 PR server/19736
2498 * linux-low.c (handle_extended_wait): Set child suspended
2499 if event_lwp->bp_reinsert isn't zero.
2500
fdbd04a8
YQ
25012016-03-02 Yao Qi <yao.qi@linaro.org>
2502
2503 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2504 enqueue_pending_signal.
2505
6896a8fa
MK
25062016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2507
2508 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2509 is actually loaded.
2510
ab503087
MK
25112016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2512
2513 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2514 (s390_regmap_3264) [!__s390x__]: New global.
2515 (s390_collect_ptrace_register): Skip map entries containing -1.
2516 (s390_supply_ptrace_register): Ditto.
2517 (s390_fill_gprs_high): New function.
2518 (s390_store_gprs_high): New function.
2519 (s390_regsets): Add NT_S390_HIGH_GPRS.
2520 (s390_get_hwcap): Enable on 31-bit.
2521 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2522 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2523 Detect NT_S390_HIGH_GPRS.
2524 (s390_usrregs_info_3264): Enable on 31-bit.
2525 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2526 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2527
ae91f625
MK
25282016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2529
2530 PR gdb/13808
2531 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2532 * configure.srv: Ditto.
2533 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2534 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2535 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2536 (init_registers_amd64_linux): Remove prototype.
2537 (tdesc_amd64_linux): Remove declaration.
2538 (get_ipa_tdesc): New function.
2539 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2540 initialize remaining tdescs.
2541 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2542 (init_registers_i386_linux): Remove prototype.
2543 (tdesc_i386_linux): Remove declaration.
2544 (get_ipa_tdesc): New function.
2545 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2546 initialize remaining tdescs.
2547 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2548 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2549 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2550 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2551 (x86_get_ipa_tdesc_idx): New function.
2552 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2553 * linux-x86-tdesc.h: New file.
2554 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2555 (target_get_ipa_tdesc_idx): New macro.
2556 * tracepoint.c (ipa_tdesc_idx): New macro.
2557 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2558 (symbol_list): Add ipa_tdesc_idx.
2559 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2560 (ipa_tdesc): Remove.
2561 (ipa_tdesc_idx): New variable.
2562 (get_context_regcache): Use get_ipa_tdesc.
2563 (gdb_collect): Ditto.
2564 (gdb_probe): Ditto.
2565 * tracepoint.h (get_ipa_tdesc): New prototype.
2566 (ipa_tdesc): Remove.
2567
e7ad2f14
PA
25682016-02-24 Pedro Alves <palves@redhat.com>
2569
2570 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2571 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2572 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2573 Factor out common code between the USE_SIGTRAP_SIGINFO and
2574 !USE_SIGTRAP_SIGINFO blocks.
2575 (linux_low_filter_event): Call save_stop_reason instead of
2576 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2577 Update comments.
2578 (linux_wait_1): Update comments.
2579
657f9cde
WW
25802016-02-24 Wei-cheng Wang <cole945@gmail.com>
2581
2582 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2583 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2584 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2585 ppc_insert_point, ppc_remove_point.
2586
b00b61e1
MK
25872016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2588
2589 * linux-s390-low.c (s390_supports_z_point_type): New function.
2590 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2591
553cb527
YQ
25922016-02-16 Yao Qi <yao.qi@linaro.org>
2593
2594 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2595 PC. Get pc from regcache_read_pc.
2596
a5652c21
YQ
25972016-02-12 Yao Qi <yao.qi@linaro.org>
2598
2599 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2600 or linux_get_pc_32bit.
2601 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2602
ed443b61
YQ
26032016-02-12 Yao Qi <yao.qi@linaro.org>
2604
2605 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2606 arm_linux_get_next_pcs_fixup.
2607
020ecd38
MK
26082016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2609
2610 * tracepoint.c (x_tracepoint_action_download): Change
2611 write_inferior_data_ptr to write_inferior_data_pointer.
2612 (cmd_qtstart): Likewise.
2613 (write_inferior_data_ptr): Remove.
2614 (download_agent_expr): Change write_inferior_data_ptr to
2615 write_inferior_data_pointer.
2616 (download_tracepoint_1): Likewise.
2617 (download_tracepoint): Likewise.
2618 (download_trace_state_variables): Likewise.
2619
7cae9051
WW
26202016-02-11 Wei-cheng Wang <cole945@gmail.com>
2621 Marcin Kościelnicki <koriakin@0x04.net>
2622
2623 * tracepoint.c (struct tracepoint_action_ops): Remove.
2624 (struct tracepoint_action): Remove ops.
2625 (m_tracepoint_action_download, r_tracepoint_action_download)
2626 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2627 size and offset accordingly.
2628 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2629 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2630 (tracepoint_action_send, tracepoint_action_download): New functions.
2631 Helpers for trace action handlers.
2632 (add_tracepoint_action): Remove setup actions ops.
2633 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2634
9f6a71b4
YQ
26352016-02-10 Yao Qi <yao.qi@linaro.org>
2636
2637 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2638
1e94266c
SM
26392016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2640
2641 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2642 to AC_OUTPUT.
2643 * configure: Regenerate.
2644
8adce034
SM
26452016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2646
2647 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2648 void * to gdb_byte *.
2649 * linux-low.c (siginfo_fixup): Likewise.
2650 (linux_xfer_siginfo): Likewise.
2651 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2652 Likewise.
2653 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2654
93813b37
WT
26552016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2656
2657 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2658 to srv_tgtobj.
2659 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2660 to srv_tgtobj.
2661 * linux-x86-low.c [__x86_64__]: Include
2662 "nat/amd64-linux-siginfo.h".
2663 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2664 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2665 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2666 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2667 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2668 (cpt_si_fd, si_timerid, si_overrun): Move from
2669 nat/amd64-linux-siginfo.c.
2670 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2671
8424cc97
SM
26722016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2673
2674 * server.c (skip_to_semicolon): Remove.
2675 (process_point_options): Use strchrnul instead of
2676 skip_to_semicolon.
2677
4d18591b
YQ
26782016-01-26 Yao Qi <yao.qi@linaro.org>
2679
2680 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2681 * linux-low.c (install_software_single_step_breakpoints): Don't
2682 call regcache_read_pc.
2683 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2684 argument pc.
2685
d8020970
YQ
26862016-01-26 Yao Qi <yao.qi@linaro.org>
2687
2688 * linux-low.c (install_software_single_step_breakpoints): Call
2689 regcache_read_pc instead of get_pc.
2690
8b207339
YQ
26912016-01-26 Yao Qi <yao.qi@linaro.org>
2692
2693 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2694 (unblock_async_io): Rename to ...
2695 (block_unblock_async_io): ... it. New function.
2696 (enable_async_io): Don't install SIGIO handler. Unblock it
2697 instead.
2698 (disable_async_io): Don't ignore SIGIO. Block it instead.
2699 (initialize_async_io): Install SIGIO handler. Don't call
2700 unblock_async_io.
2701
18879fef
YQ
27022016-01-26 Yao Qi <yao.qi@linaro.org>
2703
2704 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2705 first character is '\003', call *the_target->request_interrupt.
2706
a0f8e08a
YQ
27072016-01-25 Yao Qi <yao.qi@linaro.org>
2708
2709 * remote-utils.c (new_thread_notify): Remove.
2710 (dead_thread_notify): Likewise.
2711 * remote-utils.h (new_thread_notify): Remove declaration.
2712 (dead_thread_notify): Likewise.
2713
cc5fd9ab
MK
27142016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2715
2716 * gdb.trace/pending.exp: Fix expected message on continue.
2717
99e8eb11
MK
27182016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2719
2720 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2721 it works properly on big-endian machines where sizeof (CORE_ADDR)
2722 != sizeof (void *).
2723
a994041d
PA
27242016-01-21 Pedro Alves <palves@redhat.com>
2725
2726 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2727 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2728 * configure: Regenerate.
2729
f7a6a40d
YQ
27302016-01-21 Yao Qi <yao.qi@linaro.org>
2731
2732 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2733 is_thumb and set it according to CPSR saved on the stack.
2734 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2735 arm_sigreturn_next_pc.
2736
6f69e520
YQ
27372016-01-18 Yao Qi <yao.qi@linaro.org>
2738
2739 * linux-low.c (linux_set_pc_64bit): New function.
2740 (linux_get_pc_64bit): New function.
2741 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2742 Declare.
2743 * linux-sparc-low.c (debug_threads): Remove declaration.
2744 (sparc_get_pc): Remove.
2745 (the_low_target): Use linux_get_pc_64bit instead of
2746 sparc_get_pc.
2747 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2748 (the_low_target): Use linux_get_pc_64bit and
2749 linux_set_pc_64bit.
2750
276d4552
YQ
27512016-01-18 Yao Qi <yao.qi@linaro.org>
2752
2753 * linux-arm-low.c (debug_threads): Remove declaration.
2754 (arm_get_pc, arm_set_pc): Remove.
2755 (the_low_target): Use linux_get_pc_32bit and
2756 linux_set_pc_32bit.
2757 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2758 (the_low_target): Use linux_get_pc_32bit and
2759 linux_set_pc_32bit.
2760 * linux-cris-low.c (debug_threads): Remove declaration.
2761 (cris_get_pc, cris_set_pc,): Remove.
2762 (the_low_target): Use linux_get_pc_32bit and
2763 linux_set_pc_32bit.
2764 * linux-crisv32-low.c (debug_threads): Remove declaration.
2765 (cris_get_pc, cris_set_pc): Remove.
2766 (the_low_target): Use linux_get_pc_32bit and
2767 linux_set_pc_32bit.
2768 * linux-low.c: Include inttypes.h.
2769 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2770 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2771 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2772 (the_low_target): Use linux_get_pc_32bit and
2773 linux_set_pc_32bit.
2774 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2775 (the_low_target): Use linux_get_pc_32bit and
2776 linux_set_pc_32bit.
2777 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2778 (the_low_target): Use linux_get_pc_32bit and
2779 linux_set_pc_32bit.
2780 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2781 (the_low_target): Use linux_get_pc_32bit and
2782 linux_set_pc_32bit.
2783 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2784 (the_low_target): Use linux_get_pc_32bit and
2785 linux_set_pc_32bit.
2786
eb0edac8
GB
27872016-01-18 Gary Benson <gbenson@redhat.com>
2788
2789 * configure.ac (AC_FUNC_FORK): New check.
2790 * config.in: Regenerate.
2791 * configure: Likewise.
2792
1b451dda
YQ
27932016-01-14 Yao Qi <yao.qi@linaro.org>
2794
2795 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2796 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2797 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2798 arm_get_next_pcs_ctor.
2799
82075af2
JS
28002016-01-12 Josh Stone <jistone@redhat.com>
2801 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2802
2803 * inferiors.h: Include "gdb_vecs.h".
2804 (struct process_info): Add syscalls_to_catch.
2805 * inferiors.c (remove_process): Free syscalls_to_catch.
2806 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2807 syscall_return stops.
2808 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2809 * server.c (handle_general_set): Handle QCatchSyscalls.
2810 (handle_query): Report support for QCatchSyscalls.
2811 * target.h (struct target_ops): Add supports_catch_syscall.
2812 (target_supports_catch_syscall): New macro.
2813 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2814 (struct lwp_info): Add syscall_state.
2815 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2816 Maintain syscall_state and syscalls_to_catch across exec.
2817 (get_syscall_trapinfo): New function, proxy to the_low_target.
2818 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2819 (linux_low_filter_event): Toggle syscall_state entry/return for
2820 syscall traps, and set it ignored for all others.
2821 (gdb_catching_syscalls_p): New function.
2822 (gdb_catch_this_syscall_p): New function.
2823 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2824 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2825 (linux_supports_catch_syscall): New function.
2826 (linux_target_ops): Install it.
2827 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2828 (the_low_target): Install it.
2829
8f13a3ce
MF
28302016-01-12 Mike Frysinger <vapier@gentoo.org>
2831
2832 * acinclude.m4: Include new ../warning.m4 file.
2833 * configure: Regenerated.
2834 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2835
5b3da067
MF
28362016-01-12 Mike Frysinger <vapier@gentoo.org>
2837
2838 * ax.c (is_goto_target): Mark static.
2839 * linux-low.c (register_addr): Likewise.
2840 (linux_fetch_registers, linux_store_registers): Likewise.
2841 * mem-break.c (any_persistent_commands): Fix old prototype.
2842 (add_commands_to_breakpoint): Mark static.
2843 * regcache.c (find_register_by_name): Delete unused func.
2844 * remote-utils.c (hex_or_minus_one): Mark static.
2845 * server.c (monitor_show_help): Mark static.
2846 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2847 handle_v_requests): Likewise.
2848
bc504a31
PA
28492016-01-12 Pedro Alves <palves@redhat.com>
2850
2851 Remove use of the registered trademark symbol throughout.
2852
5a0dd67a
YQ
28532016-01-08 Yao Qi <yao.qi@linaro.org>
2854
2855 * remote-utils.c (getpkt): If c is '\003', call target hook
2856 request_interrupt.
2857
b2ca446f
YQ
28582016-01-06 Yao Qi <yao.qi@linaro.org>
2859
2860 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2861 linux-aarch32-low.c.
2862 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2863 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2864 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2865 (thumb2_breakpoint): Declare.
2866 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2867 linux-aarch32-low.h.
2868 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2869 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2870 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2871
edd88788
JB
28722016-01-01 Joel Brobecker <brobecker@adacore.com>
2873
2874 * gdbreplay.c (gdbreplay_version): Change copyright year in
2875 version message.
2876 * server.c (gdbserver_version): Likewise.
2877
65da7f14
PP
28782015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2879
2880 * server.c (crc32_table): Delete.
2881 (crc32): Use libiberty's xcrc32 function.
2882
4abd5ed2
JB
28832015-12-22 Joel Brobecker <brobecker@adacore.com>
2884
2885 * lynx-low.c (lynx_delete_thread_callback): New function.
2886 (lynx_mourn): Properly delete our process and all of its
2887 threads. Remove call to clear_inferiors.
2888
0e50fe5c
JB
28892015-12-22 Joel Brobecker <brobecker@adacore.com>
2890
2891 * target.c (thread_search_callback): Add check that
2892 the thread_stopped target callback is not NULL before
2893 calling it.
2894
35adc03f
YQ
28952015-12-21 Yao Qi <yao.qi@linaro.org>
2896
2897 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2898 arm breakpoint.
2899
bd2b2909
AT
29002015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2901
2902 * server.c (handle_query): Call target_supports_software_single_step.
2903
7fe5e27e
AT
29042015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2905
2906 * linux-low.c (single_step): New function.
2907 (linux_resume_one_lwp_throw): Call single_step.
2908 (start_step_over): Likewise.
2909
d9311bfa
AT
29102015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2911
2912 * Makefile.in (SFILES): Append arch/arm-linux.c,
2913 arch/arm-get-next-pcs.c.
2914 (arm-linux.o): New rule.
2915 (arm-get-next-pcs.o): New rule.
2916 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2917 arm-linux.o.
2918 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2919 to linux-aarch32-low.c.
2920 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2921 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2922 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2923 (thumb2_breakpoint_len): Likewise.
2924 (arm_is_thumb_mode): Make non-static.
2925 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2926 from linux-aarch32-low.c.
2927 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2928 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2929 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2930 (thumb2_breakpoint_len): Likewise.
2931 (arm_is_thumb_mode): New declaration.
2932 * linux-arm-low.c: Include arch/arm-linux.h
2933 aarch/arm-get-next-pcs.h, sys/syscall.h.
2934 (get_next_pcs_ops): New struct.
2935 (get_next_pcs_addr_bits_remove): New function.
2936 (get_next_pcs_is_thumb): New function.
2937 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2938 (arm_sigreturn_next_pc): Likewise.
2939 (get_next_pcs_syscall_next_pc): Likewise.
2940 (arm_gdbserver_get_next_pcs): Likewise.
2941 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2942 Initialize.
2943 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2944 * server.h: Include gdb_vecs.h.
2945
68ce2059
AT
29462015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2947
2948 * Makefile.in (SFILES): Append common/common-regcache.c.
2949 (OBS): Append common-regcache.o.
2950 (common-regcache.o): New rule.
2951 * regcache.c (init_register_cache): Initialize cache to
2952 REG_UNAVAILABLE.
2953 (regcache_raw_read_unsigned): New function.
2954 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2955 register_status enum.
2956
fa5308bd
AT
29572015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2958
2959 * linux-aarch64-low.c (the_low_targets): Rename
2960 breakpoint_reinsert_addr to get_next_pcs.
2961 * linux-arm-low.c (the_low_targets): Likewise.
2962 * linux-bfin-low.c (the_low_targets): Likewise.
2963 * linux-cris-low.c (the_low_targets): Likewise.
2964 * linux-crisv32-low.c (the_low_targets): Likewise.
2965 * linux-low.c (can_software_single_step): Likewise.
2966 (install_software_single_step_breakpoints): New function.
2967 (start_step_over): Use install_software_single_step_breakpoints.
2968 * linux-low.h: New CORE_ADDR vector.
2969 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2970 get_next_pcs.
2971 * linux-mips-low.c (the_low_targets): Likewise.
2972 * linux-nios2-low.c (the_low_targets): Likewise.
2973 * linux-sparc-low.c (the_low_targets): Likewise.
2974
4a6ed09b
PA
29752015-12-17 Pedro Alves <palves@redhat.com>
2976
2977 * linux-low.c (linux_kill_one_lwp): Remove references to
2978 LinuxThreads.
2979 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2980 to 'kill'.
2981 (linux_init_signals): Delete.
2982 (initialize_low): Adjust.
2983 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2984
7544db95
PA
29852015-12-16 Pedro Alves <palves@redhat.com>
2986
2987 * configure.ac (compiler warning flags): When testing a
2988 -Wno-foo option, check whether -Wfoo works instead.
2989 * configure: Regenerate.
2990
8020350c
DB
29912015-12-11 Don Breazeal <donb@codesourcery.com>
2992
2993 * server.c (process_serial_event): Don't exit from gdbserver
2994 in remote mode if there are still active inferiors.
2995
db91f502
YQ
29962015-12-11 Yao Qi <yao.qi@linaro.org>
2997
2998 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2999 arm_breakpoint_at if the process is 32-bit.
3000
b37a6290
YQ
30012015-12-11 Yao Qi <yao.qi@linaro.org>
3002
3003 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3004 arm breakpoint.
3005
17b1509a
YQ
30062015-12-07 Yao Qi <yao.qi@linaro.org>
3007
3008 * configure.srv: Append arm.o to srv_tgtobj for
3009 aarch64*-*-linux* target.
3010 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3011 from linux-arm-low.c.
3012 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3013 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3014 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3015 (thumb2_breakpoint_len): Likewise.
3016 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3017 (arm_breakpoint_kinds): Likewise.
3018 (arm_breakpoint_kind_from_pc): Likewise.
3019 (arm_sw_breakpoint_from_kind): Likewise.
3020 (arm_breakpoint_kind_from_current_state): Likewise.
3021 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3022 (arm_sw_breakpoint_from_kind): Declare.
3023 (arm_breakpoint_kind_from_current_state): Declare.
3024 (arm_breakpoint_at): Declare.
3025 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3026 arm_sw_breakpoint_from_kind if process is 32-bit.
3027 (aarch64_breakpoint_kind_from_pc): New function.
3028 (aarch64_breakpoint_kind_from_current_state): New function.
3029 (the_low_target): Initialize fields breakpoint_kind_from_pc
3030 and breakpoint_kind_from_current_state.
3031 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3032 linux-aarch32-low.c.
3033 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3034 (arm_breakpoint, arm_breakpoint_len): Likewise.
3035 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3036 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3037 (arm_is_thumb_mode): Likewise.
3038 (arm_breakpoint_at): Likewise.
3039 (arm_breakpoint_kind_from_pc): Likewise.
3040 (arm_sw_breakpoint_from_kind): Likewise.
3041 (arm_breakpoint_kind_from_current_state): Likewise.
3042
3043 Revert:
3044 2015-08-04 Yao Qi <yao.qi@linaro.org>
3045
3046 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3047 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3048 * server.c (extended_protocol): Remove "static".
3049 * server.h (extended_protocol): Declare it.
3050
ece66d65
JS
30512015-12-04 Josh Stone <jistone@redhat.com>
3052
3053 * target.h (struct target_ops) <arch_setup>: Rename to ...
3054 (struct target_ops) <post_create_inferior>: ... this.
3055 (target_arch_setup): Rename to ...
3056 (target_post_create_inferior): ... this, calling post_create_inferior.
3057 * server.c (start_inferior): Update target_arch_setup calls to
3058 target_post_create_inferior.
3059 * linux-low.c (linux_low_ptrace_options): Forward declare.
3060 (linux_arch_setup): Update its comment for general use.
3061 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3062 (struct linux_target_ops): Use linux_post_create_inferior.
3063 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3064 to post_create_inferior.
3065 * nto-low.c (struct nto_target_ops): Likewise.
3066 * spu-low.c (struct spu_target_ops): Likewise.
3067 * win32-low.c (struct win32_target_ops): Likewise.
3068
e58c48b4
AT
30692015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3070
3071 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3072
fbec8956
AT
30732015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3074
3075 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3076 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3077 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3078 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3079 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3080 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3081 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3082 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3083 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3084 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3085 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3086 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3087
9b4c5f87
AT
30882015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3089
3090 * linux-low.c (linux_look_up_symbols): Don't call
3091 linux_supports_traceclone.
3092 * linux-low.h (thread_db_init): Remove use_events argument.
3093 * thread-db.c (thread_db_use_event): Remove global variable.
3094 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3095 (struct thread_db) <td_create_bp>: Remove field.
3096 (thread_db_create_event): Remove function.
3097 (thread_db_enable_reporting): Likewise.
3098 (find_one_thread): Don't check for thread_db_use_events.
3099 (attach_thread): Likewise.
3100 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3101 (try_thread_db_load_1): Don't check for thread_db_use_events.
3102 (thread_db_init): Remove use_events argument and thread events
3103 handling.
3104 (remove_thread_event_breakpoints): Remove function.
3105 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3106
7d00775e
AT
31072015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3108
3109 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3110 New function.
3111 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3112 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3113 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3114 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3115 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3116 Initialize.
3117 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3118 New function.
3119 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3120 * linux-low.c (can_hardware_single_step): Use
3121 supports_hardware_single_step.
3122 (can_software_single_step): New function.
3123 (start_step_over): Call can_software_single_step.
3124 (linux_supports_hardware_single_step): New function.
3125 (struct target_ops) <supports_software_single_step>: Initialize.
3126 * linux-low.h (struct linux_target_ops)
3127 <supports_hardware_single_step>: Initialize.
3128 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3129 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3130 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3131 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3132 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3133 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3134 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3135 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3136 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3137 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3138 Initialize.
3139 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3140 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3141 Initialize.
3142 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3143 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3144 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3145 New function.
3146 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3147 * target.h (struct target_ops): <supports_software_single_step>:
3148 New field.
3149 (target_supports_software_single_step): New macro.
3150
2d97cd35
AT
31512015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3152
3153 * linux-low.c (linux_wait_1): Fix pc advance condition.
3154 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3155 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3156
769ef81f
AT
31572015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3158
3159 * linux-arm-low.c (arm_is_thumb_mode): New function.
3160 (arm_breakpoint_at): Use arm_is_thumb_mode.
3161 (arm_breakpoint_kind_from_current_state): New function.
3162 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3163 Initialize.
3164 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3165 (linux_breakpoint_kind_from_current_state): New function.
3166 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3167 * linux-low.h (struct linux_target_ops)
3168 <breakpoint_kind_from_current_state>: New field.
3169 * target.h (struct target_ops): Likewise.
3170 (target_breakpoint_kind_from_current_state): New macro.
3171
1bebeeca
PA
31722015-11-30 Pedro Alves <palves@redhat.com>
3173
3174 * linux-low.c (linux_resume): Wake up the event loop before
3175 returning.
3176
a67a9fae
PA
31772015-11-30 Pedro Alves <palves@redhat.com>
3178
3179 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3180 check.
3181 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3182 to -1.
3183 * target.c (struct thread_search): New structure.
3184 (thread_search_callback): New function.
3185 (prev_general_thread): New global.
3186 (prepare_to_access_memory, done_accessing_memory): New functions.
3187 * target.h (prepare_to_access_memory, done_accessing_memory):
3188 Replace macros with function declarations.
3189
f2faf941
PA
31902015-11-30 Pedro Alves <palves@redhat.com>
3191
3192 PR 14618
3193 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3194 report TARGET_WAITKIND_NO_RESUMED.
3195 * remote-utils.c (prepare_resume_reply): Handle
3196 TARGET_WAITKIND_NO_RESUMED.
3197 * server.c (report_no_resumed): New global.
3198 (handle_query) <qSupported>: Handle "no-resumed+". Report
3199 "no-resumed+" support.
3200 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3201 return error if the client doesn't support no-resumed events.
3202 (push_stop_notification): New function.
3203 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3204 events if the client supports them.
3205
a681f9c9
PA
32062015-11-30 Pedro Alves <palves@redhat.com>
3207
3208 * linux-low.c (thread_still_has_status_pending_p): Don't check
3209 vCont;t here.
3210 (lwp_resumed): New function.
3211 (status_pending_p_callback): Return early if the LWP is not
3212 supposed to be resumed.
3213
65706a29
PA
32142015-11-30 Pedro Alves <palves@redhat.com>
3215
3216 * linux-low.c (handle_extended_wait): Assert that the LWP's
3217 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3218 thread create events, leave the new child's status pending.
3219 (linux_low_filter_event): If GDB wants to hear about thread exit
3220 events, leave the LWP marked dead and don't delete it.
3221 (linux_wait_for_event_filtered): Don't check for thread exit.
3222 (filter_exit_event): New function.
3223 (linux_wait_1): Use it, when returning an exit event.
3224 (linux_resume_one_lwp_throw): Assert that the LWP's
3225 waitstatus is TARGET_WAITKIND_IGNORE.
3226 * remote-utils.c (prepare_resume_reply): Handle
3227 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3228 * server.c (report_thread_events): New global.
3229 (handle_general_set): Handle QThreadEvents.
3230 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3231 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3232 TARGET_WAITKIND_THREAD_EXITED.
3233 * server.h (report_thread_events): Declare.
3234
56cf4bed
PA
32352015-11-30 Pedro Alves <palves@redhat.com>
3236
3237 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3238 the thread's last_resume_kind was resume_stop.
3239
500c1d85
PA
32402015-11-30 Pedro Alves <palves@redhat.com>
3241
3242 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3243 before returning.
3244
de979965
PA
32452015-11-30 Pedro Alves <palves@redhat.com>
3246
3247 * server.c (handle_v_requests): Handle vCtrlC.
3248
34c65914
PA
32492015-11-30 Pedro Alves <palves@redhat.com>
3250
3251 * gdbthread.h (find_any_thread_of_pid): Declare.
3252 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3253 functions.
3254 * server.c (handle_query): If current_thread is NULL, look for
3255 another thread of the selected process.
3256
79efa585 32572015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3258 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3259
3260 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3261 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3262 name in reply.
3263 * target.h (struct target_ops) <thread_name>: New field.
3264 (target_thread_name): New macro.
3265
80d82c19
JB
32662015-11-23 Joel Brobecker <brobecker@adacore.com>
3267
3268 * regcache.h (regcache_invalidate_pid): Add declaration.
3269 * regcache.c (regcache_invalidate_pid): New function, extracted
3270 from regcache_invalidate.
3271 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3272 Add trivial documentation comment.
3273 * lynx-low.c: Use regcache_invalidate_pid instead of
3274 regcache_invalidate.
3275
64da5dd5
JB
32762015-11-23 Joel Brobecker <brobecker@adacore.com>
3277
3278 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3279 and Elf64_auxv_t if the target is Android.
3280
37ce4055
DE
32812015-11-22 Doug Evans <xdje42@gmail.com>
3282
3283 * target.h: #include <sys/types.h>.
3284
06e03fff
PA
32852015-11-19 Pedro Alves <palves@redhat.com>
3286
3287 * linux-low.c (linux_process_qsupported): Change prototype.
3288 Adjust.
3289 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3290 Change prototype.
3291 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3292 and adjust to loop over all features.
3293 * server.c (handle_query) <qSupported>: Adjust to call
3294 target_process_qsupported once, passing it a vector of unprocessed
3295 features.
3296 * target.h (struct target_ops) <process_qsupported>: Change
3297 prototype.
3298 (target_process_qsupported): Adjust.
3299
9a084706
PA
33002015-11-19 Pedro Alves <palves@redhat.com>
3301
3302 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3303 mode.
3304 * configure: Regenerate.
3305
dad44a1f
PA
33062015-11-19 Pedro Alves <palves@redhat.com>
3307
3308 * configure: Regenerate.
3309
231c0592
YQ
33102015-11-19 Yao Qi <yao.qi@linaro.org>
3311
3312 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3313 type to uint32_t.
3314
6c1c9a8b
YQ
33152015-11-19 Yao Qi <yao.qi@linaro.org>
3316
3317 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3318 (struct aarch64_operand): Move enum out.
3319
9caa3311
YQ
33202015-11-19 Yao Qi <yao.qi@linaro.org>
3321
3322 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3323 struct user_fpsimd_state *.
3324 (aarch64_store_fpregset): Likewise.
3325
6a69a054
YQ
33262015-11-19 Yao Qi <yao.qi@linaro.org>
3327
3328 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3329 struct user_pt_regs *.
3330 (aarch64_store_gregset): Likewise.
3331
1798301e
PA
33322015-11-18 Pedro Alves <palves@redhat.com>
3333
3334 * Makefile.in (all_object_files): Add $IPA_OBJS.
3335
ce7715e2
PA
33362015-11-17 Pedro Alves <palves@redhat.com>
3337
3338 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3339 GDB_SIGNAL_0 and gdb_signal_to_string.
3340
c0879059
PA
33412015-11-17 Pedro Alves <palves@redhat.com>
3342
3343 * win32-low.c (handle_output_debug_string): Remove parameter.
3344 (win32_kill): Remove our_status local and adjust call to
3345 handle_output_debug_string.
3346 (get_child_debug_event): Adjust call to
3347 handle_output_debug_string.
3348
1996e237
SM
33492015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3350
3351 * linux-mips-low.c (mips_fill_gregset): Add cast.
3352 (mips_store_gregset): Likewise.
3353 (mips_fill_fpregset): Likewise.
3354 (mips_store_fpregset): Likewise.
3355
cbec665b
SM
33562015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3357
3358 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3359 priv.
3360
eb3e3c67
SM
33612015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3362
3363 * linux-mips-low.c (mips_linux_new_thread): Change type of
3364 watch_type to enum target_hw_bp_type.
3365
171de4b8
SM
33662015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3367
3368 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3369 Change return type to arm_hwbp_type.
3370
04248ead
SM
33712015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3372
3373 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3374 (arm_store_gregset): Likewise.
3375 * linux-arm-low.c (arm_get_hwcap): Likewise.
3376 (arm_read_description): Likewise.
3377
04b3479c
SM
33782015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3379
3380 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3381
2bc84e8a
SM
33822015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3383
3384 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3385 (ppc_fill_vsxregset): Likewise.
3386 (ppc_store_vsxregset): Likewise.
3387 (ppc_fill_vrregset): Likewise.
3388 (ppc_store_vrregset): Likewise.
3389 (ppc_fill_evrregset): Likewise.
3390 (ppc_store_evrregset): Likewise.
3391
e6c5bb05
SM
33922015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3393
3394 * linux-ppc-low.c (ppc_usrregs_info): Remove
3395 forward-declaration.
3396 (ppc_arch_setup): Move lower in file.
3397
7ea45d72
SM
33982015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3399
3400 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3401 (ps_pdwrite): Likewise.
3402
69291610
HW
34032015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3404
3405 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3406 to after assert checks.
3407
b42945fd
SM
34082015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3409
3410 * proc-service.c (ps_pdread): Add/adjust casts.
3411 (ps_pdwrite): Add/adjust casts.
3412
d6f85c84
SM
34132015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3414
3415 * server.c (handle_search_memory_1): Cast return value of
3416 memmem.
3417
f98cd059
SM
34182015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3419
3420 * server.c (write_qxfer_response): Change type of data to
3421 gdb_byte *.
3422
d2412fa5
PA
34232015-10-29 Pedro Alves <palves@redhat.com>
3424
3425 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3426
c17414a2
PA
34272015-10-29 Pedro Alves <palves@redhat.com>
3428
3429 * tracepoint.c (clear_installed_tracepoints): Add casts.
3430
e053fbc4
PA
34312015-10-29 Pedro Alves <palves@redhat.com>
3432
3433 * server.c (handle_v_cont, process_serial_event): Add enum
3434 gdb_signal casts to signal parsing code.
3435
add67df8
PA
34362015-10-29 Pedro Alves <palves@redhat.com>
3437
3438 * linux-low.h (NULL_REGSET): Define.
3439 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3440 * linux-arm-low.c (arm_regsets): Likewise.
3441 * linux-crisv32-low.c (cris_regsets): Likewise.
3442 * linux-m68k-low.c (m68k_regsets): Likewise.
3443 * linux-mips-low.c (mips_regsets): Likewise.
3444 * linux-nios2-low.c (nios2_regsets): Likewise.
3445 * linux-ppc-low.c (ppc_regsets): Likewise.
3446 * linux-s390-low.c (s390_regsets): Likewise.
3447 * linux-sh-low.c (sh_regsets): Likewise.
3448 * linux-sparc-low.c (sparc_regsets): Likewise.
3449 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3450 * linux-tile-low.c (tile_regsets): Likewise.
3451 * linux-x86-low.c (x86_regsets): Likewise.
3452 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3453
50bc912a
PA
34542015-10-29 Pedro Alves <palves@redhat.com>
3455
3456 * linux-low.h (NULL_REGSET): Define.
3457 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3458 * linux-arm-low.c (arm_regsets): Likewise.
3459 * linux-crisv32-low.c (cris_regsets): Likewise.
3460 * linux-m68k-low.c (m68k_regsets): Likewise.
3461 * linux-mips-low.c (mips_regsets): Likewise.
3462 * linux-nios2-low.c (nios2_regsets): Likewise.
3463 * linux-ppc-low.c (ppc_regsets): Likewise.
3464 * linux-s390-low.c (s390_regsets): Likewise.
3465 * linux-sh-low.c (sh_regsets): Likewise.
3466 * linux-sparc-low.c (sparc_regsets): Likewise.
3467 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3468 * linux-tile-low.c (tile_regsets): Likewise.
3469 * linux-x86-low.c (x86_regsets): Likewise.
3470 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3471
682b2546
DE
34722015-10-26 Doug Evans <dje@google.com>
3473
3474 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3475
963843d4
DE
34762015-10-26 Doug Evans <dje@google.com>
3477
3478 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3479
d41401ac
DE
34802015-10-26 Doug Evans <dje@google.com>
3481
3482 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3483 for debug_printf.
3484 (attach_thread, find_new_threads_callback): Ditto.
3485
3db28855
AT
34862015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3487
3488 * mem-break.h (set_breakpoint_data): Remove.
3489
fb78e89c
AT
34902015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3491
3492 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3493 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3494 (initialize_low): Remove set_breakpoint_data call.
3495 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3496 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3497 (initialize_low): Remove set_breakpoint_data call.
3498 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3499 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3500 (initialize_low): Remove set_breakpoint_data call.
3501
2e6ee069
AT
35022015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3503
3504 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3505 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3506 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3507 * target.h (target_breakpoint_kind_from_pc): New macro.
3508
1652a986
AT
35092015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3510
3511 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3512 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3513 the default breakpoint kind.
3514
abeead09
AT
35152015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3516
3517 * linux-arm-low.c (arm_supports_z_point_type): Add software
3518 breakpoint support.
3519
b0b4b501
AT
35202015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3521
3522 * linux-arm-low.c: Refactor breakpoint definitions.
3523 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3524 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3525
8689682c
AT
35262015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3527
3528 * Makefile.in: Add arm.c/o.
3529 * configure.srv: Likewise.
3530 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3531 (arm_breakpoint_kind_from_pc): New function.
3532 (arm_sw_breakpoint_from_kind): Return proper kind.
3533 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3534
27165294
AT
35352015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3536
3537 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3538 removal.
3539 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3540 (struct raw_breakpoint) <size>: Remove.
3541 (struct raw_breakpoint) <kind>: Add.
3542 (bp_size): New function.
3543 (bp_opcode): Likewise.
3544 (find_raw_breakpoint_at): Adjust for kind.
3545 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3546 (remove_memory_breakpoint): Adjust for kind call bp_size.
3547 (set_raw_breakpoint_at): Adjust for kind.
3548 (set_breakpoint): Likewise.
3549 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3550 (delete_raw_breakpoint): Adjust for kind.
3551 (delete_breakpoint): Likewise.
3552 (find_gdb_breakpoint): Likewise.
3553 (set_gdb_breakpoint_1): Likewise.
3554 (set_gdb_breakpoint): Likewise.
3555 (delete_gdb_breakpoint_1): Likewise.
3556 (delete_gdb_breakpoint): Likewise.
3557 (uninsert_raw_breakpoint): Likewise.
3558 (reinsert_raw_breakpoint): Likewise.
3559 (set_breakpoint_data): Remove.
3560 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3561 (check_mem_read): Adjust for kind call bp_size.
3562 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3563 (clone_one_breakpoint): Adjust for kind.
3564 * mem-break.h (set_gdb_breakpoint): Likewise.
3565 (delete_gdb_breakpoint): Likewise.
3566 * server.c (process_serial_event): Likewise.
3567
dd373349
AT
35682015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3569
3570 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3571 (struct linux_target_ops) <breakpoint>: Remove.
3572 (struct linux_target_ops) <breakpoint_len>: Remove.
3573 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3574 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3575 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3576 (arm_sw_breakpoint_from_kind): New function.
3577 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3578 (struct linux_target_ops) <breakpoint>: Remove.
3579 (struct linux_target_ops) <breakpoint_len>: Remove.
3580 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3581 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3582 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3583 (struct linux_target_ops) <breakpoint>: Remove.
3584 (struct linux_target_ops) <breakpoint_len>: Remove.
3585 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3586 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3587 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3588 (struct linux_target_ops) <breakpoint>: Remove.
3589 (struct linux_target_ops) <breakpoint_len>: Remove.
3590 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3591 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3592 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3593 and sw_breakpoint_from_kind to increment the pc.
3594 (linux_breakpoint_kind_from_pc): New function.
3595 (linux_sw_breakpoint_from_kind): New function.
3596 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3597 (initialize_low): Call breakpoint_kind_from_pc and
3598 sw_breakpoint_from_kind to replace breakpoint_data/len.
3599 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3600 New field.
3601 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3602 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3603 (struct linux_target_ops) <breakpoint>: Remove.
3604 (struct linux_target_ops) <breakpoint_len>: Remove.
3605 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3606 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3607 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3608 (struct linux_target_ops) <breakpoint>: Remove.
3609 (struct linux_target_ops) <breakpoint_len>: Remove.
3610 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3611 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3612 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3613 (struct linux_target_ops) <breakpoint>: Remove.
3614 (struct linux_target_ops) <breakpoint_len>: Remove.
3615 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3616 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3617 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3618 (struct linux_target_ops) <breakpoint>: Remove.
3619 (struct linux_target_ops) <breakpoint_len>: Remove.
3620 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3621 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3622 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3623 (struct linux_target_ops) <breakpoint>: Remove.
3624 (struct linux_target_ops) <breakpoint_len>: Remove.
3625 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3626 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3627 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3628 (struct linux_target_ops) <breakpoint>: Remove.
3629 (struct linux_target_ops) <breakpoint_len>: Remove.
3630 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3631 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3632 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3633 (struct linux_target_ops) <breakpoint>: Remove.
3634 (struct linux_target_ops) <breakpoint_len>: Remove.
3635 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3636 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3637 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3638 (struct linux_target_ops) <breakpoint>: Remove.
3639 (struct linux_target_ops) <breakpoint_len>: Remove.
3640 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3641 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3642 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3643 (struct linux_target_ops) <breakpoint>: Remove.
3644 (struct linux_target_ops) <breakpoint_len>: Remove.
3645 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3646 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3647 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3648 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3649 (struct linux_target_ops) <breakpoint>: Remove.
3650 (struct linux_target_ops) <breakpoint_len>: Remove.
3651 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3652 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3653 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3654 (struct linux_target_ops) <breakpoint>: Remove.
3655 (struct linux_target_ops) <breakpoint_len>: Remove.
3656 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3657 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3658
4cd98a19
AT
36592015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3660
3661 * linux-cris-low.c (cris_get_pc): Remove void arg.
3662
774ee6d2
AR
36632015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3664
3665 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3666 variable name.
3667
833dcd29
AR
36682015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3669
3670 * inferiors.c (thread_pid_matches_callback): New function.
3671 (find_thread_process): New function.
3672 (remove_thread): Reset current_thread.
3673 (remove_process): Assert threads have been removed first.
3674
8d689ee5
YQ
36752015-10-15 Yao Qi <yao.qi@linaro.org>
3676
3677 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3678 if it is 3.
3679 (aarch64_remove_point): Likewise.
3680 * regcache.c (regcache_register_size): New function.
3681
1c2e1515
YQ
36822015-10-12 Yao Qi <yao.qi@linaro.org>
3683
3684 * linux-aarch64-low.c: Update all callers as emit_load_store
3685 is renamed to aarch64_emit_load_store.
3686
e1c587c3
YQ
36872015-10-12 Yao Qi <yao.qi@linaro.org>
3688
3689 * linux-aarch64-low.c: Update all callers of function renaming
3690 from emit_insn to aarch64_emit_insn.
3691
b6542f81
YQ
36922015-10-12 Yao Qi <yao.qi@linaro.org>
3693
3694 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3695 arch/aarch64-insn.h.
3696 (struct aarch64_memory_operand): Likewise.
3697 (ENCODE): Likewise.
3698 (emit_insn): Move to arch/aarch64-insn.c.
3699 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3700 (emit_load_store): Move to arch/aarch64-insn.c.
3701 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3702 (can_encode_int32): Remove.
3703
246994ce
YQ
37042015-10-12 Yao Qi <yao.qi@linaro.org>
3705
3706 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3707 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3708 (aarch64_relocate_instruction): Likewise.
3709 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3710 (struct aarch64_insn_visitor): Likewise.
3711
0badd99f
YQ
37122015-10-12 Yao Qi <yao.qi@linaro.org>
3713
3714 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3715 (struct aarch64_insn_visitor): New.
3716 (struct aarch64_insn_relocation_data): New.
3717 (aarch64_ftrace_insn_reloc_b): New function.
3718 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3719 (aarch64_ftrace_insn_reloc_cb): Likewise.
3720 (aarch64_ftrace_insn_reloc_tb): Likewise.
3721 (aarch64_ftrace_insn_reloc_adr): Likewise.
3722 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3723 (aarch64_ftrace_insn_reloc_others): Likewise.
3724 (visitor): New.
3725 (aarch64_relocate_instruction): Use visitor.
3726
dfaffe9d
YQ
37272015-10-12 Yao Qi <yao.qi@linaro.org>
3728
3729 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3730 int. Add argument buf.
3731 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3732 aarch64_relocate_instruction.
3733
70b439f0
YQ
37342015-10-12 Yao Qi <yao.qi@linaro.org>
3735
3736 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3737 argument insn. Remove local variable insn. Don't call
3738 target_read_uint32.
3739 (aarch64_install_fast_tracepoint_jump_pad): Call
3740 target_read_uint32.
3741
7781c06f
YQ
37422015-09-30 Yao Qi <yao.qi@linaro.org>
3743
3744 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3745 (emit_load_store_pair): Likewise.
3746
9a3c8263
SM
37472015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3748
3749 * dll.c (match_dll): Add cast(s).
3750 (unloaded_dll): Likewise.
3751 * linux-low.c (second_thread_of_pid_p): Likewise.
3752 (delete_lwp_callback): Likewise.
3753 (count_events_callback): Likewise.
3754 (select_event_lwp_callback): Likewise.
3755 (linux_set_resume_request): Likewise.
3756 * server.c (accumulate_file_name_length): Likewise.
3757 (emit_dll_description): Likewise.
3758 (handle_qxfer_threads_worker): Likewise.
3759 (visit_actioned_threads): Likewise.
3760 * thread-db.c (any_thread_of): Likewise.
3761 * tracepoint.c (same_process_p): Likewise.
3762 (match_blocktype): Likewise.
3763 (build_traceframe_info_xml): Likewise.
3764
224c3ddb
SM
37652015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3766
3767 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3768 assignment.
3769 (gdb_unparse_agent_expr): Likewise.
3770 * hostio.c (require_data): Likewise.
3771 (handle_pread): Likewise.
3772 * linux-low.c (disable_regset): Likewise.
3773 (fetch_register): Likewise.
3774 (store_register): Likewise.
3775 (get_dynamic): Likewise.
3776 (linux_qxfer_libraries_svr4): Likewise.
3777 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3778 (set_fast_tracepoint_jump): Likewise.
3779 (uninsert_fast_tracepoint_jumps_at): Likewise.
3780 (reinsert_fast_tracepoint_jumps_at): Likewise.
3781 (validate_inserted_breakpoint): Likewise.
3782 (clone_agent_expr): Likewise.
3783 * regcache.c (init_register_cache): Likewise.
3784 * remote-utils.c (putpkt_binary_1): Likewise.
3785 (decode_M_packet): Likewise.
3786 (decode_X_packet): Likewise.
3787 (look_up_one_symbol): Likewise.
3788 (relocate_instruction): Likewise.
3789 (monitor_output): Likewise.
3790 * server.c (handle_search_memory): Likewise.
3791 (handle_qxfer_exec_file): Likewise.
3792 (handle_qxfer_libraries): Likewise.
3793 (handle_qxfer): Likewise.
3794 (handle_query): Likewise.
3795 (handle_v_cont): Likewise.
3796 (handle_v_run): Likewise.
3797 (captured_main): Likewise.
3798 * target.c (write_inferior_memory): Likewise.
3799 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3800 * tracepoint.c (init_trace_buffer): Likewise.
3801 (add_tracepoint_action): Likewise.
3802 (add_traceframe): Likewise.
3803 (add_traceframe_block): Likewise.
3804 (cmd_qtdpsrc): Likewise.
3805 (cmd_qtdv): Likewise.
3806 (cmd_qtstatus): Likewise.
3807 (response_source): Likewise.
3808 (response_tsv): Likewise.
3809 (cmd_qtnotes): Likewise.
3810 (gdb_collect): Likewise.
3811 (initialize_tracepoint): Likewise.
3812
afbe19f8
PL
38132015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3814
3815 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3816 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3817 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3818 <NOP>: New.
3819 (enum aarch64_condition_codes): New enum.
3820 (w0): New static global.
3821 (fp): Likewise.
3822 (lr): Likewise.
3823 (struct aarch64_memory_operand) <type>: New
3824 MEMORY_OPERAND_POSTINDEX type.
3825 (postindex_memory_operand): New helper function.
3826 (emit_ret): New function.
3827 (emit_load_store_pair): New function, factored out of emit_stp
3828 with support for MEMORY_OPERAND_POSTINDEX.
3829 (emit_stp): Rewrite using emit_load_store_pair.
3830 (emit_ldp): New function.
3831 (emit_load_store): Likewise.
3832 (emit_ldr): Mention post-index instruction in comment.
3833 (emit_ldrh): New function.
3834 (emit_ldrb): New function.
3835 (emit_ldrsw): Mention post-index instruction in comment.
3836 (emit_str): Likewise.
3837 (emit_subs): New function.
3838 (emit_cmp): Likewise.
3839 (emit_and): Likewise.
3840 (emit_orr): Likewise.
3841 (emit_orn): Likewise.
3842 (emit_eor): Likewise.
3843 (emit_mvn): Likewise.
3844 (emit_lslv): Likewise.
3845 (emit_lsrv): Likewise.
3846 (emit_asrv): Likewise.
3847 (emit_mul): Likewise.
3848 (emit_sbfm): Likewise.
3849 (emit_sbfx): Likewise.
3850 (emit_ubfm): Likewise.
3851 (emit_ubfx): Likewise.
3852 (emit_csinc): Likewise.
3853 (emit_cset): Likewise.
3854 (emit_nop): Likewise.
3855 (emit_ops_insns): New helper function.
3856 (emit_pop): Likewise.
3857 (emit_push): Likewise.
3858 (aarch64_emit_prologue): New function.
3859 (aarch64_emit_epilogue): Likewise.
3860 (aarch64_emit_add): Likewise.
3861 (aarch64_emit_sub): Likewise.
3862 (aarch64_emit_mul): Likewise.
3863 (aarch64_emit_lsh): Likewise.
3864 (aarch64_emit_rsh_signed): Likewise.
3865 (aarch64_emit_rsh_unsigned): Likewise.
3866 (aarch64_emit_ext): Likewise.
3867 (aarch64_emit_log_not): Likewise.
3868 (aarch64_emit_bit_and): Likewise.
3869 (aarch64_emit_bit_or): Likewise.
3870 (aarch64_emit_bit_xor): Likewise.
3871 (aarch64_emit_bit_not): Likewise.
3872 (aarch64_emit_equal): Likewise.
3873 (aarch64_emit_less_signed): Likewise.
3874 (aarch64_emit_less_unsigned): Likewise.
3875 (aarch64_emit_ref): Likewise.
3876 (aarch64_emit_if_goto): Likewise.
3877 (aarch64_emit_goto): Likewise.
3878 (aarch64_write_goto_address): Likewise.
3879 (aarch64_emit_const): Likewise.
3880 (aarch64_emit_call): Likewise.
3881 (aarch64_emit_reg): Likewise.
3882 (aarch64_emit_pop): Likewise.
3883 (aarch64_emit_stack_flush): Likewise.
3884 (aarch64_emit_zero_ext): Likewise.
3885 (aarch64_emit_swap): Likewise.
3886 (aarch64_emit_stack_adjust): Likewise.
3887 (aarch64_emit_int_call_1): Likewise.
3888 (aarch64_emit_void_call_2): Likewise.
3889 (aarch64_emit_eq_goto): Likewise.
3890 (aarch64_emit_ne_goto): Likewise.
3891 (aarch64_emit_lt_goto): Likewise.
3892 (aarch64_emit_le_goto): Likewise.
3893 (aarch64_emit_gt_goto): Likewise.
3894 (aarch64_emit_ge_got): Likewise.
3895 (aarch64_emit_ops_impl): New static global variable.
3896 (aarch64_emit_ops): New target function, return
3897 &aarch64_emit_ops_impl.
3898 (struct linux_target_ops): Install it.
3899
bb903df0
PL
39002015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3901
3902 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3903 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3904 aarch64-ipa.o.
3905 * linux-aarch64-ipa.c: New file.
3906 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3907 and endian.h.
3908 (aarch64_get_thread_area): New target method.
3909 (extract_signed_bitfield): New helper function.
3910 (aarch64_decode_ldr_literal): New function.
3911 (enum aarch64_opcodes): New enum.
3912 (struct aarch64_register): New struct.
3913 (struct aarch64_operand): New struct.
3914 (x0): New static global.
3915 (x1): Likewise.
3916 (x2): Likewise.
3917 (x3): Likewise.
3918 (x4): Likewise.
3919 (w2): Likewise.
3920 (ip0): Likewise.
3921 (sp): Likewise.
3922 (xzr): Likewise.
3923 (aarch64_register): New helper function.
3924 (register_operand): Likewise.
3925 (immediate_operand): Likewise.
3926 (struct aarch64_memory_operand): New struct.
3927 (offset_memory_operand): New helper function.
3928 (preindex_memory_operand): Likewise.
3929 (enum aarch64_system_control_registers): New enum.
3930 (ENCODE): New macro.
3931 (emit_insn): New helper function.
3932 (emit_b): New function.
3933 (emit_bcond): Likewise.
3934 (emit_cb): Likewise.
3935 (emit_tb): Likewise.
3936 (emit_blr): Likewise.
3937 (emit_stp): Likewise.
3938 (emit_ldp_q_offset): Likewise.
3939 (emit_stp_q_offset): Likewise.
3940 (emit_load_store): Likewise.
3941 (emit_ldr): Likewise.
3942 (emit_ldrsw): Likewise.
3943 (emit_str): Likewise.
3944 (emit_ldaxr): Likewise.
3945 (emit_stxr): Likewise.
3946 (emit_stlr): Likewise.
3947 (emit_data_processing_reg): Likewise.
3948 (emit_data_processing): Likewise.
3949 (emit_add): Likewise.
3950 (emit_sub): Likewise.
3951 (emit_mov): Likewise.
3952 (emit_movk): Likewise.
3953 (emit_mov_addr): Likewise.
3954 (emit_mrs): Likewise.
3955 (emit_msr): Likewise.
3956 (emit_sevl): Likewise.
3957 (emit_wfe): Likewise.
3958 (append_insns): Likewise.
3959 (can_encode_int32_in): New helper function.
3960 (aarch64_relocate_instruction): New function.
3961 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3962 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3963 (struct linux_target_ops): Install aarch64_get_thread_area,
3964 aarch64_install_fast_tracepoint_jump_pad and
3965 aarch64_get_min_fast_tracepoint_insn_len.
3966
787749ea
PL
39672015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3968
3969 * Makefile.in (aarch64-insn.o): New rule.
3970 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3971
9812b2e6
YQ
39722015-09-21 Yao Qi <yao.qi@linaro.org>
3973
3974 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3975
18fe412b
YQ
39762015-09-21 Yao Qi <yao.qi@linaro.org>
3977
3978 * tracepoint.c (max_jump_pad_size): Remove.
3979
a0cc84cd
YQ
39802015-09-18 Yao Qi <yao.qi@linaro.org>
3981
3982 * linux-aarch64-low.c: Don't include sys/uio.h.
3983 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3984
d78908cf
WW
39852015-09-16 Wei-cheng Wang <cole945@gmail.com>
3986
3987 * tracepoint.c (eval_result_type): Change prototype.
3988 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3989
d57e0d50
PA
39902015-09-15 Pedro Alves <palves@redhat.com>
3991
3992 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3993 Check whether to report exec events instead of checking whether
3994 multiprocess is enabled.
3995
5a676acc
PA
39962015-09-15 Pedro Alves <palves@redhat.com>
3997
3998 PR remote/18965
3999 * remote-utils.c (prepare_resume_reply): Merge
4000 TARGET_WAITKIND_VFORK_DONE switch case with the
4001 TARGET_WAITKIND_FORKED case.
4002
7c5d0fad
YQ
40032015-09-15 Yao Qi <yao.qi@linaro.org>
4004
4005 * server.c (handle_query): Check string comparison using
4006 "else if" instead of "if".
4007
750ce8d1
YQ
40082015-09-15 Yao Qi <yao.qi@linaro.org>
4009
4010 * server.c (vCont_supported): New global variable.
4011 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4012 matches. Append ";vContSupported+" to own_buf.
4013 (handle_v_requests): Append ";s;S" to own_buf if target supports
4014 hardware single step or vCont_supported is false.
4015 (capture_main): Set vCont_supported to zero.
4016
70b90b91
YQ
40172015-09-15 Yao Qi <yao.qi@linaro.org>
4018
4019 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4020 it to ...
4021 (linux_supports_hardware_single_step): ... New function.
4022 (linux_target_ops): Update.
4023 * lynx-low.c (lynx_target_ops): Set field
4024 supports_hardware_single_step to target_can_do_hardware_single_step.
4025 * nto-low.c (nto_target_ops): Likewise.
4026 * spu-low.c (spu_target_ops): Likewise.
4027 * win32-low.c (win32_target_ops): Likewise.
4028 * target.c (target_can_do_hardware_single_step): New function.
4029 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4030 Remove. <supports_hardware_single_step>: New field.
4031 (target_supports_conditional_breakpoints): Remove.
4032 (target_supports_hardware_single_step): New macro.
4033 (target_can_do_hardware_single_step): Declare.
4034 * server.c (handle_query): Use target_supports_hardware_single_step
4035 instead of target_supports_conditional_breakpoints.
4036
ade90bde
YQ
40372015-09-15 Yao Qi <yao.qi@linaro.org>
4038
4039 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4040 function.
4041 (struct linux_target_ops the_low_target): Install
4042 aarch64_linux_siginfo_fixup.
4043
94585166
DB
40442015-09-11 Don Breazeal <donb@codesourcery.com>
4045 Luis Machado <lgustavo@codesourcery.com>
4046
4047 * linux-low.c (linux_mourn): Static declaration.
4048 (linux_arch_setup): Move in front of
4049 handle_extended_wait.
4050 (linux_arch_setup_thread): New function.
4051 (handle_extended_wait): Handle exec events. Call
4052 linux_arch_setup_thread. Make event_lwp argument a
4053 pointer-to-a-pointer.
4054 (check_zombie_leaders): Do not check stopped threads.
4055 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4056 (linux_low_filter_event): Add lwp and thread for exec'ing
4057 non-leader thread if leader thread has been deleted.
4058 Refactor code into linux_arch_setup_thread and call it.
4059 Pass child lwp pointer by reference to handle_extended_wait.
4060 (linux_wait_for_event_filtered): Update comment.
4061 (linux_wait_1): Prevent clobbering exec event status.
4062 (linux_supports_exec_events): New function.
4063 (linux_target_ops) <supports_exec_events>: Initialize new member.
4064 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4065 new member.
4066 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4067 * server.c (report_exec_events): New global variable.
4068 (handle_query): Handle qSupported query for exec-events feature.
4069 (captured_main): Initialize report_exec_events.
4070 * server.h (report_exec_events): Declare new global variable.
4071 * target.h (struct target_ops) <supports_exec_events>: New
4072 member.
4073 (target_supports_exec_events): New macro.
4074 * win32-low.c (win32_target_ops) <supports_exec_events>:
4075 Initialize new member.
4076
0568462b
MM
40772015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4078
4079 * linux-low.c (linux_low_enable_btrace): Remove.
4080 (linux_target_ops): Replace linux_low_enable_btrace with
4081 linux_enable_btrace.
4082
39edd165
YQ
40832015-09-03 Yao Qi <yao.qi@linaro.org>
4084
4085 * linux-aarch64-low.c (aarch64_insert_point): Call
4086 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4087 returns true.
4088
1db33b5a
UW
40892015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4090
4091 * linux-low.c (check_stopped_by_breakpoint): Use
4092 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4093
ab290430
PA
40942015-08-27 Pedro Alves <palves@redhat.com>
4095
4096 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4097
8d749320
SM
40982015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4099
6711b7f8
SM
4100 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4101 the XNEW-family equivalent.
8d749320
SM
4102 (compile_bytecodes): Likewise.
4103 * dll.c (loaded_dll): Likewise.
4104 * event-loop.c (append_callback_event): Likewise.
4105 (create_file_handler): Likewise.
4106 (create_file_event): Likewise.
4107 * hostio.c (handle_open): Likewise.
4108 * inferiors.c (add_thread): Likewise.
4109 (add_process): Likewise.
4110 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4111 * linux-arm-low.c (arm_new_process): Likewise.
4112 (arm_new_thread): Likewise.
4113 * linux-low.c (add_to_pid_list): Likewise.
4114 (linux_add_process): Likewise.
4115 (handle_extended_wait): Likewise.
4116 (add_lwp): Likewise.
4117 (enqueue_one_deferred_signal): Likewise.
4118 (enqueue_pending_signal): Likewise.
4119 (linux_resume_one_lwp_throw): Likewise.
4120 (linux_resume_one_thread): Likewise.
4121 (linux_read_memory): Likewise.
4122 (linux_write_memory): Likewise.
4123 * linux-mips-low.c (mips_linux_new_process): Likewise.
4124 (mips_linux_new_thread): Likewise.
4125 (mips_add_watchpoint): Likewise.
4126 * linux-x86-low.c (initialize_low_arch): Likewise.
4127 * lynx-low.c (lynx_add_process): Likewise.
4128 * mem-break.c (set_raw_breakpoint_at): Likewise.
4129 (set_breakpoint): Likewise.
4130 (add_condition_to_breakpoint): Likewise.
4131 (add_commands_to_breakpoint): Likewise.
4132 (clone_agent_expr): Likewise.
4133 (clone_one_breakpoint): Likewise.
4134 * regcache.c (new_register_cache): Likewise.
4135 * remote-utils.c (look_up_one_symbol): Likewise.
4136 * server.c (queue_stop_reply): Likewise.
4137 (start_inferior): Likewise.
4138 (queue_stop_reply_callback): Likewise.
4139 (handle_target_event): Likewise.
4140 * spu-low.c (fetch_ppc_memory): Likewise.
4141 (store_ppc_memory): Likewise.
4142 * target.c (set_target_ops): Likewise.
4143 * thread-db.c (thread_db_load_search): Likewise.
4144 (try_thread_db_load_1): Likewise.
4145 * tracepoint.c (add_tracepoint): Likewise.
4146 (add_tracepoint_action): Likewise.
4147 (create_trace_state_variable): Likewise.
4148 (cmd_qtdpsrc): Likewise.
4149 (cmd_qtro): Likewise.
4150 (add_while_stepping_state): Likewise.
4151 * win32-low.c (child_add_thread): Likewise.
4152 (get_image_name): Likewise.
4153
ed8b7b42
YQ
41542015-08-25 Yao Qi <yao.qi@linaro.org>
4155
4156 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4157
db3cb7cb
YQ
41582015-08-25 Yao Qi <yao.qi@linaro.org>
4159
4160 * Makefile.in (aarch64-linux.o): New rule.
4161 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4162 srv_tgtobj.
4163 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4164 (aarch64_init_debug_reg_state): Make it extern.
4165 (aarch64_linux_prepare_to_resume): Remove.
4166
f6011a1c
YQ
41672015-08-25 Yao Qi <yao.qi@linaro.org>
4168
4169 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4170 lwp_arch_private_info and ptid_of_lwp.
4171
88e2cf7e
YQ
41722015-08-25 Yao Qi <yao.qi@linaro.org>
4173
4174 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4175 Find proc_info by find_process_pid. All callers updated.
4176
5e35436e
YQ
41772015-08-25 Yao Qi <yao.qi@linaro.org>
4178
4179 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4180 Remove.
4181 (debug_reg_change_callback): Remove.
4182 (aarch64_notify_debug_reg_change): Remove.
4183
4a8a7965
YQ
41842015-08-25 Yao Qi <yao.qi@linaro.org>
4185
4186 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4187 Call current_lwp_ptid.
4188
32a271ee
YQ
41892015-08-25 Yao Qi <yao.qi@linaro.org>
4190
4191 * linux-aarch64-low.c (debug_reg_change_callback): Use
4192 debug_printf.
4193
0d51c8d7
YQ
41942015-08-25 Yao Qi <yao.qi@linaro.org>
4195
4196 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4197
31a43dd5
YQ
41982015-08-25 Yao Qi <yao.qi@linaro.org>
4199
4200 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4201
8ee52567
YQ
42022015-08-25 Yao Qi <yao.qi@linaro.org>
4203
4204 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4205 the code.
4206
ff3f0f45
YQ
42072015-08-25 Yao Qi <yao.qi@linaro.org>
4208
4209 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4210 Remove.
4211 (debug_reg_change_callback): Remove argument entry and add argument
4212 lwp. Remove local variable thread. Don't print thread id in the
4213 debugging output. Don't check whether pid of thread equals to pid.
4214 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4215 iterate_over_lwps instead find_inferior.
4216
3d40fbb5
PA
42172015-08-24 Pedro Alves <palves@redhat.com>
4218
4219 * inferiors.c (get_first_process): New function.
4220 * inferiors.h (get_first_process): New declaration.
4221 * remote-utils.c (read_ptid): Default to the first process in the
4222 list, instead of to the current thread's process.
4223
438e1e42
PA
42242015-08-24 Pedro Alves <palves@redhat.com>
4225
4226 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4227 * event-loop.c: Likewise.
4228 * remote-utils.c: Likewise.
4229 * tracepoint.c: Likewise.
4230
a8c6d4fc
PA
42312015-08-24 Pedro Alves <palves@redhat.com>
4232
4233 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4234 ptid_get_lwp.
4235
99b0bb12
PA
42362015-08-21 Pedro Alves <palves@redhat.com>
4237
4238 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4239 instead of literal 1.
4240
f8904751
PA
42412015-08-21 Pedro Alves <palves@redhat.com>
4242
4243 * tdesc.c (default_description): Explicitly zero-initialize.
4244
465a859e
PA
42452015-08-21 Pedro Alves <palves@redhat.com>
4246
4247 PR gdb/18749
4248 * inferiors.c (remove_thread): Discard any pending stop reply for
4249 this thread.
4250 * server.c (remove_all_on_match_pid): Rename to ...
4251 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4252 instead of a pid.
4253 (discard_queued_stop_replies): Change parameter to a ptid. Now
4254 extern.
4255 (handle_v_kill, kill_inferior_callback, captured_main)
4256 (process_serial_event): Adjust.
4257 * server.h (discard_queued_stop_replies): Declare.
4258
f0db101d
PA
42592015-08-21 Pedro Alves <palves@redhat.com>
4260
4261 * linux-low.c (wait_for_sigstop): Always switch to no thread
4262 selected if the previously current thread dies.
4263 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4264 process instead of the current thread's.
4265 * remote-utils.c (input_interrupt): Don't check if there's no
4266 current thread.
4267 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4268 current thread to the general thread fails, error out.
4269 (handle_qxfer_auxv, handle_qxfer_libraries)
4270 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4271 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4272 (handle_query): Check if there's a thread selected instead of
4273 checking whether there's any thread in the thread list.
4274 (handle_qxfer_threads, handle_qxfer_btrace)
4275 (handle_qxfer_btrace_conf): Don't error out early if there's no
4276 thread in the thread list.
4277 (handle_v_cont, myresume): Don't set the current thread to the
4278 continue thread.
4279 (process_serial_event) <Hg handling>: Also set thread_id if the
4280 previous general thread is still alive.
4281 (process_serial_event) <g/G handling>: If setting the current
4282 thread to the general thread fails, error out.
4283 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4284 thread's lwp instead of the current thread's.
4285 * target.c (set_desired_thread): If the desired thread was not
4286 found, leave the current thread pointing to NULL. Return an int
4287 (boolean) indicating success.
4288 * target.h (set_desired_thread): Change return type to int.
4289
40045d91
MF
42902015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4291
4292 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4293 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4294 #includes.
4295 (ps_get_thread_area): New function.
4296
45face3b
GB
42972015-08-19 Gary Benson <gbenson@redhat.com>
4298
4299 * hostio.c (handle_pread): Do not attempt to read more data
4300 than hostio_reply_with_data can fit in a packet.
4301
16d5f642
JB
43022015-08-18 Joel Brobecker <brobecker@adacore.com>
4303
4304 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4305
a738da3a
MF
43062015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4307
4308 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4309
33ebda9d
PA
43102015-08-06 Pedro Alves <palves@redhat.com>
4311
4312 * tracepoint.c (expr_eval_result): Now an int.
4313
a44892be
PA
43142015-08-06 Pedro Alves <palves@redhat.com>
4315
4316 * gdbthread.h (struct regcache): Forward declare.
4317 (struct thread_info) <regcache_data>: Now a struct regcache
4318 pointer.
4319 * inferiors.c (inferior_regcache_data)
4320 (set_inferior_regcache_data): Now work with struct regcache
4321 pointers.
4322 * inferiors.h (struct regcache): Forward declare.
4323 (inferior_regcache_data, set_inferior_regcache_data): Now work
4324 with struct regcache pointers.
4325 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4326 (free_register_cache_thread): Remove struct regcache pointer
4327 casts.
4328
608a1e46
PA
43292015-08-06 Pedro Alves <palves@redhat.com>
4330
4331 * server.c (captured_main): On error, print the exception message
4332 to stderr, and if run_once is set, throw a quit.
4333
f0ce0d3a
PA
43342015-08-06 Pedro Alves <palves@redhat.com>
4335
4336 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4337 the current thread.
4338
bf47e248
PA
43392015-08-06 Pedro Alves <palves@redhat.com>
4340
4341 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4342 reading beyond the passed in buffer length.
4343
b6b9ffcc
PL
43442015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4345
4346 * tracepoint.c (symbol_list) <required>: Remove.
4347
863d01bd
PA
43482015-08-06 Pedro Alves <palves@redhat.com>
4349
4350 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4351 count if stopping and suspending threads.
4352 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4353 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4354 (linux_detach): Complete an ongoing step-over.
4355 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4356 throughout.
4357 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4358 (linux_wait_1): If passing a signal to the inferior after
4359 finishing a step-over, unsuspend and re-resume all lwps. If we
4360 see a single-step event but the thread should be continuing, don't
4361 pass the trap to gdb.
4362 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4363 internal_error instead of gdb_assert.
4364 (enqueue_pending_signal): New function.
4365 (check_ptrace_stopped_lwp_gone): Add debug output.
4366 (start_step_over): Use internal_error instead of gdb_assert.
4367 (complete_ongoing_step_over): New function.
4368 (linux_resume_one_thread): Don't resume a suspended thread.
4369 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4370 it stepping.
4371
00db26fa
PA
43722015-08-06 Pedro Alves <palves@redhat.com>
4373
4374 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4375 (linux_thread_alive): Use lwp_is_marked_dead.
4376 (extended_event_reported): Delete.
4377 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4378 instead of extended_event_reported.
4379 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4380 as well.
4381 (lwp_is_marked_dead): New function.
4382 (lwp_running): Use lwp_is_marked_dead.
4383 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4384 comment.
4385
ad071a30
PA
43862015-08-06 Pedro Alves <palves@redhat.com>
4387
4388 * linux-low.c (linux_wait_1): Move fork event output out of the
4389 !report_to_gdb check. Pass event_child->waitstatus to
4390 target_waitstatus_to_string instead of ourstatus.
4391
524b57e6
YQ
43922015-08-04 Yao Qi <yao.qi@linaro.org>
4393
4394 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4395 if current_thread is 32 bit.
4396
6085d6f6
YQ
43972015-08-04 Yao Qi <yao.qi@linaro.org>
4398
4399 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4400 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4401 * server.c (extended_protocol): Remove "static".
4402 * server.h (extended_protocol): Declare it.
4403
8a7e4587
YQ
44042015-08-04 Yao Qi <yao.qi@linaro.org>
4405
4406 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4407 both aarch64 and aarch32.
4408 (aarch64_set_pc): Likewise.
4409
3b53ae99
YQ
44102015-08-04 Yao Qi <yao.qi@linaro.org>
4411
4412 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4413 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4414 arm-with-neon.xml to srv_xmlfiles.
4415 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4416 (is_64bit_tdesc): New function.
4417 (aarch64_linux_read_description): New function.
4418 (aarch64_arch_setup): Call aarch64_linux_read_description.
4419 (regs_info): Rename to regs_info_aarch64.
4420 (aarch64_regs_info): Return right regs_info.
4421 (initialize_low_arch): Call initialize_low_arch_aarch32.
4422
bd9e6534
YQ
44232015-08-04 Yao Qi <yao.qi@linaro.org>
4424
4425 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4426 * linux-aarch32-low.c: New file.
4427 * linux-aarch32-low.h: New file.
4428 * linux-arm-low.c (arm_fill_gregset): Move it to
4429 linux-aarch32-low.c.
4430 (arm_store_gregset): Likewise.
4431 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4432 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4433 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4434 (regs_info): Rename to regs_info_arm.
4435 (arm_regs_info): Return regs_info_aarch32 if
4436 have_ptrace_getregset is 1 and target description is
4437 arm_with_neon or arm_with_vfpv3.
4438 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4439 Call initialize_low_arch_aarch32 instead.
4440
ded48a5e
YQ
44412015-08-04 Yao Qi <yao.qi@linaro.org>
4442
4443 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4444 * linux-low.c: ... here.
4445 * linux-low.h (have_ptrace_getregset): Declare it.
4446
96e9210f
PA
44472015-08-04 Pedro Alves <palves@redhat.com>
4448
4449 * thread-db.c (struct thread_db): Use new typedefs.
4450 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4451 CHK calls.
4452 (disable_thread_event_reporting): Cast result of dlsym to
4453 destination function pointer type.
4454 (thread_db_mourn): Use td_ta_delete_ftype.
4455
af60a1ef
SL
44562015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4457
4458 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4459 arch variant.
4460 (CDX_BREAKPOINT): Define for R2.
4461 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4462 (the_low_target): Add comments.
4463
e8b41681
YQ
44642015-07-30 Yao Qi <yao.qi@linaro.org>
4465
4466 * linux-arm-low.c (arm_hwcap): Remove it.
4467 (arm_read_description): New local variable arm_hwcap. Don't
4468 set arm_hwcap to zero.
4469
89abb039
YQ
44702015-07-30 Yao Qi <yao.qi@linaro.org>
4471
4472 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4473 Use regcache->tdesc instead.
4474 (arm_store_wmmxregset): Likewise.
4475 (arm_fill_vfpregset): Likewise.
4476 (arm_store_vfpregset): Likewise.
4477
deca266c
YQ
44782015-07-30 Yao Qi <yao.qi@linaro.org>
4479
4480 * linux-arm-low.c: Include arch/arm.h.
4481 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4482 (arm_store_gregset): Likewise.
4483
aa58a496
SM
44842015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4485
4486 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4487 ptrace's 4th parameter.
4488
50904b25
YQ
44892015-07-27 Yao Qi <yao.qi@linaro.org>
4490
4491 * configure.srv (case aarch64*-*-linux*): Don't set
4492 srv_linux_usrregs.
4493
5826e159
PA
44942015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4495
4496 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4497 sys/ptrace.h.
4498 * linux-arm-low.c: Likewise.
4499 * linux-cris-low.c: Likewise.
4500 * linux-crisv32-low.c: Likewise.
4501 * linux-low.c: Likewise.
4502 * linux-m68k-low.c: Likewise.
4503 * linux-mips-low.c: Likewise.
4504 * linux-nios2-low.c: Likewise.
4505 * linux-s390-low.c: Likewise.
4506 * linux-sparc-low.c: Likewise.
4507 * linux-tic6x-low.c: Likewise.
4508 * linux-tile-low.c: Likewise.
4509 * linux-x86-low.c: Likewise.
4510
54019719
PA
45112015-07-24 Pedro Alves <palves@redhat.com>
4512
4513 * config.in: Regenerate.
4514 * configure: Regenerate.
4515
eb7aa561
PA
45162015-07-24 Pedro Alves <palves@redhat.com>
4517
4518 * acinclude.m4: Include ../ptrace.m4.
4519 * configure.ac: Call GDB_AC_PTRACE.
4520 * config.in, configure: Regenerate.
4521
55d7b841
YQ
45222015-07-24 Yao Qi <yao.qi@linaro.org>
4523
4524 * linux-low.c (linux_create_inferior): Remove setting to
4525 proc->priv->new_inferior.
4526 (linux_attach): Likewise.
4527 (linux_low_filter_event): Likewise.
4528 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4529
c06cbd92
YQ
45302015-07-24 Yao Qi <yao.qi@linaro.org>
4531
4532 * linux-low.c (linux_arch_setup): New function.
4533 (linux_low_filter_event): If proc->tdesc is NULL and
4534 proc->attached is true, call the_low_target.arch_setup.
4535 Otherwise, keep status pending, and return.
4536 (linux_resume_one_lwp_throw): Don't call get_pc if
4537 thread->while_stepping isn't NULL. Don't call
4538 get_thread_regcache if proc->tdesc is NULL.
4539 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4540 (linux_target_ops): Install arch_setup.
4541 * server.c (start_inferior): Call the_target->arch_setup.
4542 * target.h (struct target_ops) <arch_setup>: New field.
4543 (target_arch_setup): New marco.
4544 * lynx-low.c (lynx_target_ops): Update.
4545 * nto-low.c (nto_target_ops): Update.
4546 * spu-low.c (spu_target_ops): Update.
4547 * win32-low.c (win32_target_ops): Update.
4548
5ae3ebba
YQ
45492015-07-24 Yao Qi <yao.qi@linaro.org>
4550
4551 * linux-low.c (linux_add_process): Don't set
4552 proc->priv->new_inferior.
4553 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4554 (linux_attach): Likewise.
4555
eb97750b
YQ
45562015-07-24 Yao Qi <yao.qi@linaro.org>
4557
4558 * server.c (start_inferior): Code refactor.
4559
51aee833
YQ
45602015-07-24 Yao Qi <yao.qi@linaro.org>
4561
4562 * server.c (process_serial_event): Set general_thread.
4563
af1b22f3
YQ
45642015-07-21 Yao Qi <yao.qi@linaro.org>
4565
4566 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4567 aarch64_linux_get_debug_reg_capacity.
4568
554717a3
YQ
45692015-07-17 Yao Qi <yao.qi@linaro.org>
4570
4571 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4572 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4573 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4574 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4575 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4576 (AARCH64_HWP_ALIGNMENT): Likewise.
4577 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4578 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4579 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4580 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4581 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4582 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4583 (struct aarch64_debug_reg_state): Likewise.
4584 (struct arch_lwp_info): Likewise.
4585 (aarch64_align_watchpoint): Likewise.
4586 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4587 (aarch64_watchpoint_length): Likewise.
4588 (aarch64_point_encode_ctrl_reg): Likewise
4589 (aarch64_point_is_aligned): Likewise.
4590 (aarch64_align_watchpoint): Likewise.
4591 (aarch64_linux_set_debug_regs):
4592 (aarch64_dr_state_insert_one_point): Likewise.
4593 (aarch64_dr_state_remove_one_point): Likewise.
4594 (aarch64_handle_breakpoint): Likewise.
4595 (aarch64_handle_aligned_watchpoint): Likewise.
4596 (aarch64_handle_unaligned_watchpoint): Likewise.
4597 (aarch64_handle_watchpoint): Likewise.
4598
c67ca4de
YQ
45992015-07-17 Yao Qi <yao.qi@linaro.org>
4600
4601 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4602 and don't aarch64_get_debug_reg_state. All callers update.
4603 (aarch64_handle_aligned_watchpoint): Likewise.
4604 (aarch64_handle_unaligned_watchpoint): Likewise.
4605 (aarch64_handle_watchpoint): Likewise.
4606 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4607 (aarch64_remove_point): Likewise.
4608
25abf979
YQ
46092015-07-17 Yao Qi <yao.qi@linaro.org>
4610
4611 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4612 debug_printf.
4613 (aarch64_handle_unaligned_watchpoint): Likewise.
4614
db1ff28b
JK
46152015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4616
4617 Revert the previous 3 commits:
4618 Move gdb_regex* to common/
4619 Move linux_find_memory_regions_full & co.
4620 gdbserver build-id attribute generator
4621
700ca40f
JK
46222015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4623 Jan Kratochvil <jan.kratochvil@redhat.com>
4624
4625 gdbserver build-id attribute generator.
4626 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4627 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4628 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4629 (find_phdr): New.
4630 (get_dynamic): Use find_pdhr to traverse program headers.
4631 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4632 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4633 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4634 (get_hex_build_id): New.
4635 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4636 to reply XML document.
4637
9904185c
JK
46382015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4639 Jan Kratochvil <jan.kratochvil@redhat.com>
4640
4641 * target.c: Include target/target-utils.h and fcntl.h.
4642 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4643 (target_fileio_read_stralloc): New functions.
4644
6e5b4429
JK
46452015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4646
4647 * Makefile.in (OBS): Add gdb_regex.o.
4648 (gdb_regex.o): New.
4649 * config.in: Rebuilt.
4650 * configure: Rebuilt.
4651
ddc98fbf
JK
46522015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4653 Jan Kratochvil <jan.kratochvil@redhat.com>
4654
4655 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4656 * Makefile.in (OBS): Add target-utils.o.
4657 (linux-maps.o, target-utils.o): New.
4658 * configure.srv (srv_linux_obj): Add linux-maps.o.
4659
e57bb7a0
PL
46602015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4661
4662 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4663 function, return 1.
4664 (the_low_target): Install it.
4665
586b02a9
PA
46662015-07-14 Pedro Alves <palves@redhat.com>
4667
4668 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4669 Instead, ignore ECHILD, and throw an error for other errnos.
4670
58c1b36c
PA
46712015-07-10 Pedro Alves <palves@redhat.com>
4672
4673 * event-loop.c (struct callback_event) <data>: Change type to
4674 gdb_client_data instance instead of gdb_client_data pointer.
4675 (append_callback_event): Adjust.
4676
421530db
PL
46772015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4678
4679 * linux-aarch64-low.c: Add comments for each linux_target_ops
4680 method. Remove comments already covered in target_ops and
4681 linux_target_ops definitions.
4682 (the_low_target): Add comments for each unimplemented method.
4683
c2d65f38
YQ
46842015-07-09 Yao Qi <yao.qi@linaro.org>
4685
4686 * linux-aarch64-low.c (aarch64_regmap): Remove.
4687 (aarch64_usrregs_info): Remove.
4688 (regs_info): Set field usrregs to NULL.
4689
b20a6524
MM
46902015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4691
4692 * linux-low.c: Include "rsp-low.h"
4693 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4694 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4695 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4696 (handle_btrace_enable_pt): New.
4697 (handle_btrace_general_set): Support "pt".
4698 (handle_btrace_conf_general_set): Support "pt:size".
4699
96c97461
PL
47002015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4701
4702 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4703 Z_PACKET_SW_BP.
4704
37d66942
PL
47052015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4706
4707 * linux-aarch64-low.c: Remove comment about endianness.
4708 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4709 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4710 memcmp.
4711
dc06243f
GB
47122015-06-24 Gary Benson <gbenson@redhat.com>
4713
4714 * linux-i386-ipa.c (stdint.h): Do not include.
4715 * lynx-i386-low.c (stdint.h): Likewise.
4716 * lynx-ppc-low.c (stdint.h): Likewise.
4717 * mem-break.c (stdint.h): Likewise.
4718 * thread-db.c (stdint.h): Likewise.
4719 * tracepoint.c (stdint.h): Likewise.
4720 * win32-low.c (stdint.h): Likewise.
4721
124e13d9
SM
47222015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4723
4724 * server.c (write_qxfer_response): Update call to
4725 remote_escape_output.
4726
909c2cda
JK
47272015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4728 Jan Kratochvil <jan.kratochvil@redhat.com>
4729
4730 Merge multiple hex conversions.
4731 * gdbreplay.c (tohex): Rename to 'fromhex'.
4732 (logchar): Use fromhex.
4733
24c05f46
JK
47342015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4735
4736 * server.c (handle_qxfer_libraries): Set `version' attribute for
4737 <library-list>.
4738
14d2069a
GB
47392015-06-10 Gary Benson <gbenson@redhat.com>
4740
4741 * target.h (struct target_ops) <multifs_open>: New field.
4742 <multifs_unlink>: Likewise.
4743 <multifs_readlink>: Likewise.
4744 * linux-low.c (nat/linux-namespaces.h): New include.
4745 (linux_target_ops): Initialize the_target->multifs_open,
4746 the_target->multifs_unlink and the_target->multifs_readlink.
4747 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4748 * hostio.c (hostio_fs_pid): New static variable.
4749 (hostio_handle_new_gdb_connection): New function.
4750 (handle_setfs): Likewise.
4751 (handle_open): Use the_target->multifs_open as appropriate.
4752 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4753 (handle_readlink): Use the_target->multifs_readlink as
4754 appropriate.
4755 (handle_vFile): Handle vFile:setfs packets.
4756 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4757 after target_handle_new_gdb_connection.
4758
4b8b5e72
GB
47592015-06-10 Gary Benson <gbenson@redhat.com>
4760
4761 * configure.ac (AC_CHECK_FUNCS): Add setns.
4762 * config.in: Regenerate.
4763 * configure: Likewise.
4764 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4765 (linux-namespaces.o): New rule.
4766 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4767
3ac2e371
GB
47682015-06-09 Gary Benson <gbenson@redhat.com>
4769
4770 * hostio.c (handle_open): Process mode argument with
4771 fileio_to_host_mode.
4772
ca9b78ce
YQ
47732015-06-01 Yao Qi <yao.qi@linaro.org>
4774
4775 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4776 * linux-x86-low.c: Likewise.
4777
bfacd19d
DB
47782015-05-28 Don Breazeal <donb@codesourcery.com>
4779
4780 * linux-low.c (handle_extended_wait): Initialize
4781 thread_info.last_resume_kind for new fork children.
4782
452003ef
PA
47832015-05-15 Pedro Alves <palves@redhat.com>
4784
4785 * target.h (target_handle_new_gdb_connection): Rewrite using if
4786 wrapped in do/while.
4787
1041a03c
JB
47882015-05-14 Joel Brobecker <brobecker@adacore.com>
4789
4790 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4791 * configure, config.in: Regenerate.
4792 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4793 Declare typedef.
4794
c269dbdb
DB
47952015-05-12 Don Breazeal <donb@codesourcery.com>
4796
4797 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4798 PTRACE_EVENT_VFORK_DONE.
4799 (linux_low_ptrace_options, extended_event_reported): Add vfork
4800 events.
4801 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4802 and "vforkdone" for RSP 'T' Stop Reply Packet.
4803 * server.h (report_vfork_events): Declare
4804 global variable.
4805
3a8a0396
DB
48062015-05-12 Don Breazeal <donb@codesourcery.com>
4807
4808 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4809 (the_low_target) <new_fork>: Initialize new member.
4810 * linux-arm-low.c (arm_new_fork): New function.
4811 (the_low_target) <new_fork>: Initialize new member.
4812 * linux-low.c (handle_extended_wait): Call new target function
4813 new_fork.
4814 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4815 * linux-mips-low.c (mips_add_watchpoint): New function
4816 extracted from mips_insert_point.
4817 (the_low_target) <new_fork>: Initialize new member.
4818 (mips_linux_new_fork): New function.
4819 (mips_insert_point): Call mips_add_watchpoint.
4820 * linux-x86-low.c (x86_linux_new_fork): New function.
4821 (the_low_target) <new_fork>: Initialize new member.
4822
de0d863e
DB
48232015-05-12 Don Breazeal <donb@codesourcery.com>
4824
4825 * linux-low.c (handle_extended_wait): Implement return value,
4826 rename argument 'event_child' to 'event_lwp', handle
4827 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4828 (linux_low_ptrace_options): New function.
4829 (linux_low_filter_event): Call linux_low_ptrace_options,
4830 use different argument fo linux_enable_event_reporting,
4831 use return value from handle_extended_wait.
4832 (extended_event_reported): New function.
4833 (linux_wait_1): Call extended_event_reported and set
4834 status to report fork events.
4835 (linux_write_memory): Add pid to debug message.
4836 (reset_lwp_ptrace_options_callback): New function.
4837 (linux_handle_new_gdb_connection): New function.
4838 (linux_target_ops): Initialize new structure member.
4839 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4840 * lynx-low.c: Initialize new structure member.
4841 * remote-utils.c (prepare_resume_reply): Implement stop reason
4842 "fork" for "T" stop message.
4843 * server.c (handle_query): Call handle_new_gdb_connection.
4844 * server.h (report_fork_events): Declare global flag.
4845 * target.h (struct target_ops) <handle_new_gdb_connection>:
4846 New member.
4847 (target_handle_new_gdb_connection): New macro.
4848 * win32-low.c: Initialize new structure member.
4849
ddcbc397
DB
48502015-05-12 Don Breazeal <donb@codesourcery.com>
4851
4852 * mem-break.c (APPEND_TO_LIST): Define macro.
4853 (clone_agent_expr): New function.
4854 (clone_one_breakpoint): New function.
4855 (clone_all_breakpoints): New function.
4856 * mem-break.h: Declare new functions.
4857
89245bc0
DB
48582015-05-12 Don Breazeal <donb@codesourcery.com>
4859
4860 * linux-low.c (linux_supports_fork_events): New function.
4861 (linux_supports_vfork_events): New function.
4862 (linux_target_ops): Initialize new structure members.
4863 (initialize_low): Call linux_check_ptrace_features.
4864 * lynx-low.c (lynx_target_ops): Initialize new structure
4865 members.
4866 * server.c (report_fork_events, report_vfork_events):
4867 New global flags.
4868 (handle_query): Add new features to qSupported packet and
4869 response.
4870 (captured_main): Initialize new global variables.
4871 * target.h (struct target_ops) <supports_fork_events>:
4872 New member.
4873 <supports_vfork_events>: New member.
4874 (target_supports_fork_events): New macro.
4875 (target_supports_vfork_events): New macro.
4876 * win32-low.c (win32_target_ops): Initialize new structure
4877 members.
4878
835205d0
GB
48792015-05-12 Gary Benson <gbenson@redhat.com>
4880
4881 * server.c (handle_qxfer_exec_file): Use current process
4882 if annex is empty.
4883
21e94bd9
SL
48842015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4885
4886 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4887 Remove HAVE_PTRACE_GETREGS conditionals.
4888 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4889 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4890
45614f15
YQ
48912015-05-08 Yao Qi <yao.qi@linaro.org>
4892
4893 * linux-low.c (linux_supports_conditional_breakpoints): New
4894 function.
4895 (linux_target_ops): Install new target method.
4896 * lynx-low.c (lynx_target_ops): Install NULL hook for
4897 supports_conditional_breakpoints.
4898 * nto-low.c (nto_target_ops): Likewise.
4899 * spu-low.c (spu_target_ops): Likewise.
4900 * win32-low.c (win32_target_ops): Likewise.
4901 * server.c (handle_query): Check
4902 target_supports_conditional_breakpoints.
4903 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4904 New field.
4905 (target_supports_conditional_breakpoints): New macro.
4906
80ad801e
PA
49072015-05-06 Pedro Alves <palves@redhat.com>
4908
4909 PR server/18081
4910 * server.c (start_inferior): If the process exits, mourn it.
4911
819843c7
GB
49122015-04-21 Gary Benson <gbenson@redhat.com>
4913
4914 * hostio.c (fileio_open_flags_to_host): Factored out to
4915 fileio_to_host_openflags in common/fileio.c. Single use
4916 updated.
4917
a2d5a9d7
MF
49182015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4919
4920 * linux-xtensa-low.c (xtensa_fill_gregset)
4921 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4922 XCHAL_HAVE_LOOP.
4923
deb44829
MF
49242015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4925
4926 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4927 (regs_info): Replace usrregs pointer with NULL.
4928
e57f1de3
GB
49292015-04-17 Gary Benson <gbenson@redhat.com>
4930
4931 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4932 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4933 * server.c (handle_qxfer_exec_file): New function.
4934 (qxfer_packets): Add exec-file entry.
4935 (handle_query): Report qXfer:exec-file:read as supported packet.
4936
62828379
RN
49372015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4938
4939 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4940
b88bb450
GB
49412015-04-09 Gary Benson <gbenson@redhat.com>
4942
4943 * hostio-errno.c (errno_to_fileio_error): Remove function.
4944 Update caller to use remote_fileio_to_fio_error.
4945
c8f4bfdd
YQ
49462015-04-09 Yao Qi <yao.qi@linaro.org>
4947
4948 * linux-low.c (linux_insert_point): Call
4949 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4950 (linux_remove_point): Call remove_memory_breakpoint if type is
4951 raw_bkpt_type_sw.
4952 * linux-x86-low.c (x86_insert_point): Don't call
4953 insert_memory_breakpoint.
4954 (x86_remove_point): Don't call remove_memory_breakpoint.
4955
41f98f02
PA
49562015-04-01 Pedro Alves <palves@redhat.com>
4957 Cleber Rosa <crosa@redhat.com>
4958
4959 * server.c (gdbserver_usage): Reorganize and extend the usage
4960 message.
4961
2bf6fb9d
PA
49622015-03-24 Pedro Alves <palves@redhat.com>
4963
4964 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4965 output. Also dump TRAP_TRACE.
4966 (linux_low_filter_event): In debug output, distinguish a
4967 resume_stop SIGSTOP from a delayed SIGSTOP.
4968
369f6daa
GB
49692015-03-24 Gary Benson <gbenson@redhat.com>
4970
4971 * linux-x86-low.c (x86_linux_new_thread): Moved to
4972 nat/x86-linux.c.
4973 (x86_linux_prepare_to_resume): Likewise.
4974
8e5d4070
GB
49752015-03-24 Gary Benson <gbenson@redhat.com>
4976
4977 * Makefile.in (x86-linux-dregs.o): New rule.
4978 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4979 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4980 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4981 (x86_linux_dr_get): Likewise.
4982 (x86_linux_dr_set): Likewise.
4983 (update_debug_registers_callback): Likewise.
4984 (x86_linux_dr_set_addr): Likewise.
4985 (x86_linux_dr_get_addr): Likewise.
4986 (x86_linux_dr_set_control): Likewise.
4987 (x86_linux_dr_get_control): Likewise.
4988 (x86_linux_dr_get_status): Likewise.
4989 (x86_linux_update_debug_registers): Likewise.
4990
2b95d440
GB
49912015-03-24 Gary Benson <gbenson@redhat.com>
4992
4993 * linux-x86-low.c (x86_linux_update_debug_registers):
4994 New function, factored out from...
4995 (x86_linux_prepare_to_resume): ...this.
4996
14b0bc68
GB
49972015-03-24 Gary Benson <gbenson@redhat.com>
4998
4999 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5000 (x86_linux_dr_set): Likewise.
5001 (update_debug_registers_callback): Likewise.
5002 (x86_linux_dr_set_addr): Likewise.
5003 (x86_linux_dr_get_addr): Likewise.
5004 (x86_linux_dr_set_control): Likewise.
5005 (x86_linux_dr_get_control): Likewise.
5006 (x86_linux_dr_get_status): Likewise.
5007 (x86_linux_prepare_to_resume): Likewise.
5008
5dfe6ca8
GB
50092015-03-24 Gary Benson <gbenson@redhat.com>
5010
5011 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5012 Use perror_with_name. Pass string through gettext.
5013 (x86_linux_dr_set): Likewise.
5014
d33472ad
GB
50152015-03-24 Gary Benson <gbenson@redhat.com>
5016
5017 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5018 (x86_linux_dr_set_addr): ...this.
5019 (x86_dr_low_get_addr): Rename to...
5020 (x86_linux_dr_get_addr): ...this.
5021 (x86_dr_low_set_control): Rename to...
5022 (x86_linux_dr_set_control): ...this.
5023 (x86_dr_low_get_control): Rename to...
5024 (x86_linux_dr_get_control): ...this.
5025 (x86_dr_low_get_status): Rename to...
5026 (x86_linux_dr_get_status): ...this.
5027 (x86_dr_low): Update with new function names.
5028
4b134ca1
GB
50292015-03-24 Gary Benson <gbenson@redhat.com>
5030
5031 * Makefile.in (x86-linux.o): New rule.
5032 * configure.srv: Add x86-linux.o to relevant targets.
5033 * linux-low.c (lwp_set_arch_private_info): New function.
5034 (lwp_arch_private_info): Likewise.
5035 * linux-x86-low.c: Include nat/x86-linux.h.
5036 (arch_lwp_info): Removed structure.
5037 (update_debug_registers_callback):
5038 Use lwp_set_debug_registers_changed.
5039 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5040 and lwp_set_debug_registers_changed.
5041 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5042
34c703da
GB
50432015-03-24 Gary Benson <gbenson@redhat.com>
5044
5045 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5046 * linux-arm-low.c (arm_new_thread): Likewise.
5047 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5048 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5049 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5050 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5051
cff068da
GB
50522015-03-24 Gary Benson <gbenson@redhat.com>
5053
5054 * linux-low.c (ptid_of_lwp): New function.
5055 (lwp_is_stopped): Likewise.
5056 (lwp_stop_reason): Likewise.
5057 * linux-x86-low.c (update_debug_registers_callback):
5058 Use lwp_is_stopped.
5059 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5060 lwp_stop_reason.
5061
b2f7c7e8
GB
50622015-03-24 Gary Benson <gbenson@redhat.com>
5063
5064 * linux-low.h (linux_stop_lwp): Remove declaration.
5065
6d4ee8c6
GB
50662015-03-24 Gary Benson <gbenson@redhat.com>
5067
5068 * linux-low.h: Include nat/linux-nat.h.
5069 * linux-low.c (iterate_over_lwps_args): New structure.
5070 (iterate_over_lwps_filter): New function.
5071 (iterate_over_lwps): Likewise.
5072 * linux-x86-low.c (update_debug_registers_callback):
5073 Update signature to what iterate_over_lwps expects.
5074 Remove PID check that iterate_over_lwps now performs.
5075 (x86_dr_low_set_addr): Use iterate_over_lwps.
5076 (x86_dr_low_set_control): Likewise.
5077
70a0bb6b
GB
50782015-03-24 Gary Benson <gbenson@redhat.com>
5079
5080 * linux-x86-low.c (x86_debug_reg_state): New function.
5081 (x86_linux_prepare_to_resume): Use the above.
5082
7b669087
GB
50832015-03-24 Gary Benson <gbenson@redhat.com>
5084
5085 * linux-low.c (current_lwp_ptid): New function.
5086 * linux-x86-low.c: Include nat/linux-nat.h.
5087 (x86_dr_low_get_addr): Use current_lwp_ptid.
5088 (x86_dr_low_get_control): Likewise.
5089 (x86_dr_low_get_status): Likewise.
5090
eef49a3d
PA
50912015-03-20 Pedro Alves <palves@redhat.com>
5092
5093 * tracepoint.c (cmd_qtstatus): Make "str" const.
5094
b2333d22
PA
50952015-03-20 Pedro Alves <palves@redhat.com>
5096
5097 * server.c (handle_general_set): Make "req_str" const.
5098
23f238d3
PA
50992015-03-19 Pedro Alves <palves@redhat.com>
5100
5101 * linux-low.c (linux_resume_one_lwp): Rename to ...
5102 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5103 instead call perror_with_name.
5104 (check_ptrace_stopped_lwp_gone): New function.
5105 (linux_resume_one_lwp): Reimplement as wrapper around
5106 linux_resume_one_lwp_throw that swallows errors if the LWP is
5107 gone.
5108
91baf43f
PA
51092015-03-19 Pedro Alves <palves@redhat.com>
5110
5111 * linux-low.c (count_events_callback, select_event_lwp_callback):
5112 No longer check whether the thread has resume_stop as last resume
5113 kind.
5114
8bf3b159
PA
51152015-03-19 Pedro Alves <palves@redhat.com>
5116
5117 * linux-low.c (count_events_callback, select_event_lwp_callback):
5118 Use the lwp's status_pending_p field, not the thread's.
5119
b90fc188
PA
51202015-03-19 Pedro Alves <palves@redhat.com>
5121
5122 * linux-low.c (select_event_lwp_callback): Update comments to
5123 no longer mention SIGTRAP.
5124
464b0089
GB
51252015-03-18 Gary Benson <gbenson@redhat.com>
5126
5127 * server.c (handle_query): Do not report vFile:fstat as supported.
5128
aa9e327f
GB
51292015-03-11 Gary Benson <gbenson@redhat.com>
5130
5131 * hostio.c (sys/types.h): New include.
5132 (sys/stat.h): Likewise.
5133 (common-remote-fileio.h): Likewise.
5134 (handle_fstat): New function.
5135 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5136
791c0056
GB
51372015-03-11 Gary Benson <gbenson@redhat.com>
5138
5139 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5140 struct stat.st_blocks and struct stat.st_blksize.
5141 * configure: Regenerate.
5142 * config.in: Likewise.
5143 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5144 (OBS): Add common-remote-fileio.o.
5145 (common-remote-fileio.o): New rule.
5146
9a9df970
PA
51472015-03-09 Pedro Alves <palves@redhat.com>
5148
5149 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5150 'struct sockaddr' pointer in 'accept' call.
5151
9eb1356e
PA
51522015-03-09 Pedro Alves <palves@redhat.com>
5153
5154 Revert:
5155 2015-03-07 Pedro Alves <palves@redhat.com>
5156 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5157 or <winsock2.h> here. Instead include "gdb_socket.h".
5158 (remote_open): Use union gdb_sockaddr_u.
5159 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5160 or <winsock2.h> here. Instead include "gdb_socket.h".
5161 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5162 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5163 or <sys/un.h>.
5164 (init_named_socket, gdb_agent_helper_thread): Use union
5165 gdb_sockaddr_u.
5166
aac331e4
PA
51672015-03-07 Pedro Alves <palves@redhat.com>
5168
5169 * configure.ac (build_warnings): Move
5170 -Wdeclaration-after-statement to the C-specific set.
5171 * configure: Regenerate.
5172
366c75fc
PA
51732015-03-07 Pedro Alves <palves@redhat.com>
5174
5175 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5176 or <winsock2.h> here. Instead include "gdb_socket.h".
5177 (remote_open): Use union gdb_sockaddr_u.
5178 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5179 or <winsock2.h> here. Instead include "gdb_socket.h".
5180 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5181 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5182 or <sys/un.h>.
5183 (init_named_socket, gdb_agent_helper_thread): Use union
5184 gdb_sockaddr_u.
5185
492d29ea
PA
51862015-03-07 Pedro Alves <palves@redhat.com>
5187
5188 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5189 instead.
5190
60a191ed
YQ
51912015-03-06 Yao Qi <yao.qi@linaro.org>
5192
5193 * linux-aarch64-low.c (aarch64_insert_point): Use
5194 show_debug_regs as a boolean.
5195 (aarch64_remove_point): Likewise.
5196
f5771b1d
PA
51972015-03-05 Pedro Alves <palves@redhat.com>
5198
5199 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5200 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5201 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5202 * nto-low.c (nto_target_ops): Likewise.
5203 * spu-low.c (spu_target_ops): Likewise.
5204 * win32-low.c (win32_target_ops): Likewise.
5205
3e572f71
PA
52062015-03-04 Pedro Alves <palves@redhat.com>
5207
72f4393d 5208 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5209 Decide whether a breakpoint triggered based on the SIGTRAP's
5210 siginfo.si_code.
72f4393d
L
5211 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5212 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5213 (linux_low_filter_event): Check for breakpoints before checking
5214 watchpoints.
5215 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5216 siginfo.si_code.
72f4393d
L
5217 (linux_stopped_by_sw_breakpoint)
5218 (linux_supports_stopped_by_sw_breakpoint)
5219 (linux_stopped_by_hw_breakpoint)
5220 (linux_supports_stopped_by_hw_breakpoint): New functions.
5221 (linux_target_ops): Install new target methods.
3e572f71 5222
1ec68e26
PA
52232015-03-04 Pedro Alves <palves@redhat.com>
5224
5225 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5226 * server.c (swbreak_feature, hwbreak_feature): New globals.
5227 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5228 (captured_main): Clear swbreak_feature and hwbreak_feature.
5229 * server.h (swbreak_feature, hwbreak_feature): Declare.
5230 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5231 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5232 supports_stopped_by_hw_breakpoint>: New fields.
5233 (target_supports_stopped_by_sw_breakpoint)
5234 (target_stopped_by_sw_breakpoint)
5235 (target_supports_stopped_by_hw_breakpoint)
5236 (target_stopped_by_hw_breakpoint): Declare.
5237
15c66dd6
PA
52382015-03-04 Pedro Alves <palves@redhat.com>
5239
5240 enum lwp_stop_reason -> enum target_stop_reason
5241 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5242 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5243 (linux_wait_1, stuck_in_jump_pad_callback)
5244 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5245 (linux_stopped_by_watchpoint):
5246 * linux-low.h (enum lwp_stop_reason): Delete.
5247 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5248 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5249
98fc70d6
YQ
52502015-03-04 Yao Qi <yao.qi@linaro.org>
5251
5252 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5253
dd2ac174
GB
52542015-03-03 Gary Benson <gbenson@redhat.com>
5255
5256 * hostio.c (handle_vFile): Fix prefix lengths.
5257
d68e53f4
MM
52582015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5259
5260 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5261 ptr_bits.
5262
bf2d68ab
AA
52632015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5264
5265 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5266 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5267 (clean): Add "rm -f" for above C files.
5268 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5269 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5270 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5271 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5272 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5273 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5274 (init_registers_s390x_vx_linux64)
5275 (init_registers_s390x_tevx_linux64)
5276 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5277 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5278 declarations.
5279 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5280 (s390_store_vxrs_high): New functions.
5281 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5282 NT_S390_VXRS_HIGH.
5283 (s390_arch_setup): Add logic for selecting one of the new target
5284 descriptions. Activate the new vector regsets if applicable.
5285 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5286 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5287 and init_registers_s390x_tevx_linux64.
5288
c966a859
PA
52892015-03-01 Pedro Alves <palves@redhat.com>
5290
5291 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5292 parameter.
5293
4180215b
PA
52942015-02-27 Pedro Alves <palves@redhat.com>
5295
5296 * linux-x86-low.c (u_debugreg_offset): New function.
5297 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5298
749bab01
PA
52992015-02-27 Pedro Alves <palves@redhat.com>
5300
5301 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5302 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5303 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5304 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5305 (ps_lsetfpregs, ps_getpid)
5306 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5307 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5308 (ps_lsetxregs, ps_plog): Declare.
5309
3c14e5a3
PA
53102015-02-27 Pedro Alves <palves@redhat.com>
5311
5312 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5313 IP_AGENT_EXPORT_FUNC.
5314 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5315 IP_AGENT_EXPORT_FUNC.
5316 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5317 (IP_AGENT_EXPORT): Delete.
5318 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5319 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5320 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5321 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5322 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5323 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5324 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5325 (traceframe_read_count, traceframe_write_count)
5326 (traceframes_created, trace_state_variables, get_raw_reg)
5327 (get_trace_state_variable_value, set_trace_state_variable_value)
5328 (ust_loaded, helper_thread_id, cmd_buf): Use
5329 IPA_SYM_EXPORTED_NAME.
5330 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5331 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5332 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5333 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5334 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5335 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5336 EXTERN_C_PUSH/EXTERN_C_POP.
5337 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5338 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5339 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5340 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5341 (traceframe_write_count, traceframe_read_count)
5342 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5343 (about_to_request_buffer_space, get_trace_state_variable_value)
5344 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5345 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5346 EXTERN_C_PUSH/EXTERN_C_POP.
5347 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5348 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5349 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5350 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5351 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5352 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5353 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5354 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5355 Define.
5356 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5357 (IP_AGENT_EXPORT_VAR_DECL): Define.
5358 (tracing): Declare.
5359 (gdb_agent_get_raw_reg): Declare.
5360
fe978cb0
PA
53612015-02-27 Tom Tromey <tromey@redhat.com>
5362 Pedro Alves <palves@redhat.com>
5363
5364 Rename symbols whose names are reserved C++ keywords throughout.
5365
3bc3d82a
PA
53662015-02-27 Pedro Alves <palves@redhat.com>
5367
5368 * Makefile.in (COMPILER): New, get it from autoconf.
5369 (CXX): Get from autoconf instead.
5370 (COMPILE.pre): Use COMPILER.
5371 (CC-LD): Rename to ...
5372 (CC_LD): ... this. Use COMPILER.
5373 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5374 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5375 * acinclude.m4: Include build-with-cxx.m4.
5376 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5377 Disable -Werror by default if building in C++ mode.
5378 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5379 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5380 the C++ compiler. Save/restore CXXFLAGS too.
5381 * configure: Regenerate.
5382
07697489
PA
53832015-02-27 Pedro Alves <palves@redhat.com>
5384
5385 * acinclude.m4: Include libiberty.m4.
5386 * configure.ac: Call libiberty_INIT.
5387 * config.in, configure: Regenerate.
5388
9beb7c4e
PA
53892015-02-26 Pedro Alves <palves@redhat.com>
5390
5391 * linux-low.c (linux_wait_1): When incrementing the PC past a
5392 program breakpoint always use the_low_target.breakpoint_len as
5393 increment, rather than the maximum between that and
5394 the_low_target.decr_pc_after_break.
5395
8090aef2
PA
53962015-02-23 Pedro Alves <palves@redhat.com>
5397
5398 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5399 thread was doing a step-over; always adjust the PC if
5400 we stepped over a permanent breakpoint.
5401 (linux_wait_1): If we stepped over breakpoint that was on top of a
5402 permanent breakpoint, manually advance the PC past it.
5403
bc9540e8
PA
54042015-02-23 Pedro Alves <palves@redhat.com>
5405
5406 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5407 modes.
5408 (x86_fill_gregset, x86_store_gregset): Use it when handling
5409 $orig_eax.
5410
2db9a427
PA
54112015-02-20 Pedro Alves <palves@redhat.com>
5412
5413 * thread-db.c: Include "nat/linux-procfs.h".
5414 (thread_db_init): Skip listing new threads if the kernel supports
5415 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5416
afa8d396
PA
54172015-02-20 Pedro Alves <palves@redhat.com>
5418
5419 * linux-low.c (status_pending_p_callback): Use ptid_match.
5420
c9587f88
AT
54212015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5422
5423 PR breakpoints/16812
5424 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5425 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5426 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5427
b05ec7a5
AT
54282015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5429
5430 PR breakpoints/15956
5431 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5432
d33501a5
MM
54332015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5434
5435 * linux-low.c (linux_low_btrace_conf): Print size.
5436 * server.c (handle_btrace_conf_general_set): New.
5437 (hanle_general_set): Call handle_btrace_conf_general_set.
5438 (handle_query): Report Qbtrace-conf:bts:size as supported.
5439
f4abbc16
MM
54402015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5441
5442 * linux-low.c (linux_low_enable_btrace): Update parameters.
5443 (linux_low_btrace_conf): New.
5444 (linux_target_ops)<to_btrace_conf>: Initialize.
5445 * server.c (current_btrace_conf): New.
5446 (handle_btrace_enable): Rename to ...
5447 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5448 to target_enable_btrace. Update comment. Update users.
5449 (handle_qxfer_btrace_conf): New.
5450 (qxfer_packets): Add btrace-conf entry.
5451 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5452 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5453 (target_ops)<read_btrace_conf>: New.
5454 (target_enable_btrace): Update parameters.
5455 (target_read_btrace_conf): New.
5456
043c3577
MM
54572015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5458
5459 * server.c (handle_btrace_general_set): Remove call to
5460 target_supports_btrace.
5461 (supported_btrace_packets): New.
5462 (handle_query): Call supported_btrace_packets.
5463 * target.h: include btrace-common.h.
5464 (btrace_target_info): Removed.
5465 (supports_btrace, target_supports_btrace): Update parameters.
5466
734b0e4b
MM
54672015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5468
5469 * Makefile.in (SFILES): Add common/btrace-common.c.
5470 (OBS): Add common/btrace-common.o.
5471 (btrace-common.o): Add build rules.
5472 * linux-low: Include btrace-common.h.
5473 (linux_low_read_btrace): Use struct btrace_data. Call
5474 btrace_data_init and btrace_data_fini.
5475
d6c146e9
PA
54762015-02-06 Pedro Alves <palves@redhat.com>
5477
5478 * thread-db.c (find_new_threads_callback): Add debug output.
5479
20ba1ce6
PA
54802015-02-04 Pedro Alves <palves@redhat.com>
5481
5482 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5483 (resume_stopped_resumed_lwps): New function.
5484 (linux_wait_for_event_filtered): Use it.
5485
8cc73a39
SDJ
54862015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5487
5488 * Makefile.in (SFILES): Add linux-personality.c.
5489 (linux-personality.o): New rule.
5490 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5491 list of objects to be built.
5492 * linux-low.c: Include nat/linux-personality.h.
5493 (linux_create_inferior): Remove code to disable address space
5494 randomization (moved to ../nat/linux-personality.c). Create
5495 cleanup to disable address space randomization.
5496
fb23d554
SDJ
54972015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5498
5499 * Makefile.in (posix-strerror.o): New rule.
5500 (mingw-strerror.o): Likewise.
5501 * configure: Regenerated.
5502 * configure.ac: Source file ../common/common.host. Initialize new
5503 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5504
cdf43629
YQ
55052015-01-14 Yao Qi <yao@codesourcery.com>
5506
5507 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5508 (ppc-linux.o): New rule.
5509 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5510 * configure.ac: AC_CHECK_FUNCS(getauxval).
5511 * config.in: Re-generated.
5512 * configure: Re-generated.
5513 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5514 ppc64_64bit_inferior_p
5515
514c5338
YQ
55162015-01-14 Yao Qi <yao@codesourcery.com>
5517
5518 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5519 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5520 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5521 (PT_ORIG_R3, PT_TRAP): Likewise.
5522 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5523 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5524 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5525
3368c1e5
JB
55262015-01-10 Joel Brobecker <brobecker@adacore.com>
5527
5528 * i387-fp.c (i387_cache_to_xsave): In look over
5529 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5530 zmmh_low_space field by use of zmmh_high_space.
5531
582511be
PA
55322015-01-09 Pedro Alves <palves@redhat.com>
5533
5534 * linux-low.c (step_over_bkpt): Move higher up in the file.
5535 (handle_extended_wait): Don't store the stop_pc here.
5536 (get_stop_pc): Adjust comments and rename to ...
5537 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5538 stopped for a software breakpoint or hardware breakpoint.
5539 (thread_still_has_status_pending_p): New function.
5540 (status_pending_p_callback): Use
5541 thread_still_has_status_pending_p. If the event is no longer
5542 interesting, resume the LWP.
5543 (handle_tracepoints): Add assert.
5544 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5545 (wstatus_maybe_breakpoint): New function.
5546 (cancel_breakpoint): Delete function.
5547 (check_stopped_by_watchpoint): New function, factored out from
5548 linux_low_filter_event.
5549 (lp_status_maybe_breakpoint): Delete function.
5550 (linux_low_filter_event): Remove filter_ptid argument.
5551 Leave thread group exits pending here. Store the LWP's stop PC.
5552 Always leave events pending.
5553 (linux_wait_for_event_filtered): Pull all events out of the
5554 kernel, and leave them all pending.
5555 (count_events_callback, select_event_lwp_callback): Consider all
5556 events.
5557 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5558 (select_event_lwp): Only give preference to the stepping LWP in
5559 all-stop mode. Adjust comments.
5560 (ignore_event): New function.
5561 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5562 references to cancel_breakpoints. Adjust to renames. Also give
5563 equal priority to all LWPs that have had events in non-stop mode.
5564 If reporting a software breakpoint event, unadjust the LWP's PC.
5565 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5566 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5567 Adjust.
5568 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5569 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5570 (linux_stopped_by_watchpoint): Adjust.
5571 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5572 * linux-low.h (enum lwp_stop_reason): New.
5573 (struct lwp_info) <stop_pc>: Adjust comment.
5574 <stopped_by_watchpoint>: Delete field.
5575 <stop_reason>: New field.
5576 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5577 * mem-break.c (software_breakpoint_inserted_here)
5578 (hardware_breakpoint_inserted_here): New function.
5579 * mem-break.h (software_breakpoint_inserted_here)
5580 (hardware_breakpoint_inserted_here): Declare.
5581 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5582 (cancel_breakpoints): Delete.
5583 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5584 (upload_fast_traceframes): Remove references to
5585 cancel_breakpoints.
5586
a33e3959
PA
55872015-01-09 Pedro Alves <palves@redhat.com>
5588
5589 * thread-db.c (find_new_threads_callback): Ignore thread if the
5590 kernel thread ID is -1.
5591
8784d563
PA
55922015-01-09 Pedro Alves <palves@redhat.com>
5593
5594 * linux-low.c (linux_attach_fail_reason_string): Move to
5595 nat/linux-ptrace.c, and rename.
5596 (linux_attach_lwp): Update comment.
5597 (attach_proc_task_lwp_callback): New function.
5598 (linux_attach): Adjust to rename and use
5599 linux_proc_attach_tgid_threads.
5600 (linux_attach_fail_reason_string): Delete declaration.
5601
76f2b779
JB
56022015-01-01 Joel Brobecker <brobecker@adacore.com>
5603
5604 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5605 * server.c (gdbserver_version): Likewise.
5606
fafcc06a
SDJ
56072014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5608
5609 * remote-utils.c: Include ctype.h.
5610 (input_interrupt): Explicitly handle the case when the char
5611 received is the NUL byte. Improve the printing of non-ASCII
5612 characters.
5613
beed38b8
JB
56142014-12-16 Joel Brobecker <brobecker@adacore.com>
5615
5616 * linux-low.c (linux_low_filter_event): Update call to
5617 linux_enable_event_reporting following the addition of
5618 a new parameter to that function.
5619
bf330350
CU
56202014-12-16 Catalin Udma <catalin.udma@freescale.com>
5621
5622 PR server/17457
5623 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5624 (AARCH64_FPCR_REGNO): Likewise.
5625 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5626 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5627 (aarch64_store_fpregset): Likewise.
5628
5227d625
JB
56292014-12-15 Joel Brobecker <brobecker@adacore.com>
5630
5631 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5632 Remove FIXME comment about assumption about N.
5633
f93b65a0
JB
56342014-12-13 Joel Brobecker <brobecker@adacore.com>
5635
5636 * configure.ac: If large-file support is disabled in GDBserver,
5637 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5638 * configure: Regenerate.
5639
e5a9158d
AA
56402014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5641
5642 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5643 warning upon ENODATA from ptrace.
5644 * linux-s390-low.c (s390_store_tdb): New.
5645 (s390_regsets): Add regset for NT_S390_TDB.
5646
feea5f36
AA
56472014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5648
5649 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5650 without a fill_function.
5651 * linux-s390-low.c (s390_fill_last_break): Remove.
5652 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5653 (s390_arch_setup): Use regset's size instead of fill_function for
5654 loop end condition.
5655
098dbe61
AA
56562014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5657
5658 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5659 the regset's store function when ptrace returned an error.
5660 * regcache.c (get_thread_regcache): Invalidate register cache
5661 before fetching inferior's registers.
5662
28eef672
AA
56632014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5664
5665 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5666 while-loop as for-loop.
5667 (regsets_store_inferior_registers): Likewise.
5668
bdca27a2
YQ
56692014-11-28 Yao Qi <yao@codesourcery.com>
5670
5671 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5672 * config.in, configure: Re-generate.
5673 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5674 is defined.
5675
9c232dda
YQ
56762014-11-21 Yao Qi <yao@codesourcery.com>
5677
5678 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5679 (AC_CHECK_HEADERS): Remove malloc.h.
5680 * configure: Re-generated.
5681 * config.in: Re-generated.
5682 * server.h: Don't include alloca.h and malloc.h.
5683 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5684 Don't include malloc.h.
5685
43968415
JB
56862014-11-17 Joel Brobecker <brobecker@adacore.com>
5687
5688 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5689 corresponding ERRNO check in same block.
5690
40e91bc7
PA
56912014-11-12 Pedro Alves <palves@redhat.com>
5692
5693 * server.c (cont_thread): Update comment.
5694 (start_inferior, attach_inferior): No longer clear cont_thread.
5695 (handle_v_cont): No longer set cont_thread.
5696 (captured_main): Clear cont_thread each time a GDB connects.
5697
c2c118cf
PA
56982014-11-12 Pedro Alves <palves@redhat.com>
5699
5700 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5701 thread, and don't resume all threads if the Hc thread has exited.
5702
78708b7c
PA
57032014-11-12 Pedro Alves <palves@redhat.com>
5704
5705 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5706 the process group instead of to a specific LWP.
5707
a2abc7de
PA
57082014-10-15 Pedro Alves <palves@redhat.com>
5709
5710 PR server/17487
5711 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5712 parameter.
5713 (arm_set_thread_context): Delete.
5714 (the_low_target): Adjust.
5715 * win32-i386-low.c (debug_registers_changed)
5716 (debug_registers_used): Delete.
5717 (update_debug_registers_callback): New function.
5718 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5719 needing to update their debug registers.
5720 (win32_get_current_dr): New function.
5721 (x86_dr_low_get_addr, x86_dr_low_get_control)
5722 (x86_dr_low_get_status): Fetch the debug register from the thread
5723 record's context.
5724 (i386_initial_stuff): Adjust.
5725 (i386_get_thread_context): Remove current_event parameter. Don't
5726 clear debug_registers_changed nor copy DR values to
5727 debug_reg_state.
5728 (i386_set_thread_context): Delete.
5729 (i386_prepare_to_resume): New function.
5730 (i386_thread_added): Mark the thread as needing to update irs
5731 debug registers.
5732 (the_low_target): Remove i386_set_thread_context and install
5733 i386_prepare_to_resume.
5734 * win32-low.c (win32_get_thread_context): Adjust.
5735 (win32_set_thread_context): Use SetThreadContext
5736 directly.
5737 (win32_prepare_to_resume): New function.
5738 (win32_require_context): New function, factored out from ...
5739 (thread_rec): ... this.
5740 (continue_one_thread): Call win32_prepare_to_resume on each thread
5741 we're about to continue.
5742 (win32_resume): Call win32_prepare_to_resume on the event thread.
5743 * win32-low.h (struct win32_thread_info)
5744 <debug_registers_changed>: New field.
5745 (struct win32_target_ops): Change prototype of set_thread_context,
5746 delete set_thread_context and add prepare_to_resume.
5747 (win32_require_context): New declaration.
5748
a442d071
GB
57492014-10-08 Gary Benson <gbenson@redhat.com>
5750
5751 * server.h: Do not include common-exceptions.h.
5752
6f1947e8
GB
57532014-10-08 Gary Benson <gbenson@redhat.com>
5754
5755 * server.h: Do not include cleanups.h.
5756
63b434a4
JH
57572014-09-30 James Hogan <james.hogan@imgtec.com>
5758
5759 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5760 mips64-dsp-linux.c.
5761
c4d9ceb6
YQ
57622014-09-23 Yao Qi <yao@codesourcery.com>
5763
5764 * linux-low.c (lp_status_maybe_breakpoint): New function.
5765 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5766 (count_events_callback): Likewise.
5767 (select_event_lwp_callback): Likewise.
5768 (cancel_breakpoints_callback): Likewise.
5769
89a5711c
DB
57702014-09-19 Don Breazeal <donb@codesourcery.com>
5771
5772 * linux-low.c (handle_extended_wait): Call
5773 linux_ptrace_get_extended_event.
5774 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5775 linux_is_extended_waitstatus.
5776
bffc0964
JB
57772014-09-16 Joel Brobecker <brobecker@adacore.com>
5778
5779 * Makefile.in (CPPFLAGS): Define.
5780 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5781 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5782
0bfdf32f
GB
57832014-09-16 Gary Benson <gbenson@redhat.com>
5784
5785 * inferiors.h (current_inferior): Renamed as...
5786 (current_thread): New variable. All uses updated.
5787 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5788 (maybe_move_out_of_jump_pad): Likewise.
5789 (cancel_breakpoint): Likewise.
5790 (linux_low_filter_event): Likewise.
5791 (wait_for_sigstop): Likewise.
5792 (linux_resume_one_lwp): Likewise.
5793 (need_step_over_p): Likewise.
5794 (start_step_over): Likewise.
5795 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5796 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5797 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5798 and save_inferior as saved_thread.
5799 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5800 saved_thread.
5801 (regcache_invalidate_thread): Likewise.
5802 * remote-utils.c (prepare_resume_reply): Likewise.
5803 * thread-db.c (thread_db_get_tls_address): Likewise.
5804 (disable_thread_event_reporting): Likewise.
5805 (remove_thread_event_breakpoints): Likewise.
5806 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5807 as saved_thread.
5808 * target.h (set_desired_inferior): Renamed as...
5809 (set_desired_thread): New declaration. All uses updated.
5810 * server.c (myresume): Updated comment to reference thread instead
5811 of inferior.
5812 (handle_serial_event): Likewise.
5813 (handle_target_event): Likewise.
5814
361c8ade
GB
58152014-09-12 Tom Tromey <tromey@redhat.com>
5816 Gary Benson <gbenson@redhat.com>
5817
5818 * regcache.h: Include common-regcache.h.
5819 (regcache_read_pc): Don't declare.
5820 * regcache.c (get_thread_regcache_for_ptid): New function.
5821
bd9269f7
GB
58222014-09-11 Tom Tromey <tromey@redhat.com>
5823 Gary Benson <gbenson@redhat.com>
5824
5825 * symbol.c: New file.
5826 * Makefile.in (SFILES): Add symbol.c.
5827 (OBS): Add symbol.o.
5828
f8c1d06b
GB
58292014-09-11 Gary Benson <gbenson@redhat.com>
5830
5831 * target.c (target_stop_ptid, target_continue_ptid): New
5832 functions.
5833
721ec300
GB
58342014-09-11 Tom Tromey <tromey@redhat.com>
5835 Gary Benson <gbenson@redhat.com>
5836
5837 * target.h: Include target/target.h.
5838 * target.c (target_read_memory, target_read_uint32)
5839 (target_write_memory): New functions.
5840
c5e92cca
GB
58412014-09-11 Gary Benson <gbenson@redhat.com>
5842
5843 * server.h (debug_hw_points): Don't declare.
5844 * server.c (debug_hw_points): Don't define. Replace all uses
5845 with show_debug_regs.
5846 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5847 all uses with show_debug_regs.
5848
2e4bb98a
EBM
58492014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5850
5851 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5852 endianness into account.
5853 (ppc_supply_ptrace_register): Likewise.
5854
ac740bc7
JH
58552014-09-03 James Hogan <james.hogan@imgtec.com>
5856
5857 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5858 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5859
97ea6506
GB
58602014-09-03 Gary Benson <gbenson@redhat.com>
5861
5862 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5863 ALL_DEBUG_ADDRESS_REGISTERS.
5864
df7e5265
GB
58652014-09-02 Gary Benson <gbenson@redhat.com>
5866
5867 * i386-low.h: Renamed as...
5868 * x86-low.h: New file. All type, function and variable name
5869 prefixes changed from "i386_" to "x86_". All references updated.
5870 * i386-low.c: Renamed as...
5871 * x86-low.c: New file. All type, function and variable name
5872 prefixes changed from "i386_" to "x86_". All references updated.
5873
ed859da7
GB
58742014-09-02 Gary Benson <gbenson@redhat.com>
5875
5876 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5877 (x86_linux_new_thread): Likewise.
5878
860789c7
GB
58792014-08-29 Gary Benson <gbenson@redhat.com>
5880
5881 * server.h (setjmp.h): Do not include.
5882 (toplevel): Do not declare.
5883 (common-exceptions.h): Include.
5884 (cleanups.h): Likewise.
5885 * server.c (toplevel): Do not define.
5886 (exit_code): New static global.
5887 (detach_or_kill_for_exit_cleanup): New function.
5888 (main): New function. Original main renamed to...
5889 (captured_main): New function.
5890 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5891
ff55e1b5
GB
58922014-08-29 Gary Benson <gbenson@redhat.com>
5893
5894 * Makefile.in (SFILES): Add common/common-exceptions.c.
5895 (OBS): Add common-exceptions.o.
5896 (common-exceptions.o): New rule.
5897 * utils.c (prepare_to_throw_exception): New function.
5898
e9bcb658
GB
58992014-08-29 Gary Benson <gbenson@redhat.com>
5900
5901 * config.in: Regenerate.
5902 * configure: Likewise.
5903
e3180625
GB
59042014-08-29 Gary Benson <gbenson@redhat.com>
5905
5906 * Makefile.in (SFILES): Add common/cleanups.c.
5907 (OBS): cleanups.o.
5908 (cleanups.o): New rule.
5909
e3d6ba5d
GB
59102014-08-29 Gary Benson <gbenson@redhat.com>
5911
5912 * utils.c (internal_vwarning): New function.
5913
7096e886
GB
59142014-08-28 Gary Benson <gbenson@redhat.com>
5915
5916 * utils.h (fatal): Remove declaration.
5917 * utils.c (fatal): Remove function.
5918
14ce3192
GB
59192014-08-28 Gary Benson <gbenson@redhat.com>
5920
5921 * tracepoint.c (gdb_agent_init): Replace fatal with
5922 perror_with_name.
5923 (initialize_tracepoint): Likewise.
5924
50278d59
GB
59252014-08-28 Gary Benson <gbenson@redhat.com>
5926
5927 * remote-utils.c (remote_prepare): Replace fatal with error.
5928
aa96c426
GB
59292014-08-28 Gary Benson <gbenson@redhat.com>
5930
5931 * linux-low.c (linux_async): Replace fatal with warning.
5932 Tidy up and return.
5933 (linux_start_non_stop): Return -1 if linux_async failed.
5934
f7160e97
GB
59352014-08-28 Gary Benson <gbenson@redhat.com>
5936
5937 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5938 gdb_assert.
5939 (i386_dr_low_get_addr): Remove vague comment.
5940 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5941 gdb_assert.
5942
38e08fca
GB
59432014-08-28 Gary Benson <gbenson@redhat.com>
5944
5945 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5946 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5947 internal_error.
5948 (linux_resume_one_lwp): Likewise.
5949 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5950 gdb_assert.
5951 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5952 with internal_error.
5953 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5954 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5955 (find_register_by_name): Replace fatal with internal_error.
5956 (find_regno): Likewise.
5957 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5958 * thread-db.c (thread_db_create_event): Likewise.
5959 (thread_db_load_search): Likewise.
5960 (try_thread_db_load_1): Likewise.
5961 * tracepoint.c (get_jump_space_head): Replace fatal with
5962 internal_error.
5963 (claim_trampoline_space): Likewise.
5964 (have_fast_tracepoint_trampoline_buffer): Likewise.
5965 (cmd_qtstart): Likewise.
5966 (stop_tracing): Likewise.
5967 (fast_tracepoint_collecting): Likewise.
5968 (target_malloc): Likewise.
5969 (download_tracepoint): Likewise.
5970 (download_trace_state_variables): Replace check with gdb_assert.
5971 (upload_fast_traceframes): Replace fatal with internal_error.
5972
34abf635
GB
59732014-08-19 Tom Tromey <tromey@redhat.com>
5974 Gary Benson <gbenson@redhat.com>
5975
5976 * Makefile.in (SFILES): Add common/common-debug.c.
5977 (OBS): Add common-debug.o.
5978 (common-debug.o): New rule.
5979 * debug.h (debug_printf): Don't declare.
5980 * debug.c (debug_printf): Renamed and rewritten as...
5981 (debug_vprintf): New function.
5982
f6e94d78
GB
59832014-08-19 Gary Benson <gbenson@redhat.com>
5984
5985 * utils.h: Do not include print-utils.h.
5986
9239eeab
GB
59872014-08-19 Tom Tromey <tromey@redhat.com>
5988 Gary Benson <gbenson@redhat.com>
5989
5990 * server.h: Add static assertion.
5991 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5992
ef87c8bb
GB
59932014-08-19 Tom Tromey <tromey@redhat.com>
5994 Gary Benson <gbenson@redhat.com>
5995
5996 * Makefile.in (SFILES): Add common/errors.c.
5997 (OBS): Add errors.o.
5998 (IPA_OBS): Add errors-ipa.o.
5999 (errors.o): New rule.
6000 (errors-ipa.o): Likewise.
6001 * utils.h (perror_with_name, error, warning): Don't declare.
6002 * utils.c (warning): Renamed and rewritten as...
6003 (vwarning): New function.
6004 (error): Renamed and rewritten as...
6005 (verror): New function.
6006 (internal_error): Renamed and rewritten as...
6007 (internal_verror): New function.
6008
bb974a24
GB
60092014-08-07 Gary Benson <gbenson@redhat.com>
6010
6011 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6012 * configure: Regenerate.
6013 * config.in: Likewise.
6014 * server.h: Do not include errno.h.
6015 * event-loop.c: Likewise.
6016 * hostio-errno.c: Likewise.
6017 * linux-low.c: Likewise.
6018 * remote-utils.c: Likewise.
6019 * spu-low.c: Likewise.
6020 * utils.c: Likewise.
6021 * gdbreplay.c: Unconditionally include errno.h.
6022
6d3d12eb
GB
60232014-08-07 Gary Benson <gbenson@redhat.com>
6024
6025 * server.h: Do not include string.h.
6026 * event-loop.c: Likewise.
6027 * linux-low.c: Likewise.
6028 * regcache.c: Likewise.
6029 * remote-utils.c: Likewise.
6030 * spu-low.c: Likewise.
6031 * utils.c: Likewise.
6032
dccbb609
GB
60332014-08-07 Gary Benson <gbenson@redhat.com>
6034
6035 * server.h: Do not include gdb_assert.h.
6036
e76df0d0
GB
60372014-08-07 Gary Benson <gbenson@redhat.com>
6038
6039 * server.h: Do not include common-utils.h.
6040
4cb9c816
GB
60412014-08-07 Gary Benson <gbenson@redhat.com>
6042
6043 * server.h: Do not include ptid.h.
6044 * notif.h: Likewise.
6045
3995eeee
GB
60462014-08-07 Gary Benson <gbenson@redhat.com>
6047
6048 * server.h: Do not include gdb_locale.h.
6049
cb9f1a9b
GB
60502014-08-07 Gary Benson <gbenson@redhat.com>
6051
6052 * server.h: Do not include gdb/signals.h.
6053 * win32-low.c: Likewise.
6054
a5fceff8
GB
60552014-08-07 Gary Benson <gbenson@redhat.com>
6056
6057 * server.h: Do not include pathmax.h.
6058
b9391142
GB
60592014-08-07 Gary Benson <gbenson@redhat.com>
6060
6061 * server.h: Do not include libiberty.h.
6062 * linux-bfin-low.c: Likewise.
6063
0e443c87
GB
60642014-08-07 Gary Benson <gbenson@redhat.com>
6065
6066 * server.h: Do not include ansidecl.h.
6067
8ebb3f56
GB
60682014-08-07 Gary Benson <gbenson@redhat.com>
6069
6070 * linux-x86-low.c: Do not include stddef.h.
6071 * lynx-ppc-low.c: Likewise.
6072 * tracepoint.c: Likewise.
6073
8980bdf6
GB
60742014-08-07 Gary Benson <gbenson@redhat.com>
6075
6076 * server.h: Do not include stdarg.h.
6077 * nto-low.c: Likewise.
6078
d7096f71
GB
60792014-08-07 Gary Benson <gbenson@redhat.com>
6080
6081 * server.h: Do not include stdlib.h.
6082 * inferiors.c: Likewise.
6083 * linux-low.c: Likewise.
6084 * regcache.c: Likewise.
6085 * spu-low.c: Likewise.
6086 * tracepoint.c: Likewise.
6087 * utils.c: Likewise.
6088
d02f550d
GB
60892014-08-07 Gary Benson <gbenson@redhat.com>
6090
6091 * server.h: Do not include stdio.h.
6092 * linux-low.c: Likewise.
6093 * remote-utils.c: Likewise.
6094 * spu-low.c: Likewise.
6095 * utils.c: Likewise.
6096 * wincecompat.c: Likewise.
6097
87f6c4e3
GB
60982014-08-06 Gary Benson <gbenson@redhat.com>
6099
6100 * regcache.c (init_register_cache): Move conditionals inside if.
6101
7089dca4
GB
61022014-08-06 Gary Benson <gbenson@redhat.com>
6103
6104 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6105
462f517e
GB
61062014-07-31 Gary Benson <gbenson@redhat.com>
6107
6108 * ax.h: Do not include server.h.
6109 * gdbthread.h: Likewise.
6110 * lynx-low.h: Likewise.
6111 * notif.h: Likewise.
6112
976411d6
GB
61132014-07-30 Gary Benson <gbenson@redhat.com>
6114
6115 * server.h: Include common-defs.h.
6116 Do not include config.h or build-gnulib-gdbserver/config.h.
6117
d41f6d8e
GB
61182014-07-30 Gary Benson <gbenson@redhat.com>
6119
6120 * hostio-errno.c: Move server.h to top of includes list.
6121 * inferiors.c: Likewise.
6122 * linux-x86-low.c: Likewise.
6123 * notif.c: Include server.h.
6124
314c6a35
TT
61252014-07-24 Tom Tromey <tromey@redhat.com>
6126 Gary Benson <gbenson@redhat.com>
6127
6128 * server.h (CORE_ADDR): Now unsigned.
6129
69ff6be5
PA
61302014-07-16 Pedro Alves <palves@redhat.com>
6131
6132 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6133
ce9e3fe7
PA
61342014-07-15 Pedro Alves <palves@redhat.com>
6135
6136 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6137 copy.
6138
e76126e8
PA
61392014-07-11 Pedro Alves <palves@redhat.com>
6140
6141 * linux-low.c (kill_wait_lwp): New function, based on
6142 kill_one_lwp_callback, but use my_waitpid directly.
6143 (kill_one_lwp_callback, linux_kill): Use it.
6144
8e9db26e
PA
61452014-06-23 Pedro Alves <palves@redhat.com>
6146
6147 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6148 before setting DR0..DR3.
6149
698b3e08
GB
61502014-06-20 Gary Benson <gbenson@redhat.com>
6151
6152 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6153 * configure: Regenerated.
6154 * config.in: Likewise.
6155
125f8a3d
GB
61562014-06-20 Gary Benson <gbenson@redhat.com>
6157
6158 * Makefile.in (SFILES): Update locations for files moved
6159 from common to nat.
6160 (object file files): Reordered.
6161
42995dbd
GB
61622014-06-20 Gary Benson <gbenson@redhat.com>
6163
6164 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6165 (i386_dr_low_set_addr): Likewise.
6166 (i386_dr_low_get_addr): Likewise.
6167 (i386_dr_low_can_set_control): Likewise.
6168 (i386_dr_low_set_control): Likewise.
6169 (i386_dr_low_get_control): Likewise.
6170 (i386_dr_low_get_status): Likewise.
6171 (i386_get_debug_register_length): Likewise.
6172 * linux-x86-low.c (i386_dr_low_set_addr):
6173 Changed signature. Made static.
6174 (i386_dr_low_get_addr): Likewise.
6175 (i386_dr_low_set_control): Likewise.
6176 (i386_dr_low_get_control): Likewise.
6177 (i386_dr_low_get_status): Likewise.
6178 (i386_dr_low): New global variable.
6179 * win32-i386-low.c (i386_dr_low_set_addr):
6180 Changed signature. Made static.
6181 (i386_dr_low_get_addr): Likewise.
6182 (i386_dr_low_set_control): Likewise.
6183 (i386_dr_low_get_control): Likewise.
6184 (i386_dr_low_get_status): Likewise.
6185 (i386_dr_low): New global variable.
6186
e1d2394b
MS
61872014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6188
6189 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6190 * Makefile.in (AR, AR_FLAGS): Define.
6191 * configure: Regenerate.
6192
3a8ee006
GB
61932014-06-19 Gary Benson <gbenson@redhat.com>
6194
6195 * Makefile.in (i386-dregs.o): New rule.
6196 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6197 * i386-low.c (target.h): Remove include.
6198 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6199 (DR_CONTROL_SHIFT): Likewise.
6200 (DR_CONTROL_SIZE): Likewise.
6201 (DR_RW_EXECUTE): Likewise.
6202 (DR_RW_WRITE): Likewise.
6203 (DR_RW_READ): Likewise.
6204 (DR_RW_IORW): Likewise.
6205 (DR_LEN_1): Likewise.
6206 (DR_LEN_2): Likewise.
6207 (DR_LEN_4): Likewise.
6208 (DR_LEN_8): Likewise.
6209 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6210 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6211 (DR_ENABLE_SIZE): Likewise.
6212 (DR_LOCAL_SLOWDOWN): Likewise.
6213 (DR_GLOBAL_SLOWDOWN): Likewise.
6214 (DR_CONTROL_RESERVED): Likewise.
6215 (I386_DR_CONTROL_MASK): Likewise.
6216 (I386_DR_VACANT): Likewise.
6217 (I386_DR_LOCAL_ENABLE): Likewise.
6218 (I386_DR_GLOBAL_ENABLE): Likewise.
6219 (I386_DR_DISABLE): Likewise.
6220 (I386_DR_SET_RW_LEN): Likewise.
6221 (I386_DR_GET_RW_LEN): Likewise.
6222 (I386_DR_WATCH_HIT): Likewise.
6223 (i386_wp_op_t): Likewise.
6224 (i386_show_dr): Likewise.
6225 (i386_length_and_rw_bits): Likewise.
6226 (i386_insert_aligned_watchpoint): Likewise.
6227 (i386_remove_aligned_watchpoint): Likewise.
6228 (i386_handle_nonaligned_watchpoint): Likewise.
6229 i386_update_inferior_debug_regs(): Likewise.
6230 (i386_dr_insert_watchpoint): Likewise.
6231 (i386_dr_remove_watchpoint): Likewise.
6232 (i386_dr_region_ok_for_watchpoint): Likewise.
6233 (i386_dr_stopped_data_address): Likewise.
6234 (i386_dr_stopped_by_watchpoint): Likewise.
6235
8f26655c
GB
62362014-06-19 Gary Benson <gbenson@redhat.com>
6237
6238 * i386-low.c (i386_dr_show): Renamed to
6239 i386_show_dr and made static. All uses updated.
6240 (i386_dr_length_and_rw_bits): Renamed to
6241 i386_length_and_rw_bits and made static.
6242 All uses updated.
6243 (i386_dr_insert_aligned_watchpoint): Renamed to
6244 i386_insert_aligned_watchpoint and made static.
6245 All uses updated.
6246 (i386_dr_remove_aligned_watchpoint): Renamed to
6247 i386_remove_aligned_watchpoint and made static.
6248 All uses updated.
6249 (i386_dr_update_inferior_debug_regs): Renamed to
6250 i386_update_inferior_debug_regs and made static.
6251 All uses updated.
6252
b9228891
GB
62532014-06-18 Gary Benson <gbenson@redhat.com>
6254
5171def3
GB
6255 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6256 (i386_dr_low_can_set_control): Likewise.
6257 (i386_get_debug_register_length): Likewise.
6258 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6259 (i386_dr_low_can_set_control): Likewise.
6260 (i386_get_debug_register_length): Likewise.
6261
62622014-06-17 Gary Benson <gbenson@redhat.com>
6263
b9228891
GB
6264 * i386-low.h (i386-dregs.h): New include.
6265 (DR_FIRSTADDR): Now in i386-dregs.h.
6266 (DR_LASTADDR): Likewise.
6267 (DR_NADDR): Likewise.
6268 (DR_STATUS): Likewise.
6269 (DR_CONTROL): Likewise.
6270 (i386_debug_reg_state): Likewise.
6271 (i386_dr_insert_watchpoint): Likewise.
6272 (i386_dr_remove_watchpoint): Likewise.
6273 (i386_dr_region_ok_for_watchpoint): Likewise.
6274 (i386_dr_stopped_data_address): Likewise.
6275 (i386_dr_stopped_by_watchpoint): Likewise.
6276 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6277
4be83cc2
GB
62782014-06-18 Gary Benson <gbenson@redhat.com>
6279
6280 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6281 i386_dr_insert_watchpoint.
6282 (i386_low_remove_watchpoint): Renamed to
6283 i386_dr_remove_watchpoint.
6284 (i386_low_region_ok_for_watchpoint): Renamed to
6285 i386_dr_region_ok_for_watchpoint.
6286 (i386_low_stopped_data_address): Renamed to
6287 i386_dr_stopped_data_address.
6288 (i386_low_stopped_by_watchpoint): Renamed to
6289 i386_dr_stopped_by_watchpoint.
6290 * i386-low.c (i386_show_dr): Renamed to
6291 i386_dr_show and made nonstatic. All uses updated.
6292 (i386_length_and_rw_bits): Renamed to
6293 i386_dr_length_and_rw_bits and made nonstatic.
6294 All uses updated.
6295 (i386_insert_aligned_watchpoint): Renamed to
6296 i386_dr_insert_aligned_watchpoint and made nonstatic.
6297 All uses updated.
6298 (i386_remove_aligned_watchpoint): Renamed to
6299 i386_dr_remove_aligned_watchpoint and made nonstatic.
6300 All uses updated.
6301 (i386_update_inferior_debug_regs): Renamed to
6302 i386_dr_update_inferior_debug_regs and made nonstatic.
6303 All uses updated.
6304 (i386_low_insert_watchpoint): Renamed to
6305 i386_dr_insert_watchpoint. All uses updated.
6306 (i386_low_remove_watchpoint): Renamed to
6307 i386_dr_remove_watchpoint. All uses updated.
6308 (i386_low_region_ok_for_watchpoint): Renamed to
6309 i386_dr_region_ok_for_watchpoint. All uses updated.
6310 (i386_low_stopped_data_address): Renamed to
6311 i386_dr_stopped_data_address. All uses updated.
6312 (i386_low_stopped_by_watchpoint): Renamed to
6313 i386_dr_stopped_by_watchpoint. All uses updated.
6314
131aa0d4
GB
63152014-06-18 Gary Benson <gbenson@redhat.com>
6316
6317 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6318 (i386_dr_low_can_set_control): Likewise.
6319 (i386_insert_aligned_watchpoint): New check.
6320
d9305f7f
GB
63212014-06-18 Gary Benson <gbenson@redhat.com>
6322
6323 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6324 Renamed to state.
6325
e927c9fc
GB
63262014-06-18 Gary Benson <gbenson@redhat.com>
6327
6328 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6329 instead of fatal and error.
6330 (i386_handle_nonaligned_watchpoint): Likewise.
6331
1b6d4134
GB
63322014-06-18 Gary Benson <gbenson@redhat.com>
6333
6334 * i386-low.c (i386_get_debug_register_length): New macro.
6335 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6336 (i386_show_dr): Use debug_printf instead of fprintf. Use
6337 phex to format values.
6338
6e62758f
GB
63392014-06-18 Gary Benson <gbenson@redhat.com>
6340
6341 * i386-low.h: Comment changes.
6342 * i386-low.c: Likewise.
6343
fc6e2f03
GB
63442014-06-18 Gary Benson <gbenson@redhat.com>
6345
6346 * i386-low.c: Whitespace changes.
6347
f9d1eeed
TT
63482014-06-12 Tom Tromey <tromey@redhat.com>
6349
6350 * utils.c (freeargv): Remove.
6351
0b04e523
TT
63522014-06-12 Tom Tromey <tromey@redhat.com>
6353
6354 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6355 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6356 (parse_debug_format_options): Likewise.
6357 (gdbserver_usage): Likewise.
6358 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6359 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6360 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6361 against libiberty.
6362 ($(LIBGNU)): Depend on libiberty.
6363 (all-lib): Recurse into all subdirs.
6364 (install-only): Invoke "install" target in subdirs.
6365 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6366 targets.
6367 * configure: Rebuild.
6368 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6369 for vasprintf, vsnprintf, or gettimeofday.
6370 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6371 srv_tgtobj.
6372
270c9937
JB
63732014-06-05 Joel Brobecker <brobecker@adacore.com>
6374
6375 * development.sh: Delete.
6376 * Makefile.in (config.status): Adjust dependency on development.sh.
6377 * configure.ac: Adjust development.sh source call.
6378 * configure: Regenerate.
6379
0a261ed8
PA
63802014-06-02 Pedro Alves <palves@redhat.com>
6381
6382 * ax.c (gdb_free_agent_expr): New function.
6383 * ax.h (gdb_free_agent_expr): New declaration.
6384 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6385 list.
6386 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6387 static.
6388 (clear_breakpoint_conditions_and_commands): New function.
6389 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6390 (clear_breakpoint_conditions_and_commands): New declaration.
6391
e9dae05e
RR
63922014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6393
6394 * linux-aarch64-low.c (asm/ptrace.h): Include.
6395
5876f503
JK
63962014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6397
6398 Fix TLS access for -static -pthread.
6399 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6400 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6401 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6402
802e8e6d
PA
64032014-05-20 Pedro Alves <palves@redhat.com>
6404
6405 * linux-aarch64-low.c (aarch64_insert_point)
6406 (aarch64_remove_point): No longer check whether the type is
6407 supported here. Adjust to new interface.
6408 (the_low_target): Install aarch64_supports_z_point_type as
6409 supports_z_point_type method.
6410 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6411 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6412 instead of a Z packet char. Adjust.
6413 (arm_supports_z_point_type): New function.
6414 (arm_insert_point, arm_remove_point): Adjust to new interface.
6415 (the_low_target): Install arm_supports_z_point_type.
6416 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6417 (cris_insert_point, cris_remove_point): Adjust to new interface.
6418 Don't check whether the type is supported here.
6419 (the_low_target): Install cris_supports_z_point_type.
6420 * linux-low.c (linux_supports_z_point_type): New function.
6421 (linux_insert_point, linux_remove_point): Adjust to new interface.
6422 * linux-low.h (struct linux_target_ops) <insert_point,
6423 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6424 raw_breakpoint pointer parameter.
6425 <supports_z_point_type>: New method.
6426 * linux-mips-low.c (mips_supports_z_point_type): New function.
6427 (mips_insert_point, mips_remove_point): Adjust to new interface.
6428 Use mips_supports_z_point_type.
6429 (the_low_target): Install mips_supports_z_point_type.
6430 * linux-ppc-low.c (the_low_target): Install NULL as
6431 supports_z_point_type method.
6432 * linux-s390-low.c (the_low_target): Install NULL as
6433 supports_z_point_type method.
6434 * linux-sparc-low.c (the_low_target): Install NULL as
6435 supports_z_point_type method.
6436 * linux-x86-low.c (x86_supports_z_point_type): New function.
6437 (x86_insert_point): Adjust to new insert_point interface. Use
6438 insert_memory_breakpoint. Adjust to new
6439 i386_low_insert_watchpoint interface.
6440 (x86_remove_point): Adjust to remove_point interface. Use
6441 remove_memory_breakpoint. Adjust to new
6442 i386_low_remove_watchpoint interface.
6443 (the_low_target): Install x86_supports_z_point_type.
6444 * lynx-low.c (lynx_target_ops): Install NULL as
6445 supports_z_point_type callback.
6446 * nto-low.c (nto_supports_z_point_type): New.
6447 (nto_insert_point, nto_remove_point): Adjust to new interface.
6448 (nto_target_ops): Install nto_supports_z_point_type.
6449 * mem-break.c: Adjust intro comment.
6450 (struct raw_breakpoint) <raw_type, size>: New fields.
6451 <inserted>: Update comment.
6452 <shlib_disabled>: Delete field.
6453 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6454 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6455 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6456 (raw_bkpt_type_to_target_hw_bp_type): New function.
6457 (find_enabled_raw_code_breakpoint_at): New function.
6458 (find_raw_breakpoint_at): New type and size parameters. Use them.
6459 (insert_memory_breakpoint): New function, based off
6460 set_raw_breakpoint_at.
6461 (remove_memory_breakpoint): New function.
6462 (set_raw_breakpoint_at): Reimplement.
6463 (set_breakpoint): New, based on set_breakpoint_at.
6464 (set_breakpoint_at): Reimplement.
6465 (delete_raw_breakpoint): Go through the_target->remove_point
6466 instead of assuming memory breakpoints.
6467 (find_gdb_breakpoint_at): Delete.
6468 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6469 (find_gdb_breakpoint): New function.
6470 (set_gdb_breakpoint_at): Delete.
6471 (z_type_supported): New function.
6472 (set_gdb_breakpoint_1): New function, loosely based off
6473 set_gdb_breakpoint_at.
6474 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6475 (delete_gdb_breakpoint_at): Delete.
6476 (delete_gdb_breakpoint_1): New function, loosely based off
6477 delete_gdb_breakpoint_at.
6478 (delete_gdb_breakpoint): New function.
6479 (clear_gdb_breakpoint_conditions): Rename to ...
6480 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6481 breakpoint.
6482 (add_condition_to_breakpoint): Make static.
6483 (add_breakpoint_condition): Take a struct breakpoint pointer
6484 instead of an address. Adjust.
6485 (gdb_condition_true_at_breakpoint): Rename to ...
6486 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6487 z_type parameter.
6488 (gdb_condition_true_at_breakpoint): Reimplement.
6489 (add_breakpoint_commands): Take a struct breakpoint pointer
6490 instead of an address. Adjust.
6491 (gdb_no_commands_at_breakpoint): Rename to ...
6492 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6493 parameter. Return true if no breakpoint was found. Change debug
6494 output.
6495 (gdb_no_commands_at_breakpoint): Reimplement.
6496 (run_breakpoint_commands): Rename to ...
6497 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6498 and change return type to boolean.
6499 (run_breakpoint_commands): New function.
6500 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6501 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6502 breakpoint. Go through the_target->remove_point instead of
6503 assuming memory breakpoint.
6504 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6505 software and hardware breakpoints.
6506 (reinsert_raw_breakpoint): Go through the_target->insert_point
6507 instead of assuming memory breakpoint.
6508 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6509 software and hardware breakpoints.
6510 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6511 Check both software and hardware breakpoints.
6512 (validate_inserted_breakpoint): Assert the breakpoint is a
6513 software breakpoint. Set the inserted flag to -1 instead of
6514 setting shlib_disabled.
6515 (delete_disabled_breakpoints): Adjust.
6516 (validate_breakpoints): Only validate software breakpoints.
6517 Adjust to inserted flag change.
6518 (check_mem_read, check_mem_write): Skip breakpoint types other
6519 than software breakpoints. Adjust to inserted flag change.
6520 * mem-break.h (enum raw_bkpt_type): New enum.
6521 (raw_breakpoint, struct process_info): Forward declare.
6522 (Z_packet_to_target_hw_bp_type): Delete declaration.
6523 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6524 (set_gdb_breakpoint, delete_gdb_breakpoint)
6525 (clear_breakpoint_conditions): New declarations.
6526 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6527 (breakpoint_inserted_here): Update comment.
6528 (add_breakpoint_condition, add_breakpoint_commands): Replace
6529 address parameter with a breakpoint pointer parameter.
6530 (gdb_breakpoint_here): Update comment.
6531 (delete_gdb_breakpoint_at): Delete.
6532 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6533 * server.c (process_point_options): Take a struct breakpoint
6534 pointer instead of an address. Adjust.
6535 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6536 delete_gdb_breakpoint.
6537 * spu-low.c (spu_target_ops): Install NULL as
6538 supports_z_point_type method.
6539 * target.h: Include mem-break.h.
6540 (struct target_ops) <prepare_to_access_memory>: Update comment.
6541 <supports_z_point_type>: New field.
6542 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6543 instead of a char. Also take a raw breakpoint pointer.
6544 * win32-arm-low.c (the_low_target): Install NULL as
6545 supports_z_point_type.
6546 * win32-i386-low.c (i386_supports_z_point_type): New function.
6547 (i386_insert_point, i386_remove_point): Adjust to new interface.
6548 (the_low_target): Install i386_supports_z_point_type.
6549 * win32-low.c (win32_supports_z_point_type): New function.
6550 (win32_insert_point, win32_remove_point): Adjust to new interface.
6551 (win32_target_ops): Install win32_supports_z_point_type.
6552 * win32-low.h (struct win32_target_ops):
6553 <supports_z_point_type>: New method.
6554 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6555 instead of a char. Also take a raw breakpoint pointer.
6556
932539e3
PA
65572014-05-20 Pedro Alves <palves@redhat.com>
6558
6559 * mem-break.h: Include break-common.h.
6560 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6561 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6562 (Z_packet_to_target_hw_bp_type): New declaration.
6563 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6564 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6565 (Z_PACKET_ACCESS_WP): Delete macros.
6566 (Z_packet_to_hw_type): Delete function.
6567 * i386-low.h: Don't include break-common.h here.
6568 (Z_packet_to_hw_type): Delete declaration.
6569 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6570 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6571 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6572 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6573 * linux-aarch64-low.c: Don't include break-common.h here.
6574 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6575 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6576 (Z_packet_to_target_hw_bp_type): Delete function.
6577 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6578 function.
6579 (mips_insert_point, mips_remove_point): Use
6580 Z_packet_to_target_hw_bp_type.
6581
4ff0d3d8
PA
65822014-05-20 Pedro Alves <palves@redhat.com>
6583
6584 * linux-aarch64-low.c: Include break-common.h.
6585 (enum target_point_type): Delete.
6586 (Z_packet_to_point_type): Rename to ...
6587 (Z_packet_to_target_hw_bp_type): ... this, and return a
6588 target_hw_bp_type instead.
6589 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6590 instead of an enum target_point_type.
6591 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6592 breakpoint type.
6593 (aarch64_dr_state_insert_one_point)
6594 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6595 (aarch64_handle_aligned_watchpoint)
6596 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6597 Take an enum target_hw_bp_type instead of an enum
6598 target_point_type.
6599 (aarch64_supports_z_point_type): New function.
6600 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6601 use Z_packet_to_target_hw_bp_type.
6602
786dc519
JB
66032014-05-20 Joel Brobecker <brobecker@adacore.com>
6604
6605 * configure.ac: Only use -Werror by default when DEVELOPMENT
6606 is true.
6607 * configure: Regenerate.
6608
9e0aa64f
JK
66092014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6610
6611 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6612 * linux-x86-low.c (X86_64_USER_REGS): New.
6613 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6614
2b577b92
YQ
66152014-04-28 Yao Qi <yao@codesourcery.com>
6616
6617 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6618 name.
6619
94611da2
PA
66202014-04-25 Pedro Alves <palves@redhat.com>
6621
6622 PR server/16255
6623 * linux-low.c (linux_attach_fail_reason_string): New function.
6624 (linux_attach_lwp): Delete.
6625 (linux_attach_lwp_1): Rename to ...
6626 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6627 argument. Remove "initial" parameter. Return int instead of
6628 void. Don't error or warn here.
6629 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6630 failure to attach to the tgid. Call warning when failing to
6631 attach to an lwp.
6632 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6633 argument. Remove "initial" parameter. Return int instead of
6634 void. Don't error or warn here.
6635 (linux_attach_fail_reason_string): New declaration.
6636 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6637 interface change. Use linux_attach_fail_reason_string.
6638
01f9f808
MS
66392014-04-24 Michael Sturm <michael.sturm@mintel.com>
6640 Walfred Tedeschi <walfred.tedeschi@intel.com>
6641
6642 * Makefile.in: Added rules to handle new files
6643 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6644 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6645 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6646 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6647 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6648 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6649 x32-avx512-linux.o.
6650 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6651 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6652 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6653 i386/x32-avx512.xml.
6654 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6655 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6656 i386/x32-avx512-linux.xml.
6657 * i387-fp.c (num_avx512_k_registers): New constant for number
6658 of K registers.
6659 (num_avx512_zmmh_low_registers): New constant for number of
6660 lower ZMM registers (0-15).
6661 (num_avx512_zmmh_high_registers): New constant for number of
6662 higher ZMM registers (16-31).
6663 (num_avx512_ymmh_registers): New contant for number of higher
6664 YMM registers (ymm16-31 added by avx521 on x86_64).
6665 (num_avx512_xmm_registers): New constant for number of higher
6666 XMM registers (xmm16-31 added by AVX512 on x86_64).
6667 (struct i387_xsave): Add space for AVX512 registers.
6668 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6669 Add code to handle AVX512 registers.
6670 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6671 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6672 prototypei from generated file.
6673 (tdesc_amd64_avx512_linux): Likewise.
6674 (init_registers_x32_avx512_linux): Likewise.
6675 (tdesc_x32_avx512_linux): Likewise.
6676 (init_registers_i386_avx512_linux): Likewise.
6677 (tdesc_i386_avx512_linux): Likewise.
6678 (x86_64_regmap): Add AVX512 registers.
6679 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6680 mask.
6681 (initialize_low_arch): Add code to initialize AVX512 registers.
6682
51aa91f9
PA
66832014-04-23 Pedro Alves <palves@redhat.com>
6684
6685 * mem-break.c (find_gdb_breakpoint_at): Make static.
6686 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6687
a4165e94
PA
66882014-04-23 Pedro Alves <palves@redhat.com>
6689
6690 * i386-low.c: Don't include break-common.h here.
6691 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6692 prototype to take target_hw_bp_type as argument instead of a Z
6693 packet char.
6694 * i386-low.h: Include break-common.h here.
6695 (Z_packet_to_hw_type): Declare.
6696 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6697 prototypes.
6698 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6699 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6700 (x86_remove_point): Convert the packet number to a
6701 target_hw_bp_type before calling i386_low_remove_watchpoint.
6702 * win32-i386-low.c (i386_insert_point): Convert the packet number
6703 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6704 (i386_remove_point): Convert the packet number to a
6705 target_hw_bp_type before calling i386_low_remove_watchpoint.
6706
b8acf843
PA
67072014-04-23 Pedro Alves <palves@redhat.com>
6708
6709 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6710
d708bcd1
PA
67112014-04-10 Pedro Alves <palves@redhat.com>
6712
6713 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6714 Check if the condition or command is NULL before checking if the
6715 breakpoint is known. On success, return true.
6716 * mem-break.h (add_breakpoint_condition): Document return.
6717 (add_breakpoint_commands): Add describing comment.
6718 * server.c (skip_to_semicolon): New function.
6719 (process_point_options): Use it.
6720
2eec7d5b
PA
67212014-04-09 Pedro Alves <palves@redhat.com>
6722
6723 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6724 to lwpid_of.
6725
fa96cb38
PA
67262014-02-27 Pedro Alves <palves@redhat.com>
6727
6728 PR 12702
6729 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6730 macros.
6731 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6732 output.
6733 (last_thread_of_process_p): Take a PID argument instead of a
6734 thread pointer.
6735 (linux_wait_for_lwp): Delete.
6736 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6737 functions.
6738 (linux_low_filter_event): New function, party factored out from
6739 linux_wait_for_event.
6740 (linux_wait_for_event): Rename to ...
6741 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6742 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6743 sigsuspend. Check for zombie leaders.
6744 (linux_wait_for_event): Reimplement as wrapper around
6745 linux_wait_for_event_filtered.
6746 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6747 a normal or signal exit is seen, it's the whole process exiting.
6748 (wait_for_sigstop): No longer a for_each_inferior callback.
6749 Rewrite on top of linux_wait_for_event_filtered.
6750 (stop_all_lwps): Call wait_for_sigstop directly.
6751 * server.c (resume, handle_target_event): Handle
6752 TARGET_WAITKIND_NO_RESUMED.
6753
d763de10
JB
67542014-02-26 Joel Brobecker <brobecker@adacore.com>
6755
6756 * win32-low.c (psapi_get_dll_name,
6757 * win32_CreateToolhelp32Snapshot): Delete.
6758 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6759 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6760 Delete.
6761 (handle_load_dll): Add function description.
6762 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6763
850a0f76
JB
67642014-02-26 Joel Brobecker <brobecker@adacore.com>
6765
6766 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6767 Add comment.
6768 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6769 base address when calling win32_add_one_solib.
6770 (handle_load_dll): Delete local variable load_addr.
6771 Remove 0x1000 offset applied to DLL base address when calling
6772 win32_add_one_solib.
6773 (handle_unload_dll): Add comment.
6774
f25b3fc3
JB
67752014-02-26 Joel Brobecker <brobecker@adacore.com>
6776
6777 * win32-low.c (win32_add_all_dlls): Renames
6778 win32_ensure_ntdll_loaded. Rewrite function documentation.
6779 Adjust implementation to always load all DLLs.
6780 Add 0x1000 offset to DLL base address when calling
6781 win32_add_one_solib.
6782 (child_initialization_done): New static global.
6783 (do_initial_child_stuff): Set child_initialization_done to
6784 zero during child initialization, and 1 after. Replace call
6785 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6786 Add comment.
6787 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6788 (handle_unload_dll): Add function documentation.
6789 (get_child_debug_event): Ignore load and unload DLL events
6790 during child initialization.
6791
d86d4aaf
DE
67922014-02-20 Doug Evans <dje@google.com>
6793
3bc32da3 6794 Remove global all_lwps.
d86d4aaf
DE
6795 * inferiors.h (ptid_of): Move here from linux-low.h.
6796 (pid_of, lwpid_of): Ditto.
6797 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6798 parameter is a struct thread_info * now.
6799 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6800 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6801 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6802 directly.
6803 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6804 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6805 * linux-arm-low.c (update_registers_callback): Update, "entry"
6806 parameter is a struct thread_info * now.
6807 Fetch lwpid from current_inferior directly.
6808 (arm_insert_point): Pass &all_threads to find_inferior instead of
6809 &all_lwps.
6810 (arm_remove_point): Ditto.
6811 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6812 (arm_prepare_to_resume): Fetch pid from thread.
6813 (arm_read_description): Fetch lwpid from current_inferior directly.
6814 * linux-low.c (all_lwps): Delete.
6815 (delete_lwp): Delete call to remove_inferior.
6816 (handle_extended_wait): Fetch lwpid from thread.
6817 (add_lwp): Don't set lwp->entry.id. Remove call to
6818 add_inferior_to_list.
6819 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6820 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6821 (kill_one_lwp_callback): Ditto.
6822 (linux_kill): Don't dereference NULL pointer.
6823 Fetch ptid,lwpid from thread.
6824 (get_detach_signal): Fetch ptid from thread.
6825 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6826 Simplify call to regcache_invalidate_thread.
6827 (delete_lwp_callback): Update, "entry" parameter is a
6828 struct thread_info * now. Fetch pid from thread.
6829 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6830 (status_pending_p_callback): Update, "entry" parameter is a
6831 struct thread_info * now. Fetch ptid from thread.
6832 (find_lwp_pid): Update, "entry" parameter is a
6833 struct thread_info * now.
6834 (linux_wait_for_lwp): Fetch pid from thread.
6835 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6836 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6837 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6838 (dequeue_one_deferred_signal): Ditto.
6839 (cancel_breakpoint): Fetch ptid from current_inferior.
6840 (linux_wait_for_event): Pass &all_threads to find_inferior,
6841 not &all_lwps. Fetch ptid, lwpid from thread.
6842 (count_events_callback): Update, "entry" parameter is a
6843 struct thread_info * now.
6844 (select_singlestep_lwp_callback): Ditto.
6845 (select_event_lwp_callback): Ditto.
6846 (cancel_breakpoints_callback): Ditto.
6847 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6848 not &all_lwps.
6849 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6850 (unsuspend_one_lwp): Update, "entry" parameter is a
6851 struct thread_info * now.
6852 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6853 not &all_lwps.
6854 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6855 Fetch lwpid from thread, not lwp.
6856 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6857 Pass &all_threads to find_inferior, not &all_lwps.
6858 (send_sigstop): Fetch lwpid from thread, not lwp.
6859 (send_sigstop_callback): Update, "entry" parameter is a
6860 struct thread_info * now.
6861 (suspend_and_send_sigstop_callback): Ditto.
6862 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6863 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6864 struct thread_info * now.
6865 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6866 from thread, lwp.
6867 (lwp_running): Update, "entry" parameter is a
6868 struct thread_info * now.
6869 (stop_all_lwps): Fetch ptid from thread.
6870 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6871 (linux_resume_one_lwp): Fetch lwpid from thread.
6872 (linux_set_resume_request): Update, "entry" parameter is a
6873 struct thread_info * now. Fetch pid, lwpid from thread.
6874 (resume_status_pending_p): Update, "entry" parameter is a
6875 struct thread_info * now.
6876 (need_step_over_p): Ditto. Fetch lwpid from thread.
6877 (start_step_over): Fetch lwpid from thread.
6878 (linux_resume_one_thread): Update, "entry" parameter is a
6879 struct thread_info * now. Fetch lwpid from thread.
6880 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6881 (proceed_one_lwp): Update, "entry" parameter is a
6882 struct thread_info * now. Fetch lwpid from thread.
6883 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6884 struct thread_info * now.
6885 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6886 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6887 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6888 directly.
6889 (regsets_store_inferior_registers): Ditto.
6890 (fetch_register, store_register): Ditto.
6891 (linux_read_memory, linux_write_memory): Ditto.
6892 (linux_request_interrupt): Ditto.
6893 (linux_read_auxv): Ditto.
6894 (linux_xfer_siginfo): Ditto.
6895 (linux_qxfer_spu): Ditto.
6896 (linux_qxfer_libraries_svr4): Ditto.
6897 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6898 moved to inferiors.h.
6899 (get_lwp): Delete.
6900 (get_thread_lwp): Update.
6901 (struct lwp_info): Delete member "entry". Simplify comment for
6902 member "thread".
6903 (all_lwps): Delete.
6904 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6905 current_inferior directly.
6906 (update_watch_registers_callback): Update, "entry" parameter is a
6907 struct thread_info * now. Fetch pid from thread.
6908 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6909 (mips_insert_point): Fetch lwpid from current_inferior.
6910 Pass &all_threads to find_inferior, not &all_lwps.
6911 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6912 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6913 directly.
6914 (mips_stopped_data_address): Ditto.
6915 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6916 directly.
6917 * linux-tile-low.c (tile_arch_setup): Ditto.
6918 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6919 (update_debug_registers_callback): Update, "entry" parameter is a
6920 struct thread_info * now. Fetch pid from thread.
6921 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6922 Pass &all_threads to find_inferior, not &all_lwps.
6923 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6924 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6925 Pass &all_threads to find_inferior, not &all_lwps.
6926 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6927 (i386_dr_low_get_status): Ditto.
6928 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6929 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6930 (x86_linux_read_description): Ditto.
6931 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6932
3b8361aa
DE
69332014-02-20 Doug Evans <dje@google.com>
6934
6935 * inferiors.c (get_first_inferior): Fix buglet.
6936
f7667f0d
DE
69372014-02-19 Doug Evans <dje@google.com>
6938
6939 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6940 * inferiors.c (add_thread): Change result type to struct thread_info *.
6941 All callers updated.
6942 (add_lwp): Call add_thread here instead of in callers.
6943 All callers updated.
6944 * linux-low.h (get_lwp_thread): Rewrite.
6945 (struct lwp_info): New member "thread".
6946
b3312d80
DE
69472014-02-19 Doug Evans <dje@google.com>
6948
6949 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6950 All callers updated.
6951
ecc6f45c
DE
69522014-02-19 Doug Evans <dje@google.com>
6953
6954 * inferiors.c (add_thread): Fix whitespace.
6955
649ebbca
DE
69562014-02-19 Doug Evans <dje@google.com>
6957
6958 * dll.c (clear_dlls): Replace accessing list implemention details
6959 with API function.
6960 * gdbthread.h (get_first_thread): Declare.
6961 * inferiors.c (for_each_inferior_with_data): New function.
6962 (get_first_thread): New function.
6963 (find_thread_ptid): Simplify.
6964 (get_first_inferior): New function.
6965 (clear_list): Delete.
6966 (one_inferior_p): New function.
6967 (clear_inferior_list): New function.
6968 (clear_inferiors): Update.
6969 * inferiors.h (for_each_inferior_with_data): Declare.
6970 (clear_inferior_list): Declare.
6971 (one_inferior_p): Declare.
6972 (get_first_inferior): Declare.
6973 * linux-low.c (linux_wait_for_event): Replace accessing list
6974 implemention details with API function.
6975 * server.c (target_running): Ditto.
6976 (accumulate_file_name_length): New function.
6977 (emit_dll_description): New function.
6978 (handle_qxfer_libraries): Replace accessing list implemention
6979 details with API function.
6980 (handle_qxfer_threads_worker): New function.
6981 (handle_qxfer_threads_proper): Replace accessing list implemention
6982 details with API function.
6983 (handle_query): Ditto.
6984 (visit_actioned_threads_callback_ftype): New typedef.
6985 (visit_actioned_threads_data): New struct.
6986 (visit_actioned_threads): Rewrite to be find_inferior callback.
6987 (resume): Call find_inferior.
6988 (handle_status): Replace accessing list implemention
6989 details with API function.
6990 (process_serial_event): Replace accessing list implemention details
6991 with API function.
6992 * target.c (set_desired_inferior): Replace accessing list implemention
6993 details with API function.
6994 * tracepoint.c (same_process_p): New function.
6995 (gdb_agent_about_to_close): Replace accessing list implemention
6996 details with API function.
6997 * win32-low.c (child_delete_thread): Replace accessing list
6998 implemention details with API function.
6999 (match_dll_by_basename): New function.
7000 (dll_is_loaded_by_basename): New function.
7001 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7002 details call to dll_is_loaded_by_basename.
7003
80894984
DE
70042014-02-19 Doug Evans <dje@google.com>
7005
7006 * dll.h (struct dll_info): Add comment.
7007 * gdbthread.h (struct thread_info): Add comment.
7008 (current_ptid): Simplify.
7009 * inferiors.c (add_process): Update.
7010 (remove_process): Update.
7011 * inferiors.h (struct process_info): Rename member "head" to "entry".
7012 * linux-low.c (delete_lwp): Update.
7013 (add_lwp): Update.
7014 (last_thread_of_process_p): Update.
7015 (kill_one_lwp_callback, linux_kill): Update.
7016 (status_pending_p_callback): Update.
7017 (wait_for_sigstop): Update. Simplify read of ptid.
7018 (start_step_over): Update.
7019 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7020 (get_lwp_thread): Update.
7021 (struct lwp_info): Rename member "head" to "entry".
7022 * regcache.h (inferior_list_entry): Delete.
7023 * server.c (kill_inferior_callback): Update.
7024 (detach_or_kill_inferior_callback): Update.
7025 (print_started_pid): Update.
7026 (print_attached_pid): Update.
7027 (process_serial_event): Simplify read of ptid.
7028 * thread-db.c (thread_db_create_event): Update.
7029 (thread_db_get_tls_address): Update.
7030 * win32-low.c (current_inferior_ptid): Simplify.
7031
46917d26
TT
70322014-02-19 Tom Tromey <tromey@redhat.com>
7033
7034 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7035 argument.
7036 (target_supports_btrace): Update.
7037
0759a81e
YQ
70382014-02-14 Yao Qi <yao@codesourcery.com>
7039
7040 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7041 (rsp-low-ipa.o): New target.
7042
a7191e8b
TT
70432014-02-12 Tom Tromey <tromey@redhat.com>
7044
7045 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7046 convert_ascii_to_int.
7047 * regcache.c (registers_to_string): Likewise.
7048 * remote-utils.c (decode_M_packet): Likewise.
7049 * server.c (process_serial_event): Likewise.
7050
ff0e980e
TT
70512014-02-12 Tom Tromey <tromey@redhat.com>
7052
7053 * server.c (handle_query, handle_v_run): Use hex2bin, not
7054 unhexify.
7055 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7056
e9371aff
TT
70572014-02-12 Tom Tromey <tromey@redhat.com>
7058
7059 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7060 convert_int_to_ascii.
7061 * regcache.c (registers_to_string, collect_register_as_string):
7062 Likewise.
7063 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7064 Likewise.
7065 * server.c (process_serial_event): Likewise.
7066 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7067 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7068
971dc0b8
TT
70692014-02-12 Tom Tromey <tromey@redhat.com>
7070
7071 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7072 bin2hex, not hexify.
7073 * tracepoint.c (cmd_qtstatus): Likewise.
7074
0a822afb
TT
70752014-02-12 Tom Tromey <tromey@redhat.com>
7076
7077 * remote-utils.c (monitor_output): Pass explicit length to
7078 hexify.
7079
9c3d6531
TT
70802014-02-12 Tom Tromey <tromey@redhat.com>
7081
7082 * tracepoint.c: Include rsp-low.h.
7083 * server.c: Include rsp-low.h.
7084 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7085 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7086 declare.
7087 * remote-utils.c: Include rsp-low.h.
7088 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7089 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7090 (convert_int_to_ascii, convert_ascii_to_int): Move to
7091 common/rsp-low.c.
7092 * regcache.c: Include rsp-low.h.
7093 * ax.c: Include rsp-low.h.
7094 * Makefile.in (SFILES): Add common/rsp-low.c.
7095 (OBS): Add rsp-low.o.
7096 (rsp-low.o): New target.
7097
01fd3ea5
TT
70982014-02-12 Tom Tromey <tromey@redhat.com>
7099
7100 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7101 Include print-utils.h.
7102 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7103 (plongest, thirty_two, phex_nz): Remove.
7104 * Makefile.in (SFILES): Add common/print-utils.c.
7105 (OBS): Add print-utils.o.
7106 (print-utils-ipa.o): New target.
7107 (print-utils.o): New target.
7108 (IPA_OBJS): Add print-utils-ipa.o.
7109
e99dc820
TT
71102014-02-06 Tom Tromey <tromey@redhat.com>
7111
7112 * Makefile.in (SFILES): Fix indentation.
7113
ee1e2d4f
DE
71142014-02-05 Doug Evans <dje@google.com>
7115
7116 * linux-low.c (linux_wait_for_event): Improve comment.
7117 (linux_wait_1): Keep current_inferior in sync with event_child.
7118
f5a02773
DE
71192014-01-22 Doug Evans <dje@google.com>
7120
7121 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7122
87ce2a04
DE
71232014-01-22 Doug Evans <dje@google.com>
7124
7125 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7126 * configure: Regenerate.
7127 * config.in: Regenerate.
7128 * Makefile.in (SFILES): Add debug.c.
7129 (OBS): Add debug.o.
7130 * debug.c: New file.
7131 * debug.h: New file.
7132 * linux-aarch64-low.c (*): Update all debugging printfs to use
7133 debug_printf instead of fprintf.
7134 * linux-arm-low.c (*): Ditto.
7135 * linux-cris-low.c (*): Ditto.
7136 * linux-crisv32-low.c (*): Ditto.
7137 * linux-m32r-low.c (*): Ditto.
7138 * linux-sparc-low.c (*): Ditto.
7139 * linux-x86.c (*): Ditto.
7140 * linux-low.c (*): Ditto.
7141 (linux_wait_1): Add calls to debug_enter, debug_exit.
7142 (linux_wait): Remove redundant debugging printf.
7143 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7144 (linux_resume, unstop_all_lwps): Ditto.
7145 * mem-break.c (*): Update all debugging printfs to use
7146 debug_printf instead of fprintf.
7147 * remote-utils.c (*): Ditto.
7148 * thread-db.c (*): Ditto.
7149 * server.c #include <ctype.h>, "gdb_vecs.h".
7150 (debug_threads): Moved to debug.c.
7151 (*): Update all debugging printfs to use debug_printf instead of
7152 fprintf.
7153 (start_inferior): Replace call to fflush with call to debug_flush.
7154 (monitor_show_help): Mention set debug-format.
7155 (parse_debug_format_options): New function.
7156 (handle_monitor_command): Handle "monitor set debug-format".
7157 (gdbserver_usage): Mention --debug-format.
7158 (main): Parse --debug-format.
7159 * server.h (debug_threads): Declaration moved to debug.h.
7160 #include "debug.h".
7161 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7162 trace_debug_1 that uses debug_printf.
7163 (tracepoint_look_up_symbols): Update all debugging printfs to use
7164 debug_printf instead of fprintf.
7165
e671835b
BS
71662014-01-20 Baruch Siach <baruch@tkos.co.il>
7167
7168 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7169 sys/ptrace.h.
7170
b5737fa9
PA
71712014-01-17 Pedro Alves <palves@redhat.com>
7172
ea38d2a9 7173 PR build/16445
c7faa97a
PA
7174 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7175 defined after including gdb_proc_service.h.
b5737fa9 7176
40ed484e
DE
71772014-01-16 Doug Evans <dje@google.com>
7178
7179 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7180 (match_dll): Use it.
7181
969c39fb
MM
71822014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7183
7184 * target.h (target_ops) <read_btrace>: Change parameters and
7185 return type to allow error reporting.
7186 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7187 trace reading errors on.
7188 * linux-low.c (linux_low_read_btrace): Pass trace reading
7189 errors on.
7190 (linux_low_disable_btrace): New.
7191
ab7f45ba
DE
71922014-01-15 Doug Evans <dje@google.com>
7193
7194 * inferiors.c (thread_id_to_gdb_id): Delete.
7195 * inferiors.h (thread_id_to_gdb_id): Delete.
7196
66af0f44
EZ
71972014-01-13 Eli Zaretskii <eliz@gnu.org>
7198
7199 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7200 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7201 versions.
7202
9939e131
PA
72032014-01-08 Pedro Alves <palves@redhat.com>
7204
7205 * server.c (handle_status): Don't discard previous queued stop
7206 replies or thread's pending status here.
7207 (main) <disconnection>: Do it here instead.
7208
b7ea362b
PA
72092014-01-08 Pedro Alves <palves@redhat.com>
7210
7211 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7212 * server.c (visit_actioned_threads, handle_pending_status): New
7213 function.
7214 (handle_v_cont): Factor out parts to ...
7215 (resume): ... this new function. If in all-stop, and a thread
7216 being resumed has a pending status, report it without actually
7217 resuming.
7218 (myresume): Adjust to use the new 'resume' function.
7219 (clear_pending_status_callback, set_pending_status_callback)
7220 (find_status_pending_thread_callback): New functions.
7221 (handle_status): Handle the case of multiple threads having
7222 interesting statuses to report. Report threads' real last signal
7223 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7224 with an interesting thread to report the status for, instead of
7225 always reporting the status of the first thread.
7226
28498c42
JB
72272014-01-01 Joel Brobecker <brobecker@adacore.com>
7228
7229 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7230 * gdbreplay.c (gdbreplay_version): Likewise.
7231
f45c82da
YZ
72322013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7233
7234 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7235 iov.iov_len with the real length in use.
7236
379a5e2d
JB
72372013-12-13 Joel Brobecker <brobecker@adacore.com>
7238
7239 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7240 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7241 for all targets that use win32-low.c.
7242 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7243 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7244
4210d83e
PA
72452013-12-13 Pedro Alves <palves@redhat.com>
7246
7247 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7248 if equal to TARGET_WAITKIND_LOADED.
7249 * win32-low.c (cached_status): New static global.
7250 (win32_wait): Add declaration.
7251 (do_initial_child_stuff): Flush all initial pending debug events
7252 up to the initial breakpoint.
7253 (win32_wait): If CACHED_STATUS was set, return that instead
7254 of doing a real wait. Remove the code resuming the execution
7255 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7256 during the initial phase. Also remove the code changing
7257 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7258 TARGET_WAITKIND_STOPPED.
7259
e7f0d979
YQ
72602013-12-11 Yao Qi <yao@codesourcery.com>
7261
7262 * notif.c (handle_notif_ack): Return 0 if no notification
7263 matches.
7264
ebcf782c
DE
72652013-11-20 Doug Evans <dje@google.com>
7266
7267 * linux-low.c (linux_set_resume_request): Fix comment.
7268
20ad9378
DE
72692013-11-20 Doug Evans <dje@google.com>
7270
7271 * linux-low.c (resume_status_pending_p): Tweak comment.
7272
a196ebeb
WT
72732013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7274
7275 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7276 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7277 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7278 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7279 (srv_amd64_regobj): Add amd64-mpx.o.
7280 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7281 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7282 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7283 * i387-fp.c (num_pl_bnd_register) Added constant.
7284 (num_pl_bnd_cfg_registers) Added constant.
7285 (struct i387_xsave) Added reserved area and MPX fields.
7286 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7287 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7288 function.
7289 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7290 (init_registers_amd64_mpx_linux): Declare new function.
7291 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7292 (x86_64_regmap): Add MPX registers.
7293 (x86_linux_read_description): Add MPX case.
7294 (initialize_low_arch): Initialize MPX targets.
7295
0080a2f6
TT
72962013-11-18 Tom Tromey <tromey@redhat.com>
7297
7298 * configure: Rebuild.
7299 * configure.ac: Don't check for stdlib.h.
7300 * gdbreplay.c: Unconditionally include stdlib.h.
7301
2978b111
TT
73022013-11-18 Tom Tromey <tromey@redhat.com>
7303
7304 * config.in: Rebuild.
7305 * configure: Rebuild.
7306 * configure.ac: Don't use AC_HEADER_DIRENT.
7307
a3d08894
TT
73082013-11-18 Tom Tromey <tromey@redhat.com>
7309
7310 * server.h: Don't check HAVE_STRING_H.
7311 * gdbreplay.c: Don't check HAVE_STRING_H.
7312 * configure: Rebuild.
7313
0a5dd17d
TT
73142013-11-18 Tom Tromey <tromey@redhat.com>
7315
7316 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7317 LIBGNU.
7318
1bd2f0ba
TT
73192013-11-08 Tom Tromey <tromey@redhat.com>
7320
7321 * configure, config.in: Rebuild.
7322 * configure.ac: Remove unused configury.
7323
3266f10b
TT
73242013-11-08 Tom Tromey <tromey@redhat.com>
7325
7326 * acinclude.m4: Include common.m4, codeset.m4.
7327 * configure, config.in: Rebuild.
7328 * configure.ac: Use GDB_AC_COMMON.
7329
6682d959
AA
73302013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7331
7332 * linux-s390-low.c (HWCAP_S390_TE): New define.
7333 (s390_arch_setup): Consider the TE field in the HWCAP for
7334 determining 'have_regset_tdb'.
7335
fd0a4d76
SDJ
73362013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7337
7338 PR gdb/16014
7339 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7340 call to sizeof.
7341
1a3d890b
PA
73422013-10-02 Pedro Alves <palves@redhat.com>
7343
7344 * server.c (process_serial_event): Don't output "GDBserver
7345 exiting" if GDB is connected through stdio.
7346 * target.c (mywait): Likewise, be silent if GDB is connected
7347 through stdio.
7348
97ad4581
JB
73492013-10-01 Joel Brobecker <brobecker@adacore.com>
7350
7351 * lynx-low.c (lynx_add_threads_after_attach): New function.
7352 (lynx_attach): Remove call to add_thread. Add call to
7353 lynx_add_threads_after_attach instead.
7354
5b4e221c
MF
73552013-09-28 Mike Frysinger <vapier@gentoo.org>
7356
7357 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7358 * config.in, configure: Regenerated.
7359
ee47b2f8
YQ
73602013-09-18 Yao Qi <yao@codesourcery.com>
7361
7362 PR server/15959
7363 * server.c (start_inferior): Clear 'resume_info'.
7364
d6707650 73652013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7366
d6707650
JW
7367 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7368 for each register.
7369
9243dd0e 73702013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7371
9243dd0e
JW
7372 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7373 linux-tile-low.o to srv_tgtobj.
7374
c623a6ef
WN
73752013-09-16 Will Newton <will.newton@linaro.org>
7376
7377 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7378 out regs.
7379
fb71d39e
PA
73802013-09-06 Pedro Alves <palves@redhat.com>
7381
7382 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7383 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7384 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7385 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7386 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7387 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7388
8e7e9910
PA
73892013-09-06 Pedro Alves <palves@redhat.com>
7390
7391 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7392 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7393
7c3a12ca
PA
73942013-09-06 Pedro Alves <palves@redhat.com>
7395
7396 * linux-amd64-ipa.c: Include tracepoint.h.
7397 * linux-i386-ipa.c: Include tracepoint.h.
7398
8eb3d7b6
RW
73992013-09-06 Ricard Wanderlof <ricardw@axis.com>
7400
7401 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7402 (ps_get_thread_area): New function.
7403
eddddb9d
RW
74042013-09-06 Ricard Wanderlof <ricardw@axis.com>
7405
7406 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7407 (initialize_low_arch): Call init_registers_crisv32 rather than
7408 init_register_crisv32.
7409
533b0600
PA
74102013-09-05 Pedro Alves <palves@redhat.com>
7411
7412 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7413 to ...
7414 * hostio.h: ... this new file.
7415 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7416 win32-low.c: Include hostio.h.
7417
0ce3d3b5
PA
74182013-09-05 Pedro Alves <palves@redhat.com>
7419
7420 * server.h (gdb_client_data, handler_func, callback_handler_func)
7421 (delete_file_handler, add_file_handler, append_callback_event)
7422 (delete_callback_event, start_event_loop, initialize_event_loop):
7423 Move to event-loop.h and include it.
7424 * event-loop.h: New file.
7425
799cdc37
PA
74262013-09-05 Pedro Alves <palves@redhat.com>
7427
7428 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7429 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7430 (loaded_dll, unloaded_dll): Move to ...
7431 * dll.h: ... this new file.
7432 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7433
6a6bbd9d
PA
74342013-09-05 Pedro Alves <palves@redhat.com>
7435
7436 * server.h (current_process, get_thread_process, all_processes)
7437 (add_inferior_to_list, for_each_inferior, current_inferior)
7438 (remove_inferior, add_process, remove_process, find_process_pid)
7439 (have_started_inferiors_p, have_attached_inferiors_p)
7440 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7441 (clear_inferiors, find_inferior, find_inferior_id)
7442 (inferior_target_data, set_inferior_target_data)
7443 (inferior_regcache_data, set_inferior_regcache_data): Move to
7444 inferiors.h, and include it.
7445 * inferiors.h: New file.
7446
f699aaba
PA
74472013-09-05 Pedro Alves <palves@redhat.com>
7448
7449 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7450 Move ...
72f4393d 7451 * ax.h: ... here.
f699aaba 7452
c144c7a0
PA
74532013-09-05 Pedro Alves <palves@redhat.com>
7454
7455 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7456 tracepoint.h.
7457 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7458 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7459 (handle_tracepoint_general_set, handle_tracepoint_query)
7460 (tracepoint_finished_step, tracepoint_was_hit)
7461 (release_while_stepping_state_list, current_traceframe)
7462 (in_readonly_region, traceframe_read_mem)
7463 (fetch_traceframe_registers, traceframe_read_sdata)
7464 (traceframe_read_info, struct fast_tpoint_collect_status)
7465 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7466 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7467 (supply_fast_tracepoint_registers)
7468 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7469 (ipa_tdesc, claim_trampoline_space)
7470 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7471 (agent_mem_read, agent_get_trace_state_variable_value)
7472 (agent_set_trace_state_variable_value, agent_tsv_read)
7473 (agent_mem_read_string, get_raw_reg_func_addr)
7474 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7475 * tracepoint.h: ... this new file.
7476
ff42e6ab
PA
74772013-09-05 Pedro Alves <palves@redhat.com>
7478
7479 * server.h (perror_with_name, error, fatal, warning, paddress)
7480 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7481 include it.
7482 * utils.h: New file.
7483
541af0f4
PA
74842013-09-05 Pedro Alves <palves@redhat.com>
7485
7486 * server.h (remote_debug, noack_mode, transport_is_reliable)
7487 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7488 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7489 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7490 (write_enn, initialize_async_io, enable_async_io)
7491 (disable_async_io, check_remote_input_interrupt_request)
7492 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7493 (dead_thread_notify, prepare_resume_reply)
7494 (decode_address_to_semicolon, decode_address, decode_m_packet)
7495 (decode_M_packet, decode_X_packet, decode_xfer_write)
7496 (decode_search_memory_packet, unhexify, hexify)
7497 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7498 (look_up_one_symbol, relocate_instruction)
7499 (monitor_output): Move to remote-utils.h, and include it.
7500 * remote-utils.h: New file.
7501
eebdf26b
PA
75022013-09-05 Pedro Alves <palves@redhat.com>
7503
7504 * server.h (_): Delete.
7505
3aafd2ff
PA
75062013-09-02 Pedro Alves <palves@redhat.com>
7507
7508 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7509 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7510 allocated.
7511 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7512
cee83bcb
PM
75132013-09-02 Pierre Muller <muller@sourceware.org>
7514
7515 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7516 or WriteProcessMemory complete successfully and handle
7517 ERROR_PARTIAL_COPY error.
7518
9a13b2fa
PA
75192013-09-02 Pedro Alves <palves@redhat.com>
7520
7521 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7522 error instead of EIO.
7523
602e3198
JK
75242013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7525
7526 PR server/15604
7527 * linux-low.c: Include filestuff.h.
7528 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7529 * lynx-low.c: Include filestuff.h.
7530 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7531 * server.c: Include filestuff.h.
7532 (main): Call notice_open_fds.
7533 * spu-low.c: Include filestuff.h.
7534 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7535
96d7229d
LM
75362013-08-22 Luis Machado <lgustavo@codesourcery.com>
7537
7538 * Makefile.in: Explain why ../target and ../nat are not
7539 listed as include file search paths.
7540 (linux-waitpid.o): New object file rule.
7541 * configure.srv (srv_native_linux_obj): New variable.
7542 Replace all occurrences of linux native object files with
7543 $srv_native_linux_obj.
7544 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7545 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7546 (linux_enable_event_reporting): Remove declaration.
7547 (my_waitpid): Moved to common/linux-waitpid.c.
7548 (linux_wait_for_event): Pass ptid when calling
7549 linux_enable_event_reporting.
7550 (linux_supports_tracefork_flag): Remove.
7551 (linux_enable_event_reporting): Likewise.
7552 (linux_tracefork_grandchild): Remove.
7553 (STACK_SIZE): Moved to common/linux-ptrace.c.
7554 (linux_tracefork_child): Remove.
7555 (linux_test_for_tracefork): Remove.
7556 (linux_look_up_symbols): Call linux_supports_traceclone.
7557 (initialize_low): Remove call to linux_test_for_tracefork.
7558 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7559 common/linux-ptrace.h.
7560 (PTRACE_TYPE_ARG4): Likewise.
7561 Include linux-ptrace.h.
7562
32940073
PA
75632013-08-21 Pedro Alves <palves@redhat.com>
7564
7565 * config.in: Renegerate.
7566
33b60d58 75672013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7568
33b60d58
LM
7569 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7570 (SFILES): Remove $(srcdir)/common/target-common.c and
7571 add $(srcdir)/target/waitstatus.c.
7572 (OBS): Remove target-common.o and add waitstatus.o.
7573 (server_h): Remove $(srcdir)/../common/target-common.h and
7574 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7575 and $(srcdir)/../target/waitstatus.h.
7576 (target-common.o): Remove.
7577 (waitstatus.o): New target object file.
7578 * target.h: Do not include target-common.h and
7579 include target/resume.h, target/wait.h and
7580 target/waitstatus.h.
7581
b8e1b30e
LM
75822013-08-13 Luis Machado <lgustavo@codesourcery.com>
7583
7584 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7585 to PTRACE_TYPE_ARG3.
7586 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7587 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7588 PTRACE_TYPE_ARG4.
7589 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7590 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7591
7a60ad40
YQ
75922013-07-27 Jie Zhang <jie@codesourcery.com>
7593 Daniel Jacobowitz <dan@codesourcery.com>
7594 Yao Qi <yao@codesourcery.com>
7595
7596 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7597 (mips-linux-watch.o): New rule.
7598 (mips_linux_watch_h): New variable.
7599 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7600 srv_tgtobj.
7601 * linux-mips-low.c: Include mips-linux-watch.h.
7602 (struct arch_process_info, struct arch_lwp_info): New.
7603 (update_watch_registers_callback): New function.
7604 (mips_linux_new_process, mips_linux_new_thread) New functions.
7605 (mips_linux_prepare_to_resume, mips_insert_point): New
7606 functions.
7607 (mips_remove_point, mips_stopped_by_watchpoint): New
7608 functions.
7609 (rsp_bp_type_to_target_hw_bp_type): New function.
7610 (mips_stopped_data_address): New function.
7611 (the_low_target): Add watchpoint support functions.
7612
de6f69ad
YQ
76132013-07-27 Yao Qi <yao@codesourcery.com>
7614
7615 * i386-low.c: Include break-common.h.
7616 (enum target_hw_bp_type): Remove.
7617
3360c0bf
LM
76182013-07-24 Luis Machado <lgustavo@codesourcery.com>
7619
7620 * Makefile.in (SFILES): /common/target-common.c.
7621 (OBS): Add target-common.o.
7622 (server_h): Add $(srcdir)/../common/target-common.h.
7623 (target-common.o): New target.
7624 * server.c (queue_stop_reply_callback): Free
7625 status string after use.
7626 * target.c (target_waitstatus_to_string): Remove.
7627 * target.h: Include target-common.h.
7628 (resume_kind): Likewise.
7629 (target_waitkind): Likewise.
7630 (target_waitstatus): Likewise.
7631 (TARGET_WNOHANG): Likewise.
7632
bd885420
YQ
76332013-07-04 Yao Qi <yao@codesourcery.com>
7634
7635 * Makefile.in (host_alias): Use @host_noncanonical@.
7636 (target_alias): Use @target_noncanonical@.
7637 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7638 ACX_NONCANONICAL_HOST.
7639 * configure: Regenerated.
7640
7641 Revert:
7642 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7643
7644 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7645 * configure: Rebuild.
7646 * Makefile.in (version_host, version_target): Get from configure.
7647 (version.c): Use $(version_host) and $(version_target).
7648
17ef446e
PA
76492013-07-03 Pedro Alves <palves@redhat.com>
7650
7651 * Makefile.in (config.status): Depend on development.sh.
7652 * acinclude.m4: Include libmcheck.m4.
7653 * configure: Regenerate.
7654
7a9a7487
MG
76552013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7656
7657 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7658 attribute inside the parentheses.
7659 (winapi_DebugSetProcessKillOnExit): Ditto.
7660 (winapi_DebugBreakProcess): Ditto.
7661 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7662
49b64de6
MG
76632013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7664
7665 * notif.h (notif_event): Add a dummy member to avoid compiler
7666 errors.
7667
d5749ee7
PA
76682013-07-01 Pedro Alves <palves@redhat.com>
7669
7670 * hostio.c (HOSTIO_PATH_MAX): Define.
7671 (require_filename, handle_open, handle_unlink, handle_readlink):
7672 Use it.
7673
d8d2a3ee
PA
76742013-07-01 Pedro Alves <palves@redhat.com>
7675
7676 * server.h: Include "pathmax.h".
7677 * linux-low.c: Don't include sys/param.h.
7678 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7679 MAXPATHLEN.
7680 * win32-low.c: Don't include sys/param.h.
7681 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7682
bc7dea8d
PA
76832013-07-01 Pedro Alves <palves@redhat.com>
7684
7685 * event-loop.c: Don't check HAVE_UNISTD_H before including
7686 <unistd.h>.
7687 * gdbreplay.c: Likewise.
7688 * remote-utils.c: Likewise.
7689 * server.c: Likewise.
7690 * configure.ac: Don't check for unistd.h.
7691 * configure: Regenerate.
7692
d6c2da54
TT
76932013-06-28 Tom Tromey <tromey@redhat.com>
7694
7695 * Makefile.in (version.c): Use version.in, not
7696 common/version.in.
7697
257b6bec
MG
76982013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7699
7700 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7701 * configure: Rebuild.
7702 * Makefile.in (version_host, version_target): Get from configure.
7703 (version.c): Use $(version_host) and $(version_target).
7704
86ebe149
DK
77052013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7706
7707 Fix trace-status to output user name without trailing colon.
7708 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7709
f30aa5af
DK
77102013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7711
7712 Fix trace-status to output proper start-time and stop-time.
7713 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7714 output start time and stop time in hex as gdb expects.
7715
28a93511
YQ
77162013-06-26 Pedro Alves <pedro@codesourcery.com>
7717
7718 * tracepoint.c (build_traceframe_info_xml): Output trace state
7719 variables present in the trace buffer.
7720
01208463
TT
77212013-06-24 Tom Tromey <tromey@redhat.com>
7722
7723 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7724 create-version.sh.
7725 (version.o): Remove.
7726 * gdbreplay.c: Include version.h.
7727 (version, host_name): Don't declare.
7728 * server.h: Include version.h.
7729 (version, host_name): Don't declare.
7730
760256f9
PA
77312013-06-12 Pedro Alves <palves@redhat.com>
7732
7733 * linux-x86-low.c (linux_is_elf64): Delete global.
7734 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7735 with local linux_pid_exe_is_elf_64_file use.
7736
030031ee
PA
77372013-06-11 Pedro Alves <palves@redhat.com>
7738
7739 * linux-low.c (regset_disabled, disable_regset): New functions.
7740 (regsets_fetch_inferior_registers)
7741 (regsets_store_inferior_registers): Use them.
7742 (initialize_regsets_info); Don't allocate the disabled_regsets
7743 array here.
7744 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7745 comment.
7746
5da6eb0a
PA
77472013-06-11 Pedro Alves <palves@redhat.com>
7748
7749 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7750 xmalloc.
7751
7e5aaa09
PA
77522013-06-11 Pedro Alves <palves@redhat.com>
7753
7754 * linux-x86-low.c (initialize_low_arch): Call
7755 init_registers_x32_avx_linux.
7756
d878444c
JK
77572013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7758
7759 Fix compatibility with Android Bionic.
7760 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7761 it is not empty.
7762
3aee8918
PA
77632013-06-07 Pedro Alves <palves@redhat.com>
7764
5f2b57b5 7765 PR server/14823
3aee8918
PA
7766 * Makefile.in (OBS): Add tdesc.o.
7767 (IPA_OBJS): Add tdesc-ipa.o.
7768 (tdesc-ipa.o): New rule.
7769 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7770 interface.
7771 * linux-low.c (new_inferior): Delete.
7772 (disabled_regsets, num_regsets): Delete.
7773 (linux_add_process): Adjust to set the new per-process
7774 new_inferior flag.
7775 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7776 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7777 was a stop. When calling arch_setup, switch the current inferior
7778 to the thread that got an event.
7779 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7780 (regsets_fetch_inferior_registers)
7781 (regsets_store_inferior_registers): New regsets_info parameter.
7782 Adjust to use it.
7783 (linux_register_in_regsets): New regs_info parameter. Adjust to
7784 use it.
7785 (register_addr, fetch_register, store_register): New usrregs_info
7786 parameter. Adjust to use it.
7787 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7788 parameter regs_info. Adjust to use it.
7789 (linux_fetch_registers): Get the current inferior's regs_info, and
7790 adjust to use it.
7791 (linux_store_registers): Ditto.
7792 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7793 (initialize_low): Don't initialize the target_regsets here. Call
7794 initialize_low_arch.
7795 * linux-low.h (target_regsets): Delete declaration.
7796 (struct regsets_info): New.
7797 (struct usrregs_info): New.
7798 (struct regs_info): New.
7799 (struct process_info_private) <new_inferior>: New field.
7800 (struct linux_target_ops): Delete the num_regs, regmap, and
7801 regset_bitmap fields. New field regs_info.
7802 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7803 * i387-fp.c (num_xmm_registers): Delete.
7804 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7805 calls to new interface.
7806 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7807 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7808 Infer the number of xmm registers from the regcache's target
7809 description.
7810 * i387-fp.h (num_xmm_registers): Delete.
7811 * inferiors.c (add_thread): Don't install the thread's regcache
7812 here.
7813 * proc-service.c (gregset_info): Fetch the current inferior's
7814 regs_info. Adjust to use it.
7815 * regcache.c: Include tdesc.h.
7816 (register_bytes, reg_defs, num_registers)
7817 (gdbserver_expedite_regs): Delete.
7818 (get_thread_regcache): If the thread doesn't have a regcache yet,
7819 create one, instead of aborting gdbserver.
7820 (regcache_invalidate_one): Rename to ...
7821 (regcache_invalidate_thread): ... this.
7822 (regcache_invalidate_one): New.
7823 (regcache_invalidate): Only invalidate registers of the current
7824 process.
7825 (init_register_cache): Add target_desc parameter, and use it.
7826 (new_register_cache): Ditto. Assert the target description has a
7827 non zero registers_size.
7828 (regcache_cpy): Add assertions. Adjust.
7829 (realloc_register_cache, set_register_cache): Delete.
7830 (registers_to_string, registers_from_string): Adjust.
7831 (find_register_by_name, find_regno, find_register_by_number)
7832 (register_cache_size): Add target_desc parameter, and use it.
7833 (free_register_cache_thread, free_register_cache_thread_one)
7834 (regcache_release, register_cache_size): New.
7835 (register_size): Add target_desc parameter, and use it.
7836 (register_data, supply_register, supply_register_zeroed)
7837 (supply_regblock, supply_register_by_name, collect_register)
7838 (collect_register_as_string, collect_register_by_name): Adjust.
7839 * regcache.h (struct target_desc): Forward declare.
7840 (struct regcache) <tdesc>: New field.
7841 (init_register_cache, new_register_cache): Add target_desc
7842 parameter.
7843 (regcache_invalidate_thread): Declare.
7844 (regcache_invalidate_one): Delete declaration.
7845 (regcache_release): Declare.
7846 (find_register_by_number, register_cache_size, register_size)
7847 (find_regno): Add target_desc parameter.
7848 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7849 declarations.
7850 * remote-utils.c: Include tdesc.h.
7851 (outreg, prepare_resume_reply): Adjust.
7852 * server.c: Include tdesc.h.
7853 (gdbserver_xmltarget): Delete declaration.
7854 (get_features_xml, process_serial_event): Adjust.
7855 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7856 declare.
7857 (struct process_info) <tdesc>: New field.
7858 (ipa_tdesc): Declare.
7859 * tdesc.c: New file.
7860 * tdesc.h: New file.
7861 * tracepoint.c: Include tdesc.h.
7862 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7863 (get_context_regcache): Adjust to pass ipa_tdesc down.
7864 (do_action_at_tracepoint): Adjust to get the register cache size
7865 from the context regcache's description.
7866 (traceframe_walk_blocks): Adjust to get the register cache size
7867 from the current trace frame's description.
7868 (traceframe_get_pc): Adjust to get current trace frame's
7869 description and pass it down.
7870 (gdb_collect): Adjust to get the register cache size from the
7871 IPA's description.
7872 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7873 (gdbserver_xmltarget): Delete.
7874 (initialize_low_tracepoint): Set the ipa's target description.
7875 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7876 (initialize_low_tracepoint): Set the ipa's target description.
7877 * linux-x86-low.c: Include tdesc.h.
7878 [__x86_64__] (is_64bit_tdesc): New.
7879 (ps_get_thread_area, x86_get_thread_area): Use it.
7880 (i386_cannot_store_register): Rename to ...
7881 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7882 (i386_cannot_fetch_register): Rename to ...
7883 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7884 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7885 to new interface.
7886 (target_regsets): Rename to ...
7887 (x86_regsets): ... this.
7888 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7889 interface.
7890 (x86_siginfo_fixup): Use is_64bit_tdesc.
7891 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7892 (tdesc_x32_avx_linux, tdesc_x32_linux)
7893 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7894 Declare.
7895 (x86_linux_update_xmltarget): Delete.
7896 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7897 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7898 (AMD64_LINUX_USER64_CS): New.
7899 (x86_linux_read_description): New, based on
7900 x86_linux_update_xmltarget.
7901 (same_process_callback): New.
7902 (x86_arch_setup_process_callback): New.
7903 (x86_linux_update_xmltarget): New.
7904 (x86_regsets_info): New.
7905 (amd64_linux_regs_info): New.
7906 (i386_linux_usrregs_info): New.
7907 (i386_linux_regs_info): New.
7908 (x86_linux_regs_info): New.
7909 (x86_arch_setup): Reimplement.
7910 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7911 (x86_emit_ops): Ditto.
7912 (the_low_target): Adjust. Install x86_linux_regs_info,
7913 x86_cannot_fetch_register, and x86_cannot_store_register.
7914 (initialize_low_arch): New.
7915 * linux-ia64-low.c (tdesc_ia64): Declare.
7916 (ia64_fetch_register): Adjust.
7917 (ia64_usrregs_info, regs_info): New globals.
7918 (ia64_regs_info): New function.
7919 (the_low_target): Adjust.
7920 (initialize_low_arch): New function.
7921 * linux-sparc-low.c (tdesc_sparc64): Declare.
7922 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7923 Adjust.
7924 (sparc_arch_setup): New function.
7925 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7926 (the_low_target): Adjust.
7927 (initialize_low_arch): New function.
7928 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7929 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7930 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7931 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7932 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7933 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7934 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7935 (tdesc_powerpc_isa205_vsx64l): Declare.
7936 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7937 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7938 (ppc_set_pc, ppc_get_hwcap): Adjust.
7939 (ppc_usrregs_info): Forward declare.
7940 (!__powerpc64__) ppc_regmap_adjusted: New global.
7941 (ppc_arch_setup): Adjust to the current process'es target
7942 description.
7943 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7944 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7945 (ppc_store_evrregset): Adjust.
7946 (target_regsets): Rename to ...
7947 (ppc_regsets): ... this, and make static.
7948 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7949 (ppc_regs_info): New function.
7950 (the_low_target): Adjust.
7951 (initialize_low_arch): New function.
7952 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7953 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7954 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7955 (tdesc_s390x_linux64v2): Declare.
7956 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7957 (s390_fill_gregset, s390_store_last_break): Adjust.
7958 (target_regsets): Rename to ...
7959 (s390_regsets): ... this, and make static.
7960 (s390_get_pc, s390_set_pc): Adjust.
7961 (s390_get_hwcap): New target_desc parameter, and use it.
7962 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7963 (s390_arch_setup): Adjust to set the current process'es target
7964 description. Don't adjust the regmap.
7965 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7966 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7967 (regs_info_3264): New globals.
7968 (s390_regs_info): New function.
7969 (the_low_target): Adjust.
7970 (initialize_low_arch): New function.
7971 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7972 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7973 [__mips64] (init_registers_mips_linux)
7974 (init_registers_mips_dsp_linux): Delete defines.
7975 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7976 (have_dsp): New global.
7977 (mips_read_description): New, based on mips_arch_setup.
7978 (mips_arch_setup): Reimplement.
7979 (get_usrregs_info): New function.
7980 (mips_cannot_fetch_register, mips_cannot_store_register)
7981 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7982 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7983 (target_regsets): Rename to ...
7984 (mips_regsets): ... this, and make static.
7985 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7986 (dsp_regs_info, regs_info): New globals.
7987 (mips_regs_info): New function.
7988 (the_low_target): Adjust.
7989 (initialize_low_arch): New function.
7990 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7991 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7992 Declare.
7993 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7994 (arm_read_description): New, with bits factored from
7995 arm_arch_setup.
7996 (arm_arch_setup): Reimplement.
7997 (target_regsets): Rename to ...
7998 (arm_regsets): ... this, and make static.
7999 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8000 (arm_regs_info): New function.
8001 (the_low_target): Adjust.
8002 (initialize_low_arch): New function.
8003 * linux-m68k-low.c (tdesc_m68k): Declare.
8004 (target_regsets): Rename to ...
8005 (m68k_regsets): ... this, and make static.
8006 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8007 (m68k_regs_info): New function.
8008 (m68k_arch_setup): New function.
8009 (the_low_target): Adjust.
8010 (initialize_low_arch): New function.
8011 * linux-sh-low.c (tdesc_sharch): Declare.
8012 (target_regsets): Rename to ...
8013 (sh_regsets): ... this, and make static.
8014 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8015 (sh_regs_info, sh_arch_setup): New functions.
8016 (the_low_target): Adjust.
8017 (initialize_low_arch): New function.
8018 * linux-bfin-low.c (tdesc_bfin): Declare.
8019 (bfin_arch_setup): New function.
8020 (bfin_usrregs_info, regs_info): New globals.
8021 (bfin_regs_info): New function.
8022 (the_low_target): Adjust.
8023 (initialize_low_arch): New function.
8024 * linux-cris-low.c (tdesc_cris): Declare.
8025 (cris_arch_setup): New function.
8026 (cris_usrregs_info, regs_info): New globals.
8027 (cris_regs_info): New function.
8028 (the_low_target): Adjust.
8029 (initialize_low_arch): New function.
8030 * linux-cris-low.c (tdesc_crisv32): Declare.
8031 (cris_arch_setup): New function.
8032 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8033 (cris_regs_info): New function.
8034 (the_low_target): Adjust.
8035 (initialize_low_arch): New function.
8036 * linux-m32r-low.c (tdesc_m32r): Declare.
8037 (m32r_arch_setup): New function.
8038 (m32r_usrregs_info, regs_info): New globals.
8039 (m32r_regs_info): Adjust.
8040 (initialize_low_arch): New function.
8041 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8042 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8043 (tic6x_usrregs_info): Forward declare.
8044 (tic6x_read_description): New function, based on ...
8045 (tic6x_arch_setup): ... this. Reimplement.
8046 (target_regsets): Rename to ...
8047 (tic6x_regsets): ... this, and make static.
8048 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8049 (tic6x_regs_info): New function.
8050 (the_low_target): Adjust.
8051 (initialize_low_arch): New function.
8052 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8053 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8054 (target_regsets): Rename to ...
8055 (xtensa_regsets): ... this, and make static.
8056 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8057 globals.
8058 (xtensa_arch_setup, xtensa_regs_info): New functions.
8059 (the_low_target): Adjust.
8060 (initialize_low_arch): New function.
8061 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8062 (nios2_arch_setup): Set the current process'es tdesc.
8063 (target_regsets): Rename to ...
8064 (nios2_regsets): ... this.
8065 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8066 (nios2_regs_info): New function.
8067 (the_low_target): Adjust.
8068 (initialize_low_arch): New function.
a261b8f5
PA
8069 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8070 (aarch64_arch_setup): Set the current process'es tdesc.
8071 (target_regsets): Rename to ...
8072 (aarch64_regsets): ... this.
8073 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8074 (aarch64_regs_info): New function.
8075 (the_low_target): Adjust.
8076 (initialize_low_arch): New function.
3aee8918
PA
8077 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8078 globals.
8079 (target_regsets): Rename to ...
8080 (tile_regsets): ... this.
8081 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8082 (tile_regs_info): New function.
8083 (tile_arch_setup): Set the current process'es tdesc.
8084 (the_low_target): Adjust.
8085 (initialize_low_arch): New function.
8086 * spu-low.c (tdesc_spu): Declare.
8087 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8088 * win32-arm-low.c (tdesc_arm): Declare.
8089 (arm_arch_setup): New function.
8090 (the_low_target): Install arm_arch_setup instead of
8091 init_registers_arm.
8092 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8093 (init_windows_x86): Rename to ...
8094 (i386_arch_setup): ... this. Set `win32_tdesc'.
8095 (the_low_target): Adjust.
8096 * win32-low.c (win32_tdesc): New global.
8097 (child_add_thread): Don't create the thread cache here.
8098 (do_initial_child_stuff): Set the new process'es tdesc.
8099 * win32-low.h (struct target_desc): Forward declare.
8100 (win32_tdesc): Declare.
8101 * lynx-i386-low.c (tdesc_i386): Declare global.
8102 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8103 * lynx-low.c (lynx_tdesc): New global.
8104 (lynx_add_process): Set the new process'es tdesc.
8105 * lynx-low.h (struct target_desc): Forward declare.
8106 (lynx_tdesc): Declare global.
8107 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8108 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8109 * nto-low.c (nto_tdesc): New global.
8110 (do_attach): Set the new process'es tdesc.
8111 * nto-low.h (struct target_desc): Forward declare.
8112 (nto_tdesc): Declare.
8113 * nto-x86-low.c (tdesc_i386): Declare.
8114 (nto_x86_arch_setup): Set `nto_tdesc'.
8115
b1fbec62
GB
81162013-06-04 Gary Benson <gbenson@redhat.com>
8117
8118 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8119 to qSupported response when appropriate.
8120 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8121 with nonzero-length annex.
8122 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8123 arguments supplied in annex.
8124
d1ec4ce7
DE
81252013-05-31 Doug Evans <dje@google.com>
8126
ac44adcb 8127 PR server/15594
d1ec4ce7
DE
8128 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8129 64 bits in 64-cross-32 environment.
8130
9b25f2d3
PA
81312013-05-28 Pedro Alves <palves@redhat.com>
8132
8133 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8134 (aarch64-without-fpu.c): Delete rule.
8135 * configure.srv (aarch64*-*-linux*): Remove references to
8136 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8137 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8138 declaration.
8139
6740dc9c
PA
81402013-05-24 Pedro Alves <palves@redhat.com>
8141
8142 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8143 instead of strchr/decode_address. Error if the range isn't split
8144 with a ','. Don't assume there's be a ':' in the action.
8145
c2d6af84
PA
81462013-05-23 Yao Qi <yao@codesourcery.com>
8147 Pedro Alves <palves@redhat.com>
8148
8149 * linux-low.c (lwp_in_step_range): New function.
8150 (linux_wait_1): If the thread was range stepping and stopped
8151 outside the stepping range, report the stop to GDB. Otherwise,
8152 continue stepping. Add range stepping debug output.
8153 (linux_set_resume_request): Copy the step range from the resume
8154 request to the lwp.
8155 (linux_supports_range_stepping): New.
8156 (linux_target_ops) <supports_range_stepping>: Set to
8157 linux_supports_range_stepping.
8158 * linux-low.h (struct linux_target_ops)
8159 <supports_range_stepping>: New field.
8160 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8161 * linux-x86-low.c (x86_supports_range_stepping): New.
8162 (the_low_target) <supports_range_stepping>: Set to
8163 x86_supports_range_stepping.
8164 * server.c (handle_v_cont): Handle 'r' action.
8165 (handle_v_requests): Append ";r" if the target supports range
8166 stepping.
8167 * target.h (struct thread_resume) <step_range_start,
8168 step_range_end>: New fields.
8169 (struct target_ops) <supports_range_stepping>:
8170 New field.
8171 (target_supports_range_stepping): New macro.
8172
58794e1a
JB
81732013-05-17 Joel Brobecker <brobecker@adacore.com>
8174
8175 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8176 confusion in comment.
8177
d631c5a7
JB
81782013-05-17 Joel Brobecker <brobecker@adacore.com>
8179
8180 * lynx-low.c (struct process_info_private): New type.
8181 (lynx_add_process): New function.
8182 (lynx_create_inferior, lynx_attach): Replace calls to
8183 add_process by calls to lynx_add_process.
8184 (lynx_resume): If PTID is null, then try using
8185 current_process()->private->last_wait_event_ptid.
8186 Add comments.
8187 (lynx_clear_inferiors): Delete. The contents of that function
8188 has been inlined in lynx_mourn;
8189 (lynx_wait_1): Save the ptid in the process's private data.
8190 (lynx_mourn): Free the process' private data. Replace call
8191 to lynx_clear_inferiors by call to clear_inferiors.
8192
96f7a20f
YQ
81932013-05-17 Yao Qi <yao@codesourcery.com>
8194
8195 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8196 the right place.
8197
db0dfaa0
LM
81982013-05-16 Luis Machado <lgustavo@codesourcery.com>
8199
8200 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8201 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8202 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8203 PT_TEXT_END_ADDR guards. Update comments.
8204 (linux_target_op) <read_offsets>: Conditionally define to
8205 linux_read_offsets if the target is UCLIBC and if it defines
8206 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8207
68f5f838
SL
82082013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8209 Andrew Jenner <andrew@codesourcery.com>
8210
8211 * Makefile.in (SFILES): Add linux-nios2-low.c.
8212 (clean): Add action to delete nios2-linux.c.
8213 (nios2-linux.c): New rule.
8214 * configure.srv: Add nios2*-*-linux*.
8215 * linux-nios2-low.c: New.
8216
1ebff1fd
HAQ
82172013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8218
8219 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8220
f6150862
HZ
82212013-04-25 Hui Zhu <hui@codesourcery.com>
8222
8223 PR gdb/15186
f6150862
HZ
8224 * ax.c (ax_printf): Add fflush.
8225
614c279d
TT
82262013-04-22 Tom Tromey <tromey@redhat.com>
8227
8228 * Makefile.in (SFILES): Add filestuff.c.
8229 (OBS): Add filestuff.o.
8230 (filestuff.o): New target.
8231 * config.in, configure: Rebuild.
8232 * configure.ac: Check for fdwalk, pipe2.
8233
7d4e5717
PA
82342013-04-17 Pedro Alves <palves@redhat.com>
8235
8236 * configure.ac (USE_THREAD_DB): Delete variable.
8237 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8238 Don't AC_SUBST USE_THREAD_DB.
8239 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8240 * config.in, configure: Regenerate.
8241
d5c93e41
PA
82422013-04-16 Pedro Alves <palves@redhat.com>
8243
8244 * linux-low.h (struct lwp_info) <thread_known>: Move under
8245 the USE_THREAD_DB #ifdef.
8246
04f5fe89
PA
82472013-04-16 Pedro Alves <palves@redhat.com>
8248
8249 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8250 (linux-low.o): Delete rule.
8251 * linux-low.h: Always include "gdb_thread_db.h" instead of
8252 conditionally including thread_db.h.
8253 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8254 HAVE_THREAD_DB_H.
8255
480b27bf
JK
82562013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8257
8258 * Makefile.in (install-only): Fix make install regression.
8259
43662968
JK
82602013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8261
8262 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8263 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8264 installation.
8265 * gdbserver.1: Remove.
8266
3e74e146
PA
82672013-03-22 Pedro Alves <palves@redhat.com>
8268
8269 * linux-low.c (handle_extended_wait): Don't call
8270 linux_enable_event_reporting.
8271
a8347a2a
TT
82722013-03-15 Tony Theodore <tonyt@logyst.com>
8273
8274 PR build/9098:
8275 * Makefile.in (SHELL): Use @SHELL@.
8276
eeb56fa7
SDJ
82772013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8278
8279 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8280 compiler warning.
8281
4fa7e2ff
JB
82822013-03-13 Joel Brobecker <brobecker@adacore.com>
8283
8284 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8285 Remove extraneous NULL element.
8286
8ddb1965
YQ
82872013-03-13 Yao Qi <yao@codesourcery.com>
8288
8289 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8290 'V' block in trace frame.
8291
9accd112
MM
82922013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8293
8294 * target.h (struct target_ops): Add btrace ops.
8295 (target_supports_btrace): New macro.
8296 (target_enable_btrace): New macro.
8297 (target_disable_btrace): New macro.
8298 (target_read_btrace): New macro.
8299 * gdbthread.h (struct thread_info): Add btrace field.
8300 * server.c: Include btrace-common.h.
8301 (handle_btrace_general_set): New function.
8302 (handle_btrace_enable): New function.
8303 (handle_btrace_disable): New function.
8304 (handle_general_set): Call handle_btrace_general_set.
8305 (handle_qxfer_btrace): New function.
8306 (struct qxfer qxfer_packets[]): Add btrace entry.
8307 * inferiors.c (remove_thread): Disable btrace.
8308 * linux-low: Include linux-btrace.h.
8309 (linux_low_enable_btrace): New function.
8310 (linux_low_read_btrace): New function.
8311 (linux_target_ops): Add btrace ops.
8312 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8313 Add srv_linux_btrace=yes.
8314 (x86_64-*-linux*): Add linux-btrace.o.
8315 Add srv_linux_btrace=yes.
8316 * configure.ac: Define HAVE_LINUX_BTRACE.
8317 * config.in: Regenerated.
8318 * configure: Regenerated.
8319
5cc22e4c
MM
83202013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8321
8322 * server.c (handle_qxfer): Preserve error message if -3 is
8323 returned.
8324 (qxfer): Document the -3 return value.
8325
7c97f91e
MM
83262013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8327
8328 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8329 (linux_btrace_h): New variable.
8330 (linux-btrace.o): New rule.
8331
be9a119c 83322013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8333 Hafiz Abid Qadeer <abidh@codesourcery.com>
8334
8335 * tracepoint.c (trace_buffer_size): New global.
8336 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8337 (init_trace_buffer): Change to one-argument function. Allocate
8338 trace buffer memory.
8339 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8340 handle QTBuffer:size packet.
8341 (cmd_bigqtbuffer_size): New function.
8342 (initialize_tracepoint): Call init_trace_buffer with
8343 DEFAULT_TRACE_BUFFER_SIZE.
8344 * server.c (handle_query): Add QTBuffer:size in the
8345 supported packets.
8346
e64f7499
YQ
83472013-03-07 Yao Qi <yao@codesourcery.com>
8348
8349 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8350 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8351 of -1.
8352 (cmd_qtsp): Adjust condition. Do post increment.
8353 Set cur_action and cur_step_action back to 0.
8354
f0ae6fc3
PA
83552013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8356
8357 PR server/15236
8358 * linux-low.c (linux_write_memory): Return early success if LEN is
8359 zero.
8360
b5b0b0af
CV
83612013-03-05 Corinna Vinschen <vinschen@redhat.de>
8362
334ad4a8 8363 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8364
589bc927
TT
83652013-02-28 Tom Tromey <tromey@redhat.com>
8366
8367 * configure.ac: Invoke AC_SYS_LARGEFILE.
8368 * configure, config.in: Rebuild.
8369
dfe07582
CV
83702013-02-28 Corinna Vinschen <vinschen@redhat.com>
8371
8372 * win32-low.c: Throughout, fix format strings and casts of
8373 printf-like functions to avoid type related warnings on all
8374 platforms.
8375 (get_child_debug_event): Print dwDebugEventCode as hex since
8376 that's how it's usually documented.
8377
736cd585
YQ
83782013-02-28 Yao Qi <yao@codesourcery.com>
8379
8380 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8381 pulongest.
8382
e1f58301
JW
83832013-02-27 Jiong Wang <jiwang@tilera.com>
8384
8385 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8386 (reg-tilegx32.c): New rule.
8387 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8388 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8389 different register info initializer according to elf class.
8390 (init_registers_tilgx32): New function. The tilegx32 register info
8391 initializer.
8392 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8393 (tile_store_gregset): Likewise.
8394
d171ca78
YQ
83952013-02-27 Yao Qi <yao@codesourcery.com>
8396
8397 * server.c (process_point_options): Print debug message when
8398 debug_threads is true.
8399
282bbdf3
YQ
84002013-02-26 Yao Qi <yao@codesourcery.com>
8401
8402 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8403
aca22551
PA
84042013-02-19 Pedro Alves <palves@redhat.com>
8405 Kai Tietz <ktietz@redhat.com>
8406
8407 PR gdb/15161
8408
8409 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8410 instead of strtoul to extract address from packet.
8411 (process_serial_event) <'z'>: Likewise.
8412
4f3cee1c
YQ
84132013-02-18 Yao Qi <yao@codesourcery.com>
8414
8415 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8416
8e1d55a3
PA
84172013-02-14 Pedro Alves <palves@redhat.com>
8418
8419 Plug memory leak.
8420
8421 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8422 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8423
458820da
PA
84242013-02-14 Pedro Alves <palves@redhat.com>
8425
8426 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8427
baea0dae
PA
84282013-02-14 Pedro Alves <palves@redhat.com>
8429
8430 * tracepoint.c (save_string): Delete.
8431 (add_tracepoint_action): Use savestring instead of save_string.
8432
0b1afbb3
PA
84332013-02-12 Pedro Alves <palves@redhat.com>
8434
8435 * linux-xtensa-low.c: Ditto.
8436 * xtensa-xtregs.c: Ditto.
8437
8a4ac37e
PA
84382013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8439
8440 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8441 thread_db.
8442
148de6bb
MS
84432013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8444
8445 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8446 aarch64_num_wp_regs and aarch64_num_bp_regs to
8447 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8448
55fac6e0
MS
84492013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8450
8451 * linux-aarch64-low.c (ps_get_thread_area): Replace
8452 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8453
176eb98c
MS
84542013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8455 Marcus Shawcroft <marcus.shawcroft@arm.com>
8456 Nigel Stephens <nigel.stephens@arm.com>
8457 Yufeng Zhang <yufeng.zhang@arm.com>
8458
8459 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8460 (aarch64.c, aarch64-without-fpu.c): New targets.
8461 * configure.srv (aarch64*-*-linux*): New.
8462 * linux-aarch64-low.c: New file.
8463
56f7af9c
MS
84642013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8465
43aaf8b6 8466 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8467 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8468 (dequeue_one_deferred_signal, linux_resume_one_thread)
8469 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8470 (linux_tracefork_grandchild, linux_test_for_tracefork)
8471 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8472 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8473 where the argument is 0.
8474
60f662b0
YQ
84752013-01-25 Yao Qi <yao@codesourcery.com>
8476
8477 * event-loop.c: Include "queue.h".
8478 (gdb_event_p): New typedef.
8479 (struct gdb_event) <next_event>: Remove.
8480 (event_queue): Change to QUEUE(gdb_event_p).
8481 (async_queue_event): Remove.
8482 (gdb_event_xfree): New.
8483 (initialize_event_loop): New.
8484 (process_event): Use API from QUEUE.
8485 (wait_for_event): Likewise.
8486 * server.c (main): Call initialize_event_loop.
8487 * server.h (initialize_event_loop): Declare.
8488
5ae4861a
YQ
84892013-01-18 Yao Qi <yao@codesourcery.com>
8490
8491 * ax.h (struct eval_agent_expr_context): New.
8492 (gdb_eval_agent_expr): Update declaration.
8493 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8494 TFRAME. Add new argument CTX.
8495 * server.h (struct eval_agent_expr_context): Declare.
8496 (agent_mem_read, agent_tsv_read): Update declaration.
8497 (agent_mem_read_string): Likewise.
8498 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8499 (add_traceframe_block): Add new argument TPOINT.
8500 Increase TPOINT->traceframe_usage.
8501 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8502 eval_tracepoint_agent_expr.
8503 (condition_true_at_tracepoint): Likewise.
8504 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8505 (agent_mem_read_string, agent_tsv_read): Likewise.
8506
85e00e85
YQ
85072013-01-16 Yao Qi <yao@codesourcery.com>
8508
8509 * linux-low.c (linux_resume_one_lwp): Don't check
8510 'lwp->bp_reinsert != 0'.
8511
4039cf45
JB
85122013-01-07 Joel Brobecker <brobecker@adacore.com>
8513 Pedro Alves <palves@redhat.com>
8514
8515 * lynx-low.c (ptrace_request_to_str): Define a temporary
8516 macro and use it to simplify this function's implementation.
8517
9044dee2
JB
85182013-01-07 Joel Brobecker <brobecker@adacore.com>
8519
8520 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8521 sets errno.
8522
e6352c8f
JB
85232013-01-07 Joel Brobecker <brobecker@adacore.com>
8524
8525 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8526
50681a27
JB
85272013-01-07 Joel Brobecker <brobecker@adacore.com>
8528
8529 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8530
3f6e77ef
JB
85312013-01-07 Joel Brobecker <brobecker@adacore.com>
8532
8533 * lynx-low.c (lynx_resume): Use the resume_info parameter
8534 to determine the ptid for the lynx_ptrace call, unless
8535 it is equal to minus_one_ptid, in which case we use the
8536 ptid of the current_inferior.
8537 (lynx_wait_1): After having received a thread create/exit
8538 event, resume the inferior's execution using the signaling
8539 thread's ptid, rather than the old ptid.
8540
7fda33ae
JB
85412013-01-07 Joel Brobecker <brobecker@adacore.com>
8542
8543 * lynx-low.c (lynx_resume): Delete variable ret.
8544
b9786c74
JB
85452013-01-01 Joel Brobecker <brobecker@adacore.com>
8546
8547 * gdbreplay.c (gdbreplay_version): Update copyright year.
8548 * server.c (gdbserver_version): Likewise.
8549
8b93d60f
JB
85502012-12-17 Joel Brobecker <brobecker@adacore.com>
8551
8552 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8553 new thread.
8554
037335a7
JB
85552012-12-17 Joel Brobecker <brobecker@adacore.com>
8556
8557 * lynx-low.c (ptrace_request_to_str): Add handling for
8558 PTRACE_GETTRACESIG.
8559
52d4cbd8
JB
85602012-12-17 Joel Brobecker <brobecker@adacore.com>
8561
8562 * lynx-low.c (lynx_attach): Delete variable new_process.
8563
ab8f6ca9
JB
85642012-12-17 Joel Brobecker <brobecker@adacore.com>
8565
8566 * lynx-low.c (lynx_create_inferior): Delete variable
8567 new_process.
8568
78cbc024
JB
85692012-12-17 Joel Brobecker <brobecker@adacore.com>
8570
8571 * lynx-low.c (ptrace_request_to_str): Do not handle
8572 PTRACE_GETTHREADLIST if this macro does not exist.
8573
14a00470
YQ
85742012-12-15 Yao Qi <yao@codesourcery.com>
8575
8576 * Makefile.in (OBS): Add notif.o.
8577 * notif.c, notif.h: New.
8578 * server.c: Include "notif.h".
8579 (struct vstop_notif) <next>: Remove.
8580 <base>: New field.
8581 (queue_stop_reply): Update.
8582 (push_event, send_next_stop_reply): Remove.
8583 (discard_queued_stop_replies): Update.
8584 (notif_stop): New variable.
8585 (handle_v_stopped): Remove.
8586 (handle_v_requests): Don't call handle_v_stopped. Call
8587 handle_ack_notif instead.
8588 (queue_stop_reply_callback): Call notif_event_enque instead
8589 of queue_stop_reply.
8590 (handle_status): Don't call send_next_stop_reply, call
8591 notif_write_event instead.
8592 (kill_inferior_callback): Likewise.
8593 (detach_or_kill_inferior_callback): Likewise.
8594 (main): Call initialize_notif.
8595 (process_serial_event): Call QUEUE_is_empty.
8596 (handle_target_event): Call notif_push instead of push event.
8597 * server.h (push_event): Remove declaration.
8598
61c125b9
TT
85992012-12-10 Tom Tromey <tromey@redhat.com>
8600
8601 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8602 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8603 macros.
8604 (.c.o): Rewrite.
8605 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8606 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8607 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8608 (amd64-linux-ipa.o, ax.o): Rewrite.
8609 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8610 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8611 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8612 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8613 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8614 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8615 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8616 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8617 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8618 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8619 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8620 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8621 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8622 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8623 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8624 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8625 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8626 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8627 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8628 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8629 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8630 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8631 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8632 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8633 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8634 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8635 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8636 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8637 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8638 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8639 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8640 (reg-tilegx.o): Remove.
8641 (all_object_files): New macro.
8642 Include .deps files.
8643 * aclocal.m4, configure: Rebuild.
8644 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8645 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8646 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8647
e90e9ad9
TT
86482012-12-05 Tom Tromey <tromey@redhat.com>
8649
8650 PR gdb/14917:
8651 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8652
02d403bf 86532012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8654
8655 * configure.ac: Check for linux/perf_event.h.
8656 * config.in: Regenerated.
8657 * configure: Regenerated.
8658
0270a750
PA
86592012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8660
8661 * hostio.c (handle_readlink): Decrease buffer size
8662 parameter passed to readlink by one byte.
8663
8c29b58e
YQ
86642012-11-26 Yao Qi <yao@codesourcery.com>
8665
8666 * configure.ac (build_warnings): Append '-Wempty-body'.
8667 * configure: Regenerated.
8668 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8669 body.
8670
8bdce1ff
PM
86712012-11-15 Pierre Muller <muller@sourceware.org>
8672
8673 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8674 * config.in: Regenerate.
8675 * configure: Regenerate.
8676 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8677 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8678 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8679 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8680 header.
8681 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8682 instead of <sys/wait.h> header.
8683 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8684
02d403bf 86852012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8686
8687 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8688 (various make rules): Remove -DGDBSERVER
8689
fbd5db48
YQ
86902012-11-09 Yao Qi <yao@codesourcery.com>
8691
8692 * spu-low.c (current_ptid): Move it to ..
8693 * gdbthread.h: ... here. New.
8694 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8695 * server.c (myresume, process_serial_event): Likewise.
8696 * thread-db.c (thread_db_find_new_threads): Likewise.
8697 * tracepoint.c (run_inferior_command): Likewise.
8698
b3dc46ff
AB
86992012-10-01 Andrew Burgess <aburgess@broadcom.com>
8700
8701 * server.c (handle_search_memory_1): Include access length in
8702 warning message.
8703
07c04788
HPN
87042012-09-05 Michael Brandt <michael.brandt@axis.com>
8705
8706 * linux-crisv32-low.c: Fix compile errors.
8707
918d227b
YQ
87082012-09-04 Yao Qi <yao@codesourcery.com>
8709
8710 * tracepoint.c (cmd_qtsv): Adjust debug message.
8711 Don't check CUR_TPOINT.
8712
18c1b81a
YQ
87132012-08-28 Yao Qi <yao@codesourcery.com>
8714
8715 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8716 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8717 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8718 Remove declarations of xmalloc, xreallloc, xstrdup and
8719 freeargv.
8720 * Makefile.in (libiberty_h): New.
8721 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8722 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8723
dc82f37b
YQ
87242012-08-23 Yao Qi <yao@codesourcery.com>
8725
8726 * server.h: Remove declaration of 'xsnprintf'.
8727
406b1477
KS
87282012-08-22 Keith Seitz <keiths@redhat.com>
8729
8730 * server.h: Include build-gnulib-gbserver/config.h.
8731 * gdbreplay.c: Likewise.
8732
e6712ff1
DE
87332012-08-08 Doug Evans <dje@google.com>
8734
8735 * Makefile.in (SFILES): Add gdb_vecs.c.
8736 (OBS): Add gdb_vecs.o.
8737 (gdb_vecs_h, host_defs_h): New variables.
8738 (thread-db.o): Add $(gdb_vecs_h) dependency.
8739 (gdb_vecs.o): New rule.
8740 * thread-db.c: #include "gdb_vecs.h".
8741 (thread_db_load_search): Use a vector to iterate over path elements.
8742 Handle text appearing after "$pdir".
8743
8744 * configure.ac: Add check for strstr.
8745 * config.in: Regenerate.
8746 * configure: Regenerate.
8747
7c3270ae
UW
87482012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8749
8750 * hostio.c (handle_pread): If pread fails, fall back to attempting
8751 lseek/read.
8752 (handle_pwrite): Likewise for pwrite.
8753
b62e2b27
UW
87542012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8755
8756 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8757 between unsupported TYPE and unimplementable ADDR/LEN combination.
8758 (arm_insert_point): Act on new return value.
8759
78a99e91
PA
87602012-07-31 Pedro Alves <palves@redhat.com>
8761
8762 * server.c (process_point_options): Only skip tokens if we find
8763 one that is unrecognized. Don't treat 'X' specially while
8764 skipping unrecognized tokens.
8765
fcf303ab
UW
87662012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8767
8768 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8769 to 4-byte-align HW breakpoint addresses for Thumb.
8770
7255706c
YQ
87712012-07-27 Yao Qi <yao@codesourcery.com>
8772
8773 PR remote/14161.
8774
8775 * server.h: Declare gdb_agent_about_to_close.
8776 * target.c (kill_inferior): Include "agent.h".
8777 New. Send command 'kill'.
8778 * target.h (kill_inferior): Removed macro.
8779 * tracepoint.c (gdb_agent_about_to_close): New.
8780 (gdb_agent_helper_thread): Handle command 'close'.
8781 Wait endlessly until the inferior stops.
8782 Install gdb_agent_remove_socket to atexit hook.
8783 (agent_socket_name): New static variable.
8784 (gdb_agent_socket_init): Replace local variable 'name' with
8785 'agent_socket_name'.
8786 (gdb_agent_remove_socket): New.
8787
5a3f286f
YQ
87882012-07-27 Yao Qi <yao@codesourcery.com>
8789
8790 * server.c (process_point_options): Stop at 'X' when parsing.
8791
961bd387
ME
87922012-07-19 Michael Eager <eager@eagercon.com>
8793
a261b8f5 8794 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8795 to hw_execute.
8796 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8797 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8798 hardware breakpoint.
8799
aa7c7447
JK
88002012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8801
8802 * gdbserver/linux-low.c (initialize_low): Call
8803 linux_ptrace_init_warnings.
8804
7f216e7c
DE
88052012-07-02 Doug Evans <dje@google.com>
8806
8807 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8808 pointer to int.
8809
d3ce09f5
SS
88102012-07-02 Stan Shebs <stan@codesourcery.com>
8811
8812 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8813 (ax.o): Add it to build rule.
8814 (ax-ipa.o): Ditto.
8815 (OBS): Add format.o.
8816 (IPA_OBS): Add format.o.
8817 * server.c (handle_query): Claim support for breakpoint commands.
8818 (process_point_options): Add command case.
8819 (process_serial_event): Leave running if there are printfs in
8820 effect.
8821 * mem-break.h (any_persistent_commands): Declare.
8822 (add_breakpoint_commands): Declare.
8823 (gdb_no_commands_at_breakpoint): Declare.
8824 (run_breakpoint_commands): Declare.
8825 * mem-break.c (struct point_command_list): New struct.
8826 (struct breakpoint): New field command_list.
8827 (any_persistent_commands): New function.
8828 (add_commands_to_breakpoint): New function.
8829 (add_breakpoint_commands): New function.
8830 (gdb_no_commands_at_breakpoint): New function.
8831 (run_breakpoint_commands): New function.
8832 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8833 locally.
8834 * ax.c: Include format.h.
8835 (ax_printf): New function.
8836 (gdb_eval_agent_expr): Add printf opcode.
8837
2f8f6aed
YQ
88382012-06-13 Yao Qi <yao@codesourcery.com>
8839
8840 * server.c (start_inferior): Remove duplicated writes to fields
8841 'last_resume_kind' and 'last_status' of 'current_inferior'.
8842
0c9070b3
YQ
88432012-06-12 Yao Qi <yao@codesourcery.com>
8844 Pedro Alves <palves@redhat.com>
8845
8846 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8847 comment.
8848 * server.c (handle_v_cont): Extend comment.
8849
c52daf70
YQ
88502012-06-11 Yao Qi <yao@codesourcery.com>
8851
8852 * linux-low.c (linux_attach): Add 'static'.
8853
d38bbb0a
YQ
88542012-06-06 Yao Qi <yao@codesourcery.com>
8855
8856 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8857
89dc0afd
JK
88582012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8859
8860 Fix gcc -flto compilation warning.
8861 * server.c (main): Make variable multi_mode and attach volatile.
8862
75f62ce7
TJB
88632012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8864
8865 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8866 if the platform doesn't know about it.
8867
65f479b6
PA
88682012-05-30 Jeff Kenton <jkenton@tilera.com>
8869
8870 * Makefile.in (SFILES): Add linux-tile-low.c.
8871 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8872 * configure.srv: Handle tilegx-*-linux*.
8873 * linux-tile-low.c: New file.
8874
0c5bf5a9
JK
88752012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8876
8877 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8878
a493e3e2
PA
88792012-05-24 Pedro Alves <palves@redhat.com>
8880
8881 PR gdb/7205
8882
43aaf8b6 8883 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8884
2ea28649
PA
88852012-05-24 Pedro Alves <palves@redhat.com>
8886
8887 PR gdb/7205
8888
8889 Replace target_signal with gdb_signal throughout.
8890
8d409d16
MR
88912012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8892
8893 * linux-low.c (linux_store_registers): Avoid the copying sequence
8894 when no data has been retrieved by ptrace.
8895
23512c01
MGD
88962012-05-22 Will Deacon <will.deacon@arm.com>
8897
8898 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8899 Include asm/ptrace.h.
8900 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8901 already defined.
8902
4934b29e
MR
89032012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8904
8905 * linux-low.c (linux_store_registers): Don't re-retrieve data
8906 with ptrace that has already been obtained from /proc. Always
8907 copy any data retrieved with ptrace to the buffer supplied.
8908
bde24c0a
PA
89092012-05-11 Yao Qi <yao@codesourcery.com>
8910 Pedro Alves <palves@redhat.com>
8911
8912 * linux-low.c (enum stopping_threads_kind): New.
8913 (stopping_threads): Change type to `enum stopping_threads_kind'.
8914 (handle_extended_wait): If stopping and suspending threads, leave
8915 the new_lwp suspended too.
8916 (linux_wait_for_event): Adjust.
8917 (stop_all_lwps): Set `stopping_threads' to
8918 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8919 whether we're suspending threads or just stopping them. Assert no
8920 recursion happens.
8921
623b6bdf
YQ
89222012-04-29 Yao Qi <yao@codesourcery.com>
8923
8924 * server.h: Move some code to ...
8925 * gdbthread.h: ... here. New.
8926 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8927 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8928 (nto-low.o, win32-low.o): Likewise.
8929 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8930 * regcache.c, remote-utils.c, server.c: Likewise.
8931 * target.c, tracepoint.c, win32-low.c: Likewise.
8932
f15f9948
TJB
89332012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8934
8935 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8936 (PTRACE_ARG4_TYPE): Likewise.
8937 (PTRACE_XFER_TYPE): Likewise.
8938 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8939 ptrace to PTRACE_ARG3_TYPE.
8940 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8941 (PTRACE_ARG4_TYPE): Likewise.
8942 (PTRACE_XFER_TYPE): Likewise.
8943 (linux_detach_one_lwp): Cast fourth argument of
8944 ptrace to long then PTRACE_ARG4_TYPE.
8945 (regsets_fetch_inferior_registers): Cast third argument of
8946 ptrace to long then PTRACE_ARG3_TYPE.
8947 (regsets_store_inferior_registers): Likewise.
8948
38ea300a
PA
89492012-04-20 Pedro Alves <palves@redhat.com>
8950
8951 * configure: Regenerate.
8952
c971b7fa
PA
89532012-04-19 Pedro Alves <palves@redhat.com>
8954
43aaf8b6 8955 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8956 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8957 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8958 (all, install-only, uninstall, clean-info, all-lib, clean): No
8959 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8960 (maintainer-clean realclean distclean): Use subdir_do.
8961 (subdir_do): New.
8962 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8963 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8964 * acinclude.m4: Include acx_configure_dir.m4.
8965 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8966 calls. Call AC_PROG_RANLIB. Configure gnulib using
8967 ACX_CONFIGURE_DIR.
8968 (GNULIB): New.
8969 (GNULIB_STDINT_H): Adjust.
8970 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8971 * gdbreplay.c: Include build-gnulib/config.h.
8972 * server.h: Likewise.
8973 * aclocal.m4: Regenerate.
8974 * config.in: Regenerate.
8975 * configure: Regenerate.
c971b7fa 8976
809277f8
PA
89772012-04-19 Pedro Alves <palves@redhat.com>
8978
8979 * Makefile.in (LIBGNU, INCGNU): Adjust.
8980 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8981 (all, install-only, uninstall, clean-info, all-lib, clean)
8982 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8983 * configure.ac: Adjust AC_OUTPUT output.
8984 * aclocal.m4: Regenerate.
8985 * configure: Regenerate.
8986
fd9bb8b8
PA
89872012-04-19 Pedro Alves <palves@redhat.com>
8988
8989 * Makefile.in (generated_files): New.
8990 (server_h): Remove the explicit dependency on config.h, and depend
8991 on $generated_files.
8992
1c298c66
PA
89932012-04-19 Pedro Alves <palves@redhat.com>
8994
8995 * Makefile.in (INCGNU): Add -Ignulib.
8996
57c4b50b
PA
89972012-04-19 Pedro Alves <palves@redhat.com>
8998
8999 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9000 (INCGNU): ... this, and spell out -I here.
9001 (GNULIB_LIB): Rename to ...
9002 (LIBGNU): ... this.
9003 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9004
1030e047
PA
90052012-04-19 Pedro Alves <palves@redhat.com>
9006
9007 * config.in: Regenerate.
9008
447d4319
PA
90092012-04-19 Pedro Alves <palves@redhat.com>
9010
9011 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9012 * server.h (memmem): Remove declaration.
9013 * config.in: Regenerate.
9014 * configure: Regenerate.
9015
aad9eab9
YQ
90162012-04-19 Yao Qi <yao@codesourcery.com>
9017
9018 * Makefile.in (SFILES): Add common/vec.c.
9019 (OBS): Add vec.o.
9020 (vec.o): New rule.
9021
3e10640f
YQ
90222012-04-19 Yao Qi <yao@codesourcery.com>
9023
9024 * remote-utils.c (prepare_resume_reply): Replace with macro
9025 target_core_of_thread.
9026 * server.c (handle_qxfer_threads_proper): Likewise.
9027 * target.h (traget_core_of_thread): New macro.
9028
71622373
PA
90292012-04-18 Pedro Alves <palves@redhat.com>
9030
9031 * aclocal.m4: Regenerate.
9032 * configure: Regenerate.
9033
80d26939
YQ
90342012-04-16 Yao Qi <yao@codesourcery.com>
9035
9036 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9037 duplicated on address.
9038
42476b70
YQ
90392012-04-16 Yao Qi <yao@codesourcery.com>
9040
9041 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9042 (struct tracepoint_action_ops) <send>: New field.
9043 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9044 (agent_expr_send, x_tracepoint_action_send): New.
9045 (l_tracepoint_action_send): New.
9046 (cmd_qtdp): Download and install tracepoint
9047 according to `use_agent'.
9048 (run_inferior_command): Add one more parameter `len'.
9049 Update callers.
9050 (tracepoint_send_agent): New.
9051 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9052
7bc83639
YQ
90532012-04-16 Yao Qi <yao@codesourcery.com>
9054
9055 * tracepoint.c (download_tracepoints): Moved to ...
9056 (cmd_qtstart): ... here.
9057
5f18041e
YQ
90582012-04-14 Yao Qi <yao@codesourcery.com>
9059
9060 * tracepoint.c: Include inttypes.h.
9061 (struct collect_memory_action): Use sized types.
9062 (struct tracepoint): Likewise.
9063 (cmd_qtdp, stop_tracing): Update print specifiers.
9064 (cmd_qtp, response_tracepoint): Likewise.
9065 (collect_data_at_tracepoint): Likewise.
9066 (collect_data_at_step): Likewise.
9067
55a8c076
YQ
90682012-04-14 Yao Qi <yao@codesourcery.com>
9069
9070 Import gnulib module inttypes.
9071 * aclocal.m4, config.in, configure: Regenerated.
9072
dc750257
YQ
90732012-04-14 Yao Qi <yao@codesourcery.com>
9074
9075 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9076 Makefile and config.status at last.
9077
0ab5faf9
YQ
90782012-04-13 Yao Qi <yao@codesourcery.com>
9079
9080 * tracepoint.c: Include stdint.h unconditionally.
9081
18f5fd81
TJB
90822012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9083
9084 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9085 on BFD_HAVE_SYS_PROCFS_TYPE.
9086 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9087 * configure: Regenerate.
9088 * config.in: Likewise.
9089
4d47af5c
L
90902012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9091
9092 * Makefile.in (clean): Also remove x32.c x32-linux.c
9093 x32-avx.c x32-avx-linux.c.
9094 (x32.o): New target.
9095 (x32.c): Likewise.
9096 (x32-linux.o): Likewise.
9097 (x32-linux.c): Likewise.
9098 (x32-avx.o): Likewise.
9099 (x32-avx.c): Likewise.
9100 (x32-avx-linux.o): Likewise.
9101 (x32-avx-linux.c): Likewise.
9102
9103 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9104 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9105 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9106 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9107 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9108 i386/x32-avx-linux.xml.
9109
9110 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9111 (init_registers_x32_avx_linux): Likwise.
9112 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9113 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9114
ecedbe58
PA
91152012-04-13 Pedro Alves <palves@redhat.com>
9116
9117 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9118 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9119 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9120 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9121 the sub-make.
9122
c92b5177
L
91232012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9124
9125 * linux-x86-low.c (compat_x32_clock_t): New.
9126 (compat_x32_siginfo_t): Likewise.
9127 (compat_x32_siginfo_from_siginfo): Likewise.
9128 (siginfo_from_compat_x32_siginfo): Likewise.
9129 (linux_is_elf64): Likewise.
9130 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9131 and siginfo_from_compat_x32_siginfo for x32.
9132 (x86_arch_setup): Set linux_is_elf64.
9133
214d508e
L
91342012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9135
9136 PR gdb/13969
9137 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9138 e_machine field.
9139 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9140 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9141 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9142 compatible with process.
9143
c9a1864a
YQ
91442012-04-12 Yao Qi <yao@codesourcery.com>
9145
9146 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9147 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9148 (install-only, install-info, clean): Handle sub dir gnulib.
9149 (all-lib, am--refresh): New targets.
9150 (memmem.o): Remove target.
9151 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9152 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9153 (AC_REPLACE_FUNCS): Remove memmem.
9154 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9155 (AC_OUTPUT): Generate Makefile in gnulib/.
9156 * aclocal.m4, config.in, configure: Regenerated.
9157
367ba2c2
MR
91582012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9159
9160 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9161
9d236627
PA
91622012-04-05 Pedro Alves <palves@redhat.com>
9163
9164 -Werror=strict-aliasing
9165
9166 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9167 pointer.
9168
111217b3
PA
91692012-04-04 Pedro Alves <palves@redhat.com>
9170
9171 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9172 (sparc_store_gregset_from_stack, sparc_store_gregset)
9173 (sparc_breakpoint_at): Fix formatting.
9174
8365dcf5
TJB
91752012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9176
9177 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9178 are available.
9179 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9180 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9181 * config.in: Regenerate.
9182 * configure: Likewise.
9183
689cc2ae
PA
91842012-03-29 Pedro Alves <palves@redhat.com>
9185
9186 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9187 Correct ptrace arguments.
9188
c14dfd32
PA
91892012-03-28 Pedro Alves <palves@redhat.com>
9190
9191 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9192 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9193 (IA64_FR1_REGNUM): New defines.
9194 (ia64_fetch_register): New.
9195 (the_low_target): Install it.
9196 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9197 field.
9198 * linux-low.c (linux_fetch_registers): Try the
9199 the_low_target.fetch_register hook first.
9200
9201 * linux-arm-low.c (the_low_target): Adjust.
9202 * linux-bfin-low.c (the_low_target): Adjust.
9203 * linux-cris-low.c (the_low_target): Adjust.
9204 * linux-crisv32-low.c (the_low_target): Adjust.
9205 * linux-m32r-low.c (the_low_target): Adjust.
9206 * linux-m68k-low.c (the_low_target): Adjust.
9207 * linux-mips-low.c (the_low_target): Adjust.
9208 * linux-ppc-low.c (the_low_target): Adjust.
9209 * linux-s390-low.c (the_low_target): Adjust.
9210 * linux-sh-low.c (the_low_target): Adjust.
9211 * linux-sparc-low.c (the_low_target): Adjust.
9212 * linux-tic6x-low.c (the_low_target): Adjust.
9213 * linux-x86-low.c (the_low_target): Adjust.
9214 * linux-xtensa-low.c (the_low_target): Adjust.
9215
63c88e13
PA
92162012-03-26 Pedro Alves <palves@redhat.com>
9217
9218 * server.c (handle_qxfer_libraries): Don't bail early if
9219 the_target->qxfer_libraries_svr4 is not NULL.
9220
fb723180
PA
92212012-03-26 Pedro Alves <palves@redhat.com>
9222
9223 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9224
0afae3cf
PA
92252012-03-23 Pedro Alves <palves@redhat.com>
9226
9227 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9228 "library-list-svr4" element's start tag when the the DSO list is
9229 empty.
9230
485f1ee4
PA
92312012-03-23 Pedro Alves <palves@redhat.com>
9232
9233 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9234 a variable whose type size is the same as the inferior's pointer
9235 size.
9236
a5362b9a
TS
92372012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9238
9239 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9240 struct siginfo.
9241 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9242 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9243 * linux-low.h: Include <signal.h>.
9244 (struct siginfo): Remove forward declaration.
9245 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9246 struct siginfo.
9247
d226c142
MF
92482012-03-21 Mike Frysinger <vapier@gentoo.org>
9249
9250 * .gitignore: Ignore more files.
9251
122f36ef
PA
92522012-03-19 Pedro Alves <palves@redhat.com>
9253 Jan Kratochvil <jan.kratochvil@redhat.com>
9254
9255 * server.c (cont_thread, general_thread): Add describing comments.
9256 (start_inferior): Clear `cont_thread'.
9257 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9258 of a process.
9259
fc3e5175
YQ
92602012-03-15 Yao Qi <yao@codesourcery.com>
9261
9262 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9263 handling to ...
9264 (cmd_qtdp): ... here.
9265
8d0d92cd
YQ
92662012-03-15 Yao Qi <yao@codesourcery.com>
9267
9268 * tracepoint.c (struct tracepoint_action_ops): New.
9269 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9270 (m_tracepoint_action_download): New.
9271 (r_tracepoint_action_download): New.
9272 (x_tracepoint_action_download): New.
9273 (l_tracepoint_action_download): New.
9274 (add_tracepoint_action): Install `action->ops' according type.
9275 (download_tracepoint_1): Move code `download' function pointer
9276 of various tracepoint_action_ops.
9277
87b0bb13
JK
92782012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9279
9280 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9281 linux_ptrace_attach_warnings.
9282
5f572dec
JK
92832012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9284
9285 * Makefile.in (linux-ptrace.o): New.
9286 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9287 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9288 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9289 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9290 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9291 of these targets.
9292 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9293
f4647387
YQ
92942012-03-08 Yao Qi <yao@codesourcery.com>
9295 Pedro Alves <palves@redhat.com>
9296
9297 Fix PR server/13392.
9298 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9299 offset of JMP insn.
9300 * tracepoint.c (remove_tracepoint): New.
9301 (cmd_qtdp): Call remove_tracepoint when failed to install.
9302
9b224c5e
PA
93032012-03-07 Pedro Alves <palves@redhat.com>
9304
9305 * linux-low.c (get_detach_signal): New.
9306 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9307 Pass on pending signals to PTRACE_DETACH. Check the result of the
9308 ptrace call.
9309 * server.c (program_signals, program_signals_p): New.
9310 (handle_general_set): Handle QProgramSignals.
9311 * server.h (program_signals, program_signals_p): Declare.
9312
e237a7e2
JK
93132012-03-05 Pedro Alves <palves@redhat.com>
9314 Jan Kratochvil <jan.kratochvil@redhat.com>
9315
9316 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9317 New comment why.
9318
5808517f
YQ
93192012-03-03 Yao Qi <yao@codesourcery.com>
9320
9321 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9322 agent_look_up_symbols.
9323
58b4daa5
YQ
93242012-03-03 Yao Qi <yao@codesourcery.com>
9325
9326 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9327 (linux-x86-low.o): Likewise.
9328 * server.h: Remove in_process_agent_loaded.
9329 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9330 common/agent.c.
9331 Update callers.
9332
8ffcbaaf
YQ
93332012-03-03 Yao Qi <yao@codesourcery.com>
9334
9335 * tracepoint.c (gdb_agent_capability): New global.
9336 (in_process_agent_loaded_ust): Renamed to
9337 `in_process_agent_supports_ust'.
9338 Update callers.
9339 (in_process_agent_supports_ust): Call agent_capability_check.
9340 (clear_installed_tracepoints): Assert that agent supports
9341 agent.
9342
d1feda86
YQ
93432012-03-03 Yao Qi <yao@codesourcery.com>
9344
9345 * linux-low.c (linux_supports_agent): New.
9346 (linux_target_ops): Initialize field `supports_agent' with
9347 linux_supports_agent.
9348 * target.h (struct target_ops) <supports_agent>: New.
9349 (target_supports_agent): New macro.
9350 * server.c (handle_general_set): Handle packet 'QAgent'.
9351 (handle_query): Send `QAgent+'.
9352 * Makefile.in (server.o): Depends on agent.h.
9353
2fa291ac
YQ
93542012-03-03 Yao Qi <yao@codesourcery.com>
9355
9356 * Makefile.in (OBS): Add agent.o.
9357 Add new rule for agent.o.
9358 Track dependence of tracepoint.c on agent.h.
9359 * tracepoint.c (run_inferior_command_1):
9360 (run_inferior_command): Call agent_run_command.
9361 (gdb_ust_connect_sync_socket): Deleted. Move it to
9362 common/agent.c.
9363 (resume_thread, stop_thread): Likewise.
9364 (gdb_ust_socket_init): Renamed to ...
9365 (gdb_agent_socket_init): ... New.
9366 (gdb_ust_thread): Renamed to ...
9367 (gdb_agent_helper_thread): ... New.
9368 (gdb_ust_init): Move some code to ...
9369 (gdb_agent_init): ... here. New.
9370 [HAVE_UST]: Call gdb_ust_init.
9371 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9372 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9373 * config.in, configure: Regenerated.
9374
05044653
PA
93752012-03-02 Pedro Alves <palves@redhat.com>
9376
9377 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9378 * linux-low.c (struct simple_pid_list): New.
9379 (stopped_pids): New a struct simple_pid_list pointer.
9380 (add_to_pid_list, pull_pid_from_list): New.
9381 (handle_extended_wait): Don't assume the first signal new children
9382 report is SIGSTOP. Adjust call to pull_pid_from_list.
9383 (linux_wait_for_lwp): Adjust.
9384
8d00225b
YQ
93852012-03-02 Yao Qi <yao@codesourcery.com>
9386
9387 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9388 debug log.
9389
19560ba5
YQ
93902012-03-02 Yao Qi <yao@codesourcery.com>
9391
9392 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9393 `stop_pc' and `tpoint'. Update caller.
9394
1faeff08
MR
93952012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9396
9397 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9398 * linux-low.c (use_linux_regsets): New macro.
9399 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9400 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9401 (linux_register_in_regsets): New function.
9402 (usr_fetch_inferior_registers): Skip registers covered by
9403 regsets.
9404 (usr_store_inferior_registers): Likewise.
9405 (usr_fetch_inferior_registers): New macro.
9406 (usr_store_inferior_registers): Likewise.
9407 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9408 (linux_store_registers): Likewise.
9409 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9410 prototype.
9411 (init_registers_mips64_dsp_linux): Likewise.
9412 (init_registers_mips_linux): New macro.
9413 (init_registers_mips_dsp_linux): Likewise.
9414 (mips_dsp_num_regs): Likewise.
9415 (DSP_BASE, DSP_CONTROL): New fallback macros.
9416 (mips_base_regs): New macro.
9417 (mips_regmap): Use it. Fix the size.
9418 (mips_dsp_regmap): New variable.
9419 (mips_dsp_regset_bitmap): Likewise.
9420 (mips_arch_setup): New function.
9421 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9422 than mips_regmap.
9423 (mips_cannot_store_register): Likewise.
9424 (the_low_target): Update .arch_setup, .num_regs and .regmap
9425 initializers. Add .regset_bitmap initializer.
9426 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9427 initializer.
9428 * linux-bfin-low.c (the_low_target): Likewise.
9429 * linux-cris-low.c (the_low_target): Likewise.
9430 * linux-crisv32-low.c (the_low_target): Likewise.
9431 * linux-ia64-low.c (the_low_target): Likewise.
9432 * linux-m32r-low.c (the_low_target): Likewise.
9433 * linux-m68k-low.c (the_low_target): Likewise.
9434 * linux-ppc-low.c (the_low_target): Likewise.
9435 * linux-s390-low.c (the_low_target): Likewise.
9436 * linux-sh-low.c (the_low_target): Likewise.
9437 * linux-sparc-low.c (the_low_target): Likewise.
9438 * linux-tic6x-low.c (the_low_target): Likewise.
9439 * linux-x86-low.c (the_low_target): Likewise.
9440 * linux-xtensa-low.c (the_low_target): Likewise.
9441 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9442 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9443 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9444 srv_xmlfiles.
9445 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9446 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9447
c03e6ccc
YQ
94482012-02-29 Yao Qi <yao@codesourcery.com>
9449 Pedro Alves <palves@redhat.com>
9450
9451 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9452 `step_over_finished' is true.
9453
644cebc9
PA
94542012-02-27 Pedro Alves <palves@redhat.com>
9455
9456 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9457 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9458
c14d7ab2
PA
94592012-02-27 Pedro Alves <palves@redhat.com>
9460
9461 PR server/9684
9462 * linux-low.c (pid_is_stopped): New.
9463 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9464
412c89dd
LM
94652012-02-25 Luis Machado <lgustavo@codesourcery.com>
9466
9467 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9468 of conditions.
9469
b745defe
MR
94702012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9471
9472 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9473
9f3a5c85
LM
94742012-02-24 Luis Machado <lgustavo@codesourcery>
9475
9476 * server.c (handle_query): Advertise support for target-side
9477 breakpoint condition evaluation.
9478 (process_point_options): New function.
9479 (process_serial_event): When inserting a breakpoint, check for
9480 a target-side condition that should be evaluated.
9481
9482 * mem-break.c: Include regcache.h and ax.h.
9483 (point_cond_list_t): New data structure.
9484 (breakpoint) <cond_list>: New field.
9485 (find_gdb_breakpoint_at): Make non-static.
9486 (delete_gdb_breakpoint_at): Clear any target-side
9487 conditions.
9488 (clear_gdb_breakpoint_conditions): New function.
9489 (add_condition_to_breakpoint): Likewise.
9490 (add_breakpoint_condition): Likewise.
9491 (gdb_condition_true_at_breakpoint): Likewise.
9492 (gdb_breakpoint_here): Return result directly instead
9493 of going through a local variable.
9494
9495 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9496 (clear_gdb_breakpoint_conditions): Likewise.
9497 (add_breakpoint_condition): Likewise.
9498 (gdb_condition_true_at_breakpoint): Likewise.
9499
9500 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9501 (need_step_over_p): Take target-side breakpoint condition into
9502 consideration.
9503
5e1dc496
LM
95042012-02-24 Luis Machado <lgustavo@codesourcery>
9505
9506 * server.h: Include tracepoint.h.
9507 (agent_mem_read, agent_get_trace_state_variable_value,
9508 agent_set_trace_state_variable_value,
9509 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9510 get_set_tsv_func_addr): New prototypes.
9511
9512 * ax.h: New include file.
9513 * ax.c: New source file.
9514
9515 * tracepoint.c: Include ax.h.
9516 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9517 agent_expr, eval_result_type): Move to ax.h.
9518 (parse_agent_expr): Rename to ...
9519 (gdb_parse_agent_expr): ... this, make it non-static and move
9520 to ax.h.
9521 (unparse_agent_expr) Rename to ...
9522 (gdb_unparse_agent_expr): ... this, make it non-static and move
9523 to ax.h.
9524 (eval_agent_expr): Rename to ...
9525 (eval_tracepoint_agent_expr): ... this.
9526 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9527 forward declarations.
9528 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9529 (agent_get_trace_state_variable_value): New function.
9530 (agent_set_trace_state_variable_value): New function.
9531 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9532 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9533 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9534 (condition_true_at_tracepoint): Likewise.
9535 (parse_agent_expr): Rename to ...
9536 (gdb_parse_agent_expr): ... this and move to ax.c.
9537 (unparse_agent_expr): Rename to ...
9538 (gdb_unparse_agent_expr): ... this and move to ax.c.
9539 (gdb_agent_op_name): Move to ax.c.
9540 (eval_agent_expr): Rename to ...
9541 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9542 and move to ax.c.
9543 (eval_tracepoint_agent_expr): New function.
9544 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9545 non-static.
5e1dc496
LM
9546 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9547 ax.c.
9548 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9549 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9550 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9551 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9552 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9553 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9554 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9555 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9556 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9557 (compile_bytecodes): Remove forward declaration.
9558 (is_goto_target): Move to ax.c.
9559 (compile_bytecodes): Move to ax.c and call
9560 agent_get_trace_state_variable_value (...) and
9561 agent_set_trace_state_variable_value (...).
9562
9563 * Makefile.in: Update ax.c and IPA dependencies.
9564
277e4e52
PA
95652012-02-24 Pedro Alves <palves@redhat.com>
9566
9567 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9568 (cmd_bigqtbuffer_circular): ... this. Only handle
9569 'QTBuffer:circular:'.
9570 (handle_tracepoint_general_set): Adjust.
9571
bf4c19f7
YQ
95722012-02-16 Yao Qi <yao@codesourcery.com>
9573
9574 * inferiors.c: Move code to ...
9575 * dll.c: .... here. New.
9576 * server.h: Declare clear_dlls.
9577 * Makefile.in (SFILES): Add dll.c.
9578 (OBS): Add dll.o
9579 (dll.o): New rule.
9580
d73f2619
YQ
95812012-02-11 Yao Qi <yao@codesourcery.com>
9582
9583 * server.c: (handle_monitor_command): Add a new parameter
9584 `own_buf'.
9585 (handle_query): Update caller.
9586
f8255c2a
JB
95872012-02-09 Joel Brobecker <brobecker@adacore.com>
9588
9589 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9590 * configure, config.in: Regenerate.
9591 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9592 is not defined.
9593
da84f473
PA
95942012-02-02 Pedro Alves <palves@redhat.com>
9595
9596 Try SIGKILL first, then PTRACE_KILL.
9597 * linux-low.c (linux_kill_one_lwp): New.
9598 (linux_kill_one_lwp): Rename to ...
9599 (kill_one_lwp_callback): ... this. Use the new
9600 linux_kill_one_lwp.
9601
e886a173
PA
96022012-02-02 Pedro Alves <palves@redhat.com>
9603
9604 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9605 inferior.
9606
be07f1a2
PA
96072012-01-27 Pedro Alves <palves@redhat.com>
9608
9609 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9610 (elf_64_file_p): Make static.
9611 (linux_pid_exe_is_elf_64_file): New.
9612 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9613 Delete declarations.
9614 (linux_pid_exe_is_elf_64_file): Declare.
9615 * linux-x86-low.c (x86_arch_setup): Use
9616 linux_pid_exe_is_elf_64_file.
9617
d8301ad1
JK
96182012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9619
9620 * linux-low.c (linux_wait_for_event_1): Rename to ...
9621 (linux_wait_for_event): ... here and merge it with former
9622 linux_wait_for_event - new variable wait_ptid, use it.
9623 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9624
01b17894
PA
96252012-01-23 Pedro Alves <palves@redhat.com>
9626
9627 * server.c (main): Avoid yet another case of infinite loop while
9628 detaching/killing after a longjmp.
9629
e825046f
JK
96302012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9631
9632 Code cleanup.
9633 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9634
b9e7b9c3
UW
96352012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9636
9637 * hostio.c (handle_readlink): New function.
9638 (handle_vFile): Call it to handle "vFile:readlink" packets.
9639
901f9912
UW
96402012-01-20 Pedro Alves <palves@redhat.com>
9641 Ulrich Weigand <ulrich.weigand@linaro.org>
9642
9643 * server.c (handle_v_requests): Only support vAttach and vRun to
9644 start multiple processes when in extended protocol mode.
9645
fc1ab1a0
PA
96462012-01-17 Pedro Alves <palves@redhat.com>
9647
9648 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9649 memalign plus mprotect to allocate the scratch buffer.
9650
7d5d4e98
PA
96512012-01-13 Pedro Alves <palves@redhat.com>
9652
9653 * server.c (attach_inferior): Clear `cont_thread'.
9654
f128d5e9
PA
96552012-01-13 Pedro Alves <palves@redhat.com>
9656
9657 * server.c (main): Avoid infinite loop while detaching/killing
9658 after a longjmp.
9659
06db92f0
DE
96602012-01-09 Doug Evans <dje@google.com>
9661
9662 * server.c (start_inferior): Set last_ptid in --wrapper case.
9663
32d92999
YQ
96642012-01-06 Yao Qi <yao@codesourcery.com>
9665
9666 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9667 defined.
9668 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9669
5e0a92a9
YQ
96702012-01-04 Yao Qi <yao@codesourcery.com>
9671
9672 * tracepoint.c (cmd_qtdp): Print debug message
9673 for static tracepoint.
9674
ae639e8c
YQ
96752012-01-04 Yao Qi <yao@codesourcery.com>
9676
9677 * tracepoint.c (trace_vdebug): Differentiate debug message
9678 between gdbserver and IPA.
9679
f72429c5
YQ
96802012-01-03 Yao Qi <yao@codesourcery.com>
9681
9682 * tracepoint.c (tracepoint_was_hit): Don't collect for
9683 static tracepoint.
9684
12c3e59c
JB
96852012-01-02 Joel Brobecker <brobecker@adacore.com>
9686
9687 * terminal.h: Reformat copyright header.
9688
67827812
JB
96892012-01-02 Joel Brobecker <brobecker@adacore.com>
9690
9691 * server.c (gdbserver_version): Update copyright year.
9692 * gdbreplay.c (gdbreplay_version): Likewise.
9693
3e52c33d
JK
96942011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9695
9696 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9697
9698 Revert:
9699 2011-12-18 Hui Zhu <teawater@gmail.com>
9700 * linux-low.c (linux_create_inferior): Save return value to ret.
9701
66f1260e
HZ
97022011-12-18 Hui Zhu <teawater@gmail.com>
9703
9704 * linux-low.c (linux_create_inferior): Save return value to ret.
9705
e77616d7
DE
97062011-12-16 Doug Evans <dje@google.com>
9707
e7b06c57
DE
9708 * linux-low.c (linux_create_inferior): If stdio connection,
9709 redirect stdin from /dev/null, stdout to stderr.
9710 * remote-utils.c (remote_is_stdio): New static global.
9711 (remote_connection_is_stdio): New function.
9712 (remote_prepare): Handle stdio connection.
9713 (remote_open): Ditto.
9714 (remote_close): Don't close stdin for stdio connections.
9715 (read_prim,write_prim): New functions. Replace all calls to
9716 read/write to these.
9717 * server.c (main): Watch for "-" argument. Move call to
9718 remote_prepare before start_inferior.
9719 * server.h (STDIO_CONNECTION_NAME): New macro.
9720 (remote_connection_is_stdio): Declare.
9721
e77616d7
DE
9722 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9723 in debugging output.
9724
82067193
YQ
97252011-12-15 Yao Qi <yao@codesourcery.com>
9726
9727 * tracepoint.c: Include sys/syscall.h.
9728 (gdb_ust_thread): Remove preprocessor conditional.
9729
82bfbe7e
PA
97302011-12-14 Pedro Alves <pedro@codesourcery.com>
9731
9732 * linux-low.c (linux_detach_one_lwp): Call
9733 the_low_target.prepare_to_resume before detaching.
9734
712c6575
YQ
97352011-12-14 Yao Qi <yao@codesourcery.com>
9736
9737 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9738 of write.
9739
d54d1edf
YQ
97402011-12-14 Yao Qi <yao@codesourcery.com>
9741
9742 * i386-low.c (i386_low_stopped_data_address): Initialize local
9743 variable `control'.
9744
6210a125
PA
97452011-12-13 Pedro Alves <pedro@codesourcery.com>
9746
9747 PR remote/13492
9748
9749 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9750 DR_CONTROL unless necessary. Extend comments.
9751 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9752 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9753
2ece8244
YQ
97542011-12-13 Yao Qi <yao@codesourcery.com>
9755
9756 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9757 macros.
9758 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9759
784867a5
JK
97602011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9761
9762 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9763 Print new debug message for such case.
9764
6bf36717
JK
97652011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9766
9767 Fix overlapping memcpy.
9768 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9769 the read_inferior_memory transfer.
9770 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9771 write_inferior_memory transfer.
9772 (set_fast_tracepoint_jump): New variable buf. Use it for the
9773 read_inferior_memory and write_inferior_memory transfers.
9774 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9775 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9776 Use it for the write_inferior_memory transfer.
9777 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9778 buffers.
9779
50275556
MR
97802011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9781
9782 * linux-low.c (fetch_register, store_register): Make code
9783 consistent, fix formatting.
9784
7325beb4
MR
97852011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9786
9787 * linux-low.c (usr_store_inferior_registers): Factor out code
9788 to handle individual registers into...
9789 (store_register): ... this new function.
9790
c642a434
UW
97912011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9792
9793 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9794 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9795 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9796 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9797 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9798 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9799 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9800 (srv_xmlfiles): Add new XML files.
9801
9802 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9803 and <sys/uio.h>.
9804 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9805 (init_registers_s390_linux32v1): Add prototype.
9806 (init_registers_s390_linux32v2): Likewise.
9807 (init_registers_s390_linux64v1): Likewise.
9808 (init_registers_s390_linux64v2): Likewise.
9809 (init_registers_s390x_linux64v1): Likewise.
9810 (init_registers_s390x_linux64v2): Likewise.
9811 (s390_num_regs): Increment to 52.
9812 (s390_regmap): Add orig_r2 register.
9813 (s390_num_regs_3264): Increment to 68.
9814 (s390_regmap_3264): Add orig_r2 register.
9815 (s390_collect_ptrace_register): Handle orig_r2 register.
9816 (s390_supply_ptrace_register): Likewise.
9817 (s390_fill_last_break): New function.
9818 (s390_store_last_break): Likewise.
9819 (s390_fill_system_call): New function.
9820 (s390_store_system_call): Likewise.
9821 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9822 register sets.
9823 (s390_check_regset): New function.
9824 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9825 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9826 Update target_regsets for available register sets.
9827
2268b414
JK
98282011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9829 Jan Kratochvil <jan.kratochvil@redhat.com>
9830
9831 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9832 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9833 New.
9834 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9835 * linux-low.h (struct process_info_private): New member r_debug.
9836 * server.c (handle_qxfer_libraries): Call
9837 the_target->qxfer_libraries_svr4.
9838 (handle_qxfer_libraries_svr4): New function.
9839 (qxfer_packets): New entry "libraries-svr4".
9840 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9841 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9842 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9843 PACKET_qXfer_libraries_svr4.
9844
d6db1fab
UW
98452011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9846
9847 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9848 PSW address/mask between 8-byte and 16-byte formats.
9849 (s390_supply_ptrace_register): Likewise.
9850 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9851 basic addressing mode bit.
9852
242f5f1c
SS
98532011-11-24 Stan Shebs <stan@codesourcery.com>
9854
9855 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9856
f196051f
SS
98572011-11-17 Stan Shebs <stan@codesourcery.com>
9858
9859 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9860 (tracing_start_time): New global.
9861 (tracing_stop_time): New global.
9862 (tracing_user_name): New global.
9863 (tracing_notes): New global.
9864 (tracing_stop_note): New global.
9865 (cmd_qtstart): Set traceframe_usage, start_time.
9866 (stop_tracing): Set stop_time.
9867 (cmd_qtstatus): Report additional status.
9868 (cmd_qtp): New function.
9869 (handle_tracepoint_query): Call it.
9870 (cmd_qtnotes): New function.
9871 (handle_tracepoint_general_set): Call it.
9872 (get_timestamp): Rename from tsv_get_timestamp.
9873
405f8e94
SS
98742011-11-14 Stan Shebs <stan@codesourcery.com>
9875 Kwok Cheung Yeung <kcy@codesourcery.com>
9876
9877 * linux-x86-low.c (small_jump_insn): New.
9878 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9879 trampoline and error message, build a trampoline and issue a small
9880 jump instruction to it.
9881 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9882 trampoline and error message.
9883 (x86_get_min_fast_tracepoint_insn_len): New.
9884 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9885 * linux-low.h (struct linux_target_ops): Add arguments to
9886 install_fast_tracepoint_jump_pad operation, add new operation.
9887 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9888 arguments.
9889 (linux_get_min_fast_tracepoint_insn_len): New function.
9890 (linux_target_op): Add new operation.
9891 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9892 (gdb_trampoline_buffer_end): Ditto.
9893 (gdb_trampoline_buffer_error): Ditto.
9894 (struct ipa_sym_addresses): Add fields for new IPA variables.
9895 (symbol_list): Add entries for new IPA variables.
9896 (struct tracepoint): Add fields to hold the address range of the
9897 trampoline used by the tracepoint.
9898 (trampoline_buffer_head): New static variable.
9899 (trampoline_buffer_tail): Ditto.
9900 (claim_trampoline_space): New function.
9901 (have_fast_tracepoint_trampoline_buffer): New function.
9902 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9903 structure.
9904 (install_fast_tracepoint): Ditto, also add error buffer argument.
9905 (cmd_qtminftpilen): New function.
9906 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9907 (fast_tracepoint_from_trampoline_address): New function.
9908 (fast_tracepoint_collecting): Handle trampoline as part of jump
9909 pad space.
9910 (set_trampoline_buffer_space): New function.
9911 (initialize_tracepoint): Initialize new IPA variables.
9912 * target.h (struct target_ops): Add arguments to
9913 install_fast_tracepoint_jump_pad operation, add new
9914 get_min_fast_tracepoint_insn_len operation.
9915 (target_get_min_fast_tracepoint_insn_len): New.
9916 (install_fast_tracepoint_jump_pad): Add arguments.
9917 * server.h (IPA_BUFSIZ): Define.
9918 * linux-i386-ipa.c: Include extra header files.
9919 (initialize_fast_tracepoint_trampoline_buffer): New function.
9920 (initialize_low_tracepoint): Call it.
9921 * server.h (set_trampoline_buffer_space): Declare.
9922 (claim_trampoline_space): Ditto.
9923 (have_fast_tracepoint_trampoline_buffer): Ditto.
9924
1e4d1764
YQ
99252011-11-14 Yao Qi <yao@codesourcery.com>
9926
9927 * server.c (handle_query): Handle InstallInTrace for qSupported.
9928 * tracepoint.c (add_tracepoint): Sort list.
9929 (install_tracepoint, download_tracepoint): New.
9930 (cmd_qtdp): Call them to install and download tracepoints.
9931 (sort_tracepoints): Removed.
9932 (cmd_qtstart): Update.
9933
5c73ff4e
YQ
99342011-11-14 Yao Qi <yao@codesourcery.com>
9935
9936 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9937 * mem-break.h: Declare.
9938 * tracepoint.c (cmd_qtstart): Move some code to ...
9939 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9940 New.
9941 (download_tracepoints): Move some code to ...
9942 (download_tracepoint_1): ... here. New.
9943
86a30030
YQ
99442011-11-08 Yao Qi <yao@codesourcery.com>
9945
9946 * remote-utils.c (relocate_instruction): A comment fix.
9947
8d26e50c
JB
99482011-11-07 Joel Brobecker <brobecker@adacore.com>
9949
9950 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9951 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9952 dr_status_mirror and dr_control_mirror from debug_reg_state.
9953 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9954 (i386_initial_stuff): Remove use of deleted globals.
9955 (i386_get_thread_context, i386_set_thread_context,
9956 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9957 from debug_reg_state.
9958
a59306a3
YQ
99592011-11-05 Yao Qi <yao@codesourcery.com>
9960
9961 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9962 address as TPOINT's.
9963
3065dfb6
SS
99642011-11-02 Stan Shebs <stan@codesourcery.com>
9965
9966 * tracepoint.c (agent_mem_read_string): New function.
9967 (eval_agent_expr): Call it for tracenz.
9968 * server.c (handle_query): Report support for tracenz.
9969
fd0d8c7c
YQ
99702011-11-02 Yao Qi <yao@codesourcery.com>
9971
9972 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9973
609086b1
YQ
99742011-11-02 Yao Qi <yao@codesourcery.com>
9975
9976 * target.h: Fix a typo in comment.
9977
b9fd1791
PA
99782011-10-31 Pedro Alves <pedro@codesourcery.com>
9979
9980 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9981 clobber the breakpoints' shadows with fast tracepoint jumps.
9982 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9983 * target.c (write_inferior_memory): Also pass MYADDR down to
9984 check_mem_write.
9985
03583c20
UW
99862011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9987
9988 * configure.ac: Check support for personality routine.
9989 * configure: Regenerate.
9990 * config.in: Likewise.
9991 * linux-low.c: Include <sys/personality.h>.
9992 Define ADDR_NO_RANDOMIZE if necessary.
9993 (linux_create_inferior): Disable address space randomization when
9994 forking inferior, if requested.
9995 (linux_supports_disable_randomization): New function.
9996 (linux_target_ops): Install it.
9997 * server.h (disable_randomization): Declare.
9998 * server.c (disable_randomization): New global variable.
9999 (handle_general_set): Handle QDisableRandomization.
10000 (handle_query): Likewise for qSupported.
10001 (main): Support --disable-randomization and --no-disable-randomization
10002 command line arguments.
10003 * target.h (struct target_ops): Add supports_disable_randomization.
10004 (target_supports_disable_randomization): New macro.
10005
723b724b
MF
100062011-09-29 Mike Frysinger <vapier@gentoo.org>
10007
10008 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10009 ifdef check.
10010 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10011 [!PT_GETDSBT] (target_loadmap): New definition.
10012 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10013 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10014 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10015 and PT_GETDSBT to LINUX_LOADMAP.
10016 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10017 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10018
55329a5c 100192011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
10020
10021 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10022 (arm_linux_hwbp_cap): New static variable.
10023 (arm_linux_get_hwbp_cap): Replace by ...
10024 (arm_linux_init_hwbp_cap): ... this new function.
10025 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10026 (arm_linux_get_hw_watchpoint_count): Likewise.
10027 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10028 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10029 (arm_prepare_to_resume): Use perror_with_name instead of error.
10030
55329a5c 100312011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
10032
10033 * linux-arm-low.c: Include <signal.h>.
10034 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10035 (struct arm_linux_hwbp_cap): New data type.
10036 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10037 (struct arm_linux_hw_breakpoint): New data type.
10038 (MAX_BPTS, MAX_WPTS): Define.
10039 (struct arch_process_info, struct arch_lwp_info): New data types.
10040 (arm_linux_get_hwbp_cap): New function.
10041 (arm_linux_get_hw_breakpoint_count): Likewise.
10042 (arm_linux_get_hw_watchpoint_count): Likewise.
10043 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10044 (arm_hwbp_control_initialize): Likewise.
10045 (arm_hwbp_control_is_enabled): Likewise.
10046 (arm_hwbp_control_is_initialized): Likewise.
10047 (arm_hwbp_control_disable): Likewise.
10048 (arm_linux_hw_breakpoint_equal): Likewise.
10049 (arm_linux_hw_point_initialize): Likewise.
10050 (struct update_registers_data): New data structure.
10051 (update_registers_callback: New function.
10052 (arm_insert_point): Likewise.
10053 (arm_remove_point): Likewise.
10054 (arm_stopped_by_watchpoint): Likewise.
10055 (arm_stopped_data_address): Likewise.
10056 (arm_new_process): Likewise.
10057 (arm_new_thread): Likewise.
10058 (arm_prepare_to_resume): Likewise.
10059 (the_low_target): Register arm_insert_point, arm_remove_point,
10060 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10061 arm_new_thread, and arm_prepare_to_resume.
10062
6b9801d4
SS
100632011-09-15 Stan Shebs <stan@codesourcery.com>
10064
10065 * server.h (struct emit_ops): Add compare-goto fields.
10066 * tracepoint.c (gdb_agent_op_sizes): New table.
10067 (emit_eq_goto): New function.
10068 (emit_ne_goto): New function.
10069 (emit_lt_goto): New function.
10070 (emit_le_goto): New function.
10071 (emit_gt_goto): New function.
10072 (emit_ge_goto): New function.
10073 (is_goto_target): New function.
10074 (compile_bytecodes): Recognize special cases of compare-goto
10075 combinations and call specialized emitters for them.
10076 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10077 (amd64_emit_ne_goto): New function.
10078 (amd64_emit_lt_goto): New function.
10079 (amd64_emit_le_goto): New function.
10080 (amd64_emit_gt_goto): New function.
10081 (amd64_emit_ge_goto): New function.
10082 (amd64_emit_ops): Add the new functions.
10083 (i386_emit_eq_goto): New function.
10084 (i386_emit_ne_goto): New function.
10085 (i386_emit_lt_goto): New function.
10086 (i386_emit_le_goto): New function.
10087 (i386_emit_gt_goto): New function.
10088 (i386_emit_ge_goto): New function.
10089 (i386_emit_ops): Add the new functions.
10090
bf15cbda
SS
100912011-09-08 Stan Shebs <stan@codesourcery.com>
10092
10093 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10094 (i386_emit_epilogue): Restore %ebx.
10095
943ca1dd
JZ
100962011-08-31 Jie Zhang <jzhang918@gmail.com>
10097
10098 * server.c (step_thread): Remove definition.
10099 (process_serial_event): Don't handle Hs.
10100 * server.h (step_thread): Remove declaration.
10101 * target.c (set_desired_inferior): Remove use of step_thread.
10102
e3deef73
LM
101032011-08-24 Luis Machado <lgustavo@codesourcery.com>
10104
10105 * linux-low.c: Include linux-procfs.h.
10106 (linux_attach_lwp_1): Update comments.
10107 (linux_attach): Scan for existing threads when attaching to a
10108 process that is the tgid.
10109 * Makefile.in: Update dependencies.
10110
13da1c97
LM
101112011-08-24 Luis Machado <lgustavo@codesourcery.com>
10112
10113 * configure.srv: Add linux-procfs.o dependencies.
10114
881127c9
YQ
101152011-08-14 Yao Qi <yao@codesourcery.com>
10116
10117 * target.h (struct target_ops): Fix indent.
10118 * win32-low.c (win32_target_ops): Fix comment.
10119
58dbd541
YQ
101202011-08-14 Andrew Jenner <andrew@codesourcery.com>
10121 Yao Qi <yao@codesourcery.com>
10122
10123 * Makefile.in (clean): Remove tic6x-*.c files.
10124 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10125 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10126 (tic6x-c64xp-linux.c): Likewise.
10127 * configure.srv: Add support for tic6x-*-uclinux.
10128 * linux-tic6x-low.c: New.
10129 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10130
78d85199
YQ
101312011-08-14 Andrew Stubbs <ams@codesourcery.com>
10132 Yao Qi <yao@codesourcery.com>
10133
10134 * target.h (struct target_ops): Add read_loadmap.
10135 * linux-low.c (struct target_loadseg): New type.
10136 (struct target_loadmap): New type.
10137 (linux_read_loadmap): New function.
10138 (linux_target_ops): Add linux_read_loadmap.
10139 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10140 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10141 to NULL.
78d85199 10142
a959a88d
EZ
101432011-08-05 Eli Zaretskii <eliz@gnu.org>
10144
10145 * win32-low.c: Include <stdint.h>.
10146
1ced966e
PA
101472011-07-22 Pedro Alves <pedro@codesourcery.com>
10148
10149 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10150 to the inferior here.
10151 (i386_remove_aligned_watchpoint): Ditto.
10152 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10153 fit part of the watchpoint in the debug registers.
10154 (i386_update_inferior_debug_regs): New.
10155 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10156 registers, and only update the inferior on success.
10157 (i386_low_remove_watchpoint): Ditto.
10158
d26e3629
KY
101592011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10160
10161 * linux-low.c (compare_ints, unique, list_threads, show_process,
10162 linux_core_of_thread): Delete.
10163 (linux_target_ops): Change linux_core_of_thread to
10164 linux_common_core_of_thread.
10165 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10166 * utils.c (malloc_failure): Change type of argument.
10167 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10168 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10169 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10170 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10171 (IPA_OBJS): Add common-utils-ipa.o.
10172 (ptid_h, linux_osdata_h): New macros.
10173 (server_h): Add common/common-utils.h, common/xml-utils.h,
10174 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10175 common/ptid.h.
10176 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10177 ptid.o, buffer.o): New rules.
10178 (linux-low.o): Add common/linux-osdata.h as a dependency.
10179 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10180 * configure.ac: Add AC_HEADER_DIRENT check.
10181 * config.in: Regenerate.
10182 * configure: Regenerate.
10183 * remote-utils.c (xml_escape_text): Delete.
10184 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10185 buffer_xml_printf): Move to common/buffer.c.
10186 * server.c (main): Remove call to initialize_inferiors.
10187 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10188 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10189 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10190 internal_error, gdb_assert, gdb_assert_fail): Delete.
10191 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10192 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10193 common/buffer.h.
10194 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10195 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10196 initialize_inferiors): Delete.
10197
2275a1a7
PA
101982011-07-20 Pedro Alves <pedro@codesourcery.com>
10199
10200 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10201 symbol error.
10202
0a5b1e09
PA
102032011-05-31 Pedro Alves <pedro@codesourcery.com>
10204
10205 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10206 assertion.
10207 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10208
6938fd34
YQ
102092011-05-26 Yao Qi <yao@codesourcery.com>
10210
10211 * Makefile.in (thread-db.o): Track dependence to
10212 common/gdb_thread_db.h.
10213 * thread-db.c: include gdb_thread_db.h from right place.
10214
b481f9e0
TT
102152011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10216
10217 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10218 __FILE__ and __LINE__ to internal_error.
10219
98a5dd13
DE
102202011-05-13 Doug Evans <dje@google.com>
10221
10222 * thread-db.c (try_thread_db_load_from_sdir): New function.
10223 (try_thread_db_load_from_dir): New function.
10224 (thread_db_load_search): Handle $sdir, ignore $pdir.
10225 Remove trying of system directories if search of
10226 libthread-db-search-path fails, that is now done via $sdir.
10227
d248b706
KY
102282011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10229
10230 * server.c (handle_query): Add EnableDisableTracepoints to the list
10231 of supported features.
43aaf8b6 10232 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10233 tracepoints.
43aaf8b6
PA
10234 (cmd_qtenable_disable): New.
10235 (cmd_qtstart): Install tracepoints even if disabled.
10236 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10237 receiving a QTEnable or QTDisable packet.
10238 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10239 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10240 tracepoints.
10241 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10242
84e578fb
DE
102432011-05-10 Doug Evans <dje@google.com>
10244
10245 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10246
71f55dd8
DE
102472011-05-04 Doug Evans <dje@google.com>
10248
10249 * linux-low.c (linux_join): Skip process lookup.
10250 * spu-low.c (spu_join): Ditto.
10251 * server.c (join_inferiors_callback): Delete.
10252 (process_serial_event): For 'D' packet (detach) call join_inferior
10253 directly.
10254
4d393d60
JM
102552011-05-04 Joseph Myers <joseph@codesourcery.com>
10256
10257 * README: Don't mention xscale*-*-linux*.
10258 * configure.srv (xscale*-*-linux*): Don't handle target.
10259
b00ad6ff
NF
102602011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10261
10262 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10263 casting pointers.
10264 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10265 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10266 (i386_emit_void_call_2): Likewise.
10267
af96c192
YQ
102682011-04-26 Yao Qi <yao@codesourcery.com>
10269
43aaf8b6
PA
10270 * linux-low.c: Move common macros to linux-ptrace.h.
10271 Include linux-ptrace.h.
af96c192
YQ
10272 * Makefile.in (linux_ptrace_h): New.
10273 (linux-low.o): Depends on linux-ptrace.h.
10274
03f2bd59
JK
102752011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10276
10277 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10278 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10279 (remote_prepare): New function with most of the TCP code from ...
10280 (remote_open): ... here. Detect PORT here unconditionally. Move also
10281 setting transport_is_reliable.
10282 * server.c (run_once): New variable.
10283 (gdbserver_usage): Document it.
10284 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10285 the first run if RUN_ONCE.
10286 * server.h (run_once, remote_prepare): New declarations.
10287
7a9dd1b2
TT
102882011-04-19 Tom Tromey <tromey@redhat.com>
10289
10290 * win32-low.c (handle_load_dll): Remove duplicate "the".
10291
81239425
PM
102922011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10293
10294 Remove support for old Cygwin 1.5 versions.
10295 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10296 function to avoid warning.
10297 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10298 warning.
10299
9e0627f1
PM
103002011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10301
10302 * gdbserver/server.h (Macro _): Define it if not available.
10303
588eebee
MS
103042011-03-14 Michael Snyder <msnyder@vmware.com>
10305
348af9f7 10306 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10307
43f70d4c
JB
103082011-03-10 Joel Brobecker <brobecker@adacore.com>
10309
10310 * Makefile.in (maintainer-clean realclean distclean): Remove
10311 "make ... subdir_do" command.
10312
348af9f7
MS
103132011-03-10 Michael Snyder <msnyder@vmware.com>
10314
10315 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10316
10317 * server.c (handle_v_run): Free alloced buffer on early return.
10318
e637a4f5
YQ
103192011-03-09 Yao Qi <yao@codesourcery.com>
10320
10321 Revert:
10322 2011-03-04 Yao Qi <yao@codesourcery.com>
10323
10324 * Makefile.in: Remove GNU make feature --directory.
10325
10326 2011-03-05 Yao Qi <yao@codesourcery.com>
10327
10328 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10329 (subdir_do): New make target. Copied from gdb/Makefile.
10330 (maintainer-clean, realclean, distclean, clean): Call corresponding
10331 make targets in common/Makefile.
10332
10333 2011-02-11 Yao Qi <yao@codesourcery.com>
10334
10335 * configure.ac: Call AC_PROG_RANLIB.
10336 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10337 * configure: Regenerate.
10338
e6edda56
JK
103392011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10340
10341 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10342
e5141119
JB
103432011-03-06 Yao Qi <yao@codesourcery.com>
10344
10345 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10346
64794aa4
JB
103472011-03-05 Yao Qi <yao@codesourcery.com>
10348
10349 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10350 (subdir_do): New make target. Copied from gdb/Makefile.
10351 (maintainer-clean, realclean, distclean, clean): Call corresponding
10352 make targets in common/Makefile.
10353
7a762829
YQ
103542011-03-04 Yao Qi <yao@codesourcery.com>
10355
10356 * Makefile.in: Remove GNU make feature --directory.
10357
348af9f7
MS
103582011-03-04 Michael Snyder <msnyder@vmware.com>
10359
10360 * server.c (queue_stop_reply): Call xmalloc not malloc.
10361
103622011-03-02 Michael Snyder <msnyder@vmware.com>
10363
10364 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10365
9f72fee2
MS
103662011-02-28 Michael Snyder <msnyder@vmware.com>
10367
588eebee
MS
10368 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10369 (cmd_qtframe): Ditto.
10370 (cmd_qtbuffer): Ditto.
10371 (cmd_bigqtbuffer): Ditto.
10372
9f72fee2
MS
10373 * utils.c (decimal2str): Initialize 'width' to nine, then
10374 don't mess with it.
10375
8040bd49
UW
103762011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10377
10378 * hostio.c (require_data): Free *data, not data.
10379
7e52cbd0
JK
103802011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10381
10382 * hostio.c (require_data): Use free, not xfree.
10383
9130f83e
MS
103842011-02-27 Michael Snyder <msnyder@vmware.com>
10385
4b812f4e
MS
10386 * server.c (handle_query): Discard unused value.
10387
9130f83e
MS
10388 * hostio.c (require_data): Free malloc memory before returning
10389 error.
10390
69d37113
MS
103912011-02-26 Michael Snyder <msnyder@vmware.com>
10392
10393 * linux-low.c (list_threads): Call closedir for dirent.
10394
35f5825a
MS
103952011-02-27 Michael Snyder <msnyder@vmware.com>
10396
2a589cef
MS
10397 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10398 a case statement falls through.
10399
0adea5f7
MS
10400 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10401
35f5825a
MS
10402 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10403 in comparison.
10404
238f1c74
MS
104052011-02-26 Michael Snyder <msnyder@vmware.com>
10406
10407 * utils.c (decimal2str): Eliminate dead code and dead param.
10408 (pulongest): Drop dead param from call to decimal2str.
10409 (plongest): Ditto.
10410
633ff500
JB
104112011-02-24 Joel Brobecker <brobecker@adacore.com>
10412
10413 Revert the following patch (not approved yet):
10414 2011-02-21 Hui Zhu <teawater@gmail.com>
10415 * tracepoint.c (tp_printf): New function.
10416 (eval_agent_expr): Handle gdb_agent_op_printf.
10417
f9c6ff72
HZ
104182011-02-21 Hui Zhu <teawater@gmail.com>
10419
10420 * tracepoint.c (tp_printf): New function.
10421 (eval_agent_expr): Handle gdb_agent_op_printf.
10422
94d5e490
TT
104232011-02-18 Tom Tromey <tromey@redhat.com>
10424
10425 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10426 (tracepoint.o): Likewise.
10427 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10428 (gdb_agent_op_names): Likewise.
10429
c7f96d2b
TT
104302011-02-18 Tom Tromey <tromey@redhat.com>
10431
10432 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10433 gdb_agent_op_rot>: New constants.
10434 (gdb_agent_op_names): Add pick and roll.
10435 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10436 cases.
10437
0feedb2c
JK
104382011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10439
10440 * aclocal.m4: Regenerated with aclocal-1.11.1.
10441
b3b9301e
PA
104422011-02-14 Pedro Alves <pedro@codesourcery.com>
10443
10444 * server.c (handle_qxfer_traceframe_info): New.
10445 (qxfer_packets): Register "traceframe-info".
10446 (handle_query): Report support for qXfer:traceframe-info:read+.
10447 * tracepoint.c (match_blocktype): New.
10448 (traceframe_find_block_type): Rename to ...
10449 (traceframe_walk_blocks): ... this. Add callback filter argument,
10450 and use it.
10451 (traceframe_find_block_type): New, reimplemented on top of
10452 traceframe_walk_blocks.
10453 (build_traceframe_info_xml): New.
10454 (traceframe_read_info): New.
10455 * server.h (traceframe_read_info): Declare.
10456
4f3e6fb7
YQ
104572011-02-11 Yao Qi <yao@codesourcery.com>
10458
10459 * configure.ac: Call AC_PROG_RANLIB.
10460 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10461 * configure: Regenerate.
10462
764880b7
PA
104632011-02-07 Pedro Alves <pedro@codesourcery.com>
10464
10465 * server.c (gdb_read_memory): Change return semantics to allow
10466 partial transfers.
10467 (handle_search_memory_1): Adjust.
10468 (process_serial_event) <'m' packet>: Handle partial transfers.
10469 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10470
1c79eb8a
PA
104712011-01-28 Pedro Alves <pedro@codesourcery.com>
10472
10473 * regcache.c (init_register_cache): Initialize
10474 regcache->register_status.
10475 (free_register_cache): Release regcache->register_status.
10476 (regcache_cpy): Copy register_status.
10477 (registers_to_string): Print 'x's for unavailable registers.
10478 (supply_register): Mark the register's status valid or
10479 unavailable, depending on whether a buffer was passed in or not.
10480 (supply_register_zeroed): New.
10481 (supply_regblock): Mark the registers' status valid or
10482 unavailable, depending on whether a buffer was passed in or not.
10483 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10484 (struct regcache): New `register_status' field.
10485 (supply_register_zeroed): Declare.
10486 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10487 supply_register_zeroed, rather than passing a NULL buffer to
10488 supply_register.
10489 * tracepoint.c (fetch_traceframe_registers): Update comment.
10490
85724a0e
PA
104912011-01-28 Pedro Alves <pedro@codesourcery.com>
10492
10493 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10494 buffer explicit.
10495
d08aafef
PA
104962011-01-25 Pedro Alves <pedro@codesourcery.com>
10497
10498 * server.h (decode_xfer_write): Change prototype.
10499 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10500 and don't extract the annex here.
10501 * server.c (decode_xfer_read): Remove `annex' parameter,
10502 and don't extract the annex here.
10503 (decode_xfer): New.
10504 (struct qxfer): New.
10505 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10506 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10507 (handle_qxfer_statictrace): New functions, abstracted out from
10508 handle_query, and made to use the struct qxfer interface.
10509 (handle_threads_qxfer_proper): Rename to ...
10510 (handle_qxfer_threads_proper): ... this.
10511 (handle_threads_qxfer): Rename to ...
10512 (handle_qxfer_threads): ... this. Adjust.
10513 (qxfer_packets): New array.
10514 (handle_qxfer): New function.
10515 (handle_query): Use handle_qxfer.
10516
493e2a69
MS
105172011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10518
10519 * gdbreplay.c: Shorten lines of >= 80 columns.
10520 * linux-low.c: Ditto.
10521 * linux-ppc-low.c: Ditto.
10522 * linux-s390-low.c: Ditto.
10523 * linux-sparc-low.c: Ditto.
10524 * linux-x86-low.c: Ditto.
10525 * linux-xtensa-low.c: Ditto.
10526 * mem-break.c: Ditto.
10527 * nto-low.c: Ditto.
10528 * regcache.h: Ditto.
10529 * remote-utils.c: Ditto.
10530 * server.c: Ditto.
10531 * server.h: Ditto.
10532 * thread-db.c: Ditto.
10533 * tracepoint.c: Ditto.
10534 * utils.c: Ditto.
10535 * win32-low.h: Ditto.
10536
44944448
JB
105372011-01-05 Joel Brobecker <brobecker@adacore.com>
10538
10539 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10540 update.
10541
71ce852c
JB
105422011-01-01 Joel Brobecker <brobecker@adacore.com>
10543
10544 * server.c (gdbserver_version): Update copyright year in version
10545 output.
10546 * gdbreplay.c (gdbreplay_version): Ditto.
10547
eb826dc6
MF
105482010-12-29 Jie Zhang <jie.zhang@analog.com>
10549
10550 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10551 * linux-bfin-low.c: New file.
10552 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10553 PT_DATA_ADDR for BFIN targets.
10554 * Makefile.in (SFILES): Add linux-bfin-low.c.
10555 (clean): Remove reg-bfin.c.
10556 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10557 * README: Mention supported Blackfin targets.
10558
39ab222a
MF
105592010-12-23 Mike Frysinger <vapier@gentoo.org>
10560
10561 * .gitignore: New file.
10562
a1f2ce7d
MF
105632010-11-16 Mike Frysinger <vapier@gentoo.org>
10564
10565 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10566
f474844c
JZ
105672010-10-22 Jie Zhang <jie@codesourcery.com>
10568
10569 * Makefile.in: Add FLAGS_TO_PASS variable.
10570 (install): Remove dependency of install-only and recursively
10571 invoke make for install-only.
10572
f1048712
DE
105732010-10-04 Doug Evans <dje@google.com>
10574
10575 * Makefile.in (uninstall): Use $(DESTDIR).
10576
b53a1623
PA
105772010-09-24 Pedro Alves <pedro@codesourcery.com>
10578
e6ee044d
PA
10579 PR gdb/11842
10580
b53a1623
PA
10581 * linux-x86-low.c (compat_siginfo_from_siginfo)
10582 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10583 si_code is < 0. Check for si_code == SI_TIMER before checking for
10584 si_code < 0.
10585
fa1bd1e4
JB
105862010-09-13 Joel Brobecker <brobecker@adacore.com>
10587
10588 * lynx-i386-low.c: New file.
10589 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10590
47fac8f8
JB
105912010-09-13 Joel Brobecker <brobecker@adacore.com>
10592
10593 * lynx-low.c (ptrace_request_to_str): Remove handling for
10594 request values that have been removed in LynxOS 5.x.
10595
1adfc54d
JB
105962010-09-13 Joel Brobecker <brobecker@adacore.com>
10597
10598 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10599 <ptrace.h>
10600
c2a66c29
NS
106012010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10602
10603 * configure.ac: Add --enable-inprocess-agent option.
10604 * configure: Rebuilt.
10605
32fcada3
YQ
106062010-09-06 Yao Qi <yao@codesourcery.com>
10607
10608 * linux-low.c (linux_kill): Remove unused variable.
10609 (linux_stabilize_threads): Likewise.
10610 * server.c (start_inferior): Likewise.
10611 (queue_stop_reply_callback): Likewise.
10612 * tracepoint.c (do_action_at_tracepoint): Likewise.
10613
0cccb683
YQ
106142010-09-06 Yao Qi <yao@codesourcery.com>
10615
10616 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10617 on return.
10618
423ec54c
JK
106192010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10620
10621 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10622
12ac6819
PA
106232010-09-06 Pedro Alves <pedro@codesourcery.com>
10624
10625 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10626 "$(IPA_DEPFILES)".
10627
8ed54b31
JB
106282010-09-01 Joel Brobecker <brobecker@adacore.com>
10629
10630 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10631 gdbserver/lynx-ppc-low.c: New files.
10632 * Makefile.in (lynx_low_h): New variable.
10633 (lynx-low.o, lynx-ppc-low.o): New rules.
10634 * configure.ac: On LynxOS, link with -lnetinet.
10635 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10636 * configure: regenerate.
10637
bb0116a4
JB
106382010-09-01 Joel Brobecker <brobecker@adacore.com>
10639
10640 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10641 * configure.ac: Add check for vasprintf and vsnprintf.
10642 * configure, config.in: Regenerate.
10643 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10644
a778ab81 106452010-09-01 Joel Brobecker <brobecker@adacore.com>
10646
10647 * gdbreplay.c: Move include of alloca.h up, next to include of
10648 malloc.h.
10649 * server.h: Add include of malloc.h.
10650 * mem-break.c: Remove include of malloc.h.
10651 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10652
8b034a19 106532010-09-01 Joel Brobecker <brobecker@adacore.com>
10654
10655 * Makefile.in (memmem.o): Build with -Wno-error.
10656
106572010-09-01 Joel Brobecker <brobecker@adacore.com>
10658
10659 * utils.c (xsnprintf): Make non-static.
10660 * server.h: Add xsnprintf declaration.
10661 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10662 replace calls to snprintf by calls to xsnprintf throughout.
10663
106642010-09-01 Joel Brobecker <brobecker@adacore.com>
10665
10666 * configure.ac: Add configure check for alloca.
10667 * configure, config.in: Regenerate.
10668 * server.h: Include alloca.h if it exists.
10669 * gdbreplay.c: Include alloca.h if it exists.
10670
1a981360
PA
106712010-08-28 Pedro Alves <pedro@codesourcery.com>
10672
10673 * linux-low.c (__SIGRTMIN): Define if not already defined.
10674 (linux_create_inferior): Check for __ANDROID__ rather than
10675 __SIGRTMIN.
10676 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10677 are already deferred.
10678 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10679 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10680 stopped and already has a pending signal to report.
10681 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10682 a pending signal to report or is moving out of a jump pad.
10683 (linux_init_signals): Check for __ANDROID__ rather than
10684 __SIGRTMIN.
10685
b4d51a55
PA
106862010-08-28 Pedro Alves <pedro@codesourcery.com>
10687
10688 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10689 debug_threads check. Avoid a linear search when not doing debug
10690 output.
10691
ec48365d
PA
106922010-08-27 Pedro Alves <pedro@codesourcery.com>
10693
10694 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10695 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10696 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10697 (process_event): Change local fd's type to gdb_fildes_t.
10698 (create_file_handler): Adjust prototype.
10699 (delete_file_handler): Adjust prototype.
10700 (handle_file_event): Adjust prototype. Use pfildes.
10701 (create_file_event): Adjsut prototype.
10702 * remote-utils.c (remote_desc, listen_desc): Change type to
10703 gdb_fildes_t.
10704 * server.h: New gdb_fildes_t typedef.
10705 [USE_WIN32API]: Include winsock2.h.
10706 (delete_file_handler, add_file_handler): Adjust prototypes.
10707 (pfildes): Declare.
10708 * utils.c (pfildes): New.
10709
854d88f0
PA
107102010-08-27 Pedro Alves <pedro@codesourcery.com>
10711
10712 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10713 * configure: Regenerate.
10714
0146f85b
PA
107152010-08-27 Pedro Alves <pedro@codesourcery.com>
10716
10717 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10718 (linux_done_accessing_memory): ... this.
10719 (linux_target_ops): Adjust.
10720 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10721 * nto-low.c (nto_target_ops): Adjust comment.
10722 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10723 * spu-low.c (spu_target_ops): Adjust comment.
10724 * target.h (target_ops): Rename unprepare_to_access_memory field
10725 to done_accessing_memory.
10726 (unprepare_to_access_memory): Rename to ...
10727 (done_accessing_memory): ... this.
10728
90d74c30
PA
107292010-08-26 Pedro Alves <pedro@codesourcery.com>
10730
10731 * linux-low.c (linux_prepare_to_access_memory): New.
10732 (linux_unprepare_to_access_memory): New.
10733 (linux_target_ops): Install them.
10734 * server.c (read_memory): Rename to ...
10735 (gdb_read_memory): ... this. Use
10736 prepare_to_access_memory/prepare_to_access_memory.
10737 (write_memory): Rename to ...
10738 (gdb_write_memory): ... this. Use
10739 prepare_to_access_memory/prepare_to_access_memory.
10740 (handle_search_memory_1): Adjust.
10741 (process_serial_event): Adjust.
10742 * target.h (struct target_ops): New fields
10743 prepare_to_access_memory and unprepare_to_access_memory.
10744 (prepare_to_access_memory, unprepare_to_access_memory): New.
10745 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10746 prepare_to_access_memory/prepare_to_access_memory.
10747 * nto-low.c (nto_target_ops): Adjust.
10748 * spu-low.c (spu_target_ops): Adjust.
10749 * win32-low.c (win32_target_ops): Adjust.
10750
fd467969
PA
107512010-08-26 Pedro Alves <pedro@codesourcery.com>
10752
10753 * Makefile.in (WARN_CFLAGS): Get it from configure.
10754 (WERROR_CFLAGS): New.
10755 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10756 * configure.ac: Introduce --enable-werror, which adds -Werror to
10757 the compiler command line. Enabled by default. Disable with
10758 --disable-werror. Add -Wdeclaration-after-statement
10759 Wpointer-arith and -Wformat-nonliteral to warning flags.
10760 * configure: Regenerate.
10761
331e2f5f
PA
107622010-08-26 Pedro Alves <pedro@codesourcery.com>
10763
10764 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10765
e581f2b4
PA
107662010-08-26 Pedro Alves <pedro@codesourcery.com>
10767
10768 * gdbreplay.c (remote_error): New.
10769 (gdbchar): New.
10770 (expect): Use gdbchar. Check for error reading from GDB.
10771 Clarify sync error output.
10772 (play): Check for errors writing to GDB.
10773 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10774 * remote-utils.c (getpkt): Check for errors writing to the remote
10775 descriptor.
10776
3c11dd79
PA
107772010-08-25 Pedro Alves <pedro@codesourcery.com>
10778
10779 * linux-low.c (linux_wait_1): Move non-debugging code out of
10780 `debug_threads' control.
10781
d20a8ad9
PA
107822010-08-25 Pedro Alves <pedro@codesourcery.com>
10783
10784 * linux-low.c (linux_wait_1): Don't set last_status here.
10785 * server.c (push_event, queue_stop_reply_callback): Assert we're
10786 not pushing a TARGET_WAITKIND_IGNORE event.
10787 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10788 (myresume, handle_target_event): Set the thread's last_resume_kind
10789 and last_status from the target returned status.
10790
964e4306
PA
107912010-08-25 Pedro Alves <pedro@codesourcery.com>
10792
10793 PR threads/10729
10794
10795 * linux-x86-low.c (update_debug_registers_callback): New.
10796 (i386_dr_low_set_addr): Use it.
10797 (i386_dr_low_get_addr): New.
10798 (i386_dr_low_set_control): Use update_debug_registers_callback.
10799 (i386_dr_low_get_control): New.
10800 (i386_dr_low_get_status): Adjust.
10801 * linux-low.c (linux_stop_lwp): New.
10802 * linux-low.h (linux_stop_lwp): Declare.
10803
10804 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10805 argument instead of a i386_debug_reg_state.
10806 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10807 a i386_debug_reg_state.
10808 (i386_insert_aligned_watchpoint): Adjust.
10809 (i386_remove_aligned_watchpoint): Adjust.
10810 (i386_low_stopped_data_address): Read the debug registers from the
10811 inferior instead of from the mirrors.
10812 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10813 (i386_dr_low_get_addr): Declare.
10814 (i386_dr_low_get_control): Declare.
10815 (i386_dr_low_get_status): Change prototype.
10816
10817 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10818 (i386_dr_low_get_addr): New.
10819 (i386_dr_low_get_control): New.
10820 (i386_dr_low_get_status): Adjust prototype. Return
10821 dr_status_mirror.
10822 (i386_initial_stuff): Clear dr_status_mirror and
10823 dr_control_mirror.
10824 (i386_get_thread_context): Adjust.
10825 (i386_set_thread_context): Adjust.
10826 (i386_thread_added): Adjust.
10827
5f21a75b
PA
108282010-08-24 Pedro Alves <pedro@codesourcery.com>
10829
10830 * linux-low.h (linux_thread_area): Delete declaration.
10831
3e4c1235
TS
108322010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10833
10834 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10835 after its termination.
10836
1971b033
PA
108372010-08-09 Pedro Alves <pedro@codesourcery.com>
10838
10839 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10840 (gdb_wants_all_stopped): Delete.
10841 (linux_wait_1): Don't call them.
10842 * server.c (handle_v_cont): Tag all threads as want-stopped.
10843 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10844 stopped as "client-wants-stopped".
10845
310444ac
PA
108462010-07-31 Pedro Alves <pedro@codesourcery.com>
10847
10848 * Makefile.in (signals_h): New.
10849 (server_h): Depend on it.
10850 (server.o): Don't depend on $(signals_def).
10851 (signals.o): Depend on $(signals_def).
10852
a19cae16
JK
108532010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10854
10855 * Makefile.in (signals_def): New.
10856 (server_h): Append include/gdb/signals.h and signals_def.
10857 (server.o): Append signals_def.
10858
30d50328
JK
108592010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10860
10861 * server.c (handle_target_event): Use target_signal_to_host for
10862 resume_info.sig initialization.
10863 * target.h (struct thread_resume) <sig>: New comment.
10864
5c3216e2
OS
108652010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10866
c6f46ca0
OS
10867 * server.c (handle_query): strcpy() the returned string from paddress()
10868 instead of sprintf().
5c3216e2
OS
10869 * utils.c (paddress): Return phex_nz().
10870
6bd31874
JB
108712010-07-07 Joel Brobecker <brobecker@adacore.com>
10872
10873 * server.c (handle_v_cont): Call mourn_inferior if process
10874 just exited.
10875 (myresume): Likewise.
10876
0fb4aa4b
PA
108772010-07-01 Pedro Alves <pedro@codesourcery.com>
10878
10879 Static tracepoints, and integration with UST.
10880
10881 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10882 * mem-break.c (uninsert_all_breakpoints)
10883 (reinsert_all_breakpoints): New.
10884 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10885 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10886 (gdb_agent_ust_loaded, helper_thread_id)
10887 (gdb_agent_helper_thread_id): New macros.
10888 (struct ipa_sym_addresses): Add addr_ust_loaded,
10889 addr_helper_thread_id, addr_cmd_buf.
10890 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10891 (in_process_agent_loaded_ust): New.
10892 (write_e_ust_not_loaded): New.
10893 (maybe_write_ipa_ust_not_loaded): New.
10894 (struct collect_static_trace_data_action): New.
10895 (enum tracepoint_type) <static_tracepoint>: New.
10896 (struct tracepoint) <handle>: Mention static tracepoints.
10897 (struct static_tracepoint_ctx): New.
10898 (CMD_BUF_SIZE): New.
10899 (add_tracepoint_action): Handle static tracepoint actions.
10900 (unprobe_marker_at): New.
10901 (clear_installed_tracepoints): Handle static tracepoints.
10902 (cmd_qtdp): Handle static tracepoints.
10903 (probe_marker_at): New.
10904 (cmd_qtstart): Handle static tracepoints.
10905 (response_tracepoint): Handle static tracepoints.
10906 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10907 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10908 (get_context_regcache): Handle static tracepoints.
10909 (do_action_at_tracepoint): Handle static tracepoint actions.
10910 (traceframe_find_block_type): Handle static trace data blocks.
10911 (traceframe_read_sdata): New.
10912 (download_tracepoints): Download static tracepoint actions.
10913 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10914 (GDB_PROBE_NAME): New.
10915 (ust_ops): New.
10916 (GET_UST_SYM): New.
10917 (USTF): New.
10918 (dlsym_ust): New.
10919 (ust_marker_to_static_tracepoint): New.
10920 (gdb_probe): New.
10921 (collect_ust_data_at_tracepoint): New.
10922 (gdb_ust_probe): New.
10923 (UNIX_PATH_MAX, SOCK_DIR): New.
10924 (gdb_ust_connect_sync_socket): New.
10925 (resume_thread, stop_thread): New.
10926 (run_inferior_command): New.
10927 (init_named_socket): New.
10928 (gdb_ust_socket_init): New.
10929 (cstr_to_hexstr): New.
10930 (next_st): New.
10931 (first_marker, next_marker): New.
10932 (response_ust_marker): New.
10933 (cmd_qtfstm, cmd_qtsstm): New.
10934 (unprobe_marker_at, probe_marker_at): New.
10935 (cmd_qtstmat, gdb_ust_thread): New.
10936 (gdb_ust_init): New.
10937 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10938 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10939 (ST_REGENTRY): New.
10940 (x86_64_st_collect_regmap): New.
10941 (X86_64_NUM_ST_COLLECT_GREGS): New.
10942 (AMD64_RIP_REGNUM): New.
10943 (supply_static_tracepoint_registers): New.
10944 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10945 (ST_REGENTRY): New.
10946 (i386_st_collect_regmap): New.
10947 (i386_NUM_ST_COLLECT_GREGS): New.
10948 (supply_static_tracepoint_registers): New.
10949 * server.c (handle_query): Handle qXfer:statictrace:read.
10950 <qSupported>: Report support for StaticTracepoints, and
10951 qXfer:statictrace:read features.
10952 * server.h (traceframe_read_sdata)
10953 (supply_static_tracepoint_registers): Declare.
10954 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10955 (unpack_varlen_hex): Include in IPA build.
10956 * Makefile.in (ustlibs, ustinc): New.
10957 (IPA_OBJS): Add remote-utils-ipa.o.
10958 ($(IPA_LIB)): Link -ldl and -lpthread.
10959 (UST_CFLAGS): New.
10960 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10961 * config.in, configure: Regenerate.
10962
9e4344e5
PA
109632010-06-20 Ian Lance Taylor <iant@google.com>
10964 Pedro Alves <pedro@codesourcery.com>
10965
10966 * linux-x86-low.c (always_true): Delete.
10967 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10968 trying to fool the compiler with always_true.
10969
c6beb2cb
PA
109702010-06-20 Pedro Alves <pedro@codesourcery.com>
10971
10972 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10973 conditions in gdbserver.
10974
d2ed6730
UW
109752010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10976
10977 * spu-low.c (spu_read_memory): Wrap around local store limit.
10978 (spu_write_memory): Likewise.
10979
4e29fb54
PA
109802010-06-15 Pedro Alves <pedro@codesourcery.com>
10981
10982 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10983 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10984 LONGEST uses.
10985 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10986 uses.
10987 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10988 uses with LONGEST uses.
10989
6a271cae
PA
109902010-06-14 Stan Shebs <stan@codesourcery.com>
10991 Pedro Alves <pedro@codesourcery.com>
10992
10993 Bytecode compiler.
10994
10995 * linux-x86-low.c: Include limits.h.
10996 (add_insns): New.
10997 (always_true): New.
10998 (EMIT_ASM): New.
10999 (EMIT_ASM32): New.
11000 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11001 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11002 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11003 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11004 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11005 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11006 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11007 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11008 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11009 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11010 (amd64_emit_void_call_2): New.
11011 (amd64_emit_ops): New.
11012 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11013 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11014 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11015 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11016 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11017 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11018 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11019 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11020 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11021 (i386_emit_stack_adjust, i386_emit_int_call_1)
11022 (i386_emit_void_call_2): New.
11023 (i386_emit_ops): New.
11024 (x86_emit_ops): New.
11025 (the_low_target): Install x86_emit_ops.
11026 * server.h (struct emit_ops): New.
11027 (get_raw_reg_func_addr): Declare.
11028 (current_insn_ptr, emit_error): Declare.
11029 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11030 (set_trace_state_variable_value): New defines.
11031 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11032 addr_get_trace_state_variable_value and
11033 addr_set_trace_state_variable_value.
11034 (symbol_list): New fields for get_raw_reg,
11035 get_trace_state_variable_value and set_trace_state_variable_value.
11036 (condfn): New typedef.
11037 (struct tracepoint): New field `compiled_cond'.
11038 (do_action_at_tracepoint): Clear compiled_cond.
11039 (get_trace_state_variable_value, set_trace_state_variable_value):
11040 Export in the IPA.
11041 (condition_true_at_tracepoint): If there's a compiled condition,
11042 run that.
11043 (current_insn_ptr, emit_error): New globals.
11044 (struct bytecode_address): New.
11045 (get_raw_reg_func_addr): New.
11046 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11047 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11048 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11049 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11050 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11051 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11052 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11053 (compile_tracepoint_condition, compile_bytecodes): New.
11054 * target.h (emit_ops): Forward declare.
11055 (struct target_ops): New field emit_ops.
11056 (target_emit_ops): New.
11057 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11058 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11059 * linux-low.c (linux_emit_ops): New.
11060 (linux_target_ops): Install it.
11061 * linux-low.h (struct linux_target_ops): New field emit_ops.
11062
92b72907
UW
110632010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11064
11065 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11066 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11067
fa593d66
PA
110682010-06-01 Pedro Alves <pedro@codesourcery.com>
11069 Stan Shebs <stan@codesourcery.com>
11070
11071 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11072 (all): Depend on $(extra_libraries).
11073 (install-only): Install the IPA.
11074 (IPA_OBJS, IPA_LIB): New.
11075 (clean): Remove the IPA lib.
11076 (IPAGENT_CFLAGS): New.
11077 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11078 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11079 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11080 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11081 * configure.ac: Check for atomic builtins support in the compiler.
11082 (IPA_DEPFILES, extra_libraries): Define.
11083 * configure.srv (ipa_obj): Add description.
11084 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11085 (i[34567]86-*-linux*): Set ipa_obj.
11086 (x86_64-*-linux*): Set ipa_obj.
11087 * linux-low.c (stabilizing_threads): New.
11088 (supports_fast_tracepoints): New.
11089 (linux_detach): Stabilize threads before detaching.
11090 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11091 the lwp is either not stabilizing, or is moving out of a jump pad.
11092 (linux_fast_tracepoint_collecting): New.
11093 (maybe_move_out_of_jump_pad): New.
11094 (enqueue_one_deferred_signal): New.
11095 (dequeue_one_deferred_signal): New.
11096 (linux_wait_for_event_1): If moving out of a jump pad, defer
11097 pending signals to later.
11098 (linux_stabilize_threads): New.
11099 (linux_wait_1): Check if threads need moving out of jump pads, and
11100 do it if so.
11101 (stuck_in_jump_pad_callback): New.
11102 (move_out_of_jump_pad_callback): New.
11103 (lwp_running): New.
11104 (linux_resume_one_lwp): Handle moving out of jump pads.
11105 (linux_set_resume_request): Dequeue deferred signals.
11106 (need_step_over_p): Also step over fast tracepoint jumps.
11107 (start_step_over): Also uninsert fast tracepoint jumps.
11108 (finish_step_over): Also reinsert fast tracepoint jumps.
11109 (linux_install_fast_tracepoint_jump): New.
11110 (linux_target_ops): Install linux_stabilize_threads and
11111 linux_install_fast_tracepoint_jump_pad.
11112 * linux-low.h (linux_target_ops) <get_thread_area,
11113 install_fast_tracepoint_jump_pad>: New fields.
11114 (struct lwp_info) <collecting_fast_tracepoint,
11115 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11116 (linux_get_thread_area): Declare.
11117 * linux-x86-low.c (jump_insn): New.
11118 (x86_get_thread_area): New.
11119 (append_insns): New.
11120 (push_opcode): New.
11121 (amd64_install_fast_tracepoint_jump_pad): New.
11122 (i386_install_fast_tracepoint_jump_pad): New.
11123 (x86_install_fast_tracepoint_jump_pad): New.
11124 (the_low_target): Install x86_get_thread_area and
11125 x86_install_fast_tracepoint_jump_pad.
11126 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11127 (struct fast_tracepoint_jump): New.
11128 (fast_tracepoint_jump_insn): New.
11129 (fast_tracepoint_jump_shadow): New.
11130 (find_fast_tracepoint_jump_at): New.
11131 (fast_tracepoint_jump_here): New.
11132 (delete_fast_tracepoint_jump): New.
11133 (set_fast_tracepoint_jump): New.
11134 (uninsert_fast_tracepoint_jumps_at): New.
11135 (reinsert_fast_tracepoint_jumps_at): New.
11136 (set_breakpoint_at): Use write_inferior_memory.
11137 (uninsert_raw_breakpoint): Use write_inferior_memory.
11138 (check_mem_read): Mask out fast tracepoint jumps.
11139 (check_mem_write): Mask out fast tracepoint jumps.
11140 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11141 (set_fast_tracepoint_jump): Declare.
11142 (delete_fast_tracepoint_jump)
11143 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11144 (reinsert_fast_tracepoint_jumps_at): Declare.
11145 * regcache.c: Don't compile many functions when building the
11146 in-process agent library.
11147 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11148 the register buffer in the heap.
11149 (free_register_cache): If the register buffer isn't owned by the
11150 regcache, don't free it.
11151 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11152 pre-existing register caches.
11153 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11154 type.
11155 (convert_ascii_to_int): : Constify `from' parameter type.
11156 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11157 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11158 the needed buffer in-place.
11159 (relocate_instruction): New.
11160 * server.c (handle_query) <qSymbols>: If the target supports
11161 tracepoints, give it a chance of looking up symbols. Report
11162 support for fast tracepoints.
11163 (handle_status): Stabilize threads.
11164 (process_serial_event): Adjust.
11165 * server.h (struct fast_tracepoint_jump): Forward declare.
11166 (struct process_info) <fast_tracepoint_jumps>: New field.
11167 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11168 (decode_X_packet, decode_M_packet): Adjust.
11169 (relocate_instruction): Declare.
11170 (in_process_agent_loaded): Declare.
11171 (tracepoint_look_up_symbols): Declare.
11172 (struct fast_tpoint_collect_status): Declare.
11173 (fast_tracepoint_collecting): Declare.
11174 (force_unlock_trace_buffer): Declare.
11175 (handle_tracepoint_bkpts): Declare.
11176 (initialize_low_tracepoint)
11177 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11178 * target.h (struct target_ops) <stabilize_threads,
11179 install_fast_tracepoint_jump_pad>: New fields.
11180 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11181 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11182 [HAVE_STDINT_H]: Include stdint.h.
11183 (trace_debug_1): Rename to ...
11184 (trace_vdebug): ... this.
11185 (trace_debug): Rename to ...
11186 (trace_debug_1): ... this. Add `level' parameter.
11187 (trace_debug): New.
11188 (ATTR_USED, ATTR_NOINLINE): New.
11189 (IP_AGENT_EXPORT): New.
11190 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11191 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11192 (about_to_request_buffer_space, trace_buffer_is_full)
11193 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11194 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11195 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11196 (traceframe_write_count, traceframes_created)
11197 (trace_state_variables)
11198 New renaming defines.
11199 (struct ipa_sym_addresses): New.
11200 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11201 (symbol_list): New.
11202 (ipa_sym_addrs): New.
11203 (all_tracepoint_symbols_looked_up): New.
11204 (in_process_agent_loaded): New.
11205 (write_e_ipa_not_loaded): New.
11206 (maybe_write_ipa_not_loaded): New.
11207 (tracepoint_look_up_symbols): New.
11208 (debug_threads) [IN_PROCESS_AGENT]: New.
11209 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11210 (UNKNOWN_SIDE_EFFECTS): New.
11211 (stop_tracing): New.
11212 (flush_trace_buffer): New.
11213 (stop_tracing_bkpt): New.
11214 (flush_trace_buffer_bkpt): New.
11215 (read_inferior_integer): New.
11216 (read_inferior_uinteger): New.
11217 (read_inferior_data_pointer): New.
11218 (write_inferior_data_pointer): New.
11219 (write_inferior_integer): New.
11220 (write_inferior_uinteger): New.
11221 (struct collect_static_trace_data_action): Delete.
11222 (enum tracepoint_type): New.
11223 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11224 <actions_str, step_actions, step_actions_str>: Only include in
11225 GDBserver.
fa593d66
PA
11226 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11227 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11228 (tracepoints): Use IP_AGENT_EXPORT.
11229 (last_tracepoint): Don't include in the IPA.
11230 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11231 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11232 (alloced_trace_state_variables): New.
11233 (trace_state_variables): Use IP_AGENT_EXPORT.
11234 (traceframe_t): Delete unused variable.
11235 (circular_trace_buffer): Don't include in the IPA.
11236 (trace_buffer_start): Delete.
11237 (struct trace_buffer_control): New.
11238 (trace_buffer_free): Delete.
11239 (struct ipa_trace_buffer_control): New.
11240 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11241 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11242 New.
11243 (trace_buffer_ctrl): New.
11244 (TRACE_BUFFER_CTRL_CURR): New.
11245 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11246 Reimplement as macros.
11247 (trace_buffer_wrap): Delete.
11248 (traceframe_write_count, traceframe_read_count)
11249 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11250 (struct tracepoint_hit_ctx) <type>: New field.
11251 (struct fast_tracepoint_ctx): New.
11252 (memory_barrier): New.
11253 (cmpxchg): New.
11254 (record_tracepoint_error): Update atomically in the IPA.
11255 (clear_inferior_trace_buffer): New.
11256 (about_to_request_buffer_space): New.
11257 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11258 updating the same buffer.
11259 (add_tracepoint): Default the tracepoint's type to trap
11260 tracepoint, and orig_size to -1.
11261 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11262 internal variables.
11263 (create_trace_state_variable): New parameter `gdb'. Handle it.
11264 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11265 (cmd_qtdp): Handle fast tracepoints.
11266 (cmd_qtdv): Adjust.
11267 (max_jump_pad_size): New.
11268 (gdb_jump_pad_head): New.
11269 (get_jump_space_head): New.
11270 (claim_jump_space): New.
11271 (sort_tracepoints): New.
11272 (MAX_JUMP_SIZE): New.
11273 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11274 IPA.
11275 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11276 support. Upload fast traceframes, and delete internal IPA
11277 breakpoints.
11278 (stop_tracing_handler): New.
11279 (flush_trace_buffer_handler): New.
11280 (cmd_qtstop): Upload fast tracepoints.
11281 (response_tracepoint): Handle fast tracepoints.
11282 (tracepoint_finished_step): Upload fast traceframes. Set the
11283 tracepoint hit context's tracepoint type.
11284 (handle_tracepoint_bkpts): New.
11285 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11286 type. Add comment about fast tracepoints.
11287 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11288 non-existing action_str field.
11289 (get_context_regcache): Handle fast tracepoints.
11290 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11291 to the regcache.
11292 (fast_tracepoint_from_jump_pad_address): New.
11293 (fast_tracepoint_from_ipa_tpoint_address): New.
11294 (collecting_t): New.
11295 (force_unlock_trace_buffer): New.
11296 (fast_tracepoint_collecting): New.
11297 (collecting): New.
11298 (gdb_collect): New.
11299 (write_inferior_data_ptr): New.
11300 (target_tp_heap): New.
11301 (target_malloc): New.
11302 (download_agent_expr): New.
11303 (UALIGN): New.
11304 (download_tracepoints): New.
11305 (download_trace_state_variables): New.
11306 (upload_fast_traceframes): New.
11307 (IPA_FIRST_TRACEFRAME): New.
11308 (IPA_NEXT_TRACEFRAME_1): New.
11309 (IPA_NEXT_TRACEFRAME): New.
11310 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11311 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11312 (gdb_jump_pad_buffer_end): New.
11313 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11314 (initialize_tracepoint): Adjust.
11315 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11316 buffer. Initialize the low module.
11317 * utils.c (PREFIX, TOOLNAME): New.
11318 (malloc_failure): Use PREFIX.
11319 (error): In the IPA, an error causes an exit.
11320 (fatal, warning): Use PREFIX.
11321 (internal_error): Use TOOLNAME.
11322 (NUMCELLS): Increase to 10.
11323 * configure, config.in: Regenerate.
11324
d149dd1d
PA
113252010-06-01 Pedro Alves <pedro@codesourcery.com>
11326
11327 * server.c (handle_query) <qSupported>: Do two passes over the
11328 qSupported string to avoid nesting strtok.
11329
f6528abd
JK
113302010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11331
11332 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11333 (CDEPS): New.
11334 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11335 -Wl,--dynamic-list.
11336 * configure: Regenerate.
11337 * proc-service.list: New.
11338
ca2a87a0
JK
113392010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11340
11341 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11342 New comment.
11343
363a6e9f
OS
113442010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11345
11346 * gdbreplay.c (remote_open): Check error return from socket() call by
11347 its equality to -1 not by it being negative.
11348 * remote-utils.c (remote_open): Likewise.
11349
d23b6cb1
PA
113502010-05-23 Pedro Alves <pedro@codesourcery.com>
11351
11352 * config.h: Regenerate.
11353
28d3cf85
MK
113542010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11355
11356 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11357 doesn't provide PTRACE_GET_THREAD_AREA.
11358
fea36a59
MK
113592010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11360
11361 * linux-m68k-low.c: Include <asm/ptrace.h>
11362 (ps_get_thread_area): Implement.
11363
24b066ba
DE
113642010-05-03 Doug Evans <dje@google.com>
11365
11366 * event-loop.c (struct callback_event): New struct.
11367 (callback_list): New global.
11368 (append_callback_event, delete_callback_event): New functions.
11369 (process_callback): New function.
11370 (start_event_loop): Call it.
11371 * remote-utils.c (NOT_SCHEDULED): Define.
11372 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11373 moved out of readchar.
11374 (readchar): Rewrite. Call reschedule before returning.
11375 (reset_readchar): New function.
11376 (remote_close): Call it.
11377 (process_remaining, reschedule): New functions.
11378 * server.h (callback_handler_func): New typedef.
11379 (append_callback_event, delete_callback_event): Declare.
11380
9836d6ea
PA
113812010-05-03 Pedro Alves <pedro@codesourcery.com>
11382
11383 * proc-service.c (ps_pglobal_lookup): Use
11384 thread_db_look_up_one_symbol.
11385 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11386 parameter. Use it instead of all_symbols_looked_up.
11387 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11388 field.
11389 (all_symbols_looked_up): Don't declare.
11390 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11391 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11392 field.
11393 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11394 Set all_symbols_looked_up here.
11395 (thread_db_look_up_one_symbol): New.
11396 (thread_db_get_tls_address): Adjust.
11397 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11398 thread_db object on the heap, and tentatively set it in the
11399 process structure.
11400 (thread_db_init): Don't set all_symbols_looked_up here.
11401 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11402
7984d532
PA
114032010-05-03 Pedro Alves <pedro@codesourcery.com>
11404
11405 * linux-low.c (linux_kill, linux_detach): Adjust.
11406 (status_pending_p_callback): Remove redundant statement. Check
11407 for !TARGET_WAITIKIND_IGNORE, instead of
11408 TARGET_WAITKIND_STOPPED.
11409 (handle_tracepoints): Make sure LWP is locked. Adjust.
11410 (linux_wait_for_event_1): Adjust.
11411 (linux_cancel_breakpoints): New.
11412 (unsuspend_one_lwp): New.
11413 (unsuspend_all_lwps): New.
11414 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11415 (send_sigstop_callback): Change return type to int, add new
11416 `except' parameter and handle it.
11417 (suspend_and_send_sigstop_callback): New.
11418 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11419 pass them down. If SUSPEND, also increment the lwp's suspend
11420 count.
11421 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11422 (need_step_over_p): Don't consider suspended LWPs.
11423 (start_step_over): Adjust.
11424 (proceed_one_lwp): Change return type to int, add new `except'
11425 parameter and handle it.
11426 (unsuspend_and_proceed_one_lwp): New.
11427 (proceed_all_lwps): Use find_inferior instead of
11428 for_each_inferior.
11429 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11430 also decrement the suspend count of LWPs. Pass `except' down,
11431 instead of hacking its suspend count.
11432 (linux_pause_all): Add `freeze' parameter. Adjust.
11433 (linux_unpause_all): New.
11434 (linux_target_ops): Install linux_unpause_all.
11435 * server.c (handle_status): Adjust.
11436 * target.h (struct target_ops): New fields `unpause_all' and
11437 `cancel_breakpoints'. Add new parameter to `pause_all'.
11438 (pause_all): Add new `freeze' parameter.
11439 (unpause_all): New.
11440 (cancel_breakpoints): New.
11441 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11442 cancel breakpoints.
11443 (cmd_qtstart): Pause threads.
11444 (stop_tracing): Pause threads, and cancel breakpoints.
11445 * win32-low.c (win32_target_ops): Adjust.
11446
e471f25b
PA
114472010-05-03 Pedro Alves <pedro@codesourcery.com>
11448
11449 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11450 the inferior right away from here...
11451 (linux_wait_1): ... to here, and adjust to check the thread's
11452 last_resume_kind instead of the lwp's step or stop_expected flags.
11453
1915ef4f
PA
114542010-05-02 Pedro Alves <pedro@codesourcery.com>
11455
11456 * README: Use consistent `GDB' and `GDBserver' spellings.
11457
f9e39928
PA
114582010-05-02 Pedro Alves <pedro@codesourcery.com>
11459
11460 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11461 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11462 (linux_detach_one_lwp): Assume the lwp is stopped.
11463 (any_thread_of): Delete.
11464 (linux_detach): Stop all lwps here. Don't blindly delete all
11465 breakpoints.
11466 (delete_lwp_callback): New.
11467 (linux_mourn): Delete all lwps of the process that is gone.
11468 (linux_wait_1): Don't delete the last lwp of the process here.
11469 * mem-break.h (mark_breakpoints_out): Declare.
11470 * mem-break.c (mark_breakpoints_out): New.
11471 (free_all_breakpoints): Use it.
11472 * server.c (handle_target_event): If the process is gone, mark
11473 breakpoints out.
11474 * thread-db.c (struct thread_db) <create_bp>: New field.
11475 (thread_db_enable_reporting): Fix prototype. Store a thread event
11476 breakpoint reference in the thread_db struct.
11477 (thread_db_load_search): Clear the thread_db object.
11478 (try_thread_db_load_1): Ditto.
11479 (switch_to_process): New.
11480 (disable_thread_event_reporting): Use it.
11481 (remove_thread_event_breakpoints): New.
11482 (thread_db_detach, thread_db_mourn): Use it.
11483
1e7fc18c
PA
114842010-05-01 Pedro Alves <pedro@codesourcery.com>
11485
11486 * linux-low.c (linux_enable_event_reporting): New.
11487 (linux_wait_for_event_1, handle_extended_wait): Use it.
11488
02fc4de7
PA
114892010-04-30 Pedro Alves <pedro@codesourcery.com>
11490
11491 * linux-low.c (linux_kill_one_lwp, linux_kill)
11492 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11493 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11494 SIGSTOP even if the LWP is stopped.
11495 (send_sigstop_callback): New.
11496 (stop_all_lwps): Use send_sigstop_callback instead.
11497 (linux_resume_one_thread): Adjust.
11498 (proceed_one_lwp): Still proceed an LWP that the client has
11499 requested to stop, if we haven't reported it as stopped yet. Make
11500 sure that LWPs the client want stopped, have a pending SIGSTOP.
11501
bc3b5632
DE
115022010-04-26 Doug Evans <dje@google.com>
11503
ae1ada35
DE
11504 * server.c (handle_general_set): Make static.
11505
bc3b5632
DE
11506 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11507 Print received char after testing for error/eof instead of before.
11508 (input_interrupt): Tweak comment.
11509
65730243
DE
115102010-04-23 Doug Evans <dje@google.com>
11511
11512 * server.c (start_inferior): Print inferior argv if --debug.
11513
a8ae7dc0
AR
115142010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11515
11516 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11517 * nto-x86-low.c: Include server.h
11518
1c07cc19
PM
115192010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11520
11521 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11522 be consistent with other sources of this directory.
11523 (init_registers_amd64): Correct name of source file of this function
11524 in the comment.
11525
e0a61e09
PM
115262010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11527
11528 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11529 64-bit executables.
11530
54709339
PM
115312010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11532
11533 * win32-i386-low.c: Add 64-bit support.
11534 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11535 (init_registers_amd64): Declare.
11536 (mappings): Add 64-bit version of array.
11537 (init_windows_x86): New function.
11538 (the_low_target): Change init_arch field to init_windows_x86.
11539
e8f0053d
PM
115402010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11541
11542 * win32-low.c: Adapt to support also 64-bit architecture.
11543 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11544 (get_image_name): Use SIZE_T type for local variable `done'.
11545 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11546 (toolhelp_get_dll_name): Idem.
11547 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11548 Use uintptr_t typecast to avoid warning.
11549 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11550 (handle_exception): Use phex_nz to avoid warning.
11551 (win32_wait): Remove unused local variable `process'.
11552
c481e77e
PM
115532010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11554
11555 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11556 `amd64-avx.o'.
11557
12ea4b69
PM
115582010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11559
11560 * configure.ac: Use `ws2_32' library for srv_mingw.
11561 * configure: Regenerate.
11562 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11563 * remote-utils.c: Likewise.
11564
f6d1620c
L
115652010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11566
11567 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11568 if __x86_64__ is defined.
11569
8e642873
PM
115702010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11571
11572 * configure: Regenerate.
11573
711e434b
PM
115742010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11575
11576 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11577 * target.h (target_ops): New get_tib_address field.
11578 * win32-low.h (win32_thread_info): Add thread_local_base field.
11579 * win32-low.c (child_add_thread): Add tlb argument.
11580 Set thread_local_base field to TLB.
11581 (get_child_debug_event): Adapt to child_add_thread change.
11582 (win32_get_tib_address): New function.
11583 (win32_target_ops): Set get_tib_address field to
11584 win32_get_tib_address.
11585 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11586
505106cd
PA
115872010-04-12 Pedro Alves <pedro@codesourcery.com>
11588
505106cd
PA
11589 * linux-low.c (linux_mourn): Also remove the process.
11590 * server.c (handle_target_event): Don't remove the process here.
11591 * nto-low.c (nto_mourn): New.
11592 (nto_target_ops): Install it.
11593 * spu-low.c (spu_mourn): New.
11594 (spu_target_ops): Install it.
11595 * win32-low.c (win32_mourn): New.
11596 (win32_target_ops): Install it.
11597
e8470a06
PA
115982010-04-12 Pedro Alves <pedro@codesourcery.com>
11599
11600 * server.h (buffer_xml_printf): Remove redundant `;'.
11601
45ba0d02
PA
116022010-04-12 Pedro Alves <pedro@codesourcery.com>
11603
11604 * regcache.c (set_register_cache): Invalidate regcaches before
11605 changing the register cache layout.
11606 (regcache_invalidate_one): Allow a NULL regcache.
11607 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11608 regcaches before changing the register cache layout or the target
11609 regsets.
11610
59e04013
L
116112010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11612
11613 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11614 variable warning on Linux/x86-64.
11615
8336d594
PA
116162010-04-11 Pedro Alves <pedro@codesourcery.com>
11617
11618 GDBserver disconnected tracing support.
11619
11620 * linux-low.c (linux_remove_process): Delete.
11621 (add_lwp): Don't set last_resume_kind here.
11622 (linux_kill): Use `mourn'.
11623 (linux_detach): Use `thread_db_detach', and `mourn'.
11624 (linux_mourn): New.
11625 (linux_attach_lwp_1): Adjust comment.
11626 (linux_attach): last_resume_kind moved the thread_info; adjust.
11627 (status_pending_p_callback): Adjust.
11628 (linux_wait_for_event_1): Adjust.
11629 (count_events_callback, select_singlestep_lwp_callback)
11630 (select_event_lwp_callback, cancel_breakpoints_callback)
11631 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11632 (proceed_one_lwp): Adjust.
11633 (linux_async): Add debug output.
11634 (linux_thread_stopped): New.
11635 (linux_pause_all): New.
11636 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11637 linux_pause_all.
11638 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11639 (thread_db_free): Delete declaration.
11640 (thread_db_detach, thread_db_mourn): Declare.
11641 * thread-db.c (thread_db_init): Use thread_db_mourn.
11642 (thread_db_free): Delete, split in two.
11643 (disable_thread_event_reporting): New.
11644 (thread_db_detach): New.
11645 (thread_db_mourn): New.
11646
11647 * server.h (struct thread_info) <last_resume_kind>: New field.
11648 <attached>: Add comment.
11649 <gdb_detached>: New field.
11650 (handler_func): Change return type to int.
11651 (handle_serial_event, handle_target_event): Ditto.
11652 (gdb_connected): Declare.
11653 (tracing): Delete.
11654 (disconnected_tracing): Declare.
11655 (stop_tracing): Declare.
11656
11657 * server.c (handle_query) <qSupported>: Report support for
11658 disconnected tracing.
11659 (queue_stop_reply_callback): Account for running threads.
11660 (gdb_wants_thread_stopped): New.
11661 (gdb_wants_all_threads_stopped): New.
11662 (gdb_reattached_process): New.
11663 (handle_status): Clear the `gdb_detached' flag of all processes.
11664 In all-stop, stop all threads.
11665 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11666 (process_serial_event): If the remote connection breaks, or if an
11667 exit was forced with "monitor exit", force an event loop exit.
11668 Handle disconnected tracing on detach.
11669 (handle_serial_event): Adjust.
11670 (handle_target_event): If GDB isn't connected, forward events back
11671 to the inferior, unless the last process exited, in which case,
11672 exit gdbserver. Adjust interface.
11673
11674 * remote-utils.c (remote_open): Don't block in accept. Instead
11675 register an event loop source on the listen socket file
11676 descriptor. Refactor bits into ...
11677 (listen_desc): ... this new global.
11678 (gdb_connected): ... this new function.
11679 (enable_async_notification): ... this new function.
11680 (handle_accept_event): ... this new function.
11681 (remote_close): Clear remote_desc.
11682
11683 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11684
11685 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11686 New fields.
11687 (mourn_inferior): Define.
11688 (target_process_qsupported): Avoid the dangling else problem.
11689 (thread_stopped): Define.
11690 (pause_all): Define.
11691 (target_waitstatus_to_string): Declare.
11692 * target.c (target_waitstatus_to_string): New.
11693
11694 * tracepoint.c (tracing): Make extern.
11695 (disconnected_tracing): New.
11696 (stop_tracing): Make extern. Handle tracing stops due to GDB
11697 disconnecting.
11698 (cmd_qtdisconnected): New.
11699 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11700 (handle_tracepoint_general_set): Handle QTDisconnected.
11701
11702 * event-loop.c (event_handler_func): Change return type to int.
11703 (process_event): Bail out if the event handler wants the event
11704 loop to stop.
11705 (handle_file_event): Ditto.
11706 (start_event_loop): Bail out if the event handler wants the event
11707 loop to stop.
11708
11709 * nto-low.c (nto_target_ops): Adjust.
11710 * spu-low.c (spu_wait): Don't remove the process here.
11711 (spu_target_ops): Adjust.
11712 * win32-low.c (win32_wait): Don't remove the process here.
11713 (win32_target_ops): Adjust.
11714
5d267c4c
PA
117152010-04-11 Pedro Alves <pedro@codesourcery.com>
11716
11717 * regcache.c (realloc_register_cache): Invalidate inferior's
11718 regcache before recreating it.
11719
623ccd72
PA
117202010-04-09 Pedro Alves <pedro@codesourcery.com>
11721
11722 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11723
219f2f23
PA
117242010-04-09 Stan Shebs <stan@codesourcery.com>
11725 Pedro Alves <pedro@codesourcery.com>
11726
11727 * server.h (LONGEST): New.
11728 (struct thread_info) <while_stepping>: New field.
11729 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11730 Declare.
11731 (initialize_tracepoint, handle_tracepoint_general_set)
11732 (handle_tracepoint_query, tracepoint_finished_step)
11733 (tracepoint_was_hit, release_while_stepping_state_list):
11734 (current_traceframe): Declare.
11735 * server.c (handle_general_set): Handle tracepoint packets.
11736 (read_memory): New.
11737 (write_memory): New.
11738 (handle_search_memory_1): Use read_memory.
11739 (handle_query): Report support for conditional tracepoints, trace
11740 state variables, and tracepoint sources. Handle tracepoint
11741 queries.
11742 (main): Initialize the tracepoints module.
11743 (process_serial_event): Handle traceframe reads/writes.
11744
11745 * linux-low.c (handle_tracepoints): New.
11746 (linux_wait_1): Call it.
11747 (linux_resume_one_lwp): Handle while-stepping.
11748 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11749 (linux_target_ops): Install them.
11750 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11751 New field.
11752 * linux-x86-low.c (x86_supports_tracepoints): New.
11753 (the_low_target). Install it.
11754
11755 * mem-break.h (delete_breakpoint): Declare.
11756 * mem-break.c (delete_breakpoint): Make external.
11757
11758 * target.h (struct target_ops): Add `supports_tracepoints',
11759 `read_pc', and `write_pc' fields.
11760 (target_supports_tracepoints): Define.
11761 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11762 (phex_nz): New.
11763
11764 * regcache.h (struct regcache) <registers_owned>: New field.
11765 (init_register_cache, regcache_cpy): Declare.
11766 (regcache_read_pc, regcache_write_pc): Declare.
11767 (register_cache_size): Declare.
11768 (supply_regblock): Declare.
11769 * regcache.c (init_register_cache): New.
11770 (new_register_cache): Use it.
11771 (regcache_cpy): New.
11772 (register_cache_size): New.
11773 (supply_regblock): New.
11774 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11775
219f2f23
PA
11776 * tracepoint.c: New.
11777
11778 * Makefile.in (OBS): Add tracepoint.o.
11779 (tracepoint.o): New rule.
11780
3a13a53b
L
117812010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11782
11783 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11784 (i386-mmx.o): New.
11785 (i386-mmx.c): Likewise.
11786 (i386-mmx-linux.o): Likewise.
11787 (i386-mmx-linux.c): Likewise.
11788
11789 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11790 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11791 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11792 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11793
11794 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11795 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11796 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11797
1570b33e
L
117982010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11799
11800 * Makefile.in (clean): Updated.
11801 (i386-avx.o): New.
11802 (i386-avx.c): Likewise.
11803 (i386-avx-linux.o): Likewise.
11804 (i386-avx-linux.c): Likewise.
11805 (amd64-avx.o): Likewise.
11806 (amd64-avx.c): Likewise.
11807 (amd64-avx-linux.o): Likewise.
11808 (amd64-avx-linux.c): Likewise.
11809
11810 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11811 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11812 (srv_amd64_regobj): Add amd64-avx.o.
11813 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11814 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11815 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11816 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11817 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11818 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11819 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11820
11821 * i387-fp.c: Include "i386-xstate.h".
11822 (i387_xsave): New.
11823 (i387_cache_to_xsave): Likewise.
11824 (i387_xsave_to_cache): Likewise.
11825 (x86_xcr0): Likewise.
11826
11827 * i387-fp.h (i387_cache_to_xsave): Likewise.
11828 (i387_xsave_to_cache): Likewise.
11829 (x86_xcr0): Likewise.
11830
11831 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11832 * linux-crisv32-low.c (target_regsets): Likewise.
11833 * linux-m68k-low.c (target_regsets): Likewise.
11834 * linux-mips-low.c (target_regsets): Likewise.
11835 * linux-ppc-low.c (target_regsets): Likewise.
11836 * linux-s390-low.c (target_regsets): Likewise.
11837 * linux-sh-low.c (target_regsets): Likewise.
11838 * linux-sparc-low.c (target_regsets): Likewise.
11839 * linux-xtensa-low.c (target_regsets): Likewise.
11840
11841 * linux-low.c: Include <sys/uio.h>.
11842 (regsets_fetch_inferior_registers): Support nt_type.
11843 (regsets_store_inferior_registers): Likewise.
11844 (linux_process_qsupported): New.
11845 (linux_target_ops): Add linux_process_qsupported.
11846
11847 * linux-low.h (regset_info): Add nt_type.
11848 (linux_target_ops): Add process_qsupported.
11849
11850 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11851 and <sys/uio.h>.
11852 (init_registers_i386_avx_linux): New.
11853 (init_registers_amd64_avx_linux): Likewise.
11854 (xmltarget_i386_linux_no_xml): Likewise.
11855 (xmltarget_amd64_linux_no_xml): Likewise.
11856 (PTRACE_GETREGSET): Likewise.
11857 (PTRACE_SETREGSET): Likewise.
11858 (x86_fill_xstateregset): Likewise.
11859 (x86_store_xstateregset): Likewise.
11860 (use_xml): Likewise.
11861 (x86_linux_update_xmltarget): Likewise.
11862 (x86_linux_process_qsupported): Likewise.
11863 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11864 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11865 init_registers_i386_linux here. Call
11866 x86_linux_update_xmltarget.
11867 (the_low_target): Add x86_linux_process_qsupported.
11868
11869 * server.c (handle_query): Call target_process_qsupported.
11870
11871 * target.h (target_ops): Add process_qsupported.
11872 (target_process_qsupported): New.
11873
fc7238bb
PA
118742010-04-03 Pedro Alves <pedro@codesourcery.com>
11875
11876 * inferiors.c (add_thread): Set last_status kind to
11877 TARGET_WAITKIND_IGNORE.
11878 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11879 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11880 (linux_wait_1): Move `thread' local definition to block that uses
11881 it. Don't NULL initialize `event_child'.
11882 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11883 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11884 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11885
bdabb078
PA
118862010-04-01 Pedro Alves <pedro@codesourcery.com>
11887
11888 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11889 an extended waitstatus, or by a watchpoint.
11890 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11891 thread was stepping or has been stopped by a watchpoint.
11892
d3bbe7a0
PA
118932010-04-01 Pedro Alves <pedro@codesourcery.com>
11894
11895 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11896 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11897 of another, then delete the previous, and validate all
11898 breakpoints.
11899 (validate_inserted_breakpoint): New.
11900 (delete_disabled_breakpoints): New.
11901 (validate_breakpoints): New.
11902 (check_mem_read): Validate breakpoints before trusting their
11903 shadow. Delete disabled breakpoints.
11904 (check_mem_write): Validate breakpoints before trusting they
11905 should be inserted. Delete disabled breakpoints.
11906 * mem-break.h (validate_breakpoints):
11907 * server.c (handle_query): Validate breakpoints when we see a
11908 qSymbol query.
11909
8b07ae33
PA
119102010-04-01 Pedro Alves <pedro@codesourcery.com>
11911
11912 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11913 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11914 if we could tell there's a GDB breakpoint at stop_pc.
11915 (need_step_over_p): Don't do a step over if we find a GDB
11916 breakpoint at the resume PC.
11917
11918 * mem-break.c (struct raw_breakpoint): New.
11919 (enum bkpt_type): New type `gdb_breakpoint'.
11920 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11921 fields. New field `raw'.
11922 (find_raw_breakpoint_at): New.
11923 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11924 breakpoint instead.
11925 (set_breakpoint_at): Adjust.
11926 (delete_raw_breakpoint): New.
11927 (release_breakpoint): New.
11928 (delete_breakpoint): Rename to...
11929 (delete_breakpoint_1): ... this. Add proc parameter. Use
11930 release_breakpoint. Return ENOENT.
11931 (delete_breakpoint): Reimplement.
11932 (find_breakpoint_at): Delete.
11933 (find_gdb_breakpoint_at): New.
11934 (delete_breakpoint_at): Delete.
11935 (set_gdb_breakpoint_at): New.
11936 (delete_gdb_breakpoint_at): New.
11937 (gdb_breakpoint_here): New.
11938 (set_reinsert_breakpoint): Use release_breakpoint.
11939 (uninsert_breakpoint): Rename to ...
11940 (uninsert_raw_breakpoint): ... this.
11941 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11942 (reinsert_raw_breakpoint): Change parameter type to
11943 raw_breakpoint.
11944 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11945 instead.
11946 (check_breakpoints): Adjust. Use release_breakpoint.
11947 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11948 (breakpoint_inserted_here): Ditto.
11949 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11950 Don't trust the breakpoint's shadow if it is not inserted.
11951 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11952 (delete_all_breakpoints): Adjust.
11953 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11954 use delete_breakpoint_1.
11955
11956 * mem-break.h (breakpoints_supported): Delete declaration.
11957 (set_gdb_breakpoint_at): Declare.
11958 (gdb_breakpoint_here): Declare.
11959 (delete_breakpoint_at): Delete.
11960 (delete_gdb_breakpoint_at): Declare.
11961
11962 * server.h (struct raw_breakpoint): Forward declare.
11963 (struct process_info): New field `raw_breakpoints'.
11964
11965 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11966 breakpoints.
11967
6bf5e0ba
PA
119682010-03-24 Pedro Alves <pedro@codesourcery.com>
11969
11970 * linux-low.c (status_pending_p_callback): Fix comment.
11971 (linux_wait_for_event_1): Move most of the internal breakpoint
11972 handling from here...
11973 (linux_wait_1): ... to here.
11974 (count_events_callback): New.
11975 (select_singlestep_lwp_callback): New.
11976 (select_event_lwp_callback): New.
11977 (cancel_breakpoints_callback): New.
11978 (select_event_lwp): New.
11979 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11980 priority to all LWPs that have had events that should be reported
11981 to the client. Cancel breakpoints when about to reporting the
11982 event to the client, not while stopping lwps. No longer cancel
11983 finished single-steps here.
11984 (cancel_finished_single_step): Delete.
11985 (cancel_finished_single_steps): Delete.
11986
414a389f
PA
119872010-03-24 Pedro Alves <pedro@codesourcery.com>
11988
11989 * mem-break.c (enum bkpt_type): New.
11990 (struct breakpoint): New field `type'.
11991 (set_breakpoint_at): Change return type to struct breakpoint
11992 pointer. Set type to `other_breakpoint' by default.
11993 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11994 in the breakpoint list.
11995 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11996 (reinsert_breakpoint): Rename to ...
11997 (reinsert_raw_breakpoint): ... this.
11998 (reinsert_breakpoints_at): Adjust.
11999 * mem-break.h (struct breakpoint): Declare.
12000 (set_breakpoint_at): Change return type to struct breakpoint
12001 pointer.
12002
2280c721
PA
120032010-03-24 Pedro Alves <pedro@codesourcery.com>
12004
12005 * server.c (handle_query): Assign, not compare.
12006
d50171e4
PA
120072010-03-24 Pedro Alves <pedro@codesourcery.com>
12008
12009 Teach linux gdbserver to step-over-breakpoints.
12010
12011 * linux-low.c (can_hardware_single_step): New.
12012 (supports_breakpoints): New.
12013 (handle_extended_wait): If stopping threads, read the stop pc of
12014 the new cloned LWP.
12015 (get_pc): New.
12016 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12017 low target doesn't support retrieving the PC.
12018 (add_lwp): Set last_resume_kind to resume_continue.
12019 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12020 (linux_attach): Don't clear stop_expected. Set the lwp's
12021 last_resume_kind to resume_stop.
12022 (linux_detach_one_lwp): Don't check for removed breakpoints.
12023 (check_removed_breakpoint): Delete.
12024 (status_pending_p): Rename to ...
12025 (status_pending_p_callback): ... this. Don't check for removed
12026 breakpoints. Don't consider threads that are stopped from GDB's
12027 perspective.
12028 (linux_wait_for_lwp): Always read the stop_pc here.
12029 (cancel_breakpoint): New.
12030 (step_over_bkpt): New global.
12031 (linux_wait_for_event_1): Implement stepping over breakpoints.
12032 (gdb_wants_lwp_stopped): New.
12033 (gdb_wants_all_stopped): New.
12034 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12035 single-step traps here. Store the thread's last reported target
12036 wait status.
12037 (send_sigstop): Don't clear stop_expected. Always set it,
12038 instead.
12039 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12040 (cancel_finished_single_step): New.
12041 (cancel_finished_single_steps): New.
12042 (wait_for_sigstop): Don't cancel finished single-step traps here.
12043 (linux_resume_one_lwp): Don't check for removed breakpoints.
12044 Don't set `step' on non-hardware step archs.
12045 (linux_set_resume_request): Ignore resume_stop requests if already
12046 stopping or stopped. Set the lwp's last_resume_kind.
12047 (resume_status_pending_p): Don't check for removed breakpoints.
12048 (need_step_over_p): New.
12049 (start_step_over): New.
12050 (finish_step_over): New.
12051 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12052 requests. Clear the thread's last reported target waitstatus.
12053 Don't use the `suspended' flag. Don't consider pending breakpoints.
12054 (linux_resume): Start a step-over if necessary.
12055 (proceed_one_lwp): New.
12056 (proceed_all_lwps): New.
12057 (unstop_all_lwps): New.
12058 * linux-low.h (struct lwp_info): Rewrite comment for the
12059 `suspended' flag. Add the `stop_pc' field. Delete the
12060 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12061 Add `'last_resume_kind' and `need_step_over' fields.
12062 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12063 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12064 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12065 (set_raw_breakpoint_at): New.
12066 (set_breakpoint_at): Rewrite to use it.
12067 (reinsert_breakpoint_handler): Delete.
12068 (set_reinsert_breakpoint): New.
12069 (reinsert_breakpoint_by_bp): Delete.
12070 (delete_reinsert_breakpoints): New.
12071 (uninsert_breakpoint): Rewrite.
12072 (uninsert_breakpoints_at): New.
12073 (reinsert_breakpoint): Rewrite.
12074 (reinsert_breakpoints_at): New.
12075 (check_breakpoints): Rewrite.
12076 (breakpoint_here): New.
12077 (breakpoint_inserted_here): New.
12078 (check_mem_read): Adjust.
12079 * mem-break.h (breakpoints_supported, breakpoint_here)
12080 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12081 (reinsert_breakpoint_by_bp): Delete declaration.
12082 (delete_reinsert_breakpoints): Declare.
12083 (reinsert_breakpoint): Delete declaration.
12084 (reinsert_breakpoints_at): Declare.
12085 (uninsert_breakpoint): Delete declaration.
12086 (uninsert_breakpoints_at): Declare.
12087 (check_breakpoints): Adjust prototype.
12088 * server.h: Adjust include order.
12089 (struct thread_info): Declare here. Add a `last_status' field.
12090
30ba68cb
MS
120912010-03-23 Michael Snyder <msnyder@vmware.com>
12092
12093 * server.c (crc32): New function.
12094 (handle_query): Add handling for 'qCRC:' request.
12095
b9a881c2
PA
120962010-03-23 Pedro Alves <pedro@codesourcery.com>
12097
12098 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12099 lwp had been stopped by a watchpoint.
12100
e92d13d5
PA
121012010-03-16 Pedro Alves <pedro@codesourcery.com>
12102
12103 * server.h (internal_error): Declare.
12104 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12105 * utils.c (internal_error): New function.
12106
64daa791
AS
121072010-03-15 Andreas Schwab <schwab@redhat.com>
12108
12109 * configure.srv: Fix typo setting srv_regobj.
12110
f52cd8cd
PA
121112010-03-15 Pedro Alves <pedro@codesourcery.com>
12112
12113 * linux-low.c (fetch_register): Avoid passing a non string literal
12114 format to `error'.
12115 (usr_store_inferior_registers): Ditto.
12116
93ae6fdc
PA
121172010-03-14 Pedro Alves <pedro@codesourcery.com>
12118
12119 * linux-low.c (linux_write_memory): Bail out early if peeking
12120 memory failed.
12121
c3adc08c
PA
121222010-03-14 Pedro Alves <pedro@codesourcery.com>
12123
12124 * linux-low.h (struct lwp_info): New fields
12125 `stopped_by_watchpoint' and `stopped_data_address'.
12126 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12127 here, and cache them in the lwp object.
12128 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12129 directly.
12130 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12131 field.
12132 (linux_stopped_by_watchpoint): Rewrite.
12133 (linux_stopped_data_address): Rewrite.
12134
bce522a2
PA
121352010-03-06 Simo Melenius <simo.melenius@iki.fi>
12136
12137 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12138 switching the current inferior, not before.
12139
90884b2b
L
121402010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12141
12142 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12143 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12144 i386-linux.c and amd64-linux.c.
12145 (reg-i386.o): Removed.
12146 (reg-i386.c): Likewise.
12147 (reg-i386-linux.o): Likewise.
12148 (reg-i386-linux.c): Likewise.
12149 (reg-x86-64.o): Likewise.
12150 (reg-x86-64.c): Likewise.
12151 (reg-x86-64-linux.o): Likewise.
12152 (reg-x86-64-linux.c): Likewise.
12153 (i386.o): New.
12154 (i386.c): Likewise.
12155 (i386-linux.o): Likewise.
12156 (i386-linux.c): Likewise.
12157 (amd64.o): Likewise.
12158 (amd64.c): Likewise.
12159 (amd64-linux.o): Likewise.
12160 (amd64-linux.c): Likewise.
12161
12162 * configure.srv (srv_i386_regobj): New.
12163 (srv_i386_linux_regobj): Likewise.
12164 (srv_amd64_regobj): Likewise.
12165 (srv_amd64_linux_regobj): Likewise.
12166 (srv_i386_32bit_xmlfiles): Likewise.
12167 (srv_i386_64bit_xmlfiles): Likewise.
12168 (srv_i386_xmlfiles): Likewise.
12169 (srv_amd64_xmlfiles): Likewise.
12170 (srv_i386_linux_xmlfiles): Likewise.
12171 (srv_amd64_linux_xmlfiles): Likewise.
12172 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12173 srv_xmlfiles to $srv_i386_xmlfiles.
12174 (i[34567]86-*-mingw32ce*): Likewise.
12175 (i[34567]86-*-mingw*): Likewise.
12176 (i[34567]86-*-nto*): Likewise.
12177 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12178 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12179 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12180 (x86_64-*-linux*): Likewise.
12181
12182 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12183 (init_registers_amd64_linux): New.
12184 (x86_arch_setup): Replace init_registers_x86_64_linux with
12185 init_registers_amd64_linux.
12186
193f13e6
MK
121872010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12188
12189 * configure.ac: Check for libdl. If it is not available link against
12190 static libthread_db.
12191 * configure: Regenerate.
12192
85d721b8
PA
121932010-02-22 Pedro Alves <pedro@codesourcery.com>
12194
12195 PR9605
12196
12197 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12198 handing a read watchpoint.
12199 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12200
6076632b
DE
122012010-02-12 Doug Evans <dje@google.com>
12202
12203 * linux-low.c (linux_supports_tracefork_flag): Document.
12204 (linux_look_up_symbols): Add comment.
12205
3327ccf7
L
122062010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12207
12208 * regcache.c (supply_register): Clear regcache if buf is NULL.
12209
0718675c 122102010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12211 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12212
12213 * inferiors.c (find_inferior): Add function documentation.
12214 (unloaded_dll): Handle the case where the unloaded dll has not
12215 been previously registered in the dll list.
12216
177321bd
DJ
122172010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12218
12219 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12220 (thumb2_breakpoint): New.
12221 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12222
2b009048
DJ
122232010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12224
12225 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12226 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12227 breakpoints.
12228
3be029c7
PA
122292010-01-21 Pedro Alves <pedro@codesourcery.com>
12230
12231 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12232
18f5de3b
JK
122332010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12234
12235 * linux-s390-low.c (s390_collect_ptrace_register)
12236 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12237
3743bb4f
DE
122382010-01-21 Doug Evans <dje@google.com>
12239
14ce3065
DE
12240 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12241 (PTRACE_ARG4_TYPE): New macro.
12242 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12243 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12244 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12245 (usr_store_inferior_registers): Ditto.
12246 (linux_read_memory, linux_write_memory): Ditto.
12247 (linux_test_for_tracefork): Ditto.
12248
3743bb4f
DE
12249 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12250 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12251
8b315be5
PA
122522010-01-21 Pedro Alves <pedro@codesourcery.com>
12253
12254 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12255 target.
12256
85492558
PA
122572010-01-21 Pedro Alves <pedro@codesourcery.com>
12258
12259 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12260 prototype to take a regcache. Adjust.
12261
442ea881
PA
122622010-01-20 Pedro Alves <pedro@codesourcery.com>
12263
12264 * regcache.h (struct thread_info): Forward declare.
12265 (struct regcache): New.
12266 (new_register_cache): Adjust prototype.
12267 (get_thread_regcache): Declare.
12268 (free_register_cache): Adjust prototype.
12269 (registers_to_string, registers_from_string): Ditto.
12270 (supply_register, supply_register_by_name, collect_register)
12271 (collect_register_as_string, collect_register_by_name): Ditto.
12272 * regcache.c (struct inferior_regcache_data): Delete.
12273 (get_regcache): Rename to ...
12274 (get_thread_regcache): ... this. Adjust. Switch inferior before
12275 fetching registers.
12276 (regcache_invalidate_one): Adjust.
12277 (regcache_invalidate): Fix prototype.
12278 (new_register_cache): Return the new register cache.
12279 (free_register_cache): Change prototype.
12280 (realloc_register_cache): Adjust.
12281 (registers_to_string): Change prototype to take a regcache. Adjust.
12282 (registers_from_string): Ditto.
12283 (register_data): Ditto.
12284 (supply_register): Ditto.
12285 (supply_register_by_name): Ditto.
12286 (collect_register): Ditto.
12287 (collect_register_as_string): Ditto.
12288 (collect_register_by_name): Ditto.
12289 * server.c (process_serial_event): Adjust.
12290 * linux-low.h (regset_fill_func, regset_store_func): Change
12291 prototype.
12292 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12293 Change prototype.
12294 * linux-low.c (get_stop_pc): Adjust.
12295 (check_removed_breakpoint): Adjust.
12296 (linux_wait_for_event): Adjust.
12297 (linux_resume_one_lwp): Adjust.
12298 (fetch_register): Add regcache parameter. Adjust.
12299 (usr_store_inferior_registers): Ditto.
12300 (regsets_fetch_inferior_registers): Ditto.
12301 (regsets_store_inferior_registers): Ditto.
12302 (linux_fetch_registers, linux_store_registers): Ditto.
12303 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12304 regcache. Adjust.
43aaf8b6
PA
12305 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12306 Ditto.
442ea881
PA
12307 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12308 prototype to take a regcache.
12309 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12310 * remote-utils.c (convert_ascii_to_int, outreg)
12311 (prepare_resume_reply): Change prototype to take a regcache.
12312 Adjust.
12313 * target.h (struct target_ops) <fetch_registers, store_registers>:
12314 Change prototype to take a regcache.
12315 (fetch_inferior_registers, store_inferior_registers): Change
12316 prototype to take a regcache. Adjust.
12317 * proc-service.c (ps_lgetregs): Adjust.
12318 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12319 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12320 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12321 take a regcache. Adjust.
12322 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12323 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12324 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12325 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12326 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12327 (cris_cannot_fetch_register):
12328 (cris_breakpoint_at): Change prototype to take a regcache.
12329 Adjust.
12330 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12331 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12332 to take a regcache. Adjust.
12333 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12334 Adjust.
12335 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12336 take a regcache. Adjust.
12337 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12338 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12339 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12340 * linux-mips-low.c (mips_get_pc):
12341 (mips_set_pc): Change prototype to take a regcache. Adjust.
12342 (mips_reinsert_addr): Adjust.
12343 (mips_collect_register): Change prototype to take a regcache.
12344 Adjust.
12345 (mips_supply_register):
12346 (mips_collect_register_32bit, mips_supply_register_32bit)
12347 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12348 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12349 * linux-ppc-low.c (ppc_supply_ptrace_register)
12350 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12351 (parse_spufs_run): Adjust.
12352 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12353 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12354 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12355 take a regcache. Adjust.
12356 * linux-s390-low.c (s390_collect_ptrace_register)
12357 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12358 (s390_set_pc): Change prototype to take a regcache. Adjust.
12359 (s390_arch_setup): Adjust.
12360 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12361 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12362 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12363 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12364 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12365 regcache. Adjust.
12366 (sparc_breakpoint_at): Adjust.
12367 * linux-xtensa-low.c (xtensa_fill_gregset):
12368 (xtensa_store_gregset):
12369 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12370 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12371 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12372 prototype to take a regcache. Adjust.
12373 * win32-arm-low.c (arm_fetch_inferior_register)
12374 (arm_store_inferior_register): Change prototype to take a
12375 regcache. Adjust.
12376 * win32-i386-low.c (i386_fetch_inferior_register)
12377 (i386_store_inferior_register): Change prototype to take a
12378 regcache. Adjust.
12379 * win32-low.c (child_fetch_inferior_registers)
12380 (child_store_inferior_registers): Change prototype to take a
12381 regcache. Adjust.
12382 (win32_wait): Adjust.
12383 (win32_fetch_inferior_registers): Change prototype to take a
12384 regcache. Adjust.
12385 (win32_store_inferior_registers): Adjust.
12386 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12387 store_inferior_register>: Change prototype to take a regcache.
12388
60c3d7b0
DE
123892010-01-20 Doug Evans <dje@google.com>
12390
12391 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12392 #ifdef.
12393 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12394 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12395
dc146f7c
VP
123962010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12397
12398 * linux-low.c (linux_core_of_thread): New.
12399 (compare_ints, show_process, list_threads): New.
12400 (linux_qxfer_osdata): Report threads and cores.
12401 (linux_target_op): Register linux_core_of_thread.
12402 * remote-utils.c (prepare_resume_reply): Report the core.
12403 (buffer_xml_printf): Support %d specifier.
12404 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12405 New.
12406 (handle_query): Handle qXfer:threads. Announce availability
12407 thereof.
12408 * target.h (struct target_ops): New field core_of_thread.
12409
7803799a
UW
124102010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12411
12412 * Makefile.in (clean): Remove new generated files.
12413 (reg-s390.o, reg-s390.c): Remove rules.
12414 (reg-s390x.o, reg-s390x.c): Likewise.
12415 (s390-linux32.o, s390-linux32.c): Add rules.
12416 (s390-linux64.o, s390-linux64.c): Likewise.
12417 (s390x-linux64.o, s390x-linux64.c): Likewise.
12418 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12419 * linux-s390-low.c: Include <elf.h>.
12420 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12421 (init_registers_s390): Remove prototype.
12422 (init_registers_s390x): Likewise.
12423 (init_registers_s390_linux32): Add prototype.
12424 (init_registers_s390_linux64): Likewise.
12425 (init_registers_s390x_linux64): Likewise.
12426 (s390_num_regs_3264): New define.
12427 (s390_regmap_3264): New global variable.
12428 (s390_cannot_fetch_register): Remove obsolete check.
12429 (s390_cannot_store_register): Likewise.
12430 (s390_collect_ptrace_register): Handle upper/lower register halves.
12431 (s390_supply_ptrace_register): Likewise.
12432 (s390_fill_gregset): Update to register number changes.
12433 (s390_get_hwcap): New routine.
12434 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12435 Install appropriate regmap and register set.
12436
6e7ffa39
JB
124372010-01-01 Joel Brobecker <brobecker@adacore.com>
12438
12439 * server.c (gdbserver_version): Update copyright year to 2010.
12440 * gdbreplay.c (gdbreplay_version): Likewise.
12441
957f3f49
DE
124422009-12-28 Doug Evans <dje@google.com>
12443
12444 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12445 elf/external.h. Include <elf.h> instead but only if necessary.
12446
ca5c370d
PA
124472009-12-28 Pedro Alves <pedro@codesourcery.com>
12448
12449 * linux-low.c (linux_remove_process): Remove `detaching'
12450 parameter. Don't release/detach from thread_db here.
12451 (linux_kill): Release/detach from thread_db here, ...
12452 (linux_detach): ... and here, before actually detaching.
12453 (linux_wait_1): ... and here, when a process exits.
12454 * thread-db.c (any_thread_of): New.
12455 (thread_db_free): Switch the current inferior to a thread of the
12456 passed in process.
12457
4ee62156
DE
124582009-12-21 Doug Evans <dje@google.com>
12459
d90e6a88
DE
12460 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12461
c5f62d5f
DE
12462 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12463 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12464 warning ifndef __NR_tkill. Move setting of errno there too.
12465 Delete unnecessary resetting of errno after syscall.
12466 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12467
10e86dd7
DE
12468 * configure.ac: Check for dladdr.
12469 * config.in: Regenerate.
12470 * configure: Regenerate.
12471 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12472 (try_thread_db_load): Update.
12473
4ee62156
DE
12474 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12475
00f515da
DE
124762009-12-18 Doug Evans <dje@google.com>
12477
e9464885
DE
12478 * event-loop.c: Include unistd.h if it exists.
12479
07d4f67e
DE
12480 * linux-low.c (my_waitpid): Move definition away from being in
12481 between linux_tracefork_child/linux_test_for_tracefork.
12482
00f515da
DE
12483 * gdb_proc_service.h (psaddr_t): Fix type.
12484 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12485 signature to match glibc.
12486
1de1badb
DE
124872009-12-16 Doug Evans <dje@google.com>
12488
12489 * linux-low.c (linux_read_memory): Fix argument to read.
12490
aeeb81d1
PA
124912009-11-26 Pedro Alves <pedro@codesourcery.com>
12492
12493 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12494 events, don't leave current_inferior pointing at null.
12495
10357975
PA
124962009-11-26 Pedro Alves <pedro@codesourcery.com>
12497
12498 * win32-low.c (LOG): Delete.
12499 (OUTMSG): Output to stderr.
12500 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12501 on compile time LOG macro.
12502 (win32_wait): Fix debug output.
12503
cf6e3471
PA
125042009-11-26 Pedro Alves <pedro@codesourcery.com>
12505
12506 * win32-low.c (win32_add_one_solib): If the dll name is
12507 "ntdll.dll", prepend the system directory to the dll path.
12508
0c85e18e
MK
125092009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12510
12511 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12512
9ac544ce 125132009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12514 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12515
12516 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12517 * configure.ac: Check for __mcoldfire__ and set
12518 gdb_cv_m68k_is_coldfire.
12519 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12520 reg-cf.o and reg-m68k.o.
12521 * configure: Regenerated.
12522
fd7dd3e6
PA
125232009-11-16 Pedro Alves <pedro@codesourcery.com>
12524
12525 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12526 Pass it to thread_db_free.
12527 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12528 proper `detaching' argument to linux_remove_process.
12529 * linux-low.h (thread_db_free): Add `detaching' parameter.
12530 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12531 to thread_db_free.
12532 (thread_db_free): Add `detaching' parameter. Only
12533 call td_ta_clear_event if detaching from process.
12534
75aa492e
MK
125352009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12536
12537 * thread-db.c (thread_db_free): Fix typo.
12538
21e1bee4
PP
125392009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12540
12541 PR gdb/10838
12542 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12543
8838b45e
NS
125442009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12545
12546 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12547 with an i686 compiler.
12548 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12549 needed.
12550 * configure: Rebuilt.
12551
8a35fb51
SL
125522009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12553
12554 PR gdb/10783
12555
12556 * server.c (handle_search_memory_1): Correct read_addr initialization
12557 in loop for searching subsequent chunks.
12558
96f15937
PP
125592009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12560
12561 * configure.ac: New --with-libthread-db option.
12562 * thread-db.c: Allow direct dependence on libthread_db.
12563 (thread_db_free): Adjust.
12564 * config.in: Regenerate.
12565 * configure: Likewise.
889bf7c5 12566
5f7d1694
PP
125672009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12568
12569 PR gdb/10757
12570 * thread-db.c (attach_thread): New function.
12571 (maybe_attach_thread): Return success/failure.
12572 (find_new_threads_callback): Adjust.
889bf7c5
PA
12573 (thread_db_find_new_threads): Loop until no new threads.
12574
88e3b899
PA
125752009-10-13 Pedro Alves <pedro@codesourcery.com>
12576
12577 * proc-service.c (ps_lgetregs): Formatting.
12578
cdbfd419
PP
125792009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12580
12581 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12582 * configure.ac: Adjust.
12583 * linux-low.h (struct process_info_private): Move members to struct
12584 thread_db.
12585 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12586 * linux-low.c (linux_remove_process): Adjust.
12587 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12588 * server.c (handle_query): Move code ...
12589 (handle_monitor_command): ... here. New function.
12590 * target.h (struct target_ops): New member.
12591 * thread-db.c (struct thread_db): New.
12592 (libthread_db_search_path): New variable.
12593 (thread_db_create_event, thread_db_enable_reporting)
12594 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12595 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12596 (try_thread_db_load_1, dladdr_to_soname): New functions.
12597 (try_thread_db_load, thread_db_load_search): New functions.
12598 (thread_db_init): Search for libthread_db.
12599 (thread_db_free): New function.
12600 (thread_db_handle_monitor_command): Likewise.
12601 * config.in: Regenerate.
12602 * configure: Regenerate.
889bf7c5 12603
4168d2d6
UW
126042009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12605
12606 * spu-low.c (spu_kill): Wait for inferior to terminate.
12607 Call clear_inferiors.
12608 (spu_detach): Call clear_inferiors.
12609
81ecdfbb
RW
126102009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12611
12612 * aclocal.m4: Regenerate.
12613 * config.in: Likewise.
12614 * configure: Likewise.
12615
0b9ff2c0
UW
126162009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12617
12618 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12619 (parse_spufs_run): New function.
12620 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12621 (ppc_breakpoint_at): Handle SPU breakpoints.
12622
efcbbd14
UW
126232009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12624
12625 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12626 (SPUFS_MAGIC): Define.
12627 (spu_enumerate_spu_ids): New function.
12628 (linux_qxfer_spu): New function.
12629 (linux_target_ops): Install linux_qxfer_spu.
12630
f4d9bade
UW
126312009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12632
12633 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12634 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12635 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12636 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12637 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12638 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12639 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12640 (init_registers_powerpc_cell32l): Add prototype.
12641 (init_registers_powerpc_cell64l): Likewise.
12642 (ppc_arch_setup): Detect Cell/B.E. architecture.
12643
96e946ca
RW
126442009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12645
12646 * Makefile.in (datarootdir): New variable.
12647
58d6951d
DJ
126482009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12649
12650 * linux-low.c (linux_write_memory): Update debugging output.
12651 * Makefile.in (clean): Add new descriptions.
12652 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12653 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12654 * configure.srv: Add new files for arm*-*-linux*.
12655 * linux-arm-low.c: Add new declarations.
12656 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12657 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12658 (HWCAP_VFPv3D16): New.
12659 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12660 instead of __IWMMXT__.
12661 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12662 (arm_arch_setup): New.
12663 (target_regsets): Remove #ifdef. Add VFP regset.
12664 (the_low_target): Use arm_arch_setup.
12665
12b42a12
DJ
126662009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12667
12668 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12669 the main thread again.
12670
ac8c974e
AR
126712009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12672
12673 Adding Neutrino gdbserver.
12674 * configure: Regenerated.
12675 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12676 * configure.srv (i[34567]86-*-nto*): New target.
12677 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12678 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12679 (nto_comctrl) [__QNX__]: New function.
12680 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12681
4424e0c3 126822009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12683
12684 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12685 srv_tgtobj.
12686
912cf4ba
PA
126872009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12688 Pedro Alves <pedro@codesourcery.com>
12689
12690 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12691 don't support CONTEXT_EXTENDED_REGISTERS.
12692 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12693 (the_low_target): Install them.
12694 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12695 failing with ERROR_PIPE_NOT_CONNECTED.
12696
aa5ca48f
DE
126972009-06-30 Doug Evans <dje@google.com>
12698 Pierre Muller <muller@ics.u-strasbg.fr>
12699
12700 Add h/w watchpoint support to x86-linux, win32-i386.
12701 * Makefile.in (SFILES): Add i386-low.c
12702 (i386_low_h): Define.
12703 (i386-low.o): Add dependencies.
12704 (linux-x86-low.o): Add i386-low.h dependency.
12705 (win32-i386-low.o): Ditto.
12706 * i386-low.c: New file.
12707 * i386-low.h: New file.
12708 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12709 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12710 * linux-low.c (linux_add_process): Initialize arch_private.
12711 (linux_remove_process): Free arch_private.
12712 (add_lwp): Initialize arch_private.
12713 (delete_lwp): Free arch_private.
12714 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12715 provided.
12716 * linux-low.h (process_info_private): New member arch_private.
12717 (lwp_info): New member arch_private.
12718 (linux_target_ops): New members new_process, new_thread,
12719 prepare_to_resume.
12720 (ptid_of): New macro.
12721 * linux-x86-low.c: Include stddef.h, i386-low.h.
12722 (arch_process_info): New struct.
12723 (arch_lwp_info): New struct.
12724 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12725 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12726 (i386_dr_low_get_status): New function.
12727 (x86_insert_point, x86_remove_point): New functions.
12728 (x86_stopped_by_watchpoint): New function.
12729 (x86_stopped_data_address): New function.
12730 (x86_linux_new_process, x86_linux_new_thread): New functions.
12731 (x86_linux_prepare_to_resume): New function.
12732 (the_low_target): Add entries for insert_point, remove_point,
12733 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12734 prepare_to_resume.
12735 * server.c (debug_hw_points): New global.
12736 (monitor_show_help): Document set debug-hw-points.
12737 (handle_query): Process "set debug-hw-points".
12738 * server.h (debug_hw_points): Declare.
12739 (paddress): Declare.
12740 * utils.c (NUMCELLS, CELLSIZE): New macros.
12741 (get_sell, xsnprintf, paddress): New functions.
12742 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12743 remove_point, stopped_by_watchpoint, stopped_data_address.
12744 * win32-i386-low.c: Include i386-low.h.
12745 (debug_reg_state): Replaces dr.
12746 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12747 (i386_dr_low_get_status): New function.
12748 (i386_insert_point, i386_remove_point): New functions.
12749 (i386_stopped_by_watchpoint): New function.
12750 (i386_stopped_data_address): New function.
12751 (i386_initial_stuff): Update.
12752 (get_thread_context,set_thread_context,i386_thread_added): Update.
12753 (the_low_target): Add entries for insert_point,
12754 remove_point, stopped_by_watchpoint, stopped_data_address.
12755 * win32-low.c (win32_insert_watchpoint): New function.
12756 (win32_remove_watchpoint): New function.
12757 (win32_stopped_by_watchpoint): New function.
12758 (win32_stopped_data_address): New function.
12759 (win32_target_ops): Add entries for insert_watchpoint,
12760 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12761 * win32-low.h (win32_target_ops): New members insert_point,
12762 remove_point, stopped_by_watchpoint, stopped_data_address.
12763
d993e290
PA
127642009-06-25 Pedro Alves <pedro@codesourcery.com>
12765
12766 * server.c (process_serial_event): Re-return unsupported, not
12767 error, if the type isn't recognized. Re-allow supporting only
12768 insert or remove packets. Also call require_running for
12769 breakpoints. Add missing break statement to default case. Tidy.
12770 * target.h (struct target_ops): Rename insert_watchpoint to
12771 insert_point, and remove_watchpoint to remove_point.
12772
12773 * linux-low.h (struct linux_target_ops): Likewise.
12774 * linux-low.c (linux_insert_watchpoint): Rename to ...
12775 (linux_insert_point): ... this. Adjust.
12776 (linux_remove_watchpoint): Rename to ...
12777 (linux_remove_point): ... this. Adjust.
12778 (linux_target_ops): Adjust.
12779 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12780 (cris_insert_point): ... this.
12781 (cris_remove_watchpoint): Rename to ...
12782 (cris_remove_point): ... this.
12783 (the_low_target): Adjust.
12784
0f54c268
PM
127852009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12786
12787 * server.c (handle_v_kill): Pass signal_pid to
12788 kill_inferior if multi_process is zero.
12789
c6314022
AR
127902009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12791
12792 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12793 * target.h (target_ops): Comment for *_watchpoint to make it clear
12794 the functions can get types '0' and '1'.
12795
4463ce24
AR
127962009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12797
12798 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12799 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12800 * regcache.c (get_regcache): Likewise.
12801 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12802 * win32-low.c (child_fetch_inferior_registers): Remove check for
12803 regno 0.
12804
cf8fd78b
PA
128052009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12806 Pedro Alves <pedro@codesourcery.com>
12807
12808 * target.h (struct target_ops) <supports_multi_process>: New
12809 callback.
12810 (target_supports_multi_process): New.
12811 * server.c (handle_query): Even if GDB reports support, only
12812 enable multi-process if the target also supports it. Report
12813 multi-process support only if the target backend supports it.
12814 * linux-low.c (linux_supports_multi_process): New function.
12815 (linux_target_ops): Install it as target_supports_multi_process
12816 callback.
12817
47c0c975
DE
128182009-05-24 Doug Evans <dje@google.com>
12819
e09875d4
DE
12820 Global renaming of find_thread_pid to find_thread_ptid.
12821 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12822 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12823 All callers updated.
12824
e27d73f6
DE
12825 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12826 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12827 directly.
12828
47c0c975
DE
12829 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12830 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12831 (linux_resume_one_lwp): Ditto.
12832
2acc282a
DE
128332009-05-23 Doug Evans <dje@google.com>
12834
12835 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12836 from struct inferior_list_entry * to struct lwp_info *.
12837 All callers updated.
12838
9f1036c1
DE
128392009-05-13 Doug Evans <dje@google.com>
12840
12841 * linux-x86-low.c: Don't include assert.h.
12842 (x86_siginfo_fixup): Use fatal, not assert.
12843 (x86_arch_setup): Fix comment.
12844
d0722149
DE
128452009-05-12 Doug Evans <dje@google.com>
12846
12847 Biarch support for i386/amd64 gdbserver.
12848 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12849 Add linux-x86-low.c.
12850 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12851 (linux-x86-low.o): Add.
12852 * linux-x86-64-low.c: Delete.
12853 * linux-i386-low.c: Delete.
12854 * linux-x86-low.c: New file.
12855 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12856 linux-x86-low.o.
12857 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12858 linux-x86-low.o.
12859 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12860 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12861 (linux_child_pid_to_exec_file): New function.
12862 (elf_64_header_p, elf_64_file_p): New functions.
12863 (siginfo_fixup): New function.
12864 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12865 give target a chance to convert layout.
12866 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12867 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12868
fdeb2a12
DE
128692009-05-07 Doug Evans <dje@google.com>
12870
12871 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12872 (regsets_store_inferior_registers): Ditto.
12873
a6dbe5df
PA
128742009-05-06 Pedro Alves <pedro@codesourcery.com>
12875
12876 PR server/10048
12877
12878 * linux-low.c (must_set_ptrace_flags): Delete.
12879 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12880 of the global.
12881 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12882 `lwp->must_set_ptrace_flags' instead.
ba42693b 12883 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12884 (linux_wait_1): ... not here.
12885
5091eb23
DE
128862009-04-30 Doug Evans <dje@google.com>
12887
9f767825
DE
12888 * inferiors.c (started_inferior_callback): New function.
12889 (attached_inferior_callback): New function.
12890 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12891 * server.c (print_started_pid, print_attached_pid): New functions.
12892 (detach_or_kill_for_exit): New function.
12893 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12894 * server.h (have_started_inferiors_p): Declare.
12895 (have_attached_inferiors_p): Declare.
12896
5091eb23
DE
12897 * inferiors.c (remove_process): Fix memory leak, free process.
12898 * linux-low.c (linux_remove_process): New function.
12899 (linux_kill): Call it instead of remove_process.
12900 (linux_detach, linux_wait_1): Ditto.
12901
155c8968
PA
129022009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12903
12904 * configure.srv: Add x86 Windows CE target.
12905
7fe519cb
UW
129062009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12907
12908 * inferiors.c (get_thread_process): Make global.
12909 * server.h (get_thread_process): Add prototype.
12910 * thread-db.c (find_one_thread): Use get_thread_process
12911 instead of current_process.
12912 (thread_db_get_tls_address): Do not crash if called when
12913 thread layer is not yet initialized.
12914
5472f405
UW
129152009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12916
12917 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12918 * spu-low.c (current_tid): Rename to ...
12919 (current_ptid): ... this.
12920 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12921 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12922 ptid_get_lwp (current_ptid) instead of current_tid.
12923 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12924 instead of current_tid. Use find_process_pid to verify pid
12925 argument is valid. Pass proper argument to remove_process.
12926 (spu_thread_alive): Compare current_ptid instead of current_tid.
12927 (spu_resume): Likewise.
12928
55ac2b99
PA
129292009-04-02 Pedro Alves <pedro@codesourcery.com>
12930
12931 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12932 variable.
12933
95954743
PA
129342009-04-01 Pedro Alves <pedro@codesourcery.com>
12935
12936 Implement the multiprocess extensions, and add linux multiprocess
12937 support.
12938
12939 * server.h (ULONGEST): Declare.
12940 (struct ptid, ptid_t): New.
12941 (minus_one_ptid, null_ptid): Declare.
12942 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12943 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12944 (struct inferior_list_entry): Change `id' type from unsigned from
12945 to ptid_t.
12946 (struct sym_cache, struct breakpoint, struct
12947 process_info_private): Forward declare.
12948 (struct process_info): Declare.
12949 (current_process): Declare.
12950 (all_processes): Declare.
12951 (initialize_inferiors): Declare.
12952 (add_thread): Adjust to use ptid_t.
12953 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12954 (add_process, remove_process, find_thread_pid): Declare.
12955 (find_inferior_id): Adjust to use ptid_t.
12956 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12957 (multi_process): Declare.
12958 (push_event): Adjust to use ptid_t.
12959 (read_ptid, write_ptid): Declare.
12960 (prepare_resume_reply): Adjust to use ptid_t.
12961 (clear_symbol_cache): Declare.
12962 * inferiors.c (all_processes): New.
12963 (null_ptid, minus_one_ptid): New.
12964 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12965 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12966 (add_thread): Change unsigned long to ptid. Remove gdb_id
12967 parameter. Adjust.
12968 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12969 (gdb_id_to_thread): Rename to ...
12970 (find_thread_pid): ... this. Change unsigned long to ptid.
12971 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12972 (loaded_dll, pull_pid_from_list): Adjust.
12973 (add_process, remove_process, find_process_pid)
12974 (get_thread_process, current_process, initialize_inferiors): New.
12975 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12976 (struct target_waitstatus) <related_pid>: Ditto.
12977 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12978 return type to int.
12979 (struct target_ops) <join>: Add `pid' argument.
12980 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12981 (struct target_ops) <wait>: Add `ptid' field. Change return type
12982 to ptid.
12983 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12984 (mywait): Add `ptid' argument. Change return type to ptid_t.
12985 (target_pid_to_str): Declare.
12986 * target.c (set_desired_inferior): Adjust to use ptids.
12987 (mywait): Add new `ptid' argument. Adjust.
12988 (target_pid_to_str): New.
12989 * mem-break.h (free_all_breakpoints): Declare.
12990 * mem-break.c (breakpoints): Delelete.
12991 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12992 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12993 to use per-process breakpoint list.
12994 (free_all_breakpoints): New.
12995 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12996 (symbol_cache, all_symbols_looked_up): Delete.
12997 (hexchars): New.
12998 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12999 read_ptid): New.
13000 (prepare_resume_reply): Change ptid argument's type from unsigned
13001 long to ptid_t. Adjust. Implement W;process and X;process.
13002 (free_sym_cache, clear_symbol_cache): New.
13003 (look_up_one_symbol): Adjust to per-process symbol cache. *
13004 * server.c (cont_thread, general_thread, step_thread): Change type
13005 to ptid_t.
13006 (attached): Delete.
13007 (multi_process): New.
13008 (last_ptid): Change type to ptid_t.
13009 (struct vstop_notif) <ptid>: Change type to ptid_t.
13010 (queue_stop_reply, push_event): Change `ptid' argument's type to
13011 ptid_t.
13012 (discard_queued_stop_replies): Add `pid' argument.
13013 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13014 changes. Don't reference the `attached' global.
13015 (attach_inferior): Adjust to mywait interface changes.
13016 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13017 features. Handle and report "multiprocess+". Handle
13018 "qAttached:PID".
13019 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13020 changes.
13021 (handle_v_kill): New.
13022 (handle_v_stopped): Adjust to use target_pid_to_str.
13023 (handle_v_requests): Allow multiple attaches and runs when
13024 multiprocess extensions are in effect. Handle "vKill".
13025 (myresume): Adjust to use ptids.
13026 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13027 (handle_status): Adjust to discard_queued_stop_replies interface
13028 change.
13029 (first_thread_of, kill_inferior_callback)
13030 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13031 (main): Call initialize_inferiors. Adjust to use ptids, killing
13032 and detaching from all inferiors. Handle multiprocess packet
13033 variants.
13034 * linux-low.h: Include gdb_proc_service.h.
13035 (struct process_info_private): New.
13036 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13037 <lwpid_of>: Use ptid_get_lwp.
13038 (get_lwp_thread): Adjust.
13039 (struct lwp_info): Add `dead' member.
13040 (find_lwp_pid): Declare.
13041 * linux-low.c (thread_db_active): Delete.
13042 (new_inferior): Adjust comment.
13043 (inferior_pid): Delete.
13044 (linux_add_process): New.
13045 (handle_extended_wait): Adjust.
13046 (add_lwp): Change unsigned long to ptid.
13047 (linux_create_inferior): Add process to processes table. Adjust
13048 to use ptids. Don't set new_inferior here.
13049 (linux_attach_lwp): Rename to ...
13050 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13051 it. Adjust to use ptids.
13052 (linux_attach_lwp): New.
13053 (linux_attach): Add process to processes table. Don't set
13054 new_inferior here.
13055 (struct counter): New.
13056 (second_thread_of_pid_p, last_thread_of_process_p): New.
13057 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13058 multiple processes.
13059 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13060 processes. Remove process from process table.
13061 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13062 to multiple processes.
13063 (any_thread_of): New.
13064 (linux_detach): Add `pid' argument, and handle it. Remove process
13065 from processes table.
13066 (linux_join): Add `pid' argument. Handle it.
13067 (linux_thread_alive): Change unsighed long argument to ptid_t.
13068 Consider dead lwps as not being alive.
13069 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13070 threads we're not interested in.
13071 (same_lwp, find_lwp_pid): New.
13072 (linux_wait_for_lwp): Change `pid' argument's type from int to
13073 ptid_t. Adjust.
13074 (linux_wait_for_event): Rename to ...
13075 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13076 from int to ptid_t. Adjust.
13077 (linux_wait_for_event): New.
13078 (linux_wait_1): Add `ptid' argument. Change return type to
13079 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13080 that exit from the process table.
13081 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13082 Adjust.
13083 (mark_lwp_dead): New.
13084 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13085 stopping all threads, mark its main lwp as dead.
13086 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13087 ptids.
13088 (fetch_register, usr_store_inferior_registers)
13089 (regsets_fetch_inferior_registers)
13090 (regsets_store_inferior_registers, linux_read_memory)
13091 (linux_write_memory): Inline `inferior_pid'.
13092 (linux_look_up_symbols): Adjust to use per-process
13093 `thread_db_active'.
13094 (linux_request_interrupt): Adjust to use ptids.
13095 (linux_read_auxv): Inline `inferior_pid'.
13096 (initialize_low): Don't reference thread_db_active.
13097 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13098 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13099 (ps_getpid): Return the pid of the current inferior.
13100 * thread-db.c (proc_handle, thread_agent): Delete.
13101 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13102 per-process data.
13103 (find_one_thread): Change argument type to ptid_t. Adjust to
13104 per-process data.
13105 (maybe_attach_thread): Adjust to per-process data and ptids.
13106 (thread_db_find_new_threads): Ditto.
13107 (thread_db_init): Ditto.
13108 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13109 processes table. Adjust to use ptids.
13110 (spu_kill, spu_detach): Adjust interface. Remove process from
13111 processes table.
13112 (spu_join, spu_thread_alive): Adjust interface.
13113 (spu_wait): Adjust interface. Remove process from processes
13114 table. Adjust to use ptids.
13115 * win32-low.c (current_inferior_tid): Delete.
13116 (current_inferior_ptid): New.
13117 (debug_event_ptid): New.
13118 (thread_rec): Take a ptid. Adjust.
13119 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13120 (child_delete_thread): Ditto.
13121 (do_initial_child_stuff): Add `attached' argument. Add process to
13122 processes table.
13123 (child_fetch_inferior_registers, child_store_inferior_registers):
13124 Adjust.
13125 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13126 (win32_attach): Pass 1 to do_initial_child_stuff.
13127 (win32_kill): Adjust interface. Remove process from processes
13128 table.
13129 (win32_detach): Ditto.
13130 (win32_join): Adjust interface.
13131 (win32_thread_alive): Take a ptid.
13132 (win32_resume): Adjust to use ptids.
13133 (get_child_debug_event): Ditto.
13134 (win32_wait): Adjust interface. Remove exiting process from
13135 processes table.
13136
bd99dc85
PA
131372009-04-01 Pedro Alves <pedro@codesourcery.com>
13138
13139 Non-stop mode support.
13140
13141 * server.h (non_stop): Declare.
13142 (gdb_client_data, handler_func): Declare.
13143 (delete_file_handler, add_file_handler, start_event_loop):
13144 Declare.
13145 (handle_serial_event, handle_target_event, push_event)
13146 (putpkt_notif): Declare.
13147 * target.h (enum resume_kind): New.
13148 (struct thread_resume): Replace `step' field by `kind' field.
13149 (TARGET_WNOHANG): Define.
13150 (struct target_ops) <wait>: Add `options' argument.
13151 <supports_non_stop, async, start_non_stop>: New fields.
13152 (target_supports_non_stop, target_async): New.
13153 (start_non_stop): Declare.
13154 (mywait): Add `options' argument.
13155 * target.c (mywait): Add `options' argument. Print child exit
13156 notifications here.
13157 (start_non_stop): New.
13158 * server.c (non_stop, own_buf, mem_buf): New globals.
13159 (struct vstop_notif): New.
13160 (notif_queue): New global.
13161 (queue_stop_reply, push_event, discard_queued_stop_replies)
13162 (send_next_stop_reply): New.
13163 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13164 interface changes.
13165 (attach_inferior): In non-stop mode, don't wait for the target
13166 here.
13167 (handle_general_set): Handle QNonStop.
13168 (handle_query): When handling qC, return the current general
13169 thread, instead of the first thread of the list.
13170 (handle_query): If the backend supports non-stop mode, include
13171 QNonStop+ in the qSupported query response.
13172 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13173 and non-stop mode.
13174 (handle_v_attach, handle_v_run): Handle non-stop mode.
13175 (handle_v_stopped): New.
13176 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13177 (myresume): Adjust to use resume_kind. Handle non-stop.
13178 (queue_stop_reply_callback): New.
13179 (handle_status): Handle non-stop mode.
13180 (main): Clear non_stop flag on reconnection. Use the event-loop.
13181 Refactor serial protocol handling from here ...
13182 (process_serial_event): ... to this new function. When GDB
13183 selects any thread, select one here. In non-stop mode, wait until
13184 GDB acks all pending events before exiting.
13185 (handle_serial_event, handle_target_event): New.
13186 * remote-utils.c (remote_open): Install remote_desc in the event
13187 loop.
13188 (remote_close): Remove remote_desc from the event loop.
13189 (putpkt_binary): Rename to...
13190 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13191 (putpkt_binary): New as wrapper around putpkt_binary_1.
13192 (putpkt_notif): New.
13193 (prepare_resume_reply): In non-stop mode, don't change the
13194 general_thread.
13195 * event-loop.c: New.
13196 * Makefile.in (OBJ): Add event-loop.o.
13197 (event-loop.o): New rule.
13198
13199 * linux-low.h (pid_of): Moved here.
13200 (lwpid_of): New.
13201 (get_lwp_thread): Use lwpid_of.
13202 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13203 * linux-low.c (pid_of): Delete.
13204 (inferior_pid): Use lwpid_of.
13205 (linux_event_pipe): New.
13206 (target_is_async_p): New.
13207 (delete_lwp): New.
13208 (handle_extended_wait): Use lwpid_of.
13209 (add_lwp): Don't set lwpid field.
13210 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13211 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13212 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13213 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13214 first. Adjust to linux_wait_for_event interface changes. Use
13215 lwpid_of.
13216 (linux_detach): Don't delete the main lwp here.
13217 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13218 (status_pending_p): Don't consider explicitly suspended lwps.
13219 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13220 pointer. Add OPTIONS argument. Change return type to int. Use
13221 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13222 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13223 pointer. Add status pointer argument. Return a pid instead of a
13224 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13225 changes. In non-stop mode, don't switch to a random thread.
13226 (linux_wait): Rename to...
13227 (linux_wait_1): ... this. Add target_options argument, and handle
13228 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13229 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13230 clean exit and signal exit code. Don't stop all threads in
13231 non-stop mode. In all-stop mode, only stop all threads when
13232 reporting a stop to GDB. Handle explicit thread stop requests.
13233 (async_file_flush, async_file_mark): New.
13234 (linux_wait): New.
13235 (send_sigstop): Use lwpid_of.
13236 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13237 interface changes. In non-stop mode, don't switch to a random
13238 thread.
13239 (linux_resume_one_lwp): Use lwpid_of.
13240 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13241 (linux_resume_one_thread): ... this. Handle resume_stop. In
13242 non-stop mode, don't look for pending flag in all threads.
13243 (resume_status_pending_p): Don't consider explicitly suspended
13244 threads.
13245 (my_waitpid): Reimplement. Emulate __WALL.
13246 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13247 Use lwpid_of.
13248 (sigchld_handler, linux_supports_non_stop, linux_async)
13249 (linux_start_non_stop): New.
13250 (linux_target_ops): Register linux_supports_non_stop, linux_async
13251 and linux_start_non_stop.
13252 (initialize_low): Install SIGCHLD handler.
13253 * thread-db.c (thread_db_create_event, find_one_thread)
13254 (thread_db_get_tls_address): Use lwpid_of.
13255 * win32-low.c (win32_detach): Adjust to use resume_kind.
13256 (win32_wait): Add `options' argument.
13257 * spu-low.c (spu_resume): Adjust to use resume_kind.
13258 (spu_wait): Add `options' argument.
13259
5b1c542e
PA
132602009-04-01 Pedro Alves <pedro@codesourcery.com>
13261
13262 Decouple target code from remote protocol.
13263
13264 * target.h (enum target_waitkind): New.
13265 (struct target_waitstatus): New.
13266 (struct target_ops) <wait>: Return an unsigned long. Take a
13267 target_waitstatus pointer instead of a char pointer.
13268 (mywait): Likewise.
13269 * target.c (mywait): Change prototype to return an unsigned long.
13270 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13271 * server.h (thread_from_wait, old_thread_from_wait): Delete
13272 declarations.
13273 (prepare_resume_reply): Change prototype to take a
13274 target_waitstatus.
13275 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13276 (last_status, last_ptid): New.
13277 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13278 pid instead of a signal.
13279 (attach_inferior): Remove "status" and "signal" parameters.
13280 Adjust.
13281 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13282 not as an address.
13283 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13284 (handle_v_requests, myresume): Remove "status" and "signal"
13285 parameters. Adjust.
13286 (handle_status): New.
13287 (main): Delete local `status'. Adjust.
13288 * remote-utils.c: Include target.h.
13289 (prepare_resume_reply): Change prototype to take a
13290 target_waitstatus. Adjust.
13291
13292 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13293 interface.
13294 * spu-low.c (spu_wait): Adjust.
13295 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13296 Delete.
13297 (win32_wait): Adjust.
13298
2bd7c093
PA
132992009-04-01 Pedro Alves <pedro@codesourcery.com>
13300
13301 * target.h (struct thread_resume): Delete leave_stopped member.
13302 (struct target_ops): Add a `n' argument to the `resume' callback.
13303 * server.c (start_inferior): Adjust.
13304 (handle_v_cont, myresume): Adjust.
13305 * linux-low.c (check_removed_breakpoint): Adjust to resume
13306 interface change, and to removed leave_stopped field.
13307 (resume_ptr): Delete.
13308 (struct thread_resume_array): New.
13309 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13310 resume interface change.
13311 (linux_continue_one_thread, linux_queue_one_thread)
13312 (resume_status_pending_p): Check if the resume field is NULL
13313 instead of checking the leave_stopped member.
13314 (linux_resume): Adjust to the target resume interface change.
13315 * spu-low.c (spu_resume): Adjust to the target resume interface
13316 change.
13317 * win32-low.c (win32_detach, win32_resume): Ditto.
13318
c35fafde
PA
133192009-04-01 Pedro Alves <pedro@codesourcery.com>
13320
13321 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13322 flag.
13323 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13324 pending.
13325 (linux_continue_one_thread): Only preserve the stepping flag if
13326 there's a pending breakpoint.
13327
0a59d50b
PA
133282009-03-31 Pedro Alves <pedro@codesourcery.com>
13329
13330 * server.c (main): After the inferior having exited, call
13331 remote_close before exiting gdbserver.
13332
f04c6d38
TJB
133332009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13334
13335 Fix size of FPSCR in Power 7 processors.
13336 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13337 (PPC_FEATURE_HAS_DFP): New #define.
13338 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13339 size of the FPSCR.
13340
78e5cee6
PA
133412009-03-23 Pedro Alves <pedro@codesourcery.com>
13342
13343 * server.c (handle_query) Whitespace and formatting.
13344
1b3f6016
PA
133452009-03-22 Pedro Alves <pedro@codesourcery.com>
13346
13347 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13348 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13349 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13350 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13351 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13352 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13353 Makefile.in, configure.ac: Fix whitespace throughout.
13354 * configure: Regenerate.
13355
a07b2135
PA
133562009-03-22 Pedro Alves <pedro@codesourcery.com>
13357
13358 * inferiors.c (find_inferior): Make it safe for the callback
13359 function to delete the currently iterated inferior.
13360
67cc2626
PA
133612009-03-22 Pedro Alves <pedro@codesourcery.com>
13362
13363 * Makefile.in (linuw_low_h): Move higher.
13364 (thread-db.o): Depend on $(linux_low_h).
13365
54a0b537
PA
133662009-03-17 Pedro Alves <pedro@codesourcery.com>
13367
13368 Rename "process" to "lwp" throughout.
13369
13370 * linux-low.c (all_processes): Rename to...
13371 (all_lwps): ... this.
13372 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13373 (add_process): Rename to ...
13374 (add_lwp): ... this. Adjust.
13375 (linux_create_inferior): Adjust.
13376 (linux_attach_lwp): Adjust.
13377 (linux_attach): Adjust.
13378 (linux_kill_one_process): Rename to ...
13379 (linux_kill_one_lwp): ... this. Adjust.
13380 (linux_kill): Adjust.
13381 (linux_detach_one_process): Rename to ...
13382 (linux_detach_one_lwp): ... this. Adjust.
13383 (linux_detach): Adjust.
13384 (check_removed_breakpoint): Adjust.
13385 (status_pending_p): Adjust.
13386 (linux_wait_for_process): Rename to ...
13387 (linux_wait_for_lwp): ... this. Adjust.
13388 (linux_wait_for_event): Adjust.
13389 (send_sigstop): Adjust.
13390 (wait_for_sigstop): Adjust.
13391 (stop_all_processes): Rename to ...
13392 (stop_all_lwps): ... this.
13393 (linux_resume_one_process): Rename to ...
13394 (linux_resume_one_lwp): ... this. Adjust.
13395 (linux_set_resume_request, linux_continue_one_thread)
13396 (linux_queue_one_thread, resume_status_pending_p)
13397 (usr_store_inferior_registers, regsets_store_inferior_registers)
13398 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13399 Adjust.
13400 * linux-low.h (get_process): Rename to ...
13401 (get_lwp): ... this. Adjust.
13402 (get_thread_process): Rename to ...
13403 (get_thread_lwp): ... this. Adjust.
13404 (get_process_thread): Rename to ...
13405 (get_lwp_thread): ... this. Adjust.
13406 (struct process_info): Rename to ...
13407 (struct lwp_info): ... this.
13408 (all_processes): Rename to ...
13409 (all_lwps): ... this.
13410 * proc-service.c (ps_lgetregs): Adjust.
13411 * thread-db.c (thread_db_create_event, find_one_thread)
13412 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13413
0b16c5cf
PA
134142009-03-14 Pedro Alves <pedro@codesourcery.com>
13415
13416 * server.c (handle_query): Handle "qAttached".
13417
32de4b9d
NS
134182009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13419
13420 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13421 GPLv3, update license URL.
13422
2aecd87f
DE
134232009-03-01 Doug Evans <dje@google.com>
13424
93efd302 13425 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13426 (server_h): Add gdb_signals.h.
13427 (signals.o): Update.
13428 * server.h (target_signal_from_host,target_signal_to_host_p)
13429 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13430
86b1f9c5
PM
134312009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13432
13433 * remote-utils.c (getpkt): Also generate remote-debug
13434 information if noack_mode is set.
13435
4aa995e1
PA
134362009-02-06 Pedro Alves <pedro@codesourcery.com>
13437
13438 * server.c (handle_query): Report qXfer:siginfo:read and
13439 qXfer:siginfo:write as supported and handle them.
13440 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13441 * linux-low.c (linux_xfer_siginfo): New.
13442 (linux_target_ops): Set it.
13443
62709adf
PA
134442009-01-26 Pedro Alves <pedro@codesourcery.com>
13445
13446 * server.c (gdbserver_usage): Mention --remote-debug.
13447 (main): Accept '--remote-debug' switch.
13448
aef93bd7
DE
134492009-01-18 Doug Evans <dje@google.com>
13450
13451 * regcache.c (new_register_cache): No need to check result of xcalloc.
13452 * server.c (handle_search_memory): Back out calls to xmalloc,
13453 result is checked and error is returned to user upon failure.
13454 (handle_query): Ditto. Add more checks for result of malloc.
13455 (handle_v_cont): Check result of malloc, report error back to
13456 user upon failure.
13457 (handle_v_run): Ditto. Call freeargv.
13458 * server.h (freeargv): Declare.
13459 * utils.c (freeargv): New fn.
13460
54363045
DE
134612009-01-15 Doug Evans <dje@google.com>
13462
f626972c
DE
13463 * gdbreplay.c (perror_with_name): Make arg const char *.
13464 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13465 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13466 * utils.c (perror_with_name): Make arg const char *.
54363045 13467
18aae699
PA
134682009-01-14 Pedro Alves <pedro@codesourcery.com>
13469
13470 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13471 when handling a EXIT_PROCESS_DEBUG_EVENT.
13472
ff703abe
JB
134732009-01-06 Joel Brobecker <brobecker@adacore.com>
13474
13475 * gdbreplay.c (gdbreplay_version): Update copyright year.
13476 * server.c (gdbserver_version): Likewise.
13477
f21cc1a2 134782009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13479
13480 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13481 (handle_extended_wait): Improve comment.
0e21c1ec 13482
bca929d3
DE
134832008-12-13 Doug Evans <dje@google.com>
13484
13485 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13486 * server.h (ATTR_MALLOC): New macro.
13487 (xmalloc,xcalloc,xstrdup): Declare.
13488 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13489 * inferiors.c: Ditto.
13490 * linux-low.c: Ditto.
13491 * mem-break.c: Ditto.
13492 * regcache.c: Ditto.
13493 * remote-utils.c: Ditto.
13494 * server.c: Ditto.
13495 * target.c: Ditto.
13496 * win32-low.c: Ditto.
13497
97438e3f
DE
134982008-12-12 Doug Evans <dje@google.com>
13499
896c7fbb
DE
13500 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13501 in debugging printf.
13502
97438e3f
DE
13503 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13504
e3b886f8
DE
135052008-12-09 Doug Evans <dje@google.com>
13506
13507 * linux-low.h (struct process_info): Delete member tid, unused.
13508 * thread-db.c (find_one_thread): Update.
13509 (maybe_attach_thread): Update.
13510
07e059b5
VP
135112008-12-02 Pedro Alves <pedro@codesourcery.com>
13512
889bf7c5
PA
13513 * target.h (struct target_ops): Add qxfer_osdata member.
13514 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13515 and dirent.h.
13516 (linux_qxfer_osdata): New functions.
13517 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13518 callback.
13519 * server.c (handle_query): Handle "qXfer:osdata:read:".
13520 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13521 (buffer_xml_printf): New functions.
13522 * server.h (struct buffer): New.
13523 (buffer_grow_str, buffer_grow_str0): New macros.
13524 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13525 (buffer_xml_printf): Declare.
07e059b5 13526
4cab47ab
DE
135272008-11-24 Doug Evans <dje@google.com>
13528
13529 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13530
f142445f
DJ
135312008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13532
13533 * server.c (handle_v_run): Always use the supplied argument list.
13534
d0107bb6 135352008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13536
d0107bb6
BW
13537 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13538 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13539
2c4ad781
TJB
135402008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13541
13542 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13543 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13544 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13545 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13546 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13547 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13548 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13549 XML target descriptions.
13550 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13551 when inferior is running on an ISA 2.05 or later processor. Add
13552 special case to return offset for full 64-bit slot of FPSCR when
13553 in 32-bits.
13554
dfb64f85
DJ
135552008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13556
13557 * Makefile.in (SFILES, clean): Added sparc64 files.
13558 (reg-sparc64.o, reg-sparc64.c): New.
13559 * configure.srv (sparc*-*-linux*): New configuration.
13560 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13561 syscall arguments for SPARC.
13562 (regsets_store_inferior_registers): Likewise.
13563 * linux-sparc-low.c: New file.
13564
66b6e1dd
DE
135652008-10-21 Doug Evans <dje@google.com>
13566
13567 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13568 (READLINE_DIR,READLINE_DEP): Delete.
13569 (INTERNAL_CFLAGS): Update.
13570 (LINTFLAGS): Update.
13571
9b710a42
PA
135722008-10-10 Pedro Alves <pedro@codesourcery.com>
13573
13574 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13575 whole argv from the last run, not just argv[0].
13576
5822d809
PA
135772008-09-08 Pedro Alves <pedro@codesourcery.com>
13578
13579 * regcache.c (new_register_cache): Return NULL if the register
13580 cache size isn't known yet.
13581 (free_register_cache): Avoid dereferencing a NULL regcache.
13582
74aac56f
DJ
135832008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13584
13585 * configure.srv: Merge MIPS and MIPS64.
13586
400b20f5
MR
135872008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13588
13589 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13590
677c5bb1
LM
135912008-08-18 Luis Machado <luisgpm@br.ibm.com>
13592
13593 * Makefile.in: Add required vsx dependencies.
13594
13595 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13596 Declare init_registers_powerpc_vsx32l.
13597 Declare init_registers_powerpc_vsx64l.
13598 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13599 (ppc_arch_setup): Check for VSX in hwcap.
13600 (ppc_fill_vsxregset): New function.
13601 (ppc_store_vsxregset): New function.
13602 Add new VSX entry in regset_info target_regsets.
13603
13604 * configure.srv: Add new VSX dependencies.
13605
a6f3e723
SL
136062008-08-12 Pedro Alves <pedro@codesourcery.com>
13607
13608 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13609 (remote_open): Set or clear transport_is_reliable.
13610 (putpkt_binary): Don't expect acks in noack mode.
13611 (getpkt): Don't send ack/nac in noack mode.
13612 * server.c (handle_general_set): Handle QStartNoAckMode.
13613 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13614 qSupported.
13615 (main): Reset noack_mode on every connection.
13616 * server.h (noack_mode): Declare.
13617
a417dc56
RW
136182008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13619
13620 * Makefile.in (GDBREPLAY_OBS): New variable.
13621 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13622
3221518c
UW
136232008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13624 Daniel Jacobowitz <dan@codesourcery.com>
13625
13626 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13627 (usr_store_inferior_registers): Likewise.
13628 (regsets_store_inferior_registers): Likewise.
13629
ec56be1b
PA
136302008-07-31 Rolf Jansen <rj@surtec.com>
13631 Pedro Alves <pedro@codesourcery.com>
13632
13633 * configure.ac: Check for memmem declaration.
13634 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13635 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13636 (disable_packet_qfThreadInfo): Unconditionally compile.
13637 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13638 * configure, config.in: Regenerate.
13639
2fe5e3ff
DE
136402008-07-28 Doug Kwan <dougkwan@google.com>
13641
13642 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13643 (linux_write_memory): Remove declaration of errno.
13644
836acd6d
UW
136452008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13646
13647 * linux-low.c (handle_extended_wait): Do not use "status"
13648 variable uninitialized.
13649
aeba519e
PA
136502008-07-07 Pedro Alves <pedro@codesourcery.com>
13651
13652 * server.c (handle_v_attach): Inhibit reporting dll changes.
13653
db42f210
PA
136542008-06-27 Pedro Alves <pedro@codesourcery.com>
13655
13656 * remote-utils.c (prepare_resume_reply): If requested, don't
13657 output "thread:TID" in the T stop reply.
13658
13659 * server.c (disable_packet_vCont, disable_packet_Tthread)
13660 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13661 (handle_query): If requested, disable support for qC, qfThreadInfo
13662 and qsThreadInfo.
13663 (handle_v_requests): If requested, disable support for vCont.
13664 (gdbserver_show_disableable): New.
13665 (main): Handle --disable-packet and --disable-packet=LIST.
13666
13667 * server.h (disable_packet_vCont, disable_packet_Tthread)
13668 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13669
8e4c5421
CD
136702008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13671
13672 * server.c (gdbserver_usage): Mention --version.
13673
6e23a804
DJ
136742008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13675
13676 * Makefile.in (gdbreplay.o): New rule.
13677
90aa6a40
JM
136782008-06-06 Joseph Myers <joseph@codesourcery.com>
13679
13680 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13681 message, not gdbserver.
13682
c16158bc 136832008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13684 Nathan Sidwell <nathan@codesourcery.com>
13685 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13686
13687 * acinclude.m4: Include ../../config/acx.m4.
13688 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13689 * configure, config.in: Regenerate.
13690 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13691 * server.c (gdbserver_version): Print PKGVERSION.
13692 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13693 (main): Adjust gdbserver_usage calls.
13694 * gdbreplay.c (version, host_name): Add declarations.
13695 (gdbreplay_version, gdbreplay_usage): New.
13696 (main): Accept --version and --help options.
13697
aeb75bf5
DJ
136982008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13699
13700 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13701 (arm_breakpoint_at): Handle Thumb.
13702 (the_low_target): Add comment.
13703
76b233dd
UW
137042008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13705
13706 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13707
08388c79
DE
137082008-05-09 Doug Evans <dje@google.com>
13709
a3c83fae
DE
13710 * server.h (decode_search_memory_packet): Declare.
13711 * remote-utils.c (decode_search_memory_packet): New fn.
13712 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13713 (handle_search_memory): New fn.
13714 (handle_query): Process qSearch:memory packets.
13715
bb9c3d36
UW
137162008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13717
13718 * regcache.c (registers_length): Remove.
13719 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13720 full register packet.
13721 * regcache.h (registers_length): Remove prototype.
13722 * server.h (PBUFSIZ): Define to 16384.
13723
7284e1be
UW
137242008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13725
13726 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13727 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13728 powerpc-64l.o, and powerpc-altivec64l.o.
13729 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13730 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13731 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13732 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13733 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13734 to srv_xmlfiles.
13735
13736 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13737 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13738 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13739 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13740 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13741 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13742 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13743 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13744 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13745 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13746 (clean): Update.
13747
13748 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13749 (init_registers_powerpc_32l): ... this new prototype.
13750 (init_registers_powerpc_32): Remove, replace by ...
13751 (init_registers_powerpc_altivec32l): ... this new prototype.
13752 (init_registers_powerpc_e500): Remove, replace by ...
13753 (init_registers_powerpc_e500l): ... this new prototype.
13754 (init_registers_ppc64): Remove, replace by ...
13755 (init_registers_powerpc_64l): ... this new prototype.
13756 (init_registers_powerpc_64): Remove, replace by ...
13757 (init_registers_powerpc_altivec64l): ... this new prototype.
13758 (ppc_num_regs): Set to 73.
13759 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13760 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13761 (ppc_cannot_store_register): Handle orig_r3 and trap.
13762 (ppc_arch_setup): Update init_registers_... calls.
13763 (ppc_fill_gregset): Handle orig_r3 and trap.
13764
13765 * inferiors.c (clear_inferiors): Reset current_inferior.
13766
fdc59709
PB
137672008-04-23 Paolo Bonzini <bonzini@gnu.org>
13768
889bf7c5
PA
13769 * acinclude.m4: Add override.m4.
13770 * configure: Regenerate.
fdc59709 13771
c9b2f845
UW
137722008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13773
13774 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13775 initial call to init_register_ppc64.
13776
550512b8
UW
137772008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13778
43aaf8b6
PA
13779 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13780 single powerpc*-*-linux* case.
550512b8
UW
13781 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13782
b6430ec3
UW
137832008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13784
13785 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13786 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13787 from reg_xmlfiles.
13788 * linux-ppc-low.c: Include <elf.h>.
13789 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13790 (ppc_hwcap): New global variable.
13791 (ppc_regmap): Remove __SPE__ #ifdef sections.
13792 (ppc_regmap_e500): New global variable.
13793 (ppc_cannot_store_register): Update __SPE__ special case.
13794 (ppc_get_hwcap): New function.
13795 (ppc_arch_setup): Use it to determine whether inferior supports
13796 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13797 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13798 Do not access registers if target does not support AltiVec.
13799 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13800 Do not access registers if target does not support SPE.
13801 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13802
52fa2412
UW
138032008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13804
13805 * linux-low.c (disabled_regsets, num_regsets): New.
13806 (use_regsets_p): Delete.
13807 (linux_wait_for_process): Clear disabled_regsets.
13808 (regsets_fetch_inferior_registers): Check and set it.
13809 (regsets_store_inferior_registers): Likewise.
13810 (linux_fetch_registers, linux_store_registers): Do not use
13811 use_regsets_p.
13812 (initialize_low): Allocate disabled_regsets.
13813
e28b3332
DJ
138142008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13815
13816 * Makefile.in (LIBOBJS): New.
13817 (OBS): Use LIBOBJS.
13818 (memmem.o): New rule.
13819 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13820 * configure: Regenerated.
13821
4536995d
UW
138222008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13823
13824 * server.c (handle_query): Never return "unsupported" for
13825 qXfer:features:read queries.
13826
221c031f
UW
138272008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13828
13829 * server.c (get_features_xml): Fix inverted condition.
13830 (handle_query): Always support qXfer:feature:read.
13831
ccd213ac
DJ
138322008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13833
13834 * server.c (wrapper_argv): New.
13835 (start_inferior): Handle wrapper_argv. If set, expect an extra
13836 trap.
13837 (gdbserver_usage): Document --wrapper.
13838 (main): Parse --wrapper.
13839
6fe305f7
UW
138402008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13841
13842 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13843 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13844 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13845 (ppc_set_pc): Likewise.
13846 (ppc_arch_setup): New function.
13847 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13848 of collect_register.
889bf7c5 13849 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13850
5b0a002e
UW
138512008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13852
13853 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13854 instead of linux-ppc64-low.o.
13855 * linux-ppc64-low.c: Remove file.
13856 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13857 (linux-ppc64-low.o): Remove rule.
13858
13859 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13860 (init_registers_powerpc_64): Likewise.
13861 (ppc_regmap): Conditionally define depending on __powerpc64__.
13862 (ppc_cannot_store_register): Do not special-case "fpscr" when
13863 compiled on __powerpc64__.
13864 (ppc_collect_ptrace_register): New function.
13865 (ppc_supply_ptrace_register): New function.
13866 (ppc_breakpoint): Change type to "unsigned int".
13867 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13868 (the_low_target): Conditionally provide initializers for the
889bf7c5 13869 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13870 collect_ptrace_register and supply_ptrace_register members.
13871
9b4b61c8
UW
138722008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13873
13874 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13875 * server.c (gdbserver_xmltarget): Define.
13876 (get_features_xml): Use it to replace "target.xml" and arch_string.
13877
13878 * configure.srv: Remove srv_xmltarget. Add XML files that were
13879 mentioned there to srv_xmlfiles instead. Remove conditional tests
13880 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13881 srv_xmlfiles and srv_regobj to include all possible choices.
13882 * configure.ac (srv_xmltarget): Remove.
13883 (srv_xmlfiles): Do not add "target.xml".
13884 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13885 checks for supplementary target information.
13886 * configure: Regenerate.
13887 * Makefile.in (XML_TARGET): Remove.
13888 (target.xml): Remove rule.
13889 (clean): Do not clean up target.xml.
13890 (.PRECIOUS): Do not mention target.xml.
13891
13892 * target.h (struct target_ops): Remove arch_string member.
13893 * linux-low.c (linux_arch_string): Remove.
13894 (linux_target_ops): Remove arch_string initializer.
13895 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13896 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13897 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13898 * spu-low.c (spu_arch_string): Remove.
13899 (spu_target_ops): Remove arch_string initializer.
13900 * win32-low.c (win32_arch_string): Remove.
13901 (win32_target_ops): Remove arch_string initializer.
13902 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13903 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13904 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13905
ee1a7ae4
UW
139062008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13907
13908 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13909 by collect_ptrace_register and supply_ptrace_register hooks.
13910 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13911 instead of checking for the_low_target.left_pad_xfer.
13912 (usr_store_inferior_registers): Use collect_ptrace_register callback
13913 instead of checking for the_low_target.left_pad_xfer.
13914
13915 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13916 (s390_supply_ptrace_register): Likewise.
13917 (s390_fill_gregset): Call s390_collect_ptrace_register.
13918 (the_low_target): Update.
13919
13920 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13921 (ppc_supply_ptrace_register): Likewise.
13922 (the_low_target): Update.
13923
13924 * linux-i386-low.c (the_low_target): Update.
13925 * linux-x86-64-low.c (the_low_target): Update.
13926
d61ddec4
UW
139272008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13928
13929 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13930 reg-s390.o and reg-s390x.o.
13931
13932 * linux-low.c (new_inferior): New global variable.
13933 (linux_create_inferior, linux_attach): Set it.
13934 (linux_wait_for_process): Call the_low_target.arch_setup after the
13935 target has stopped for the first time.
13936 (initialize_low): Do not call the_low_target.arch_setup.
13937
13938 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13939 (s390_set_pc): Likewise.
13940 (s390_arch_setup): New function.
13941 (the_low_target): Use s390_arch_setup as arch_setup routine.
13942
13943 * regcache.c (realloc_register_cache): New function.
13944 (set_register_cache): Call it for each existing regcache.
13945
d05b4ac3
UW
139462008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13947
13948 * server.h (init_registers): Remove prototype.
13949
13950 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13951 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13952 instead of init_registers ().
13953 * linux-arm-low.c (init_registers_arm): Add prototype.
13954 (init_registers_arm_with_iwmmxt): Likewise.
13955 (the_low_target): Add initializer for arch_setup field.
13956 * linux-cris-low.c (init_registers_cris): Add prototype.
13957 (the_low_target): Add initializer for arch_setup field.
13958 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13959 (the_low_target): Add initializer for arch_setup field.
13960 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13961 (the_low_target): Add initializer for arch_setup field.
13962 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13963 (the_low_target): Add initializer for arch_setup field.
13964 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13965 (the_low_target): Add initializer for arch_setup field.
13966 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13967 (the_low_target): Add initializer for arch_setup field.
13968 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13969 (init_registers_mips64_linux): Likewise.
13970 (the_low_target): Add initializer for arch_setup field.
13971 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13972 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13973 (the_low_target): Add initializer for arch_setup field.
13974 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13975 (init_registers_powerpc_64): Likewise.
13976 (the_low_target): Add initializer for arch_setup field.
13977 * linux-s390-low.c (init_registers_s390): Add prototype.
13978 (init_registers_s390x): Likewise.
13979 (the_low_target): Add initializer for arch_setup field.
13980 * linux-sh-low.c (init_registers_sh): Add prototype.
13981 (the_low_target): Add initializer for arch_setup field.
13982 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13983 (the_low_target): Add initializer for arch_setup field.
13984 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13985 (the_low_target): Add initializer for arch_setup field.
13986
13987 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13988 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13989 instead of init_registers ().
13990 * win32-arm-low.c (init_registers_arm): Add prototype.
13991 (the_low_target): Add initializer for arch_setup field.
13992 * win32-i386-low.c (init_registers_i386): Add prototype.
13993 (the_low_target): Add initializer for arch_setup field.
13994
13995 * spu-low.c (init_registers_spu): Add prototype.
13996 (initialize_low): Call initialie_registers_spu () instead of
13997 initialize_registers ().
13998
fd96d250
PA
139992008-02-19 Pedro Alves <pedro@codesourcery.com>
14000
14001 * server.c (handle_v_requests): When handling the vRun and vAttach
14002 packets, if already debugging a process, don't kill it. Return an
14003 error instead.
14004
d41b6bb4
DJ
140052008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14006
14007 * server.c (handle_query): Correct length check.
14008
5ac588cf
PA
140092008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14010
14011 * win32-low.c (do_initial_child_stuff): Add process handle
14012 parameter. Set current_process_handle and current_process_id from the
14013 parameters. Clear globals.
14014 (win32_create_inferior): Don't set current_process_handle and
14015 current_process_id here. Instead pass them on the call to
14016 do_initial_child_stuff.
14017 (win32_attach): Likewise.
14018 (win32_clear_inferiors): New.
14019 (win32_kill): Don't close the current process handle or the
14020 current thread handle here. Instead call win32_clear_inferiors.
14021 (win32_detach): Don't open a new handle to the process. Call
14022 win32_clear_inferiors.
14023 (win32_join): Don't rely on current_process_handle; open a new
14024 handle using the process id.
14025 (win32_wait): Call win32_clear_inferiors when the inferior process
14026 has exited.
14027
ecd7ecbc
DJ
140282008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14029
14030 * server.c (monitor_show_help): Add "exit".
14031
1525d545
MG
140322008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14033
ecd7ecbc 14034 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
14035 (clean): Add reg-xtensa.c.
14036 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
14037 * configure.srv (xtensa*-*-linux*) New target.
14038 * linux-xtensa-low.c: New.
14039 * xtensa-xtregs.c: New.
1525d545 14040
59a016f0
PA
140412008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14042
14043 * hostio.c: Don't include errno.h.
14044 (errno_to_fileio_errno): Move to hostio-errno.
14045 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14046 error number outputting to the target->hostio_last_error callback.
14047 (hostio_packet_error): Use FILEIO_EINVAL directly.
14048 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14049 calls to hostio_error.
14050 * hostio-errno.c: New.
14051 * server.h (hostio_last_error_from_errno): Declare.
14052 * target.h (target_ops): Add hostio_last_error member.
14053 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14054 as hostio_last_error handler.
889bf7c5 14055 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
14056 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14057 (wince_hostio_last_error): New functions.
14058 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14059 as hostio_last_error handler.
14060 (win32_target_ops) [!_WIN32_WCE]: Register
14061 hostio_last_error_from_errno as hostio_last_error handler.
14062 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14063 (hostio-errno.o): New rule.
14064 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14065 * configure.srv (srv_hostio_err_objs): New variable. Default to
14066 hostio-errno.o.
14067 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14068 * configure: Regenerate.
14069
2d717e4f
DJ
140702008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14071
14072 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14073 (linux_kill, linux_detach): Clean up the process list.
14074 * remote-utils.c (remote_open): Improve port number parsing.
14075 (putpkt_binary, input_interrupt): Only send interrupts if the target
14076 is running.
14077 * server.c (extended_protocol): Make static.
14078 (attached): Define earlier.
14079 (exit_requested, response_needed, program_argv): New variables.
14080 (target_running): New.
14081 (start_inferior): Clear attached here.
14082 (attach_inferior): Set attached here.
14083 (require_running): Define.
14084 (handle_query): Use require_running and target_running. Implement
14085 "monitor exit".
14086 (handle_v_attach, handle_v_run): New.
14087 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14088 (gdbserver_usage): Update.
14089 (main): Redo argument parsing. Handle --debug and --multi. Handle
14090 --attach along with other options or after the port. Save
14091 program_argv. Support no initial program. Resynchronize
14092 communication with GDB after an error. Handle "monitor exit".
14093 Use require_running and target_running. Always allow the extended
14094 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14095 restart in extended mode.
14096 * README: Refer to the GDB manual. Update --attach usage.
14097
7407e2de
AS
140982007-12-20 Andreas Schwab <schwab@suse.de>
14099
14100 * linux-low.c (STACK_SIZE): Define.
14101 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14102 (linux_test_for_tracefork): Likewise.
14103
b65d95c5
DJ
141042007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14105
14106 * linux-low.c (linux_wait_for_event): Update messages. Do not
14107 reinsert auto-delete breakpoints.
14108 * mem-break.c (struct breakpoint): Change return type of handler to
14109 int.
14110 (set_breakpoint_at): Update handler type.
14111 (reinsert_breakpoint_handler): Return 1 instead of calling
14112 delete_breakpoint.
14113 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14114 setting a new one.
14115 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14116 * mem-break.h (set_breakpoint_at): Update handler type.
14117 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14118 * win32-low.c (auto_delete_breakpoint): New.
14119 (get_child_debug_event): Use it.
14120
4e799345
DJ
141212007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14122
14123 * configure.ac: Check for pread and pwrite.
14124 * hostio.c (handle_pread): Fall back to lseek and read.
14125 (handle_pwrite): Fall back to lseek and write.
14126 * config.in, configure: Regenerated.
14127
27524b67
DJ
141282007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14129
14130 * server.c (myresume): Add own_buf argument.
14131 (main): Update calls.
14132
a20d5e98
DJ
141332007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14134
14135 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14136 * remote-utils.c (remote_open): Do not call disable_async_io.
14137 (block_async_io): Delete.
14138 (unblock_async_io): Make static.
14139 (initialize_async_io): New.
14140 * server.c (handle_v_cont): Handle async I/O here.
14141 (myresume): Likewise. Move other common resume tasks here...
14142 (main): ... from here. Call initialize_async_io. Disable async
14143 I/O before the main loop.
14144 * server.h (initialize_async_io): Declare.
14145 (block_async_io, unblock_async_io): Delete prototypes.
14146 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14147
b79d787e
DJ
141482007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14149
14150 * remote-utils.c (readchar): Allow binary data in received messages.
14151
d97903b2
PA
141522007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14153
14154 * win32-low.c (attaching): New global.
14155 (win32_create_inferior): Clear the `attaching' global.
14156 (win32_attach): Set the `attaching' global.
14157 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14158 attaching. Only set a breakpoint at the entry point if not
14159 attaching.
14160
311de423
PA
141612007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14162
14163 * server.c (main): Don't report dll events on the initial
14164 connection on attaches.
14165
6c2d16d2
PA
141662007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14167
14168 * server.c (main): Relax numerical bases supported for the pid of
14169 the --attach command line argument.
14170
5ca906e6
PA
141712007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14172
14173 * win32-low.c (win32_attach): Call OpenProcess before
14174 DebugActiveProcess, not after. Add last error output to error
14175 call.
14176
9c6c8194
PA
141772007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14178
14179 * win32-low.c (win32_get_thread_context)
14180 (win32_set_thread_context): New functions.
14181 (thread_rec): Use win32_get_thread_context.
14182 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14183 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14184 field.
14185
4d5d1aaa
PA
141862007-12-03 Leo Zayas
14187 Pedro Alves <pedro_alves@portugalmail.pt>
14188
14189 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14190 global variables.
14191 (child_add_thread): Minor cleanup.
14192 (child_continue): Resume artificially suspended threads before
14193 calling ContinueDebugEvent.
14194 (suspend_one_thread): New.
14195 (fake_breakpoint_event): New.
14196 (get_child_debug_event): Change return type to int. Check here if
14197 gdb sent an interrupt request. If a soft interrupt was requested,
14198 fake a breakpoint event. Return 0 if there is no event to handle,
14199 and 1 otherwise.
14200 (win32_wait): Don't check here if gdb sent an interrupt request.
14201 Ensure there is a valid event to handle.
14202 (win32_request_interrupt): Add soft interruption method as last
14203 resort.
14204
c436e841
PA
142052007-12-03 Leo Zayas
14206 Pedro Alves <pedro_alves@portugalmail.pt>
14207
14208 * win32-low.h (win32_thread_info): Add descriptions to the
14209 structure members. Replace `suspend_count' counter by a
14210 `suspended' flag.
14211 * win32-low.c (thread_rec): Update condition of when to get the
14212 context from the inferior. Rely on ContextFlags being set if it
14213 has already been retrieved. Only suspend the inferior thread if
14214 we haven't already. Warn if that fails.
14215 (continue_one_thread): s/suspend_count/suspended/. Only call
14216 ResumeThread once. Warn if that fails.
14217
e7b5fa67
PA
142182007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14219
14220 * win32-low.c (win32_wait): Don't read from the inferior when it
14221 has already exited.
14222
a385171d
PA
142232007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14224
14225 * Makefile.in (win32_low_h): New variable.
14226 (win32-low.o): Add dependency on $(win32_low_h).
14227 (win32-arm-low.o, win32-i386-low.o): New rules.
14228
f80c84b3
DJ
142292007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14230
14231 * hostio.c: Correct copyright year.
14232
a6b151f1
DJ
142332007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14234
14235 * Makefile.in (OBS): Add hostio.o.
14236 (hostio.o): New rule.
14237 * server.h (handle_vFile): Declare.
14238 * hostio.c: New file.
14239 * server.c (handle_v_requests): Take packet_len and new_packet_len
14240 for binary packets. Call handle_vFile.
14241 (main): Update call to handle_v_requests.
14242
f9387fc3
DJ
142432007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14244
14245 * linux-low.c: Include <sched.h>.
14246
51c2684e
DJ
142472007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14248
14249 * linux-low.c (linux_tracefork_grandchild): New.
14250 (linux_tracefork_child): Use clone.
14251 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14252
75f83163
JB
142532007-10-31 Joel Brobecker <brobecker@adacore.com>
14254
14255 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14256
da5898ce
DJ
142572007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14258
14259 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14260
24a09b5f
DJ
142612007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14262
14263 * inferiors.c (change_inferior_id): Delete.
14264 (add_pid_to_list, pull_pid_from_list): New.
14265 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14266 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14267 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14268 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14269 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14270 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14271 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14272 (using_threads): Always set to 1.
14273 (handle_extended_wait): New.
14274 (add_process): Do not set TID.
14275 (linux_create_inferior): Set must_set_ptrace_flags.
14276 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14277 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14278 (linux_thread_alive): Rename TID argument to LWPID.
14279 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14280 (linux_wait_for_event): Do not use TID or check using_threads. Update
14281 call to dead_thread_notify. Call handle_extended_wait.
14282 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14283 (send_sigstop): Delete sigstop_sent.
14284 (wait_for_sigstop): Avoid TID.
14285 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14286 (linux_test_for_tracefork): New.
14287 (linux_lookup_signals): Use thread_db_active and
14288 linux_supports_tracefork_flag.
14289 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14290 * linux-low.h (get_process_thread): Avoid TID.
14291 (struct process_ifo): Move thread_known and tid to the end. Remove
14292 sigstop_sent.
14293 (linux_attach_lwp, thread_db_init): Update prototypes.
14294 * server.h (change_inferior_id): Delete prototype.
14295 (add_pid_to_list, pull_pid_from_list): New prototypes.
14296 * thread-db.c (thread_db_use_events): New.
14297 (find_first_thread): Rename to...
14298 (find_one_thread): ...this. Update callers and messages. Do not
14299 call fatal. Check thread_db_use_events. Do not call
14300 change_inferior_id or new_thread_notify.
14301 (maybe_attach_thread): Update. Do not call new_thread_notify.
14302 (thread_db_init): Set thread_db_use_events. Check use_events.
14303 * utils.c (fatal, warning): Correct message prefix.
14304
30ed0a8f
DJ
143052007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14306
14307 * Makefile.in (clean): Remove new files.
14308 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14309 (powerpc-64.o, powerpc-64.c): New rules.
14310 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14311 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14312 with SPE.
14313 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14314 SPE targets.
14315 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14316 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14317 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14318 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14319 (target_regsets): Add AltiVec and SPE register sets.
14320 * configure.ac: Check for AltiVec and SPE.
14321 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14322 (ppc_fill_vrregset, ppc_store_vrregset): New.
14323 (target_regsets): Add AltiVec register set.
14324 * configure: Regenerated.
14325
fd462a61
DJ
143262007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14327
14328 * linux-low.c (O_LARGEFILE): Define.
14329 (linux_read_memory): Use /proc/PID/mem.
14330 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14331 * configure, config.in: Regenerated.
14332
69f223ed
DJ
143332007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14334
14335 * linux-low.c (linux_wait_for_event): Do not pass signals while
14336 single-stepping.
14337
aec18585
PA
143382007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14339
14340 * win32-low.c (create_process): New.
14341 (win32_create_inferior): Use create_process instead of
14342 CreateProcess. If create_process failed retry appending an ".exe"
14343 suffix. Store the GetLastError result immediatelly after
14344 create_process calls and use it on the call to error.
14345
34d86ddd
PA
143462007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14347
14348 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14349
5a0e3bd0
JB
143502007-08-23 Joel Brobecker <brobecker@adacore.com>
14351
14352 * configure.ac: Switch license to GPLv3.
14353
f88c79e6
MS
143542007-08-01 Michael Snyder <msnyder@access-company.com>
14355
14356 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14357
6b3d9b83
PA
143582007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14359
14360 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14361 typedef.
14362 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14363 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14364 CloseToolhelp32Snapshot.
14365 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14366 CloseToolhelp32Snapshot.
14367
c588c53c
MS
143682007-07-27 Michael Snyder <michael.snyder@access-company.com>
14369
14370 * server.c (main): Check for inferior exit before main loop.
14371
aa0403d9
PA
143722007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14373
14374 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14375 instead of on tmp_desc.
14376
255e7678
DJ
143772007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14378 Daniel Jacobowitz <dan@codesourcery.com>
14379
14380 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14381 (add_thread): Minor cleanups.
14382 (clear_inferiors): Move lower in the file. Clear the DLL
14383 list.
14384 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14385 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14386 (xml_escape_text): New.
14387 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14388 for qSupported.
14389 (handle_v_cont): Report errors.
14390 (gdbserver_version): Update.
14391 (main): Correct size of own_buf. Do not report initial DLL events.
14392 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14393 (unloaded_dll, xml_escape_text): New.
14394 * win32-low.c (enum target_waitkind): Update comments.
14395 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14396 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14397 (win32_EnumProcessModules, win32_GetModuleInformation)
14398 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14399 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14400 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14401 (win32_Module32First, win32_Module32Next, load_toolhelp)
14402 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14403 (get_child_debug_event): Handle DLL events.
14404 (win32_wait): Likewise.
14405
0d37add9
DJ
144062007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14407
14408 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14409 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14410
45e2715e
PA
144112007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14412
14413 * win32-low.c (handle_output_debug_string): Ignore event if not
14414 waiting.
14415
c5674cf1
PA
144162007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14417
14418 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14419
2bbe3cc1
DJ
144202007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14421
14422 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14423
ae13219e
DJ
144242007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14425
14426 * inferiors.c (change_inferior_id): Add comment.
14427 * linux-low.c (check_removed_breakpoint): Add an early
14428 prototype. Improve debug output.
14429 (linux_attach): Doc update.
14430 (linux_detach_one_process, linux_detach): Clean up before releasing
14431 each process.
14432 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14433 * linux-low.h (struct process_info): Doc improvement.
14434 * mem-break.c (delete_all_breakpoints): New.
14435 * mem-break.h (delete_all_breakpoints): New prototype.
14436 * thread-db.c (find_first_thread): New.
14437 (thread_db_create_event): Call it instead of
14438 thread_db_find_new_threads. Clean up unused variables.
14439 (maybe_attach_thread): Remove first thread handling.
14440 (thread_db_find_new_threads): Use find_first_thread.
14441 (thread_db_get_tls_address): Likewise.
14442
4105de34
DJ
144432007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14444
14445 * thread-db.c (thread_db_find_new_threads): Add prototype.
14446 (thread_db_create_event): Check for the main thread before adding
14447 a new thread.
14448 (maybe_attach_thread): Only enable event reporting if TID == 0.
14449 (thread_db_get_tls_address): Check for new threads.
14450
2b876972
DJ
144512007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14452
14453 * linux-low.c (linux_create_inferior): Try execv before execvp.
14454 * spu-low.c (spu_create_inferior): Likewise.
14455
7a245884
DJ
144562007-06-13 Mike Frysinger <vapier@gentoo.org>
14457
14458 * linux-low.c (linux_create_inferior): Change execv to execvp.
14459 * spu-low.c (spu_create_inferior): Likewies.
14460
117ce543
DJ
144612007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14462
14463 * Makefile.in (clean): Clean new files instead of deleted ones.
14464 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14465 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14466 rules.
14467 * configure.srv: Specify XML files and new regformats for MIPS and
14468 MIPS64 GNU/Linux.
14469 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14470 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14471 an entry for the restart register.
14472 (mips_cannot_fetch_register, mips_cannot_store_register)
14473 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14474 register names to match the XML descriptions.
14475 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14476 restart register instead of $0.
14477
0e7f50da
UW
144782007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14479 Markus Deuling <deuling@de.ibm.com>
14480
14481 * remote-utils.c (decode_xfer_write): New function.
14482 * server.h (decode_xfer_write): Add prototype.
14483 * server.c (handle_query): Add PACKET_LEN argument. Support
14484 qXfer:spu:read and qXfer:spu:write packets.
14485 (main): Pass packet_len to handle_query.
14486 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14487 * target.h (target_ops): Add qxfer_spu.
14488
374c1d38
UW
144892007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14490
14491 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14492 accessing non-seekable spufs files.
14493
bb63802a
UW
144942007-05-16 Markus Deuling <deuling@de.ibm.com>
14495
889bf7c5 14496 * server.c (handle_query): Add reply for qC packet.
bb63802a 14497
7390519e
PA
144982007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14499 Leo Zayas <lerele@champenstudios@com>
14500
14501 * server.h (check_remote_input_interrupt_request): New function.
14502 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14503 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14504 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14505 (check_remote_input_interrupt_request): New function.
14506 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14507 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14508 winapi_GenerateConsoleCtrlEvent): New typedefs.
14509 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14510 to 250 ms.
14511 (win32_wait): Check for remote interrupt request
14512 with check_remote_input_interrupt_request.
14513 (win32_request_interrupt): New function.
14514 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14515
34b34921
PA
145162007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14517
14518 * win32-low.c (debug_registers_changed,
14519 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14520 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14521 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14522 (thread_rec): Get context using the low target.
14523 (child_add_thread): Call thread_added on the low target,
14524 which does the same thing.
14525 (regptr): Delete.
14526 (do_initial_child_stuff): Remove debug registers references.
14527 Set context using the low target. Resume threads after
14528 setting the contexts.
14529 (child_continue): Remove dead variable. Remove debug
14530 registers references.
14531 (child_fetch_inferior_registers): Go through the low target.
14532 (do_child_store_inferior_registers): Remove.
14533 (child_store_inferior_registers): Go through the low target.
14534 (win32_resume): Remove debug registers references.
14535 Set context using the low target.
14536 (handle_exception): Change return type to void. Don't record
14537 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14538 first chance exception.
889bf7c5 14539 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14540 goto loop. Always return after waiting for debug event.
14541 (win32_wait): Convert to switch statement. Handle spurious
14542 events.
14543
14544 * win32-i386-low.c (debug_registers_changed,
14545 debug_registers_used): New.
14546 (initial_stuff): Rename to ...
14547 (i386_initial_stuff): ... this. Clear debug registers
14548 state variables.
14549 (store_debug_registers): Delete.
14550 (i386_get_thread_context): New.
14551 (load_debug_registers): Delete.
14552 (i386_set_thread_context): New.
14553 (i386_thread_added): New.
14554 (single_step): Rename to ...
14555 (i386_single_step): ... this.
14556 (do_fetch_inferior_registers): Rename to ...
14557 (i386_fetch_inferior_register): ... this.
14558 (i386_store_inferior_register): New.
14559 (the_low_target): Adapt to new interface.
14560
14561 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14562 (arm_get_thread_context): New.
14563 (arm_set_thread_context): New.
14564 (regptr): New.
14565 (do_fetch_inferior_registers): Rename to ...
14566 (arm_fetch_inferior_register): ... this.
14567 (arm_store_inferior_register): New.
14568 (arm_wince_breakpoint): Reimplement as unsigned long.
14569 (arm_wince_breakpoint_len): Define.
14570 (the_low_target): Adapt to new interface.
14571
14572 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14573 load_debug_registers. Add get_thread_context, set_thread_context,
14574 thread_added and store_inferior_register. Rename
14575 fetch_inferior_registers to fetch_inferior_register.
14576 (regptr): Remove declaration.
14577
dd6953e1
PA
145782007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14579
14580 * linux-low.c (linux_detach): Change return type to int. Return 0.
14581 * spu-low.c (spu_detach): Likewise.
14582
444d6139
PA
145832007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14584
14585 * target.h (target_ops): Change return type of detach to int.
14586 Add join.
14587 (join_inferior): New.
14588 * server.c (main): Don't skip detach support on mingw32.
14589 If the inferior doesn't support detaching return error.
14590 Call join_inferior instead of using waitpid.
14591 * linux-low.c (linux_join): New.
14592 (linux_target_op): Add linux_join.
14593 * spu-low.c (spu_join): New.
14594 (spu_target_ops): Add spu_join.
14595 * win32-low.c (win32_detach): Adapt to new interface.
14596 Reopen current_process_handle before detaching. Issue a child
14597 resume before detaching.
14598 (win32_join): New.
14599 (win32_target_op): Add win32_join.
14600
1d5315fe
PA
146012007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14602
14603 * win32-low.c (win32-attach): Fix return value.
14604 * target.h (target_ops): Describe ATTACH return values.
14605
bf914831
PA
146062007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14607
14608 * win32-low.c (GETPROCADDRESS): Define.
14609 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14610 (winapi_DebugSetProcessKillOnExit): Likewise.
14611 (win32_create_inferior): Force usage of ansi CreateProcessA.
14612 (win32_attach): Use GETPROCADDRESS.
14613 (win32_detach): Likewise.
14614
f72f3e60
PA
146152007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14616
14617 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14618
ed50f18f
PA
146192007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14620
14621 * win32-low.c: Commit leftover changes from 2007-03-29.
14622
0c2ead7e
DJ
146232007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14624
14625 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14626 fields short instead of int. Add explicit padding.
14627 (i387_cache_to_fsave): Remove unnecessary casts.
14628 (i387_fsave_to_cache): Doc fix.
14629 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14630
73725ff3
DJ
146312007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14632
14633 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14634 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14635
d99f33d8
PA
146362007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14637
14638 * configure.srv (arm*-*-mingw32ce*): Move near the other
14639 arm targets.
14640
68070c10
PA
146412007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14642
2482afc6 14643 * configure.ac: Add errno checking.
68070c10
PA
14644 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14645 sys/file.h and malloc.h.
14646 (AC_CHECK_DECLS): Add perror.
14647 (srv_mingwce): Handle.
2482afc6 14648 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14649 win32-i386-low.o to srv_tgtobj.
14650 (i[34567]86-*-mingw*): Likewise.
14651 (arm*-*-mingw32ce*): Add case.
14652 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14653 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14654 [__MINGW32CE__] (strerror): New function.
14655 [__MINGW32CE__] (errno): Define to GetLastError.
14656 [__MINGW32CE__] (COUNTOF): New macro.
14657 (remote_open): Remove extra close call.
14658 * mem-break.c (delete_breakpoint_at): New function.
14659 * mem-break.h (delete_breakpoint_at): Declare.
14660 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14661 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14662 [USE_WIN32API] (read, write): Add char* casts.
14663 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14664 * server.h: Include wincecompat.h on Windows CE.
14665 [HAVE_ERRNO_H]: Check.
14666 (perror): Declare if not declared.
14667 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14668 (perror_with_name): Remove errno declaration.
14669 * wincecompat.h: New.
14670 * wincecompat.c: New.
14671 * win32-low.h: New.
14672 * win32-arm-low.c: New.
14673 * win32-i386-low.c: New.
14674 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14675 (OUTMSG2): Make it safe.
14676 (_T): New macro.
14677 (COUNTOF): New macro.
14678 (NUM_REGS): Get it from the low target.
14679 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14680 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14681 (thread_rec): Let low target handle debug registers.
14682 (child_add_thread): Likewise.
14683 (child_init_thread_list): Likewise.
14684 (continue_one_thread): Likewise.
14685 (regptr): New.
14686 (do_child_fetch_inferior_registers): Move to ...
14687 * win32-i386-low.c: ... here, and rename to ...
14688 (do_fetch_inferior_registers): ... this.
889bf7c5 14689 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14690 Go through the low target.
14691 (do_child_store_inferior_registers): Use regptr.
14692 (strwinerror): New function.
14693 (win32_create_inferior): Handle Windows CE.
14694 Use strwinerror instead of strerror on Windows error
14695 codes. Add program to the error output.
14696 Don't close the main thread handle on Windows CE.
14697 (win32_attach): Use coredll.dll on Windows CE.
14698 (win32_kill): Close current process and current
14699 thread handles.
14700 (win32_detach): Use coredll.dll on Windows CE.
14701 (win32_resume): Let low target handle debug registers, and
14702 step request.
14703 (handle_exception): Add/Remove initial breakpoint. Avoid
14704 non-existant WSTOPSIG on Windows CE.
14705 (win32_read_inferior_memory): Cast to remove warning.
14706 (win32_arch_string): Go through the low target.
14707 (initialize_low): Call set_breakpoint_data with the low
14708 target's breakpoint.
14709 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14710 FOP_REGNUM, mappings): Move to ...
14711 * win32-i386-low.c: ... here.
14712 * win32-low.c (win32_thread_info): Move to ...
14713 * win32-low.h: ... here.
14714 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14715 win32-arm-low.c and wincecompat.c.
14716 (all:): Add $EXEEXT.
14717 (install-only:): Likewise.
14718 (gdbserver:): Likewise.
14719 (gdbreplay:): Likewise.
14720 * config.in: Regenerate.
14721 * configure: Regenerate.
14722
41093d81
PA
147232007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14724
14725 * win32-low.c: Rename typedef thread_info to
14726 win32_thread_info throughout.
14727
544afa54
PA
147282007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14729
14730 * win32-i386-low.c: Rename to ...
14731 * win32-low.c: ... this.
14732 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14733 * Makefile.in: Likewise.
14734
bce7165d
PA
147352007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14736
14737 * remote-utils.c (monitor_output): Constify msg parameter.
14738 * server.h (monitor_output): Likewise.
14739 * win32-i386-low.c (handle_output_debug_string): New.
14740 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14741 handle_output_debug_string.
14742 (get_child_debug_event): Likewise.
14743
506c7aa0
DJ
147442007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14745
14746 * server.c (main): Correct strtoul check.
14747
42c81e2a
DJ
147482007-03-27 Jon Ringle <jon@ringle.org>
14749
14750 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14751
9453113a
DJ
147522007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14753
14754 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14755
64a69107
DJ
147562007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14757
14758 * terminal.h: Check HAVE_SGTTY_H.
14759
147602007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14761
14762 * remote-utils.c (remote_open): Print out the assigned port number.
14763
c74d0ad8
DJ
147642007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14765
14766 * remote-utils.c (monitor_output): New function.
14767 * server.c (debug_threads): Define here.
14768 (monitor_show_help): New function.
14769 (handle_query): Handle qRcmd.
14770 (main): Do not handle 'd' packet.
14771 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14772 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14773 of debug_threads.
14774
de7c3b4a
PA
147752007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14776
14777 * Makefile.in (EXEEXT): New.
14778 (clean): Use $(EXEEXT).
14779
ef57601b
PA
147802007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14781
14782 * target.h (target_ops): Rename send_signal to request_interrupt,
14783 and remove enum target_signal parameter.
14784 * linux-low.c (linux_request_interrupt): Rename from
14785 linux_send_signal, and always send SIGINT.
14786 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14787 and always send SIGINT.
14788 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14789 of send_signal.
14790 (input_interrupt): Likewise.
14791
820f2bda
PA
147922007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14793
14794 * server.c (get_features_xml): Check if target implemented
14795 arch_string.
14796 * win32-i386-low.c (win32_arch_string): New.
14797 (win32_target_ops): Add win32_arch_string as arch_string member.
14798
ab39bf24
UW
147992007-02-22 Markus Deuling <deuling@de.ibm.com>
14800
14801 * spu-low.c (spu_arch_string): New.
14802 (spu_target_ops): Add spu_arch_string.
14803
61ff6e04
DJ
148042007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14805
14806 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14807 * configure.ac: Do not check for terminal.h.
14808 * configure, config.in: Regenerated.
14809
fb1e4ffc
DJ
148102007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14811
14812 * Makefile.in (OBS): Add $(XML_BUILTIN).
14813 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14814 (clean): Update.
14815 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14816 (arm-with-iwmmxt.c): New.
14817 * config.in, configure: Regenerate.
14818 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14819 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14820 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14821 (arm*-*-linux*): Add iWMMXt and regset support.
14822 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14823 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14824 (arm_store_wmmxregset, target_regsets): New.
14825 * server.c (get_features_xml): Take annex argument. Check builtin
14826 XML documents.
14827 (handle_query): Handle multiple annexes.
14828
0f48aa01
DJ
148292007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14830
14831 * remote-utils.c [USE_WIN32API] (read, write): Define.
14832 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14833 write.
14834
23181151
DJ
148352007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14836
14837 * linux-i386-low.c (the_low_target): Set arch_string.
14838 * linux-x86-64-low.c (the_low_target): Likewise.
14839 * linux-low.c (linux_arch_string): New.
14840 (linux_target_ops): Add it.
14841 * linux-low.h (struct linux_target_ops): Add arch_string.
14842 * server.c (write_qxfer_response): Use const void * for DATA.
14843 (get_features_xml): New.
14844 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14845 * target.h (struct target_ops): Add arch_string method.
14846
9d606399
DJ
148472007-01-03 Denis Pilat <denis.pilat@st.com>
14848 Daniel Jacobowitz <dan@codesourcery.com>
14849
14850 * linux-low.c (linux_kill): Handle being called with no threads.
14851 * win32-i386-low.c (win32_kill): Likewise.
14852 (get_child_debug_event): Clear current_process_handle.
14853
148542006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14855 Daniel Jacobowitz <dan@codesourcery.com>
14856
14857 * remote-utils.c (remote_open): Check the type of specified
14858 serial port devices before opening them.
14859 * server.c (main): Kill the inferior if an error occurs during
14860 the first remote_open.
14861
a5e13d24
DJ
148622006-12-05 Markus Deuling <deuling@de.ibm.com>
14863
14864 * README: Update supported targets.
14865
186947f7
DJ
148662006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14867
14868 * Makefile.in (clean): Remove reg-mips64.c.
14869 (reg-mips64.c, reg-mips64.o): New rules.
14870 * configure.srv: Handle mips64. Include regset support for mips.
14871 * linux-mips-low.c (union mips_register): New.
14872 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14873 (mips_breakpoint, mips_breakpoint_at): Use int.
14874 (mips_collect_register, mips_supply_register)
14875 (mips_collect_register_32bit, mips_supply_register_32bit)
14876 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14877 (mips_store_fpregset, target_regsets): New.
14878 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14879
a13e2c95
UW
148802006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14881
14882 * configure.srv: Add target "spu*-*-*".
14883 * Makefile.in (clean): Remove reg-spu.c.
14884 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14885 * spu-low.c: New file.
14886
cb7283db
DJ
148872006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14888
14889 * configure.ac: Correct td_thr_tls_get_addr test.
14890 * configure: Regenerated.
14891
89be2091
DJ
148922006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14893
14894 * linux-low.c (linux_wait_for_event): Reformat. Use the
14895 pass_signals array.
14896 * remote-utils.c (decode_address_to_semicolon): New.
14897 * server.c (pass_signals, handle_general_set): New.
14898 (handle_query): Mention QPassSignals for qSupported.
14899 (main): Call handle_general_set.
14900 * server.h (pass_signals, decode_address_to_semicolon): New.
14901
000ef4f0
DJ
149022006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14903
14904 * server.c (handle_query): Correct error handling for read_auxv.
14905
b7149293
UW
149062005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14907
14908 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14909 and srv_linux_thread_db to yes.
14910 * linux-s390-low.c (s390_fill_gregset): New function.
14911 (target_regsets): Define data structure.
14912
dae5f5cf
DJ
149132006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14914
14915 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14916 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14917 * config.in, configure: Regenerated.
14918 * inferiors.c (gdb_id_to_thread): New function.
14919 (gdb_id_to_thread_id): Use it.
14920 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14921 * linux-low.h (struct process_info): Add th member.
14922 (thread_db_get_tls_address): New prototype.
14923 * remote-utils.c (decode_address): Make non-static.
14924 * server.c (handle_query): Handle qGetTLSAddr.
14925 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14926 * target.h (struct target_ops): Add get_tls_address.
14927 * thread-db.c (maybe_attach_thread): Save the thread handle.
14928 (thread_db_get_tls_address): New.
14929
32ca6d61
DJ
149302006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14931
14932 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14933 (linux_resume_one_process): Take a siginfo_t *. Update all
14934 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14935 (struct pending_signals): Add a siginfo_t.
14936 (linux_wait_for_process): Always set last_status.
14937 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14938 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14939 * linux-low.h (struct process_info): Add last_status.
14940
5ffff7c1
DJ
149412006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14942
14943 * remote-utils.c (try_rle): New function.
14944 (putpkt_binary): Use it.
14945
8695c747
DJ
149462006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14947
14948 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14949 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14950 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14951 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14952 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14953 point registers.
14954
290fadea
RS
149552006-08-08 Richard Sandiford <richard@codesourcery.com>
14956
14957 * server.c (terminal_fd): New variable.
14958 (old_foreground_pgrp): Likewise.
14959 (restore_old_foreground_pgrp): New function.
14960 (start_inferior): Record the terminal file descriptor in terminal_fd
14961 and its original foreground group in old_foreground_pgrp. Register
14962 restore_old_foreground_pgrp with atexit().
14963
9f2e1e63
DJ
149642006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14965
14966 * server.c (handle_query): Correct qPart to qXfer.
14967
b80864fb
DJ
149682006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14969
14970 * configure.ac: Check for more headers which are missing on
14971 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14972 * configure.srv: Add Cygwin and mingw32.
14973 * remote-utils.c: Don't include headers unconditionally which
14974 are missing on mingw32. Include <winsock.h> for mingw32.
14975 (remote_open): Adjust for mingw32 support. Flush
14976 standard error after writing to it.
14977 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14978 (unblock_async_io, enable_async_io, disable_async_io)
14979 (readchar, getpkt): Update for Winsock support.
14980 (prepare_resume_reply): Expect a protocol signal number.
14981 * server.c: Disable <sys/wait.h> on mingw32.
14982 (start_inferior): Adjust for mingw32 support. Flush
14983 standard error after writing to it.
14984 (attach_inferior): Likewise. Use protocol signal
14985 numbers.
14986 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14987 and names.
14988 * win32-i386-low.c: New file.
14989 * Makefile.in (XM_CLIBS): Set.
14990 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14991 (win32-i386-low.o): New dependency rule.
14992 * linux-low.c (linux_wait): Use target signal numbers.
14993 * target.h (struct target_ops): Doc fix.
14994 * server.h (target_signal_to_name): New prototype.
14995 * gdbreplay.c: Don't include headers unconditionally which
14996 are missing on mingw32. Include <winsock.h> for mingw32.
14997 (remote_close, remote_open): Adjust for Winsock support.
14998 * configure, config.in: Regenerated.
14999
0876f84a
DJ
150002006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15001
15002 * server.c (decode_xfer_read, write_qxfer_response): New.
15003 (handle_query): Take a packet length argument. Handle
15004 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15005 the qSupported response.
15006 (main): Update call to handle_query.
15007
01f9e8fa
DJ
150082006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15009
15010 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15011 (putpkt_binary): Renamed from putpkt and adjusted for binary
15012 data.
15013 (putpkt): New wrapper for putpkt_binary.
15014 (readchar): Don't mask off the high bit.
15015 (decode_X_packet): New function.
15016 * server.c (main): Call putpkt_binary if a handler sets the packet
15017 length. Save the length of the incoming packet. Handle 'X'.
15018 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15019
be2a5f71
DJ
150202006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15021
15022 * server.c (handle_query): Handle qSupported.
15023
ea025f5f
DJ
150242006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15025
15026 * remote-utils.c (all_symbols_looked_up): New variable.
15027 (look_up_one_symbol): Check it.
15028 * server.h (look_up_one_symbol): New declaration.
15029 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15030
9308fc88
DJ
150312006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15032
15033 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 15034 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
15035 (PTRACE_GET_THREAD_AREA): Define.
15036 (ps_get_thread_area): New function.
15037
52fb6437
NS
150382006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15039
15040 * configure.srv (m68k*-*-uclinux*): New target.
15041 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15042 (linux_resume_one_process): Remove extraneous cast.
15043 (linux_read_offsets): New.
15044 (linux_target_op): Add linux_read_offsets on mmuless systems.
15045 * server.c (handle_query): Add qOffsets logic.
15046 * target.h (struct target_ops): Add read_offsets.
15047
21b0f40c
DJ
150482006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15049
15050 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15051 (PTRACE_GET_THREAD_AREA): Define.
15052 (ps_get_thread_area): New function.
15053 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15054 (linux-x86-64-low.o): Update.
15055
0050a760
DJ
150562006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15057
15058 * configure.ac: Remove checks for prfpregset_t.
15059 * gdb_proc_service.h: New file.
15060 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15061 new "gdb_proc_service.h".
15062 * proc-service.c: Likewise.
15063 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15064 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15065 * Makefile.in (gdb_proc_service_h): Updated.
15066 * configure, config.in: Regenerated.
15067
b92a518e
DJ
150682006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15069
15070 * remote-utils.c (prepare_resume_reply): Move declaration
15071 of gdb_id_from_wait to the top of the block.
15072
545587ee
DJ
150732006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15074
15075 * linux-low.c (regsets_store_inferior_registers): Read the regset
15076 from the target before filling it.
15077
9db87ebd
DJ
150782006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15079
15080 * server.c (attach_inferior): Return SIGTRAP for a successful
15081 attach.
15082
dd24457d
DJ
150832006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15084
15085 * Makefile.in (OBS): Add version.o.
15086 (STAGESTUFF): Delete.
15087 (version.o): Add dependencies.
15088 (version.c): Replace rule.
15089 (clean): Remove version.c.
15090 * server.c (gdbserver_version): New.
15091 (gdbserver_usage): Use printf.
15092 (main): Handle --version and --help.
15093 * server.h (version, host_name): Add declarations.
15094
6f0f660e
EZ
150952005-12-23 Eli Zaretskii <eliz@gnu.org>
15096
889bf7c5
PA
15097 * linux-arm-low.c:
15098 * linux-arm-low.c:
15099 * inferiors.c:
15100 * i387-fp.h:
15101 * i387-fp.c:
15102 * gdbreplay.c:
15103 * regcache.c:
15104 * proc-service.c:
15105 * mem-break.h:
15106 * mem-break.c:
15107 * linux-x86-64-low.c:
15108 * linux-sh-low.c:
15109 * linux-s390-low.c:
15110 * linux-ppc64-low.c:
15111 * linux-ppc-low.c:
15112 * linux-mips-low.c:
15113 * linux-m68k-low.c:
15114 * linux-m32r-low.c:
15115 * linux-low.h:
15116 * linux-low.c:
15117 * linux-ia64-low.c:
15118 * linux-i386-low.c:
15119 * linux-crisv32-low.c:
15120 * thread-db.c:
15121 * terminal.h:
15122 * target.h:
15123 * target.c:
15124 * server.h:
15125 * server.c:
15126 * remote-utils.c:
15127 * regcache.h:
15128 * utils.c:
15129 * Makefile.in:
15130 * configure.ac:
6f0f660e
EZ
15131 * gdbserver.1: Add (C) after Copyright. Update the FSF
15132 address.
15133
9d1fb177
DJ
151342005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15135
15136 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15137 (arm_breakpoint_at): Recognize both breakpoints.
15138 (the_low_target): Use the correct breakpoint instruction.
15139
011a70c2
DJ
151402005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15141
15142 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15143 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15144 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15145 (the_low_target): Update.
15146
7fb85e41
AS
151472005-10-25 Andreas Schwab <schwab@suse.de>
15148
15149 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15150
15151 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15152 (ia64_num_regs): Reduce to 462.
15153
3db0444b
DJ
151542005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15155
15156 * acinclude.m4: Correct quoting.
15157 * aclocal.m4: Regenerated.
15158
15159 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15160 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15161 (thread_db_init): Call thread_db_err_str.
15162 * configure.ac: Check for TD_VERSION.
15163 * config.in, configure: Regenerated.
15164
bee0189a
DJ
151652005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15166
15167 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15168
e9d25b98
DJ
151692005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15170
15171 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15172 is not available. Define HAVE_PTRACE_GETREGS if it is.
15173 * config.in, configure: Regenerated.
15174 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15175 * linux-i386-low.c, linux-m68k-low.c: Update to use
15176 HAVE_PTRACE_GETREGS.
15177 * linux-low.c (regsets_fetch_inferior_registers)
15178 (regsets_store_inferior_registers): Only return 0 if we processed
15179 GENERAL_REGS.
15180 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15181 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15182
a06660f7
DJ
151832005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15184
15185 * inferiors.c (struct thread_info): Add gdb_id.
15186 (add_thread): Add gdb_id argument.
15187 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15188 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15189 calls to add_thread.
15190 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15191 * server.c (handle_query): Use thread_to_gdb_id.
15192 (handle_v_cont, main): Use gdb_id_to_thread_id.
15193 * server.h (add_thread): Update prototype.
15194 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15195 prototypes.
15196
5a1f5858
DJ
151972005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15198
15199 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15200 left-padded registers.
15201 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15202 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15203
e122f1f5
SE
152042005-07-01 Steve Ellcey <sje@cup.hp.com>
15205
15206 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15207 * configure: Regenerate.
15208 * config.in: Regenerate.
15209 * server.h (NEED_DECLARATION_STRERROR):
15210 Replace with !HAVE_DECL_STRERROR.
15211
d592fa2f
DJ
152122005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15213
15214 * linux-low.c (linux_wait, linux_send_signal): Don't test
15215 an unsigned long variable for > 0 if it could be MAX_ULONG.
15216 * server.c (myresume): Likewise.
15217 * target.c (set_desired_inferior): Likewise.
15218
ccbd4912
MK
152192005-06-13 Mark Kettenis <kettenis@gnu.org>
15220
15221 * configure.ac: Simplify and improve check for socklen_t.
15222 * configure, config.in: Regenerate.
15223
f450004a
DJ
152242005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15225
15226 * acconfig.h: Remove.
15227 * configure.ac: Add a test for socklen_t. Use three-argument
15228 AC_DEFINE throughout.
15229 * config.in: Regenerated using autoheader 2.59.
15230 * configure: Regenerated.
15231
15232 * gdbreplay.c (socklen_t): Provide a default.
15233 (remote_open): Use socklen_t.
15234 * remote-utils.c (socklen_t): Provide a default.
15235 (remote_open): Use socklen_t.
15236 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15237 unsigned char.
15238
15239 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15240 char for buffers.
15241 * linux-low.c (linux_read_memory, linux_write_memory)
15242 (linux_read_auxv): Likewise.
15243 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15244 (check_mem_write): Likewise.
15245 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15246 Likewise.
15247 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15248 (registers_from_string, register_data): Likewise.
15249 * server.c (handle_query, main): Likewise.
15250 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15251 (decode_M_packet): Likewise.
15252 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15253 * target.h (struct target_ops): Update read_memory, write_memory,
15254 and read_auxv.
15255 (read_inferior_memory, write_inferior_memory): Update.
15256 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15257 to unsigned char *.
15258 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15259 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15260 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15261 linux-s390-low.c, linux-sh-low.c: Update for changes in
15262 read_inferior_memory and the_low_target->breakpoint.
15263
eee84df1
DJ
152642005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15265
15266 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15267 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15268 * configure.srv: Add powerpc64-*-linux*.
15269 * linux-ppc64-low.c: New file.
15270
45b134e5
OF
152712005-05-23 Orjan Friberg <orjanf@axis.com>
15272
15273 * linux-cris-low.c: New file with support for CRIS.
15274 * linux-crisv32-low.c: Ditto for CRISv32.
15275 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15276 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15277 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15278 reg-crisv32.o, and reg-crisv32.c to make rules.
15279 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15280 recognized targets.
15281
48d93c75
UW
152822005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15283
15284 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15285 of sizeof (PTRACE_XFER_TYPE).
15286 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15287
e013ee27
OF
152882005-05-12 Orjan Friberg <orjanf@axis.com>
15289
889bf7c5 15290 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15291 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15292 pointers for hardware watchpoint support.
15293 * linux-low.h (struct linux_target_ops): Ditto.
15294 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15295 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15296 to linux_target_ops.
15297 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15298 reply packet.
15299 * server.c (main): Recognize 'Z' and 'z' packets.
15300
b0ded00b
UW
153012005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15302
15303 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15304 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15305 (the_low_target): Add new members.
15306
8643e2ad
DJ
153072005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15308
15309 * proc-service.c (ps_lgetregs): Search all_processes instead of
15310 all_threads.
15311
fc620387
DJ
153122005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15313
15314 * server.c (start_inferior): Change return type to int.
15315 (attach_inferior): Change sigptr to int *.
15316 (handle_v_cont, handle_v_requests): Change signal to int *.
15317 (main): Change signal to int.
15318
153192005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15320
15321 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15322 * configure.srv: Add m32r*-*-linux*.
15323 * linux-m32r-low.c: New file.
15324
e0e76420
DJ
153252005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15326
15327 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15328
a1928bad
DJ
153292005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15330
15331 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15332 Take unsigned long arguments for PIDs.
15333 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15334 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15335 (wait_for_sigstop, linux_resume_one_process)
15336 (regsets_fetch_inferior_registers, linux_send_signal)
15337 (linux_read_auxv): Likewise. Update the types of variables holding
15338 PIDs. Update format string specifiers.
15339 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15340 * remote-utils.c (prepare_resume_reply): Likewise.
15341 * server.c (cont_thread, general_thread, step_thread)
15342 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15343 unsigned long.
15344 (handle_query): Update format specifiers.
15345 (handle_v_cont, main): Use strtoul for thread IDs.
15346 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15347 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15348 (general_thread, step_thread, thread_from_wait)
15349 (old_thread_from_wait): Update.
15350 * target.h (struct thread_resume): Use unsigned long for THREAD.
15351 (struct target_ops): Use unsigned long for arguments to attach and
15352 thread_alive.
15353
dcdb98d2
DJ
153542005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15355
15356 * acinclude.m4: Include bfd/bfd.m4 directly.
15357 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15358 <agriffis@toolchain.org>.
15359 * aclocal.m4, configure: Regenerated.
15360
bec39cab
AC
153612005-01-07 Andrew Cagney <cagney@gnu.org>
15362
15363 * configure.ac: Rename configure.in, require autoconf 2.59.
15364 * configure: Re-generate.
15365
434c4c77
DJ
153662004-12-08 Daniel Jacobowitz <dan@debian.org>
15367
15368 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15369 LIBS when finished.
15370 * aclocal.m4: Regenerated.
15371 * configure: Regenerated.
15372
db1d3e1b
AS
153732004-11-21 Andreas Schwab <schwab@suse.de>
15374
15375 * linux-m68k-low.c (m68k_num_gregs): Define.
15376 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15377 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15378 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15379 (m68k_breakpoint_at): New. Add to the_low_target.
15380
15381 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15382 srv_linux_thread_db to yes.
15383
43360365
JB
153842004-10-20 Joel Brobecker <brobecker@gnat.com>
15385
15386 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15387 (ARCH_SET_FS): Likewise.
15388 (ARCH_GET_FS): Likewise.
15389 (ARCH_GET_GS): Likewise.
15390
fd500816
DJ
153912004-10-16 Daniel Jacobowitz <dan@debian.org>
15392
15393 * linux-i386-low.c (ps_get_thread_area): New.
15394 * linux-x86-64-low.c (ps_get_thread_area): New.
15395 * linux-low.c: Include <sys/syscall.h>.
15396 (linux_kill_one_process): Don't kill the first thread here.
15397 (linux_kill): Kill the first thread here.
15398 (kill_lwp): New function.
15399 (send_sigstop, linux_send_signal): Use it.
15400 * proc-service.c: Clean up #ifdefs.
15401 (fpregset_info): Delete.
15402 (ps_lgetregs): Update and enable implementation.
15403 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15404 implementations.
15405 * remote-utils.c (struct sym_cache, symbol_cache): New.
15406 (input_interrupt): Print a clearer message.
15407 (async_io_enabled): New variable.
15408 (enable_async_io, disable_async_io): Use it. Update comments.
15409 (look_up_one_symbol): Use the symbol cache.
15410 * thread-db.c (thread_db_look_up_symbols): New function.
15411 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15412
f6de3c42
DJ
154132004-10-16 Daniel Jacobowitz <dan@debian.org>
15414
15415 * configure.in: Test for -rdynamic.
15416 * configure: Regenerated.
15417 * Makefile (INTERNAL_LDFLAGS): New.
15418 (gdbserver, gdbreplay): Use it.
15419
2c0fc042
AC
154202004-09-02 Andrew Cagney <cagney@gnu.org>
15421
15422 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15423
075b3282
DJ
154242004-03-23 Daniel Jacobowitz <drow@mvista.com>
15425
15426 * linux-low.c (linux_wait): Clear all_processes list also.
15427
fa6a77dc
DJ
154282004-03-12 Daniel Jacobowitz <drow@mvista.com>
15429
15430 * linux-low.c: Include <errno.h>. Remove extern declaration of
15431 errno.
15432
6d782a97
DJ
154332004-03-12 Daniel Jacobowitz <drow@mvista.com>
15434
15435 * gdbreplay.c, server.h, utils.c: Update copyright years.
15436
3a7fb99b
DJ
154372004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15438
15439 * server.c (main): Print child status or termination signal from
15440 variable 'signal', not 'sig'.
15441
c3e735a6
DJ
154422004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15443
15444 * linux-low.c (linux_read_memory): Change return type to
15445 int. Check for and return error from ptrace().
15446 * target.c (read_inferior_memory): Change return type to int. Pass
15447 back return status from the_target->read_memory().
15448 * target.h (struct target_ops): Adapt *read_memory() prototype.
15449 Update comment.
15450 (read_inferior_memory): Adapt prototype.
15451 * server.c (main): Return an error packet if
15452 read_inferior_memory() returns an error.
15453
a59d1c82
DJ
154542004-03-04 Daniel Jacobowitz <drow@mvista.com>
15455
15456 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15457 Unify with other clean targets.
15458
dc3f8883
DJ
154592004-02-29 Daniel Jacobowitz <drow@mvista.com>
15460
15461 * server.c (handle_v_cont): Call set_desired_inferior.
15462
89a208da
DJ
154632004-02-29 Daniel Jacobowitz <drow@mvista.com>
15464
15465 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15466
62ea82f5
DJ
154672004-02-29 Daniel Jacobowitz <drow@mvista.com>
15468
15469 * linux-low.c (linux_wait): Unblock async I/O.
15470 (linux_resume): Block and enable async I/O.
15471 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15472 * server.h (block_async_io, unblock_async_io): Add prototypes.
15473
6910d122
DJ
154742004-02-29 Daniel Jacobowitz <drow@mvista.com>
15475
15476 * remote-utils.c (remote_open): Print a status notice after
15477 opening a TCP port.
15478 * server.c (attach_inferior): Print a status notice after
15479 attaching.
15480
154812004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15482
15483 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15484
c89dc5d4
DJ
154852004-02-26 Daniel Jacobowitz <drow@mvista.com>
15486
15487 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15488 error packet.
15489 * server.c, target.h: Update copyright years.
15490
4b8dad4a
RM
154912004-02-25 Roland McGrath <roland@redhat.com>
15492
15493 * target.h (struct target_ops): New member `read_auxv'.
15494 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15495 * linux-low.c (linux_read_auxv): New function.
15496 (linux_target_ops): Initialize `read_auxv' member to that.
15497
d7446758
JB
154982004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15499
15500 Committed by Jim Blandy <jimb@redhat.com>.
15501
15502 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15503 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15504 instead of GPR_SIZE to distiguish s390 and s390x targets.
15505
5544ad89
DJ
155062004-01-31 Daniel Jacobowitz <drow@mvista.com>
15507
15508 * linux-low.c: Update copyright year.
15509 (check_removed_breakpoint): Clear pending_is_breakpoint.
15510 (linux_set_resume_request, linux_queue_one_thread)
15511 (resume_status_pending_p): New functions.
15512 (linux_continue_one_thread): Use process->resume.
15513 (linux_resume): Only resume threads if there are no pending events.
15514 * linux-low.h (struct process_info): Add resume request
15515 pointer.
15516
2a68b70e
DJ
155172004-01-30 Daniel Jacobowitz <drow@mvista.com>
15518
15519 * regcache.c (new_register_cache): Clear the allocated register
15520 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15521
64386c31
DJ
155222003-10-13 Daniel Jacobowitz <drow@mvista.com>
15523
15524 * linux-low.c (linux_resume): Take a struct thread_resume *
15525 argument.
15526 (linux_wait): Update call.
15527 (resume_ptr): New static variable.
15528 (linux_continue_one_thread): Renamed from
15529 linux_continue_one_process. Use resume_ptr.
15530 (linux_resume): Use linux_continue_one_thread.
15531 * server.c (handle_v_cont, handle_v_requests): New functions.
15532 (myresume): New function.
15533 (main): Handle 'v' case.
15534 * target.h (struct thread_resume): New type.
15535 (struct target_ops): Change argument of "resume" to struct
15536 thread_resume *.
15537 (myresume): Delete macro.
15538
c938e9b0
L
155392003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15540
15541 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15542 (uninstall): Support DESTDIR.
15543
7f313d07
BC
15544Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15545
15546 * configure.srv: Add xscale*linux copy of arm*linux entry.
15547
3b2fc2ea
DJ
155482003-07-24 Daniel Jacobowitz <drow@mvista.com>
15549
15550 * linux-arm-low.c (arm_reinsert_addr): New function.
15551 (the_low_target): Add arm_reinsert_addr.
15552
1c0a559e
MK
155532003-07-08 Mark Kettenis <kettenis@gnu.org>
15554
15555 * mem-break.c: Remove whitespace at end of file.
15556
43d5792c
DJ
155572003-06-28 Daniel Jacobowitz <drow@mvista.com>
15558
15559 * configure.in: Check whether we need to prototype strerror.
15560 * server.h: Optionally prototype strerror.
15561 * gdbreplay.c (perror_with_name): Use strerror.
15562 * linux-low.c (linux_attach_lwp): Use strerror.
15563 * utils.c (perror_with_name): Use strerror.
15564 * config.in, configure: Regenerated.
15565
c8a86edf
DJ
155662003-06-28 Daniel Jacobowitz <drow@mvista.com>
15567
15568 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15569 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15570
73d37363
DJ
155712003-06-20 Daniel Jacobowitz <drow@mvista.com>
15572
15573 * Makefile.in (SFILES): Update.
15574 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15575 low-sun3.c: Remove files.
15576
6ad8ae5c
DJ
155772003-06-17 Daniel Jacobowitz <drow@mvista.com>
15578
15579 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15580 (linux_detach_one_process, linux_detach): New functions.
15581 (linux_target_ops): Add linux_detach.
15582 * server.c (main): Handle 'D' packet.
15583 * target.h (struct target_ops): Add "detach" member.
15584 (detach_inferior): Define.
15585
1581182a
MK
155862003-06-13 Mark Kettenis <kettenis@gnu.org>
15587
15588 From Kelley Cook <kelleycook@wideopenwest.com>:
15589 * configure.srv: Accept i[34567]86 variants.
15590
e5379b03
DJ
155912003-06-05 Daniel Jacobowitz <drow@mvista.com>
15592
15593 * linux-low.c (linux_wait_for_event): Correct comment typos.
15594 (linux_resume_one_process): Call check_removed_breakpoint.
15595 (linux_send_signal): New function.
15596 (linux_target_ops): Add linux_send_signal.
15597 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15598 of kill.
15599 * target.h (struct target_ops): Add send_signal.
15600
2ff29de4
JB
156012003-05-29 Jim Blandy <jimb@redhat.com>
15602
15603 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15604 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15605 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15606 away part of the register's value.
15607
254787d4
DJ
156082003-03-26 Daniel Jacobowitz <drow@mvista.com>
15609
15610 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15611 (linux_wait_for_event, linux_init_signals): Likewise.
15612
94e10508
DJ
156132003-03-17 Daniel Jacobowitz <drow@mvista.com>
15614
15615 * configure.in: Check for stdlib.h.
15616 * configure: Regenerated.
15617 * config.in: Regenerated.
15618
4c0711e0
DJ
156192003-01-04 Andreas Schwab <schwab@suse.de>
15620
15621 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15622
ef66e766
AC
156232003-01-02 Andrew Cagney <ac131313@redhat.com>
15624
15625 * Makefile.in: Remove obsolete code.
15626
a1358604
DJ
156272002-11-20 Daniel Jacobowitz <drow@mvista.com>
15628
15629 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15630 defined(PT_FPR0_HI).
15631
23ce3b1c
DJ
156322002-11-17 Stuart Hughes <seh@zee2.com>
15633
15634 * linux-arm-low.c (arm_num_regs): Increase.
15635 (arm_regmap): Include status register.
15636
156372002-11-17 Daniel Jacobowitz <drow@mvista.com>
15638
15639 * linux-low.c (register_addr): Remove incorrect -1 check.
15640
a9fa9f7d
DJ
156412002-08-29 Daniel Jacobowitz <drow@mvista.com>
15642
15643 * linux-low.c (linux_create_inferior): Call setpgid. Return
15644 the new PID.
15645 (unstopped_p, linux_signal_pid): Remove.
15646 (linux_target_ops): Remove linux_signal_pid.
15647 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15648 global instead of target method.
15649 * target.h (struct target_ops): Remove signal_pid. Update comment
15650 for create_inferior.
15651 * server.c (signal_pid): New variable.
15652 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15653 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15654 (attach_inferior): Set signal_pid.
15655
17574093
DJ
156562002-08-23 Daniel Jacobowitz <drow@mvista.com>
15657
15658 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15659
156602002-08-20 Jim Blandy <jimb@redhat.com>
15661
15662 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15663 default for this.
15664
156652002-08-01 Andrew Cagney <cagney@redhat.com>
15666
15667 * Makefile.in: Make chill references obsolete.
15668
156692002-07-24 Kevin Buettner <kevinb@redhat.com>
15670
15671 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15672 * configure: Regenerate.
15673 * config.in: Regenerate.
15674
156752002-07-09 David O'Brien <obrien@FreeBSD.org>
15676
15677 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15678 (perror_with_name, remote_close, remote_open, expect, play): Static.
15679
156802002-07-04 Michal Ludvig <mludvig@suse.cz>
15681
4b8dad4a 15682 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15683 byte offsets instead of an array of indexes.
15684 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15685
156862002-06-13 Daniel Jacobowitz <drow@mvista.com>
15687
15688 * regcache.c: Add comment.
15689
156902002-06-11 Daniel Jacobowitz <drow@mvista.com>
15691
15692 * thread-db.c: New file.
15693 * proc-service.c: New file.
15694 * acinclude.m4: New file.
15695 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15696 proc-service.o, and thread-db.o.
15697 (linux-low.o): Add USE_THREAD_DB.
15698 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15699 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15700 * aclocal.m4: Regenerated.
15701 * config.in: Regenerated.
15702 * configure: Regenerated.
15703 * configure.in: Check for proc_service.h, sys/procfs.h,
15704 thread_db.h, and linux/elf.h headrs.
15705 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15706 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15707 Check for -lthread_db and thread support.
15708 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15709 PowerPC, and SuperH.
15710 * i387-fp.c: Constify arguments.
15711 * i387-fp.h: Likewise.
15712 * inferiors.c: (struct thread_info): Renamed from
15713 `struct inferior_info'. Remove PID member. Use generic inferior
15714 list header. All uses updated.
15715 (inferiors, signal_pid): Removed.
15716 (all_threads): New variable.
15717 (get_thread): Define.
15718 (add_inferior_to_list): New function.
15719 (for_each_inferior): New function.
15720 (change_inferior_id): New function.
15721 (add_inferior): Removed.
15722 (remove_inferior): New function.
15723 (add_thread): New function.
15724 (free_one_thread): New function.
15725 (remove_thread): New function.
15726 (clear_inferiors): Use for_each_inferior and free_one_thread.
15727 (find_inferior): New function.
15728 (find_inferior_id): New function.
15729 (inferior_target_data): Update argument type.
15730 (set_inferior_target_data): Likewise.
15731 (inferior_regcache_data): Likewise.
15732 (set_inferior_regcache_data): Likewise.
15733 * linux-low.c (linux_bp_reinsert): Remove.
15734 (all_processes, stopping_threads, using_thrads)
15735 (struct pending_signals, debug_threads, pid_of): New.
15736 (inferior_pid): Replace with macro.
15737 (struct inferior_linux_data): Remove.
15738 (get_stop_pc, add_process): New functions.
15739 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15740 Use add_process and add_thread.
15741 (linux_attach_lwp): New function, based on old linux_attach. Use
15742 add_process and add_thread. Set stop_expected for new threads.
15743 (linux_attach): New function.
15744 (linux_kill_one_process): New function.
15745 (linux_kill): Kill all LWPs.
15746 (linux_thread_alive): Use find_inferior_id.
15747 (check_removed_breakpoints, status_pending_p): New functions.
15748 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15749 Update. Use WNOHANG. Wait for cloned processes also. Update process
15750 struct for the found process.
15751 (linux_wait_for_event): New function.
15752 (linux_wait): Use it. Support LWPs.
15753 (send_sigstop, wait_for_sigstop, stop_all_processes)
15754 (linux_resume_one_process, linux_continue_one_process): New functions.
15755 (linux_resume): Support LWPs.
15756 (REGISTER_RAW_SIZE): Remove.
15757 (fetch_register): Use register_size instead. Call supply_register.
15758 (usr_store_inferior_registers): Likewise. Call collect_register.
15759 Fix recursive case.
15760 (regsets_fetch_inferior_registers): Improve error message.
15761 (regsets_store_inferior_registers): Add debugging.
15762 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15763 (unstopped_p, linux_signal_pid): New functions.
15764 (linux_target_ops): Add linux_signal_pid.
15765 (linux_init_signals): New function.
15766 (initialize_low): Call it. Initialize using_threads.
15767 * regcache.c (inferior_regcache_data): Add valid
15768 flag.
15769 (get_regcache): Fetch registers lazily. Add fetch argument
15770 and update all callers.
15771 (regcache_invalidate_one, regcache_invalidate): New
15772 functions.
15773 (new_register_cache): Renamed from create_register_cache.
15774 Return the new regcache.
15775 (free_register_cache): Change argument to a void *.
15776 (registers_to_string, registers_from_string): Call get_regcache
15777 with fetch flag set.
15778 (register_data): Make static. Pass fetch flag to get_regcache.
15779 (supply_register): Call get_regcache with fetch flag clear.
15780 (collect_register): Call get_regcache with fetch flag set.
15781 (collect_register_as_string): New function.
15782 * regcache.h: Update.
15783 * remote-utils.c (putpkt): Flush after debug output and use
15784 stderr.
15785 Handle input interrupts while waiting for an ACK.
15786 (input_interrupt): Use signal_pid method.
15787 (getpkt): Flush after debug output and use stderr.
15788 (outreg): Use collect_register_as_string.
15789 (new_thread_notify, dead_thread_notify): New functions.
15790 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15791 and general_thread.
15792 (look_up_one_symbol): Flush after debug output.
15793 * server.c (step_thread, server_waiting): New variables.
15794 (start_inferior): Don't use signal_pid. Update call to mywait.
15795 (attach_inferior): Update call to mywait.
15796 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15797 (main): Don't fetch/store registers explicitly. Use
15798 set_desired_inferior. Support proposed ``Hs'' packet. Update
15799 calls to mywait.
15800 * server.h: Update.
15801 (struct inferior_list, struct_inferior_list_entry): New.
15802 * target.c (set_desired_inferior): New.
15803 (write_inferior_memory): Constify.
15804 (mywait): New function.
15805 * target.h: Update.
15806 (struct target_ops): New signal_pid method.
15807 (mywait): Removed macro, added prototype.
15808
15809 * linux-low.h (regset_func): Removed.
15810 (regset_fill_func, regset_store_func): New.
15811 (enum regset_type): New.
15812 (struct regset_info): Add type field. Use new operation types.
15813 (struct linux_target_ops): stop_pc renamed to get_pc.
15814 Add decr_pc_after_break and breakpoint_at.
15815 (get_process, get_thread_proess, get_process_thread)
15816 (strut process_info, all_processes, linux_attach_lwp)
15817 (thread_db_init): New.
15818
15819 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15820 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15821 (the_low_target): Add new members.
15822 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15823 (i386_store_fpxregset): Constify.
15824 (target_regsets): Add new kind identifier.
15825 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15826 (i386_set_pc): Add debugging.
15827 (i386_breakpoint_at): New function.
15828 (the_low_target): Add new members.
15829 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15830 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15831 (mips_breakpoint_at): New.
15832 (the_low_target): Add new members.
15833 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15834 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15835 (the_low_target): Add new members.
15836 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15837 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15838 (the_low_target): Add new members.
15839 * linux-x86-64-low.c (target_regsets): Add new kind
15840 identifier.
15841
158422002-05-15 Daniel Jacobowitz <drow@mvista.com>
15843
15844 From Martin Pool <mbp@samba.org>:
15845 * server.c (gdbserver_usage): New function.
15846 (main): Call it.
15847
158482002-05-14 Daniel Jacobowitz <drow@mvista.com>
15849
15850 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15851 stop_at -> stop_pc.
15852
158532002-05-04 Andrew Cagney <ac131313@redhat.com>
15854
15855 * Makefile.in: Remove obsolete code.
15856
158572002-04-24 Michal Ludvig <mludvig@suse.cz>
15858
15859 * linux-low.c (regsets_fetch_inferior_registers),
15860 (regsets_store_inferior_registers): Removed cast to int from
15861 ptrace() calls.
15862 * regcache.h: Added declaration of struct inferior_info.
15863
158642002-04-20 Daniel Jacobowitz <drow@mvista.com>
15865
15866 * inferiors.c (struct inferior_info): Add regcache_data.
15867 (add_inferior): Call create_register_cache.
15868 (clear_inferiors): Call free_register_cache.
15869 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15870 * regcache.c (struct inferior_regcache_data): New.
15871 (registers): Remove.
15872 (get_regcache): New function.
15873 (create_register_cache, free_register_cache): New functions.
15874 (set_register_cache): Don't initialize the register cache here.
15875 (registers_to_string, registers_from_string, register_data): Call
15876 get_regcache.
15877 * regcache.h: Add prototypes.
15878 * server.h: Likewise.
15879
158802002-04-20 Daniel Jacobowitz <drow@mvista.com>
15881
15882 * mem-break.c: New file.
15883 * mem-break.h: New file.
15884 * Makefile.in: Add mem-break.o rule; update server.h
15885 dependencies.
15886 * inferiors.c (struct inferior_info): Add target_data
15887 member.
15888 (clear_inferiors): Free target_data member if set.
15889 (inferior_target_data, set_inferior_target_data): New functions.
15890 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15891 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15892 * linux-low.c (linux_bp_reinsert): New variable.
15893 (struct inferior_linux_data): New.
15894 (linux_create_inferior): Use set_inferior_target_data.
15895 (linux_attach): Likewise. Call add_inferior.
15896 (linux_wait_for_one_inferior): New function.
15897 (linux_wait): Call it.
15898 (linux_write_memory): Add const.
15899 (initialize_low): Call set_breakpoint_data.
15900 * linux-low.h (struct linux_target_ops): Add breakpoint
15901 handling members.
15902 * server.c (attach_inferior): Remove extra add_inferior
15903 call.
15904 * server.h: Include mem-break.h. Update inferior.c
15905 prototypes.
15906 * target.c (read_inferior_memory)
15907 (write_inferior_memory): New functions.
15908 * target.h (read_inferior_memory)
15909 (write_inferior_memory): Change macros to prototypes.
15910 (struct target_ops): Update comments. Add const to write_memory
15911 definition.
15912
159132002-04-11 Daniel Jacobowitz <drow@mvista.com>
15914
15915 * linux-low.c (usr_store_inferior_registers): Support
15916 registers which are allowed to fail to store.
15917 * linux-low.h (linux_target_ops): Likewise.
15918 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15919 (ppc_cannot_store_register): FPSCR may not be storable.
15920
159212002-04-09 Daniel Jacobowitz <drow@mvista.com>
15922
15923 * server.h: Include <string.h> if HAVE_STRING_H.
15924 * ChangeLog: Correct paths in last ChangeLog entry.
15925
159262002-04-09 Daniel Jacobowitz <drow@mvista.com>
15927
15928 * linux-low.h: Remove obsolete prototypes.
15929 (struct linux_target_ops): New.
15930 (extern the_low_target): New.
15931 * linux-low.c (num_regs, regmap): Remove declarations.
15932 (register_addr): Use the_low_target explicitly.
15933 (fetch_register): Likewise.
15934 (usr_fetch_inferior_registers): Likewise.
15935 (usr_store_inferior_registers): Likewise.
15936 * linux-arm-low.c (num_regs): Remove.
15937 (arm_num_regs): Define.
15938 (arm_regmap): Renamed from regmap, made static.
15939 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15940 made static.
15941 (arm_cannot_store_register): Renamed from cannot_store_register,
15942 made static.
15943 (the_low_target): New.
15944 * linux-i386-low.c (num_regs): Remove.
15945 (i386_num_regs): Define.
15946 (i386_regmap): Renamed from regmap, made static.
15947 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15948 made static.
15949 (i386_cannot_store_register): Renamed from cannot_store_register,
15950 made static.
15951 (the_low_target): New.
15952 * linux-ia64-low.c (num_regs): Remove.
15953 (ia64_num_regs): Define.
15954 (ia64_regmap): Renamed from regmap, made static.
15955 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15956 made static.
15957 (ia64_cannot_store_register): Renamed from cannot_store_register,
15958 made static.
15959 (the_low_target): New.
15960 * linux-m68k-low.c (num_regs): Remove.
15961 (m68k_num_regs): Define.
15962 (m68k_regmap): Renamed from regmap, made static.
15963 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15964 made static.
15965 (m68k_cannot_store_register): Renamed from cannot_store_register,
15966 made static.
15967 (the_low_target): New.
15968 * linux-mips-low.c (num_regs): Remove.
15969 (mips_num_regs): Define.
15970 (mips_regmap): Renamed from regmap, made static.
15971 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15972 made static.
15973 (mips_cannot_store_register): Renamed from cannot_store_register,
15974 made static.
15975 (the_low_target): New.
15976 * linux-ppc-low.c (num_regs): Remove.
15977 (ppc_num_regs): Define.
15978 (ppc_regmap): Renamed from regmap, made static.
15979 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15980 made static.
15981 (ppc_cannot_store_register): Renamed from cannot_store_register,
15982 made static.
15983 (the_low_target): New.
15984 * linux-s390-low.c (num_regs): Remove.
15985 (s390_num_regs): Define.
15986 (s390_regmap): Renamed from regmap, made static.
15987 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15988 made static.
15989 (s390_cannot_store_register): Renamed from cannot_store_register,
15990 made static.
15991 (the_low_target): New.
15992 * linux-sh-low.c (num_regs): Remove.
15993 (sh_num_regs): Define.
15994 (sh_regmap): Renamed from regmap, made static.
15995 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15996 made static.
15997 (sh_cannot_store_register): Renamed from cannot_store_register,
15998 made static.
15999 (the_low_target): New.
16000 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16001 (the_low_target): New.
16002
160032002-04-09 Daniel Jacobowitz <drow@mvista.com>
16004
16005 * Makefile.in: Add stamp-h target.
16006 * configure.in: Create stamp-h.
16007 * configure: Regenerated.
16008
160092002-04-09 Daniel Jacobowitz <drow@mvista.com>
16010
16011 * inferiors.c: New file.
16012 * target.c: New file.
16013 * target.h: New file.
16014 * Makefile.in: Add target.o and inferiors.o. Update
16015 dependencies.
16016 * linux-low.c (inferior_pid): New static variable,
16017 moved from server.c.
16018 (linux_create_inferior): Renamed from create_inferior.
16019 Call add_inferior. Return 0 on success instead of a PID.
16020 (linux_attach): Renamed from myattach.
16021 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16022 (linux_thread_alive): Renamed from mythread_alive.
16023 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16024 child dies.
16025 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16026 (regsets_store_inferior_registers): Correct error message.
16027 Add missing ``return 0''.
16028 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16029 (linux_store_registers): Renamed from store_inferior_registers.
16030 (linux_read_memory): Renamed from read_inferior_memory.
16031 (linux_write_memory): Renamed from write_inferior_memory.
16032 (linux_target_ops): New structure.
16033 (initialize_low): Call set_target_ops ().
16034 * remote-utils.c (unhexify): New function.
16035 (hexify): New function.
16036 (input_interrupt): Send signals to ``signal_pid''.
16037 * server.c (inferior_pid): Remove.
16038 (start_inferior): Update create_inferior call.
16039 (attach_inferior): Call add_inferior.
16040 (handle_query): New function.
16041 (main): Call handle_query for `q' packets.
16042 * server.h: Include "target.h". Remove obsolete prototypes.
16043 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16044
160452002-04-09 Daniel Jacobowitz <drow@mvista.com>
16046
16047 * Makefile.in: Add WARN_CFLAGS. Update configury
16048 dependencies.
16049 * configure.in: Check for <string.h>
16050 * configure: Regenerate.
16051 * config.in: Regenerate.
16052 * gdbreplay.c: Include needed system headers.
16053 (remote_open): Remove strchr prototype.
16054 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16055 * regcache.c (supply_register): Change buf argument to const void *.
16056 (supply_register_by_name): Likewise.
16057 (collect_register): Change buf argument to void *.
16058 (collect_register_by_name): Likewise.
16059 * regcache.h: Add missing prototypes.
16060 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16061 * server.c (handle_query): New function.
16062 (attached): New static variable, moved out of main.
16063 (main): Quiet longjmp clobber warnings.
16064 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16065 * utils.c (error): Remove NORETURN.
16066 (fatal): Likewise.