Adjust linker test for arm-vxworks in wake of patch for PR 20815.
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
8629c02c
SM
12016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * Makefile.in: Fix whitespace formatting.
4
b593ecca
SM
52016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
6
7 * Makefile.in (SFILES, OBS): Flatten list and order
8 alphabetically.
9
9986ba08
PA
102016-11-23 Pedro Alves <palves@redhat.com>
11
12 * event-loop.c (handle_file_event): Use warning.
13 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
14 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
15 Use warning.
16
4eefa7bc
PA
172016-11-23 Pedro Alves <palves@redhat.com>
18
19 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
20 output.
21 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
22 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
23 debug_printf and debug_flush for debug output.
24 * server.c (handle_general_set): Likewise.
25 * thread-db.c (try_thread_db_load): Use debug_printf for debug
26 output.
27
5443506e
SM
282016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
29
30 * Makefile.in (.c.o): Replace rule with ...
31 (%.o: %.c): ... this one.
32
3b165252
SM
332016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
34
35 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
36 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
37 make.
38 * configure.ac: Remove checks for the make program.
39 * configure: Re-generate.
40
0bcda685
PA
412016-10-28 Pedro Alves <palves@redhat.com>
42
43 * Makefile.in (CXX_DIALECT): Get from configure.
44 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
45 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
46 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
47 * config.in: Regenerate.
48 * configure: Regenerate.
49
c3805894
YQ
502016-10-27 Yao Qi <yao.qi@linaro.org>
51
52 * linux-low.c (linux_supports_range_stepping): Return true if
53 can_software_single_step return true.
54
89342618
YQ
552016-10-27 Yao Qi <yao.qi@linaro.org>
56
57 * inferiors.c (find_inferior_in_random): New function.
58 * inferiors.h (find_inferior_in_random): Declare.
59 * linux-low.c (linux_wait_for_event_filtered): Call
60 find_inferior_in_random instead of find_inferior.
61
e3652c84
YQ
622016-10-27 Yao Qi <yao.qi@linaro.org>
63
64 * linux-low.c (linux_wait_1): If single-step breakpoints are
65 inserted, remove them.
66
5a04c4cf
PA
672016-10-26 Pedro Alves <palves@redhat.com>
68
69 * linux-low.c (handle_extended_wait): Link parent/child fork
70 threads.
71 (linux_wait_1): Unlink them.
72 (linux_set_resume_request): Ignore resume requests for
73 already-resumed and unhandled fork child threads.
74 * linux-low.h (struct lwp_info) <fork_relative>: New field.
75 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
76 New functions.
77 (handle_v_requests) <vCont>: Don't call require_running.
78 * server.h (in_queued_stop_replies): New declaration.
79
cb93dc7f
YQ
802016-10-24 Yao Qi <yao.qi@linaro.org>
81
82 PR server/20733
83 * linux-aarch64-low.c (append_insns): Cast the return value to
84 'uint32_t *'.
85
a1078bea
YQ
862016-10-10 Yao Qi <yao.qi@linaro.org>
87
88 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
89
1fb77080
SDJ
902016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
91
92 * target.c (target_supports_multi_process): New function, moved
93 from...
94 * target.h (target_supports_multi_process): ... here. Remove
95 macro.
96
39b5a3b9
TT
972016-10-05 Tom Tromey <tom@tromey.com>
98
99 PR remote/20655:
100 * tracepoint.c (handle_tracepoint_bkpts): Check
101 ipa_error_tracepoint, not ipa_stopping_tracepoint.
102
c1d0b70a
YQ
1032016-10-05 Yao Qi <yao.qi@linaro.org>
104
105 * configure.srv: Update the path of arm-*.xml files.
106
0a69eedb
YQ
1072016-10-05 Terry Guo <terry.guo@arm.com>
108 Yao Qi <yao.qi@linaro.org>
109
110 * Makefile.in: Adjust the path of rules.
111 * configure.srv: Update the path of xml files.
112 * regformats/arm-with-iwmmxt.dat: Regenerated.
113 * regformats/arm-with-neon.dat: Likewise.
114 * regformats/arm-with-vfpv2.dat: Likewise.
115 * regformats/arm-with-vfpv3.dat Likewise.
116
17e16485
YQ
1172016-09-30 Yao Qi <yao.qi@linaro.org>
118
119 PR gdbserver/20627
120 * target.c (target_stop_and_wait): Don't call
121 target_continue_no_signal, use resume_stop instead.
122
edeeb602
YQ
1232016-09-26 Yao Qi <yao.qi@linaro.org>
124
125 * linux-low.c (linux_wait_1): Call debug_exit.
126
503b1c39
PA
1272016-09-23 Pedro Alves <palves@redhat.com>
128
129 * Makefile.in (SFILES): Add common/new-op.c.
130 (OBS): Add common/new-op.o.
131 (new-op.o): New rule.
132
74172ecf
SM
1332016-09-21 Simon Marchi <simon.marchi@ericsson.com>
134
135 * .gitinore: Ignore more files.
136
fc6cda2e
YQ
1372016-09-21 Yao Qi <yao.qi@linaro.org>
138
139 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
140 23.
141
bc1e6c81
SDJ
1422016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
143
144 * server.c (start_inferior): Call target_mourn_inferior instead of
145 mourn_inferior; pass ptid_t argument to it.
146 (resume): Likewise.
147 (handle_target_event): Likewise.
148 * target.c (target_mourn_inferior): New function.
149 * target.h (mourn_inferior): Delete macro.
150
0e00e962
AA
1512016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
152
153 * linux-low.c (lwp_is_stepping): New function.
154
1d8cb77d
CL
1552016-09-06 Carl Love <cel@us.ibm.com>
156
157 * server.c (start_inferior): Fixed comment, requested comment change
158 didn't get updated correctly. Removed reference to ptrace () call as
159 it is only true on Linux systems.
160
7313bced
CL
1612016-09-06 Carl Love <cel@us.ibm.com>
162
163 * server.c (start_inferior): Do not call
164 function target_post_create_inferior () if the
165 inferior process has already exited.
166
cf6de44d
PA
1672016-09-05 Pedro Alves <palves@redhat.com>
168
169 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
170 (COMPILE.pre, CC_LD): Use CXX directly.
171 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
172 * acinclude.m4: Don't include build-with-cxx.m4.
173 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
174 * configure: Regenerate.
175
c1da6748
AT
1762016-09-02 Akash Trehan <akash.trehan123@gmail.com>
177
178 PR gdb/19495
179 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
180 call writing data to own_buf.
181
f2b9e3df
SDJ
1822016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
183
184 * target.c (mywait): Call target_wait instead of
185 the_target->wait.
186 (target_wait): New function.
187
049a8570
SDJ
1882016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
189
190 * server.c (start_inferior): New variable 'ptid'. Replace calls
191 to the_target->resume by target_continue{,_no_signal}, depending
192 on the case.
193 * target.c (target_stop_and_wait): Call target_continue_no_signal
194 instead of the_target->resume.
195 (target_continue): New function.
196
3aa5cfa0
AT
1972016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
198
199 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
200
754653a7
AZ
2012016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
202
203 PR server/20491
204 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
205 ps_prochandle.
206 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
207 * linux-arm-low.c (ps_get_thread_area): Likewise.
208 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
209 * linux-m68k-low.c (ps_get_thread_area): Likewise.
210 * linux-mips-low.c (ps_get_thread_area): Likewise.
211 * linux-nios2-low.c (ps_get_thread_area): Likewise.
212 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
213 * linux-x86-low.c (ps_get_thread_area): Likewise.
214 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
215
ed036b40
PA
2162016-08-19 Pedro Alves <palves@redhat.com>
217
218 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
219
c8ef42ee
PA
2202016-08-19 Pedro Alves <palves@redhat.com>
221
222 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
223 comment. Use memcpy instead of casting through unsigned long.
224
9c235a72
PA
2252016-08-19 Pedro Alves <palves@redhat.com>
226
227 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
228 allocating around 0x80000000.
229
201506da
PA
2302016-08-19 Pedro Alves <palves@redhat.com>
231
232 PR gdb/20415
233 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
234 (x32-avx512-linux-ipa.o): New rules.
235 * configure.ac (x86_64-*-linux*): New x32 check.
236 * configure.srv (ipa_x32_linux_regobj): New.
237 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
238 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
239 descriptions.
240 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
241 descriptions.
242 * configure: Regenerate.
243
f348d89a
PA
2442016-08-09 Pedro Alves <palves@redhat.com>
245
246 PR gdb/18653
247 * Makefile.in (OBS): Add signals-state-save-restore.o.
248 (signals-state-save-restore.o): New rule.
249 * config.in: Regenerate.
250 * configure: Regenerate.
251 * linux-low.c: Include "signals-state-save-restore.h".
252 (linux_create_inferior): Call
253 restore_original_signals_state.
254 * server.c: Include "dispositions-save-restore.h".
255 (captured_main): Call save_original_signals_state.
256
1baf5149
PA
2572016-08-05 Pedro Alves <palves@redhat.com>
258
259 * configure: Regenerate.
260
fcd4a73d
YQ
2612016-08-04 Yao Qi <yao.qi@linaro.org>
262
263 * linux-low.c (regsets_fetch_inferior_registers): Check
264 errno is ESRCH or not.
265
979659d0
YQ
2662016-08-02 Yao Qi <yao.qi@linaro.org>
267
268 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
269 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
270 (thread_db_load_search): Update.
271 (try_thread_db_load_1): Don't look for td_ta_event_addr,
272 td_ta_set_event and td_ta_event_getmsg.
273
6598661d
PA
2742016-07-26 Pedro Alves <palves@redhat.com>
275
276 PR server/20414
277 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
278 of unsigned long for 64-bit registers and use uint32_t instead of
279 unsigned int for 32-bit registers.
280
9cf12d57
PA
2812016-07-26 Pedro Alves <palves@redhat.com>
282
283 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
284 to 'ptrace'.
285
305450ed
TT
2862016-07-21 Tom Tromey <tom@tromey.com>
287
288 * configure: Rebuild.
289
2583da7c
YQ
2902016-07-21 Yao Qi <yao.qi@linaro.org>
291
292 * mem-break.c (find_gdb_breakpoint): Cast bp to
293 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
294
21536b36
YQ
2952016-07-21 Yao Qi <yao.qi@linaro.org>
296
297 * server.c (handle_v_requests): Support s and S actions
298 if target_supports_software_single_step return true.
299
8901d193
YQ
3002016-07-21 Yao Qi <yao.qi@linaro.org>
301
302 * linux-low.c (resume_stopped_resumed_lwps): If resume request
303 is resume_step, call maybe_hw_step.
304 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
305 and unstop them.
306 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
307 breakpoints or not.
308 (proceed_one_lwp): If resume request is resume_step, install
309 reinsert breakpoints and call maybe_hw_step.
310
0e9a339e
YQ
3112016-07-21 Yao Qi <yao.qi@linaro.org>
312
313 * linux-low.c (proceed_one_lwp): Declare.
314 (linux_resume_one_thread): Remove local variable 'step'.
315 Lift code enqueue signal. Call proceed_one_lwp instead of
316 linux_resume_one_lwp.
317
4281b351
YQ
3182016-07-21 Yao Qi <yao.qi@linaro.org>
319
320 * linux-low.c (linux_resume_one_thread): Call
321 enqueue_pending_signal.
322
984a2c04
YQ
3232016-07-21 Yao Qi <yao.qi@linaro.org>
324
325 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
326 * inferiors.c (do_restore_current_thread_cleanup): New function.
327 (make_cleanup_restore_current_thread): Likewise.
328 * linux-low.c (install_software_single_step_breakpoints): Call
329 make_cleanup_restore_current_thread. Switch current_thread to
330 thread.
331
bec903c9
YQ
3322016-07-21 Yao Qi <yao.qi@linaro.org>
333
334 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
335 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
336 (clone_one_breakpoint): Likewise.
337 (delete_reinsert_breakpoints): Change parameter to thread.
338 Callers updated.
339 (has_reinsert_breakpoints): Likewise.
340 (uninsert_reinsert_breakpoints): Likewise.
341 (reinsert_reinsert_breakpoints): Likewise.
342 * mem-break.h (set_reinsert_breakpoint): Update declaration.
343 (delete_reinsert_breakpoints): Likewise.
344 (reinsert_reinsert_breakpoints): Likewise.
345 (uninsert_reinsert_breakpoints): Likewise.
346 (has_reinsert_breakpoints): Likewise.
347
63c40ec7
YQ
3482016-07-21 Yao Qi <yao.qi@linaro.org>
349
350 * inferiors.c (get_thread_process): Make parameter const.
351 * inferiors.h (get_thread_process): Update declaration.
352 * mem-break.c (clone_all_breakpoints): Remove all parameters.
353 Add new parameters child_thread and parent_thread. Callers
354 updated.
355 * mem-break.h (clone_all_breakpoints): Update declaration.
356
9aa76cd0
YQ
3572016-07-21 Yao Qi <yao.qi@linaro.org>
358
359 * mem-break.c (struct breakpoint) <cond_list>: Remove.
360 <command_list, handler>: Remove.
361 (struct gdb_breakpoint): New.
362 (struct other_breakpoint): New.
363 (struct reinsert_breakpoint): New.
364 (is_gdb_breakpoint): New function.
365 (any_persistent_commands): Update command_list if
366 is_gdb_breakpoint returns true.
367 (set_breakpoint): Create breakpoints according to their types.
368 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
369 (set_gdb_breakpoint_1): Likewise.
370 (set_gdb_breakpoint): Likewise.
371 (clear_breakpoint_conditions): Change parameter type to
372 'struct gdb_breakpoint *'.
373 (clear_breakpoint_commands): Likewise.
374 (clear_breakpoint_conditions_and_commands): Likewise.
375 (add_condition_to_breakpoint): Likewise.
376 (add_breakpoint_condition): Likewise.
377 (add_commands_to_breakpoint): Likewise.
378 (check_breakpoints): Check other_breakpoint.
379 (clone_one_breakpoint): Clone breakpopint according to its type.
380 * mem-break.h (struct gdb_breakpoint): Declare.
381 (set_gdb_breakpoint): Update declaration.
382 (clear_breakpoint_conditions_and_commands): Likewise.
383 (add_breakpoint_condition): Likewise.
384 (add_breakpoint_commands): Likewise.
385 * server.c (process_point_options): Change parameter type to
386 'struct gdb_breakpoint *'.
387
811f8301
YQ
3882016-07-21 Yao Qi <yao.qi@linaro.org>
389
390 * mem-break.c (set_breakpoint_at): Rename it to ...
391 (set_breakpoint_type_at): ... it.
392 (set_breakpoint_at): Call set_breakpoint_type_at.
393 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
394 * mem-break.h (set_breakpoint_at): Update comments.
395
b1c51e36
CLT
3962016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
397
398 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
399 to buf parameter.
400 (nios2_store_gregset): Likewise.
401
ced2dffb
PA
4022016-07-01 Pedro Alves <palves@redhat.com>
403 Antoine Tremblay <antoine.tremblay@ericsson.com>
404
405 * linux-low.c: Change interface to take the target lwp_info
406 pointer directly and return void. Handle detaching from a zombie
407 thread.
408 (linux_detach_lwp_callback): New function.
409 (linux_detach): Detach from the leader thread after detaching from
410 the clone threads.
411
2ac09a5b
YQ
4122016-06-28 Yao Qi <yao.qi@linaro.org>
413
414 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
415 for variable new_offset.
416 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
417 (aarch64_ftrace_insn_reloc_cb): Likewise.
418 (aarch64_ftrace_insn_reloc_tb): Likewise.
419 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
420 PRIx64 instead of PRIx32.
421
79e7fd4f
YQ
4222016-06-28 Yao Qi <yao.qi@linaro.org>
423
424 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
425 (the_low_target): Install arm_get_syscall_trapinfo.
426
061fc021
YQ
4272016-06-28 Yao Qi <yao.qi@linaro.org>
428
429 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
430 function.
431 (the_low_target): Install aarch64_get_syscall_trapinfo.
432
4cc32bec
YQ
4332016-06-28 Yao Qi <yao.qi@linaro.org>
434
435 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
436 Callers updated.
437 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
438 Remove parameter sysno.
439 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
440 sysret.
441
782c1122
AA
4422016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
443
444 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
445 (s390_emit_ne_goto): Likewise.
446 (s390_emit_lt_goto): Likewise.
447 (s390_emit_le_goto): Likewise.
448 (s390_emit_gt_goto): Likewise.
449 (s390_emit_ge_goto): Likewise.
450 (s390x_emit_eq_goto): Likewise.
451 (s390x_emit_ne_goto): Likewise.
452 (s390x_emit_lt_goto): Likewise.
453 (s390x_emit_le_goto): Likewise.
454 (s390x_emit_gt_goto): Likewise.
455 (s390x_emit_ge_goto): Likewise.
456 (s390_emit_ops_impl): Mark variable static.
457 (s390x_emit_ops): Likewise.
458
2e7b624b
YQ
4592016-06-17 Yao Qi <yao.qi@linaro.org>
460
461 * linux-low.c (handle_extended_wait): Call
462 uninsert_reinsert_breakpoints for the parent process. Remove
463 reinsert breakpoints from the child process. Reinsert them to
464 the parent process when vfork is done.
465 * mem-break.c (uninsert_reinsert_breakpoints): New function.
466 (reinsert_reinsert_breakpoints): New function.
467 * mem-break.h (uninsert_reinsert_breakpoints): Declare
468 (reinsert_reinsert_breakpoints): Declare.
469
8a81c5d7
YQ
4702016-06-17 Yao Qi <yao.qi@linaro.org>
471
472 * linux-low.c (handle_extended_wait): If the parent is doing
473 step-over, remove the reinsert breakpoints from the forked child.
474
f50bf8e5
YQ
4752016-06-17 Yao Qi <yao.qi@linaro.org>
476
477 * linux-low.c (unsuspend_all_lwps): Declare.
478 (linux_low_filter_event): If thread exited, call finish_step_over.
479 If step-over is finished, unsuspend other threads.
480
8376a3cb
YQ
4812016-06-17 Yao Qi <yao.qi@linaro.org>
482
483 * linux-low.c (linux_resume_one_lwp_throw): Assert
484 has_reinsert_breakpoints returns false.
485 * mem-break.c (delete_disabled_breakpoints): Assert
486 bp type isn't reinsert_breakpoint.
487
f79b145d
YQ
4882016-06-17 Yao Qi <yao.qi@linaro.org>
489
490 * linux-low.c (maybe_hw_step): New function.
491 (linux_resume_one_lwp_throw): Call maybe_hw_step.
492 (finish_step_over): Switch current_thread to lwp temporarily,
493 and assert has_reinsert_breakpoints returns true.
494 (proceed_one_lwp): Call maybe_hw_step.
495 * mem-break.c (has_reinsert_breakpoints): New function.
496 * mem-break.h (has_reinsert_breakpoints): Declare.
497
0ae534d2
JT
4982016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
499
500 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
501
fcdad592
YQ
5022016-05-17 Yao Qi <yao.qi@linaro.org>
503
504 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
505 instead of find_inferior.
506
9e784964
YQ
5072016-05-05 Yao Qi <yao.qi@linaro.org>
508
509 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
510 Initialize res to zero.
511
cf2ebb6e
YQ
5122016-05-05 Yao Qi <yao.qi@linaro.org>
513
514 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
515 to uint32_t.
516
c1aebf87
UW
5172016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
518
519 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
520 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
521 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
522
35fd2deb 5232016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 524 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
525
526 * tracepoint.c (write_inferior_int8): New function.
527 (cmd_qtenable_disable): Write enable flag using
528 write_inferior_int8.
529
484b3c32
YQ
5302016-04-25 Yao Qi <yao.qi@linaro.org>
531
532 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
533 (need_step_over_p): Return zero if the LWP has pending signals
534 can be delivered on software single step target.
535
85ba7d86
YQ
5362016-04-25 Yao Qi <yao.qi@linaro.org>
537
538 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
539 return instead of error.
540
3539aa13
YQ
5412016-04-22 Yao Qi <yao.qi@linaro.org>
542
543 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
544 to 23.
545
5b061e98
YQ
5462016-04-22 Yao Qi <yao.qi@linaro.org>
547
548 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
549 signal when stepping over breakpoint with software single
550 step.
551
3451269c
PA
5522016-04-21 Pedro Alves <palves@redhat.com>
553
554 * linux-s390-low.c (s390_collect_ptrace_register)
555 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
556 add casts.
557 (s390_check_regset): Use void * instead of gdb_byte *.
558
a2358508
PA
5592016-04-20 Pedro Alves <palves@redhat.com>
560
561 * configure: Renegerate.
562
6885166d
YQ
5632016-04-20 Yao Qi <yao.qi@linaro.org>
564
565 * linux-aarch32-low.c: Include "arch/arm-linux.h".
566 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
567 number 16.
568 (arm_store_gregset): Likewise.
569
2b863f51
WT
5702016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
571
572 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
573 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
574 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
575 (amd64-avx-mpx-linux.c): New rules.
576 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
577 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
578 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
579 (srv_amd64_regobj): Add amd64-avx-mpx.o.
580 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
581 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
582 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
583 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
584 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
585 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
586 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
587 * linux-x86-low.c (x86_linux_read_description): Add case for
588 X86_XSTATE_AVX_MPX_MASK.
589 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
590 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
591 init_registers_i386_avx_mpx_linux.
592 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
593 (initialize_low_tracepoint): Call
594 init_registers_i386_avx_mpx_linux.
595 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
596 (initialize_low_tracepoint): Call
597 init_registers_amd64_avx_mpx_linux.
598 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
599 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
600 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
601 declarations.
602
9b30624b
PA
6032016-04-18 Pedro Alves <palves@redhat.com>
604
605 * configure: Regenerate.
606
45e3745e
AT
6072016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
608
609 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
610 (aarch64_emit_sub): Likewise.
611
2afc13ff
PA
6122016-04-12 Pedro Alves <palves@redhat.com>
613
614 * utils.c (prepare_to_throw_exception): Delete.
615
6e774b13
SM
6162016-04-05 Simon Marchi <simon.marchi@ericsson.com>
617
618 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
619
4dca19f8
MK
6202016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
621
622 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
623
d0a9981f
MK
6242016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
625
626 * linux-aarch64-ipa.c: Add <elf.h> include.
627 * linux-ppc-ipa.c: Add <elf.h> include.
628 * linux-s390-ipa.c: Add <elf.h> include.
629
252db07e
MK
6302016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
631
632 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
633 (get_raw_reg_ptr): Likewise.
634 (get_trace_state_variable_value_ptr): Likewise.
635 (set_trace_state_variable_value_ptr): Likewise.
636 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
637 char *.
638
14e2b6d9
MK
6392016-03-31 Wei-cheng Wang <cole945@gmail.com>
640 Marcin Kościelnicki <koriakin@0x04.net>
641
642 PR/17221
643 * linux-ppc-low.c (emit_insns): New function.
644 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
645 (ppc_emit_prologue): New function.
646 (ppc_emit_epilogue): New function.
647 (ppc_emit_add): New function.
648 (ppc_emit_sub): New function.
649 (ppc_emit_mul): New function.
650 (ppc_emit_lsh): New function.
651 (ppc_emit_rsh_signed): New function.
652 (ppc_emit_rsh_unsigned): New function.
653 (ppc_emit_ext): New function.
654 (ppc_emit_zero_ext): New function.
655 (ppc_emit_log_not): New function.
656 (ppc_emit_bit_and): New function.
657 (ppc_emit_bit_or): New function.
658 (ppc_emit_bit_xor): New function.
659 (ppc_emit_bit_not): New function.
660 (ppc_emit_equal): New function.
661 (ppc_emit_less_signed): New function.
662 (ppc_emit_less_unsigned): New function.
663 (ppc_emit_ref): New function.
664 (ppc_emit_const): New function.
665 (ppc_emit_reg): New function.
666 (ppc_emit_pop): New function.
667 (ppc_emit_stack_flush): New function.
668 (ppc_emit_swap): New function.
669 (ppc_emit_stack_adjust): New function.
670 (ppc_emit_call): New function.
671 (ppc_emit_int_call_1): New function.
672 (ppc_emit_void_call_2): New function.
673 (ppc_emit_if_goto): New function.
674 (ppc_emit_goto): New function.
675 (ppc_emit_eq_goto): New function.
676 (ppc_emit_ne_goto): New function.
677 (ppc_emit_lt_goto): New function.
678 (ppc_emit_le_goto): New function.
679 (ppc_emit_gt_goto): New function.
680 (ppc_emit_ge_goto): New function.
681 (ppc_write_goto_address): New function.
682 (ppc_emit_ops_impl): New static variable.
683 (ppc64v1_emit_prologue): New function.
684 (ppc64v2_emit_prologue): New function.
685 (ppc64_emit_epilogue): New function.
686 (ppc64_emit_add): New function.
687 (ppc64_emit_sub): New function.
688 (ppc64_emit_mul): New function.
689 (ppc64_emit_lsh): New function.
690 (ppc64_emit_rsh_signed): New function.
691 (ppc64_emit_rsh_unsigned): New function.
692 (ppc64_emit_ext): New function.
693 (ppc64_emit_zero_ext): New function.
694 (ppc64_emit_log_not): New function.
695 (ppc64_emit_bit_and): New function.
696 (ppc64_emit_bit_or): New function.
697 (ppc64_emit_bit_xor): New function.
698 (ppc64_emit_bit_not): New function.
699 (ppc64_emit_equal): New function.
700 (ppc64_emit_less_signed): New function.
701 (ppc64_emit_less_unsigned): New function.
702 (ppc64_emit_ref): New function.
703 (ppc64_emit_const): New function.
704 (ppc64v1_emit_reg): New function.
705 (ppc64v2_emit_reg): New function.
706 (ppc64_emit_pop): New function.
707 (ppc64_emit_stack_flush): New function.
708 (ppc64_emit_swap): New function.
709 (ppc64v1_emit_call): New function.
710 (ppc64v2_emit_call): New function.
711 (ppc64v1_emit_int_call_1): New function.
712 (ppc64v2_emit_int_call_1): New function.
713 (ppc64v1_emit_void_call_2): New function.
714 (ppc64v2_emit_void_call_2): New function.
715 (ppc64_emit_if_goto): New function.
716 (ppc64_emit_eq_goto): New function.
717 (ppc64_emit_ne_goto): New function.
718 (ppc64_emit_lt_goto): New function.
719 (ppc64_emit_le_goto): New function.
720 (ppc64_emit_gt_goto): New function.
721 (ppc64_emit_ge_goto): New function.
722 (ppc64v1_emit_ops_impl): New static variable.
723 (ppc64v2_emit_ops_impl): New static variable.
724 (ppc_emit_ops): New function.
725 (linux_low_target): Wire in ppc_emit_ops.
726
a2174ba4
MK
7272016-03-31 Wei-cheng Wang <cole945@gmail.com>
728 Marcin Kościelnicki <koriakin@0x04.net>
729
730 PR/17221
731 * Makefile.in: Add powerpc-*-ipa.o
732 * configure.srv: Add ipa_obj for powerpc*-linux.
733 * linux-ppc-ipa.c: New file.
734 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
735 includes.
736 (PPC_FIELD): New macro.
737 (PPC_SEXT): New macro.
738 (PPC_OP6): New macro.
739 (PPC_BO): New macro.
740 (PPC_LI): New macro.
741 (PPC_BD): New macro.
742 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
743 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
744 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
745 (ppc_get_thread_area): New function.
746 (is_elfv2_inferior): New function.
747 (gen_ds_form): New function.
748 (GEN_STD): New macro.
749 (GEN_STDU): New macro.
750 (GEN_LD): New macro.
751 (GEN_LDU): New macro.
752 (gen_d_form): New function.
753 (GEN_ADDI): New macro.
754 (GEN_ADDIS): New macro.
755 (GEN_LI): New macro.
756 (GEN_LIS): New macro.
757 (GEN_ORI): New macro.
758 (GEN_ORIS): New macro.
759 (GEN_LWZ): New macro.
760 (GEN_STW): New macro.
761 (GEN_STWU): New macro.
762 (gen_xfx_form): New function.
763 (GEN_MFSPR): New macro.
764 (GEN_MTSPR): New macro.
765 (GEN_MFCR): New macro.
766 (GEN_MTCR): New macro.
767 (GEN_SYNC): New macro.
768 (GEN_LWSYNC): New macro.
769 (gen_x_form): New function.
770 (GEN_OR): New macro.
771 (GEN_MR): New macro.
772 (GEN_LWARX): New macro.
773 (GEN_STWCX): New macro.
774 (GEN_CMPW): New macro.
775 (gen_md_form): New function.
776 (GEN_RLDICL): New macro.
777 (GEN_RLDICR): New macro.
778 (gen_i_form): New function.
779 (GEN_B): New macro.
780 (GEN_BL): New macro.
781 (gen_b_form): New function.
782 (GEN_BNE): New macro.
783 (GEN_LOAD): New macro.
784 (GEN_STORE): New macro.
785 (gen_limm): New function.
786 (gen_atomic_xchg): New function.
787 (gen_call): New function.
788 (ppc_relocate_instruction): New function.
789 (ppc_install_fast_tracepoint_jump_pad): New function.
790 (ppc_get_min_fast_tracepoint_insn_len): New function.
791 (ppc_get_ipa_tdesc_idx): New function.
792 (the_low_target): Wire in the new functions.
793 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
794 tdescs.
795 * linux-ppc-tdesc.h: New file.
796
a13c4696
MK
7972016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
798
799 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
800 (alloc_jump_pad_buffer): New function.
801 * linux-amd64-ipa.c: Add <sys/mman.h> include.
802 (alloc_jump_pad_buffer): New function.
803 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
804 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
805 (alloc_jump_pad_buffer): New function.
806 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
807 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
808 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
809 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
810
1cda1512
MK
8112016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
812
813 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
814 * linux-amd64-ipa.c: Likewise.
815 * linux-i386-ipa.c: Likewise.
816 * linux-s390-ipa.c: Likewise.
817 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
818 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
819 set_trace_state_variable_value_ptr.
820 (struct ipa_sym_addresses): Likewise.
821 (symbol_list): Likewise.
822 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
823 accessing gdb_collect directly.
824 (gdb_collect_ptr_type): New typedef.
825 (get_raw_reg_ptr_type): New typedef.
826 (get_trace_state_variable_value_ptr_type): New typedef.
827 (set_trace_state_variable_value_ptr_type): New typedef.
828 (gdb_collect_ptr): New global.
829 (get_raw_reg_ptr): New global.
830 (get_trace_state_variable_value_ptr): New global.
831 (set_trace_state_variable_value_ptr): New global.
832 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
833 accessing get_raw_reg directly.
834 (get_get_tsv_func_addr): Likewise for
835 get_trace_state_variable_value_ptr.
836 (get_set_tsv_func_addr): Likewise for
837 set_trace_state_variable_value_ptr.
838 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
839
72fb5488
SM
8402016-03-30 Simon Marchi <simon.marchi@ericsson.com>
841
842 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
843
28170b88
MK
8442016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
845
846 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
847 packets.
848 (relocate_instruction): Remove own_buf.
849 * server.c (own_buf): Make global.
850 (handle_v_requests): Make global.
851 * server.h (own_buf): New declaration.
852 (handle_v_requests): New prototype.
853
f39e8743
MK
8542016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
855
856 PR 18377
857 * linux-s390-low.c (add_insns): New function.
858 (s390_emit_prologue): New function.
859 (s390_emit_epilogue): New function.
860 (s390_emit_add): New function.
861 (s390_emit_sub): New function.
862 (s390_emit_mul): New function.
863 (s390_emit_lsh): New function.
864 (s390_emit_rsh_signed): New function.
865 (s390_emit_rsh_unsigned): New function.
866 (s390_emit_ext): New function.
867 (s390_emit_log_not): New function.
868 (s390_emit_bit_and): New function.
869 (s390_emit_bit_or): New function.
870 (s390_emit_bit_xor): New function.
871 (s390_emit_bit_not): New function.
872 (s390_emit_equal): New function.
873 (s390_emit_less_signed): New function.
874 (s390_emit_less_unsigned): New function.
875 (s390_emit_ref): New function.
876 (s390_emit_if_goto): New function.
877 (s390_emit_goto): New function.
878 (s390_write_goto_address): New function.
879 (s390_emit_litpool): New function.
880 (s390_emit_const): New function.
881 (s390_emit_call): New function.
882 (s390_emit_reg): New function.
883 (s390_emit_pop): New function.
884 (s390_emit_stack_flush): New function.
885 (s390_emit_zero_ext): New function.
886 (s390_emit_swap): New function.
887 (s390_emit_stack_adjust): New function.
888 (s390_emit_set_r2): New function.
889 (s390_emit_int_call_1): New function.
890 (s390_emit_void_call_2): New function.
891 (s390_emit_eq_goto): New function.
892 (s390_emit_ne_goto): New function.
893 (s390_emit_lt_goto): New function.
894 (s390_emit_le_goto): New function.
895 (s390_emit_gt_goto): New function.
896 (s390_emit_ge_goto): New function.
897 (s390x_emit_prologue): New function.
898 (s390x_emit_epilogue): New function.
899 (s390x_emit_add): New function.
900 (s390x_emit_sub): New function.
901 (s390x_emit_mul): New function.
902 (s390x_emit_lsh): New function.
903 (s390x_emit_rsh_signed): New function.
904 (s390x_emit_rsh_unsigned): New function.
905 (s390x_emit_ext): New function.
906 (s390x_emit_log_not): New function.
907 (s390x_emit_bit_and): New function.
908 (s390x_emit_bit_or): New function.
909 (s390x_emit_bit_xor): New function.
910 (s390x_emit_bit_not): New function.
911 (s390x_emit_equal): New function.
912 (s390x_emit_less_signed): New function.
913 (s390x_emit_less_unsigned): New function.
914 (s390x_emit_ref): New function.
915 (s390x_emit_if_goto): New function.
916 (s390x_emit_const): New function.
917 (s390x_emit_call): New function.
918 (s390x_emit_reg): New function.
919 (s390x_emit_pop): New function.
920 (s390x_emit_stack_flush): New function.
921 (s390x_emit_zero_ext): New function.
922 (s390x_emit_swap): New function.
923 (s390x_emit_stack_adjust): New function.
924 (s390x_emit_int_call_1): New function.
925 (s390x_emit_void_call_2): New function.
926 (s390x_emit_eq_goto): New function.
927 (s390x_emit_ne_goto): New function.
928 (s390x_emit_lt_goto): New function.
929 (s390x_emit_le_goto): New function.
930 (s390x_emit_gt_goto): New function.
931 (s390x_emit_ge_goto): New function.
932 (s390_emit_ops): New function.
933 (struct linux_target_ops): Fill in emit_ops hook.
934
abd9baf9
MK
9352016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
936
937 PR 18377
938 * Makefile.in: Add s390 IPA files.
939 * configure.srv: Build IPA for s390.
940 * linux-s390-ipa.c: New file.
941 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
942 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
943 (tdesc_s390_linux32): Likewise.
944 (init_registers_s390_linux32v1): Likewise.
945 (tdesc_s390_linux32v1): Likewise.
946 (init_registers_s390_linux32v2): Likewise.
947 (tdesc_s390_linux32v2): Likewise.
948 (init_registers_s390_linux64): Likewise.
949 (tdesc_s390_linux64): Likewise.
950 (init_registers_s390_linux64v1): Likewise.
951 (tdesc_s390_linux64v1): Likewise.
952 (init_registers_s390_linux64v2): Likewise.
953 (tdesc_s390_linux64v2): Likewise.
954 (init_registers_s390_te_linux64): Likewise.
955 (tdesc_s390_te_linux64): Likewise.
956 (init_registers_s390_vx_linux64): Likewise.
957 (tdesc_s390_vx_linux64): Likewise.
958 (init_registers_s390_tevx_linux64): Likewise.
959 (tdesc_s390_tevx_linux64): Likewise.
960 (init_registers_s390x_linux64): Likewise.
961 (tdesc_s390x_linux64): Likewise.
962 (init_registers_s390x_linux64v1): Likewise.
963 (tdesc_s390x_linux64v1): Likewise.
964 (init_registers_s390x_linux64v2): Likewise.
965 (tdesc_s390x_linux64v2): Likewise.
966 (init_registers_s390x_te_linux64): Likewise.
967 (tdesc_s390x_te_linux64): Likewise.
968 (init_registers_s390x_vx_linux64): Likewise.
969 (tdesc_s390x_vx_linux64): Likewise.
970 (init_registers_s390x_tevx_linux64): Likewise.
971 (tdesc_s390x_tevx_linux64): Likewise.
972 (have_hwcap_s390_vx): New static variable.
973 (s390_arch_setup): Fill have_hwcap_s390_vx.
974 (s390_get_thread_area): New function.
975 (s390_ft_entry_gpr_esa): New const.
976 (s390_ft_entry_gpr_zarch): New const.
977 (s390_ft_entry_misc): New const.
978 (s390_ft_entry_fr): New const.
979 (s390_ft_entry_vr): New const.
980 (s390_ft_main_31): New const.
981 (s390_ft_main_64): New const.
982 (s390_ft_exit_fr): New const.
983 (s390_ft_exit_vr): New const.
984 (s390_ft_exit_misc): New const.
985 (s390_ft_exit_gpr_esa): New const.
986 (s390_ft_exit_gpr_zarch): New const.
987 (append_insns): New function.
988 (s390_relocate_instruction): New function.
989 (s390_install_fast_tracepoint_jump_pad): New function.
990 (s390_get_min_fast_tracepoint_insn_len): New function.
991 (s390_get_ipa_tdesc_idx): New function.
992 (struct linux_target_ops): Wire in the above functions.
993 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
994 * linux-s390-tdesc.h: New file.
995
a4105d04
MK
9962016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
997
998 * linux-s390-low.c (s390_supports_tracepoints): New function.
999 (struct linux_target_ops): Fill supports_tracepoints hook.
1000
35ac8b3e
YQ
10012016-03-18 Yao Qi <yao.qi@linaro.org>
1002
1003 * linux-low.c (lwp_signal_can_be_delivered): New function.
1004 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1005
94610ec4
YQ
10062016-03-18 Yao Qi <yao.qi@linaro.org>
1007
1008 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1009 0 if signal is enqueued. Remove 'signal' from one debugging
1010 message. Move one debugging message to some lines below.
1011 Remove code setting 'signal' to 0.
1012
80aea927
YQ
10132016-03-18 Yao Qi <yao.qi@linaro.org>
1014
1015 * linux-low.c (linux_low_filter_event): Remove redundant
1016 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1017
b04fd3be
MK
10182016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1019
1020 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1021 (struct linux_target_ops): Wire in the above.
1022
c40c8d4b
YQ
10232016-03-03 Yao Qi <yao.qi@linaro.org>
1024
1025 * linux-low.c: Update comments to start_step_over.
1026
0f8288ae
YQ
10272016-03-03 Yao Qi <yao.qi@linaro.org>
1028
1029 PR server/19736
1030 * linux-low.c (handle_extended_wait): Set child suspended
1031 if event_lwp->bp_reinsert isn't zero.
1032
fdbd04a8
YQ
10332016-03-02 Yao Qi <yao.qi@linaro.org>
1034
1035 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1036 enqueue_pending_signal.
1037
6896a8fa
MK
10382016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1039
1040 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1041 is actually loaded.
1042
ab503087
MK
10432016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1044
1045 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1046 (s390_regmap_3264) [!__s390x__]: New global.
1047 (s390_collect_ptrace_register): Skip map entries containing -1.
1048 (s390_supply_ptrace_register): Ditto.
1049 (s390_fill_gprs_high): New function.
1050 (s390_store_gprs_high): New function.
1051 (s390_regsets): Add NT_S390_HIGH_GPRS.
1052 (s390_get_hwcap): Enable on 31-bit.
1053 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1054 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1055 Detect NT_S390_HIGH_GPRS.
1056 (s390_usrregs_info_3264): Enable on 31-bit.
1057 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1058 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1059
ae91f625
MK
10602016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1061
1062 PR gdb/13808
1063 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1064 * configure.srv: Ditto.
1065 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1066 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1067 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1068 (init_registers_amd64_linux): Remove prototype.
1069 (tdesc_amd64_linux): Remove declaration.
1070 (get_ipa_tdesc): New function.
1071 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1072 initialize remaining tdescs.
1073 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1074 (init_registers_i386_linux): Remove prototype.
1075 (tdesc_i386_linux): Remove declaration.
1076 (get_ipa_tdesc): New function.
1077 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1078 initialize remaining tdescs.
1079 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1080 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1081 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1082 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1083 (x86_get_ipa_tdesc_idx): New function.
1084 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1085 * linux-x86-tdesc.h: New file.
1086 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1087 (target_get_ipa_tdesc_idx): New macro.
1088 * tracepoint.c (ipa_tdesc_idx): New macro.
1089 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1090 (symbol_list): Add ipa_tdesc_idx.
1091 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1092 (ipa_tdesc): Remove.
1093 (ipa_tdesc_idx): New variable.
1094 (get_context_regcache): Use get_ipa_tdesc.
1095 (gdb_collect): Ditto.
1096 (gdb_probe): Ditto.
1097 * tracepoint.h (get_ipa_tdesc): New prototype.
1098 (ipa_tdesc): Remove.
1099
e7ad2f14
PA
11002016-02-24 Pedro Alves <palves@redhat.com>
1101
1102 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1103 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1104 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1105 Factor out common code between the USE_SIGTRAP_SIGINFO and
1106 !USE_SIGTRAP_SIGINFO blocks.
1107 (linux_low_filter_event): Call save_stop_reason instead of
1108 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1109 Update comments.
1110 (linux_wait_1): Update comments.
1111
657f9cde
WW
11122016-02-24 Wei-cheng Wang <cole945@gmail.com>
1113
1114 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1115 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1116 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1117 ppc_insert_point, ppc_remove_point.
1118
b00b61e1
MK
11192016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1120
1121 * linux-s390-low.c (s390_supports_z_point_type): New function.
1122 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1123
553cb527
YQ
11242016-02-16 Yao Qi <yao.qi@linaro.org>
1125
1126 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1127 PC. Get pc from regcache_read_pc.
1128
a5652c21
YQ
11292016-02-12 Yao Qi <yao.qi@linaro.org>
1130
1131 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1132 or linux_get_pc_32bit.
1133 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1134
ed443b61
YQ
11352016-02-12 Yao Qi <yao.qi@linaro.org>
1136
1137 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1138 arm_linux_get_next_pcs_fixup.
1139
020ecd38
MK
11402016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1141
1142 * tracepoint.c (x_tracepoint_action_download): Change
1143 write_inferior_data_ptr to write_inferior_data_pointer.
1144 (cmd_qtstart): Likewise.
1145 (write_inferior_data_ptr): Remove.
1146 (download_agent_expr): Change write_inferior_data_ptr to
1147 write_inferior_data_pointer.
1148 (download_tracepoint_1): Likewise.
1149 (download_tracepoint): Likewise.
1150 (download_trace_state_variables): Likewise.
1151
7cae9051
WW
11522016-02-11 Wei-cheng Wang <cole945@gmail.com>
1153 Marcin Kościelnicki <koriakin@0x04.net>
1154
1155 * tracepoint.c (struct tracepoint_action_ops): Remove.
1156 (struct tracepoint_action): Remove ops.
1157 (m_tracepoint_action_download, r_tracepoint_action_download)
1158 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1159 size and offset accordingly.
1160 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1161 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1162 (tracepoint_action_send, tracepoint_action_download): New functions.
1163 Helpers for trace action handlers.
1164 (add_tracepoint_action): Remove setup actions ops.
1165 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1166
9f6a71b4
YQ
11672016-02-10 Yao Qi <yao.qi@linaro.org>
1168
1169 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1170
1e94266c
SM
11712016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1172
1173 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1174 to AC_OUTPUT.
1175 * configure: Regenerate.
1176
8adce034
SM
11772016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1178
1179 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1180 void * to gdb_byte *.
1181 * linux-low.c (siginfo_fixup): Likewise.
1182 (linux_xfer_siginfo): Likewise.
1183 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1184 Likewise.
1185 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1186
93813b37
WT
11872016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1188
1189 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1190 to srv_tgtobj.
1191 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1192 to srv_tgtobj.
1193 * linux-x86-low.c [__x86_64__]: Include
1194 "nat/amd64-linux-siginfo.h".
1195 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1196 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1197 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1198 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1199 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1200 (cpt_si_fd, si_timerid, si_overrun): Move from
1201 nat/amd64-linux-siginfo.c.
1202 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1203
8424cc97
SM
12042016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1205
1206 * server.c (skip_to_semicolon): Remove.
1207 (process_point_options): Use strchrnul instead of
1208 skip_to_semicolon.
1209
4d18591b
YQ
12102016-01-26 Yao Qi <yao.qi@linaro.org>
1211
1212 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1213 * linux-low.c (install_software_single_step_breakpoints): Don't
1214 call regcache_read_pc.
1215 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1216 argument pc.
1217
d8020970
YQ
12182016-01-26 Yao Qi <yao.qi@linaro.org>
1219
1220 * linux-low.c (install_software_single_step_breakpoints): Call
1221 regcache_read_pc instead of get_pc.
1222
8b207339
YQ
12232016-01-26 Yao Qi <yao.qi@linaro.org>
1224
1225 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1226 (unblock_async_io): Rename to ...
1227 (block_unblock_async_io): ... it. New function.
1228 (enable_async_io): Don't install SIGIO handler. Unblock it
1229 instead.
1230 (disable_async_io): Don't ignore SIGIO. Block it instead.
1231 (initialize_async_io): Install SIGIO handler. Don't call
1232 unblock_async_io.
1233
18879fef
YQ
12342016-01-26 Yao Qi <yao.qi@linaro.org>
1235
1236 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1237 first character is '\003', call *the_target->request_interrupt.
1238
a0f8e08a
YQ
12392016-01-25 Yao Qi <yao.qi@linaro.org>
1240
1241 * remote-utils.c (new_thread_notify): Remove.
1242 (dead_thread_notify): Likewise.
1243 * remote-utils.h (new_thread_notify): Remove declaration.
1244 (dead_thread_notify): Likewise.
1245
cc5fd9ab
MK
12462016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1247
1248 * gdb.trace/pending.exp: Fix expected message on continue.
1249
99e8eb11
MK
12502016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1251
1252 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1253 it works properly on big-endian machines where sizeof (CORE_ADDR)
1254 != sizeof (void *).
1255
a994041d
PA
12562016-01-21 Pedro Alves <palves@redhat.com>
1257
1258 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1259 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1260 * configure: Regenerate.
1261
f7a6a40d
YQ
12622016-01-21 Yao Qi <yao.qi@linaro.org>
1263
1264 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1265 is_thumb and set it according to CPSR saved on the stack.
1266 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1267 arm_sigreturn_next_pc.
1268
6f69e520
YQ
12692016-01-18 Yao Qi <yao.qi@linaro.org>
1270
1271 * linux-low.c (linux_set_pc_64bit): New function.
1272 (linux_get_pc_64bit): New function.
1273 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1274 Declare.
1275 * linux-sparc-low.c (debug_threads): Remove declaration.
1276 (sparc_get_pc): Remove.
1277 (the_low_target): Use linux_get_pc_64bit instead of
1278 sparc_get_pc.
1279 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1280 (the_low_target): Use linux_get_pc_64bit and
1281 linux_set_pc_64bit.
1282
276d4552
YQ
12832016-01-18 Yao Qi <yao.qi@linaro.org>
1284
1285 * linux-arm-low.c (debug_threads): Remove declaration.
1286 (arm_get_pc, arm_set_pc): Remove.
1287 (the_low_target): Use linux_get_pc_32bit and
1288 linux_set_pc_32bit.
1289 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1290 (the_low_target): Use linux_get_pc_32bit and
1291 linux_set_pc_32bit.
1292 * linux-cris-low.c (debug_threads): Remove declaration.
1293 (cris_get_pc, cris_set_pc,): Remove.
1294 (the_low_target): Use linux_get_pc_32bit and
1295 linux_set_pc_32bit.
1296 * linux-crisv32-low.c (debug_threads): Remove declaration.
1297 (cris_get_pc, cris_set_pc): Remove.
1298 (the_low_target): Use linux_get_pc_32bit and
1299 linux_set_pc_32bit.
1300 * linux-low.c: Include inttypes.h.
1301 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1302 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1303 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1304 (the_low_target): Use linux_get_pc_32bit and
1305 linux_set_pc_32bit.
1306 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1307 (the_low_target): Use linux_get_pc_32bit and
1308 linux_set_pc_32bit.
1309 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1310 (the_low_target): Use linux_get_pc_32bit and
1311 linux_set_pc_32bit.
1312 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1313 (the_low_target): Use linux_get_pc_32bit and
1314 linux_set_pc_32bit.
1315 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1316 (the_low_target): Use linux_get_pc_32bit and
1317 linux_set_pc_32bit.
1318
eb0edac8
GB
13192016-01-18 Gary Benson <gbenson@redhat.com>
1320
1321 * configure.ac (AC_FUNC_FORK): New check.
1322 * config.in: Regenerate.
1323 * configure: Likewise.
1324
1b451dda
YQ
13252016-01-14 Yao Qi <yao.qi@linaro.org>
1326
1327 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1328 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1329 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1330 arm_get_next_pcs_ctor.
1331
82075af2
JS
13322016-01-12 Josh Stone <jistone@redhat.com>
1333 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1334
1335 * inferiors.h: Include "gdb_vecs.h".
1336 (struct process_info): Add syscalls_to_catch.
1337 * inferiors.c (remove_process): Free syscalls_to_catch.
1338 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1339 syscall_return stops.
1340 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1341 * server.c (handle_general_set): Handle QCatchSyscalls.
1342 (handle_query): Report support for QCatchSyscalls.
1343 * target.h (struct target_ops): Add supports_catch_syscall.
1344 (target_supports_catch_syscall): New macro.
1345 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1346 (struct lwp_info): Add syscall_state.
1347 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1348 Maintain syscall_state and syscalls_to_catch across exec.
1349 (get_syscall_trapinfo): New function, proxy to the_low_target.
1350 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1351 (linux_low_filter_event): Toggle syscall_state entry/return for
1352 syscall traps, and set it ignored for all others.
1353 (gdb_catching_syscalls_p): New function.
1354 (gdb_catch_this_syscall_p): New function.
1355 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1356 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1357 (linux_supports_catch_syscall): New function.
1358 (linux_target_ops): Install it.
1359 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1360 (the_low_target): Install it.
1361
8f13a3ce
MF
13622016-01-12 Mike Frysinger <vapier@gentoo.org>
1363
1364 * acinclude.m4: Include new ../warning.m4 file.
1365 * configure: Regenerated.
1366 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1367
5b3da067
MF
13682016-01-12 Mike Frysinger <vapier@gentoo.org>
1369
1370 * ax.c (is_goto_target): Mark static.
1371 * linux-low.c (register_addr): Likewise.
1372 (linux_fetch_registers, linux_store_registers): Likewise.
1373 * mem-break.c (any_persistent_commands): Fix old prototype.
1374 (add_commands_to_breakpoint): Mark static.
1375 * regcache.c (find_register_by_name): Delete unused func.
1376 * remote-utils.c (hex_or_minus_one): Mark static.
1377 * server.c (monitor_show_help): Mark static.
1378 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1379 handle_v_requests): Likewise.
1380
bc504a31
PA
13812016-01-12 Pedro Alves <palves@redhat.com>
1382
1383 Remove use of the registered trademark symbol throughout.
1384
5a0dd67a
YQ
13852016-01-08 Yao Qi <yao.qi@linaro.org>
1386
1387 * remote-utils.c (getpkt): If c is '\003', call target hook
1388 request_interrupt.
1389
b2ca446f
YQ
13902016-01-06 Yao Qi <yao.qi@linaro.org>
1391
1392 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1393 linux-aarch32-low.c.
1394 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1395 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1396 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1397 (thumb2_breakpoint): Declare.
1398 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1399 linux-aarch32-low.h.
1400 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1401 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1402 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1403
edd88788
JB
14042016-01-01 Joel Brobecker <brobecker@adacore.com>
1405
1406 * gdbreplay.c (gdbreplay_version): Change copyright year in
1407 version message.
1408 * server.c (gdbserver_version): Likewise.
1409
65da7f14
PP
14102015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1411
1412 * server.c (crc32_table): Delete.
1413 (crc32): Use libiberty's xcrc32 function.
1414
4abd5ed2
JB
14152015-12-22 Joel Brobecker <brobecker@adacore.com>
1416
1417 * lynx-low.c (lynx_delete_thread_callback): New function.
1418 (lynx_mourn): Properly delete our process and all of its
1419 threads. Remove call to clear_inferiors.
1420
0e50fe5c
JB
14212015-12-22 Joel Brobecker <brobecker@adacore.com>
1422
1423 * target.c (thread_search_callback): Add check that
1424 the thread_stopped target callback is not NULL before
1425 calling it.
1426
35adc03f
YQ
14272015-12-21 Yao Qi <yao.qi@linaro.org>
1428
1429 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1430 arm breakpoint.
1431
bd2b2909
AT
14322015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1433
1434 * server.c (handle_query): Call target_supports_software_single_step.
1435
7fe5e27e
AT
14362015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1437
1438 * linux-low.c (single_step): New function.
1439 (linux_resume_one_lwp_throw): Call single_step.
1440 (start_step_over): Likewise.
1441
d9311bfa
AT
14422015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1443
1444 * Makefile.in (SFILES): Append arch/arm-linux.c,
1445 arch/arm-get-next-pcs.c.
1446 (arm-linux.o): New rule.
1447 (arm-get-next-pcs.o): New rule.
1448 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1449 arm-linux.o.
1450 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1451 to linux-aarch32-low.c.
1452 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1453 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1454 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1455 (thumb2_breakpoint_len): Likewise.
1456 (arm_is_thumb_mode): Make non-static.
1457 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1458 from linux-aarch32-low.c.
1459 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1460 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1461 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1462 (thumb2_breakpoint_len): Likewise.
1463 (arm_is_thumb_mode): New declaration.
1464 * linux-arm-low.c: Include arch/arm-linux.h
1465 aarch/arm-get-next-pcs.h, sys/syscall.h.
1466 (get_next_pcs_ops): New struct.
1467 (get_next_pcs_addr_bits_remove): New function.
1468 (get_next_pcs_is_thumb): New function.
1469 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1470 (arm_sigreturn_next_pc): Likewise.
1471 (get_next_pcs_syscall_next_pc): Likewise.
1472 (arm_gdbserver_get_next_pcs): Likewise.
1473 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1474 Initialize.
1475 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1476 * server.h: Include gdb_vecs.h.
1477
68ce2059
AT
14782015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1479
1480 * Makefile.in (SFILES): Append common/common-regcache.c.
1481 (OBS): Append common-regcache.o.
1482 (common-regcache.o): New rule.
1483 * regcache.c (init_register_cache): Initialize cache to
1484 REG_UNAVAILABLE.
1485 (regcache_raw_read_unsigned): New function.
1486 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1487 register_status enum.
1488
fa5308bd
AT
14892015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1490
1491 * linux-aarch64-low.c (the_low_targets): Rename
1492 breakpoint_reinsert_addr to get_next_pcs.
1493 * linux-arm-low.c (the_low_targets): Likewise.
1494 * linux-bfin-low.c (the_low_targets): Likewise.
1495 * linux-cris-low.c (the_low_targets): Likewise.
1496 * linux-crisv32-low.c (the_low_targets): Likewise.
1497 * linux-low.c (can_software_single_step): Likewise.
1498 (install_software_single_step_breakpoints): New function.
1499 (start_step_over): Use install_software_single_step_breakpoints.
1500 * linux-low.h: New CORE_ADDR vector.
1501 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1502 get_next_pcs.
1503 * linux-mips-low.c (the_low_targets): Likewise.
1504 * linux-nios2-low.c (the_low_targets): Likewise.
1505 * linux-sparc-low.c (the_low_targets): Likewise.
1506
4a6ed09b
PA
15072015-12-17 Pedro Alves <palves@redhat.com>
1508
1509 * linux-low.c (linux_kill_one_lwp): Remove references to
1510 LinuxThreads.
1511 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1512 to 'kill'.
1513 (linux_init_signals): Delete.
1514 (initialize_low): Adjust.
1515 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1516
7544db95
PA
15172015-12-16 Pedro Alves <palves@redhat.com>
1518
1519 * configure.ac (compiler warning flags): When testing a
1520 -Wno-foo option, check whether -Wfoo works instead.
1521 * configure: Regenerate.
1522
8020350c
DB
15232015-12-11 Don Breazeal <donb@codesourcery.com>
1524
1525 * server.c (process_serial_event): Don't exit from gdbserver
1526 in remote mode if there are still active inferiors.
1527
db91f502
YQ
15282015-12-11 Yao Qi <yao.qi@linaro.org>
1529
1530 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1531 arm_breakpoint_at if the process is 32-bit.
1532
b37a6290
YQ
15332015-12-11 Yao Qi <yao.qi@linaro.org>
1534
1535 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1536 arm breakpoint.
1537
17b1509a
YQ
15382015-12-07 Yao Qi <yao.qi@linaro.org>
1539
1540 * configure.srv: Append arm.o to srv_tgtobj for
1541 aarch64*-*-linux* target.
1542 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1543 from linux-arm-low.c.
1544 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1545 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1546 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1547 (thumb2_breakpoint_len): Likewise.
1548 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1549 (arm_breakpoint_kinds): Likewise.
1550 (arm_breakpoint_kind_from_pc): Likewise.
1551 (arm_sw_breakpoint_from_kind): Likewise.
1552 (arm_breakpoint_kind_from_current_state): Likewise.
1553 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1554 (arm_sw_breakpoint_from_kind): Declare.
1555 (arm_breakpoint_kind_from_current_state): Declare.
1556 (arm_breakpoint_at): Declare.
1557 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1558 arm_sw_breakpoint_from_kind if process is 32-bit.
1559 (aarch64_breakpoint_kind_from_pc): New function.
1560 (aarch64_breakpoint_kind_from_current_state): New function.
1561 (the_low_target): Initialize fields breakpoint_kind_from_pc
1562 and breakpoint_kind_from_current_state.
1563 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1564 linux-aarch32-low.c.
1565 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1566 (arm_breakpoint, arm_breakpoint_len): Likewise.
1567 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1568 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1569 (arm_is_thumb_mode): Likewise.
1570 (arm_breakpoint_at): Likewise.
1571 (arm_breakpoint_kind_from_pc): Likewise.
1572 (arm_sw_breakpoint_from_kind): Likewise.
1573 (arm_breakpoint_kind_from_current_state): Likewise.
1574
1575 Revert:
1576 2015-08-04 Yao Qi <yao.qi@linaro.org>
1577
1578 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1579 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1580 * server.c (extended_protocol): Remove "static".
1581 * server.h (extended_protocol): Declare it.
1582
ece66d65
JS
15832015-12-04 Josh Stone <jistone@redhat.com>
1584
1585 * target.h (struct target_ops) <arch_setup>: Rename to ...
1586 (struct target_ops) <post_create_inferior>: ... this.
1587 (target_arch_setup): Rename to ...
1588 (target_post_create_inferior): ... this, calling post_create_inferior.
1589 * server.c (start_inferior): Update target_arch_setup calls to
1590 target_post_create_inferior.
1591 * linux-low.c (linux_low_ptrace_options): Forward declare.
1592 (linux_arch_setup): Update its comment for general use.
1593 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1594 (struct linux_target_ops): Use linux_post_create_inferior.
1595 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1596 to post_create_inferior.
1597 * nto-low.c (struct nto_target_ops): Likewise.
1598 * spu-low.c (struct spu_target_ops): Likewise.
1599 * win32-low.c (struct win32_target_ops): Likewise.
1600
e58c48b4
AT
16012015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1602
1603 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1604
fbec8956
AT
16052015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1606
1607 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1608 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1609 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1610 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1611 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1612 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1613 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1614 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1615 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1616 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1617 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1618 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1619
9b4c5f87
AT
16202015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1621
1622 * linux-low.c (linux_look_up_symbols): Don't call
1623 linux_supports_traceclone.
1624 * linux-low.h (thread_db_init): Remove use_events argument.
1625 * thread-db.c (thread_db_use_event): Remove global variable.
1626 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1627 (struct thread_db) <td_create_bp>: Remove field.
1628 (thread_db_create_event): Remove function.
1629 (thread_db_enable_reporting): Likewise.
1630 (find_one_thread): Don't check for thread_db_use_events.
1631 (attach_thread): Likewise.
1632 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1633 (try_thread_db_load_1): Don't check for thread_db_use_events.
1634 (thread_db_init): Remove use_events argument and thread events
1635 handling.
1636 (remove_thread_event_breakpoints): Remove function.
1637 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1638
7d00775e
AT
16392015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1640
1641 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1642 New function.
1643 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1644 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1645 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1646 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1647 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1648 Initialize.
1649 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1650 New function.
1651 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1652 * linux-low.c (can_hardware_single_step): Use
1653 supports_hardware_single_step.
1654 (can_software_single_step): New function.
1655 (start_step_over): Call can_software_single_step.
1656 (linux_supports_hardware_single_step): New function.
1657 (struct target_ops) <supports_software_single_step>: Initialize.
1658 * linux-low.h (struct linux_target_ops)
1659 <supports_hardware_single_step>: Initialize.
1660 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1661 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1662 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1663 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1664 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1665 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1666 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1667 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1668 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1669 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1670 Initialize.
1671 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1672 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1673 Initialize.
1674 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1675 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1676 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1677 New function.
1678 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1679 * target.h (struct target_ops): <supports_software_single_step>:
1680 New field.
1681 (target_supports_software_single_step): New macro.
1682
2d97cd35
AT
16832015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1684
1685 * linux-low.c (linux_wait_1): Fix pc advance condition.
1686 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1687 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1688
769ef81f
AT
16892015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1690
1691 * linux-arm-low.c (arm_is_thumb_mode): New function.
1692 (arm_breakpoint_at): Use arm_is_thumb_mode.
1693 (arm_breakpoint_kind_from_current_state): New function.
1694 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1695 Initialize.
1696 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1697 (linux_breakpoint_kind_from_current_state): New function.
1698 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1699 * linux-low.h (struct linux_target_ops)
1700 <breakpoint_kind_from_current_state>: New field.
1701 * target.h (struct target_ops): Likewise.
1702 (target_breakpoint_kind_from_current_state): New macro.
1703
1bebeeca
PA
17042015-11-30 Pedro Alves <palves@redhat.com>
1705
1706 * linux-low.c (linux_resume): Wake up the event loop before
1707 returning.
1708
a67a9fae
PA
17092015-11-30 Pedro Alves <palves@redhat.com>
1710
1711 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1712 check.
1713 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1714 to -1.
1715 * target.c (struct thread_search): New structure.
1716 (thread_search_callback): New function.
1717 (prev_general_thread): New global.
1718 (prepare_to_access_memory, done_accessing_memory): New functions.
1719 * target.h (prepare_to_access_memory, done_accessing_memory):
1720 Replace macros with function declarations.
1721
f2faf941
PA
17222015-11-30 Pedro Alves <palves@redhat.com>
1723
1724 PR 14618
1725 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1726 report TARGET_WAITKIND_NO_RESUMED.
1727 * remote-utils.c (prepare_resume_reply): Handle
1728 TARGET_WAITKIND_NO_RESUMED.
1729 * server.c (report_no_resumed): New global.
1730 (handle_query) <qSupported>: Handle "no-resumed+". Report
1731 "no-resumed+" support.
1732 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1733 return error if the client doesn't support no-resumed events.
1734 (push_stop_notification): New function.
1735 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1736 events if the client supports them.
1737
a681f9c9
PA
17382015-11-30 Pedro Alves <palves@redhat.com>
1739
1740 * linux-low.c (thread_still_has_status_pending_p): Don't check
1741 vCont;t here.
1742 (lwp_resumed): New function.
1743 (status_pending_p_callback): Return early if the LWP is not
1744 supposed to be resumed.
1745
65706a29
PA
17462015-11-30 Pedro Alves <palves@redhat.com>
1747
1748 * linux-low.c (handle_extended_wait): Assert that the LWP's
1749 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1750 thread create events, leave the new child's status pending.
1751 (linux_low_filter_event): If GDB wants to hear about thread exit
1752 events, leave the LWP marked dead and don't delete it.
1753 (linux_wait_for_event_filtered): Don't check for thread exit.
1754 (filter_exit_event): New function.
1755 (linux_wait_1): Use it, when returning an exit event.
1756 (linux_resume_one_lwp_throw): Assert that the LWP's
1757 waitstatus is TARGET_WAITKIND_IGNORE.
1758 * remote-utils.c (prepare_resume_reply): Handle
1759 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1760 * server.c (report_thread_events): New global.
1761 (handle_general_set): Handle QThreadEvents.
1762 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1763 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1764 TARGET_WAITKIND_THREAD_EXITED.
1765 * server.h (report_thread_events): Declare.
1766
56cf4bed
PA
17672015-11-30 Pedro Alves <palves@redhat.com>
1768
1769 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1770 the thread's last_resume_kind was resume_stop.
1771
500c1d85
PA
17722015-11-30 Pedro Alves <palves@redhat.com>
1773
1774 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1775 before returning.
1776
de979965
PA
17772015-11-30 Pedro Alves <palves@redhat.com>
1778
1779 * server.c (handle_v_requests): Handle vCtrlC.
1780
34c65914
PA
17812015-11-30 Pedro Alves <palves@redhat.com>
1782
1783 * gdbthread.h (find_any_thread_of_pid): Declare.
1784 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1785 functions.
1786 * server.c (handle_query): If current_thread is NULL, look for
1787 another thread of the selected process.
1788
79efa585 17892015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 1790 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
1791
1792 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1793 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1794 name in reply.
1795 * target.h (struct target_ops) <thread_name>: New field.
1796 (target_thread_name): New macro.
1797
80d82c19
JB
17982015-11-23 Joel Brobecker <brobecker@adacore.com>
1799
1800 * regcache.h (regcache_invalidate_pid): Add declaration.
1801 * regcache.c (regcache_invalidate_pid): New function, extracted
1802 from regcache_invalidate.
1803 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1804 Add trivial documentation comment.
1805 * lynx-low.c: Use regcache_invalidate_pid instead of
1806 regcache_invalidate.
1807
64da5dd5
JB
18082015-11-23 Joel Brobecker <brobecker@adacore.com>
1809
1810 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1811 and Elf64_auxv_t if the target is Android.
1812
37ce4055
DE
18132015-11-22 Doug Evans <xdje42@gmail.com>
1814
1815 * target.h: #include <sys/types.h>.
1816
06e03fff
PA
18172015-11-19 Pedro Alves <palves@redhat.com>
1818
1819 * linux-low.c (linux_process_qsupported): Change prototype.
1820 Adjust.
1821 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1822 Change prototype.
1823 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1824 and adjust to loop over all features.
1825 * server.c (handle_query) <qSupported>: Adjust to call
1826 target_process_qsupported once, passing it a vector of unprocessed
1827 features.
1828 * target.h (struct target_ops) <process_qsupported>: Change
1829 prototype.
1830 (target_process_qsupported): Adjust.
1831
9a084706
PA
18322015-11-19 Pedro Alves <palves@redhat.com>
1833
1834 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1835 mode.
1836 * configure: Regenerate.
1837
dad44a1f
PA
18382015-11-19 Pedro Alves <palves@redhat.com>
1839
1840 * configure: Regenerate.
1841
231c0592
YQ
18422015-11-19 Yao Qi <yao.qi@linaro.org>
1843
1844 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1845 type to uint32_t.
1846
6c1c9a8b
YQ
18472015-11-19 Yao Qi <yao.qi@linaro.org>
1848
1849 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1850 (struct aarch64_operand): Move enum out.
1851
9caa3311
YQ
18522015-11-19 Yao Qi <yao.qi@linaro.org>
1853
1854 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1855 struct user_fpsimd_state *.
1856 (aarch64_store_fpregset): Likewise.
1857
6a69a054
YQ
18582015-11-19 Yao Qi <yao.qi@linaro.org>
1859
1860 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1861 struct user_pt_regs *.
1862 (aarch64_store_gregset): Likewise.
1863
1798301e
PA
18642015-11-18 Pedro Alves <palves@redhat.com>
1865
1866 * Makefile.in (all_object_files): Add $IPA_OBJS.
1867
ce7715e2
PA
18682015-11-17 Pedro Alves <palves@redhat.com>
1869
1870 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1871 GDB_SIGNAL_0 and gdb_signal_to_string.
1872
c0879059
PA
18732015-11-17 Pedro Alves <palves@redhat.com>
1874
1875 * win32-low.c (handle_output_debug_string): Remove parameter.
1876 (win32_kill): Remove our_status local and adjust call to
1877 handle_output_debug_string.
1878 (get_child_debug_event): Adjust call to
1879 handle_output_debug_string.
1880
1996e237
SM
18812015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1882
1883 * linux-mips-low.c (mips_fill_gregset): Add cast.
1884 (mips_store_gregset): Likewise.
1885 (mips_fill_fpregset): Likewise.
1886 (mips_store_fpregset): Likewise.
1887
cbec665b
SM
18882015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1889
1890 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1891 priv.
1892
eb3e3c67
SM
18932015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1894
1895 * linux-mips-low.c (mips_linux_new_thread): Change type of
1896 watch_type to enum target_hw_bp_type.
1897
171de4b8
SM
18982015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1899
1900 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1901 Change return type to arm_hwbp_type.
1902
04248ead
SM
19032015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1904
1905 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1906 (arm_store_gregset): Likewise.
1907 * linux-arm-low.c (arm_get_hwcap): Likewise.
1908 (arm_read_description): Likewise.
1909
04b3479c
SM
19102015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1911
1912 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1913
2bc84e8a
SM
19142015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1915
1916 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1917 (ppc_fill_vsxregset): Likewise.
1918 (ppc_store_vsxregset): Likewise.
1919 (ppc_fill_vrregset): Likewise.
1920 (ppc_store_vrregset): Likewise.
1921 (ppc_fill_evrregset): Likewise.
1922 (ppc_store_evrregset): Likewise.
1923
e6c5bb05
SM
19242015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1925
1926 * linux-ppc-low.c (ppc_usrregs_info): Remove
1927 forward-declaration.
1928 (ppc_arch_setup): Move lower in file.
1929
7ea45d72
SM
19302015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1931
1932 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1933 (ps_pdwrite): Likewise.
1934
69291610
HW
19352015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1936
1937 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1938 to after assert checks.
1939
b42945fd
SM
19402015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1941
1942 * proc-service.c (ps_pdread): Add/adjust casts.
1943 (ps_pdwrite): Add/adjust casts.
1944
d6f85c84
SM
19452015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1946
1947 * server.c (handle_search_memory_1): Cast return value of
1948 memmem.
1949
f98cd059
SM
19502015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1951
1952 * server.c (write_qxfer_response): Change type of data to
1953 gdb_byte *.
1954
d2412fa5
PA
19552015-10-29 Pedro Alves <palves@redhat.com>
1956
1957 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1958
c17414a2
PA
19592015-10-29 Pedro Alves <palves@redhat.com>
1960
1961 * tracepoint.c (clear_installed_tracepoints): Add casts.
1962
e053fbc4
PA
19632015-10-29 Pedro Alves <palves@redhat.com>
1964
1965 * server.c (handle_v_cont, process_serial_event): Add enum
1966 gdb_signal casts to signal parsing code.
1967
add67df8
PA
19682015-10-29 Pedro Alves <palves@redhat.com>
1969
1970 * linux-low.h (NULL_REGSET): Define.
1971 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1972 * linux-arm-low.c (arm_regsets): Likewise.
1973 * linux-crisv32-low.c (cris_regsets): Likewise.
1974 * linux-m68k-low.c (m68k_regsets): Likewise.
1975 * linux-mips-low.c (mips_regsets): Likewise.
1976 * linux-nios2-low.c (nios2_regsets): Likewise.
1977 * linux-ppc-low.c (ppc_regsets): Likewise.
1978 * linux-s390-low.c (s390_regsets): Likewise.
1979 * linux-sh-low.c (sh_regsets): Likewise.
1980 * linux-sparc-low.c (sparc_regsets): Likewise.
1981 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1982 * linux-tile-low.c (tile_regsets): Likewise.
1983 * linux-x86-low.c (x86_regsets): Likewise.
1984 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1985
50bc912a
PA
19862015-10-29 Pedro Alves <palves@redhat.com>
1987
1988 * linux-low.h (NULL_REGSET): Define.
1989 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1990 * linux-arm-low.c (arm_regsets): Likewise.
1991 * linux-crisv32-low.c (cris_regsets): Likewise.
1992 * linux-m68k-low.c (m68k_regsets): Likewise.
1993 * linux-mips-low.c (mips_regsets): Likewise.
1994 * linux-nios2-low.c (nios2_regsets): Likewise.
1995 * linux-ppc-low.c (ppc_regsets): Likewise.
1996 * linux-s390-low.c (s390_regsets): Likewise.
1997 * linux-sh-low.c (sh_regsets): Likewise.
1998 * linux-sparc-low.c (sparc_regsets): Likewise.
1999 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2000 * linux-tile-low.c (tile_regsets): Likewise.
2001 * linux-x86-low.c (x86_regsets): Likewise.
2002 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2003
682b2546
DE
20042015-10-26 Doug Evans <dje@google.com>
2005
2006 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2007
963843d4
DE
20082015-10-26 Doug Evans <dje@google.com>
2009
2010 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2011
d41401ac
DE
20122015-10-26 Doug Evans <dje@google.com>
2013
2014 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2015 for debug_printf.
2016 (attach_thread, find_new_threads_callback): Ditto.
2017
3db28855
AT
20182015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2019
2020 * mem-break.h (set_breakpoint_data): Remove.
2021
fb78e89c
AT
20222015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2023
2024 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2025 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2026 (initialize_low): Remove set_breakpoint_data call.
2027 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2028 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2029 (initialize_low): Remove set_breakpoint_data call.
2030 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2031 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2032 (initialize_low): Remove set_breakpoint_data call.
2033
2e6ee069
AT
20342015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2035
2036 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2037 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2038 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2039 * target.h (target_breakpoint_kind_from_pc): New macro.
2040
1652a986
AT
20412015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2042
2043 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2044 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2045 the default breakpoint kind.
2046
abeead09
AT
20472015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2048
2049 * linux-arm-low.c (arm_supports_z_point_type): Add software
2050 breakpoint support.
2051
b0b4b501
AT
20522015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2053
2054 * linux-arm-low.c: Refactor breakpoint definitions.
2055 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2056 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2057
8689682c
AT
20582015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2059
2060 * Makefile.in: Add arm.c/o.
2061 * configure.srv: Likewise.
2062 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2063 (arm_breakpoint_kind_from_pc): New function.
2064 (arm_sw_breakpoint_from_kind): Return proper kind.
2065 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2066
27165294
AT
20672015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2068
2069 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2070 removal.
2071 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2072 (struct raw_breakpoint) <size>: Remove.
2073 (struct raw_breakpoint) <kind>: Add.
2074 (bp_size): New function.
2075 (bp_opcode): Likewise.
2076 (find_raw_breakpoint_at): Adjust for kind.
2077 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2078 (remove_memory_breakpoint): Adjust for kind call bp_size.
2079 (set_raw_breakpoint_at): Adjust for kind.
2080 (set_breakpoint): Likewise.
2081 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2082 (delete_raw_breakpoint): Adjust for kind.
2083 (delete_breakpoint): Likewise.
2084 (find_gdb_breakpoint): Likewise.
2085 (set_gdb_breakpoint_1): Likewise.
2086 (set_gdb_breakpoint): Likewise.
2087 (delete_gdb_breakpoint_1): Likewise.
2088 (delete_gdb_breakpoint): Likewise.
2089 (uninsert_raw_breakpoint): Likewise.
2090 (reinsert_raw_breakpoint): Likewise.
2091 (set_breakpoint_data): Remove.
2092 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2093 (check_mem_read): Adjust for kind call bp_size.
2094 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2095 (clone_one_breakpoint): Adjust for kind.
2096 * mem-break.h (set_gdb_breakpoint): Likewise.
2097 (delete_gdb_breakpoint): Likewise.
2098 * server.c (process_serial_event): Likewise.
2099
dd373349
AT
21002015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2101
2102 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2103 (struct linux_target_ops) <breakpoint>: Remove.
2104 (struct linux_target_ops) <breakpoint_len>: Remove.
2105 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2106 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2107 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2108 (arm_sw_breakpoint_from_kind): New function.
2109 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2110 (struct linux_target_ops) <breakpoint>: Remove.
2111 (struct linux_target_ops) <breakpoint_len>: Remove.
2112 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2113 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2114 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2115 (struct linux_target_ops) <breakpoint>: Remove.
2116 (struct linux_target_ops) <breakpoint_len>: Remove.
2117 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2118 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2119 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2120 (struct linux_target_ops) <breakpoint>: Remove.
2121 (struct linux_target_ops) <breakpoint_len>: Remove.
2122 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2123 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2124 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2125 and sw_breakpoint_from_kind to increment the pc.
2126 (linux_breakpoint_kind_from_pc): New function.
2127 (linux_sw_breakpoint_from_kind): New function.
2128 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2129 (initialize_low): Call breakpoint_kind_from_pc and
2130 sw_breakpoint_from_kind to replace breakpoint_data/len.
2131 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2132 New field.
2133 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2134 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2135 (struct linux_target_ops) <breakpoint>: Remove.
2136 (struct linux_target_ops) <breakpoint_len>: Remove.
2137 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2138 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2139 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2140 (struct linux_target_ops) <breakpoint>: Remove.
2141 (struct linux_target_ops) <breakpoint_len>: Remove.
2142 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2143 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2144 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2145 (struct linux_target_ops) <breakpoint>: Remove.
2146 (struct linux_target_ops) <breakpoint_len>: Remove.
2147 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2148 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2149 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2150 (struct linux_target_ops) <breakpoint>: Remove.
2151 (struct linux_target_ops) <breakpoint_len>: Remove.
2152 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2153 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2154 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2155 (struct linux_target_ops) <breakpoint>: Remove.
2156 (struct linux_target_ops) <breakpoint_len>: Remove.
2157 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2158 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2159 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2160 (struct linux_target_ops) <breakpoint>: Remove.
2161 (struct linux_target_ops) <breakpoint_len>: Remove.
2162 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2163 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2164 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2165 (struct linux_target_ops) <breakpoint>: Remove.
2166 (struct linux_target_ops) <breakpoint_len>: Remove.
2167 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2168 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2169 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2170 (struct linux_target_ops) <breakpoint>: Remove.
2171 (struct linux_target_ops) <breakpoint_len>: Remove.
2172 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2173 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2174 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2175 (struct linux_target_ops) <breakpoint>: Remove.
2176 (struct linux_target_ops) <breakpoint_len>: Remove.
2177 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2178 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2179 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2180 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2181 (struct linux_target_ops) <breakpoint>: Remove.
2182 (struct linux_target_ops) <breakpoint_len>: Remove.
2183 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2184 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2185 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2186 (struct linux_target_ops) <breakpoint>: Remove.
2187 (struct linux_target_ops) <breakpoint_len>: Remove.
2188 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2189 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2190
4cd98a19
AT
21912015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2192
2193 * linux-cris-low.c (cris_get_pc): Remove void arg.
2194
774ee6d2
AR
21952015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2196
2197 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2198 variable name.
2199
833dcd29
AR
22002015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2201
2202 * inferiors.c (thread_pid_matches_callback): New function.
2203 (find_thread_process): New function.
2204 (remove_thread): Reset current_thread.
2205 (remove_process): Assert threads have been removed first.
2206
8d689ee5
YQ
22072015-10-15 Yao Qi <yao.qi@linaro.org>
2208
2209 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2210 if it is 3.
2211 (aarch64_remove_point): Likewise.
2212 * regcache.c (regcache_register_size): New function.
2213
1c2e1515
YQ
22142015-10-12 Yao Qi <yao.qi@linaro.org>
2215
2216 * linux-aarch64-low.c: Update all callers as emit_load_store
2217 is renamed to aarch64_emit_load_store.
2218
e1c587c3
YQ
22192015-10-12 Yao Qi <yao.qi@linaro.org>
2220
2221 * linux-aarch64-low.c: Update all callers of function renaming
2222 from emit_insn to aarch64_emit_insn.
2223
b6542f81
YQ
22242015-10-12 Yao Qi <yao.qi@linaro.org>
2225
2226 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2227 arch/aarch64-insn.h.
2228 (struct aarch64_memory_operand): Likewise.
2229 (ENCODE): Likewise.
2230 (emit_insn): Move to arch/aarch64-insn.c.
2231 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2232 (emit_load_store): Move to arch/aarch64-insn.c.
2233 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2234 (can_encode_int32): Remove.
2235
246994ce
YQ
22362015-10-12 Yao Qi <yao.qi@linaro.org>
2237
2238 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2239 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2240 (aarch64_relocate_instruction): Likewise.
2241 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2242 (struct aarch64_insn_visitor): Likewise.
2243
0badd99f
YQ
22442015-10-12 Yao Qi <yao.qi@linaro.org>
2245
2246 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2247 (struct aarch64_insn_visitor): New.
2248 (struct aarch64_insn_relocation_data): New.
2249 (aarch64_ftrace_insn_reloc_b): New function.
2250 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2251 (aarch64_ftrace_insn_reloc_cb): Likewise.
2252 (aarch64_ftrace_insn_reloc_tb): Likewise.
2253 (aarch64_ftrace_insn_reloc_adr): Likewise.
2254 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2255 (aarch64_ftrace_insn_reloc_others): Likewise.
2256 (visitor): New.
2257 (aarch64_relocate_instruction): Use visitor.
2258
dfaffe9d
YQ
22592015-10-12 Yao Qi <yao.qi@linaro.org>
2260
2261 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2262 int. Add argument buf.
2263 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2264 aarch64_relocate_instruction.
2265
70b439f0
YQ
22662015-10-12 Yao Qi <yao.qi@linaro.org>
2267
2268 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2269 argument insn. Remove local variable insn. Don't call
2270 target_read_uint32.
2271 (aarch64_install_fast_tracepoint_jump_pad): Call
2272 target_read_uint32.
2273
7781c06f
YQ
22742015-09-30 Yao Qi <yao.qi@linaro.org>
2275
2276 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2277 (emit_load_store_pair): Likewise.
2278
9a3c8263
SM
22792015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2280
2281 * dll.c (match_dll): Add cast(s).
2282 (unloaded_dll): Likewise.
2283 * linux-low.c (second_thread_of_pid_p): Likewise.
2284 (delete_lwp_callback): Likewise.
2285 (count_events_callback): Likewise.
2286 (select_event_lwp_callback): Likewise.
2287 (linux_set_resume_request): Likewise.
2288 * server.c (accumulate_file_name_length): Likewise.
2289 (emit_dll_description): Likewise.
2290 (handle_qxfer_threads_worker): Likewise.
2291 (visit_actioned_threads): Likewise.
2292 * thread-db.c (any_thread_of): Likewise.
2293 * tracepoint.c (same_process_p): Likewise.
2294 (match_blocktype): Likewise.
2295 (build_traceframe_info_xml): Likewise.
2296
224c3ddb
SM
22972015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2298
2299 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2300 assignment.
2301 (gdb_unparse_agent_expr): Likewise.
2302 * hostio.c (require_data): Likewise.
2303 (handle_pread): Likewise.
2304 * linux-low.c (disable_regset): Likewise.
2305 (fetch_register): Likewise.
2306 (store_register): Likewise.
2307 (get_dynamic): Likewise.
2308 (linux_qxfer_libraries_svr4): Likewise.
2309 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2310 (set_fast_tracepoint_jump): Likewise.
2311 (uninsert_fast_tracepoint_jumps_at): Likewise.
2312 (reinsert_fast_tracepoint_jumps_at): Likewise.
2313 (validate_inserted_breakpoint): Likewise.
2314 (clone_agent_expr): Likewise.
2315 * regcache.c (init_register_cache): Likewise.
2316 * remote-utils.c (putpkt_binary_1): Likewise.
2317 (decode_M_packet): Likewise.
2318 (decode_X_packet): Likewise.
2319 (look_up_one_symbol): Likewise.
2320 (relocate_instruction): Likewise.
2321 (monitor_output): Likewise.
2322 * server.c (handle_search_memory): Likewise.
2323 (handle_qxfer_exec_file): Likewise.
2324 (handle_qxfer_libraries): Likewise.
2325 (handle_qxfer): Likewise.
2326 (handle_query): Likewise.
2327 (handle_v_cont): Likewise.
2328 (handle_v_run): Likewise.
2329 (captured_main): Likewise.
2330 * target.c (write_inferior_memory): Likewise.
2331 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2332 * tracepoint.c (init_trace_buffer): Likewise.
2333 (add_tracepoint_action): Likewise.
2334 (add_traceframe): Likewise.
2335 (add_traceframe_block): Likewise.
2336 (cmd_qtdpsrc): Likewise.
2337 (cmd_qtdv): Likewise.
2338 (cmd_qtstatus): Likewise.
2339 (response_source): Likewise.
2340 (response_tsv): Likewise.
2341 (cmd_qtnotes): Likewise.
2342 (gdb_collect): Likewise.
2343 (initialize_tracepoint): Likewise.
2344
afbe19f8
PL
23452015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2346
2347 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2348 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2349 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2350 <NOP>: New.
2351 (enum aarch64_condition_codes): New enum.
2352 (w0): New static global.
2353 (fp): Likewise.
2354 (lr): Likewise.
2355 (struct aarch64_memory_operand) <type>: New
2356 MEMORY_OPERAND_POSTINDEX type.
2357 (postindex_memory_operand): New helper function.
2358 (emit_ret): New function.
2359 (emit_load_store_pair): New function, factored out of emit_stp
2360 with support for MEMORY_OPERAND_POSTINDEX.
2361 (emit_stp): Rewrite using emit_load_store_pair.
2362 (emit_ldp): New function.
2363 (emit_load_store): Likewise.
2364 (emit_ldr): Mention post-index instruction in comment.
2365 (emit_ldrh): New function.
2366 (emit_ldrb): New function.
2367 (emit_ldrsw): Mention post-index instruction in comment.
2368 (emit_str): Likewise.
2369 (emit_subs): New function.
2370 (emit_cmp): Likewise.
2371 (emit_and): Likewise.
2372 (emit_orr): Likewise.
2373 (emit_orn): Likewise.
2374 (emit_eor): Likewise.
2375 (emit_mvn): Likewise.
2376 (emit_lslv): Likewise.
2377 (emit_lsrv): Likewise.
2378 (emit_asrv): Likewise.
2379 (emit_mul): Likewise.
2380 (emit_sbfm): Likewise.
2381 (emit_sbfx): Likewise.
2382 (emit_ubfm): Likewise.
2383 (emit_ubfx): Likewise.
2384 (emit_csinc): Likewise.
2385 (emit_cset): Likewise.
2386 (emit_nop): Likewise.
2387 (emit_ops_insns): New helper function.
2388 (emit_pop): Likewise.
2389 (emit_push): Likewise.
2390 (aarch64_emit_prologue): New function.
2391 (aarch64_emit_epilogue): Likewise.
2392 (aarch64_emit_add): Likewise.
2393 (aarch64_emit_sub): Likewise.
2394 (aarch64_emit_mul): Likewise.
2395 (aarch64_emit_lsh): Likewise.
2396 (aarch64_emit_rsh_signed): Likewise.
2397 (aarch64_emit_rsh_unsigned): Likewise.
2398 (aarch64_emit_ext): Likewise.
2399 (aarch64_emit_log_not): Likewise.
2400 (aarch64_emit_bit_and): Likewise.
2401 (aarch64_emit_bit_or): Likewise.
2402 (aarch64_emit_bit_xor): Likewise.
2403 (aarch64_emit_bit_not): Likewise.
2404 (aarch64_emit_equal): Likewise.
2405 (aarch64_emit_less_signed): Likewise.
2406 (aarch64_emit_less_unsigned): Likewise.
2407 (aarch64_emit_ref): Likewise.
2408 (aarch64_emit_if_goto): Likewise.
2409 (aarch64_emit_goto): Likewise.
2410 (aarch64_write_goto_address): Likewise.
2411 (aarch64_emit_const): Likewise.
2412 (aarch64_emit_call): Likewise.
2413 (aarch64_emit_reg): Likewise.
2414 (aarch64_emit_pop): Likewise.
2415 (aarch64_emit_stack_flush): Likewise.
2416 (aarch64_emit_zero_ext): Likewise.
2417 (aarch64_emit_swap): Likewise.
2418 (aarch64_emit_stack_adjust): Likewise.
2419 (aarch64_emit_int_call_1): Likewise.
2420 (aarch64_emit_void_call_2): Likewise.
2421 (aarch64_emit_eq_goto): Likewise.
2422 (aarch64_emit_ne_goto): Likewise.
2423 (aarch64_emit_lt_goto): Likewise.
2424 (aarch64_emit_le_goto): Likewise.
2425 (aarch64_emit_gt_goto): Likewise.
2426 (aarch64_emit_ge_got): Likewise.
2427 (aarch64_emit_ops_impl): New static global variable.
2428 (aarch64_emit_ops): New target function, return
2429 &aarch64_emit_ops_impl.
2430 (struct linux_target_ops): Install it.
2431
bb903df0
PL
24322015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2433
2434 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2435 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2436 aarch64-ipa.o.
2437 * linux-aarch64-ipa.c: New file.
2438 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2439 and endian.h.
2440 (aarch64_get_thread_area): New target method.
2441 (extract_signed_bitfield): New helper function.
2442 (aarch64_decode_ldr_literal): New function.
2443 (enum aarch64_opcodes): New enum.
2444 (struct aarch64_register): New struct.
2445 (struct aarch64_operand): New struct.
2446 (x0): New static global.
2447 (x1): Likewise.
2448 (x2): Likewise.
2449 (x3): Likewise.
2450 (x4): Likewise.
2451 (w2): Likewise.
2452 (ip0): Likewise.
2453 (sp): Likewise.
2454 (xzr): Likewise.
2455 (aarch64_register): New helper function.
2456 (register_operand): Likewise.
2457 (immediate_operand): Likewise.
2458 (struct aarch64_memory_operand): New struct.
2459 (offset_memory_operand): New helper function.
2460 (preindex_memory_operand): Likewise.
2461 (enum aarch64_system_control_registers): New enum.
2462 (ENCODE): New macro.
2463 (emit_insn): New helper function.
2464 (emit_b): New function.
2465 (emit_bcond): Likewise.
2466 (emit_cb): Likewise.
2467 (emit_tb): Likewise.
2468 (emit_blr): Likewise.
2469 (emit_stp): Likewise.
2470 (emit_ldp_q_offset): Likewise.
2471 (emit_stp_q_offset): Likewise.
2472 (emit_load_store): Likewise.
2473 (emit_ldr): Likewise.
2474 (emit_ldrsw): Likewise.
2475 (emit_str): Likewise.
2476 (emit_ldaxr): Likewise.
2477 (emit_stxr): Likewise.
2478 (emit_stlr): Likewise.
2479 (emit_data_processing_reg): Likewise.
2480 (emit_data_processing): Likewise.
2481 (emit_add): Likewise.
2482 (emit_sub): Likewise.
2483 (emit_mov): Likewise.
2484 (emit_movk): Likewise.
2485 (emit_mov_addr): Likewise.
2486 (emit_mrs): Likewise.
2487 (emit_msr): Likewise.
2488 (emit_sevl): Likewise.
2489 (emit_wfe): Likewise.
2490 (append_insns): Likewise.
2491 (can_encode_int32_in): New helper function.
2492 (aarch64_relocate_instruction): New function.
2493 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2494 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2495 (struct linux_target_ops): Install aarch64_get_thread_area,
2496 aarch64_install_fast_tracepoint_jump_pad and
2497 aarch64_get_min_fast_tracepoint_insn_len.
2498
787749ea
PL
24992015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2500
2501 * Makefile.in (aarch64-insn.o): New rule.
2502 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2503
9812b2e6
YQ
25042015-09-21 Yao Qi <yao.qi@linaro.org>
2505
2506 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2507
18fe412b
YQ
25082015-09-21 Yao Qi <yao.qi@linaro.org>
2509
2510 * tracepoint.c (max_jump_pad_size): Remove.
2511
a0cc84cd
YQ
25122015-09-18 Yao Qi <yao.qi@linaro.org>
2513
2514 * linux-aarch64-low.c: Don't include sys/uio.h.
2515 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2516
d78908cf
WW
25172015-09-16 Wei-cheng Wang <cole945@gmail.com>
2518
2519 * tracepoint.c (eval_result_type): Change prototype.
2520 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2521
d57e0d50
PA
25222015-09-15 Pedro Alves <palves@redhat.com>
2523
2524 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2525 Check whether to report exec events instead of checking whether
2526 multiprocess is enabled.
2527
5a676acc
PA
25282015-09-15 Pedro Alves <palves@redhat.com>
2529
2530 PR remote/18965
2531 * remote-utils.c (prepare_resume_reply): Merge
2532 TARGET_WAITKIND_VFORK_DONE switch case with the
2533 TARGET_WAITKIND_FORKED case.
2534
7c5d0fad
YQ
25352015-09-15 Yao Qi <yao.qi@linaro.org>
2536
2537 * server.c (handle_query): Check string comparison using
2538 "else if" instead of "if".
2539
750ce8d1
YQ
25402015-09-15 Yao Qi <yao.qi@linaro.org>
2541
2542 * server.c (vCont_supported): New global variable.
2543 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2544 matches. Append ";vContSupported+" to own_buf.
2545 (handle_v_requests): Append ";s;S" to own_buf if target supports
2546 hardware single step or vCont_supported is false.
2547 (capture_main): Set vCont_supported to zero.
2548
70b90b91
YQ
25492015-09-15 Yao Qi <yao.qi@linaro.org>
2550
2551 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2552 it to ...
2553 (linux_supports_hardware_single_step): ... New function.
2554 (linux_target_ops): Update.
2555 * lynx-low.c (lynx_target_ops): Set field
2556 supports_hardware_single_step to target_can_do_hardware_single_step.
2557 * nto-low.c (nto_target_ops): Likewise.
2558 * spu-low.c (spu_target_ops): Likewise.
2559 * win32-low.c (win32_target_ops): Likewise.
2560 * target.c (target_can_do_hardware_single_step): New function.
2561 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2562 Remove. <supports_hardware_single_step>: New field.
2563 (target_supports_conditional_breakpoints): Remove.
2564 (target_supports_hardware_single_step): New macro.
2565 (target_can_do_hardware_single_step): Declare.
2566 * server.c (handle_query): Use target_supports_hardware_single_step
2567 instead of target_supports_conditional_breakpoints.
2568
ade90bde
YQ
25692015-09-15 Yao Qi <yao.qi@linaro.org>
2570
2571 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2572 function.
2573 (struct linux_target_ops the_low_target): Install
2574 aarch64_linux_siginfo_fixup.
2575
94585166
DB
25762015-09-11 Don Breazeal <donb@codesourcery.com>
2577 Luis Machado <lgustavo@codesourcery.com>
2578
2579 * linux-low.c (linux_mourn): Static declaration.
2580 (linux_arch_setup): Move in front of
2581 handle_extended_wait.
2582 (linux_arch_setup_thread): New function.
2583 (handle_extended_wait): Handle exec events. Call
2584 linux_arch_setup_thread. Make event_lwp argument a
2585 pointer-to-a-pointer.
2586 (check_zombie_leaders): Do not check stopped threads.
2587 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2588 (linux_low_filter_event): Add lwp and thread for exec'ing
2589 non-leader thread if leader thread has been deleted.
2590 Refactor code into linux_arch_setup_thread and call it.
2591 Pass child lwp pointer by reference to handle_extended_wait.
2592 (linux_wait_for_event_filtered): Update comment.
2593 (linux_wait_1): Prevent clobbering exec event status.
2594 (linux_supports_exec_events): New function.
2595 (linux_target_ops) <supports_exec_events>: Initialize new member.
2596 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2597 new member.
2598 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2599 * server.c (report_exec_events): New global variable.
2600 (handle_query): Handle qSupported query for exec-events feature.
2601 (captured_main): Initialize report_exec_events.
2602 * server.h (report_exec_events): Declare new global variable.
2603 * target.h (struct target_ops) <supports_exec_events>: New
2604 member.
2605 (target_supports_exec_events): New macro.
2606 * win32-low.c (win32_target_ops) <supports_exec_events>:
2607 Initialize new member.
2608
0568462b
MM
26092015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2610
2611 * linux-low.c (linux_low_enable_btrace): Remove.
2612 (linux_target_ops): Replace linux_low_enable_btrace with
2613 linux_enable_btrace.
2614
39edd165
YQ
26152015-09-03 Yao Qi <yao.qi@linaro.org>
2616
2617 * linux-aarch64-low.c (aarch64_insert_point): Call
2618 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2619 returns true.
2620
1db33b5a
UW
26212015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2622
2623 * linux-low.c (check_stopped_by_breakpoint): Use
2624 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2625
ab290430
PA
26262015-08-27 Pedro Alves <palves@redhat.com>
2627
2628 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2629
8d749320
SM
26302015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2631
6711b7f8
SM
2632 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2633 the XNEW-family equivalent.
8d749320
SM
2634 (compile_bytecodes): Likewise.
2635 * dll.c (loaded_dll): Likewise.
2636 * event-loop.c (append_callback_event): Likewise.
2637 (create_file_handler): Likewise.
2638 (create_file_event): Likewise.
2639 * hostio.c (handle_open): Likewise.
2640 * inferiors.c (add_thread): Likewise.
2641 (add_process): Likewise.
2642 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2643 * linux-arm-low.c (arm_new_process): Likewise.
2644 (arm_new_thread): Likewise.
2645 * linux-low.c (add_to_pid_list): Likewise.
2646 (linux_add_process): Likewise.
2647 (handle_extended_wait): Likewise.
2648 (add_lwp): Likewise.
2649 (enqueue_one_deferred_signal): Likewise.
2650 (enqueue_pending_signal): Likewise.
2651 (linux_resume_one_lwp_throw): Likewise.
2652 (linux_resume_one_thread): Likewise.
2653 (linux_read_memory): Likewise.
2654 (linux_write_memory): Likewise.
2655 * linux-mips-low.c (mips_linux_new_process): Likewise.
2656 (mips_linux_new_thread): Likewise.
2657 (mips_add_watchpoint): Likewise.
2658 * linux-x86-low.c (initialize_low_arch): Likewise.
2659 * lynx-low.c (lynx_add_process): Likewise.
2660 * mem-break.c (set_raw_breakpoint_at): Likewise.
2661 (set_breakpoint): Likewise.
2662 (add_condition_to_breakpoint): Likewise.
2663 (add_commands_to_breakpoint): Likewise.
2664 (clone_agent_expr): Likewise.
2665 (clone_one_breakpoint): Likewise.
2666 * regcache.c (new_register_cache): Likewise.
2667 * remote-utils.c (look_up_one_symbol): Likewise.
2668 * server.c (queue_stop_reply): Likewise.
2669 (start_inferior): Likewise.
2670 (queue_stop_reply_callback): Likewise.
2671 (handle_target_event): Likewise.
2672 * spu-low.c (fetch_ppc_memory): Likewise.
2673 (store_ppc_memory): Likewise.
2674 * target.c (set_target_ops): Likewise.
2675 * thread-db.c (thread_db_load_search): Likewise.
2676 (try_thread_db_load_1): Likewise.
2677 * tracepoint.c (add_tracepoint): Likewise.
2678 (add_tracepoint_action): Likewise.
2679 (create_trace_state_variable): Likewise.
2680 (cmd_qtdpsrc): Likewise.
2681 (cmd_qtro): Likewise.
2682 (add_while_stepping_state): Likewise.
2683 * win32-low.c (child_add_thread): Likewise.
2684 (get_image_name): Likewise.
2685
ed8b7b42
YQ
26862015-08-25 Yao Qi <yao.qi@linaro.org>
2687
2688 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2689
db3cb7cb
YQ
26902015-08-25 Yao Qi <yao.qi@linaro.org>
2691
2692 * Makefile.in (aarch64-linux.o): New rule.
2693 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2694 srv_tgtobj.
2695 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2696 (aarch64_init_debug_reg_state): Make it extern.
2697 (aarch64_linux_prepare_to_resume): Remove.
2698
f6011a1c
YQ
26992015-08-25 Yao Qi <yao.qi@linaro.org>
2700
2701 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2702 lwp_arch_private_info and ptid_of_lwp.
2703
88e2cf7e
YQ
27042015-08-25 Yao Qi <yao.qi@linaro.org>
2705
2706 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2707 Find proc_info by find_process_pid. All callers updated.
2708
5e35436e
YQ
27092015-08-25 Yao Qi <yao.qi@linaro.org>
2710
2711 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2712 Remove.
2713 (debug_reg_change_callback): Remove.
2714 (aarch64_notify_debug_reg_change): Remove.
2715
4a8a7965
YQ
27162015-08-25 Yao Qi <yao.qi@linaro.org>
2717
2718 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2719 Call current_lwp_ptid.
2720
32a271ee
YQ
27212015-08-25 Yao Qi <yao.qi@linaro.org>
2722
2723 * linux-aarch64-low.c (debug_reg_change_callback): Use
2724 debug_printf.
2725
0d51c8d7
YQ
27262015-08-25 Yao Qi <yao.qi@linaro.org>
2727
2728 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2729
31a43dd5
YQ
27302015-08-25 Yao Qi <yao.qi@linaro.org>
2731
2732 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2733
8ee52567
YQ
27342015-08-25 Yao Qi <yao.qi@linaro.org>
2735
2736 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2737 the code.
2738
ff3f0f45
YQ
27392015-08-25 Yao Qi <yao.qi@linaro.org>
2740
2741 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2742 Remove.
2743 (debug_reg_change_callback): Remove argument entry and add argument
2744 lwp. Remove local variable thread. Don't print thread id in the
2745 debugging output. Don't check whether pid of thread equals to pid.
2746 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2747 iterate_over_lwps instead find_inferior.
2748
3d40fbb5
PA
27492015-08-24 Pedro Alves <palves@redhat.com>
2750
2751 * inferiors.c (get_first_process): New function.
2752 * inferiors.h (get_first_process): New declaration.
2753 * remote-utils.c (read_ptid): Default to the first process in the
2754 list, instead of to the current thread's process.
2755
438e1e42
PA
27562015-08-24 Pedro Alves <palves@redhat.com>
2757
2758 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2759 * event-loop.c: Likewise.
2760 * remote-utils.c: Likewise.
2761 * tracepoint.c: Likewise.
2762
a8c6d4fc
PA
27632015-08-24 Pedro Alves <palves@redhat.com>
2764
2765 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2766 ptid_get_lwp.
2767
99b0bb12
PA
27682015-08-21 Pedro Alves <palves@redhat.com>
2769
2770 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2771 instead of literal 1.
2772
f8904751
PA
27732015-08-21 Pedro Alves <palves@redhat.com>
2774
2775 * tdesc.c (default_description): Explicitly zero-initialize.
2776
465a859e
PA
27772015-08-21 Pedro Alves <palves@redhat.com>
2778
2779 PR gdb/18749
2780 * inferiors.c (remove_thread): Discard any pending stop reply for
2781 this thread.
2782 * server.c (remove_all_on_match_pid): Rename to ...
2783 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2784 instead of a pid.
2785 (discard_queued_stop_replies): Change parameter to a ptid. Now
2786 extern.
2787 (handle_v_kill, kill_inferior_callback, captured_main)
2788 (process_serial_event): Adjust.
2789 * server.h (discard_queued_stop_replies): Declare.
2790
f0db101d
PA
27912015-08-21 Pedro Alves <palves@redhat.com>
2792
2793 * linux-low.c (wait_for_sigstop): Always switch to no thread
2794 selected if the previously current thread dies.
2795 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2796 process instead of the current thread's.
2797 * remote-utils.c (input_interrupt): Don't check if there's no
2798 current thread.
2799 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2800 current thread to the general thread fails, error out.
2801 (handle_qxfer_auxv, handle_qxfer_libraries)
2802 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2803 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2804 (handle_query): Check if there's a thread selected instead of
2805 checking whether there's any thread in the thread list.
2806 (handle_qxfer_threads, handle_qxfer_btrace)
2807 (handle_qxfer_btrace_conf): Don't error out early if there's no
2808 thread in the thread list.
2809 (handle_v_cont, myresume): Don't set the current thread to the
2810 continue thread.
2811 (process_serial_event) <Hg handling>: Also set thread_id if the
2812 previous general thread is still alive.
2813 (process_serial_event) <g/G handling>: If setting the current
2814 thread to the general thread fails, error out.
2815 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2816 thread's lwp instead of the current thread's.
2817 * target.c (set_desired_thread): If the desired thread was not
2818 found, leave the current thread pointing to NULL. Return an int
2819 (boolean) indicating success.
2820 * target.h (set_desired_thread): Change return type to int.
2821
40045d91
MF
28222015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2823
2824 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2825 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2826 #includes.
2827 (ps_get_thread_area): New function.
2828
45face3b
GB
28292015-08-19 Gary Benson <gbenson@redhat.com>
2830
2831 * hostio.c (handle_pread): Do not attempt to read more data
2832 than hostio_reply_with_data can fit in a packet.
2833
16d5f642
JB
28342015-08-18 Joel Brobecker <brobecker@adacore.com>
2835
2836 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2837
a738da3a
MF
28382015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2839
2840 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2841
33ebda9d
PA
28422015-08-06 Pedro Alves <palves@redhat.com>
2843
2844 * tracepoint.c (expr_eval_result): Now an int.
2845
a44892be
PA
28462015-08-06 Pedro Alves <palves@redhat.com>
2847
2848 * gdbthread.h (struct regcache): Forward declare.
2849 (struct thread_info) <regcache_data>: Now a struct regcache
2850 pointer.
2851 * inferiors.c (inferior_regcache_data)
2852 (set_inferior_regcache_data): Now work with struct regcache
2853 pointers.
2854 * inferiors.h (struct regcache): Forward declare.
2855 (inferior_regcache_data, set_inferior_regcache_data): Now work
2856 with struct regcache pointers.
2857 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2858 (free_register_cache_thread): Remove struct regcache pointer
2859 casts.
2860
608a1e46
PA
28612015-08-06 Pedro Alves <palves@redhat.com>
2862
2863 * server.c (captured_main): On error, print the exception message
2864 to stderr, and if run_once is set, throw a quit.
2865
f0ce0d3a
PA
28662015-08-06 Pedro Alves <palves@redhat.com>
2867
2868 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2869 the current thread.
2870
bf47e248
PA
28712015-08-06 Pedro Alves <palves@redhat.com>
2872
2873 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2874 reading beyond the passed in buffer length.
2875
b6b9ffcc
PL
28762015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2877
2878 * tracepoint.c (symbol_list) <required>: Remove.
2879
863d01bd
PA
28802015-08-06 Pedro Alves <palves@redhat.com>
2881
2882 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2883 count if stopping and suspending threads.
2884 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2885 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2886 (linux_detach): Complete an ongoing step-over.
2887 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2888 throughout.
2889 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2890 (linux_wait_1): If passing a signal to the inferior after
2891 finishing a step-over, unsuspend and re-resume all lwps. If we
2892 see a single-step event but the thread should be continuing, don't
2893 pass the trap to gdb.
2894 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2895 internal_error instead of gdb_assert.
2896 (enqueue_pending_signal): New function.
2897 (check_ptrace_stopped_lwp_gone): Add debug output.
2898 (start_step_over): Use internal_error instead of gdb_assert.
2899 (complete_ongoing_step_over): New function.
2900 (linux_resume_one_thread): Don't resume a suspended thread.
2901 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2902 it stepping.
2903
00db26fa
PA
29042015-08-06 Pedro Alves <palves@redhat.com>
2905
2906 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2907 (linux_thread_alive): Use lwp_is_marked_dead.
2908 (extended_event_reported): Delete.
2909 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2910 instead of extended_event_reported.
2911 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2912 as well.
2913 (lwp_is_marked_dead): New function.
2914 (lwp_running): Use lwp_is_marked_dead.
2915 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2916 comment.
2917
ad071a30
PA
29182015-08-06 Pedro Alves <palves@redhat.com>
2919
2920 * linux-low.c (linux_wait_1): Move fork event output out of the
2921 !report_to_gdb check. Pass event_child->waitstatus to
2922 target_waitstatus_to_string instead of ourstatus.
2923
524b57e6
YQ
29242015-08-04 Yao Qi <yao.qi@linaro.org>
2925
2926 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2927 if current_thread is 32 bit.
2928
6085d6f6
YQ
29292015-08-04 Yao Qi <yao.qi@linaro.org>
2930
2931 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2932 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2933 * server.c (extended_protocol): Remove "static".
2934 * server.h (extended_protocol): Declare it.
2935
8a7e4587
YQ
29362015-08-04 Yao Qi <yao.qi@linaro.org>
2937
2938 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2939 both aarch64 and aarch32.
2940 (aarch64_set_pc): Likewise.
2941
3b53ae99
YQ
29422015-08-04 Yao Qi <yao.qi@linaro.org>
2943
2944 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2945 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2946 arm-with-neon.xml to srv_xmlfiles.
2947 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2948 (is_64bit_tdesc): New function.
2949 (aarch64_linux_read_description): New function.
2950 (aarch64_arch_setup): Call aarch64_linux_read_description.
2951 (regs_info): Rename to regs_info_aarch64.
2952 (aarch64_regs_info): Return right regs_info.
2953 (initialize_low_arch): Call initialize_low_arch_aarch32.
2954
bd9e6534
YQ
29552015-08-04 Yao Qi <yao.qi@linaro.org>
2956
2957 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2958 * linux-aarch32-low.c: New file.
2959 * linux-aarch32-low.h: New file.
2960 * linux-arm-low.c (arm_fill_gregset): Move it to
2961 linux-aarch32-low.c.
2962 (arm_store_gregset): Likewise.
2963 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2964 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2965 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2966 (regs_info): Rename to regs_info_arm.
2967 (arm_regs_info): Return regs_info_aarch32 if
2968 have_ptrace_getregset is 1 and target description is
2969 arm_with_neon or arm_with_vfpv3.
2970 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2971 Call initialize_low_arch_aarch32 instead.
2972
ded48a5e
YQ
29732015-08-04 Yao Qi <yao.qi@linaro.org>
2974
2975 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2976 * linux-low.c: ... here.
2977 * linux-low.h (have_ptrace_getregset): Declare it.
2978
96e9210f
PA
29792015-08-04 Pedro Alves <palves@redhat.com>
2980
2981 * thread-db.c (struct thread_db): Use new typedefs.
2982 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2983 CHK calls.
2984 (disable_thread_event_reporting): Cast result of dlsym to
2985 destination function pointer type.
2986 (thread_db_mourn): Use td_ta_delete_ftype.
2987
af60a1ef
SL
29882015-08-03 Sandra Loosemore <sandra@codesourcery.com>
2989
2990 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2991 arch variant.
2992 (CDX_BREAKPOINT): Define for R2.
2993 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2994 (the_low_target): Add comments.
2995
e8b41681
YQ
29962015-07-30 Yao Qi <yao.qi@linaro.org>
2997
2998 * linux-arm-low.c (arm_hwcap): Remove it.
2999 (arm_read_description): New local variable arm_hwcap. Don't
3000 set arm_hwcap to zero.
3001
89abb039
YQ
30022015-07-30 Yao Qi <yao.qi@linaro.org>
3003
3004 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3005 Use regcache->tdesc instead.
3006 (arm_store_wmmxregset): Likewise.
3007 (arm_fill_vfpregset): Likewise.
3008 (arm_store_vfpregset): Likewise.
3009
deca266c
YQ
30102015-07-30 Yao Qi <yao.qi@linaro.org>
3011
3012 * linux-arm-low.c: Include arch/arm.h.
3013 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3014 (arm_store_gregset): Likewise.
3015
aa58a496
SM
30162015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3017
3018 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3019 ptrace's 4th parameter.
3020
50904b25
YQ
30212015-07-27 Yao Qi <yao.qi@linaro.org>
3022
3023 * configure.srv (case aarch64*-*-linux*): Don't set
3024 srv_linux_usrregs.
3025
5826e159
PA
30262015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3027
3028 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3029 sys/ptrace.h.
3030 * linux-arm-low.c: Likewise.
3031 * linux-cris-low.c: Likewise.
3032 * linux-crisv32-low.c: Likewise.
3033 * linux-low.c: Likewise.
3034 * linux-m68k-low.c: Likewise.
3035 * linux-mips-low.c: Likewise.
3036 * linux-nios2-low.c: Likewise.
3037 * linux-s390-low.c: Likewise.
3038 * linux-sparc-low.c: Likewise.
3039 * linux-tic6x-low.c: Likewise.
3040 * linux-tile-low.c: Likewise.
3041 * linux-x86-low.c: Likewise.
3042
54019719
PA
30432015-07-24 Pedro Alves <palves@redhat.com>
3044
3045 * config.in: Regenerate.
3046 * configure: Regenerate.
3047
eb7aa561
PA
30482015-07-24 Pedro Alves <palves@redhat.com>
3049
3050 * acinclude.m4: Include ../ptrace.m4.
3051 * configure.ac: Call GDB_AC_PTRACE.
3052 * config.in, configure: Regenerate.
3053
55d7b841
YQ
30542015-07-24 Yao Qi <yao.qi@linaro.org>
3055
3056 * linux-low.c (linux_create_inferior): Remove setting to
3057 proc->priv->new_inferior.
3058 (linux_attach): Likewise.
3059 (linux_low_filter_event): Likewise.
3060 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3061
c06cbd92
YQ
30622015-07-24 Yao Qi <yao.qi@linaro.org>
3063
3064 * linux-low.c (linux_arch_setup): New function.
3065 (linux_low_filter_event): If proc->tdesc is NULL and
3066 proc->attached is true, call the_low_target.arch_setup.
3067 Otherwise, keep status pending, and return.
3068 (linux_resume_one_lwp_throw): Don't call get_pc if
3069 thread->while_stepping isn't NULL. Don't call
3070 get_thread_regcache if proc->tdesc is NULL.
3071 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3072 (linux_target_ops): Install arch_setup.
3073 * server.c (start_inferior): Call the_target->arch_setup.
3074 * target.h (struct target_ops) <arch_setup>: New field.
3075 (target_arch_setup): New marco.
3076 * lynx-low.c (lynx_target_ops): Update.
3077 * nto-low.c (nto_target_ops): Update.
3078 * spu-low.c (spu_target_ops): Update.
3079 * win32-low.c (win32_target_ops): Update.
3080
5ae3ebba
YQ
30812015-07-24 Yao Qi <yao.qi@linaro.org>
3082
3083 * linux-low.c (linux_add_process): Don't set
3084 proc->priv->new_inferior.
3085 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3086 (linux_attach): Likewise.
3087
eb97750b
YQ
30882015-07-24 Yao Qi <yao.qi@linaro.org>
3089
3090 * server.c (start_inferior): Code refactor.
3091
51aee833
YQ
30922015-07-24 Yao Qi <yao.qi@linaro.org>
3093
3094 * server.c (process_serial_event): Set general_thread.
3095
af1b22f3
YQ
30962015-07-21 Yao Qi <yao.qi@linaro.org>
3097
3098 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3099 aarch64_linux_get_debug_reg_capacity.
3100
554717a3
YQ
31012015-07-17 Yao Qi <yao.qi@linaro.org>
3102
3103 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3104 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3105 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3106 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3107 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3108 (AARCH64_HWP_ALIGNMENT): Likewise.
3109 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3110 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3111 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3112 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3113 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3114 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3115 (struct aarch64_debug_reg_state): Likewise.
3116 (struct arch_lwp_info): Likewise.
3117 (aarch64_align_watchpoint): Likewise.
3118 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3119 (aarch64_watchpoint_length): Likewise.
3120 (aarch64_point_encode_ctrl_reg): Likewise
3121 (aarch64_point_is_aligned): Likewise.
3122 (aarch64_align_watchpoint): Likewise.
3123 (aarch64_linux_set_debug_regs):
3124 (aarch64_dr_state_insert_one_point): Likewise.
3125 (aarch64_dr_state_remove_one_point): Likewise.
3126 (aarch64_handle_breakpoint): Likewise.
3127 (aarch64_handle_aligned_watchpoint): Likewise.
3128 (aarch64_handle_unaligned_watchpoint): Likewise.
3129 (aarch64_handle_watchpoint): Likewise.
3130
c67ca4de
YQ
31312015-07-17 Yao Qi <yao.qi@linaro.org>
3132
3133 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3134 and don't aarch64_get_debug_reg_state. All callers update.
3135 (aarch64_handle_aligned_watchpoint): Likewise.
3136 (aarch64_handle_unaligned_watchpoint): Likewise.
3137 (aarch64_handle_watchpoint): Likewise.
3138 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3139 (aarch64_remove_point): Likewise.
3140
25abf979
YQ
31412015-07-17 Yao Qi <yao.qi@linaro.org>
3142
3143 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3144 debug_printf.
3145 (aarch64_handle_unaligned_watchpoint): Likewise.
3146
db1ff28b
JK
31472015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3148
3149 Revert the previous 3 commits:
3150 Move gdb_regex* to common/
3151 Move linux_find_memory_regions_full & co.
3152 gdbserver build-id attribute generator
3153
700ca40f
JK
31542015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3155 Jan Kratochvil <jan.kratochvil@redhat.com>
3156
3157 gdbserver build-id attribute generator.
3158 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3159 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3160 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3161 (find_phdr): New.
3162 (get_dynamic): Use find_pdhr to traverse program headers.
3163 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3164 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3165 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3166 (get_hex_build_id): New.
3167 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3168 to reply XML document.
3169
9904185c
JK
31702015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3171 Jan Kratochvil <jan.kratochvil@redhat.com>
3172
3173 * target.c: Include target/target-utils.h and fcntl.h.
3174 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3175 (target_fileio_read_stralloc): New functions.
3176
6e5b4429
JK
31772015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3178
3179 * Makefile.in (OBS): Add gdb_regex.o.
3180 (gdb_regex.o): New.
3181 * config.in: Rebuilt.
3182 * configure: Rebuilt.
3183
ddc98fbf
JK
31842015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3185 Jan Kratochvil <jan.kratochvil@redhat.com>
3186
3187 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3188 * Makefile.in (OBS): Add target-utils.o.
3189 (linux-maps.o, target-utils.o): New.
3190 * configure.srv (srv_linux_obj): Add linux-maps.o.
3191
e57bb7a0
PL
31922015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3193
3194 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3195 function, return 1.
3196 (the_low_target): Install it.
3197
586b02a9
PA
31982015-07-14 Pedro Alves <palves@redhat.com>
3199
3200 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3201 Instead, ignore ECHILD, and throw an error for other errnos.
3202
58c1b36c
PA
32032015-07-10 Pedro Alves <palves@redhat.com>
3204
3205 * event-loop.c (struct callback_event) <data>: Change type to
3206 gdb_client_data instance instead of gdb_client_data pointer.
3207 (append_callback_event): Adjust.
3208
421530db
PL
32092015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3210
3211 * linux-aarch64-low.c: Add comments for each linux_target_ops
3212 method. Remove comments already covered in target_ops and
3213 linux_target_ops definitions.
3214 (the_low_target): Add comments for each unimplemented method.
3215
c2d65f38
YQ
32162015-07-09 Yao Qi <yao.qi@linaro.org>
3217
3218 * linux-aarch64-low.c (aarch64_regmap): Remove.
3219 (aarch64_usrregs_info): Remove.
3220 (regs_info): Set field usrregs to NULL.
3221
b20a6524
MM
32222015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3223
3224 * linux-low.c: Include "rsp-low.h"
3225 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3226 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3227 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3228 (handle_btrace_enable_pt): New.
3229 (handle_btrace_general_set): Support "pt".
3230 (handle_btrace_conf_general_set): Support "pt:size".
3231
96c97461
PL
32322015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3233
3234 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3235 Z_PACKET_SW_BP.
3236
37d66942
PL
32372015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3238
3239 * linux-aarch64-low.c: Remove comment about endianness.
3240 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3241 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3242 memcmp.
3243
dc06243f
GB
32442015-06-24 Gary Benson <gbenson@redhat.com>
3245
3246 * linux-i386-ipa.c (stdint.h): Do not include.
3247 * lynx-i386-low.c (stdint.h): Likewise.
3248 * lynx-ppc-low.c (stdint.h): Likewise.
3249 * mem-break.c (stdint.h): Likewise.
3250 * thread-db.c (stdint.h): Likewise.
3251 * tracepoint.c (stdint.h): Likewise.
3252 * win32-low.c (stdint.h): Likewise.
3253
124e13d9
SM
32542015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3255
3256 * server.c (write_qxfer_response): Update call to
3257 remote_escape_output.
3258
909c2cda
JK
32592015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3260 Jan Kratochvil <jan.kratochvil@redhat.com>
3261
3262 Merge multiple hex conversions.
3263 * gdbreplay.c (tohex): Rename to 'fromhex'.
3264 (logchar): Use fromhex.
3265
24c05f46
JK
32662015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3267
3268 * server.c (handle_qxfer_libraries): Set `version' attribute for
3269 <library-list>.
3270
14d2069a
GB
32712015-06-10 Gary Benson <gbenson@redhat.com>
3272
3273 * target.h (struct target_ops) <multifs_open>: New field.
3274 <multifs_unlink>: Likewise.
3275 <multifs_readlink>: Likewise.
3276 * linux-low.c (nat/linux-namespaces.h): New include.
3277 (linux_target_ops): Initialize the_target->multifs_open,
3278 the_target->multifs_unlink and the_target->multifs_readlink.
3279 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3280 * hostio.c (hostio_fs_pid): New static variable.
3281 (hostio_handle_new_gdb_connection): New function.
3282 (handle_setfs): Likewise.
3283 (handle_open): Use the_target->multifs_open as appropriate.
3284 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3285 (handle_readlink): Use the_target->multifs_readlink as
3286 appropriate.
3287 (handle_vFile): Handle vFile:setfs packets.
3288 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3289 after target_handle_new_gdb_connection.
3290
4b8b5e72
GB
32912015-06-10 Gary Benson <gbenson@redhat.com>
3292
3293 * configure.ac (AC_CHECK_FUNCS): Add setns.
3294 * config.in: Regenerate.
3295 * configure: Likewise.
3296 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3297 (linux-namespaces.o): New rule.
3298 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3299
3ac2e371
GB
33002015-06-09 Gary Benson <gbenson@redhat.com>
3301
3302 * hostio.c (handle_open): Process mode argument with
3303 fileio_to_host_mode.
3304
ca9b78ce
YQ
33052015-06-01 Yao Qi <yao.qi@linaro.org>
3306
3307 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3308 * linux-x86-low.c: Likewise.
3309
bfacd19d
DB
33102015-05-28 Don Breazeal <donb@codesourcery.com>
3311
3312 * linux-low.c (handle_extended_wait): Initialize
3313 thread_info.last_resume_kind for new fork children.
3314
452003ef
PA
33152015-05-15 Pedro Alves <palves@redhat.com>
3316
3317 * target.h (target_handle_new_gdb_connection): Rewrite using if
3318 wrapped in do/while.
3319
1041a03c
JB
33202015-05-14 Joel Brobecker <brobecker@adacore.com>
3321
3322 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3323 * configure, config.in: Regenerate.
3324 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3325 Declare typedef.
3326
c269dbdb
DB
33272015-05-12 Don Breazeal <donb@codesourcery.com>
3328
3329 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3330 PTRACE_EVENT_VFORK_DONE.
3331 (linux_low_ptrace_options, extended_event_reported): Add vfork
3332 events.
3333 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3334 and "vforkdone" for RSP 'T' Stop Reply Packet.
3335 * server.h (report_vfork_events): Declare
3336 global variable.
3337
3a8a0396
DB
33382015-05-12 Don Breazeal <donb@codesourcery.com>
3339
3340 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3341 (the_low_target) <new_fork>: Initialize new member.
3342 * linux-arm-low.c (arm_new_fork): New function.
3343 (the_low_target) <new_fork>: Initialize new member.
3344 * linux-low.c (handle_extended_wait): Call new target function
3345 new_fork.
3346 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3347 * linux-mips-low.c (mips_add_watchpoint): New function
3348 extracted from mips_insert_point.
3349 (the_low_target) <new_fork>: Initialize new member.
3350 (mips_linux_new_fork): New function.
3351 (mips_insert_point): Call mips_add_watchpoint.
3352 * linux-x86-low.c (x86_linux_new_fork): New function.
3353 (the_low_target) <new_fork>: Initialize new member.
3354
de0d863e
DB
33552015-05-12 Don Breazeal <donb@codesourcery.com>
3356
3357 * linux-low.c (handle_extended_wait): Implement return value,
3358 rename argument 'event_child' to 'event_lwp', handle
3359 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3360 (linux_low_ptrace_options): New function.
3361 (linux_low_filter_event): Call linux_low_ptrace_options,
3362 use different argument fo linux_enable_event_reporting,
3363 use return value from handle_extended_wait.
3364 (extended_event_reported): New function.
3365 (linux_wait_1): Call extended_event_reported and set
3366 status to report fork events.
3367 (linux_write_memory): Add pid to debug message.
3368 (reset_lwp_ptrace_options_callback): New function.
3369 (linux_handle_new_gdb_connection): New function.
3370 (linux_target_ops): Initialize new structure member.
3371 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3372 * lynx-low.c: Initialize new structure member.
3373 * remote-utils.c (prepare_resume_reply): Implement stop reason
3374 "fork" for "T" stop message.
3375 * server.c (handle_query): Call handle_new_gdb_connection.
3376 * server.h (report_fork_events): Declare global flag.
3377 * target.h (struct target_ops) <handle_new_gdb_connection>:
3378 New member.
3379 (target_handle_new_gdb_connection): New macro.
3380 * win32-low.c: Initialize new structure member.
3381
ddcbc397
DB
33822015-05-12 Don Breazeal <donb@codesourcery.com>
3383
3384 * mem-break.c (APPEND_TO_LIST): Define macro.
3385 (clone_agent_expr): New function.
3386 (clone_one_breakpoint): New function.
3387 (clone_all_breakpoints): New function.
3388 * mem-break.h: Declare new functions.
3389
89245bc0
DB
33902015-05-12 Don Breazeal <donb@codesourcery.com>
3391
3392 * linux-low.c (linux_supports_fork_events): New function.
3393 (linux_supports_vfork_events): New function.
3394 (linux_target_ops): Initialize new structure members.
3395 (initialize_low): Call linux_check_ptrace_features.
3396 * lynx-low.c (lynx_target_ops): Initialize new structure
3397 members.
3398 * server.c (report_fork_events, report_vfork_events):
3399 New global flags.
3400 (handle_query): Add new features to qSupported packet and
3401 response.
3402 (captured_main): Initialize new global variables.
3403 * target.h (struct target_ops) <supports_fork_events>:
3404 New member.
3405 <supports_vfork_events>: New member.
3406 (target_supports_fork_events): New macro.
3407 (target_supports_vfork_events): New macro.
3408 * win32-low.c (win32_target_ops): Initialize new structure
3409 members.
3410
835205d0
GB
34112015-05-12 Gary Benson <gbenson@redhat.com>
3412
3413 * server.c (handle_qxfer_exec_file): Use current process
3414 if annex is empty.
3415
21e94bd9
SL
34162015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3417
3418 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3419 Remove HAVE_PTRACE_GETREGS conditionals.
3420 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3421 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3422
45614f15
YQ
34232015-05-08 Yao Qi <yao.qi@linaro.org>
3424
3425 * linux-low.c (linux_supports_conditional_breakpoints): New
3426 function.
3427 (linux_target_ops): Install new target method.
3428 * lynx-low.c (lynx_target_ops): Install NULL hook for
3429 supports_conditional_breakpoints.
3430 * nto-low.c (nto_target_ops): Likewise.
3431 * spu-low.c (spu_target_ops): Likewise.
3432 * win32-low.c (win32_target_ops): Likewise.
3433 * server.c (handle_query): Check
3434 target_supports_conditional_breakpoints.
3435 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3436 New field.
3437 (target_supports_conditional_breakpoints): New macro.
3438
80ad801e
PA
34392015-05-06 Pedro Alves <palves@redhat.com>
3440
3441 PR server/18081
3442 * server.c (start_inferior): If the process exits, mourn it.
3443
819843c7
GB
34442015-04-21 Gary Benson <gbenson@redhat.com>
3445
3446 * hostio.c (fileio_open_flags_to_host): Factored out to
3447 fileio_to_host_openflags in common/fileio.c. Single use
3448 updated.
3449
a2d5a9d7
MF
34502015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3451
3452 * linux-xtensa-low.c (xtensa_fill_gregset)
3453 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3454 XCHAL_HAVE_LOOP.
3455
deb44829
MF
34562015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3457
3458 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3459 (regs_info): Replace usrregs pointer with NULL.
3460
e57f1de3
GB
34612015-04-17 Gary Benson <gbenson@redhat.com>
3462
3463 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3464 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3465 * server.c (handle_qxfer_exec_file): New function.
3466 (qxfer_packets): Add exec-file entry.
3467 (handle_query): Report qXfer:exec-file:read as supported packet.
3468
62828379
RN
34692015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3470
3471 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3472
b88bb450
GB
34732015-04-09 Gary Benson <gbenson@redhat.com>
3474
3475 * hostio-errno.c (errno_to_fileio_error): Remove function.
3476 Update caller to use remote_fileio_to_fio_error.
3477
c8f4bfdd
YQ
34782015-04-09 Yao Qi <yao.qi@linaro.org>
3479
3480 * linux-low.c (linux_insert_point): Call
3481 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3482 (linux_remove_point): Call remove_memory_breakpoint if type is
3483 raw_bkpt_type_sw.
3484 * linux-x86-low.c (x86_insert_point): Don't call
3485 insert_memory_breakpoint.
3486 (x86_remove_point): Don't call remove_memory_breakpoint.
3487
41f98f02
PA
34882015-04-01 Pedro Alves <palves@redhat.com>
3489 Cleber Rosa <crosa@redhat.com>
3490
3491 * server.c (gdbserver_usage): Reorganize and extend the usage
3492 message.
3493
2bf6fb9d
PA
34942015-03-24 Pedro Alves <palves@redhat.com>
3495
3496 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3497 output. Also dump TRAP_TRACE.
3498 (linux_low_filter_event): In debug output, distinguish a
3499 resume_stop SIGSTOP from a delayed SIGSTOP.
3500
369f6daa
GB
35012015-03-24 Gary Benson <gbenson@redhat.com>
3502
3503 * linux-x86-low.c (x86_linux_new_thread): Moved to
3504 nat/x86-linux.c.
3505 (x86_linux_prepare_to_resume): Likewise.
3506
8e5d4070
GB
35072015-03-24 Gary Benson <gbenson@redhat.com>
3508
3509 * Makefile.in (x86-linux-dregs.o): New rule.
3510 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3511 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3512 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3513 (x86_linux_dr_get): Likewise.
3514 (x86_linux_dr_set): Likewise.
3515 (update_debug_registers_callback): Likewise.
3516 (x86_linux_dr_set_addr): Likewise.
3517 (x86_linux_dr_get_addr): Likewise.
3518 (x86_linux_dr_set_control): Likewise.
3519 (x86_linux_dr_get_control): Likewise.
3520 (x86_linux_dr_get_status): Likewise.
3521 (x86_linux_update_debug_registers): Likewise.
3522
2b95d440
GB
35232015-03-24 Gary Benson <gbenson@redhat.com>
3524
3525 * linux-x86-low.c (x86_linux_update_debug_registers):
3526 New function, factored out from...
3527 (x86_linux_prepare_to_resume): ...this.
3528
14b0bc68
GB
35292015-03-24 Gary Benson <gbenson@redhat.com>
3530
3531 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3532 (x86_linux_dr_set): Likewise.
3533 (update_debug_registers_callback): Likewise.
3534 (x86_linux_dr_set_addr): Likewise.
3535 (x86_linux_dr_get_addr): Likewise.
3536 (x86_linux_dr_set_control): Likewise.
3537 (x86_linux_dr_get_control): Likewise.
3538 (x86_linux_dr_get_status): Likewise.
3539 (x86_linux_prepare_to_resume): Likewise.
3540
5dfe6ca8
GB
35412015-03-24 Gary Benson <gbenson@redhat.com>
3542
3543 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3544 Use perror_with_name. Pass string through gettext.
3545 (x86_linux_dr_set): Likewise.
3546
d33472ad
GB
35472015-03-24 Gary Benson <gbenson@redhat.com>
3548
3549 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3550 (x86_linux_dr_set_addr): ...this.
3551 (x86_dr_low_get_addr): Rename to...
3552 (x86_linux_dr_get_addr): ...this.
3553 (x86_dr_low_set_control): Rename to...
3554 (x86_linux_dr_set_control): ...this.
3555 (x86_dr_low_get_control): Rename to...
3556 (x86_linux_dr_get_control): ...this.
3557 (x86_dr_low_get_status): Rename to...
3558 (x86_linux_dr_get_status): ...this.
3559 (x86_dr_low): Update with new function names.
3560
4b134ca1
GB
35612015-03-24 Gary Benson <gbenson@redhat.com>
3562
3563 * Makefile.in (x86-linux.o): New rule.
3564 * configure.srv: Add x86-linux.o to relevant targets.
3565 * linux-low.c (lwp_set_arch_private_info): New function.
3566 (lwp_arch_private_info): Likewise.
3567 * linux-x86-low.c: Include nat/x86-linux.h.
3568 (arch_lwp_info): Removed structure.
3569 (update_debug_registers_callback):
3570 Use lwp_set_debug_registers_changed.
3571 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3572 and lwp_set_debug_registers_changed.
3573 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3574
34c703da
GB
35752015-03-24 Gary Benson <gbenson@redhat.com>
3576
3577 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3578 * linux-arm-low.c (arm_new_thread): Likewise.
3579 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3580 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3581 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3582 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3583
cff068da
GB
35842015-03-24 Gary Benson <gbenson@redhat.com>
3585
3586 * linux-low.c (ptid_of_lwp): New function.
3587 (lwp_is_stopped): Likewise.
3588 (lwp_stop_reason): Likewise.
3589 * linux-x86-low.c (update_debug_registers_callback):
3590 Use lwp_is_stopped.
3591 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3592 lwp_stop_reason.
3593
b2f7c7e8
GB
35942015-03-24 Gary Benson <gbenson@redhat.com>
3595
3596 * linux-low.h (linux_stop_lwp): Remove declaration.
3597
6d4ee8c6
GB
35982015-03-24 Gary Benson <gbenson@redhat.com>
3599
3600 * linux-low.h: Include nat/linux-nat.h.
3601 * linux-low.c (iterate_over_lwps_args): New structure.
3602 (iterate_over_lwps_filter): New function.
3603 (iterate_over_lwps): Likewise.
3604 * linux-x86-low.c (update_debug_registers_callback):
3605 Update signature to what iterate_over_lwps expects.
3606 Remove PID check that iterate_over_lwps now performs.
3607 (x86_dr_low_set_addr): Use iterate_over_lwps.
3608 (x86_dr_low_set_control): Likewise.
3609
70a0bb6b
GB
36102015-03-24 Gary Benson <gbenson@redhat.com>
3611
3612 * linux-x86-low.c (x86_debug_reg_state): New function.
3613 (x86_linux_prepare_to_resume): Use the above.
3614
7b669087
GB
36152015-03-24 Gary Benson <gbenson@redhat.com>
3616
3617 * linux-low.c (current_lwp_ptid): New function.
3618 * linux-x86-low.c: Include nat/linux-nat.h.
3619 (x86_dr_low_get_addr): Use current_lwp_ptid.
3620 (x86_dr_low_get_control): Likewise.
3621 (x86_dr_low_get_status): Likewise.
3622
eef49a3d
PA
36232015-03-20 Pedro Alves <palves@redhat.com>
3624
3625 * tracepoint.c (cmd_qtstatus): Make "str" const.
3626
b2333d22
PA
36272015-03-20 Pedro Alves <palves@redhat.com>
3628
3629 * server.c (handle_general_set): Make "req_str" const.
3630
23f238d3
PA
36312015-03-19 Pedro Alves <palves@redhat.com>
3632
3633 * linux-low.c (linux_resume_one_lwp): Rename to ...
3634 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3635 instead call perror_with_name.
3636 (check_ptrace_stopped_lwp_gone): New function.
3637 (linux_resume_one_lwp): Reimplement as wrapper around
3638 linux_resume_one_lwp_throw that swallows errors if the LWP is
3639 gone.
3640
91baf43f
PA
36412015-03-19 Pedro Alves <palves@redhat.com>
3642
3643 * linux-low.c (count_events_callback, select_event_lwp_callback):
3644 No longer check whether the thread has resume_stop as last resume
3645 kind.
3646
8bf3b159
PA
36472015-03-19 Pedro Alves <palves@redhat.com>
3648
3649 * linux-low.c (count_events_callback, select_event_lwp_callback):
3650 Use the lwp's status_pending_p field, not the thread's.
3651
b90fc188
PA
36522015-03-19 Pedro Alves <palves@redhat.com>
3653
3654 * linux-low.c (select_event_lwp_callback): Update comments to
3655 no longer mention SIGTRAP.
3656
464b0089
GB
36572015-03-18 Gary Benson <gbenson@redhat.com>
3658
3659 * server.c (handle_query): Do not report vFile:fstat as supported.
3660
aa9e327f
GB
36612015-03-11 Gary Benson <gbenson@redhat.com>
3662
3663 * hostio.c (sys/types.h): New include.
3664 (sys/stat.h): Likewise.
3665 (common-remote-fileio.h): Likewise.
3666 (handle_fstat): New function.
3667 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 3668
791c0056
GB
36692015-03-11 Gary Benson <gbenson@redhat.com>
3670
3671 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3672 struct stat.st_blocks and struct stat.st_blksize.
3673 * configure: Regenerate.
3674 * config.in: Likewise.
3675 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3676 (OBS): Add common-remote-fileio.o.
3677 (common-remote-fileio.o): New rule.
3678
9a9df970
PA
36792015-03-09 Pedro Alves <palves@redhat.com>
3680
3681 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3682 'struct sockaddr' pointer in 'accept' call.
3683
9eb1356e
PA
36842015-03-09 Pedro Alves <palves@redhat.com>
3685
3686 Revert:
3687 2015-03-07 Pedro Alves <palves@redhat.com>
3688 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3689 or <winsock2.h> here. Instead include "gdb_socket.h".
3690 (remote_open): Use union gdb_sockaddr_u.
3691 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3692 or <winsock2.h> here. Instead include "gdb_socket.h".
3693 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3694 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3695 or <sys/un.h>.
3696 (init_named_socket, gdb_agent_helper_thread): Use union
3697 gdb_sockaddr_u.
3698
aac331e4
PA
36992015-03-07 Pedro Alves <palves@redhat.com>
3700
3701 * configure.ac (build_warnings): Move
3702 -Wdeclaration-after-statement to the C-specific set.
3703 * configure: Regenerate.
3704
366c75fc
PA
37052015-03-07 Pedro Alves <palves@redhat.com>
3706
3707 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3708 or <winsock2.h> here. Instead include "gdb_socket.h".
3709 (remote_open): Use union gdb_sockaddr_u.
3710 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3711 or <winsock2.h> here. Instead include "gdb_socket.h".
3712 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3713 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3714 or <sys/un.h>.
3715 (init_named_socket, gdb_agent_helper_thread): Use union
3716 gdb_sockaddr_u.
3717
492d29ea
PA
37182015-03-07 Pedro Alves <palves@redhat.com>
3719
3720 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3721 instead.
3722
60a191ed
YQ
37232015-03-06 Yao Qi <yao.qi@linaro.org>
3724
3725 * linux-aarch64-low.c (aarch64_insert_point): Use
3726 show_debug_regs as a boolean.
3727 (aarch64_remove_point): Likewise.
3728
f5771b1d
PA
37292015-03-05 Pedro Alves <palves@redhat.com>
3730
3731 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3732 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3733 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3734 * nto-low.c (nto_target_ops): Likewise.
3735 * spu-low.c (spu_target_ops): Likewise.
3736 * win32-low.c (win32_target_ops): Likewise.
3737
3e572f71
PA
37382015-03-04 Pedro Alves <palves@redhat.com>
3739
72f4393d 3740 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
3741 Decide whether a breakpoint triggered based on the SIGTRAP's
3742 siginfo.si_code.
72f4393d
L
3743 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3744 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
3745 (linux_low_filter_event): Check for breakpoints before checking
3746 watchpoints.
3747 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3748 siginfo.si_code.
72f4393d
L
3749 (linux_stopped_by_sw_breakpoint)
3750 (linux_supports_stopped_by_sw_breakpoint)
3751 (linux_stopped_by_hw_breakpoint)
3752 (linux_supports_stopped_by_hw_breakpoint): New functions.
3753 (linux_target_ops): Install new target methods.
3e572f71 3754
1ec68e26
PA
37552015-03-04 Pedro Alves <palves@redhat.com>
3756
3757 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3758 * server.c (swbreak_feature, hwbreak_feature): New globals.
3759 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3760 (captured_main): Clear swbreak_feature and hwbreak_feature.
3761 * server.h (swbreak_feature, hwbreak_feature): Declare.
3762 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3763 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3764 supports_stopped_by_hw_breakpoint>: New fields.
3765 (target_supports_stopped_by_sw_breakpoint)
3766 (target_stopped_by_sw_breakpoint)
3767 (target_supports_stopped_by_hw_breakpoint)
3768 (target_stopped_by_hw_breakpoint): Declare.
3769
15c66dd6
PA
37702015-03-04 Pedro Alves <palves@redhat.com>
3771
3772 enum lwp_stop_reason -> enum target_stop_reason
3773 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3774 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3775 (linux_wait_1, stuck_in_jump_pad_callback)
3776 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3777 (linux_stopped_by_watchpoint):
3778 * linux-low.h (enum lwp_stop_reason): Delete.
3779 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3780 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3781
98fc70d6
YQ
37822015-03-04 Yao Qi <yao.qi@linaro.org>
3783
3784 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3785
dd2ac174
GB
37862015-03-03 Gary Benson <gbenson@redhat.com>
3787
3788 * hostio.c (handle_vFile): Fix prefix lengths.
3789
d68e53f4
MM
37902015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3791
3792 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3793 ptr_bits.
3794
bf2d68ab
AA
37952015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3796
3797 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3798 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3799 (clean): Add "rm -f" for above C files.
3800 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3801 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3802 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3803 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3804 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3805 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3806 (init_registers_s390x_vx_linux64)
3807 (init_registers_s390x_tevx_linux64)
3808 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3809 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3810 declarations.
3811 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3812 (s390_store_vxrs_high): New functions.
3813 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3814 NT_S390_VXRS_HIGH.
3815 (s390_arch_setup): Add logic for selecting one of the new target
3816 descriptions. Activate the new vector regsets if applicable.
3817 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3818 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3819 and init_registers_s390x_tevx_linux64.
3820
c966a859
PA
38212015-03-01 Pedro Alves <palves@redhat.com>
3822
3823 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3824 parameter.
3825
4180215b
PA
38262015-02-27 Pedro Alves <palves@redhat.com>
3827
3828 * linux-x86-low.c (u_debugreg_offset): New function.
3829 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3830
749bab01
PA
38312015-02-27 Pedro Alves <palves@redhat.com>
3832
3833 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3834 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3835 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3836 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3837 (ps_lsetfpregs, ps_getpid)
3838 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3839 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3840 (ps_lsetxregs, ps_plog): Declare.
3841
3c14e5a3
PA
38422015-02-27 Pedro Alves <palves@redhat.com>
3843
3844 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3845 IP_AGENT_EXPORT_FUNC.
3846 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3847 IP_AGENT_EXPORT_FUNC.
3848 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3849 (IP_AGENT_EXPORT): Delete.
3850 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3851 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3852 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3853 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3854 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3855 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3856 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3857 (traceframe_read_count, traceframe_write_count)
3858 (traceframes_created, trace_state_variables, get_raw_reg)
3859 (get_trace_state_variable_value, set_trace_state_variable_value)
3860 (ust_loaded, helper_thread_id, cmd_buf): Use
3861 IPA_SYM_EXPORTED_NAME.
3862 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3863 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3864 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3865 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3866 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3867 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3868 EXTERN_C_PUSH/EXTERN_C_POP.
3869 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3870 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3871 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3872 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3873 (traceframe_write_count, traceframe_read_count)
3874 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3875 (about_to_request_buffer_space, get_trace_state_variable_value)
3876 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3877 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3878 EXTERN_C_PUSH/EXTERN_C_POP.
3879 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3880 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3881 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3882 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3883 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3884 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3885 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3886 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3887 Define.
3888 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3889 (IP_AGENT_EXPORT_VAR_DECL): Define.
3890 (tracing): Declare.
3891 (gdb_agent_get_raw_reg): Declare.
3892
fe978cb0
PA
38932015-02-27 Tom Tromey <tromey@redhat.com>
3894 Pedro Alves <palves@redhat.com>
3895
3896 Rename symbols whose names are reserved C++ keywords throughout.
3897
3bc3d82a
PA
38982015-02-27 Pedro Alves <palves@redhat.com>
3899
3900 * Makefile.in (COMPILER): New, get it from autoconf.
3901 (CXX): Get from autoconf instead.
3902 (COMPILE.pre): Use COMPILER.
3903 (CC-LD): Rename to ...
3904 (CC_LD): ... this. Use COMPILER.
3905 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3906 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3907 * acinclude.m4: Include build-with-cxx.m4.
3908 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3909 Disable -Werror by default if building in C++ mode.
3910 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3911 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3912 the C++ compiler. Save/restore CXXFLAGS too.
3913 * configure: Regenerate.
3914
07697489
PA
39152015-02-27 Pedro Alves <palves@redhat.com>
3916
3917 * acinclude.m4: Include libiberty.m4.
3918 * configure.ac: Call libiberty_INIT.
3919 * config.in, configure: Regenerate.
3920
9beb7c4e
PA
39212015-02-26 Pedro Alves <palves@redhat.com>
3922
3923 * linux-low.c (linux_wait_1): When incrementing the PC past a
3924 program breakpoint always use the_low_target.breakpoint_len as
3925 increment, rather than the maximum between that and
3926 the_low_target.decr_pc_after_break.
3927
8090aef2
PA
39282015-02-23 Pedro Alves <palves@redhat.com>
3929
3930 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3931 thread was doing a step-over; always adjust the PC if
3932 we stepped over a permanent breakpoint.
3933 (linux_wait_1): If we stepped over breakpoint that was on top of a
3934 permanent breakpoint, manually advance the PC past it.
3935
bc9540e8
PA
39362015-02-23 Pedro Alves <palves@redhat.com>
3937
3938 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3939 modes.
3940 (x86_fill_gregset, x86_store_gregset): Use it when handling
3941 $orig_eax.
3942
2db9a427
PA
39432015-02-20 Pedro Alves <palves@redhat.com>
3944
3945 * thread-db.c: Include "nat/linux-procfs.h".
3946 (thread_db_init): Skip listing new threads if the kernel supports
3947 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3948
afa8d396
PA
39492015-02-20 Pedro Alves <palves@redhat.com>
3950
3951 * linux-low.c (status_pending_p_callback): Use ptid_match.
3952
c9587f88
AT
39532015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3954
3955 PR breakpoints/16812
3956 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3957 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3958 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3959
b05ec7a5
AT
39602015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3961
3962 PR breakpoints/15956
3963 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3964
d33501a5
MM
39652015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3966
3967 * linux-low.c (linux_low_btrace_conf): Print size.
3968 * server.c (handle_btrace_conf_general_set): New.
3969 (hanle_general_set): Call handle_btrace_conf_general_set.
3970 (handle_query): Report Qbtrace-conf:bts:size as supported.
3971
f4abbc16
MM
39722015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3973
3974 * linux-low.c (linux_low_enable_btrace): Update parameters.
3975 (linux_low_btrace_conf): New.
3976 (linux_target_ops)<to_btrace_conf>: Initialize.
3977 * server.c (current_btrace_conf): New.
3978 (handle_btrace_enable): Rename to ...
3979 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
3980 to target_enable_btrace. Update comment. Update users.
3981 (handle_qxfer_btrace_conf): New.
3982 (qxfer_packets): Add btrace-conf entry.
3983 (handle_query): Report qXfer:btrace-conf:read as supported packet.
3984 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3985 (target_ops)<read_btrace_conf>: New.
3986 (target_enable_btrace): Update parameters.
3987 (target_read_btrace_conf): New.
3988
043c3577
MM
39892015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3990
3991 * server.c (handle_btrace_general_set): Remove call to
3992 target_supports_btrace.
3993 (supported_btrace_packets): New.
3994 (handle_query): Call supported_btrace_packets.
3995 * target.h: include btrace-common.h.
3996 (btrace_target_info): Removed.
3997 (supports_btrace, target_supports_btrace): Update parameters.
3998
734b0e4b
MM
39992015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4000
4001 * Makefile.in (SFILES): Add common/btrace-common.c.
4002 (OBS): Add common/btrace-common.o.
4003 (btrace-common.o): Add build rules.
4004 * linux-low: Include btrace-common.h.
4005 (linux_low_read_btrace): Use struct btrace_data. Call
4006 btrace_data_init and btrace_data_fini.
4007
d6c146e9
PA
40082015-02-06 Pedro Alves <palves@redhat.com>
4009
4010 * thread-db.c (find_new_threads_callback): Add debug output.
4011
20ba1ce6
PA
40122015-02-04 Pedro Alves <palves@redhat.com>
4013
4014 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4015 (resume_stopped_resumed_lwps): New function.
4016 (linux_wait_for_event_filtered): Use it.
4017
8cc73a39
SDJ
40182015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4019
4020 * Makefile.in (SFILES): Add linux-personality.c.
4021 (linux-personality.o): New rule.
4022 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4023 list of objects to be built.
4024 * linux-low.c: Include nat/linux-personality.h.
4025 (linux_create_inferior): Remove code to disable address space
4026 randomization (moved to ../nat/linux-personality.c). Create
4027 cleanup to disable address space randomization.
4028
fb23d554
SDJ
40292015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4030
4031 * Makefile.in (posix-strerror.o): New rule.
4032 (mingw-strerror.o): Likewise.
4033 * configure: Regenerated.
4034 * configure.ac: Source file ../common/common.host. Initialize new
4035 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4036
cdf43629
YQ
40372015-01-14 Yao Qi <yao@codesourcery.com>
4038
4039 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4040 (ppc-linux.o): New rule.
4041 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4042 * configure.ac: AC_CHECK_FUNCS(getauxval).
4043 * config.in: Re-generated.
4044 * configure: Re-generated.
4045 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4046 ppc64_64bit_inferior_p
4047
514c5338
YQ
40482015-01-14 Yao Qi <yao@codesourcery.com>
4049
4050 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4051 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4052 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4053 (PT_ORIG_R3, PT_TRAP): Likewise.
4054 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4055 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4056 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4057
3368c1e5
JB
40582015-01-10 Joel Brobecker <brobecker@adacore.com>
4059
4060 * i387-fp.c (i387_cache_to_xsave): In look over
4061 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4062 zmmh_low_space field by use of zmmh_high_space.
4063
582511be
PA
40642015-01-09 Pedro Alves <palves@redhat.com>
4065
4066 * linux-low.c (step_over_bkpt): Move higher up in the file.
4067 (handle_extended_wait): Don't store the stop_pc here.
4068 (get_stop_pc): Adjust comments and rename to ...
4069 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4070 stopped for a software breakpoint or hardware breakpoint.
4071 (thread_still_has_status_pending_p): New function.
4072 (status_pending_p_callback): Use
4073 thread_still_has_status_pending_p. If the event is no longer
4074 interesting, resume the LWP.
4075 (handle_tracepoints): Add assert.
4076 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4077 (wstatus_maybe_breakpoint): New function.
4078 (cancel_breakpoint): Delete function.
4079 (check_stopped_by_watchpoint): New function, factored out from
4080 linux_low_filter_event.
4081 (lp_status_maybe_breakpoint): Delete function.
4082 (linux_low_filter_event): Remove filter_ptid argument.
4083 Leave thread group exits pending here. Store the LWP's stop PC.
4084 Always leave events pending.
4085 (linux_wait_for_event_filtered): Pull all events out of the
4086 kernel, and leave them all pending.
4087 (count_events_callback, select_event_lwp_callback): Consider all
4088 events.
4089 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4090 (select_event_lwp): Only give preference to the stepping LWP in
4091 all-stop mode. Adjust comments.
4092 (ignore_event): New function.
4093 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4094 references to cancel_breakpoints. Adjust to renames. Also give
4095 equal priority to all LWPs that have had events in non-stop mode.
4096 If reporting a software breakpoint event, unadjust the LWP's PC.
4097 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4098 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4099 Adjust.
4100 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4101 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4102 (linux_stopped_by_watchpoint): Adjust.
4103 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4104 * linux-low.h (enum lwp_stop_reason): New.
4105 (struct lwp_info) <stop_pc>: Adjust comment.
4106 <stopped_by_watchpoint>: Delete field.
4107 <stop_reason>: New field.
4108 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4109 * mem-break.c (software_breakpoint_inserted_here)
4110 (hardware_breakpoint_inserted_here): New function.
4111 * mem-break.h (software_breakpoint_inserted_here)
4112 (hardware_breakpoint_inserted_here): Declare.
4113 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4114 (cancel_breakpoints): Delete.
4115 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4116 (upload_fast_traceframes): Remove references to
4117 cancel_breakpoints.
4118
a33e3959
PA
41192015-01-09 Pedro Alves <palves@redhat.com>
4120
4121 * thread-db.c (find_new_threads_callback): Ignore thread if the
4122 kernel thread ID is -1.
4123
8784d563
PA
41242015-01-09 Pedro Alves <palves@redhat.com>
4125
4126 * linux-low.c (linux_attach_fail_reason_string): Move to
4127 nat/linux-ptrace.c, and rename.
4128 (linux_attach_lwp): Update comment.
4129 (attach_proc_task_lwp_callback): New function.
4130 (linux_attach): Adjust to rename and use
4131 linux_proc_attach_tgid_threads.
4132 (linux_attach_fail_reason_string): Delete declaration.
4133
76f2b779
JB
41342015-01-01 Joel Brobecker <brobecker@adacore.com>
4135
4136 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4137 * server.c (gdbserver_version): Likewise.
4138
fafcc06a
SDJ
41392014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4140
4141 * remote-utils.c: Include ctype.h.
4142 (input_interrupt): Explicitly handle the case when the char
4143 received is the NUL byte. Improve the printing of non-ASCII
4144 characters.
4145
beed38b8
JB
41462014-12-16 Joel Brobecker <brobecker@adacore.com>
4147
4148 * linux-low.c (linux_low_filter_event): Update call to
4149 linux_enable_event_reporting following the addition of
4150 a new parameter to that function.
4151
bf330350
CU
41522014-12-16 Catalin Udma <catalin.udma@freescale.com>
4153
4154 PR server/17457
4155 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4156 (AARCH64_FPCR_REGNO): Likewise.
4157 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4158 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4159 (aarch64_store_fpregset): Likewise.
4160
5227d625
JB
41612014-12-15 Joel Brobecker <brobecker@adacore.com>
4162
4163 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4164 Remove FIXME comment about assumption about N.
4165
f93b65a0
JB
41662014-12-13 Joel Brobecker <brobecker@adacore.com>
4167
4168 * configure.ac: If large-file support is disabled in GDBserver,
4169 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4170 * configure: Regenerate.
4171
e5a9158d
AA
41722014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4173
4174 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4175 warning upon ENODATA from ptrace.
4176 * linux-s390-low.c (s390_store_tdb): New.
4177 (s390_regsets): Add regset for NT_S390_TDB.
4178
feea5f36
AA
41792014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4180
4181 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4182 without a fill_function.
4183 * linux-s390-low.c (s390_fill_last_break): Remove.
4184 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4185 (s390_arch_setup): Use regset's size instead of fill_function for
4186 loop end condition.
4187
098dbe61
AA
41882014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4189
4190 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4191 the regset's store function when ptrace returned an error.
4192 * regcache.c (get_thread_regcache): Invalidate register cache
4193 before fetching inferior's registers.
4194
28eef672
AA
41952014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4196
4197 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4198 while-loop as for-loop.
4199 (regsets_store_inferior_registers): Likewise.
4200
bdca27a2
YQ
42012014-11-28 Yao Qi <yao@codesourcery.com>
4202
4203 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4204 * config.in, configure: Re-generate.
4205 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4206 is defined.
4207
9c232dda
YQ
42082014-11-21 Yao Qi <yao@codesourcery.com>
4209
4210 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4211 (AC_CHECK_HEADERS): Remove malloc.h.
4212 * configure: Re-generated.
4213 * config.in: Re-generated.
4214 * server.h: Don't include alloca.h and malloc.h.
4215 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4216 Don't include malloc.h.
4217
43968415
JB
42182014-11-17 Joel Brobecker <brobecker@adacore.com>
4219
4220 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4221 corresponding ERRNO check in same block.
4222
40e91bc7
PA
42232014-11-12 Pedro Alves <palves@redhat.com>
4224
4225 * server.c (cont_thread): Update comment.
4226 (start_inferior, attach_inferior): No longer clear cont_thread.
4227 (handle_v_cont): No longer set cont_thread.
4228 (captured_main): Clear cont_thread each time a GDB connects.
4229
c2c118cf
PA
42302014-11-12 Pedro Alves <palves@redhat.com>
4231
4232 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4233 thread, and don't resume all threads if the Hc thread has exited.
4234
78708b7c
PA
42352014-11-12 Pedro Alves <palves@redhat.com>
4236
4237 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4238 the process group instead of to a specific LWP.
4239
a2abc7de
PA
42402014-10-15 Pedro Alves <palves@redhat.com>
4241
4242 PR server/17487
4243 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4244 parameter.
4245 (arm_set_thread_context): Delete.
4246 (the_low_target): Adjust.
4247 * win32-i386-low.c (debug_registers_changed)
4248 (debug_registers_used): Delete.
4249 (update_debug_registers_callback): New function.
4250 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4251 needing to update their debug registers.
4252 (win32_get_current_dr): New function.
4253 (x86_dr_low_get_addr, x86_dr_low_get_control)
4254 (x86_dr_low_get_status): Fetch the debug register from the thread
4255 record's context.
4256 (i386_initial_stuff): Adjust.
4257 (i386_get_thread_context): Remove current_event parameter. Don't
4258 clear debug_registers_changed nor copy DR values to
4259 debug_reg_state.
4260 (i386_set_thread_context): Delete.
4261 (i386_prepare_to_resume): New function.
4262 (i386_thread_added): Mark the thread as needing to update irs
4263 debug registers.
4264 (the_low_target): Remove i386_set_thread_context and install
4265 i386_prepare_to_resume.
4266 * win32-low.c (win32_get_thread_context): Adjust.
4267 (win32_set_thread_context): Use SetThreadContext
4268 directly.
4269 (win32_prepare_to_resume): New function.
4270 (win32_require_context): New function, factored out from ...
4271 (thread_rec): ... this.
4272 (continue_one_thread): Call win32_prepare_to_resume on each thread
4273 we're about to continue.
4274 (win32_resume): Call win32_prepare_to_resume on the event thread.
4275 * win32-low.h (struct win32_thread_info)
4276 <debug_registers_changed>: New field.
4277 (struct win32_target_ops): Change prototype of set_thread_context,
4278 delete set_thread_context and add prepare_to_resume.
4279 (win32_require_context): New declaration.
4280
a442d071
GB
42812014-10-08 Gary Benson <gbenson@redhat.com>
4282
4283 * server.h: Do not include common-exceptions.h.
4284
6f1947e8
GB
42852014-10-08 Gary Benson <gbenson@redhat.com>
4286
4287 * server.h: Do not include cleanups.h.
4288
63b434a4
JH
42892014-09-30 James Hogan <james.hogan@imgtec.com>
4290
4291 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4292 mips64-dsp-linux.c.
4293
c4d9ceb6
YQ
42942014-09-23 Yao Qi <yao@codesourcery.com>
4295
4296 * linux-low.c (lp_status_maybe_breakpoint): New function.
4297 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4298 (count_events_callback): Likewise.
4299 (select_event_lwp_callback): Likewise.
4300 (cancel_breakpoints_callback): Likewise.
4301
89a5711c
DB
43022014-09-19 Don Breazeal <donb@codesourcery.com>
4303
4304 * linux-low.c (handle_extended_wait): Call
4305 linux_ptrace_get_extended_event.
4306 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4307 linux_is_extended_waitstatus.
4308
bffc0964
JB
43092014-09-16 Joel Brobecker <brobecker@adacore.com>
4310
4311 * Makefile.in (CPPFLAGS): Define.
4312 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4313 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4314
0bfdf32f
GB
43152014-09-16 Gary Benson <gbenson@redhat.com>
4316
4317 * inferiors.h (current_inferior): Renamed as...
4318 (current_thread): New variable. All uses updated.
4319 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4320 (maybe_move_out_of_jump_pad): Likewise.
4321 (cancel_breakpoint): Likewise.
4322 (linux_low_filter_event): Likewise.
4323 (wait_for_sigstop): Likewise.
4324 (linux_resume_one_lwp): Likewise.
4325 (need_step_over_p): Likewise.
4326 (start_step_over): Likewise.
4327 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4328 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4329 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4330 and save_inferior as saved_thread.
4331 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4332 saved_thread.
4333 (regcache_invalidate_thread): Likewise.
4334 * remote-utils.c (prepare_resume_reply): Likewise.
4335 * thread-db.c (thread_db_get_tls_address): Likewise.
4336 (disable_thread_event_reporting): Likewise.
4337 (remove_thread_event_breakpoints): Likewise.
4338 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4339 as saved_thread.
4340 * target.h (set_desired_inferior): Renamed as...
4341 (set_desired_thread): New declaration. All uses updated.
4342 * server.c (myresume): Updated comment to reference thread instead
4343 of inferior.
4344 (handle_serial_event): Likewise.
4345 (handle_target_event): Likewise.
4346
361c8ade
GB
43472014-09-12 Tom Tromey <tromey@redhat.com>
4348 Gary Benson <gbenson@redhat.com>
4349
4350 * regcache.h: Include common-regcache.h.
4351 (regcache_read_pc): Don't declare.
4352 * regcache.c (get_thread_regcache_for_ptid): New function.
4353
bd9269f7
GB
43542014-09-11 Tom Tromey <tromey@redhat.com>
4355 Gary Benson <gbenson@redhat.com>
4356
4357 * symbol.c: New file.
4358 * Makefile.in (SFILES): Add symbol.c.
4359 (OBS): Add symbol.o.
4360
f8c1d06b
GB
43612014-09-11 Gary Benson <gbenson@redhat.com>
4362
4363 * target.c (target_stop_ptid, target_continue_ptid): New
4364 functions.
4365
721ec300
GB
43662014-09-11 Tom Tromey <tromey@redhat.com>
4367 Gary Benson <gbenson@redhat.com>
4368
4369 * target.h: Include target/target.h.
4370 * target.c (target_read_memory, target_read_uint32)
4371 (target_write_memory): New functions.
4372
c5e92cca
GB
43732014-09-11 Gary Benson <gbenson@redhat.com>
4374
4375 * server.h (debug_hw_points): Don't declare.
4376 * server.c (debug_hw_points): Don't define. Replace all uses
4377 with show_debug_regs.
4378 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4379 all uses with show_debug_regs.
4380
2e4bb98a
EBM
43812014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4382
4383 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4384 endianness into account.
4385 (ppc_supply_ptrace_register): Likewise.
4386
ac740bc7
JH
43872014-09-03 James Hogan <james.hogan@imgtec.com>
4388
4389 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4390 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4391
97ea6506
GB
43922014-09-03 Gary Benson <gbenson@redhat.com>
4393
4394 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4395 ALL_DEBUG_ADDRESS_REGISTERS.
4396
df7e5265
GB
43972014-09-02 Gary Benson <gbenson@redhat.com>
4398
4399 * i386-low.h: Renamed as...
4400 * x86-low.h: New file. All type, function and variable name
4401 prefixes changed from "i386_" to "x86_". All references updated.
4402 * i386-low.c: Renamed as...
4403 * x86-low.c: New file. All type, function and variable name
4404 prefixes changed from "i386_" to "x86_". All references updated.
4405
ed859da7
GB
44062014-09-02 Gary Benson <gbenson@redhat.com>
4407
4408 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4409 (x86_linux_new_thread): Likewise.
4410
860789c7
GB
44112014-08-29 Gary Benson <gbenson@redhat.com>
4412
4413 * server.h (setjmp.h): Do not include.
4414 (toplevel): Do not declare.
4415 (common-exceptions.h): Include.
4416 (cleanups.h): Likewise.
4417 * server.c (toplevel): Do not define.
4418 (exit_code): New static global.
4419 (detach_or_kill_for_exit_cleanup): New function.
4420 (main): New function. Original main renamed to...
4421 (captured_main): New function.
4422 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4423
ff55e1b5
GB
44242014-08-29 Gary Benson <gbenson@redhat.com>
4425
4426 * Makefile.in (SFILES): Add common/common-exceptions.c.
4427 (OBS): Add common-exceptions.o.
4428 (common-exceptions.o): New rule.
4429 * utils.c (prepare_to_throw_exception): New function.
4430
e9bcb658
GB
44312014-08-29 Gary Benson <gbenson@redhat.com>
4432
4433 * config.in: Regenerate.
4434 * configure: Likewise.
4435
e3180625
GB
44362014-08-29 Gary Benson <gbenson@redhat.com>
4437
4438 * Makefile.in (SFILES): Add common/cleanups.c.
4439 (OBS): cleanups.o.
4440 (cleanups.o): New rule.
4441
e3d6ba5d
GB
44422014-08-29 Gary Benson <gbenson@redhat.com>
4443
4444 * utils.c (internal_vwarning): New function.
4445
7096e886
GB
44462014-08-28 Gary Benson <gbenson@redhat.com>
4447
4448 * utils.h (fatal): Remove declaration.
4449 * utils.c (fatal): Remove function.
4450
14ce3192
GB
44512014-08-28 Gary Benson <gbenson@redhat.com>
4452
4453 * tracepoint.c (gdb_agent_init): Replace fatal with
4454 perror_with_name.
4455 (initialize_tracepoint): Likewise.
4456
50278d59
GB
44572014-08-28 Gary Benson <gbenson@redhat.com>
4458
4459 * remote-utils.c (remote_prepare): Replace fatal with error.
4460
aa96c426
GB
44612014-08-28 Gary Benson <gbenson@redhat.com>
4462
4463 * linux-low.c (linux_async): Replace fatal with warning.
4464 Tidy up and return.
4465 (linux_start_non_stop): Return -1 if linux_async failed.
4466
f7160e97
GB
44672014-08-28 Gary Benson <gbenson@redhat.com>
4468
4469 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4470 gdb_assert.
4471 (i386_dr_low_get_addr): Remove vague comment.
4472 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4473 gdb_assert.
4474
38e08fca
GB
44752014-08-28 Gary Benson <gbenson@redhat.com>
4476
4477 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4478 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4479 internal_error.
4480 (linux_resume_one_lwp): Likewise.
4481 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4482 gdb_assert.
4483 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4484 with internal_error.
4485 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4486 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4487 (find_register_by_name): Replace fatal with internal_error.
4488 (find_regno): Likewise.
4489 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4490 * thread-db.c (thread_db_create_event): Likewise.
4491 (thread_db_load_search): Likewise.
4492 (try_thread_db_load_1): Likewise.
4493 * tracepoint.c (get_jump_space_head): Replace fatal with
4494 internal_error.
4495 (claim_trampoline_space): Likewise.
4496 (have_fast_tracepoint_trampoline_buffer): Likewise.
4497 (cmd_qtstart): Likewise.
4498 (stop_tracing): Likewise.
4499 (fast_tracepoint_collecting): Likewise.
4500 (target_malloc): Likewise.
4501 (download_tracepoint): Likewise.
4502 (download_trace_state_variables): Replace check with gdb_assert.
4503 (upload_fast_traceframes): Replace fatal with internal_error.
4504
34abf635
GB
45052014-08-19 Tom Tromey <tromey@redhat.com>
4506 Gary Benson <gbenson@redhat.com>
4507
4508 * Makefile.in (SFILES): Add common/common-debug.c.
4509 (OBS): Add common-debug.o.
4510 (common-debug.o): New rule.
4511 * debug.h (debug_printf): Don't declare.
4512 * debug.c (debug_printf): Renamed and rewritten as...
4513 (debug_vprintf): New function.
4514
f6e94d78
GB
45152014-08-19 Gary Benson <gbenson@redhat.com>
4516
4517 * utils.h: Do not include print-utils.h.
4518
9239eeab
GB
45192014-08-19 Tom Tromey <tromey@redhat.com>
4520 Gary Benson <gbenson@redhat.com>
4521
4522 * server.h: Add static assertion.
4523 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4524
ef87c8bb
GB
45252014-08-19 Tom Tromey <tromey@redhat.com>
4526 Gary Benson <gbenson@redhat.com>
4527
4528 * Makefile.in (SFILES): Add common/errors.c.
4529 (OBS): Add errors.o.
4530 (IPA_OBS): Add errors-ipa.o.
4531 (errors.o): New rule.
4532 (errors-ipa.o): Likewise.
4533 * utils.h (perror_with_name, error, warning): Don't declare.
4534 * utils.c (warning): Renamed and rewritten as...
4535 (vwarning): New function.
4536 (error): Renamed and rewritten as...
4537 (verror): New function.
4538 (internal_error): Renamed and rewritten as...
4539 (internal_verror): New function.
4540
bb974a24
GB
45412014-08-07 Gary Benson <gbenson@redhat.com>
4542
4543 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4544 * configure: Regenerate.
4545 * config.in: Likewise.
4546 * server.h: Do not include errno.h.
4547 * event-loop.c: Likewise.
4548 * hostio-errno.c: Likewise.
4549 * linux-low.c: Likewise.
4550 * remote-utils.c: Likewise.
4551 * spu-low.c: Likewise.
4552 * utils.c: Likewise.
4553 * gdbreplay.c: Unconditionally include errno.h.
4554
6d3d12eb
GB
45552014-08-07 Gary Benson <gbenson@redhat.com>
4556
4557 * server.h: Do not include string.h.
4558 * event-loop.c: Likewise.
4559 * linux-low.c: Likewise.
4560 * regcache.c: Likewise.
4561 * remote-utils.c: Likewise.
4562 * spu-low.c: Likewise.
4563 * utils.c: Likewise.
4564
dccbb609
GB
45652014-08-07 Gary Benson <gbenson@redhat.com>
4566
4567 * server.h: Do not include gdb_assert.h.
4568
e76df0d0
GB
45692014-08-07 Gary Benson <gbenson@redhat.com>
4570
4571 * server.h: Do not include common-utils.h.
4572
4cb9c816
GB
45732014-08-07 Gary Benson <gbenson@redhat.com>
4574
4575 * server.h: Do not include ptid.h.
4576 * notif.h: Likewise.
4577
3995eeee
GB
45782014-08-07 Gary Benson <gbenson@redhat.com>
4579
4580 * server.h: Do not include gdb_locale.h.
4581
cb9f1a9b
GB
45822014-08-07 Gary Benson <gbenson@redhat.com>
4583
4584 * server.h: Do not include gdb/signals.h.
4585 * win32-low.c: Likewise.
4586
a5fceff8
GB
45872014-08-07 Gary Benson <gbenson@redhat.com>
4588
4589 * server.h: Do not include pathmax.h.
4590
b9391142
GB
45912014-08-07 Gary Benson <gbenson@redhat.com>
4592
4593 * server.h: Do not include libiberty.h.
4594 * linux-bfin-low.c: Likewise.
4595
0e443c87
GB
45962014-08-07 Gary Benson <gbenson@redhat.com>
4597
4598 * server.h: Do not include ansidecl.h.
4599
8ebb3f56
GB
46002014-08-07 Gary Benson <gbenson@redhat.com>
4601
4602 * linux-x86-low.c: Do not include stddef.h.
4603 * lynx-ppc-low.c: Likewise.
4604 * tracepoint.c: Likewise.
4605
8980bdf6
GB
46062014-08-07 Gary Benson <gbenson@redhat.com>
4607
4608 * server.h: Do not include stdarg.h.
4609 * nto-low.c: Likewise.
4610
d7096f71
GB
46112014-08-07 Gary Benson <gbenson@redhat.com>
4612
4613 * server.h: Do not include stdlib.h.
4614 * inferiors.c: Likewise.
4615 * linux-low.c: Likewise.
4616 * regcache.c: Likewise.
4617 * spu-low.c: Likewise.
4618 * tracepoint.c: Likewise.
4619 * utils.c: Likewise.
4620
d02f550d
GB
46212014-08-07 Gary Benson <gbenson@redhat.com>
4622
4623 * server.h: Do not include stdio.h.
4624 * linux-low.c: Likewise.
4625 * remote-utils.c: Likewise.
4626 * spu-low.c: Likewise.
4627 * utils.c: Likewise.
4628 * wincecompat.c: Likewise.
4629
87f6c4e3
GB
46302014-08-06 Gary Benson <gbenson@redhat.com>
4631
4632 * regcache.c (init_register_cache): Move conditionals inside if.
4633
7089dca4
GB
46342014-08-06 Gary Benson <gbenson@redhat.com>
4635
4636 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4637
462f517e
GB
46382014-07-31 Gary Benson <gbenson@redhat.com>
4639
4640 * ax.h: Do not include server.h.
4641 * gdbthread.h: Likewise.
4642 * lynx-low.h: Likewise.
4643 * notif.h: Likewise.
4644
976411d6
GB
46452014-07-30 Gary Benson <gbenson@redhat.com>
4646
4647 * server.h: Include common-defs.h.
4648 Do not include config.h or build-gnulib-gdbserver/config.h.
4649
d41f6d8e
GB
46502014-07-30 Gary Benson <gbenson@redhat.com>
4651
4652 * hostio-errno.c: Move server.h to top of includes list.
4653 * inferiors.c: Likewise.
4654 * linux-x86-low.c: Likewise.
4655 * notif.c: Include server.h.
4656
314c6a35
TT
46572014-07-24 Tom Tromey <tromey@redhat.com>
4658 Gary Benson <gbenson@redhat.com>
4659
4660 * server.h (CORE_ADDR): Now unsigned.
4661
69ff6be5
PA
46622014-07-16 Pedro Alves <palves@redhat.com>
4663
4664 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4665
ce9e3fe7
PA
46662014-07-15 Pedro Alves <palves@redhat.com>
4667
4668 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4669 copy.
4670
e76126e8
PA
46712014-07-11 Pedro Alves <palves@redhat.com>
4672
4673 * linux-low.c (kill_wait_lwp): New function, based on
4674 kill_one_lwp_callback, but use my_waitpid directly.
4675 (kill_one_lwp_callback, linux_kill): Use it.
4676
8e9db26e
PA
46772014-06-23 Pedro Alves <palves@redhat.com>
4678
4679 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4680 before setting DR0..DR3.
4681
698b3e08
GB
46822014-06-20 Gary Benson <gbenson@redhat.com>
4683
4684 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4685 * configure: Regenerated.
4686 * config.in: Likewise.
4687
125f8a3d
GB
46882014-06-20 Gary Benson <gbenson@redhat.com>
4689
4690 * Makefile.in (SFILES): Update locations for files moved
4691 from common to nat.
4692 (object file files): Reordered.
4693
42995dbd
GB
46942014-06-20 Gary Benson <gbenson@redhat.com>
4695
4696 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4697 (i386_dr_low_set_addr): Likewise.
4698 (i386_dr_low_get_addr): Likewise.
4699 (i386_dr_low_can_set_control): Likewise.
4700 (i386_dr_low_set_control): Likewise.
4701 (i386_dr_low_get_control): Likewise.
4702 (i386_dr_low_get_status): Likewise.
4703 (i386_get_debug_register_length): Likewise.
4704 * linux-x86-low.c (i386_dr_low_set_addr):
4705 Changed signature. Made static.
4706 (i386_dr_low_get_addr): Likewise.
4707 (i386_dr_low_set_control): Likewise.
4708 (i386_dr_low_get_control): Likewise.
4709 (i386_dr_low_get_status): Likewise.
4710 (i386_dr_low): New global variable.
4711 * win32-i386-low.c (i386_dr_low_set_addr):
4712 Changed signature. Made static.
4713 (i386_dr_low_get_addr): Likewise.
4714 (i386_dr_low_set_control): Likewise.
4715 (i386_dr_low_get_control): Likewise.
4716 (i386_dr_low_get_status): Likewise.
4717 (i386_dr_low): New global variable.
4718
e1d2394b
MS
47192014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4720
4721 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4722 * Makefile.in (AR, AR_FLAGS): Define.
4723 * configure: Regenerate.
4724
3a8ee006
GB
47252014-06-19 Gary Benson <gbenson@redhat.com>
4726
4727 * Makefile.in (i386-dregs.o): New rule.
4728 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4729 * i386-low.c (target.h): Remove include.
4730 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4731 (DR_CONTROL_SHIFT): Likewise.
4732 (DR_CONTROL_SIZE): Likewise.
4733 (DR_RW_EXECUTE): Likewise.
4734 (DR_RW_WRITE): Likewise.
4735 (DR_RW_READ): Likewise.
4736 (DR_RW_IORW): Likewise.
4737 (DR_LEN_1): Likewise.
4738 (DR_LEN_2): Likewise.
4739 (DR_LEN_4): Likewise.
4740 (DR_LEN_8): Likewise.
4741 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4742 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4743 (DR_ENABLE_SIZE): Likewise.
4744 (DR_LOCAL_SLOWDOWN): Likewise.
4745 (DR_GLOBAL_SLOWDOWN): Likewise.
4746 (DR_CONTROL_RESERVED): Likewise.
4747 (I386_DR_CONTROL_MASK): Likewise.
4748 (I386_DR_VACANT): Likewise.
4749 (I386_DR_LOCAL_ENABLE): Likewise.
4750 (I386_DR_GLOBAL_ENABLE): Likewise.
4751 (I386_DR_DISABLE): Likewise.
4752 (I386_DR_SET_RW_LEN): Likewise.
4753 (I386_DR_GET_RW_LEN): Likewise.
4754 (I386_DR_WATCH_HIT): Likewise.
4755 (i386_wp_op_t): Likewise.
4756 (i386_show_dr): Likewise.
4757 (i386_length_and_rw_bits): Likewise.
4758 (i386_insert_aligned_watchpoint): Likewise.
4759 (i386_remove_aligned_watchpoint): Likewise.
4760 (i386_handle_nonaligned_watchpoint): Likewise.
4761 i386_update_inferior_debug_regs(): Likewise.
4762 (i386_dr_insert_watchpoint): Likewise.
4763 (i386_dr_remove_watchpoint): Likewise.
4764 (i386_dr_region_ok_for_watchpoint): Likewise.
4765 (i386_dr_stopped_data_address): Likewise.
4766 (i386_dr_stopped_by_watchpoint): Likewise.
4767
8f26655c
GB
47682014-06-19 Gary Benson <gbenson@redhat.com>
4769
4770 * i386-low.c (i386_dr_show): Renamed to
4771 i386_show_dr and made static. All uses updated.
4772 (i386_dr_length_and_rw_bits): Renamed to
4773 i386_length_and_rw_bits and made static.
4774 All uses updated.
4775 (i386_dr_insert_aligned_watchpoint): Renamed to
4776 i386_insert_aligned_watchpoint and made static.
4777 All uses updated.
4778 (i386_dr_remove_aligned_watchpoint): Renamed to
4779 i386_remove_aligned_watchpoint and made static.
4780 All uses updated.
4781 (i386_dr_update_inferior_debug_regs): Renamed to
4782 i386_update_inferior_debug_regs and made static.
4783 All uses updated.
4784
b9228891
GB
47852014-06-18 Gary Benson <gbenson@redhat.com>
4786
5171def3
GB
4787 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4788 (i386_dr_low_can_set_control): Likewise.
4789 (i386_get_debug_register_length): Likewise.
4790 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4791 (i386_dr_low_can_set_control): Likewise.
4792 (i386_get_debug_register_length): Likewise.
4793
47942014-06-17 Gary Benson <gbenson@redhat.com>
4795
b9228891
GB
4796 * i386-low.h (i386-dregs.h): New include.
4797 (DR_FIRSTADDR): Now in i386-dregs.h.
4798 (DR_LASTADDR): Likewise.
4799 (DR_NADDR): Likewise.
4800 (DR_STATUS): Likewise.
4801 (DR_CONTROL): Likewise.
4802 (i386_debug_reg_state): Likewise.
4803 (i386_dr_insert_watchpoint): Likewise.
4804 (i386_dr_remove_watchpoint): Likewise.
4805 (i386_dr_region_ok_for_watchpoint): Likewise.
4806 (i386_dr_stopped_data_address): Likewise.
4807 (i386_dr_stopped_by_watchpoint): Likewise.
4808 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4809
4be83cc2
GB
48102014-06-18 Gary Benson <gbenson@redhat.com>
4811
4812 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4813 i386_dr_insert_watchpoint.
4814 (i386_low_remove_watchpoint): Renamed to
4815 i386_dr_remove_watchpoint.
4816 (i386_low_region_ok_for_watchpoint): Renamed to
4817 i386_dr_region_ok_for_watchpoint.
4818 (i386_low_stopped_data_address): Renamed to
4819 i386_dr_stopped_data_address.
4820 (i386_low_stopped_by_watchpoint): Renamed to
4821 i386_dr_stopped_by_watchpoint.
4822 * i386-low.c (i386_show_dr): Renamed to
4823 i386_dr_show and made nonstatic. All uses updated.
4824 (i386_length_and_rw_bits): Renamed to
4825 i386_dr_length_and_rw_bits and made nonstatic.
4826 All uses updated.
4827 (i386_insert_aligned_watchpoint): Renamed to
4828 i386_dr_insert_aligned_watchpoint and made nonstatic.
4829 All uses updated.
4830 (i386_remove_aligned_watchpoint): Renamed to
4831 i386_dr_remove_aligned_watchpoint and made nonstatic.
4832 All uses updated.
4833 (i386_update_inferior_debug_regs): Renamed to
4834 i386_dr_update_inferior_debug_regs and made nonstatic.
4835 All uses updated.
4836 (i386_low_insert_watchpoint): Renamed to
4837 i386_dr_insert_watchpoint. All uses updated.
4838 (i386_low_remove_watchpoint): Renamed to
4839 i386_dr_remove_watchpoint. All uses updated.
4840 (i386_low_region_ok_for_watchpoint): Renamed to
4841 i386_dr_region_ok_for_watchpoint. All uses updated.
4842 (i386_low_stopped_data_address): Renamed to
4843 i386_dr_stopped_data_address. All uses updated.
4844 (i386_low_stopped_by_watchpoint): Renamed to
4845 i386_dr_stopped_by_watchpoint. All uses updated.
4846
131aa0d4
GB
48472014-06-18 Gary Benson <gbenson@redhat.com>
4848
4849 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4850 (i386_dr_low_can_set_control): Likewise.
4851 (i386_insert_aligned_watchpoint): New check.
4852
d9305f7f
GB
48532014-06-18 Gary Benson <gbenson@redhat.com>
4854
4855 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4856 Renamed to state.
4857
e927c9fc
GB
48582014-06-18 Gary Benson <gbenson@redhat.com>
4859
4860 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4861 instead of fatal and error.
4862 (i386_handle_nonaligned_watchpoint): Likewise.
4863
1b6d4134
GB
48642014-06-18 Gary Benson <gbenson@redhat.com>
4865
4866 * i386-low.c (i386_get_debug_register_length): New macro.
4867 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4868 (i386_show_dr): Use debug_printf instead of fprintf. Use
4869 phex to format values.
4870
6e62758f
GB
48712014-06-18 Gary Benson <gbenson@redhat.com>
4872
4873 * i386-low.h: Comment changes.
4874 * i386-low.c: Likewise.
4875
fc6e2f03
GB
48762014-06-18 Gary Benson <gbenson@redhat.com>
4877
4878 * i386-low.c: Whitespace changes.
4879
f9d1eeed
TT
48802014-06-12 Tom Tromey <tromey@redhat.com>
4881
4882 * utils.c (freeargv): Remove.
4883
0b04e523
TT
48842014-06-12 Tom Tromey <tromey@redhat.com>
4885
4886 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4887 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4888 (parse_debug_format_options): Likewise.
4889 (gdbserver_usage): Likewise.
4890 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4891 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4892 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4893 against libiberty.
4894 ($(LIBGNU)): Depend on libiberty.
4895 (all-lib): Recurse into all subdirs.
4896 (install-only): Invoke "install" target in subdirs.
4897 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4898 targets.
4899 * configure: Rebuild.
4900 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4901 for vasprintf, vsnprintf, or gettimeofday.
4902 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4903 srv_tgtobj.
4904
270c9937
JB
49052014-06-05 Joel Brobecker <brobecker@adacore.com>
4906
4907 * development.sh: Delete.
4908 * Makefile.in (config.status): Adjust dependency on development.sh.
4909 * configure.ac: Adjust development.sh source call.
4910 * configure: Regenerate.
4911
0a261ed8
PA
49122014-06-02 Pedro Alves <palves@redhat.com>
4913
4914 * ax.c (gdb_free_agent_expr): New function.
4915 * ax.h (gdb_free_agent_expr): New declaration.
4916 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4917 list.
4918 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4919 static.
4920 (clear_breakpoint_conditions_and_commands): New function.
4921 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4922 (clear_breakpoint_conditions_and_commands): New declaration.
4923
e9dae05e
RR
49242014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4925
4926 * linux-aarch64-low.c (asm/ptrace.h): Include.
4927
5876f503
JK
49282014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4929
4930 Fix TLS access for -static -pthread.
4931 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4932 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4933 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4934
802e8e6d
PA
49352014-05-20 Pedro Alves <palves@redhat.com>
4936
4937 * linux-aarch64-low.c (aarch64_insert_point)
4938 (aarch64_remove_point): No longer check whether the type is
4939 supported here. Adjust to new interface.
4940 (the_low_target): Install aarch64_supports_z_point_type as
4941 supports_z_point_type method.
4942 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4943 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4944 instead of a Z packet char. Adjust.
4945 (arm_supports_z_point_type): New function.
4946 (arm_insert_point, arm_remove_point): Adjust to new interface.
4947 (the_low_target): Install arm_supports_z_point_type.
4948 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4949 (cris_insert_point, cris_remove_point): Adjust to new interface.
4950 Don't check whether the type is supported here.
4951 (the_low_target): Install cris_supports_z_point_type.
4952 * linux-low.c (linux_supports_z_point_type): New function.
4953 (linux_insert_point, linux_remove_point): Adjust to new interface.
4954 * linux-low.h (struct linux_target_ops) <insert_point,
4955 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4956 raw_breakpoint pointer parameter.
4957 <supports_z_point_type>: New method.
4958 * linux-mips-low.c (mips_supports_z_point_type): New function.
4959 (mips_insert_point, mips_remove_point): Adjust to new interface.
4960 Use mips_supports_z_point_type.
4961 (the_low_target): Install mips_supports_z_point_type.
4962 * linux-ppc-low.c (the_low_target): Install NULL as
4963 supports_z_point_type method.
4964 * linux-s390-low.c (the_low_target): Install NULL as
4965 supports_z_point_type method.
4966 * linux-sparc-low.c (the_low_target): Install NULL as
4967 supports_z_point_type method.
4968 * linux-x86-low.c (x86_supports_z_point_type): New function.
4969 (x86_insert_point): Adjust to new insert_point interface. Use
4970 insert_memory_breakpoint. Adjust to new
4971 i386_low_insert_watchpoint interface.
4972 (x86_remove_point): Adjust to remove_point interface. Use
4973 remove_memory_breakpoint. Adjust to new
4974 i386_low_remove_watchpoint interface.
4975 (the_low_target): Install x86_supports_z_point_type.
4976 * lynx-low.c (lynx_target_ops): Install NULL as
4977 supports_z_point_type callback.
4978 * nto-low.c (nto_supports_z_point_type): New.
4979 (nto_insert_point, nto_remove_point): Adjust to new interface.
4980 (nto_target_ops): Install nto_supports_z_point_type.
4981 * mem-break.c: Adjust intro comment.
4982 (struct raw_breakpoint) <raw_type, size>: New fields.
4983 <inserted>: Update comment.
4984 <shlib_disabled>: Delete field.
4985 (enum bkpt_type) <gdb_breakpoint>: Delete value.
4986 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4987 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4988 (raw_bkpt_type_to_target_hw_bp_type): New function.
4989 (find_enabled_raw_code_breakpoint_at): New function.
4990 (find_raw_breakpoint_at): New type and size parameters. Use them.
4991 (insert_memory_breakpoint): New function, based off
4992 set_raw_breakpoint_at.
4993 (remove_memory_breakpoint): New function.
4994 (set_raw_breakpoint_at): Reimplement.
4995 (set_breakpoint): New, based on set_breakpoint_at.
4996 (set_breakpoint_at): Reimplement.
4997 (delete_raw_breakpoint): Go through the_target->remove_point
4998 instead of assuming memory breakpoints.
4999 (find_gdb_breakpoint_at): Delete.
5000 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5001 (find_gdb_breakpoint): New function.
5002 (set_gdb_breakpoint_at): Delete.
5003 (z_type_supported): New function.
5004 (set_gdb_breakpoint_1): New function, loosely based off
5005 set_gdb_breakpoint_at.
5006 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5007 (delete_gdb_breakpoint_at): Delete.
5008 (delete_gdb_breakpoint_1): New function, loosely based off
5009 delete_gdb_breakpoint_at.
5010 (delete_gdb_breakpoint): New function.
5011 (clear_gdb_breakpoint_conditions): Rename to ...
5012 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5013 breakpoint.
5014 (add_condition_to_breakpoint): Make static.
5015 (add_breakpoint_condition): Take a struct breakpoint pointer
5016 instead of an address. Adjust.
5017 (gdb_condition_true_at_breakpoint): Rename to ...
5018 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5019 z_type parameter.
5020 (gdb_condition_true_at_breakpoint): Reimplement.
5021 (add_breakpoint_commands): Take a struct breakpoint pointer
5022 instead of an address. Adjust.
5023 (gdb_no_commands_at_breakpoint): Rename to ...
5024 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5025 parameter. Return true if no breakpoint was found. Change debug
5026 output.
5027 (gdb_no_commands_at_breakpoint): Reimplement.
5028 (run_breakpoint_commands): Rename to ...
5029 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5030 and change return type to boolean.
5031 (run_breakpoint_commands): New function.
5032 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5033 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5034 breakpoint. Go through the_target->remove_point instead of
5035 assuming memory breakpoint.
5036 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5037 software and hardware breakpoints.
5038 (reinsert_raw_breakpoint): Go through the_target->insert_point
5039 instead of assuming memory breakpoint.
5040 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5041 software and hardware breakpoints.
5042 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5043 Check both software and hardware breakpoints.
5044 (validate_inserted_breakpoint): Assert the breakpoint is a
5045 software breakpoint. Set the inserted flag to -1 instead of
5046 setting shlib_disabled.
5047 (delete_disabled_breakpoints): Adjust.
5048 (validate_breakpoints): Only validate software breakpoints.
5049 Adjust to inserted flag change.
5050 (check_mem_read, check_mem_write): Skip breakpoint types other
5051 than software breakpoints. Adjust to inserted flag change.
5052 * mem-break.h (enum raw_bkpt_type): New enum.
5053 (raw_breakpoint, struct process_info): Forward declare.
5054 (Z_packet_to_target_hw_bp_type): Delete declaration.
5055 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5056 (set_gdb_breakpoint, delete_gdb_breakpoint)
5057 (clear_breakpoint_conditions): New declarations.
5058 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5059 (breakpoint_inserted_here): Update comment.
5060 (add_breakpoint_condition, add_breakpoint_commands): Replace
5061 address parameter with a breakpoint pointer parameter.
5062 (gdb_breakpoint_here): Update comment.
5063 (delete_gdb_breakpoint_at): Delete.
5064 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5065 * server.c (process_point_options): Take a struct breakpoint
5066 pointer instead of an address. Adjust.
5067 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5068 delete_gdb_breakpoint.
5069 * spu-low.c (spu_target_ops): Install NULL as
5070 supports_z_point_type method.
5071 * target.h: Include mem-break.h.
5072 (struct target_ops) <prepare_to_access_memory>: Update comment.
5073 <supports_z_point_type>: New field.
5074 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5075 instead of a char. Also take a raw breakpoint pointer.
5076 * win32-arm-low.c (the_low_target): Install NULL as
5077 supports_z_point_type.
5078 * win32-i386-low.c (i386_supports_z_point_type): New function.
5079 (i386_insert_point, i386_remove_point): Adjust to new interface.
5080 (the_low_target): Install i386_supports_z_point_type.
5081 * win32-low.c (win32_supports_z_point_type): New function.
5082 (win32_insert_point, win32_remove_point): Adjust to new interface.
5083 (win32_target_ops): Install win32_supports_z_point_type.
5084 * win32-low.h (struct win32_target_ops):
5085 <supports_z_point_type>: New method.
5086 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5087 instead of a char. Also take a raw breakpoint pointer.
5088
932539e3
PA
50892014-05-20 Pedro Alves <palves@redhat.com>
5090
5091 * mem-break.h: Include break-common.h.
5092 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5093 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5094 (Z_packet_to_target_hw_bp_type): New declaration.
5095 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5096 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5097 (Z_PACKET_ACCESS_WP): Delete macros.
5098 (Z_packet_to_hw_type): Delete function.
5099 * i386-low.h: Don't include break-common.h here.
5100 (Z_packet_to_hw_type): Delete declaration.
5101 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5102 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5103 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5104 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5105 * linux-aarch64-low.c: Don't include break-common.h here.
5106 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5107 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5108 (Z_packet_to_target_hw_bp_type): Delete function.
5109 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5110 function.
5111 (mips_insert_point, mips_remove_point): Use
5112 Z_packet_to_target_hw_bp_type.
5113
4ff0d3d8
PA
51142014-05-20 Pedro Alves <palves@redhat.com>
5115
5116 * linux-aarch64-low.c: Include break-common.h.
5117 (enum target_point_type): Delete.
5118 (Z_packet_to_point_type): Rename to ...
5119 (Z_packet_to_target_hw_bp_type): ... this, and return a
5120 target_hw_bp_type instead.
5121 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5122 instead of an enum target_point_type.
5123 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5124 breakpoint type.
5125 (aarch64_dr_state_insert_one_point)
5126 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5127 (aarch64_handle_aligned_watchpoint)
5128 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5129 Take an enum target_hw_bp_type instead of an enum
5130 target_point_type.
5131 (aarch64_supports_z_point_type): New function.
5132 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5133 use Z_packet_to_target_hw_bp_type.
5134
786dc519
JB
51352014-05-20 Joel Brobecker <brobecker@adacore.com>
5136
5137 * configure.ac: Only use -Werror by default when DEVELOPMENT
5138 is true.
5139 * configure: Regenerate.
5140
9e0aa64f
JK
51412014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5142
5143 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5144 * linux-x86-low.c (X86_64_USER_REGS): New.
5145 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5146
2b577b92
YQ
51472014-04-28 Yao Qi <yao@codesourcery.com>
5148
5149 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5150 name.
5151
94611da2
PA
51522014-04-25 Pedro Alves <palves@redhat.com>
5153
5154 PR server/16255
5155 * linux-low.c (linux_attach_fail_reason_string): New function.
5156 (linux_attach_lwp): Delete.
5157 (linux_attach_lwp_1): Rename to ...
5158 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5159 argument. Remove "initial" parameter. Return int instead of
5160 void. Don't error or warn here.
5161 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5162 failure to attach to the tgid. Call warning when failing to
5163 attach to an lwp.
5164 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5165 argument. Remove "initial" parameter. Return int instead of
5166 void. Don't error or warn here.
5167 (linux_attach_fail_reason_string): New declaration.
5168 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5169 interface change. Use linux_attach_fail_reason_string.
5170
01f9f808
MS
51712014-04-24 Michael Sturm <michael.sturm@mintel.com>
5172 Walfred Tedeschi <walfred.tedeschi@intel.com>
5173
5174 * Makefile.in: Added rules to handle new files
5175 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5176 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5177 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5178 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5179 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5180 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5181 x32-avx512-linux.o.
5182 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5183 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5184 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5185 i386/x32-avx512.xml.
5186 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5187 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5188 i386/x32-avx512-linux.xml.
5189 * i387-fp.c (num_avx512_k_registers): New constant for number
5190 of K registers.
5191 (num_avx512_zmmh_low_registers): New constant for number of
5192 lower ZMM registers (0-15).
5193 (num_avx512_zmmh_high_registers): New constant for number of
5194 higher ZMM registers (16-31).
5195 (num_avx512_ymmh_registers): New contant for number of higher
5196 YMM registers (ymm16-31 added by avx521 on x86_64).
5197 (num_avx512_xmm_registers): New constant for number of higher
5198 XMM registers (xmm16-31 added by AVX512 on x86_64).
5199 (struct i387_xsave): Add space for AVX512 registers.
5200 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5201 Add code to handle AVX512 registers.
5202 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5203 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5204 prototypei from generated file.
5205 (tdesc_amd64_avx512_linux): Likewise.
5206 (init_registers_x32_avx512_linux): Likewise.
5207 (tdesc_x32_avx512_linux): Likewise.
5208 (init_registers_i386_avx512_linux): Likewise.
5209 (tdesc_i386_avx512_linux): Likewise.
5210 (x86_64_regmap): Add AVX512 registers.
5211 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5212 mask.
5213 (initialize_low_arch): Add code to initialize AVX512 registers.
5214
51aa91f9
PA
52152014-04-23 Pedro Alves <palves@redhat.com>
5216
5217 * mem-break.c (find_gdb_breakpoint_at): Make static.
5218 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5219
a4165e94
PA
52202014-04-23 Pedro Alves <palves@redhat.com>
5221
5222 * i386-low.c: Don't include break-common.h here.
5223 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5224 prototype to take target_hw_bp_type as argument instead of a Z
5225 packet char.
5226 * i386-low.h: Include break-common.h here.
5227 (Z_packet_to_hw_type): Declare.
5228 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5229 prototypes.
5230 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5231 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5232 (x86_remove_point): Convert the packet number to a
5233 target_hw_bp_type before calling i386_low_remove_watchpoint.
5234 * win32-i386-low.c (i386_insert_point): Convert the packet number
5235 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5236 (i386_remove_point): Convert the packet number to a
5237 target_hw_bp_type before calling i386_low_remove_watchpoint.
5238
b8acf843
PA
52392014-04-23 Pedro Alves <palves@redhat.com>
5240
5241 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5242
d708bcd1
PA
52432014-04-10 Pedro Alves <palves@redhat.com>
5244
5245 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5246 Check if the condition or command is NULL before checking if the
5247 breakpoint is known. On success, return true.
5248 * mem-break.h (add_breakpoint_condition): Document return.
5249 (add_breakpoint_commands): Add describing comment.
5250 * server.c (skip_to_semicolon): New function.
5251 (process_point_options): Use it.
5252
2eec7d5b
PA
52532014-04-09 Pedro Alves <palves@redhat.com>
5254
5255 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5256 to lwpid_of.
5257
fa96cb38
PA
52582014-02-27 Pedro Alves <palves@redhat.com>
5259
5260 PR 12702
5261 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5262 macros.
5263 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5264 output.
5265 (last_thread_of_process_p): Take a PID argument instead of a
5266 thread pointer.
5267 (linux_wait_for_lwp): Delete.
5268 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5269 functions.
5270 (linux_low_filter_event): New function, party factored out from
5271 linux_wait_for_event.
5272 (linux_wait_for_event): Rename to ...
5273 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5274 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5275 sigsuspend. Check for zombie leaders.
5276 (linux_wait_for_event): Reimplement as wrapper around
5277 linux_wait_for_event_filtered.
5278 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5279 a normal or signal exit is seen, it's the whole process exiting.
5280 (wait_for_sigstop): No longer a for_each_inferior callback.
5281 Rewrite on top of linux_wait_for_event_filtered.
5282 (stop_all_lwps): Call wait_for_sigstop directly.
5283 * server.c (resume, handle_target_event): Handle
5284 TARGET_WAITKIND_NO_RESUMED.
5285
d763de10
JB
52862014-02-26 Joel Brobecker <brobecker@adacore.com>
5287
5288 * win32-low.c (psapi_get_dll_name,
5289 * win32_CreateToolhelp32Snapshot): Delete.
5290 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5291 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5292 Delete.
5293 (handle_load_dll): Add function description.
5294 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5295
850a0f76
JB
52962014-02-26 Joel Brobecker <brobecker@adacore.com>
5297
5298 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5299 Add comment.
5300 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5301 base address when calling win32_add_one_solib.
5302 (handle_load_dll): Delete local variable load_addr.
5303 Remove 0x1000 offset applied to DLL base address when calling
5304 win32_add_one_solib.
5305 (handle_unload_dll): Add comment.
5306
f25b3fc3
JB
53072014-02-26 Joel Brobecker <brobecker@adacore.com>
5308
5309 * win32-low.c (win32_add_all_dlls): Renames
5310 win32_ensure_ntdll_loaded. Rewrite function documentation.
5311 Adjust implementation to always load all DLLs.
5312 Add 0x1000 offset to DLL base address when calling
5313 win32_add_one_solib.
5314 (child_initialization_done): New static global.
5315 (do_initial_child_stuff): Set child_initialization_done to
5316 zero during child initialization, and 1 after. Replace call
5317 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5318 Add comment.
5319 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5320 (handle_unload_dll): Add function documentation.
5321 (get_child_debug_event): Ignore load and unload DLL events
5322 during child initialization.
5323
d86d4aaf
DE
53242014-02-20 Doug Evans <dje@google.com>
5325
3bc32da3 5326 Remove global all_lwps.
d86d4aaf
DE
5327 * inferiors.h (ptid_of): Move here from linux-low.h.
5328 (pid_of, lwpid_of): Ditto.
5329 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5330 parameter is a struct thread_info * now.
5331 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5332 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5333 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5334 directly.
5335 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5336 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5337 * linux-arm-low.c (update_registers_callback): Update, "entry"
5338 parameter is a struct thread_info * now.
5339 Fetch lwpid from current_inferior directly.
5340 (arm_insert_point): Pass &all_threads to find_inferior instead of
5341 &all_lwps.
5342 (arm_remove_point): Ditto.
5343 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5344 (arm_prepare_to_resume): Fetch pid from thread.
5345 (arm_read_description): Fetch lwpid from current_inferior directly.
5346 * linux-low.c (all_lwps): Delete.
5347 (delete_lwp): Delete call to remove_inferior.
5348 (handle_extended_wait): Fetch lwpid from thread.
5349 (add_lwp): Don't set lwp->entry.id. Remove call to
5350 add_inferior_to_list.
5351 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5352 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5353 (kill_one_lwp_callback): Ditto.
5354 (linux_kill): Don't dereference NULL pointer.
5355 Fetch ptid,lwpid from thread.
5356 (get_detach_signal): Fetch ptid from thread.
5357 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5358 Simplify call to regcache_invalidate_thread.
5359 (delete_lwp_callback): Update, "entry" parameter is a
5360 struct thread_info * now. Fetch pid from thread.
5361 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5362 (status_pending_p_callback): Update, "entry" parameter is a
5363 struct thread_info * now. Fetch ptid from thread.
5364 (find_lwp_pid): Update, "entry" parameter is a
5365 struct thread_info * now.
5366 (linux_wait_for_lwp): Fetch pid from thread.
5367 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5368 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5369 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5370 (dequeue_one_deferred_signal): Ditto.
5371 (cancel_breakpoint): Fetch ptid from current_inferior.
5372 (linux_wait_for_event): Pass &all_threads to find_inferior,
5373 not &all_lwps. Fetch ptid, lwpid from thread.
5374 (count_events_callback): Update, "entry" parameter is a
5375 struct thread_info * now.
5376 (select_singlestep_lwp_callback): Ditto.
5377 (select_event_lwp_callback): Ditto.
5378 (cancel_breakpoints_callback): Ditto.
5379 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5380 not &all_lwps.
5381 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5382 (unsuspend_one_lwp): Update, "entry" parameter is a
5383 struct thread_info * now.
5384 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5385 not &all_lwps.
5386 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5387 Fetch lwpid from thread, not lwp.
5388 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5389 Pass &all_threads to find_inferior, not &all_lwps.
5390 (send_sigstop): Fetch lwpid from thread, not lwp.
5391 (send_sigstop_callback): Update, "entry" parameter is a
5392 struct thread_info * now.
5393 (suspend_and_send_sigstop_callback): Ditto.
5394 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5395 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5396 struct thread_info * now.
5397 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5398 from thread, lwp.
5399 (lwp_running): Update, "entry" parameter is a
5400 struct thread_info * now.
5401 (stop_all_lwps): Fetch ptid from thread.
5402 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5403 (linux_resume_one_lwp): Fetch lwpid from thread.
5404 (linux_set_resume_request): Update, "entry" parameter is a
5405 struct thread_info * now. Fetch pid, lwpid from thread.
5406 (resume_status_pending_p): Update, "entry" parameter is a
5407 struct thread_info * now.
5408 (need_step_over_p): Ditto. Fetch lwpid from thread.
5409 (start_step_over): Fetch lwpid from thread.
5410 (linux_resume_one_thread): Update, "entry" parameter is a
5411 struct thread_info * now. Fetch lwpid from thread.
5412 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5413 (proceed_one_lwp): Update, "entry" parameter is a
5414 struct thread_info * now. Fetch lwpid from thread.
5415 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5416 struct thread_info * now.
5417 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5418 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5419 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5420 directly.
5421 (regsets_store_inferior_registers): Ditto.
5422 (fetch_register, store_register): Ditto.
5423 (linux_read_memory, linux_write_memory): Ditto.
5424 (linux_request_interrupt): Ditto.
5425 (linux_read_auxv): Ditto.
5426 (linux_xfer_siginfo): Ditto.
5427 (linux_qxfer_spu): Ditto.
5428 (linux_qxfer_libraries_svr4): Ditto.
5429 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5430 moved to inferiors.h.
5431 (get_lwp): Delete.
5432 (get_thread_lwp): Update.
5433 (struct lwp_info): Delete member "entry". Simplify comment for
5434 member "thread".
5435 (all_lwps): Delete.
5436 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5437 current_inferior directly.
5438 (update_watch_registers_callback): Update, "entry" parameter is a
5439 struct thread_info * now. Fetch pid from thread.
5440 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5441 (mips_insert_point): Fetch lwpid from current_inferior.
5442 Pass &all_threads to find_inferior, not &all_lwps.
5443 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5444 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5445 directly.
5446 (mips_stopped_data_address): Ditto.
5447 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5448 directly.
5449 * linux-tile-low.c (tile_arch_setup): Ditto.
5450 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5451 (update_debug_registers_callback): Update, "entry" parameter is a
5452 struct thread_info * now. Fetch pid from thread.
5453 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5454 Pass &all_threads to find_inferior, not &all_lwps.
5455 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5456 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5457 Pass &all_threads to find_inferior, not &all_lwps.
5458 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5459 (i386_dr_low_get_status): Ditto.
5460 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5461 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5462 (x86_linux_read_description): Ditto.
5463 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5464
3b8361aa
DE
54652014-02-20 Doug Evans <dje@google.com>
5466
5467 * inferiors.c (get_first_inferior): Fix buglet.
5468
f7667f0d
DE
54692014-02-19 Doug Evans <dje@google.com>
5470
5471 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5472 * inferiors.c (add_thread): Change result type to struct thread_info *.
5473 All callers updated.
5474 (add_lwp): Call add_thread here instead of in callers.
5475 All callers updated.
5476 * linux-low.h (get_lwp_thread): Rewrite.
5477 (struct lwp_info): New member "thread".
5478
b3312d80
DE
54792014-02-19 Doug Evans <dje@google.com>
5480
5481 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5482 All callers updated.
5483
ecc6f45c
DE
54842014-02-19 Doug Evans <dje@google.com>
5485
5486 * inferiors.c (add_thread): Fix whitespace.
5487
649ebbca
DE
54882014-02-19 Doug Evans <dje@google.com>
5489
5490 * dll.c (clear_dlls): Replace accessing list implemention details
5491 with API function.
5492 * gdbthread.h (get_first_thread): Declare.
5493 * inferiors.c (for_each_inferior_with_data): New function.
5494 (get_first_thread): New function.
5495 (find_thread_ptid): Simplify.
5496 (get_first_inferior): New function.
5497 (clear_list): Delete.
5498 (one_inferior_p): New function.
5499 (clear_inferior_list): New function.
5500 (clear_inferiors): Update.
5501 * inferiors.h (for_each_inferior_with_data): Declare.
5502 (clear_inferior_list): Declare.
5503 (one_inferior_p): Declare.
5504 (get_first_inferior): Declare.
5505 * linux-low.c (linux_wait_for_event): Replace accessing list
5506 implemention details with API function.
5507 * server.c (target_running): Ditto.
5508 (accumulate_file_name_length): New function.
5509 (emit_dll_description): New function.
5510 (handle_qxfer_libraries): Replace accessing list implemention
5511 details with API function.
5512 (handle_qxfer_threads_worker): New function.
5513 (handle_qxfer_threads_proper): Replace accessing list implemention
5514 details with API function.
5515 (handle_query): Ditto.
5516 (visit_actioned_threads_callback_ftype): New typedef.
5517 (visit_actioned_threads_data): New struct.
5518 (visit_actioned_threads): Rewrite to be find_inferior callback.
5519 (resume): Call find_inferior.
5520 (handle_status): Replace accessing list implemention
5521 details with API function.
5522 (process_serial_event): Replace accessing list implemention details
5523 with API function.
5524 * target.c (set_desired_inferior): Replace accessing list implemention
5525 details with API function.
5526 * tracepoint.c (same_process_p): New function.
5527 (gdb_agent_about_to_close): Replace accessing list implemention
5528 details with API function.
5529 * win32-low.c (child_delete_thread): Replace accessing list
5530 implemention details with API function.
5531 (match_dll_by_basename): New function.
5532 (dll_is_loaded_by_basename): New function.
5533 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5534 details call to dll_is_loaded_by_basename.
5535
80894984
DE
55362014-02-19 Doug Evans <dje@google.com>
5537
5538 * dll.h (struct dll_info): Add comment.
5539 * gdbthread.h (struct thread_info): Add comment.
5540 (current_ptid): Simplify.
5541 * inferiors.c (add_process): Update.
5542 (remove_process): Update.
5543 * inferiors.h (struct process_info): Rename member "head" to "entry".
5544 * linux-low.c (delete_lwp): Update.
5545 (add_lwp): Update.
5546 (last_thread_of_process_p): Update.
5547 (kill_one_lwp_callback, linux_kill): Update.
5548 (status_pending_p_callback): Update.
5549 (wait_for_sigstop): Update. Simplify read of ptid.
5550 (start_step_over): Update.
5551 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5552 (get_lwp_thread): Update.
5553 (struct lwp_info): Rename member "head" to "entry".
5554 * regcache.h (inferior_list_entry): Delete.
5555 * server.c (kill_inferior_callback): Update.
5556 (detach_or_kill_inferior_callback): Update.
5557 (print_started_pid): Update.
5558 (print_attached_pid): Update.
5559 (process_serial_event): Simplify read of ptid.
5560 * thread-db.c (thread_db_create_event): Update.
5561 (thread_db_get_tls_address): Update.
5562 * win32-low.c (current_inferior_ptid): Simplify.
5563
46917d26
TT
55642014-02-19 Tom Tromey <tromey@redhat.com>
5565
5566 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5567 argument.
5568 (target_supports_btrace): Update.
5569
0759a81e
YQ
55702014-02-14 Yao Qi <yao@codesourcery.com>
5571
5572 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5573 (rsp-low-ipa.o): New target.
5574
a7191e8b
TT
55752014-02-12 Tom Tromey <tromey@redhat.com>
5576
5577 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5578 convert_ascii_to_int.
5579 * regcache.c (registers_to_string): Likewise.
5580 * remote-utils.c (decode_M_packet): Likewise.
5581 * server.c (process_serial_event): Likewise.
5582
ff0e980e
TT
55832014-02-12 Tom Tromey <tromey@redhat.com>
5584
5585 * server.c (handle_query, handle_v_run): Use hex2bin, not
5586 unhexify.
5587 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5588
e9371aff
TT
55892014-02-12 Tom Tromey <tromey@redhat.com>
5590
5591 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5592 convert_int_to_ascii.
5593 * regcache.c (registers_to_string, collect_register_as_string):
5594 Likewise.
5595 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5596 Likewise.
5597 * server.c (process_serial_event): Likewise.
5598 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5599 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5600
971dc0b8
TT
56012014-02-12 Tom Tromey <tromey@redhat.com>
5602
5603 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5604 bin2hex, not hexify.
5605 * tracepoint.c (cmd_qtstatus): Likewise.
5606
0a822afb
TT
56072014-02-12 Tom Tromey <tromey@redhat.com>
5608
5609 * remote-utils.c (monitor_output): Pass explicit length to
5610 hexify.
5611
9c3d6531
TT
56122014-02-12 Tom Tromey <tromey@redhat.com>
5613
5614 * tracepoint.c: Include rsp-low.h.
5615 * server.c: Include rsp-low.h.
5616 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5617 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5618 declare.
5619 * remote-utils.c: Include rsp-low.h.
5620 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5621 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5622 (convert_int_to_ascii, convert_ascii_to_int): Move to
5623 common/rsp-low.c.
5624 * regcache.c: Include rsp-low.h.
5625 * ax.c: Include rsp-low.h.
5626 * Makefile.in (SFILES): Add common/rsp-low.c.
5627 (OBS): Add rsp-low.o.
5628 (rsp-low.o): New target.
5629
01fd3ea5
TT
56302014-02-12 Tom Tromey <tromey@redhat.com>
5631
5632 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5633 Include print-utils.h.
5634 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5635 (plongest, thirty_two, phex_nz): Remove.
5636 * Makefile.in (SFILES): Add common/print-utils.c.
5637 (OBS): Add print-utils.o.
5638 (print-utils-ipa.o): New target.
5639 (print-utils.o): New target.
5640 (IPA_OBJS): Add print-utils-ipa.o.
5641
e99dc820
TT
56422014-02-06 Tom Tromey <tromey@redhat.com>
5643
5644 * Makefile.in (SFILES): Fix indentation.
5645
ee1e2d4f
DE
56462014-02-05 Doug Evans <dje@google.com>
5647
5648 * linux-low.c (linux_wait_for_event): Improve comment.
5649 (linux_wait_1): Keep current_inferior in sync with event_child.
5650
f5a02773
DE
56512014-01-22 Doug Evans <dje@google.com>
5652
5653 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5654
87ce2a04
DE
56552014-01-22 Doug Evans <dje@google.com>
5656
5657 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5658 * configure: Regenerate.
5659 * config.in: Regenerate.
5660 * Makefile.in (SFILES): Add debug.c.
5661 (OBS): Add debug.o.
5662 * debug.c: New file.
5663 * debug.h: New file.
5664 * linux-aarch64-low.c (*): Update all debugging printfs to use
5665 debug_printf instead of fprintf.
5666 * linux-arm-low.c (*): Ditto.
5667 * linux-cris-low.c (*): Ditto.
5668 * linux-crisv32-low.c (*): Ditto.
5669 * linux-m32r-low.c (*): Ditto.
5670 * linux-sparc-low.c (*): Ditto.
5671 * linux-x86.c (*): Ditto.
5672 * linux-low.c (*): Ditto.
5673 (linux_wait_1): Add calls to debug_enter, debug_exit.
5674 (linux_wait): Remove redundant debugging printf.
5675 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5676 (linux_resume, unstop_all_lwps): Ditto.
5677 * mem-break.c (*): Update all debugging printfs to use
5678 debug_printf instead of fprintf.
5679 * remote-utils.c (*): Ditto.
5680 * thread-db.c (*): Ditto.
5681 * server.c #include <ctype.h>, "gdb_vecs.h".
5682 (debug_threads): Moved to debug.c.
5683 (*): Update all debugging printfs to use debug_printf instead of
5684 fprintf.
5685 (start_inferior): Replace call to fflush with call to debug_flush.
5686 (monitor_show_help): Mention set debug-format.
5687 (parse_debug_format_options): New function.
5688 (handle_monitor_command): Handle "monitor set debug-format".
5689 (gdbserver_usage): Mention --debug-format.
5690 (main): Parse --debug-format.
5691 * server.h (debug_threads): Declaration moved to debug.h.
5692 #include "debug.h".
5693 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5694 trace_debug_1 that uses debug_printf.
5695 (tracepoint_look_up_symbols): Update all debugging printfs to use
5696 debug_printf instead of fprintf.
5697
e671835b
BS
56982014-01-20 Baruch Siach <baruch@tkos.co.il>
5699
5700 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5701 sys/ptrace.h.
5702
b5737fa9
PA
57032014-01-17 Pedro Alves <palves@redhat.com>
5704
ea38d2a9 5705 PR build/16445
c7faa97a
PA
5706 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5707 defined after including gdb_proc_service.h.
b5737fa9 5708
40ed484e
DE
57092014-01-16 Doug Evans <dje@google.com>
5710
5711 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5712 (match_dll): Use it.
5713
969c39fb
MM
57142014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5715
5716 * target.h (target_ops) <read_btrace>: Change parameters and
5717 return type to allow error reporting.
5718 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5719 trace reading errors on.
5720 * linux-low.c (linux_low_read_btrace): Pass trace reading
5721 errors on.
5722 (linux_low_disable_btrace): New.
5723
ab7f45ba
DE
57242014-01-15 Doug Evans <dje@google.com>
5725
5726 * inferiors.c (thread_id_to_gdb_id): Delete.
5727 * inferiors.h (thread_id_to_gdb_id): Delete.
5728
66af0f44
EZ
57292014-01-13 Eli Zaretskii <eliz@gnu.org>
5730
5731 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5732 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5733 versions.
5734
9939e131
PA
57352014-01-08 Pedro Alves <palves@redhat.com>
5736
5737 * server.c (handle_status): Don't discard previous queued stop
5738 replies or thread's pending status here.
5739 (main) <disconnection>: Do it here instead.
5740
b7ea362b
PA
57412014-01-08 Pedro Alves <palves@redhat.com>
5742
5743 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5744 * server.c (visit_actioned_threads, handle_pending_status): New
5745 function.
5746 (handle_v_cont): Factor out parts to ...
5747 (resume): ... this new function. If in all-stop, and a thread
5748 being resumed has a pending status, report it without actually
5749 resuming.
5750 (myresume): Adjust to use the new 'resume' function.
5751 (clear_pending_status_callback, set_pending_status_callback)
5752 (find_status_pending_thread_callback): New functions.
5753 (handle_status): Handle the case of multiple threads having
5754 interesting statuses to report. Report threads' real last signal
5755 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5756 with an interesting thread to report the status for, instead of
5757 always reporting the status of the first thread.
5758
28498c42
JB
57592014-01-01 Joel Brobecker <brobecker@adacore.com>
5760
5761 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5762 * gdbreplay.c (gdbreplay_version): Likewise.
5763
f45c82da
YZ
57642013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5765
5766 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5767 iov.iov_len with the real length in use.
5768
379a5e2d
JB
57692013-12-13 Joel Brobecker <brobecker@adacore.com>
5770
5771 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5772 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5773 for all targets that use win32-low.c.
5774 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5775 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5776
4210d83e
PA
57772013-12-13 Pedro Alves <palves@redhat.com>
5778
5779 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5780 if equal to TARGET_WAITKIND_LOADED.
5781 * win32-low.c (cached_status): New static global.
5782 (win32_wait): Add declaration.
5783 (do_initial_child_stuff): Flush all initial pending debug events
5784 up to the initial breakpoint.
5785 (win32_wait): If CACHED_STATUS was set, return that instead
5786 of doing a real wait. Remove the code resuming the execution
5787 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5788 during the initial phase. Also remove the code changing
5789 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5790 TARGET_WAITKIND_STOPPED.
5791
e7f0d979
YQ
57922013-12-11 Yao Qi <yao@codesourcery.com>
5793
5794 * notif.c (handle_notif_ack): Return 0 if no notification
5795 matches.
5796
ebcf782c
DE
57972013-11-20 Doug Evans <dje@google.com>
5798
5799 * linux-low.c (linux_set_resume_request): Fix comment.
5800
20ad9378
DE
58012013-11-20 Doug Evans <dje@google.com>
5802
5803 * linux-low.c (resume_status_pending_p): Tweak comment.
5804
a196ebeb
WT
58052013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5806
5807 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5808 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5809 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5810 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5811 (srv_amd64_regobj): Add amd64-mpx.o.
5812 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5813 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5814 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5815 * i387-fp.c (num_pl_bnd_register) Added constant.
5816 (num_pl_bnd_cfg_registers) Added constant.
5817 (struct i387_xsave) Added reserved area and MPX fields.
5818 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5819 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5820 function.
5821 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5822 (init_registers_amd64_mpx_linux): Declare new function.
5823 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5824 (x86_64_regmap): Add MPX registers.
5825 (x86_linux_read_description): Add MPX case.
5826 (initialize_low_arch): Initialize MPX targets.
5827
0080a2f6
TT
58282013-11-18 Tom Tromey <tromey@redhat.com>
5829
5830 * configure: Rebuild.
5831 * configure.ac: Don't check for stdlib.h.
5832 * gdbreplay.c: Unconditionally include stdlib.h.
5833
2978b111
TT
58342013-11-18 Tom Tromey <tromey@redhat.com>
5835
5836 * config.in: Rebuild.
5837 * configure: Rebuild.
5838 * configure.ac: Don't use AC_HEADER_DIRENT.
5839
a3d08894
TT
58402013-11-18 Tom Tromey <tromey@redhat.com>
5841
5842 * server.h: Don't check HAVE_STRING_H.
5843 * gdbreplay.c: Don't check HAVE_STRING_H.
5844 * configure: Rebuild.
5845
0a5dd17d
TT
58462013-11-18 Tom Tromey <tromey@redhat.com>
5847
5848 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5849 LIBGNU.
5850
1bd2f0ba
TT
58512013-11-08 Tom Tromey <tromey@redhat.com>
5852
5853 * configure, config.in: Rebuild.
5854 * configure.ac: Remove unused configury.
5855
3266f10b
TT
58562013-11-08 Tom Tromey <tromey@redhat.com>
5857
5858 * acinclude.m4: Include common.m4, codeset.m4.
5859 * configure, config.in: Rebuild.
5860 * configure.ac: Use GDB_AC_COMMON.
5861
6682d959
AA
58622013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5863
5864 * linux-s390-low.c (HWCAP_S390_TE): New define.
5865 (s390_arch_setup): Consider the TE field in the HWCAP for
5866 determining 'have_regset_tdb'.
5867
fd0a4d76
SDJ
58682013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5869
5870 PR gdb/16014
5871 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5872 call to sizeof.
5873
1a3d890b
PA
58742013-10-02 Pedro Alves <palves@redhat.com>
5875
5876 * server.c (process_serial_event): Don't output "GDBserver
5877 exiting" if GDB is connected through stdio.
5878 * target.c (mywait): Likewise, be silent if GDB is connected
5879 through stdio.
5880
97ad4581
JB
58812013-10-01 Joel Brobecker <brobecker@adacore.com>
5882
5883 * lynx-low.c (lynx_add_threads_after_attach): New function.
5884 (lynx_attach): Remove call to add_thread. Add call to
5885 lynx_add_threads_after_attach instead.
5886
5b4e221c
MF
58872013-09-28 Mike Frysinger <vapier@gentoo.org>
5888
5889 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5890 * config.in, configure: Regenerated.
5891
ee47b2f8
YQ
58922013-09-18 Yao Qi <yao@codesourcery.com>
5893
5894 PR server/15959
5895 * server.c (start_inferior): Clear 'resume_info'.
5896
d6707650 58972013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5898
d6707650
JW
5899 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5900 for each register.
5901
9243dd0e 59022013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5903
9243dd0e
JW
5904 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5905 linux-tile-low.o to srv_tgtobj.
5906
c623a6ef
WN
59072013-09-16 Will Newton <will.newton@linaro.org>
5908
5909 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5910 out regs.
5911
fb71d39e
PA
59122013-09-06 Pedro Alves <palves@redhat.com>
5913
5914 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5915 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5916 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5917 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5918 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5919 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5920
8e7e9910
PA
59212013-09-06 Pedro Alves <palves@redhat.com>
5922
5923 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5924 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5925
7c3a12ca
PA
59262013-09-06 Pedro Alves <palves@redhat.com>
5927
5928 * linux-amd64-ipa.c: Include tracepoint.h.
5929 * linux-i386-ipa.c: Include tracepoint.h.
5930
8eb3d7b6
RW
59312013-09-06 Ricard Wanderlof <ricardw@axis.com>
5932
5933 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5934 (ps_get_thread_area): New function.
5935
eddddb9d
RW
59362013-09-06 Ricard Wanderlof <ricardw@axis.com>
5937
5938 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5939 (initialize_low_arch): Call init_registers_crisv32 rather than
5940 init_register_crisv32.
5941
533b0600
PA
59422013-09-05 Pedro Alves <palves@redhat.com>
5943
5944 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5945 to ...
5946 * hostio.h: ... this new file.
5947 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5948 win32-low.c: Include hostio.h.
5949
0ce3d3b5
PA
59502013-09-05 Pedro Alves <palves@redhat.com>
5951
5952 * server.h (gdb_client_data, handler_func, callback_handler_func)
5953 (delete_file_handler, add_file_handler, append_callback_event)
5954 (delete_callback_event, start_event_loop, initialize_event_loop):
5955 Move to event-loop.h and include it.
5956 * event-loop.h: New file.
5957
799cdc37
PA
59582013-09-05 Pedro Alves <palves@redhat.com>
5959
5960 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5961 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5962 (loaded_dll, unloaded_dll): Move to ...
5963 * dll.h: ... this new file.
5964 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5965
6a6bbd9d
PA
59662013-09-05 Pedro Alves <palves@redhat.com>
5967
5968 * server.h (current_process, get_thread_process, all_processes)
5969 (add_inferior_to_list, for_each_inferior, current_inferior)
5970 (remove_inferior, add_process, remove_process, find_process_pid)
5971 (have_started_inferiors_p, have_attached_inferiors_p)
5972 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5973 (clear_inferiors, find_inferior, find_inferior_id)
5974 (inferior_target_data, set_inferior_target_data)
5975 (inferior_regcache_data, set_inferior_regcache_data): Move to
5976 inferiors.h, and include it.
5977 * inferiors.h: New file.
5978
f699aaba
PA
59792013-09-05 Pedro Alves <palves@redhat.com>
5980
5981 * server.h (struct emit_ops, current_insn_ptr, emit_error):
5982 Move ...
72f4393d 5983 * ax.h: ... here.
f699aaba 5984
c144c7a0
PA
59852013-09-05 Pedro Alves <palves@redhat.com>
5986
5987 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5988 tracepoint.h.
5989 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5990 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5991 (handle_tracepoint_general_set, handle_tracepoint_query)
5992 (tracepoint_finished_step, tracepoint_was_hit)
5993 (release_while_stepping_state_list, current_traceframe)
5994 (in_readonly_region, traceframe_read_mem)
5995 (fetch_traceframe_registers, traceframe_read_sdata)
5996 (traceframe_read_info, struct fast_tpoint_collect_status)
5997 (fast_tracepoint_collecting, force_unlock_trace_buffer)
5998 (handle_tracepoit_bkpts, initialize_low_tracepoint)
5999 (supply_fast_tracepoint_registers)
6000 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6001 (ipa_tdesc, claim_trampoline_space)
6002 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6003 (agent_mem_read, agent_get_trace_state_variable_value)
6004 (agent_set_trace_state_variable_value, agent_tsv_read)
6005 (agent_mem_read_string, get_raw_reg_func_addr)
6006 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6007 * tracepoint.h: ... this new file.
6008
ff42e6ab
PA
60092013-09-05 Pedro Alves <palves@redhat.com>
6010
6011 * server.h (perror_with_name, error, fatal, warning, paddress)
6012 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6013 include it.
6014 * utils.h: New file.
6015
541af0f4
PA
60162013-09-05 Pedro Alves <palves@redhat.com>
6017
6018 * server.h (remote_debug, noack_mode, transport_is_reliable)
6019 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6020 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6021 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6022 (write_enn, initialize_async_io, enable_async_io)
6023 (disable_async_io, check_remote_input_interrupt_request)
6024 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6025 (dead_thread_notify, prepare_resume_reply)
6026 (decode_address_to_semicolon, decode_address, decode_m_packet)
6027 (decode_M_packet, decode_X_packet, decode_xfer_write)
6028 (decode_search_memory_packet, unhexify, hexify)
6029 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6030 (look_up_one_symbol, relocate_instruction)
6031 (monitor_output): Move to remote-utils.h, and include it.
6032 * remote-utils.h: New file.
6033
eebdf26b
PA
60342013-09-05 Pedro Alves <palves@redhat.com>
6035
6036 * server.h (_): Delete.
6037
3aafd2ff
PA
60382013-09-02 Pedro Alves <palves@redhat.com>
6039
6040 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6041 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6042 allocated.
6043 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6044
cee83bcb
PM
60452013-09-02 Pierre Muller <muller@sourceware.org>
6046
6047 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6048 or WriteProcessMemory complete successfully and handle
6049 ERROR_PARTIAL_COPY error.
6050
9a13b2fa
PA
60512013-09-02 Pedro Alves <palves@redhat.com>
6052
6053 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6054 error instead of EIO.
6055
602e3198
JK
60562013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6057
6058 PR server/15604
6059 * linux-low.c: Include filestuff.h.
6060 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6061 * lynx-low.c: Include filestuff.h.
6062 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6063 * server.c: Include filestuff.h.
6064 (main): Call notice_open_fds.
6065 * spu-low.c: Include filestuff.h.
6066 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6067
96d7229d
LM
60682013-08-22 Luis Machado <lgustavo@codesourcery.com>
6069
6070 * Makefile.in: Explain why ../target and ../nat are not
6071 listed as include file search paths.
6072 (linux-waitpid.o): New object file rule.
6073 * configure.srv (srv_native_linux_obj): New variable.
6074 Replace all occurrences of linux native object files with
6075 $srv_native_linux_obj.
6076 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6077 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6078 (linux_enable_event_reporting): Remove declaration.
6079 (my_waitpid): Moved to common/linux-waitpid.c.
6080 (linux_wait_for_event): Pass ptid when calling
6081 linux_enable_event_reporting.
6082 (linux_supports_tracefork_flag): Remove.
6083 (linux_enable_event_reporting): Likewise.
6084 (linux_tracefork_grandchild): Remove.
6085 (STACK_SIZE): Moved to common/linux-ptrace.c.
6086 (linux_tracefork_child): Remove.
6087 (linux_test_for_tracefork): Remove.
6088 (linux_look_up_symbols): Call linux_supports_traceclone.
6089 (initialize_low): Remove call to linux_test_for_tracefork.
6090 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6091 common/linux-ptrace.h.
6092 (PTRACE_TYPE_ARG4): Likewise.
6093 Include linux-ptrace.h.
6094
32940073
PA
60952013-08-21 Pedro Alves <palves@redhat.com>
6096
6097 * config.in: Renegerate.
6098
33b60d58 60992013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6100
33b60d58
LM
6101 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6102 (SFILES): Remove $(srcdir)/common/target-common.c and
6103 add $(srcdir)/target/waitstatus.c.
6104 (OBS): Remove target-common.o and add waitstatus.o.
6105 (server_h): Remove $(srcdir)/../common/target-common.h and
6106 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6107 and $(srcdir)/../target/waitstatus.h.
6108 (target-common.o): Remove.
6109 (waitstatus.o): New target object file.
6110 * target.h: Do not include target-common.h and
6111 include target/resume.h, target/wait.h and
6112 target/waitstatus.h.
6113
b8e1b30e
LM
61142013-08-13 Luis Machado <lgustavo@codesourcery.com>
6115
6116 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6117 to PTRACE_TYPE_ARG3.
6118 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6119 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6120 PTRACE_TYPE_ARG4.
6121 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6122 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6123
7a60ad40
YQ
61242013-07-27 Jie Zhang <jie@codesourcery.com>
6125 Daniel Jacobowitz <dan@codesourcery.com>
6126 Yao Qi <yao@codesourcery.com>
6127
6128 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6129 (mips-linux-watch.o): New rule.
6130 (mips_linux_watch_h): New variable.
6131 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6132 srv_tgtobj.
6133 * linux-mips-low.c: Include mips-linux-watch.h.
6134 (struct arch_process_info, struct arch_lwp_info): New.
6135 (update_watch_registers_callback): New function.
6136 (mips_linux_new_process, mips_linux_new_thread) New functions.
6137 (mips_linux_prepare_to_resume, mips_insert_point): New
6138 functions.
6139 (mips_remove_point, mips_stopped_by_watchpoint): New
6140 functions.
6141 (rsp_bp_type_to_target_hw_bp_type): New function.
6142 (mips_stopped_data_address): New function.
6143 (the_low_target): Add watchpoint support functions.
6144
de6f69ad
YQ
61452013-07-27 Yao Qi <yao@codesourcery.com>
6146
6147 * i386-low.c: Include break-common.h.
6148 (enum target_hw_bp_type): Remove.
6149
3360c0bf
LM
61502013-07-24 Luis Machado <lgustavo@codesourcery.com>
6151
6152 * Makefile.in (SFILES): /common/target-common.c.
6153 (OBS): Add target-common.o.
6154 (server_h): Add $(srcdir)/../common/target-common.h.
6155 (target-common.o): New target.
6156 * server.c (queue_stop_reply_callback): Free
6157 status string after use.
6158 * target.c (target_waitstatus_to_string): Remove.
6159 * target.h: Include target-common.h.
6160 (resume_kind): Likewise.
6161 (target_waitkind): Likewise.
6162 (target_waitstatus): Likewise.
6163 (TARGET_WNOHANG): Likewise.
6164
bd885420
YQ
61652013-07-04 Yao Qi <yao@codesourcery.com>
6166
6167 * Makefile.in (host_alias): Use @host_noncanonical@.
6168 (target_alias): Use @target_noncanonical@.
6169 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6170 ACX_NONCANONICAL_HOST.
6171 * configure: Regenerated.
6172
6173 Revert:
6174 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6175
6176 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6177 * configure: Rebuild.
6178 * Makefile.in (version_host, version_target): Get from configure.
6179 (version.c): Use $(version_host) and $(version_target).
6180
17ef446e
PA
61812013-07-03 Pedro Alves <palves@redhat.com>
6182
6183 * Makefile.in (config.status): Depend on development.sh.
6184 * acinclude.m4: Include libmcheck.m4.
6185 * configure: Regenerate.
6186
7a9a7487
MG
61872013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6188
6189 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6190 attribute inside the parentheses.
6191 (winapi_DebugSetProcessKillOnExit): Ditto.
6192 (winapi_DebugBreakProcess): Ditto.
6193 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 6194
49b64de6
MG
61952013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6196
6197 * notif.h (notif_event): Add a dummy member to avoid compiler
6198 errors.
6199
d5749ee7
PA
62002013-07-01 Pedro Alves <palves@redhat.com>
6201
6202 * hostio.c (HOSTIO_PATH_MAX): Define.
6203 (require_filename, handle_open, handle_unlink, handle_readlink):
6204 Use it.
6205
d8d2a3ee
PA
62062013-07-01 Pedro Alves <palves@redhat.com>
6207
6208 * server.h: Include "pathmax.h".
6209 * linux-low.c: Don't include sys/param.h.
6210 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6211 MAXPATHLEN.
6212 * win32-low.c: Don't include sys/param.h.
6213 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6214
bc7dea8d
PA
62152013-07-01 Pedro Alves <palves@redhat.com>
6216
6217 * event-loop.c: Don't check HAVE_UNISTD_H before including
6218 <unistd.h>.
6219 * gdbreplay.c: Likewise.
6220 * remote-utils.c: Likewise.
6221 * server.c: Likewise.
6222 * configure.ac: Don't check for unistd.h.
6223 * configure: Regenerate.
6224
d6c2da54
TT
62252013-06-28 Tom Tromey <tromey@redhat.com>
6226
6227 * Makefile.in (version.c): Use version.in, not
6228 common/version.in.
6229
257b6bec
MG
62302013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6231
6232 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6233 * configure: Rebuild.
6234 * Makefile.in (version_host, version_target): Get from configure.
6235 (version.c): Use $(version_host) and $(version_target).
6236
86ebe149
DK
62372013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6238
6239 Fix trace-status to output user name without trailing colon.
6240 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6241
f30aa5af
DK
62422013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6243
6244 Fix trace-status to output proper start-time and stop-time.
6245 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6246 output start time and stop time in hex as gdb expects.
6247
28a93511
YQ
62482013-06-26 Pedro Alves <pedro@codesourcery.com>
6249
6250 * tracepoint.c (build_traceframe_info_xml): Output trace state
6251 variables present in the trace buffer.
6252
01208463
TT
62532013-06-24 Tom Tromey <tromey@redhat.com>
6254
6255 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6256 create-version.sh.
6257 (version.o): Remove.
6258 * gdbreplay.c: Include version.h.
6259 (version, host_name): Don't declare.
6260 * server.h: Include version.h.
6261 (version, host_name): Don't declare.
6262
760256f9
PA
62632013-06-12 Pedro Alves <palves@redhat.com>
6264
6265 * linux-x86-low.c (linux_is_elf64): Delete global.
6266 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6267 with local linux_pid_exe_is_elf_64_file use.
6268
030031ee
PA
62692013-06-11 Pedro Alves <palves@redhat.com>
6270
6271 * linux-low.c (regset_disabled, disable_regset): New functions.
6272 (regsets_fetch_inferior_registers)
6273 (regsets_store_inferior_registers): Use them.
6274 (initialize_regsets_info); Don't allocate the disabled_regsets
6275 array here.
6276 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6277 comment.
6278
5da6eb0a
PA
62792013-06-11 Pedro Alves <palves@redhat.com>
6280
6281 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6282 xmalloc.
6283
7e5aaa09
PA
62842013-06-11 Pedro Alves <palves@redhat.com>
6285
6286 * linux-x86-low.c (initialize_low_arch): Call
6287 init_registers_x32_avx_linux.
6288
d878444c
JK
62892013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6290
6291 Fix compatibility with Android Bionic.
6292 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6293 it is not empty.
6294
3aee8918
PA
62952013-06-07 Pedro Alves <palves@redhat.com>
6296
5f2b57b5 6297 PR server/14823
3aee8918
PA
6298 * Makefile.in (OBS): Add tdesc.o.
6299 (IPA_OBJS): Add tdesc-ipa.o.
6300 (tdesc-ipa.o): New rule.
6301 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6302 interface.
6303 * linux-low.c (new_inferior): Delete.
6304 (disabled_regsets, num_regsets): Delete.
6305 (linux_add_process): Adjust to set the new per-process
6306 new_inferior flag.
6307 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6308 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6309 was a stop. When calling arch_setup, switch the current inferior
6310 to the thread that got an event.
6311 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6312 (regsets_fetch_inferior_registers)
6313 (regsets_store_inferior_registers): New regsets_info parameter.
6314 Adjust to use it.
6315 (linux_register_in_regsets): New regs_info parameter. Adjust to
6316 use it.
6317 (register_addr, fetch_register, store_register): New usrregs_info
6318 parameter. Adjust to use it.
6319 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6320 parameter regs_info. Adjust to use it.
6321 (linux_fetch_registers): Get the current inferior's regs_info, and
6322 adjust to use it.
6323 (linux_store_registers): Ditto.
6324 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6325 (initialize_low): Don't initialize the target_regsets here. Call
6326 initialize_low_arch.
6327 * linux-low.h (target_regsets): Delete declaration.
6328 (struct regsets_info): New.
6329 (struct usrregs_info): New.
6330 (struct regs_info): New.
6331 (struct process_info_private) <new_inferior>: New field.
6332 (struct linux_target_ops): Delete the num_regs, regmap, and
6333 regset_bitmap fields. New field regs_info.
6334 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6335 * i387-fp.c (num_xmm_registers): Delete.
6336 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6337 calls to new interface.
6338 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6339 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6340 Infer the number of xmm registers from the regcache's target
6341 description.
6342 * i387-fp.h (num_xmm_registers): Delete.
6343 * inferiors.c (add_thread): Don't install the thread's regcache
6344 here.
6345 * proc-service.c (gregset_info): Fetch the current inferior's
6346 regs_info. Adjust to use it.
6347 * regcache.c: Include tdesc.h.
6348 (register_bytes, reg_defs, num_registers)
6349 (gdbserver_expedite_regs): Delete.
6350 (get_thread_regcache): If the thread doesn't have a regcache yet,
6351 create one, instead of aborting gdbserver.
6352 (regcache_invalidate_one): Rename to ...
6353 (regcache_invalidate_thread): ... this.
6354 (regcache_invalidate_one): New.
6355 (regcache_invalidate): Only invalidate registers of the current
6356 process.
6357 (init_register_cache): Add target_desc parameter, and use it.
6358 (new_register_cache): Ditto. Assert the target description has a
6359 non zero registers_size.
6360 (regcache_cpy): Add assertions. Adjust.
6361 (realloc_register_cache, set_register_cache): Delete.
6362 (registers_to_string, registers_from_string): Adjust.
6363 (find_register_by_name, find_regno, find_register_by_number)
6364 (register_cache_size): Add target_desc parameter, and use it.
6365 (free_register_cache_thread, free_register_cache_thread_one)
6366 (regcache_release, register_cache_size): New.
6367 (register_size): Add target_desc parameter, and use it.
6368 (register_data, supply_register, supply_register_zeroed)
6369 (supply_regblock, supply_register_by_name, collect_register)
6370 (collect_register_as_string, collect_register_by_name): Adjust.
6371 * regcache.h (struct target_desc): Forward declare.
6372 (struct regcache) <tdesc>: New field.
6373 (init_register_cache, new_register_cache): Add target_desc
6374 parameter.
6375 (regcache_invalidate_thread): Declare.
6376 (regcache_invalidate_one): Delete declaration.
6377 (regcache_release): Declare.
6378 (find_register_by_number, register_cache_size, register_size)
6379 (find_regno): Add target_desc parameter.
6380 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6381 declarations.
6382 * remote-utils.c: Include tdesc.h.
6383 (outreg, prepare_resume_reply): Adjust.
6384 * server.c: Include tdesc.h.
6385 (gdbserver_xmltarget): Delete declaration.
6386 (get_features_xml, process_serial_event): Adjust.
6387 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6388 declare.
6389 (struct process_info) <tdesc>: New field.
6390 (ipa_tdesc): Declare.
6391 * tdesc.c: New file.
6392 * tdesc.h: New file.
6393 * tracepoint.c: Include tdesc.h.
6394 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6395 (get_context_regcache): Adjust to pass ipa_tdesc down.
6396 (do_action_at_tracepoint): Adjust to get the register cache size
6397 from the context regcache's description.
6398 (traceframe_walk_blocks): Adjust to get the register cache size
6399 from the current trace frame's description.
6400 (traceframe_get_pc): Adjust to get current trace frame's
6401 description and pass it down.
6402 (gdb_collect): Adjust to get the register cache size from the
6403 IPA's description.
6404 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6405 (gdbserver_xmltarget): Delete.
6406 (initialize_low_tracepoint): Set the ipa's target description.
6407 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6408 (initialize_low_tracepoint): Set the ipa's target description.
6409 * linux-x86-low.c: Include tdesc.h.
6410 [__x86_64__] (is_64bit_tdesc): New.
6411 (ps_get_thread_area, x86_get_thread_area): Use it.
6412 (i386_cannot_store_register): Rename to ...
6413 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6414 (i386_cannot_fetch_register): Rename to ...
6415 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6416 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6417 to new interface.
6418 (target_regsets): Rename to ...
6419 (x86_regsets): ... this.
6420 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6421 interface.
6422 (x86_siginfo_fixup): Use is_64bit_tdesc.
6423 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6424 (tdesc_x32_avx_linux, tdesc_x32_linux)
6425 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6426 Declare.
6427 (x86_linux_update_xmltarget): Delete.
6428 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6429 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6430 (AMD64_LINUX_USER64_CS): New.
6431 (x86_linux_read_description): New, based on
6432 x86_linux_update_xmltarget.
6433 (same_process_callback): New.
6434 (x86_arch_setup_process_callback): New.
6435 (x86_linux_update_xmltarget): New.
6436 (x86_regsets_info): New.
6437 (amd64_linux_regs_info): New.
6438 (i386_linux_usrregs_info): New.
6439 (i386_linux_regs_info): New.
6440 (x86_linux_regs_info): New.
6441 (x86_arch_setup): Reimplement.
6442 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6443 (x86_emit_ops): Ditto.
6444 (the_low_target): Adjust. Install x86_linux_regs_info,
6445 x86_cannot_fetch_register, and x86_cannot_store_register.
6446 (initialize_low_arch): New.
6447 * linux-ia64-low.c (tdesc_ia64): Declare.
6448 (ia64_fetch_register): Adjust.
6449 (ia64_usrregs_info, regs_info): New globals.
6450 (ia64_regs_info): New function.
6451 (the_low_target): Adjust.
6452 (initialize_low_arch): New function.
6453 * linux-sparc-low.c (tdesc_sparc64): Declare.
6454 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6455 Adjust.
6456 (sparc_arch_setup): New function.
6457 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6458 (the_low_target): Adjust.
6459 (initialize_low_arch): New function.
6460 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6461 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6462 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6463 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6464 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6465 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6466 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6467 (tdesc_powerpc_isa205_vsx64l): Declare.
6468 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6469 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6470 (ppc_set_pc, ppc_get_hwcap): Adjust.
6471 (ppc_usrregs_info): Forward declare.
6472 (!__powerpc64__) ppc_regmap_adjusted: New global.
6473 (ppc_arch_setup): Adjust to the current process'es target
6474 description.
6475 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6476 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6477 (ppc_store_evrregset): Adjust.
6478 (target_regsets): Rename to ...
6479 (ppc_regsets): ... this, and make static.
6480 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6481 (ppc_regs_info): New function.
6482 (the_low_target): Adjust.
6483 (initialize_low_arch): New function.
6484 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6485 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6486 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6487 (tdesc_s390x_linux64v2): Declare.
6488 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6489 (s390_fill_gregset, s390_store_last_break): Adjust.
6490 (target_regsets): Rename to ...
6491 (s390_regsets): ... this, and make static.
6492 (s390_get_pc, s390_set_pc): Adjust.
6493 (s390_get_hwcap): New target_desc parameter, and use it.
6494 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6495 (s390_arch_setup): Adjust to set the current process'es target
6496 description. Don't adjust the regmap.
6497 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6498 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6499 (regs_info_3264): New globals.
6500 (s390_regs_info): New function.
6501 (the_low_target): Adjust.
6502 (initialize_low_arch): New function.
6503 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6504 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6505 [__mips64] (init_registers_mips_linux)
6506 (init_registers_mips_dsp_linux): Delete defines.
6507 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6508 (have_dsp): New global.
6509 (mips_read_description): New, based on mips_arch_setup.
6510 (mips_arch_setup): Reimplement.
6511 (get_usrregs_info): New function.
6512 (mips_cannot_fetch_register, mips_cannot_store_register)
6513 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6514 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6515 (target_regsets): Rename to ...
6516 (mips_regsets): ... this, and make static.
6517 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6518 (dsp_regs_info, regs_info): New globals.
6519 (mips_regs_info): New function.
6520 (the_low_target): Adjust.
6521 (initialize_low_arch): New function.
6522 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6523 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6524 Declare.
6525 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6526 (arm_read_description): New, with bits factored from
6527 arm_arch_setup.
6528 (arm_arch_setup): Reimplement.
6529 (target_regsets): Rename to ...
6530 (arm_regsets): ... this, and make static.
6531 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6532 (arm_regs_info): New function.
6533 (the_low_target): Adjust.
6534 (initialize_low_arch): New function.
6535 * linux-m68k-low.c (tdesc_m68k): Declare.
6536 (target_regsets): Rename to ...
6537 (m68k_regsets): ... this, and make static.
6538 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6539 (m68k_regs_info): New function.
6540 (m68k_arch_setup): New function.
6541 (the_low_target): Adjust.
6542 (initialize_low_arch): New function.
6543 * linux-sh-low.c (tdesc_sharch): Declare.
6544 (target_regsets): Rename to ...
6545 (sh_regsets): ... this, and make static.
6546 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6547 (sh_regs_info, sh_arch_setup): New functions.
6548 (the_low_target): Adjust.
6549 (initialize_low_arch): New function.
6550 * linux-bfin-low.c (tdesc_bfin): Declare.
6551 (bfin_arch_setup): New function.
6552 (bfin_usrregs_info, regs_info): New globals.
6553 (bfin_regs_info): New function.
6554 (the_low_target): Adjust.
6555 (initialize_low_arch): New function.
6556 * linux-cris-low.c (tdesc_cris): Declare.
6557 (cris_arch_setup): New function.
6558 (cris_usrregs_info, regs_info): New globals.
6559 (cris_regs_info): New function.
6560 (the_low_target): Adjust.
6561 (initialize_low_arch): New function.
6562 * linux-cris-low.c (tdesc_crisv32): Declare.
6563 (cris_arch_setup): New function.
6564 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6565 (cris_regs_info): New function.
6566 (the_low_target): Adjust.
6567 (initialize_low_arch): New function.
6568 * linux-m32r-low.c (tdesc_m32r): Declare.
6569 (m32r_arch_setup): New function.
6570 (m32r_usrregs_info, regs_info): New globals.
6571 (m32r_regs_info): Adjust.
6572 (initialize_low_arch): New function.
6573 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6574 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6575 (tic6x_usrregs_info): Forward declare.
6576 (tic6x_read_description): New function, based on ...
6577 (tic6x_arch_setup): ... this. Reimplement.
6578 (target_regsets): Rename to ...
6579 (tic6x_regsets): ... this, and make static.
6580 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6581 (tic6x_regs_info): New function.
6582 (the_low_target): Adjust.
6583 (initialize_low_arch): New function.
6584 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6585 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6586 (target_regsets): Rename to ...
6587 (xtensa_regsets): ... this, and make static.
6588 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6589 globals.
6590 (xtensa_arch_setup, xtensa_regs_info): New functions.
6591 (the_low_target): Adjust.
6592 (initialize_low_arch): New function.
6593 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6594 (nios2_arch_setup): Set the current process'es tdesc.
6595 (target_regsets): Rename to ...
6596 (nios2_regsets): ... this.
6597 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6598 (nios2_regs_info): New function.
6599 (the_low_target): Adjust.
6600 (initialize_low_arch): New function.
a261b8f5
PA
6601 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6602 (aarch64_arch_setup): Set the current process'es tdesc.
6603 (target_regsets): Rename to ...
6604 (aarch64_regsets): ... this.
6605 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6606 (aarch64_regs_info): New function.
6607 (the_low_target): Adjust.
6608 (initialize_low_arch): New function.
3aee8918
PA
6609 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6610 globals.
6611 (target_regsets): Rename to ...
6612 (tile_regsets): ... this.
6613 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6614 (tile_regs_info): New function.
6615 (tile_arch_setup): Set the current process'es tdesc.
6616 (the_low_target): Adjust.
6617 (initialize_low_arch): New function.
6618 * spu-low.c (tdesc_spu): Declare.
6619 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6620 * win32-arm-low.c (tdesc_arm): Declare.
6621 (arm_arch_setup): New function.
6622 (the_low_target): Install arm_arch_setup instead of
6623 init_registers_arm.
6624 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6625 (init_windows_x86): Rename to ...
6626 (i386_arch_setup): ... this. Set `win32_tdesc'.
6627 (the_low_target): Adjust.
6628 * win32-low.c (win32_tdesc): New global.
6629 (child_add_thread): Don't create the thread cache here.
6630 (do_initial_child_stuff): Set the new process'es tdesc.
6631 * win32-low.h (struct target_desc): Forward declare.
6632 (win32_tdesc): Declare.
6633 * lynx-i386-low.c (tdesc_i386): Declare global.
6634 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6635 * lynx-low.c (lynx_tdesc): New global.
6636 (lynx_add_process): Set the new process'es tdesc.
6637 * lynx-low.h (struct target_desc): Forward declare.
6638 (lynx_tdesc): Declare global.
6639 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6640 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6641 * nto-low.c (nto_tdesc): New global.
6642 (do_attach): Set the new process'es tdesc.
6643 * nto-low.h (struct target_desc): Forward declare.
6644 (nto_tdesc): Declare.
6645 * nto-x86-low.c (tdesc_i386): Declare.
6646 (nto_x86_arch_setup): Set `nto_tdesc'.
6647
b1fbec62
GB
66482013-06-04 Gary Benson <gbenson@redhat.com>
6649
6650 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6651 to qSupported response when appropriate.
6652 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6653 with nonzero-length annex.
6654 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6655 arguments supplied in annex.
6656
d1ec4ce7
DE
66572013-05-31 Doug Evans <dje@google.com>
6658
ac44adcb 6659 PR server/15594
d1ec4ce7
DE
6660 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6661 64 bits in 64-cross-32 environment.
6662
9b25f2d3
PA
66632013-05-28 Pedro Alves <palves@redhat.com>
6664
6665 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6666 (aarch64-without-fpu.c): Delete rule.
6667 * configure.srv (aarch64*-*-linux*): Remove references to
6668 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6669 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6670 declaration.
6671
6740dc9c
PA
66722013-05-24 Pedro Alves <palves@redhat.com>
6673
6674 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6675 instead of strchr/decode_address. Error if the range isn't split
6676 with a ','. Don't assume there's be a ':' in the action.
6677
c2d6af84
PA
66782013-05-23 Yao Qi <yao@codesourcery.com>
6679 Pedro Alves <palves@redhat.com>
6680
6681 * linux-low.c (lwp_in_step_range): New function.
6682 (linux_wait_1): If the thread was range stepping and stopped
6683 outside the stepping range, report the stop to GDB. Otherwise,
6684 continue stepping. Add range stepping debug output.
6685 (linux_set_resume_request): Copy the step range from the resume
6686 request to the lwp.
6687 (linux_supports_range_stepping): New.
6688 (linux_target_ops) <supports_range_stepping>: Set to
6689 linux_supports_range_stepping.
6690 * linux-low.h (struct linux_target_ops)
6691 <supports_range_stepping>: New field.
6692 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6693 * linux-x86-low.c (x86_supports_range_stepping): New.
6694 (the_low_target) <supports_range_stepping>: Set to
6695 x86_supports_range_stepping.
6696 * server.c (handle_v_cont): Handle 'r' action.
6697 (handle_v_requests): Append ";r" if the target supports range
6698 stepping.
6699 * target.h (struct thread_resume) <step_range_start,
6700 step_range_end>: New fields.
6701 (struct target_ops) <supports_range_stepping>:
6702 New field.
6703 (target_supports_range_stepping): New macro.
6704
58794e1a
JB
67052013-05-17 Joel Brobecker <brobecker@adacore.com>
6706
6707 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6708 confusion in comment.
6709
d631c5a7
JB
67102013-05-17 Joel Brobecker <brobecker@adacore.com>
6711
6712 * lynx-low.c (struct process_info_private): New type.
6713 (lynx_add_process): New function.
6714 (lynx_create_inferior, lynx_attach): Replace calls to
6715 add_process by calls to lynx_add_process.
6716 (lynx_resume): If PTID is null, then try using
6717 current_process()->private->last_wait_event_ptid.
6718 Add comments.
6719 (lynx_clear_inferiors): Delete. The contents of that function
6720 has been inlined in lynx_mourn;
6721 (lynx_wait_1): Save the ptid in the process's private data.
6722 (lynx_mourn): Free the process' private data. Replace call
6723 to lynx_clear_inferiors by call to clear_inferiors.
6724
96f7a20f
YQ
67252013-05-17 Yao Qi <yao@codesourcery.com>
6726
6727 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6728 the right place.
6729
db0dfaa0
LM
67302013-05-16 Luis Machado <lgustavo@codesourcery.com>
6731
6732 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6733 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6734 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6735 PT_TEXT_END_ADDR guards. Update comments.
6736 (linux_target_op) <read_offsets>: Conditionally define to
6737 linux_read_offsets if the target is UCLIBC and if it defines
6738 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6739
68f5f838
SL
67402013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6741 Andrew Jenner <andrew@codesourcery.com>
6742
6743 * Makefile.in (SFILES): Add linux-nios2-low.c.
6744 (clean): Add action to delete nios2-linux.c.
6745 (nios2-linux.c): New rule.
6746 * configure.srv: Add nios2*-*-linux*.
6747 * linux-nios2-low.c: New.
6748
1ebff1fd
HAQ
67492013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6750
6751 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6752
f6150862
HZ
67532013-04-25 Hui Zhu <hui@codesourcery.com>
6754
6755 PR gdb/15186
f6150862
HZ
6756 * ax.c (ax_printf): Add fflush.
6757
614c279d
TT
67582013-04-22 Tom Tromey <tromey@redhat.com>
6759
6760 * Makefile.in (SFILES): Add filestuff.c.
6761 (OBS): Add filestuff.o.
6762 (filestuff.o): New target.
6763 * config.in, configure: Rebuild.
6764 * configure.ac: Check for fdwalk, pipe2.
6765
7d4e5717
PA
67662013-04-17 Pedro Alves <palves@redhat.com>
6767
6768 * configure.ac (USE_THREAD_DB): Delete variable.
6769 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6770 Don't AC_SUBST USE_THREAD_DB.
6771 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6772 * config.in, configure: Regenerate.
6773
d5c93e41
PA
67742013-04-16 Pedro Alves <palves@redhat.com>
6775
6776 * linux-low.h (struct lwp_info) <thread_known>: Move under
6777 the USE_THREAD_DB #ifdef.
6778
04f5fe89
PA
67792013-04-16 Pedro Alves <palves@redhat.com>
6780
6781 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6782 (linux-low.o): Delete rule.
6783 * linux-low.h: Always include "gdb_thread_db.h" instead of
6784 conditionally including thread_db.h.
6785 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6786 HAVE_THREAD_DB_H.
6787
480b27bf
JK
67882013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6789
6790 * Makefile.in (install-only): Fix make install regression.
6791
43662968
JK
67922013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6793
6794 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6795 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6796 installation.
6797 * gdbserver.1: Remove.
6798
3e74e146
PA
67992013-03-22 Pedro Alves <palves@redhat.com>
6800
6801 * linux-low.c (handle_extended_wait): Don't call
6802 linux_enable_event_reporting.
6803
a8347a2a
TT
68042013-03-15 Tony Theodore <tonyt@logyst.com>
6805
6806 PR build/9098:
6807 * Makefile.in (SHELL): Use @SHELL@.
6808
eeb56fa7
SDJ
68092013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6810
6811 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6812 compiler warning.
6813
4fa7e2ff
JB
68142013-03-13 Joel Brobecker <brobecker@adacore.com>
6815
6816 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6817 Remove extraneous NULL element.
6818
8ddb1965
YQ
68192013-03-13 Yao Qi <yao@codesourcery.com>
6820
6821 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6822 'V' block in trace frame.
6823
9accd112
MM
68242013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6825
6826 * target.h (struct target_ops): Add btrace ops.
6827 (target_supports_btrace): New macro.
6828 (target_enable_btrace): New macro.
6829 (target_disable_btrace): New macro.
6830 (target_read_btrace): New macro.
6831 * gdbthread.h (struct thread_info): Add btrace field.
6832 * server.c: Include btrace-common.h.
6833 (handle_btrace_general_set): New function.
6834 (handle_btrace_enable): New function.
6835 (handle_btrace_disable): New function.
6836 (handle_general_set): Call handle_btrace_general_set.
6837 (handle_qxfer_btrace): New function.
6838 (struct qxfer qxfer_packets[]): Add btrace entry.
6839 * inferiors.c (remove_thread): Disable btrace.
6840 * linux-low: Include linux-btrace.h.
6841 (linux_low_enable_btrace): New function.
6842 (linux_low_read_btrace): New function.
6843 (linux_target_ops): Add btrace ops.
6844 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6845 Add srv_linux_btrace=yes.
6846 (x86_64-*-linux*): Add linux-btrace.o.
6847 Add srv_linux_btrace=yes.
6848 * configure.ac: Define HAVE_LINUX_BTRACE.
6849 * config.in: Regenerated.
6850 * configure: Regenerated.
6851
5cc22e4c
MM
68522013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6853
6854 * server.c (handle_qxfer): Preserve error message if -3 is
6855 returned.
6856 (qxfer): Document the -3 return value.
6857
7c97f91e
MM
68582013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6859
6860 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6861 (linux_btrace_h): New variable.
6862 (linux-btrace.o): New rule.
6863
be9a119c 68642013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
6865 Hafiz Abid Qadeer <abidh@codesourcery.com>
6866
6867 * tracepoint.c (trace_buffer_size): New global.
6868 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6869 (init_trace_buffer): Change to one-argument function. Allocate
6870 trace buffer memory.
6871 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6872 handle QTBuffer:size packet.
6873 (cmd_bigqtbuffer_size): New function.
6874 (initialize_tracepoint): Call init_trace_buffer with
6875 DEFAULT_TRACE_BUFFER_SIZE.
6876 * server.c (handle_query): Add QTBuffer:size in the
6877 supported packets.
6878
e64f7499
YQ
68792013-03-07 Yao Qi <yao@codesourcery.com>
6880
6881 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6882 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6883 of -1.
6884 (cmd_qtsp): Adjust condition. Do post increment.
6885 Set cur_action and cur_step_action back to 0.
6886
f0ae6fc3
PA
68872013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6888
6889 PR server/15236
6890 * linux-low.c (linux_write_memory): Return early success if LEN is
6891 zero.
6892
b5b0b0af
CV
68932013-03-05 Corinna Vinschen <vinschen@redhat.de>
6894
334ad4a8 6895 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 6896
589bc927
TT
68972013-02-28 Tom Tromey <tromey@redhat.com>
6898
6899 * configure.ac: Invoke AC_SYS_LARGEFILE.
6900 * configure, config.in: Rebuild.
6901
dfe07582
CV
69022013-02-28 Corinna Vinschen <vinschen@redhat.com>
6903
6904 * win32-low.c: Throughout, fix format strings and casts of
6905 printf-like functions to avoid type related warnings on all
6906 platforms.
6907 (get_child_debug_event): Print dwDebugEventCode as hex since
6908 that's how it's usually documented.
6909
736cd585
YQ
69102013-02-28 Yao Qi <yao@codesourcery.com>
6911
6912 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6913 pulongest.
6914
e1f58301
JW
69152013-02-27 Jiong Wang <jiwang@tilera.com>
6916
6917 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6918 (reg-tilegx32.c): New rule.
6919 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6920 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6921 different register info initializer according to elf class.
6922 (init_registers_tilgx32): New function. The tilegx32 register info
6923 initializer.
6924 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6925 (tile_store_gregset): Likewise.
6926
d171ca78
YQ
69272013-02-27 Yao Qi <yao@codesourcery.com>
6928
6929 * server.c (process_point_options): Print debug message when
6930 debug_threads is true.
6931
282bbdf3
YQ
69322013-02-26 Yao Qi <yao@codesourcery.com>
6933
6934 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6935
aca22551
PA
69362013-02-19 Pedro Alves <palves@redhat.com>
6937 Kai Tietz <ktietz@redhat.com>
6938
6939 PR gdb/15161
6940
6941 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6942 instead of strtoul to extract address from packet.
6943 (process_serial_event) <'z'>: Likewise.
6944
4f3cee1c
YQ
69452013-02-18 Yao Qi <yao@codesourcery.com>
6946
6947 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6948
8e1d55a3
PA
69492013-02-14 Pedro Alves <palves@redhat.com>
6950
6951 Plug memory leak.
6952
6953 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6954 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6955
458820da
PA
69562013-02-14 Pedro Alves <palves@redhat.com>
6957
6958 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6959
baea0dae
PA
69602013-02-14 Pedro Alves <palves@redhat.com>
6961
6962 * tracepoint.c (save_string): Delete.
6963 (add_tracepoint_action): Use savestring instead of save_string.
6964
0b1afbb3
PA
69652013-02-12 Pedro Alves <palves@redhat.com>
6966
6967 * linux-xtensa-low.c: Ditto.
6968 * xtensa-xtregs.c: Ditto.
6969
8a4ac37e
PA
69702013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6971
6972 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6973 thread_db.
6974
148de6bb
MS
69752013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6976
6977 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6978 aarch64_num_wp_regs and aarch64_num_bp_regs to
6979 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6980
55fac6e0
MS
69812013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6982
6983 * linux-aarch64-low.c (ps_get_thread_area): Replace
6984 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6985
176eb98c
MS
69862013-02-04 Jim MacArthur <jim.macarthur@arm.com>
6987 Marcus Shawcroft <marcus.shawcroft@arm.com>
6988 Nigel Stephens <nigel.stephens@arm.com>
6989 Yufeng Zhang <yufeng.zhang@arm.com>
6990
6991 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6992 (aarch64.c, aarch64-without-fpu.c): New targets.
6993 * configure.srv (aarch64*-*-linux*): New.
6994 * linux-aarch64-low.c: New file.
6995
56f7af9c
MS
69962013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
6997
43aaf8b6 6998 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
6999 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7000 (dequeue_one_deferred_signal, linux_resume_one_thread)
7001 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7002 (linux_tracefork_grandchild, linux_test_for_tracefork)
7003 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7004 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7005 where the argument is 0.
7006
60f662b0
YQ
70072013-01-25 Yao Qi <yao@codesourcery.com>
7008
7009 * event-loop.c: Include "queue.h".
7010 (gdb_event_p): New typedef.
7011 (struct gdb_event) <next_event>: Remove.
7012 (event_queue): Change to QUEUE(gdb_event_p).
7013 (async_queue_event): Remove.
7014 (gdb_event_xfree): New.
7015 (initialize_event_loop): New.
7016 (process_event): Use API from QUEUE.
7017 (wait_for_event): Likewise.
7018 * server.c (main): Call initialize_event_loop.
7019 * server.h (initialize_event_loop): Declare.
7020
5ae4861a
YQ
70212013-01-18 Yao Qi <yao@codesourcery.com>
7022
7023 * ax.h (struct eval_agent_expr_context): New.
7024 (gdb_eval_agent_expr): Update declaration.
7025 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7026 TFRAME. Add new argument CTX.
7027 * server.h (struct eval_agent_expr_context): Declare.
7028 (agent_mem_read, agent_tsv_read): Update declaration.
7029 (agent_mem_read_string): Likewise.
7030 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7031 (add_traceframe_block): Add new argument TPOINT.
7032 Increase TPOINT->traceframe_usage.
7033 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7034 eval_tracepoint_agent_expr.
7035 (condition_true_at_tracepoint): Likewise.
7036 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7037 (agent_mem_read_string, agent_tsv_read): Likewise.
7038
85e00e85
YQ
70392013-01-16 Yao Qi <yao@codesourcery.com>
7040
7041 * linux-low.c (linux_resume_one_lwp): Don't check
7042 'lwp->bp_reinsert != 0'.
7043
4039cf45
JB
70442013-01-07 Joel Brobecker <brobecker@adacore.com>
7045 Pedro Alves <palves@redhat.com>
7046
7047 * lynx-low.c (ptrace_request_to_str): Define a temporary
7048 macro and use it to simplify this function's implementation.
7049
9044dee2
JB
70502013-01-07 Joel Brobecker <brobecker@adacore.com>
7051
7052 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7053 sets errno.
7054
e6352c8f
JB
70552013-01-07 Joel Brobecker <brobecker@adacore.com>
7056
7057 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7058
50681a27
JB
70592013-01-07 Joel Brobecker <brobecker@adacore.com>
7060
7061 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7062
3f6e77ef
JB
70632013-01-07 Joel Brobecker <brobecker@adacore.com>
7064
7065 * lynx-low.c (lynx_resume): Use the resume_info parameter
7066 to determine the ptid for the lynx_ptrace call, unless
7067 it is equal to minus_one_ptid, in which case we use the
7068 ptid of the current_inferior.
7069 (lynx_wait_1): After having received a thread create/exit
7070 event, resume the inferior's execution using the signaling
7071 thread's ptid, rather than the old ptid.
7072
7fda33ae
JB
70732013-01-07 Joel Brobecker <brobecker@adacore.com>
7074
7075 * lynx-low.c (lynx_resume): Delete variable ret.
7076
b9786c74
JB
70772013-01-01 Joel Brobecker <brobecker@adacore.com>
7078
7079 * gdbreplay.c (gdbreplay_version): Update copyright year.
7080 * server.c (gdbserver_version): Likewise.
7081
8b93d60f
JB
70822012-12-17 Joel Brobecker <brobecker@adacore.com>
7083
7084 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7085 new thread.
7086
037335a7
JB
70872012-12-17 Joel Brobecker <brobecker@adacore.com>
7088
7089 * lynx-low.c (ptrace_request_to_str): Add handling for
7090 PTRACE_GETTRACESIG.
7091
52d4cbd8
JB
70922012-12-17 Joel Brobecker <brobecker@adacore.com>
7093
7094 * lynx-low.c (lynx_attach): Delete variable new_process.
7095
ab8f6ca9
JB
70962012-12-17 Joel Brobecker <brobecker@adacore.com>
7097
7098 * lynx-low.c (lynx_create_inferior): Delete variable
7099 new_process.
7100
78cbc024
JB
71012012-12-17 Joel Brobecker <brobecker@adacore.com>
7102
7103 * lynx-low.c (ptrace_request_to_str): Do not handle
7104 PTRACE_GETTHREADLIST if this macro does not exist.
7105
14a00470
YQ
71062012-12-15 Yao Qi <yao@codesourcery.com>
7107
7108 * Makefile.in (OBS): Add notif.o.
7109 * notif.c, notif.h: New.
7110 * server.c: Include "notif.h".
7111 (struct vstop_notif) <next>: Remove.
7112 <base>: New field.
7113 (queue_stop_reply): Update.
7114 (push_event, send_next_stop_reply): Remove.
7115 (discard_queued_stop_replies): Update.
7116 (notif_stop): New variable.
7117 (handle_v_stopped): Remove.
7118 (handle_v_requests): Don't call handle_v_stopped. Call
7119 handle_ack_notif instead.
7120 (queue_stop_reply_callback): Call notif_event_enque instead
7121 of queue_stop_reply.
7122 (handle_status): Don't call send_next_stop_reply, call
7123 notif_write_event instead.
7124 (kill_inferior_callback): Likewise.
7125 (detach_or_kill_inferior_callback): Likewise.
7126 (main): Call initialize_notif.
7127 (process_serial_event): Call QUEUE_is_empty.
7128 (handle_target_event): Call notif_push instead of push event.
7129 * server.h (push_event): Remove declaration.
7130
61c125b9
TT
71312012-12-10 Tom Tromey <tromey@redhat.com>
7132
7133 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7134 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7135 macros.
7136 (.c.o): Rewrite.
7137 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7138 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7139 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7140 (amd64-linux-ipa.o, ax.o): Rewrite.
7141 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7142 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7143 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7144 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7145 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7146 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7147 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7148 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7149 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7150 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7151 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7152 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7153 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7154 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7155 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7156 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7157 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7158 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7159 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7160 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7161 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7162 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7163 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7164 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7165 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7166 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7167 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7168 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7169 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7170 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7171 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7172 (reg-tilegx.o): Remove.
7173 (all_object_files): New macro.
7174 Include .deps files.
7175 * aclocal.m4, configure: Rebuild.
7176 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7177 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7178 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7179
e90e9ad9
TT
71802012-12-05 Tom Tromey <tromey@redhat.com>
7181
7182 PR gdb/14917:
7183 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7184
02d403bf 71852012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
7186
7187 * configure.ac: Check for linux/perf_event.h.
7188 * config.in: Regenerated.
7189 * configure: Regenerated.
7190
0270a750
PA
71912012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7192
7193 * hostio.c (handle_readlink): Decrease buffer size
7194 parameter passed to readlink by one byte.
7195
8c29b58e
YQ
71962012-11-26 Yao Qi <yao@codesourcery.com>
7197
7198 * configure.ac (build_warnings): Append '-Wempty-body'.
7199 * configure: Regenerated.
7200 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7201 body.
7202
8bdce1ff
PM
72032012-11-15 Pierre Muller <muller@sourceware.org>
7204
7205 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7206 * config.in: Regenerate.
7207 * configure: Regenerate.
7208 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7209 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7210 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7211 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7212 header.
7213 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7214 instead of <sys/wait.h> header.
7215 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7216
02d403bf 72172012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
7218
7219 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7220 (various make rules): Remove -DGDBSERVER
7221
fbd5db48
YQ
72222012-11-09 Yao Qi <yao@codesourcery.com>
7223
7224 * spu-low.c (current_ptid): Move it to ..
7225 * gdbthread.h: ... here. New.
7226 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7227 * server.c (myresume, process_serial_event): Likewise.
7228 * thread-db.c (thread_db_find_new_threads): Likewise.
7229 * tracepoint.c (run_inferior_command): Likewise.
7230
b3dc46ff
AB
72312012-10-01 Andrew Burgess <aburgess@broadcom.com>
7232
7233 * server.c (handle_search_memory_1): Include access length in
7234 warning message.
7235
07c04788
HPN
72362012-09-05 Michael Brandt <michael.brandt@axis.com>
7237
7238 * linux-crisv32-low.c: Fix compile errors.
7239
918d227b
YQ
72402012-09-04 Yao Qi <yao@codesourcery.com>
7241
7242 * tracepoint.c (cmd_qtsv): Adjust debug message.
7243 Don't check CUR_TPOINT.
7244
18c1b81a
YQ
72452012-08-28 Yao Qi <yao@codesourcery.com>
7246
7247 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7248 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7249 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7250 Remove declarations of xmalloc, xreallloc, xstrdup and
7251 freeargv.
7252 * Makefile.in (libiberty_h): New.
7253 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7254 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7255
dc82f37b
YQ
72562012-08-23 Yao Qi <yao@codesourcery.com>
7257
7258 * server.h: Remove declaration of 'xsnprintf'.
7259
406b1477
KS
72602012-08-22 Keith Seitz <keiths@redhat.com>
7261
7262 * server.h: Include build-gnulib-gbserver/config.h.
7263 * gdbreplay.c: Likewise.
7264
e6712ff1
DE
72652012-08-08 Doug Evans <dje@google.com>
7266
7267 * Makefile.in (SFILES): Add gdb_vecs.c.
7268 (OBS): Add gdb_vecs.o.
7269 (gdb_vecs_h, host_defs_h): New variables.
7270 (thread-db.o): Add $(gdb_vecs_h) dependency.
7271 (gdb_vecs.o): New rule.
7272 * thread-db.c: #include "gdb_vecs.h".
7273 (thread_db_load_search): Use a vector to iterate over path elements.
7274 Handle text appearing after "$pdir".
7275
7276 * configure.ac: Add check for strstr.
7277 * config.in: Regenerate.
7278 * configure: Regenerate.
7279
7c3270ae
UW
72802012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7281
7282 * hostio.c (handle_pread): If pread fails, fall back to attempting
7283 lseek/read.
7284 (handle_pwrite): Likewise for pwrite.
7285
b62e2b27
UW
72862012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7287
7288 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7289 between unsupported TYPE and unimplementable ADDR/LEN combination.
7290 (arm_insert_point): Act on new return value.
7291
78a99e91
PA
72922012-07-31 Pedro Alves <palves@redhat.com>
7293
7294 * server.c (process_point_options): Only skip tokens if we find
7295 one that is unrecognized. Don't treat 'X' specially while
7296 skipping unrecognized tokens.
7297
fcf303ab
UW
72982012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7299
7300 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7301 to 4-byte-align HW breakpoint addresses for Thumb.
7302
7255706c
YQ
73032012-07-27 Yao Qi <yao@codesourcery.com>
7304
7305 PR remote/14161.
7306
7307 * server.h: Declare gdb_agent_about_to_close.
7308 * target.c (kill_inferior): Include "agent.h".
7309 New. Send command 'kill'.
7310 * target.h (kill_inferior): Removed macro.
7311 * tracepoint.c (gdb_agent_about_to_close): New.
7312 (gdb_agent_helper_thread): Handle command 'close'.
7313 Wait endlessly until the inferior stops.
7314 Install gdb_agent_remove_socket to atexit hook.
7315 (agent_socket_name): New static variable.
7316 (gdb_agent_socket_init): Replace local variable 'name' with
7317 'agent_socket_name'.
7318 (gdb_agent_remove_socket): New.
7319
5a3f286f
YQ
73202012-07-27 Yao Qi <yao@codesourcery.com>
7321
7322 * server.c (process_point_options): Stop at 'X' when parsing.
7323
961bd387
ME
73242012-07-19 Michael Eager <eager@eagercon.com>
7325
a261b8f5 7326 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
7327 to hw_execute.
7328 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7329 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7330 hardware breakpoint.
7331
aa7c7447
JK
73322012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7333
7334 * gdbserver/linux-low.c (initialize_low): Call
7335 linux_ptrace_init_warnings.
7336
7f216e7c
DE
73372012-07-02 Doug Evans <dje@google.com>
7338
7339 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7340 pointer to int.
7341
d3ce09f5
SS
73422012-07-02 Stan Shebs <stan@codesourcery.com>
7343
7344 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7345 (ax.o): Add it to build rule.
7346 (ax-ipa.o): Ditto.
7347 (OBS): Add format.o.
7348 (IPA_OBS): Add format.o.
7349 * server.c (handle_query): Claim support for breakpoint commands.
7350 (process_point_options): Add command case.
7351 (process_serial_event): Leave running if there are printfs in
7352 effect.
7353 * mem-break.h (any_persistent_commands): Declare.
7354 (add_breakpoint_commands): Declare.
7355 (gdb_no_commands_at_breakpoint): Declare.
7356 (run_breakpoint_commands): Declare.
7357 * mem-break.c (struct point_command_list): New struct.
7358 (struct breakpoint): New field command_list.
7359 (any_persistent_commands): New function.
7360 (add_commands_to_breakpoint): New function.
7361 (add_breakpoint_commands): New function.
7362 (gdb_no_commands_at_breakpoint): New function.
7363 (run_breakpoint_commands): New function.
7364 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7365 locally.
7366 * ax.c: Include format.h.
7367 (ax_printf): New function.
7368 (gdb_eval_agent_expr): Add printf opcode.
7369
2f8f6aed
YQ
73702012-06-13 Yao Qi <yao@codesourcery.com>
7371
7372 * server.c (start_inferior): Remove duplicated writes to fields
7373 'last_resume_kind' and 'last_status' of 'current_inferior'.
7374
0c9070b3
YQ
73752012-06-12 Yao Qi <yao@codesourcery.com>
7376 Pedro Alves <palves@redhat.com>
7377
7378 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7379 comment.
7380 * server.c (handle_v_cont): Extend comment.
7381
c52daf70
YQ
73822012-06-11 Yao Qi <yao@codesourcery.com>
7383
7384 * linux-low.c (linux_attach): Add 'static'.
7385
d38bbb0a
YQ
73862012-06-06 Yao Qi <yao@codesourcery.com>
7387
7388 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7389
89dc0afd
JK
73902012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7391
7392 Fix gcc -flto compilation warning.
7393 * server.c (main): Make variable multi_mode and attach volatile.
7394
75f62ce7
TJB
73952012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7396
7397 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7398 if the platform doesn't know about it.
7399
65f479b6
PA
74002012-05-30 Jeff Kenton <jkenton@tilera.com>
7401
7402 * Makefile.in (SFILES): Add linux-tile-low.c.
7403 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7404 * configure.srv: Handle tilegx-*-linux*.
7405 * linux-tile-low.c: New file.
7406
0c5bf5a9
JK
74072012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7408
7409 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7410
a493e3e2
PA
74112012-05-24 Pedro Alves <palves@redhat.com>
7412
7413 PR gdb/7205
7414
43aaf8b6 7415 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 7416
2ea28649
PA
74172012-05-24 Pedro Alves <palves@redhat.com>
7418
7419 PR gdb/7205
7420
7421 Replace target_signal with gdb_signal throughout.
7422
8d409d16
MR
74232012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7424
7425 * linux-low.c (linux_store_registers): Avoid the copying sequence
7426 when no data has been retrieved by ptrace.
7427
23512c01
MGD
74282012-05-22 Will Deacon <will.deacon@arm.com>
7429
7430 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7431 Include asm/ptrace.h.
7432 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7433 already defined.
7434
4934b29e
MR
74352012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7436
7437 * linux-low.c (linux_store_registers): Don't re-retrieve data
7438 with ptrace that has already been obtained from /proc. Always
7439 copy any data retrieved with ptrace to the buffer supplied.
7440
bde24c0a
PA
74412012-05-11 Yao Qi <yao@codesourcery.com>
7442 Pedro Alves <palves@redhat.com>
7443
7444 * linux-low.c (enum stopping_threads_kind): New.
7445 (stopping_threads): Change type to `enum stopping_threads_kind'.
7446 (handle_extended_wait): If stopping and suspending threads, leave
7447 the new_lwp suspended too.
7448 (linux_wait_for_event): Adjust.
7449 (stop_all_lwps): Set `stopping_threads' to
7450 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7451 whether we're suspending threads or just stopping them. Assert no
7452 recursion happens.
7453
623b6bdf
YQ
74542012-04-29 Yao Qi <yao@codesourcery.com>
7455
7456 * server.h: Move some code to ...
7457 * gdbthread.h: ... here. New.
7458 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7459 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7460 (nto-low.o, win32-low.o): Likewise.
7461 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7462 * regcache.c, remote-utils.c, server.c: Likewise.
7463 * target.c, tracepoint.c, win32-low.c: Likewise.
7464
f15f9948
TJB
74652012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7466
7467 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7468 (PTRACE_ARG4_TYPE): Likewise.
7469 (PTRACE_XFER_TYPE): Likewise.
7470 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7471 ptrace to PTRACE_ARG3_TYPE.
7472 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7473 (PTRACE_ARG4_TYPE): Likewise.
7474 (PTRACE_XFER_TYPE): Likewise.
7475 (linux_detach_one_lwp): Cast fourth argument of
7476 ptrace to long then PTRACE_ARG4_TYPE.
7477 (regsets_fetch_inferior_registers): Cast third argument of
7478 ptrace to long then PTRACE_ARG3_TYPE.
7479 (regsets_store_inferior_registers): Likewise.
7480
38ea300a
PA
74812012-04-20 Pedro Alves <palves@redhat.com>
7482
7483 * configure: Regenerate.
7484
c971b7fa
PA
74852012-04-19 Pedro Alves <palves@redhat.com>
7486
43aaf8b6 7487 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 7488 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
7489 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7490 (all, install-only, uninstall, clean-info, all-lib, clean): No
7491 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7492 (maintainer-clean realclean distclean): Use subdir_do.
7493 (subdir_do): New.
7494 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 7495 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
7496 * acinclude.m4: Include acx_configure_dir.m4.
7497 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7498 calls. Call AC_PROG_RANLIB. Configure gnulib using
7499 ACX_CONFIGURE_DIR.
7500 (GNULIB): New.
7501 (GNULIB_STDINT_H): Adjust.
7502 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7503 * gdbreplay.c: Include build-gnulib/config.h.
7504 * server.h: Likewise.
7505 * aclocal.m4: Regenerate.
7506 * config.in: Regenerate.
7507 * configure: Regenerate.
c971b7fa 7508
809277f8
PA
75092012-04-19 Pedro Alves <palves@redhat.com>
7510
7511 * Makefile.in (LIBGNU, INCGNU): Adjust.
7512 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7513 (all, install-only, uninstall, clean-info, all-lib, clean)
7514 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7515 * configure.ac: Adjust AC_OUTPUT output.
7516 * aclocal.m4: Regenerate.
7517 * configure: Regenerate.
7518
fd9bb8b8
PA
75192012-04-19 Pedro Alves <palves@redhat.com>
7520
7521 * Makefile.in (generated_files): New.
7522 (server_h): Remove the explicit dependency on config.h, and depend
7523 on $generated_files.
7524
1c298c66
PA
75252012-04-19 Pedro Alves <palves@redhat.com>
7526
7527 * Makefile.in (INCGNU): Add -Ignulib.
7528
57c4b50b
PA
75292012-04-19 Pedro Alves <palves@redhat.com>
7530
7531 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7532 (INCGNU): ... this, and spell out -I here.
7533 (GNULIB_LIB): Rename to ...
7534 (LIBGNU): ... this.
7535 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7536
1030e047
PA
75372012-04-19 Pedro Alves <palves@redhat.com>
7538
7539 * config.in: Regenerate.
7540
447d4319
PA
75412012-04-19 Pedro Alves <palves@redhat.com>
7542
7543 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7544 * server.h (memmem): Remove declaration.
7545 * config.in: Regenerate.
7546 * configure: Regenerate.
7547
aad9eab9
YQ
75482012-04-19 Yao Qi <yao@codesourcery.com>
7549
7550 * Makefile.in (SFILES): Add common/vec.c.
7551 (OBS): Add vec.o.
7552 (vec.o): New rule.
7553
3e10640f
YQ
75542012-04-19 Yao Qi <yao@codesourcery.com>
7555
7556 * remote-utils.c (prepare_resume_reply): Replace with macro
7557 target_core_of_thread.
7558 * server.c (handle_qxfer_threads_proper): Likewise.
7559 * target.h (traget_core_of_thread): New macro.
7560
71622373
PA
75612012-04-18 Pedro Alves <palves@redhat.com>
7562
7563 * aclocal.m4: Regenerate.
7564 * configure: Regenerate.
7565
80d26939
YQ
75662012-04-16 Yao Qi <yao@codesourcery.com>
7567
7568 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7569 duplicated on address.
7570
42476b70
YQ
75712012-04-16 Yao Qi <yao@codesourcery.com>
7572
7573 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7574 (struct tracepoint_action_ops) <send>: New field.
7575 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7576 (agent_expr_send, x_tracepoint_action_send): New.
7577 (l_tracepoint_action_send): New.
7578 (cmd_qtdp): Download and install tracepoint
7579 according to `use_agent'.
7580 (run_inferior_command): Add one more parameter `len'.
7581 Update callers.
7582 (tracepoint_send_agent): New.
7583 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7584
7bc83639
YQ
75852012-04-16 Yao Qi <yao@codesourcery.com>
7586
7587 * tracepoint.c (download_tracepoints): Moved to ...
7588 (cmd_qtstart): ... here.
7589
5f18041e
YQ
75902012-04-14 Yao Qi <yao@codesourcery.com>
7591
7592 * tracepoint.c: Include inttypes.h.
7593 (struct collect_memory_action): Use sized types.
7594 (struct tracepoint): Likewise.
7595 (cmd_qtdp, stop_tracing): Update print specifiers.
7596 (cmd_qtp, response_tracepoint): Likewise.
7597 (collect_data_at_tracepoint): Likewise.
7598 (collect_data_at_step): Likewise.
7599
55a8c076
YQ
76002012-04-14 Yao Qi <yao@codesourcery.com>
7601
7602 Import gnulib module inttypes.
7603 * aclocal.m4, config.in, configure: Regenerated.
7604
dc750257
YQ
76052012-04-14 Yao Qi <yao@codesourcery.com>
7606
7607 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7608 Makefile and config.status at last.
7609
0ab5faf9
YQ
76102012-04-13 Yao Qi <yao@codesourcery.com>
7611
7612 * tracepoint.c: Include stdint.h unconditionally.
7613
18f5fd81
TJB
76142012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7615
7616 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7617 on BFD_HAVE_SYS_PROCFS_TYPE.
7618 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7619 * configure: Regenerate.
7620 * config.in: Likewise.
7621
4d47af5c
L
76222012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7623
7624 * Makefile.in (clean): Also remove x32.c x32-linux.c
7625 x32-avx.c x32-avx-linux.c.
7626 (x32.o): New target.
7627 (x32.c): Likewise.
7628 (x32-linux.o): Likewise.
7629 (x32-linux.c): Likewise.
7630 (x32-avx.o): Likewise.
7631 (x32-avx.c): Likewise.
7632 (x32-avx-linux.o): Likewise.
7633 (x32-avx-linux.c): Likewise.
7634
7635 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7636 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7637 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7638 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7639 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7640 i386/x32-avx-linux.xml.
7641
7642 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7643 (init_registers_x32_avx_linux): Likwise.
7644 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7645 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7646
ecedbe58
PA
76472012-04-13 Pedro Alves <palves@redhat.com>
7648
7649 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7650 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7651 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7652 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7653 the sub-make.
7654
c92b5177
L
76552012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7656
7657 * linux-x86-low.c (compat_x32_clock_t): New.
7658 (compat_x32_siginfo_t): Likewise.
7659 (compat_x32_siginfo_from_siginfo): Likewise.
7660 (siginfo_from_compat_x32_siginfo): Likewise.
7661 (linux_is_elf64): Likewise.
7662 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7663 and siginfo_from_compat_x32_siginfo for x32.
7664 (x86_arch_setup): Set linux_is_elf64.
7665
214d508e
L
76662012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7667
7668 PR gdb/13969
7669 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7670 e_machine field.
7671 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7672 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7673 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7674 compatible with process.
7675
c9a1864a
YQ
76762012-04-12 Yao Qi <yao@codesourcery.com>
7677
7678 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7679 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7680 (install-only, install-info, clean): Handle sub dir gnulib.
7681 (all-lib, am--refresh): New targets.
7682 (memmem.o): Remove target.
7683 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7684 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7685 (AC_REPLACE_FUNCS): Remove memmem.
7686 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7687 (AC_OUTPUT): Generate Makefile in gnulib/.
7688 * aclocal.m4, config.in, configure: Regenerated.
7689
367ba2c2
MR
76902012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7691
7692 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7693
9d236627
PA
76942012-04-05 Pedro Alves <palves@redhat.com>
7695
7696 -Werror=strict-aliasing
7697
7698 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7699 pointer.
7700
111217b3
PA
77012012-04-04 Pedro Alves <palves@redhat.com>
7702
7703 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7704 (sparc_store_gregset_from_stack, sparc_store_gregset)
7705 (sparc_breakpoint_at): Fix formatting.
7706
8365dcf5
TJB
77072012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7708
7709 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7710 are available.
7711 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7712 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7713 * config.in: Regenerate.
7714 * configure: Likewise.
7715
689cc2ae
PA
77162012-03-29 Pedro Alves <palves@redhat.com>
7717
7718 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7719 Correct ptrace arguments.
7720
c14dfd32
PA
77212012-03-28 Pedro Alves <palves@redhat.com>
7722
7723 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7724 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7725 (IA64_FR1_REGNUM): New defines.
7726 (ia64_fetch_register): New.
7727 (the_low_target): Install it.
7728 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7729 field.
7730 * linux-low.c (linux_fetch_registers): Try the
7731 the_low_target.fetch_register hook first.
7732
7733 * linux-arm-low.c (the_low_target): Adjust.
7734 * linux-bfin-low.c (the_low_target): Adjust.
7735 * linux-cris-low.c (the_low_target): Adjust.
7736 * linux-crisv32-low.c (the_low_target): Adjust.
7737 * linux-m32r-low.c (the_low_target): Adjust.
7738 * linux-m68k-low.c (the_low_target): Adjust.
7739 * linux-mips-low.c (the_low_target): Adjust.
7740 * linux-ppc-low.c (the_low_target): Adjust.
7741 * linux-s390-low.c (the_low_target): Adjust.
7742 * linux-sh-low.c (the_low_target): Adjust.
7743 * linux-sparc-low.c (the_low_target): Adjust.
7744 * linux-tic6x-low.c (the_low_target): Adjust.
7745 * linux-x86-low.c (the_low_target): Adjust.
7746 * linux-xtensa-low.c (the_low_target): Adjust.
7747
63c88e13
PA
77482012-03-26 Pedro Alves <palves@redhat.com>
7749
7750 * server.c (handle_qxfer_libraries): Don't bail early if
7751 the_target->qxfer_libraries_svr4 is not NULL.
7752
fb723180
PA
77532012-03-26 Pedro Alves <palves@redhat.com>
7754
7755 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7756
0afae3cf
PA
77572012-03-23 Pedro Alves <palves@redhat.com>
7758
7759 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7760 "library-list-svr4" element's start tag when the the DSO list is
7761 empty.
7762
485f1ee4
PA
77632012-03-23 Pedro Alves <palves@redhat.com>
7764
7765 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7766 a variable whose type size is the same as the inferior's pointer
7767 size.
7768
a5362b9a
TS
77692012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7770
7771 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7772 struct siginfo.
7773 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7774 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7775 * linux-low.h: Include <signal.h>.
7776 (struct siginfo): Remove forward declaration.
7777 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7778 struct siginfo.
7779
d226c142
MF
77802012-03-21 Mike Frysinger <vapier@gentoo.org>
7781
7782 * .gitignore: Ignore more files.
7783
122f36ef
PA
77842012-03-19 Pedro Alves <palves@redhat.com>
7785 Jan Kratochvil <jan.kratochvil@redhat.com>
7786
7787 * server.c (cont_thread, general_thread): Add describing comments.
7788 (start_inferior): Clear `cont_thread'.
7789 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7790 of a process.
7791
fc3e5175
YQ
77922012-03-15 Yao Qi <yao@codesourcery.com>
7793
7794 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7795 handling to ...
7796 (cmd_qtdp): ... here.
7797
8d0d92cd
YQ
77982012-03-15 Yao Qi <yao@codesourcery.com>
7799
7800 * tracepoint.c (struct tracepoint_action_ops): New.
7801 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7802 (m_tracepoint_action_download): New.
7803 (r_tracepoint_action_download): New.
7804 (x_tracepoint_action_download): New.
7805 (l_tracepoint_action_download): New.
7806 (add_tracepoint_action): Install `action->ops' according type.
7807 (download_tracepoint_1): Move code `download' function pointer
7808 of various tracepoint_action_ops.
7809
87b0bb13
JK
78102012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7811
7812 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7813 linux_ptrace_attach_warnings.
7814
5f572dec
JK
78152012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7816
7817 * Makefile.in (linux-ptrace.o): New.
7818 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7819 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7820 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7821 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7822 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7823 of these targets.
7824 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7825
f4647387
YQ
78262012-03-08 Yao Qi <yao@codesourcery.com>
7827 Pedro Alves <palves@redhat.com>
7828
7829 Fix PR server/13392.
7830 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7831 offset of JMP insn.
7832 * tracepoint.c (remove_tracepoint): New.
7833 (cmd_qtdp): Call remove_tracepoint when failed to install.
7834
9b224c5e
PA
78352012-03-07 Pedro Alves <palves@redhat.com>
7836
7837 * linux-low.c (get_detach_signal): New.
7838 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7839 Pass on pending signals to PTRACE_DETACH. Check the result of the
7840 ptrace call.
7841 * server.c (program_signals, program_signals_p): New.
7842 (handle_general_set): Handle QProgramSignals.
7843 * server.h (program_signals, program_signals_p): Declare.
7844
e237a7e2
JK
78452012-03-05 Pedro Alves <palves@redhat.com>
7846 Jan Kratochvil <jan.kratochvil@redhat.com>
7847
7848 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7849 New comment why.
7850
5808517f
YQ
78512012-03-03 Yao Qi <yao@codesourcery.com>
7852
7853 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7854 agent_look_up_symbols.
7855
58b4daa5
YQ
78562012-03-03 Yao Qi <yao@codesourcery.com>
7857
7858 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7859 (linux-x86-low.o): Likewise.
7860 * server.h: Remove in_process_agent_loaded.
7861 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7862 common/agent.c.
7863 Update callers.
7864
8ffcbaaf
YQ
78652012-03-03 Yao Qi <yao@codesourcery.com>
7866
7867 * tracepoint.c (gdb_agent_capability): New global.
7868 (in_process_agent_loaded_ust): Renamed to
7869 `in_process_agent_supports_ust'.
7870 Update callers.
7871 (in_process_agent_supports_ust): Call agent_capability_check.
7872 (clear_installed_tracepoints): Assert that agent supports
7873 agent.
7874
d1feda86
YQ
78752012-03-03 Yao Qi <yao@codesourcery.com>
7876
7877 * linux-low.c (linux_supports_agent): New.
7878 (linux_target_ops): Initialize field `supports_agent' with
7879 linux_supports_agent.
7880 * target.h (struct target_ops) <supports_agent>: New.
7881 (target_supports_agent): New macro.
7882 * server.c (handle_general_set): Handle packet 'QAgent'.
7883 (handle_query): Send `QAgent+'.
7884 * Makefile.in (server.o): Depends on agent.h.
7885
2fa291ac
YQ
78862012-03-03 Yao Qi <yao@codesourcery.com>
7887
7888 * Makefile.in (OBS): Add agent.o.
7889 Add new rule for agent.o.
7890 Track dependence of tracepoint.c on agent.h.
7891 * tracepoint.c (run_inferior_command_1):
7892 (run_inferior_command): Call agent_run_command.
7893 (gdb_ust_connect_sync_socket): Deleted. Move it to
7894 common/agent.c.
7895 (resume_thread, stop_thread): Likewise.
7896 (gdb_ust_socket_init): Renamed to ...
7897 (gdb_agent_socket_init): ... New.
7898 (gdb_ust_thread): Renamed to ...
7899 (gdb_agent_helper_thread): ... New.
7900 (gdb_ust_init): Move some code to ...
7901 (gdb_agent_init): ... here. New.
7902 [HAVE_UST]: Call gdb_ust_init.
7903 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7904 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7905 * config.in, configure: Regenerated.
7906
05044653
PA
79072012-03-02 Pedro Alves <palves@redhat.com>
7908
7909 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7910 * linux-low.c (struct simple_pid_list): New.
7911 (stopped_pids): New a struct simple_pid_list pointer.
7912 (add_to_pid_list, pull_pid_from_list): New.
7913 (handle_extended_wait): Don't assume the first signal new children
7914 report is SIGSTOP. Adjust call to pull_pid_from_list.
7915 (linux_wait_for_lwp): Adjust.
7916
8d00225b
YQ
79172012-03-02 Yao Qi <yao@codesourcery.com>
7918
7919 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7920 debug log.
7921
19560ba5
YQ
79222012-03-02 Yao Qi <yao@codesourcery.com>
7923
7924 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7925 `stop_pc' and `tpoint'. Update caller.
7926
1faeff08
MR
79272012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7928
7929 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7930 * linux-low.c (use_linux_regsets): New macro.
7931 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7932 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7933 (linux_register_in_regsets): New function.
7934 (usr_fetch_inferior_registers): Skip registers covered by
7935 regsets.
7936 (usr_store_inferior_registers): Likewise.
7937 (usr_fetch_inferior_registers): New macro.
7938 (usr_store_inferior_registers): Likewise.
7939 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7940 (linux_store_registers): Likewise.
7941 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7942 prototype.
7943 (init_registers_mips64_dsp_linux): Likewise.
7944 (init_registers_mips_linux): New macro.
7945 (init_registers_mips_dsp_linux): Likewise.
7946 (mips_dsp_num_regs): Likewise.
7947 (DSP_BASE, DSP_CONTROL): New fallback macros.
7948 (mips_base_regs): New macro.
7949 (mips_regmap): Use it. Fix the size.
7950 (mips_dsp_regmap): New variable.
7951 (mips_dsp_regset_bitmap): Likewise.
7952 (mips_arch_setup): New function.
7953 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7954 than mips_regmap.
7955 (mips_cannot_store_register): Likewise.
7956 (the_low_target): Update .arch_setup, .num_regs and .regmap
7957 initializers. Add .regset_bitmap initializer.
7958 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7959 initializer.
7960 * linux-bfin-low.c (the_low_target): Likewise.
7961 * linux-cris-low.c (the_low_target): Likewise.
7962 * linux-crisv32-low.c (the_low_target): Likewise.
7963 * linux-ia64-low.c (the_low_target): Likewise.
7964 * linux-m32r-low.c (the_low_target): Likewise.
7965 * linux-m68k-low.c (the_low_target): Likewise.
7966 * linux-ppc-low.c (the_low_target): Likewise.
7967 * linux-s390-low.c (the_low_target): Likewise.
7968 * linux-sh-low.c (the_low_target): Likewise.
7969 * linux-sparc-low.c (the_low_target): Likewise.
7970 * linux-tic6x-low.c (the_low_target): Likewise.
7971 * linux-x86-low.c (the_low_target): Likewise.
7972 * linux-xtensa-low.c (the_low_target): Likewise.
7973 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7974 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7975 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7976 srv_xmlfiles.
7977 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7978 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7979
c03e6ccc
YQ
79802012-02-29 Yao Qi <yao@codesourcery.com>
7981 Pedro Alves <palves@redhat.com>
7982
7983 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7984 `step_over_finished' is true.
7985
644cebc9
PA
79862012-02-27 Pedro Alves <palves@redhat.com>
7987
7988 * linux-low.c (pid_is_stopped): Delete, moved to common/.
7989 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7990
c14d7ab2
PA
79912012-02-27 Pedro Alves <palves@redhat.com>
7992
7993 PR server/9684
7994 * linux-low.c (pid_is_stopped): New.
7995 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7996
412c89dd
LM
79972012-02-25 Luis Machado <lgustavo@codesourcery.com>
7998
7999 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8000 of conditions.
8001
b745defe
MR
80022012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8003
8004 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8005
9f3a5c85
LM
80062012-02-24 Luis Machado <lgustavo@codesourcery>
8007
8008 * server.c (handle_query): Advertise support for target-side
8009 breakpoint condition evaluation.
8010 (process_point_options): New function.
8011 (process_serial_event): When inserting a breakpoint, check for
8012 a target-side condition that should be evaluated.
8013
8014 * mem-break.c: Include regcache.h and ax.h.
8015 (point_cond_list_t): New data structure.
8016 (breakpoint) <cond_list>: New field.
8017 (find_gdb_breakpoint_at): Make non-static.
8018 (delete_gdb_breakpoint_at): Clear any target-side
8019 conditions.
8020 (clear_gdb_breakpoint_conditions): New function.
8021 (add_condition_to_breakpoint): Likewise.
8022 (add_breakpoint_condition): Likewise.
8023 (gdb_condition_true_at_breakpoint): Likewise.
8024 (gdb_breakpoint_here): Return result directly instead
8025 of going through a local variable.
8026
8027 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8028 (clear_gdb_breakpoint_conditions): Likewise.
8029 (add_breakpoint_condition): Likewise.
8030 (gdb_condition_true_at_breakpoint): Likewise.
8031
8032 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8033 (need_step_over_p): Take target-side breakpoint condition into
8034 consideration.
8035
5e1dc496
LM
80362012-02-24 Luis Machado <lgustavo@codesourcery>
8037
8038 * server.h: Include tracepoint.h.
8039 (agent_mem_read, agent_get_trace_state_variable_value,
8040 agent_set_trace_state_variable_value,
8041 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8042 get_set_tsv_func_addr): New prototypes.
8043
8044 * ax.h: New include file.
8045 * ax.c: New source file.
8046
8047 * tracepoint.c: Include ax.h.
8048 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8049 agent_expr, eval_result_type): Move to ax.h.
8050 (parse_agent_expr): Rename to ...
8051 (gdb_parse_agent_expr): ... this, make it non-static and move
8052 to ax.h.
8053 (unparse_agent_expr) Rename to ...
8054 (gdb_unparse_agent_expr): ... this, make it non-static and move
8055 to ax.h.
8056 (eval_agent_expr): Rename to ...
8057 (eval_tracepoint_agent_expr): ... this.
8058 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8059 forward declarations.
8060 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8061 (agent_get_trace_state_variable_value): New function.
8062 (agent_set_trace_state_variable_value): New function.
8063 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8064 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8065 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8066 (condition_true_at_tracepoint): Likewise.
8067 (parse_agent_expr): Rename to ...
8068 (gdb_parse_agent_expr): ... this and move to ax.c.
8069 (unparse_agent_expr): Rename to ...
8070 (gdb_unparse_agent_expr): ... this and move to ax.c.
8071 (gdb_agent_op_name): Move to ax.c.
8072 (eval_agent_expr): Rename to ...
8073 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8074 and move to ax.c.
8075 (eval_tracepoint_agent_expr): New function.
8076 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8077 non-static.
5e1dc496
LM
8078 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8079 ax.c.
8080 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8081 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8082 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8083 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8084 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8085 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8086 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8087 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8088 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8089 (compile_bytecodes): Remove forward declaration.
8090 (is_goto_target): Move to ax.c.
8091 (compile_bytecodes): Move to ax.c and call
8092 agent_get_trace_state_variable_value (...) and
8093 agent_set_trace_state_variable_value (...).
8094
8095 * Makefile.in: Update ax.c and IPA dependencies.
8096
277e4e52
PA
80972012-02-24 Pedro Alves <palves@redhat.com>
8098
8099 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8100 (cmd_bigqtbuffer_circular): ... this. Only handle
8101 'QTBuffer:circular:'.
8102 (handle_tracepoint_general_set): Adjust.
8103
bf4c19f7
YQ
81042012-02-16 Yao Qi <yao@codesourcery.com>
8105
8106 * inferiors.c: Move code to ...
8107 * dll.c: .... here. New.
8108 * server.h: Declare clear_dlls.
8109 * Makefile.in (SFILES): Add dll.c.
8110 (OBS): Add dll.o
8111 (dll.o): New rule.
8112
d73f2619
YQ
81132012-02-11 Yao Qi <yao@codesourcery.com>
8114
8115 * server.c: (handle_monitor_command): Add a new parameter
8116 `own_buf'.
8117 (handle_query): Update caller.
8118
f8255c2a
JB
81192012-02-09 Joel Brobecker <brobecker@adacore.com>
8120
8121 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8122 * configure, config.in: Regenerate.
8123 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8124 is not defined.
8125
da84f473
PA
81262012-02-02 Pedro Alves <palves@redhat.com>
8127
8128 Try SIGKILL first, then PTRACE_KILL.
8129 * linux-low.c (linux_kill_one_lwp): New.
8130 (linux_kill_one_lwp): Rename to ...
8131 (kill_one_lwp_callback): ... this. Use the new
8132 linux_kill_one_lwp.
8133
e886a173
PA
81342012-02-02 Pedro Alves <palves@redhat.com>
8135
8136 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8137 inferior.
8138
be07f1a2
PA
81392012-01-27 Pedro Alves <palves@redhat.com>
8140
8141 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8142 (elf_64_file_p): Make static.
8143 (linux_pid_exe_is_elf_64_file): New.
8144 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8145 Delete declarations.
8146 (linux_pid_exe_is_elf_64_file): Declare.
8147 * linux-x86-low.c (x86_arch_setup): Use
8148 linux_pid_exe_is_elf_64_file.
8149
d8301ad1
JK
81502012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8151
8152 * linux-low.c (linux_wait_for_event_1): Rename to ...
8153 (linux_wait_for_event): ... here and merge it with former
8154 linux_wait_for_event - new variable wait_ptid, use it.
8155 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8156
01b17894
PA
81572012-01-23 Pedro Alves <palves@redhat.com>
8158
8159 * server.c (main): Avoid yet another case of infinite loop while
8160 detaching/killing after a longjmp.
8161
e825046f
JK
81622012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8163
8164 Code cleanup.
8165 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8166
b9e7b9c3
UW
81672012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8168
8169 * hostio.c (handle_readlink): New function.
8170 (handle_vFile): Call it to handle "vFile:readlink" packets.
8171
901f9912
UW
81722012-01-20 Pedro Alves <palves@redhat.com>
8173 Ulrich Weigand <ulrich.weigand@linaro.org>
8174
8175 * server.c (handle_v_requests): Only support vAttach and vRun to
8176 start multiple processes when in extended protocol mode.
8177
fc1ab1a0
PA
81782012-01-17 Pedro Alves <palves@redhat.com>
8179
8180 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8181 memalign plus mprotect to allocate the scratch buffer.
8182
7d5d4e98
PA
81832012-01-13 Pedro Alves <palves@redhat.com>
8184
8185 * server.c (attach_inferior): Clear `cont_thread'.
8186
f128d5e9
PA
81872012-01-13 Pedro Alves <palves@redhat.com>
8188
8189 * server.c (main): Avoid infinite loop while detaching/killing
8190 after a longjmp.
8191
06db92f0
DE
81922012-01-09 Doug Evans <dje@google.com>
8193
8194 * server.c (start_inferior): Set last_ptid in --wrapper case.
8195
32d92999
YQ
81962012-01-06 Yao Qi <yao@codesourcery.com>
8197
8198 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8199 defined.
8200 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8201
5e0a92a9
YQ
82022012-01-04 Yao Qi <yao@codesourcery.com>
8203
8204 * tracepoint.c (cmd_qtdp): Print debug message
8205 for static tracepoint.
8206
ae639e8c
YQ
82072012-01-04 Yao Qi <yao@codesourcery.com>
8208
8209 * tracepoint.c (trace_vdebug): Differentiate debug message
8210 between gdbserver and IPA.
8211
f72429c5
YQ
82122012-01-03 Yao Qi <yao@codesourcery.com>
8213
8214 * tracepoint.c (tracepoint_was_hit): Don't collect for
8215 static tracepoint.
8216
12c3e59c
JB
82172012-01-02 Joel Brobecker <brobecker@adacore.com>
8218
8219 * terminal.h: Reformat copyright header.
8220
67827812
JB
82212012-01-02 Joel Brobecker <brobecker@adacore.com>
8222
8223 * server.c (gdbserver_version): Update copyright year.
8224 * gdbreplay.c (gdbreplay_version): Likewise.
8225
3e52c33d
JK
82262011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8227
8228 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8229
8230 Revert:
8231 2011-12-18 Hui Zhu <teawater@gmail.com>
8232 * linux-low.c (linux_create_inferior): Save return value to ret.
8233
66f1260e
HZ
82342011-12-18 Hui Zhu <teawater@gmail.com>
8235
8236 * linux-low.c (linux_create_inferior): Save return value to ret.
8237
e77616d7
DE
82382011-12-16 Doug Evans <dje@google.com>
8239
e7b06c57
DE
8240 * linux-low.c (linux_create_inferior): If stdio connection,
8241 redirect stdin from /dev/null, stdout to stderr.
8242 * remote-utils.c (remote_is_stdio): New static global.
8243 (remote_connection_is_stdio): New function.
8244 (remote_prepare): Handle stdio connection.
8245 (remote_open): Ditto.
8246 (remote_close): Don't close stdin for stdio connections.
8247 (read_prim,write_prim): New functions. Replace all calls to
8248 read/write to these.
8249 * server.c (main): Watch for "-" argument. Move call to
8250 remote_prepare before start_inferior.
8251 * server.h (STDIO_CONNECTION_NAME): New macro.
8252 (remote_connection_is_stdio): Declare.
8253
e77616d7
DE
8254 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8255 in debugging output.
8256
82067193
YQ
82572011-12-15 Yao Qi <yao@codesourcery.com>
8258
8259 * tracepoint.c: Include sys/syscall.h.
8260 (gdb_ust_thread): Remove preprocessor conditional.
8261
82bfbe7e
PA
82622011-12-14 Pedro Alves <pedro@codesourcery.com>
8263
8264 * linux-low.c (linux_detach_one_lwp): Call
8265 the_low_target.prepare_to_resume before detaching.
8266
712c6575
YQ
82672011-12-14 Yao Qi <yao@codesourcery.com>
8268
8269 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8270 of write.
8271
d54d1edf
YQ
82722011-12-14 Yao Qi <yao@codesourcery.com>
8273
8274 * i386-low.c (i386_low_stopped_data_address): Initialize local
8275 variable `control'.
8276
6210a125
PA
82772011-12-13 Pedro Alves <pedro@codesourcery.com>
8278
8279 PR remote/13492
8280
8281 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8282 DR_CONTROL unless necessary. Extend comments.
8283 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8284 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8285
2ece8244
YQ
82862011-12-13 Yao Qi <yao@codesourcery.com>
8287
8288 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8289 macros.
8290 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8291
784867a5
JK
82922011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8293
8294 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8295 Print new debug message for such case.
8296
6bf36717
JK
82972011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8298
8299 Fix overlapping memcpy.
8300 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8301 the read_inferior_memory transfer.
8302 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8303 write_inferior_memory transfer.
8304 (set_fast_tracepoint_jump): New variable buf. Use it for the
8305 read_inferior_memory and write_inferior_memory transfers.
8306 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8307 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8308 Use it for the write_inferior_memory transfer.
8309 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8310 buffers.
8311
50275556
MR
83122011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8313
8314 * linux-low.c (fetch_register, store_register): Make code
8315 consistent, fix formatting.
8316
7325beb4
MR
83172011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8318
8319 * linux-low.c (usr_store_inferior_registers): Factor out code
8320 to handle individual registers into...
8321 (store_register): ... this new function.
8322
c642a434
UW
83232011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8324
8325 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8326 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8327 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8328 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8329 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8330 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8331 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8332 (srv_xmlfiles): Add new XML files.
8333
8334 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8335 and <sys/uio.h>.
8336 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8337 (init_registers_s390_linux32v1): Add prototype.
8338 (init_registers_s390_linux32v2): Likewise.
8339 (init_registers_s390_linux64v1): Likewise.
8340 (init_registers_s390_linux64v2): Likewise.
8341 (init_registers_s390x_linux64v1): Likewise.
8342 (init_registers_s390x_linux64v2): Likewise.
8343 (s390_num_regs): Increment to 52.
8344 (s390_regmap): Add orig_r2 register.
8345 (s390_num_regs_3264): Increment to 68.
8346 (s390_regmap_3264): Add orig_r2 register.
8347 (s390_collect_ptrace_register): Handle orig_r2 register.
8348 (s390_supply_ptrace_register): Likewise.
8349 (s390_fill_last_break): New function.
8350 (s390_store_last_break): Likewise.
8351 (s390_fill_system_call): New function.
8352 (s390_store_system_call): Likewise.
8353 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8354 register sets.
8355 (s390_check_regset): New function.
8356 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8357 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8358 Update target_regsets for available register sets.
8359
2268b414
JK
83602011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8361 Jan Kratochvil <jan.kratochvil@redhat.com>
8362
8363 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8364 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8365 New.
8366 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8367 * linux-low.h (struct process_info_private): New member r_debug.
8368 * server.c (handle_qxfer_libraries): Call
8369 the_target->qxfer_libraries_svr4.
8370 (handle_qxfer_libraries_svr4): New function.
8371 (qxfer_packets): New entry "libraries-svr4".
8372 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8373 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8374 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8375 PACKET_qXfer_libraries_svr4.
8376
d6db1fab
UW
83772011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8378
8379 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8380 PSW address/mask between 8-byte and 16-byte formats.
8381 (s390_supply_ptrace_register): Likewise.
8382 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8383 basic addressing mode bit.
8384
242f5f1c
SS
83852011-11-24 Stan Shebs <stan@codesourcery.com>
8386
8387 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8388
f196051f
SS
83892011-11-17 Stan Shebs <stan@codesourcery.com>
8390
8391 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8392 (tracing_start_time): New global.
8393 (tracing_stop_time): New global.
8394 (tracing_user_name): New global.
8395 (tracing_notes): New global.
8396 (tracing_stop_note): New global.
8397 (cmd_qtstart): Set traceframe_usage, start_time.
8398 (stop_tracing): Set stop_time.
8399 (cmd_qtstatus): Report additional status.
8400 (cmd_qtp): New function.
8401 (handle_tracepoint_query): Call it.
8402 (cmd_qtnotes): New function.
8403 (handle_tracepoint_general_set): Call it.
8404 (get_timestamp): Rename from tsv_get_timestamp.
8405
405f8e94
SS
84062011-11-14 Stan Shebs <stan@codesourcery.com>
8407 Kwok Cheung Yeung <kcy@codesourcery.com>
8408
8409 * linux-x86-low.c (small_jump_insn): New.
8410 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8411 trampoline and error message, build a trampoline and issue a small
8412 jump instruction to it.
8413 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8414 trampoline and error message.
8415 (x86_get_min_fast_tracepoint_insn_len): New.
8416 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8417 * linux-low.h (struct linux_target_ops): Add arguments to
8418 install_fast_tracepoint_jump_pad operation, add new operation.
8419 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8420 arguments.
8421 (linux_get_min_fast_tracepoint_insn_len): New function.
8422 (linux_target_op): Add new operation.
8423 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8424 (gdb_trampoline_buffer_end): Ditto.
8425 (gdb_trampoline_buffer_error): Ditto.
8426 (struct ipa_sym_addresses): Add fields for new IPA variables.
8427 (symbol_list): Add entries for new IPA variables.
8428 (struct tracepoint): Add fields to hold the address range of the
8429 trampoline used by the tracepoint.
8430 (trampoline_buffer_head): New static variable.
8431 (trampoline_buffer_tail): Ditto.
8432 (claim_trampoline_space): New function.
8433 (have_fast_tracepoint_trampoline_buffer): New function.
8434 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8435 structure.
8436 (install_fast_tracepoint): Ditto, also add error buffer argument.
8437 (cmd_qtminftpilen): New function.
8438 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8439 (fast_tracepoint_from_trampoline_address): New function.
8440 (fast_tracepoint_collecting): Handle trampoline as part of jump
8441 pad space.
8442 (set_trampoline_buffer_space): New function.
8443 (initialize_tracepoint): Initialize new IPA variables.
8444 * target.h (struct target_ops): Add arguments to
8445 install_fast_tracepoint_jump_pad operation, add new
8446 get_min_fast_tracepoint_insn_len operation.
8447 (target_get_min_fast_tracepoint_insn_len): New.
8448 (install_fast_tracepoint_jump_pad): Add arguments.
8449 * server.h (IPA_BUFSIZ): Define.
8450 * linux-i386-ipa.c: Include extra header files.
8451 (initialize_fast_tracepoint_trampoline_buffer): New function.
8452 (initialize_low_tracepoint): Call it.
8453 * server.h (set_trampoline_buffer_space): Declare.
8454 (claim_trampoline_space): Ditto.
8455 (have_fast_tracepoint_trampoline_buffer): Ditto.
8456
1e4d1764
YQ
84572011-11-14 Yao Qi <yao@codesourcery.com>
8458
8459 * server.c (handle_query): Handle InstallInTrace for qSupported.
8460 * tracepoint.c (add_tracepoint): Sort list.
8461 (install_tracepoint, download_tracepoint): New.
8462 (cmd_qtdp): Call them to install and download tracepoints.
8463 (sort_tracepoints): Removed.
8464 (cmd_qtstart): Update.
8465
5c73ff4e
YQ
84662011-11-14 Yao Qi <yao@codesourcery.com>
8467
8468 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8469 * mem-break.h: Declare.
8470 * tracepoint.c (cmd_qtstart): Move some code to ...
8471 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8472 New.
8473 (download_tracepoints): Move some code to ...
8474 (download_tracepoint_1): ... here. New.
8475
86a30030
YQ
84762011-11-08 Yao Qi <yao@codesourcery.com>
8477
8478 * remote-utils.c (relocate_instruction): A comment fix.
8479
8d26e50c
JB
84802011-11-07 Joel Brobecker <brobecker@adacore.com>
8481
8482 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8483 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8484 dr_status_mirror and dr_control_mirror from debug_reg_state.
8485 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8486 (i386_initial_stuff): Remove use of deleted globals.
8487 (i386_get_thread_context, i386_set_thread_context,
8488 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8489 from debug_reg_state.
8490
a59306a3
YQ
84912011-11-05 Yao Qi <yao@codesourcery.com>
8492
8493 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8494 address as TPOINT's.
8495
3065dfb6
SS
84962011-11-02 Stan Shebs <stan@codesourcery.com>
8497
8498 * tracepoint.c (agent_mem_read_string): New function.
8499 (eval_agent_expr): Call it for tracenz.
8500 * server.c (handle_query): Report support for tracenz.
8501
fd0d8c7c
YQ
85022011-11-02 Yao Qi <yao@codesourcery.com>
8503
8504 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8505
609086b1
YQ
85062011-11-02 Yao Qi <yao@codesourcery.com>
8507
8508 * target.h: Fix a typo in comment.
8509
b9fd1791
PA
85102011-10-31 Pedro Alves <pedro@codesourcery.com>
8511
8512 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8513 clobber the breakpoints' shadows with fast tracepoint jumps.
8514 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8515 * target.c (write_inferior_memory): Also pass MYADDR down to
8516 check_mem_write.
8517
03583c20
UW
85182011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8519
8520 * configure.ac: Check support for personality routine.
8521 * configure: Regenerate.
8522 * config.in: Likewise.
8523 * linux-low.c: Include <sys/personality.h>.
8524 Define ADDR_NO_RANDOMIZE if necessary.
8525 (linux_create_inferior): Disable address space randomization when
8526 forking inferior, if requested.
8527 (linux_supports_disable_randomization): New function.
8528 (linux_target_ops): Install it.
8529 * server.h (disable_randomization): Declare.
8530 * server.c (disable_randomization): New global variable.
8531 (handle_general_set): Handle QDisableRandomization.
8532 (handle_query): Likewise for qSupported.
8533 (main): Support --disable-randomization and --no-disable-randomization
8534 command line arguments.
8535 * target.h (struct target_ops): Add supports_disable_randomization.
8536 (target_supports_disable_randomization): New macro.
8537
723b724b
MF
85382011-09-29 Mike Frysinger <vapier@gentoo.org>
8539
8540 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8541 ifdef check.
8542 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8543 [!PT_GETDSBT] (target_loadmap): New definition.
8544 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8545 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8546 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8547 and PT_GETDSBT to LINUX_LOADMAP.
8548 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8549 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8550
55329a5c 85512011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
8552
8553 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8554 (arm_linux_hwbp_cap): New static variable.
8555 (arm_linux_get_hwbp_cap): Replace by ...
8556 (arm_linux_init_hwbp_cap): ... this new function.
8557 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8558 (arm_linux_get_hw_watchpoint_count): Likewise.
8559 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8560 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8561 (arm_prepare_to_resume): Use perror_with_name instead of error.
8562
55329a5c 85632011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
8564
8565 * linux-arm-low.c: Include <signal.h>.
8566 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8567 (struct arm_linux_hwbp_cap): New data type.
8568 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8569 (struct arm_linux_hw_breakpoint): New data type.
8570 (MAX_BPTS, MAX_WPTS): Define.
8571 (struct arch_process_info, struct arch_lwp_info): New data types.
8572 (arm_linux_get_hwbp_cap): New function.
8573 (arm_linux_get_hw_breakpoint_count): Likewise.
8574 (arm_linux_get_hw_watchpoint_count): Likewise.
8575 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8576 (arm_hwbp_control_initialize): Likewise.
8577 (arm_hwbp_control_is_enabled): Likewise.
8578 (arm_hwbp_control_is_initialized): Likewise.
8579 (arm_hwbp_control_disable): Likewise.
8580 (arm_linux_hw_breakpoint_equal): Likewise.
8581 (arm_linux_hw_point_initialize): Likewise.
8582 (struct update_registers_data): New data structure.
8583 (update_registers_callback: New function.
8584 (arm_insert_point): Likewise.
8585 (arm_remove_point): Likewise.
8586 (arm_stopped_by_watchpoint): Likewise.
8587 (arm_stopped_data_address): Likewise.
8588 (arm_new_process): Likewise.
8589 (arm_new_thread): Likewise.
8590 (arm_prepare_to_resume): Likewise.
8591 (the_low_target): Register arm_insert_point, arm_remove_point,
8592 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8593 arm_new_thread, and arm_prepare_to_resume.
8594
6b9801d4
SS
85952011-09-15 Stan Shebs <stan@codesourcery.com>
8596
8597 * server.h (struct emit_ops): Add compare-goto fields.
8598 * tracepoint.c (gdb_agent_op_sizes): New table.
8599 (emit_eq_goto): New function.
8600 (emit_ne_goto): New function.
8601 (emit_lt_goto): New function.
8602 (emit_le_goto): New function.
8603 (emit_gt_goto): New function.
8604 (emit_ge_goto): New function.
8605 (is_goto_target): New function.
8606 (compile_bytecodes): Recognize special cases of compare-goto
8607 combinations and call specialized emitters for them.
8608 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8609 (amd64_emit_ne_goto): New function.
8610 (amd64_emit_lt_goto): New function.
8611 (amd64_emit_le_goto): New function.
8612 (amd64_emit_gt_goto): New function.
8613 (amd64_emit_ge_goto): New function.
8614 (amd64_emit_ops): Add the new functions.
8615 (i386_emit_eq_goto): New function.
8616 (i386_emit_ne_goto): New function.
8617 (i386_emit_lt_goto): New function.
8618 (i386_emit_le_goto): New function.
8619 (i386_emit_gt_goto): New function.
8620 (i386_emit_ge_goto): New function.
8621 (i386_emit_ops): Add the new functions.
8622
bf15cbda
SS
86232011-09-08 Stan Shebs <stan@codesourcery.com>
8624
8625 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8626 (i386_emit_epilogue): Restore %ebx.
8627
943ca1dd
JZ
86282011-08-31 Jie Zhang <jzhang918@gmail.com>
8629
8630 * server.c (step_thread): Remove definition.
8631 (process_serial_event): Don't handle Hs.
8632 * server.h (step_thread): Remove declaration.
8633 * target.c (set_desired_inferior): Remove use of step_thread.
8634
e3deef73
LM
86352011-08-24 Luis Machado <lgustavo@codesourcery.com>
8636
8637 * linux-low.c: Include linux-procfs.h.
8638 (linux_attach_lwp_1): Update comments.
8639 (linux_attach): Scan for existing threads when attaching to a
8640 process that is the tgid.
8641 * Makefile.in: Update dependencies.
8642
13da1c97
LM
86432011-08-24 Luis Machado <lgustavo@codesourcery.com>
8644
8645 * configure.srv: Add linux-procfs.o dependencies.
8646
881127c9
YQ
86472011-08-14 Yao Qi <yao@codesourcery.com>
8648
8649 * target.h (struct target_ops): Fix indent.
8650 * win32-low.c (win32_target_ops): Fix comment.
8651
58dbd541
YQ
86522011-08-14 Andrew Jenner <andrew@codesourcery.com>
8653 Yao Qi <yao@codesourcery.com>
8654
8655 * Makefile.in (clean): Remove tic6x-*.c files.
8656 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8657 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8658 (tic6x-c64xp-linux.c): Likewise.
8659 * configure.srv: Add support for tic6x-*-uclinux.
8660 * linux-tic6x-low.c: New.
8661 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8662
78d85199
YQ
86632011-08-14 Andrew Stubbs <ams@codesourcery.com>
8664 Yao Qi <yao@codesourcery.com>
8665
8666 * target.h (struct target_ops): Add read_loadmap.
8667 * linux-low.c (struct target_loadseg): New type.
8668 (struct target_loadmap): New type.
8669 (linux_read_loadmap): New function.
8670 (linux_target_ops): Add linux_read_loadmap.
8671 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
8672 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8673 to NULL.
78d85199 8674
a959a88d
EZ
86752011-08-05 Eli Zaretskii <eliz@gnu.org>
8676
8677 * win32-low.c: Include <stdint.h>.
8678
1ced966e
PA
86792011-07-22 Pedro Alves <pedro@codesourcery.com>
8680
8681 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8682 to the inferior here.
8683 (i386_remove_aligned_watchpoint): Ditto.
8684 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8685 fit part of the watchpoint in the debug registers.
8686 (i386_update_inferior_debug_regs): New.
8687 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8688 registers, and only update the inferior on success.
8689 (i386_low_remove_watchpoint): Ditto.
8690
d26e3629
KY
86912011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8692
8693 * linux-low.c (compare_ints, unique, list_threads, show_process,
8694 linux_core_of_thread): Delete.
8695 (linux_target_ops): Change linux_core_of_thread to
8696 linux_common_core_of_thread.
8697 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8698 * utils.c (malloc_failure): Change type of argument.
8699 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8700 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8701 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8702 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8703 (IPA_OBJS): Add common-utils-ipa.o.
8704 (ptid_h, linux_osdata_h): New macros.
8705 (server_h): Add common/common-utils.h, common/xml-utils.h,
8706 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8707 common/ptid.h.
8708 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8709 ptid.o, buffer.o): New rules.
8710 (linux-low.o): Add common/linux-osdata.h as a dependency.
8711 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8712 * configure.ac: Add AC_HEADER_DIRENT check.
8713 * config.in: Regenerate.
8714 * configure: Regenerate.
8715 * remote-utils.c (xml_escape_text): Delete.
8716 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8717 buffer_xml_printf): Move to common/buffer.c.
8718 * server.c (main): Remove call to initialize_inferiors.
8719 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8720 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8721 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8722 internal_error, gdb_assert, gdb_assert_fail): Delete.
8723 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8724 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8725 common/buffer.h.
8726 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8727 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8728 initialize_inferiors): Delete.
8729
2275a1a7
PA
87302011-07-20 Pedro Alves <pedro@codesourcery.com>
8731
8732 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8733 symbol error.
8734
0a5b1e09
PA
87352011-05-31 Pedro Alves <pedro@codesourcery.com>
8736
8737 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8738 assertion.
8739 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8740
6938fd34
YQ
87412011-05-26 Yao Qi <yao@codesourcery.com>
8742
8743 * Makefile.in (thread-db.o): Track dependence to
8744 common/gdb_thread_db.h.
8745 * thread-db.c: include gdb_thread_db.h from right place.
8746
b481f9e0
TT
87472011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8748
8749 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8750 __FILE__ and __LINE__ to internal_error.
8751
98a5dd13
DE
87522011-05-13 Doug Evans <dje@google.com>
8753
8754 * thread-db.c (try_thread_db_load_from_sdir): New function.
8755 (try_thread_db_load_from_dir): New function.
8756 (thread_db_load_search): Handle $sdir, ignore $pdir.
8757 Remove trying of system directories if search of
8758 libthread-db-search-path fails, that is now done via $sdir.
8759
d248b706
KY
87602011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8761
8762 * server.c (handle_query): Add EnableDisableTracepoints to the list
8763 of supported features.
43aaf8b6 8764 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 8765 tracepoints.
43aaf8b6
PA
8766 (cmd_qtenable_disable): New.
8767 (cmd_qtstart): Install tracepoints even if disabled.
8768 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8769 receiving a QTEnable or QTDisable packet.
8770 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8771 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8772 tracepoints.
8773 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 8774
84e578fb
DE
87752011-05-10 Doug Evans <dje@google.com>
8776
8777 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8778
71f55dd8
DE
87792011-05-04 Doug Evans <dje@google.com>
8780
8781 * linux-low.c (linux_join): Skip process lookup.
8782 * spu-low.c (spu_join): Ditto.
8783 * server.c (join_inferiors_callback): Delete.
8784 (process_serial_event): For 'D' packet (detach) call join_inferior
8785 directly.
8786
4d393d60
JM
87872011-05-04 Joseph Myers <joseph@codesourcery.com>
8788
8789 * README: Don't mention xscale*-*-linux*.
8790 * configure.srv (xscale*-*-linux*): Don't handle target.
8791
b00ad6ff
NF
87922011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8793
8794 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8795 casting pointers.
8796 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8797 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8798 (i386_emit_void_call_2): Likewise.
8799
af96c192
YQ
88002011-04-26 Yao Qi <yao@codesourcery.com>
8801
43aaf8b6
PA
8802 * linux-low.c: Move common macros to linux-ptrace.h.
8803 Include linux-ptrace.h.
af96c192
YQ
8804 * Makefile.in (linux_ptrace_h): New.
8805 (linux-low.o): Depends on linux-ptrace.h.
8806
03f2bd59
JK
88072011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8808
8809 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8810 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8811 (remote_prepare): New function with most of the TCP code from ...
8812 (remote_open): ... here. Detect PORT here unconditionally. Move also
8813 setting transport_is_reliable.
8814 * server.c (run_once): New variable.
8815 (gdbserver_usage): Document it.
8816 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8817 the first run if RUN_ONCE.
8818 * server.h (run_once, remote_prepare): New declarations.
8819
7a9dd1b2
TT
88202011-04-19 Tom Tromey <tromey@redhat.com>
8821
8822 * win32-low.c (handle_load_dll): Remove duplicate "the".
8823
81239425
PM
88242011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8825
8826 Remove support for old Cygwin 1.5 versions.
8827 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8828 function to avoid warning.
8829 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8830 warning.
8831
9e0627f1
PM
88322011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8833
8834 * gdbserver/server.h (Macro _): Define it if not available.
8835
588eebee
MS
88362011-03-14 Michael Snyder <msnyder@vmware.com>
8837
348af9f7 8838 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 8839
43f70d4c
JB
88402011-03-10 Joel Brobecker <brobecker@adacore.com>
8841
8842 * Makefile.in (maintainer-clean realclean distclean): Remove
8843 "make ... subdir_do" command.
8844
348af9f7
MS
88452011-03-10 Michael Snyder <msnyder@vmware.com>
8846
8847 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8848
8849 * server.c (handle_v_run): Free alloced buffer on early return.
8850
e637a4f5
YQ
88512011-03-09 Yao Qi <yao@codesourcery.com>
8852
8853 Revert:
8854 2011-03-04 Yao Qi <yao@codesourcery.com>
8855
8856 * Makefile.in: Remove GNU make feature --directory.
8857
8858 2011-03-05 Yao Qi <yao@codesourcery.com>
8859
8860 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8861 (subdir_do): New make target. Copied from gdb/Makefile.
8862 (maintainer-clean, realclean, distclean, clean): Call corresponding
8863 make targets in common/Makefile.
8864
8865 2011-02-11 Yao Qi <yao@codesourcery.com>
8866
8867 * configure.ac: Call AC_PROG_RANLIB.
8868 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8869 * configure: Regenerate.
8870
e6edda56
JK
88712011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8872
8873 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8874
e5141119
JB
88752011-03-06 Yao Qi <yao@codesourcery.com>
8876
8877 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8878
64794aa4
JB
88792011-03-05 Yao Qi <yao@codesourcery.com>
8880
8881 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8882 (subdir_do): New make target. Copied from gdb/Makefile.
8883 (maintainer-clean, realclean, distclean, clean): Call corresponding
8884 make targets in common/Makefile.
8885
7a762829
YQ
88862011-03-04 Yao Qi <yao@codesourcery.com>
8887
8888 * Makefile.in: Remove GNU make feature --directory.
8889
348af9f7
MS
88902011-03-04 Michael Snyder <msnyder@vmware.com>
8891
8892 * server.c (queue_stop_reply): Call xmalloc not malloc.
8893
88942011-03-02 Michael Snyder <msnyder@vmware.com>
8895
8896 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8897
9f72fee2
MS
88982011-02-28 Michael Snyder <msnyder@vmware.com>
8899
588eebee
MS
8900 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8901 (cmd_qtframe): Ditto.
8902 (cmd_qtbuffer): Ditto.
8903 (cmd_bigqtbuffer): Ditto.
8904
9f72fee2
MS
8905 * utils.c (decimal2str): Initialize 'width' to nine, then
8906 don't mess with it.
8907
8040bd49
UW
89082011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8909
8910 * hostio.c (require_data): Free *data, not data.
8911
7e52cbd0
JK
89122011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8913
8914 * hostio.c (require_data): Use free, not xfree.
8915
9130f83e
MS
89162011-02-27 Michael Snyder <msnyder@vmware.com>
8917
4b812f4e
MS
8918 * server.c (handle_query): Discard unused value.
8919
9130f83e
MS
8920 * hostio.c (require_data): Free malloc memory before returning
8921 error.
8922
69d37113
MS
89232011-02-26 Michael Snyder <msnyder@vmware.com>
8924
8925 * linux-low.c (list_threads): Call closedir for dirent.
8926
35f5825a
MS
89272011-02-27 Michael Snyder <msnyder@vmware.com>
8928
2a589cef
MS
8929 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8930 a case statement falls through.
8931
0adea5f7
MS
8932 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8933
35f5825a
MS
8934 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8935 in comparison.
8936
238f1c74
MS
89372011-02-26 Michael Snyder <msnyder@vmware.com>
8938
8939 * utils.c (decimal2str): Eliminate dead code and dead param.
8940 (pulongest): Drop dead param from call to decimal2str.
8941 (plongest): Ditto.
8942
633ff500
JB
89432011-02-24 Joel Brobecker <brobecker@adacore.com>
8944
8945 Revert the following patch (not approved yet):
8946 2011-02-21 Hui Zhu <teawater@gmail.com>
8947 * tracepoint.c (tp_printf): New function.
8948 (eval_agent_expr): Handle gdb_agent_op_printf.
8949
f9c6ff72
HZ
89502011-02-21 Hui Zhu <teawater@gmail.com>
8951
8952 * tracepoint.c (tp_printf): New function.
8953 (eval_agent_expr): Handle gdb_agent_op_printf.
8954
94d5e490
TT
89552011-02-18 Tom Tromey <tromey@redhat.com>
8956
8957 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8958 (tracepoint.o): Likewise.
8959 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8960 (gdb_agent_op_names): Likewise.
8961
c7f96d2b
TT
89622011-02-18 Tom Tromey <tromey@redhat.com>
8963
8964 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8965 gdb_agent_op_rot>: New constants.
8966 (gdb_agent_op_names): Add pick and roll.
8967 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8968 cases.
8969
0feedb2c
JK
89702011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8971
8972 * aclocal.m4: Regenerated with aclocal-1.11.1.
8973
b3b9301e
PA
89742011-02-14 Pedro Alves <pedro@codesourcery.com>
8975
8976 * server.c (handle_qxfer_traceframe_info): New.
8977 (qxfer_packets): Register "traceframe-info".
8978 (handle_query): Report support for qXfer:traceframe-info:read+.
8979 * tracepoint.c (match_blocktype): New.
8980 (traceframe_find_block_type): Rename to ...
8981 (traceframe_walk_blocks): ... this. Add callback filter argument,
8982 and use it.
8983 (traceframe_find_block_type): New, reimplemented on top of
8984 traceframe_walk_blocks.
8985 (build_traceframe_info_xml): New.
8986 (traceframe_read_info): New.
8987 * server.h (traceframe_read_info): Declare.
8988
4f3e6fb7
YQ
89892011-02-11 Yao Qi <yao@codesourcery.com>
8990
8991 * configure.ac: Call AC_PROG_RANLIB.
8992 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8993 * configure: Regenerate.
8994
764880b7
PA
89952011-02-07 Pedro Alves <pedro@codesourcery.com>
8996
8997 * server.c (gdb_read_memory): Change return semantics to allow
8998 partial transfers.
8999 (handle_search_memory_1): Adjust.
9000 (process_serial_event) <'m' packet>: Handle partial transfers.
9001 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9002
1c79eb8a
PA
90032011-01-28 Pedro Alves <pedro@codesourcery.com>
9004
9005 * regcache.c (init_register_cache): Initialize
9006 regcache->register_status.
9007 (free_register_cache): Release regcache->register_status.
9008 (regcache_cpy): Copy register_status.
9009 (registers_to_string): Print 'x's for unavailable registers.
9010 (supply_register): Mark the register's status valid or
9011 unavailable, depending on whether a buffer was passed in or not.
9012 (supply_register_zeroed): New.
9013 (supply_regblock): Mark the registers' status valid or
9014 unavailable, depending on whether a buffer was passed in or not.
9015 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9016 (struct regcache): New `register_status' field.
9017 (supply_register_zeroed): Declare.
9018 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9019 supply_register_zeroed, rather than passing a NULL buffer to
9020 supply_register.
9021 * tracepoint.c (fetch_traceframe_registers): Update comment.
9022
85724a0e
PA
90232011-01-28 Pedro Alves <pedro@codesourcery.com>
9024
9025 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9026 buffer explicit.
9027
d08aafef
PA
90282011-01-25 Pedro Alves <pedro@codesourcery.com>
9029
9030 * server.h (decode_xfer_write): Change prototype.
9031 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9032 and don't extract the annex here.
9033 * server.c (decode_xfer_read): Remove `annex' parameter,
9034 and don't extract the annex here.
9035 (decode_xfer): New.
9036 (struct qxfer): New.
9037 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9038 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9039 (handle_qxfer_statictrace): New functions, abstracted out from
9040 handle_query, and made to use the struct qxfer interface.
9041 (handle_threads_qxfer_proper): Rename to ...
9042 (handle_qxfer_threads_proper): ... this.
9043 (handle_threads_qxfer): Rename to ...
9044 (handle_qxfer_threads): ... this. Adjust.
9045 (qxfer_packets): New array.
9046 (handle_qxfer): New function.
9047 (handle_query): Use handle_qxfer.
9048
493e2a69
MS
90492011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9050
9051 * gdbreplay.c: Shorten lines of >= 80 columns.
9052 * linux-low.c: Ditto.
9053 * linux-ppc-low.c: Ditto.
9054 * linux-s390-low.c: Ditto.
9055 * linux-sparc-low.c: Ditto.
9056 * linux-x86-low.c: Ditto.
9057 * linux-xtensa-low.c: Ditto.
9058 * mem-break.c: Ditto.
9059 * nto-low.c: Ditto.
9060 * regcache.h: Ditto.
9061 * remote-utils.c: Ditto.
9062 * server.c: Ditto.
9063 * server.h: Ditto.
9064 * thread-db.c: Ditto.
9065 * tracepoint.c: Ditto.
9066 * utils.c: Ditto.
9067 * win32-low.h: Ditto.
9068
44944448
JB
90692011-01-05 Joel Brobecker <brobecker@adacore.com>
9070
9071 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9072 update.
9073
71ce852c
JB
90742011-01-01 Joel Brobecker <brobecker@adacore.com>
9075
9076 * server.c (gdbserver_version): Update copyright year in version
9077 output.
9078 * gdbreplay.c (gdbreplay_version): Ditto.
9079
eb826dc6
MF
90802010-12-29 Jie Zhang <jie.zhang@analog.com>
9081
9082 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9083 * linux-bfin-low.c: New file.
9084 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9085 PT_DATA_ADDR for BFIN targets.
9086 * Makefile.in (SFILES): Add linux-bfin-low.c.
9087 (clean): Remove reg-bfin.c.
9088 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9089 * README: Mention supported Blackfin targets.
9090
39ab222a
MF
90912010-12-23 Mike Frysinger <vapier@gentoo.org>
9092
9093 * .gitignore: New file.
9094
a1f2ce7d
MF
90952010-11-16 Mike Frysinger <vapier@gentoo.org>
9096
9097 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9098
f474844c
JZ
90992010-10-22 Jie Zhang <jie@codesourcery.com>
9100
9101 * Makefile.in: Add FLAGS_TO_PASS variable.
9102 (install): Remove dependency of install-only and recursively
9103 invoke make for install-only.
9104
f1048712
DE
91052010-10-04 Doug Evans <dje@google.com>
9106
9107 * Makefile.in (uninstall): Use $(DESTDIR).
9108
b53a1623
PA
91092010-09-24 Pedro Alves <pedro@codesourcery.com>
9110
e6ee044d
PA
9111 PR gdb/11842
9112
b53a1623
PA
9113 * linux-x86-low.c (compat_siginfo_from_siginfo)
9114 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9115 si_code is < 0. Check for si_code == SI_TIMER before checking for
9116 si_code < 0.
9117
fa1bd1e4
JB
91182010-09-13 Joel Brobecker <brobecker@adacore.com>
9119
9120 * lynx-i386-low.c: New file.
9121 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9122
47fac8f8
JB
91232010-09-13 Joel Brobecker <brobecker@adacore.com>
9124
9125 * lynx-low.c (ptrace_request_to_str): Remove handling for
9126 request values that have been removed in LynxOS 5.x.
9127
1adfc54d
JB
91282010-09-13 Joel Brobecker <brobecker@adacore.com>
9129
9130 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9131 <ptrace.h>
9132
c2a66c29
NS
91332010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9134
9135 * configure.ac: Add --enable-inprocess-agent option.
9136 * configure: Rebuilt.
9137
32fcada3
YQ
91382010-09-06 Yao Qi <yao@codesourcery.com>
9139
9140 * linux-low.c (linux_kill): Remove unused variable.
9141 (linux_stabilize_threads): Likewise.
9142 * server.c (start_inferior): Likewise.
9143 (queue_stop_reply_callback): Likewise.
9144 * tracepoint.c (do_action_at_tracepoint): Likewise.
9145
0cccb683
YQ
91462010-09-06 Yao Qi <yao@codesourcery.com>
9147
9148 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9149 on return.
9150
423ec54c
JK
91512010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9152
9153 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9154
12ac6819
PA
91552010-09-06 Pedro Alves <pedro@codesourcery.com>
9156
9157 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9158 "$(IPA_DEPFILES)".
9159
8ed54b31
JB
91602010-09-01 Joel Brobecker <brobecker@adacore.com>
9161
9162 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9163 gdbserver/lynx-ppc-low.c: New files.
9164 * Makefile.in (lynx_low_h): New variable.
9165 (lynx-low.o, lynx-ppc-low.o): New rules.
9166 * configure.ac: On LynxOS, link with -lnetinet.
9167 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9168 * configure: regenerate.
9169
bb0116a4
JB
91702010-09-01 Joel Brobecker <brobecker@adacore.com>
9171
9172 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9173 * configure.ac: Add check for vasprintf and vsnprintf.
9174 * configure, config.in: Regenerate.
9175 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9176
a778ab81 91772010-09-01 Joel Brobecker <brobecker@adacore.com>
9178
9179 * gdbreplay.c: Move include of alloca.h up, next to include of
9180 malloc.h.
9181 * server.h: Add include of malloc.h.
9182 * mem-break.c: Remove include of malloc.h.
9183 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9184
8b034a19 91852010-09-01 Joel Brobecker <brobecker@adacore.com>
9186
9187 * Makefile.in (memmem.o): Build with -Wno-error.
9188
91892010-09-01 Joel Brobecker <brobecker@adacore.com>
9190
9191 * utils.c (xsnprintf): Make non-static.
9192 * server.h: Add xsnprintf declaration.
9193 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9194 replace calls to snprintf by calls to xsnprintf throughout.
9195
91962010-09-01 Joel Brobecker <brobecker@adacore.com>
9197
9198 * configure.ac: Add configure check for alloca.
9199 * configure, config.in: Regenerate.
9200 * server.h: Include alloca.h if it exists.
9201 * gdbreplay.c: Include alloca.h if it exists.
9202
1a981360
PA
92032010-08-28 Pedro Alves <pedro@codesourcery.com>
9204
9205 * linux-low.c (__SIGRTMIN): Define if not already defined.
9206 (linux_create_inferior): Check for __ANDROID__ rather than
9207 __SIGRTMIN.
9208 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9209 are already deferred.
9210 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9211 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9212 stopped and already has a pending signal to report.
9213 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9214 a pending signal to report or is moving out of a jump pad.
9215 (linux_init_signals): Check for __ANDROID__ rather than
9216 __SIGRTMIN.
9217
b4d51a55
PA
92182010-08-28 Pedro Alves <pedro@codesourcery.com>
9219
9220 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9221 debug_threads check. Avoid a linear search when not doing debug
9222 output.
9223
ec48365d
PA
92242010-08-27 Pedro Alves <pedro@codesourcery.com>
9225
9226 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9227 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9228 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9229 (process_event): Change local fd's type to gdb_fildes_t.
9230 (create_file_handler): Adjust prototype.
9231 (delete_file_handler): Adjust prototype.
9232 (handle_file_event): Adjust prototype. Use pfildes.
9233 (create_file_event): Adjsut prototype.
9234 * remote-utils.c (remote_desc, listen_desc): Change type to
9235 gdb_fildes_t.
9236 * server.h: New gdb_fildes_t typedef.
9237 [USE_WIN32API]: Include winsock2.h.
9238 (delete_file_handler, add_file_handler): Adjust prototypes.
9239 (pfildes): Declare.
9240 * utils.c (pfildes): New.
9241
854d88f0
PA
92422010-08-27 Pedro Alves <pedro@codesourcery.com>
9243
9244 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9245 * configure: Regenerate.
9246
0146f85b
PA
92472010-08-27 Pedro Alves <pedro@codesourcery.com>
9248
9249 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9250 (linux_done_accessing_memory): ... this.
9251 (linux_target_ops): Adjust.
9252 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9253 * nto-low.c (nto_target_ops): Adjust comment.
9254 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9255 * spu-low.c (spu_target_ops): Adjust comment.
9256 * target.h (target_ops): Rename unprepare_to_access_memory field
9257 to done_accessing_memory.
9258 (unprepare_to_access_memory): Rename to ...
9259 (done_accessing_memory): ... this.
9260
90d74c30
PA
92612010-08-26 Pedro Alves <pedro@codesourcery.com>
9262
9263 * linux-low.c (linux_prepare_to_access_memory): New.
9264 (linux_unprepare_to_access_memory): New.
9265 (linux_target_ops): Install them.
9266 * server.c (read_memory): Rename to ...
9267 (gdb_read_memory): ... this. Use
9268 prepare_to_access_memory/prepare_to_access_memory.
9269 (write_memory): Rename to ...
9270 (gdb_write_memory): ... this. Use
9271 prepare_to_access_memory/prepare_to_access_memory.
9272 (handle_search_memory_1): Adjust.
9273 (process_serial_event): Adjust.
9274 * target.h (struct target_ops): New fields
9275 prepare_to_access_memory and unprepare_to_access_memory.
9276 (prepare_to_access_memory, unprepare_to_access_memory): New.
9277 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9278 prepare_to_access_memory/prepare_to_access_memory.
9279 * nto-low.c (nto_target_ops): Adjust.
9280 * spu-low.c (spu_target_ops): Adjust.
9281 * win32-low.c (win32_target_ops): Adjust.
9282
fd467969
PA
92832010-08-26 Pedro Alves <pedro@codesourcery.com>
9284
9285 * Makefile.in (WARN_CFLAGS): Get it from configure.
9286 (WERROR_CFLAGS): New.
9287 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9288 * configure.ac: Introduce --enable-werror, which adds -Werror to
9289 the compiler command line. Enabled by default. Disable with
9290 --disable-werror. Add -Wdeclaration-after-statement
9291 Wpointer-arith and -Wformat-nonliteral to warning flags.
9292 * configure: Regenerate.
9293
331e2f5f
PA
92942010-08-26 Pedro Alves <pedro@codesourcery.com>
9295
9296 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9297
e581f2b4
PA
92982010-08-26 Pedro Alves <pedro@codesourcery.com>
9299
9300 * gdbreplay.c (remote_error): New.
9301 (gdbchar): New.
9302 (expect): Use gdbchar. Check for error reading from GDB.
9303 Clarify sync error output.
9304 (play): Check for errors writing to GDB.
9305 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9306 * remote-utils.c (getpkt): Check for errors writing to the remote
9307 descriptor.
9308
3c11dd79
PA
93092010-08-25 Pedro Alves <pedro@codesourcery.com>
9310
9311 * linux-low.c (linux_wait_1): Move non-debugging code out of
9312 `debug_threads' control.
9313
d20a8ad9
PA
93142010-08-25 Pedro Alves <pedro@codesourcery.com>
9315
9316 * linux-low.c (linux_wait_1): Don't set last_status here.
9317 * server.c (push_event, queue_stop_reply_callback): Assert we're
9318 not pushing a TARGET_WAITKIND_IGNORE event.
9319 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9320 (myresume, handle_target_event): Set the thread's last_resume_kind
9321 and last_status from the target returned status.
9322
964e4306
PA
93232010-08-25 Pedro Alves <pedro@codesourcery.com>
9324
9325 PR threads/10729
9326
9327 * linux-x86-low.c (update_debug_registers_callback): New.
9328 (i386_dr_low_set_addr): Use it.
9329 (i386_dr_low_get_addr): New.
9330 (i386_dr_low_set_control): Use update_debug_registers_callback.
9331 (i386_dr_low_get_control): New.
9332 (i386_dr_low_get_status): Adjust.
9333 * linux-low.c (linux_stop_lwp): New.
9334 * linux-low.h (linux_stop_lwp): Declare.
9335
9336 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9337 argument instead of a i386_debug_reg_state.
9338 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9339 a i386_debug_reg_state.
9340 (i386_insert_aligned_watchpoint): Adjust.
9341 (i386_remove_aligned_watchpoint): Adjust.
9342 (i386_low_stopped_data_address): Read the debug registers from the
9343 inferior instead of from the mirrors.
9344 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9345 (i386_dr_low_get_addr): Declare.
9346 (i386_dr_low_get_control): Declare.
9347 (i386_dr_low_get_status): Change prototype.
9348
9349 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9350 (i386_dr_low_get_addr): New.
9351 (i386_dr_low_get_control): New.
9352 (i386_dr_low_get_status): Adjust prototype. Return
9353 dr_status_mirror.
9354 (i386_initial_stuff): Clear dr_status_mirror and
9355 dr_control_mirror.
9356 (i386_get_thread_context): Adjust.
9357 (i386_set_thread_context): Adjust.
9358 (i386_thread_added): Adjust.
9359
5f21a75b
PA
93602010-08-24 Pedro Alves <pedro@codesourcery.com>
9361
9362 * linux-low.h (linux_thread_area): Delete declaration.
9363
3e4c1235
TS
93642010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9365
9366 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9367 after its termination.
9368
1971b033
PA
93692010-08-09 Pedro Alves <pedro@codesourcery.com>
9370
9371 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9372 (gdb_wants_all_stopped): Delete.
9373 (linux_wait_1): Don't call them.
9374 * server.c (handle_v_cont): Tag all threads as want-stopped.
9375 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9376 stopped as "client-wants-stopped".
9377
310444ac
PA
93782010-07-31 Pedro Alves <pedro@codesourcery.com>
9379
9380 * Makefile.in (signals_h): New.
9381 (server_h): Depend on it.
9382 (server.o): Don't depend on $(signals_def).
9383 (signals.o): Depend on $(signals_def).
9384
a19cae16
JK
93852010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9386
9387 * Makefile.in (signals_def): New.
9388 (server_h): Append include/gdb/signals.h and signals_def.
9389 (server.o): Append signals_def.
9390
30d50328
JK
93912010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9392
9393 * server.c (handle_target_event): Use target_signal_to_host for
9394 resume_info.sig initialization.
9395 * target.h (struct thread_resume) <sig>: New comment.
9396
5c3216e2
OS
93972010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9398
c6f46ca0
OS
9399 * server.c (handle_query): strcpy() the returned string from paddress()
9400 instead of sprintf().
5c3216e2
OS
9401 * utils.c (paddress): Return phex_nz().
9402
6bd31874
JB
94032010-07-07 Joel Brobecker <brobecker@adacore.com>
9404
9405 * server.c (handle_v_cont): Call mourn_inferior if process
9406 just exited.
9407 (myresume): Likewise.
9408
0fb4aa4b
PA
94092010-07-01 Pedro Alves <pedro@codesourcery.com>
9410
9411 Static tracepoints, and integration with UST.
9412
9413 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9414 * mem-break.c (uninsert_all_breakpoints)
9415 (reinsert_all_breakpoints): New.
9416 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9417 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9418 (gdb_agent_ust_loaded, helper_thread_id)
9419 (gdb_agent_helper_thread_id): New macros.
9420 (struct ipa_sym_addresses): Add addr_ust_loaded,
9421 addr_helper_thread_id, addr_cmd_buf.
9422 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9423 (in_process_agent_loaded_ust): New.
9424 (write_e_ust_not_loaded): New.
9425 (maybe_write_ipa_ust_not_loaded): New.
9426 (struct collect_static_trace_data_action): New.
9427 (enum tracepoint_type) <static_tracepoint>: New.
9428 (struct tracepoint) <handle>: Mention static tracepoints.
9429 (struct static_tracepoint_ctx): New.
9430 (CMD_BUF_SIZE): New.
9431 (add_tracepoint_action): Handle static tracepoint actions.
9432 (unprobe_marker_at): New.
9433 (clear_installed_tracepoints): Handle static tracepoints.
9434 (cmd_qtdp): Handle static tracepoints.
9435 (probe_marker_at): New.
9436 (cmd_qtstart): Handle static tracepoints.
9437 (response_tracepoint): Handle static tracepoints.
9438 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9439 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9440 (get_context_regcache): Handle static tracepoints.
9441 (do_action_at_tracepoint): Handle static tracepoint actions.
9442 (traceframe_find_block_type): Handle static trace data blocks.
9443 (traceframe_read_sdata): New.
9444 (download_tracepoints): Download static tracepoint actions.
9445 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9446 (GDB_PROBE_NAME): New.
9447 (ust_ops): New.
9448 (GET_UST_SYM): New.
9449 (USTF): New.
9450 (dlsym_ust): New.
9451 (ust_marker_to_static_tracepoint): New.
9452 (gdb_probe): New.
9453 (collect_ust_data_at_tracepoint): New.
9454 (gdb_ust_probe): New.
9455 (UNIX_PATH_MAX, SOCK_DIR): New.
9456 (gdb_ust_connect_sync_socket): New.
9457 (resume_thread, stop_thread): New.
9458 (run_inferior_command): New.
9459 (init_named_socket): New.
9460 (gdb_ust_socket_init): New.
9461 (cstr_to_hexstr): New.
9462 (next_st): New.
9463 (first_marker, next_marker): New.
9464 (response_ust_marker): New.
9465 (cmd_qtfstm, cmd_qtsstm): New.
9466 (unprobe_marker_at, probe_marker_at): New.
9467 (cmd_qtstmat, gdb_ust_thread): New.
9468 (gdb_ust_init): New.
9469 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9470 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9471 (ST_REGENTRY): New.
9472 (x86_64_st_collect_regmap): New.
9473 (X86_64_NUM_ST_COLLECT_GREGS): New.
9474 (AMD64_RIP_REGNUM): New.
9475 (supply_static_tracepoint_registers): New.
9476 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9477 (ST_REGENTRY): New.
9478 (i386_st_collect_regmap): New.
9479 (i386_NUM_ST_COLLECT_GREGS): New.
9480 (supply_static_tracepoint_registers): New.
9481 * server.c (handle_query): Handle qXfer:statictrace:read.
9482 <qSupported>: Report support for StaticTracepoints, and
9483 qXfer:statictrace:read features.
9484 * server.h (traceframe_read_sdata)
9485 (supply_static_tracepoint_registers): Declare.
9486 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9487 (unpack_varlen_hex): Include in IPA build.
9488 * Makefile.in (ustlibs, ustinc): New.
9489 (IPA_OBJS): Add remote-utils-ipa.o.
9490 ($(IPA_LIB)): Link -ldl and -lpthread.
9491 (UST_CFLAGS): New.
9492 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9493 * config.in, configure: Regenerate.
9494
9e4344e5
PA
94952010-06-20 Ian Lance Taylor <iant@google.com>
9496 Pedro Alves <pedro@codesourcery.com>
9497
9498 * linux-x86-low.c (always_true): Delete.
9499 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9500 trying to fool the compiler with always_true.
9501
c6beb2cb
PA
95022010-06-20 Pedro Alves <pedro@codesourcery.com>
9503
9504 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9505 conditions in gdbserver.
9506
d2ed6730
UW
95072010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9508
9509 * spu-low.c (spu_read_memory): Wrap around local store limit.
9510 (spu_write_memory): Likewise.
9511
4e29fb54
PA
95122010-06-15 Pedro Alves <pedro@codesourcery.com>
9513
9514 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9515 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9516 LONGEST uses.
9517 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9518 uses.
9519 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9520 uses with LONGEST uses.
9521
6a271cae
PA
95222010-06-14 Stan Shebs <stan@codesourcery.com>
9523 Pedro Alves <pedro@codesourcery.com>
9524
9525 Bytecode compiler.
9526
9527 * linux-x86-low.c: Include limits.h.
9528 (add_insns): New.
9529 (always_true): New.
9530 (EMIT_ASM): New.
9531 (EMIT_ASM32): New.
9532 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9533 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9534 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9535 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9536 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9537 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9538 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9539 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9540 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9541 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9542 (amd64_emit_void_call_2): New.
9543 (amd64_emit_ops): New.
9544 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9545 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9546 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9547 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9548 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9549 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9550 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9551 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9552 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9553 (i386_emit_stack_adjust, i386_emit_int_call_1)
9554 (i386_emit_void_call_2): New.
9555 (i386_emit_ops): New.
9556 (x86_emit_ops): New.
9557 (the_low_target): Install x86_emit_ops.
9558 * server.h (struct emit_ops): New.
9559 (get_raw_reg_func_addr): Declare.
9560 (current_insn_ptr, emit_error): Declare.
9561 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9562 (set_trace_state_variable_value): New defines.
9563 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9564 addr_get_trace_state_variable_value and
9565 addr_set_trace_state_variable_value.
9566 (symbol_list): New fields for get_raw_reg,
9567 get_trace_state_variable_value and set_trace_state_variable_value.
9568 (condfn): New typedef.
9569 (struct tracepoint): New field `compiled_cond'.
9570 (do_action_at_tracepoint): Clear compiled_cond.
9571 (get_trace_state_variable_value, set_trace_state_variable_value):
9572 Export in the IPA.
9573 (condition_true_at_tracepoint): If there's a compiled condition,
9574 run that.
9575 (current_insn_ptr, emit_error): New globals.
9576 (struct bytecode_address): New.
9577 (get_raw_reg_func_addr): New.
9578 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9579 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9580 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9581 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9582 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9583 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9584 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9585 (compile_tracepoint_condition, compile_bytecodes): New.
9586 * target.h (emit_ops): Forward declare.
9587 (struct target_ops): New field emit_ops.
9588 (target_emit_ops): New.
9589 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9590 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9591 * linux-low.c (linux_emit_ops): New.
9592 (linux_target_ops): Install it.
9593 * linux-low.h (struct linux_target_ops): New field emit_ops.
9594
92b72907
UW
95952010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9596
9597 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9598 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9599
fa593d66
PA
96002010-06-01 Pedro Alves <pedro@codesourcery.com>
9601 Stan Shebs <stan@codesourcery.com>
9602
9603 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9604 (all): Depend on $(extra_libraries).
9605 (install-only): Install the IPA.
9606 (IPA_OBJS, IPA_LIB): New.
9607 (clean): Remove the IPA lib.
9608 (IPAGENT_CFLAGS): New.
9609 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9610 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9611 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9612 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9613 * configure.ac: Check for atomic builtins support in the compiler.
9614 (IPA_DEPFILES, extra_libraries): Define.
9615 * configure.srv (ipa_obj): Add description.
9616 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9617 (i[34567]86-*-linux*): Set ipa_obj.
9618 (x86_64-*-linux*): Set ipa_obj.
9619 * linux-low.c (stabilizing_threads): New.
9620 (supports_fast_tracepoints): New.
9621 (linux_detach): Stabilize threads before detaching.
9622 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9623 the lwp is either not stabilizing, or is moving out of a jump pad.
9624 (linux_fast_tracepoint_collecting): New.
9625 (maybe_move_out_of_jump_pad): New.
9626 (enqueue_one_deferred_signal): New.
9627 (dequeue_one_deferred_signal): New.
9628 (linux_wait_for_event_1): If moving out of a jump pad, defer
9629 pending signals to later.
9630 (linux_stabilize_threads): New.
9631 (linux_wait_1): Check if threads need moving out of jump pads, and
9632 do it if so.
9633 (stuck_in_jump_pad_callback): New.
9634 (move_out_of_jump_pad_callback): New.
9635 (lwp_running): New.
9636 (linux_resume_one_lwp): Handle moving out of jump pads.
9637 (linux_set_resume_request): Dequeue deferred signals.
9638 (need_step_over_p): Also step over fast tracepoint jumps.
9639 (start_step_over): Also uninsert fast tracepoint jumps.
9640 (finish_step_over): Also reinsert fast tracepoint jumps.
9641 (linux_install_fast_tracepoint_jump): New.
9642 (linux_target_ops): Install linux_stabilize_threads and
9643 linux_install_fast_tracepoint_jump_pad.
9644 * linux-low.h (linux_target_ops) <get_thread_area,
9645 install_fast_tracepoint_jump_pad>: New fields.
9646 (struct lwp_info) <collecting_fast_tracepoint,
9647 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9648 (linux_get_thread_area): Declare.
9649 * linux-x86-low.c (jump_insn): New.
9650 (x86_get_thread_area): New.
9651 (append_insns): New.
9652 (push_opcode): New.
9653 (amd64_install_fast_tracepoint_jump_pad): New.
9654 (i386_install_fast_tracepoint_jump_pad): New.
9655 (x86_install_fast_tracepoint_jump_pad): New.
9656 (the_low_target): Install x86_get_thread_area and
9657 x86_install_fast_tracepoint_jump_pad.
9658 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9659 (struct fast_tracepoint_jump): New.
9660 (fast_tracepoint_jump_insn): New.
9661 (fast_tracepoint_jump_shadow): New.
9662 (find_fast_tracepoint_jump_at): New.
9663 (fast_tracepoint_jump_here): New.
9664 (delete_fast_tracepoint_jump): New.
9665 (set_fast_tracepoint_jump): New.
9666 (uninsert_fast_tracepoint_jumps_at): New.
9667 (reinsert_fast_tracepoint_jumps_at): New.
9668 (set_breakpoint_at): Use write_inferior_memory.
9669 (uninsert_raw_breakpoint): Use write_inferior_memory.
9670 (check_mem_read): Mask out fast tracepoint jumps.
9671 (check_mem_write): Mask out fast tracepoint jumps.
9672 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9673 (set_fast_tracepoint_jump): Declare.
9674 (delete_fast_tracepoint_jump)
9675 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9676 (reinsert_fast_tracepoint_jumps_at): Declare.
9677 * regcache.c: Don't compile many functions when building the
9678 in-process agent library.
9679 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9680 the register buffer in the heap.
9681 (free_register_cache): If the register buffer isn't owned by the
9682 regcache, don't free it.
9683 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9684 pre-existing register caches.
9685 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9686 type.
9687 (convert_ascii_to_int): : Constify `from' parameter type.
9688 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9689 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9690 the needed buffer in-place.
9691 (relocate_instruction): New.
9692 * server.c (handle_query) <qSymbols>: If the target supports
9693 tracepoints, give it a chance of looking up symbols. Report
9694 support for fast tracepoints.
9695 (handle_status): Stabilize threads.
9696 (process_serial_event): Adjust.
9697 * server.h (struct fast_tracepoint_jump): Forward declare.
9698 (struct process_info) <fast_tracepoint_jumps>: New field.
9699 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9700 (decode_X_packet, decode_M_packet): Adjust.
9701 (relocate_instruction): Declare.
9702 (in_process_agent_loaded): Declare.
9703 (tracepoint_look_up_symbols): Declare.
9704 (struct fast_tpoint_collect_status): Declare.
9705 (fast_tracepoint_collecting): Declare.
9706 (force_unlock_trace_buffer): Declare.
9707 (handle_tracepoint_bkpts): Declare.
9708 (initialize_low_tracepoint)
9709 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9710 * target.h (struct target_ops) <stabilize_threads,
9711 install_fast_tracepoint_jump_pad>: New fields.
9712 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9713 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9714 [HAVE_STDINT_H]: Include stdint.h.
9715 (trace_debug_1): Rename to ...
9716 (trace_vdebug): ... this.
9717 (trace_debug): Rename to ...
9718 (trace_debug_1): ... this. Add `level' parameter.
9719 (trace_debug): New.
9720 (ATTR_USED, ATTR_NOINLINE): New.
9721 (IP_AGENT_EXPORT): New.
9722 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9723 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9724 (about_to_request_buffer_space, trace_buffer_is_full)
9725 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9726 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9727 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9728 (traceframe_write_count, traceframes_created)
9729 (trace_state_variables)
9730 New renaming defines.
9731 (struct ipa_sym_addresses): New.
9732 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9733 (symbol_list): New.
9734 (ipa_sym_addrs): New.
9735 (all_tracepoint_symbols_looked_up): New.
9736 (in_process_agent_loaded): New.
9737 (write_e_ipa_not_loaded): New.
9738 (maybe_write_ipa_not_loaded): New.
9739 (tracepoint_look_up_symbols): New.
9740 (debug_threads) [IN_PROCESS_AGENT]: New.
9741 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9742 (UNKNOWN_SIDE_EFFECTS): New.
9743 (stop_tracing): New.
9744 (flush_trace_buffer): New.
9745 (stop_tracing_bkpt): New.
9746 (flush_trace_buffer_bkpt): New.
9747 (read_inferior_integer): New.
9748 (read_inferior_uinteger): New.
9749 (read_inferior_data_pointer): New.
9750 (write_inferior_data_pointer): New.
9751 (write_inferior_integer): New.
9752 (write_inferior_uinteger): New.
9753 (struct collect_static_trace_data_action): Delete.
9754 (enum tracepoint_type): New.
9755 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
9756 <actions_str, step_actions, step_actions_str>: Only include in
9757 GDBserver.
fa593d66
PA
9758 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9759 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9760 (tracepoints): Use IP_AGENT_EXPORT.
9761 (last_tracepoint): Don't include in the IPA.
9762 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9763 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9764 (alloced_trace_state_variables): New.
9765 (trace_state_variables): Use IP_AGENT_EXPORT.
9766 (traceframe_t): Delete unused variable.
9767 (circular_trace_buffer): Don't include in the IPA.
9768 (trace_buffer_start): Delete.
9769 (struct trace_buffer_control): New.
9770 (trace_buffer_free): Delete.
9771 (struct ipa_trace_buffer_control): New.
9772 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9773 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9774 New.
9775 (trace_buffer_ctrl): New.
9776 (TRACE_BUFFER_CTRL_CURR): New.
9777 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9778 Reimplement as macros.
9779 (trace_buffer_wrap): Delete.
9780 (traceframe_write_count, traceframe_read_count)
9781 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9782 (struct tracepoint_hit_ctx) <type>: New field.
9783 (struct fast_tracepoint_ctx): New.
9784 (memory_barrier): New.
9785 (cmpxchg): New.
9786 (record_tracepoint_error): Update atomically in the IPA.
9787 (clear_inferior_trace_buffer): New.
9788 (about_to_request_buffer_space): New.
9789 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9790 updating the same buffer.
9791 (add_tracepoint): Default the tracepoint's type to trap
9792 tracepoint, and orig_size to -1.
9793 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9794 internal variables.
9795 (create_trace_state_variable): New parameter `gdb'. Handle it.
9796 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9797 (cmd_qtdp): Handle fast tracepoints.
9798 (cmd_qtdv): Adjust.
9799 (max_jump_pad_size): New.
9800 (gdb_jump_pad_head): New.
9801 (get_jump_space_head): New.
9802 (claim_jump_space): New.
9803 (sort_tracepoints): New.
9804 (MAX_JUMP_SIZE): New.
9805 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9806 IPA.
9807 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9808 support. Upload fast traceframes, and delete internal IPA
9809 breakpoints.
9810 (stop_tracing_handler): New.
9811 (flush_trace_buffer_handler): New.
9812 (cmd_qtstop): Upload fast tracepoints.
9813 (response_tracepoint): Handle fast tracepoints.
9814 (tracepoint_finished_step): Upload fast traceframes. Set the
9815 tracepoint hit context's tracepoint type.
9816 (handle_tracepoint_bkpts): New.
9817 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9818 type. Add comment about fast tracepoints.
9819 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9820 non-existing action_str field.
9821 (get_context_regcache): Handle fast tracepoints.
9822 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9823 to the regcache.
9824 (fast_tracepoint_from_jump_pad_address): New.
9825 (fast_tracepoint_from_ipa_tpoint_address): New.
9826 (collecting_t): New.
9827 (force_unlock_trace_buffer): New.
9828 (fast_tracepoint_collecting): New.
9829 (collecting): New.
9830 (gdb_collect): New.
9831 (write_inferior_data_ptr): New.
9832 (target_tp_heap): New.
9833 (target_malloc): New.
9834 (download_agent_expr): New.
9835 (UALIGN): New.
9836 (download_tracepoints): New.
9837 (download_trace_state_variables): New.
9838 (upload_fast_traceframes): New.
9839 (IPA_FIRST_TRACEFRAME): New.
9840 (IPA_NEXT_TRACEFRAME_1): New.
9841 (IPA_NEXT_TRACEFRAME): New.
9842 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9843 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9844 (gdb_jump_pad_buffer_end): New.
9845 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9846 (initialize_tracepoint): Adjust.
9847 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9848 buffer. Initialize the low module.
9849 * utils.c (PREFIX, TOOLNAME): New.
9850 (malloc_failure): Use PREFIX.
9851 (error): In the IPA, an error causes an exit.
9852 (fatal, warning): Use PREFIX.
9853 (internal_error): Use TOOLNAME.
9854 (NUMCELLS): Increase to 10.
9855 * configure, config.in: Regenerate.
9856
d149dd1d
PA
98572010-06-01 Pedro Alves <pedro@codesourcery.com>
9858
9859 * server.c (handle_query) <qSupported>: Do two passes over the
9860 qSupported string to avoid nesting strtok.
9861
f6528abd
JK
98622010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9863
9864 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9865 (CDEPS): New.
9866 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9867 -Wl,--dynamic-list.
9868 * configure: Regenerate.
9869 * proc-service.list: New.
9870
ca2a87a0
JK
98712010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9872
9873 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9874 New comment.
9875
363a6e9f
OS
98762010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9877
9878 * gdbreplay.c (remote_open): Check error return from socket() call by
9879 its equality to -1 not by it being negative.
9880 * remote-utils.c (remote_open): Likewise.
9881
d23b6cb1
PA
98822010-05-23 Pedro Alves <pedro@codesourcery.com>
9883
9884 * config.h: Regenerate.
9885
28d3cf85
MK
98862010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9887
9888 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9889 doesn't provide PTRACE_GET_THREAD_AREA.
9890
fea36a59
MK
98912010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9892
9893 * linux-m68k-low.c: Include <asm/ptrace.h>
9894 (ps_get_thread_area): Implement.
9895
24b066ba
DE
98962010-05-03 Doug Evans <dje@google.com>
9897
9898 * event-loop.c (struct callback_event): New struct.
9899 (callback_list): New global.
9900 (append_callback_event, delete_callback_event): New functions.
9901 (process_callback): New function.
9902 (start_event_loop): Call it.
9903 * remote-utils.c (NOT_SCHEDULED): Define.
9904 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9905 moved out of readchar.
9906 (readchar): Rewrite. Call reschedule before returning.
9907 (reset_readchar): New function.
9908 (remote_close): Call it.
9909 (process_remaining, reschedule): New functions.
9910 * server.h (callback_handler_func): New typedef.
9911 (append_callback_event, delete_callback_event): Declare.
9912
9836d6ea
PA
99132010-05-03 Pedro Alves <pedro@codesourcery.com>
9914
9915 * proc-service.c (ps_pglobal_lookup): Use
9916 thread_db_look_up_one_symbol.
9917 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9918 parameter. Use it instead of all_symbols_looked_up.
9919 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9920 field.
9921 (all_symbols_looked_up): Don't declare.
9922 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9923 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9924 field.
9925 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9926 Set all_symbols_looked_up here.
9927 (thread_db_look_up_one_symbol): New.
9928 (thread_db_get_tls_address): Adjust.
9929 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9930 thread_db object on the heap, and tentatively set it in the
9931 process structure.
9932 (thread_db_init): Don't set all_symbols_looked_up here.
9933 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9934
7984d532
PA
99352010-05-03 Pedro Alves <pedro@codesourcery.com>
9936
9937 * linux-low.c (linux_kill, linux_detach): Adjust.
9938 (status_pending_p_callback): Remove redundant statement. Check
9939 for !TARGET_WAITIKIND_IGNORE, instead of
9940 TARGET_WAITKIND_STOPPED.
9941 (handle_tracepoints): Make sure LWP is locked. Adjust.
9942 (linux_wait_for_event_1): Adjust.
9943 (linux_cancel_breakpoints): New.
9944 (unsuspend_one_lwp): New.
9945 (unsuspend_all_lwps): New.
9946 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9947 (send_sigstop_callback): Change return type to int, add new
9948 `except' parameter and handle it.
9949 (suspend_and_send_sigstop_callback): New.
9950 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9951 pass them down. If SUSPEND, also increment the lwp's suspend
9952 count.
9953 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9954 (need_step_over_p): Don't consider suspended LWPs.
9955 (start_step_over): Adjust.
9956 (proceed_one_lwp): Change return type to int, add new `except'
9957 parameter and handle it.
9958 (unsuspend_and_proceed_one_lwp): New.
9959 (proceed_all_lwps): Use find_inferior instead of
9960 for_each_inferior.
9961 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9962 also decrement the suspend count of LWPs. Pass `except' down,
9963 instead of hacking its suspend count.
9964 (linux_pause_all): Add `freeze' parameter. Adjust.
9965 (linux_unpause_all): New.
9966 (linux_target_ops): Install linux_unpause_all.
9967 * server.c (handle_status): Adjust.
9968 * target.h (struct target_ops): New fields `unpause_all' and
9969 `cancel_breakpoints'. Add new parameter to `pause_all'.
9970 (pause_all): Add new `freeze' parameter.
9971 (unpause_all): New.
9972 (cancel_breakpoints): New.
9973 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9974 cancel breakpoints.
9975 (cmd_qtstart): Pause threads.
9976 (stop_tracing): Pause threads, and cancel breakpoints.
9977 * win32-low.c (win32_target_ops): Adjust.
9978
e471f25b
PA
99792010-05-03 Pedro Alves <pedro@codesourcery.com>
9980
9981 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9982 the inferior right away from here...
9983 (linux_wait_1): ... to here, and adjust to check the thread's
9984 last_resume_kind instead of the lwp's step or stop_expected flags.
9985
1915ef4f
PA
99862010-05-02 Pedro Alves <pedro@codesourcery.com>
9987
9988 * README: Use consistent `GDB' and `GDBserver' spellings.
9989
f9e39928
PA
99902010-05-02 Pedro Alves <pedro@codesourcery.com>
9991
9992 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9993 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
9994 (linux_detach_one_lwp): Assume the lwp is stopped.
9995 (any_thread_of): Delete.
9996 (linux_detach): Stop all lwps here. Don't blindly delete all
9997 breakpoints.
9998 (delete_lwp_callback): New.
9999 (linux_mourn): Delete all lwps of the process that is gone.
10000 (linux_wait_1): Don't delete the last lwp of the process here.
10001 * mem-break.h (mark_breakpoints_out): Declare.
10002 * mem-break.c (mark_breakpoints_out): New.
10003 (free_all_breakpoints): Use it.
10004 * server.c (handle_target_event): If the process is gone, mark
10005 breakpoints out.
10006 * thread-db.c (struct thread_db) <create_bp>: New field.
10007 (thread_db_enable_reporting): Fix prototype. Store a thread event
10008 breakpoint reference in the thread_db struct.
10009 (thread_db_load_search): Clear the thread_db object.
10010 (try_thread_db_load_1): Ditto.
10011 (switch_to_process): New.
10012 (disable_thread_event_reporting): Use it.
10013 (remove_thread_event_breakpoints): New.
10014 (thread_db_detach, thread_db_mourn): Use it.
10015
1e7fc18c
PA
100162010-05-01 Pedro Alves <pedro@codesourcery.com>
10017
10018 * linux-low.c (linux_enable_event_reporting): New.
10019 (linux_wait_for_event_1, handle_extended_wait): Use it.
10020
02fc4de7
PA
100212010-04-30 Pedro Alves <pedro@codesourcery.com>
10022
10023 * linux-low.c (linux_kill_one_lwp, linux_kill)
10024 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10025 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10026 SIGSTOP even if the LWP is stopped.
10027 (send_sigstop_callback): New.
10028 (stop_all_lwps): Use send_sigstop_callback instead.
10029 (linux_resume_one_thread): Adjust.
10030 (proceed_one_lwp): Still proceed an LWP that the client has
10031 requested to stop, if we haven't reported it as stopped yet. Make
10032 sure that LWPs the client want stopped, have a pending SIGSTOP.
10033
bc3b5632
DE
100342010-04-26 Doug Evans <dje@google.com>
10035
ae1ada35
DE
10036 * server.c (handle_general_set): Make static.
10037
bc3b5632
DE
10038 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10039 Print received char after testing for error/eof instead of before.
10040 (input_interrupt): Tweak comment.
10041
65730243
DE
100422010-04-23 Doug Evans <dje@google.com>
10043
10044 * server.c (start_inferior): Print inferior argv if --debug.
10045
a8ae7dc0
AR
100462010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10047
10048 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10049 * nto-x86-low.c: Include server.h
10050
1c07cc19
PM
100512010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10052
10053 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10054 be consistent with other sources of this directory.
10055 (init_registers_amd64): Correct name of source file of this function
10056 in the comment.
10057
e0a61e09
PM
100582010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10059
10060 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10061 64-bit executables.
10062
54709339
PM
100632010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10064
10065 * win32-i386-low.c: Add 64-bit support.
10066 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10067 (init_registers_amd64): Declare.
10068 (mappings): Add 64-bit version of array.
10069 (init_windows_x86): New function.
10070 (the_low_target): Change init_arch field to init_windows_x86.
10071
e8f0053d
PM
100722010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10073
10074 * win32-low.c: Adapt to support also 64-bit architecture.
10075 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10076 (get_image_name): Use SIZE_T type for local variable `done'.
10077 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10078 (toolhelp_get_dll_name): Idem.
10079 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10080 Use uintptr_t typecast to avoid warning.
10081 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10082 (handle_exception): Use phex_nz to avoid warning.
10083 (win32_wait): Remove unused local variable `process'.
10084
c481e77e
PM
100852010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10086
10087 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10088 `amd64-avx.o'.
10089
12ea4b69
PM
100902010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10091
10092 * configure.ac: Use `ws2_32' library for srv_mingw.
10093 * configure: Regenerate.
10094 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10095 * remote-utils.c: Likewise.
10096
f6d1620c
L
100972010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10098
10099 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10100 if __x86_64__ is defined.
10101
8e642873
PM
101022010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10103
10104 * configure: Regenerate.
10105
711e434b
PM
101062010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10107
10108 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10109 * target.h (target_ops): New get_tib_address field.
10110 * win32-low.h (win32_thread_info): Add thread_local_base field.
10111 * win32-low.c (child_add_thread): Add tlb argument.
10112 Set thread_local_base field to TLB.
10113 (get_child_debug_event): Adapt to child_add_thread change.
10114 (win32_get_tib_address): New function.
10115 (win32_target_ops): Set get_tib_address field to
10116 win32_get_tib_address.
10117 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10118
505106cd
PA
101192010-04-12 Pedro Alves <pedro@codesourcery.com>
10120
505106cd
PA
10121 * linux-low.c (linux_mourn): Also remove the process.
10122 * server.c (handle_target_event): Don't remove the process here.
10123 * nto-low.c (nto_mourn): New.
10124 (nto_target_ops): Install it.
10125 * spu-low.c (spu_mourn): New.
10126 (spu_target_ops): Install it.
10127 * win32-low.c (win32_mourn): New.
10128 (win32_target_ops): Install it.
10129
e8470a06
PA
101302010-04-12 Pedro Alves <pedro@codesourcery.com>
10131
10132 * server.h (buffer_xml_printf): Remove redundant `;'.
10133
45ba0d02
PA
101342010-04-12 Pedro Alves <pedro@codesourcery.com>
10135
10136 * regcache.c (set_register_cache): Invalidate regcaches before
10137 changing the register cache layout.
10138 (regcache_invalidate_one): Allow a NULL regcache.
10139 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10140 regcaches before changing the register cache layout or the target
10141 regsets.
10142
59e04013
L
101432010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10144
10145 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10146 variable warning on Linux/x86-64.
10147
8336d594
PA
101482010-04-11 Pedro Alves <pedro@codesourcery.com>
10149
10150 GDBserver disconnected tracing support.
10151
10152 * linux-low.c (linux_remove_process): Delete.
10153 (add_lwp): Don't set last_resume_kind here.
10154 (linux_kill): Use `mourn'.
10155 (linux_detach): Use `thread_db_detach', and `mourn'.
10156 (linux_mourn): New.
10157 (linux_attach_lwp_1): Adjust comment.
10158 (linux_attach): last_resume_kind moved the thread_info; adjust.
10159 (status_pending_p_callback): Adjust.
10160 (linux_wait_for_event_1): Adjust.
10161 (count_events_callback, select_singlestep_lwp_callback)
10162 (select_event_lwp_callback, cancel_breakpoints_callback)
10163 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10164 (proceed_one_lwp): Adjust.
10165 (linux_async): Add debug output.
10166 (linux_thread_stopped): New.
10167 (linux_pause_all): New.
10168 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10169 linux_pause_all.
10170 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10171 (thread_db_free): Delete declaration.
10172 (thread_db_detach, thread_db_mourn): Declare.
10173 * thread-db.c (thread_db_init): Use thread_db_mourn.
10174 (thread_db_free): Delete, split in two.
10175 (disable_thread_event_reporting): New.
10176 (thread_db_detach): New.
10177 (thread_db_mourn): New.
10178
10179 * server.h (struct thread_info) <last_resume_kind>: New field.
10180 <attached>: Add comment.
10181 <gdb_detached>: New field.
10182 (handler_func): Change return type to int.
10183 (handle_serial_event, handle_target_event): Ditto.
10184 (gdb_connected): Declare.
10185 (tracing): Delete.
10186 (disconnected_tracing): Declare.
10187 (stop_tracing): Declare.
10188
10189 * server.c (handle_query) <qSupported>: Report support for
10190 disconnected tracing.
10191 (queue_stop_reply_callback): Account for running threads.
10192 (gdb_wants_thread_stopped): New.
10193 (gdb_wants_all_threads_stopped): New.
10194 (gdb_reattached_process): New.
10195 (handle_status): Clear the `gdb_detached' flag of all processes.
10196 In all-stop, stop all threads.
10197 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10198 (process_serial_event): If the remote connection breaks, or if an
10199 exit was forced with "monitor exit", force an event loop exit.
10200 Handle disconnected tracing on detach.
10201 (handle_serial_event): Adjust.
10202 (handle_target_event): If GDB isn't connected, forward events back
10203 to the inferior, unless the last process exited, in which case,
10204 exit gdbserver. Adjust interface.
10205
10206 * remote-utils.c (remote_open): Don't block in accept. Instead
10207 register an event loop source on the listen socket file
10208 descriptor. Refactor bits into ...
10209 (listen_desc): ... this new global.
10210 (gdb_connected): ... this new function.
10211 (enable_async_notification): ... this new function.
10212 (handle_accept_event): ... this new function.
10213 (remote_close): Clear remote_desc.
10214
10215 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10216
10217 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10218 New fields.
10219 (mourn_inferior): Define.
10220 (target_process_qsupported): Avoid the dangling else problem.
10221 (thread_stopped): Define.
10222 (pause_all): Define.
10223 (target_waitstatus_to_string): Declare.
10224 * target.c (target_waitstatus_to_string): New.
10225
10226 * tracepoint.c (tracing): Make extern.
10227 (disconnected_tracing): New.
10228 (stop_tracing): Make extern. Handle tracing stops due to GDB
10229 disconnecting.
10230 (cmd_qtdisconnected): New.
10231 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10232 (handle_tracepoint_general_set): Handle QTDisconnected.
10233
10234 * event-loop.c (event_handler_func): Change return type to int.
10235 (process_event): Bail out if the event handler wants the event
10236 loop to stop.
10237 (handle_file_event): Ditto.
10238 (start_event_loop): Bail out if the event handler wants the event
10239 loop to stop.
10240
10241 * nto-low.c (nto_target_ops): Adjust.
10242 * spu-low.c (spu_wait): Don't remove the process here.
10243 (spu_target_ops): Adjust.
10244 * win32-low.c (win32_wait): Don't remove the process here.
10245 (win32_target_ops): Adjust.
10246
5d267c4c
PA
102472010-04-11 Pedro Alves <pedro@codesourcery.com>
10248
10249 * regcache.c (realloc_register_cache): Invalidate inferior's
10250 regcache before recreating it.
10251
623ccd72
PA
102522010-04-09 Pedro Alves <pedro@codesourcery.com>
10253
10254 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10255
219f2f23
PA
102562010-04-09 Stan Shebs <stan@codesourcery.com>
10257 Pedro Alves <pedro@codesourcery.com>
10258
10259 * server.h (LONGEST): New.
10260 (struct thread_info) <while_stepping>: New field.
10261 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10262 Declare.
10263 (initialize_tracepoint, handle_tracepoint_general_set)
10264 (handle_tracepoint_query, tracepoint_finished_step)
10265 (tracepoint_was_hit, release_while_stepping_state_list):
10266 (current_traceframe): Declare.
10267 * server.c (handle_general_set): Handle tracepoint packets.
10268 (read_memory): New.
10269 (write_memory): New.
10270 (handle_search_memory_1): Use read_memory.
10271 (handle_query): Report support for conditional tracepoints, trace
10272 state variables, and tracepoint sources. Handle tracepoint
10273 queries.
10274 (main): Initialize the tracepoints module.
10275 (process_serial_event): Handle traceframe reads/writes.
10276
10277 * linux-low.c (handle_tracepoints): New.
10278 (linux_wait_1): Call it.
10279 (linux_resume_one_lwp): Handle while-stepping.
10280 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10281 (linux_target_ops): Install them.
10282 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10283 New field.
10284 * linux-x86-low.c (x86_supports_tracepoints): New.
10285 (the_low_target). Install it.
10286
10287 * mem-break.h (delete_breakpoint): Declare.
10288 * mem-break.c (delete_breakpoint): Make external.
10289
10290 * target.h (struct target_ops): Add `supports_tracepoints',
10291 `read_pc', and `write_pc' fields.
10292 (target_supports_tracepoints): Define.
10293 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10294 (phex_nz): New.
10295
10296 * regcache.h (struct regcache) <registers_owned>: New field.
10297 (init_register_cache, regcache_cpy): Declare.
10298 (regcache_read_pc, regcache_write_pc): Declare.
10299 (register_cache_size): Declare.
10300 (supply_regblock): Declare.
10301 * regcache.c (init_register_cache): New.
10302 (new_register_cache): Use it.
10303 (regcache_cpy): New.
10304 (register_cache_size): New.
10305 (supply_regblock): New.
10306 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 10307
219f2f23
PA
10308 * tracepoint.c: New.
10309
10310 * Makefile.in (OBS): Add tracepoint.o.
10311 (tracepoint.o): New rule.
10312
3a13a53b
L
103132010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10314
10315 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10316 (i386-mmx.o): New.
10317 (i386-mmx.c): Likewise.
10318 (i386-mmx-linux.o): Likewise.
10319 (i386-mmx-linux.c): Likewise.
10320
10321 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10322 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10323 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10324 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10325
10326 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10327 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10328 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10329
1570b33e
L
103302010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10331
10332 * Makefile.in (clean): Updated.
10333 (i386-avx.o): New.
10334 (i386-avx.c): Likewise.
10335 (i386-avx-linux.o): Likewise.
10336 (i386-avx-linux.c): Likewise.
10337 (amd64-avx.o): Likewise.
10338 (amd64-avx.c): Likewise.
10339 (amd64-avx-linux.o): Likewise.
10340 (amd64-avx-linux.c): Likewise.
10341
10342 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10343 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10344 (srv_amd64_regobj): Add amd64-avx.o.
10345 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10346 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10347 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10348 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10349 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10350 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10351 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10352
10353 * i387-fp.c: Include "i386-xstate.h".
10354 (i387_xsave): New.
10355 (i387_cache_to_xsave): Likewise.
10356 (i387_xsave_to_cache): Likewise.
10357 (x86_xcr0): Likewise.
10358
10359 * i387-fp.h (i387_cache_to_xsave): Likewise.
10360 (i387_xsave_to_cache): Likewise.
10361 (x86_xcr0): Likewise.
10362
10363 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10364 * linux-crisv32-low.c (target_regsets): Likewise.
10365 * linux-m68k-low.c (target_regsets): Likewise.
10366 * linux-mips-low.c (target_regsets): Likewise.
10367 * linux-ppc-low.c (target_regsets): Likewise.
10368 * linux-s390-low.c (target_regsets): Likewise.
10369 * linux-sh-low.c (target_regsets): Likewise.
10370 * linux-sparc-low.c (target_regsets): Likewise.
10371 * linux-xtensa-low.c (target_regsets): Likewise.
10372
10373 * linux-low.c: Include <sys/uio.h>.
10374 (regsets_fetch_inferior_registers): Support nt_type.
10375 (regsets_store_inferior_registers): Likewise.
10376 (linux_process_qsupported): New.
10377 (linux_target_ops): Add linux_process_qsupported.
10378
10379 * linux-low.h (regset_info): Add nt_type.
10380 (linux_target_ops): Add process_qsupported.
10381
10382 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10383 and <sys/uio.h>.
10384 (init_registers_i386_avx_linux): New.
10385 (init_registers_amd64_avx_linux): Likewise.
10386 (xmltarget_i386_linux_no_xml): Likewise.
10387 (xmltarget_amd64_linux_no_xml): Likewise.
10388 (PTRACE_GETREGSET): Likewise.
10389 (PTRACE_SETREGSET): Likewise.
10390 (x86_fill_xstateregset): Likewise.
10391 (x86_store_xstateregset): Likewise.
10392 (use_xml): Likewise.
10393 (x86_linux_update_xmltarget): Likewise.
10394 (x86_linux_process_qsupported): Likewise.
10395 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10396 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10397 init_registers_i386_linux here. Call
10398 x86_linux_update_xmltarget.
10399 (the_low_target): Add x86_linux_process_qsupported.
10400
10401 * server.c (handle_query): Call target_process_qsupported.
10402
10403 * target.h (target_ops): Add process_qsupported.
10404 (target_process_qsupported): New.
10405
fc7238bb
PA
104062010-04-03 Pedro Alves <pedro@codesourcery.com>
10407
10408 * inferiors.c (add_thread): Set last_status kind to
10409 TARGET_WAITKIND_IGNORE.
10410 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10411 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10412 (linux_wait_1): Move `thread' local definition to block that uses
10413 it. Don't NULL initialize `event_child'.
10414 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10415 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10416 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10417
bdabb078
PA
104182010-04-01 Pedro Alves <pedro@codesourcery.com>
10419
10420 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10421 an extended waitstatus, or by a watchpoint.
10422 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10423 thread was stepping or has been stopped by a watchpoint.
10424
d3bbe7a0
PA
104252010-04-01 Pedro Alves <pedro@codesourcery.com>
10426
10427 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10428 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10429 of another, then delete the previous, and validate all
10430 breakpoints.
10431 (validate_inserted_breakpoint): New.
10432 (delete_disabled_breakpoints): New.
10433 (validate_breakpoints): New.
10434 (check_mem_read): Validate breakpoints before trusting their
10435 shadow. Delete disabled breakpoints.
10436 (check_mem_write): Validate breakpoints before trusting they
10437 should be inserted. Delete disabled breakpoints.
10438 * mem-break.h (validate_breakpoints):
10439 * server.c (handle_query): Validate breakpoints when we see a
10440 qSymbol query.
10441
8b07ae33
PA
104422010-04-01 Pedro Alves <pedro@codesourcery.com>
10443
10444 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10445 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10446 if we could tell there's a GDB breakpoint at stop_pc.
10447 (need_step_over_p): Don't do a step over if we find a GDB
10448 breakpoint at the resume PC.
10449
10450 * mem-break.c (struct raw_breakpoint): New.
10451 (enum bkpt_type): New type `gdb_breakpoint'.
10452 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10453 fields. New field `raw'.
10454 (find_raw_breakpoint_at): New.
10455 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10456 breakpoint instead.
10457 (set_breakpoint_at): Adjust.
10458 (delete_raw_breakpoint): New.
10459 (release_breakpoint): New.
10460 (delete_breakpoint): Rename to...
10461 (delete_breakpoint_1): ... this. Add proc parameter. Use
10462 release_breakpoint. Return ENOENT.
10463 (delete_breakpoint): Reimplement.
10464 (find_breakpoint_at): Delete.
10465 (find_gdb_breakpoint_at): New.
10466 (delete_breakpoint_at): Delete.
10467 (set_gdb_breakpoint_at): New.
10468 (delete_gdb_breakpoint_at): New.
10469 (gdb_breakpoint_here): New.
10470 (set_reinsert_breakpoint): Use release_breakpoint.
10471 (uninsert_breakpoint): Rename to ...
10472 (uninsert_raw_breakpoint): ... this.
10473 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10474 (reinsert_raw_breakpoint): Change parameter type to
10475 raw_breakpoint.
10476 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10477 instead.
10478 (check_breakpoints): Adjust. Use release_breakpoint.
10479 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10480 (breakpoint_inserted_here): Ditto.
10481 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10482 Don't trust the breakpoint's shadow if it is not inserted.
10483 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10484 (delete_all_breakpoints): Adjust.
10485 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10486 use delete_breakpoint_1.
10487
10488 * mem-break.h (breakpoints_supported): Delete declaration.
10489 (set_gdb_breakpoint_at): Declare.
10490 (gdb_breakpoint_here): Declare.
10491 (delete_breakpoint_at): Delete.
10492 (delete_gdb_breakpoint_at): Declare.
10493
10494 * server.h (struct raw_breakpoint): Forward declare.
10495 (struct process_info): New field `raw_breakpoints'.
10496
10497 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10498 breakpoints.
10499
6bf5e0ba
PA
105002010-03-24 Pedro Alves <pedro@codesourcery.com>
10501
10502 * linux-low.c (status_pending_p_callback): Fix comment.
10503 (linux_wait_for_event_1): Move most of the internal breakpoint
10504 handling from here...
10505 (linux_wait_1): ... to here.
10506 (count_events_callback): New.
10507 (select_singlestep_lwp_callback): New.
10508 (select_event_lwp_callback): New.
10509 (cancel_breakpoints_callback): New.
10510 (select_event_lwp): New.
10511 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10512 priority to all LWPs that have had events that should be reported
10513 to the client. Cancel breakpoints when about to reporting the
10514 event to the client, not while stopping lwps. No longer cancel
10515 finished single-steps here.
10516 (cancel_finished_single_step): Delete.
10517 (cancel_finished_single_steps): Delete.
10518
414a389f
PA
105192010-03-24 Pedro Alves <pedro@codesourcery.com>
10520
10521 * mem-break.c (enum bkpt_type): New.
10522 (struct breakpoint): New field `type'.
10523 (set_breakpoint_at): Change return type to struct breakpoint
10524 pointer. Set type to `other_breakpoint' by default.
10525 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10526 in the breakpoint list.
10527 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10528 (reinsert_breakpoint): Rename to ...
10529 (reinsert_raw_breakpoint): ... this.
10530 (reinsert_breakpoints_at): Adjust.
10531 * mem-break.h (struct breakpoint): Declare.
10532 (set_breakpoint_at): Change return type to struct breakpoint
10533 pointer.
10534
2280c721
PA
105352010-03-24 Pedro Alves <pedro@codesourcery.com>
10536
10537 * server.c (handle_query): Assign, not compare.
10538
d50171e4
PA
105392010-03-24 Pedro Alves <pedro@codesourcery.com>
10540
10541 Teach linux gdbserver to step-over-breakpoints.
10542
10543 * linux-low.c (can_hardware_single_step): New.
10544 (supports_breakpoints): New.
10545 (handle_extended_wait): If stopping threads, read the stop pc of
10546 the new cloned LWP.
10547 (get_pc): New.
10548 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10549 low target doesn't support retrieving the PC.
10550 (add_lwp): Set last_resume_kind to resume_continue.
10551 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10552 (linux_attach): Don't clear stop_expected. Set the lwp's
10553 last_resume_kind to resume_stop.
10554 (linux_detach_one_lwp): Don't check for removed breakpoints.
10555 (check_removed_breakpoint): Delete.
10556 (status_pending_p): Rename to ...
10557 (status_pending_p_callback): ... this. Don't check for removed
10558 breakpoints. Don't consider threads that are stopped from GDB's
10559 perspective.
10560 (linux_wait_for_lwp): Always read the stop_pc here.
10561 (cancel_breakpoint): New.
10562 (step_over_bkpt): New global.
10563 (linux_wait_for_event_1): Implement stepping over breakpoints.
10564 (gdb_wants_lwp_stopped): New.
10565 (gdb_wants_all_stopped): New.
10566 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10567 single-step traps here. Store the thread's last reported target
10568 wait status.
10569 (send_sigstop): Don't clear stop_expected. Always set it,
10570 instead.
10571 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10572 (cancel_finished_single_step): New.
10573 (cancel_finished_single_steps): New.
10574 (wait_for_sigstop): Don't cancel finished single-step traps here.
10575 (linux_resume_one_lwp): Don't check for removed breakpoints.
10576 Don't set `step' on non-hardware step archs.
10577 (linux_set_resume_request): Ignore resume_stop requests if already
10578 stopping or stopped. Set the lwp's last_resume_kind.
10579 (resume_status_pending_p): Don't check for removed breakpoints.
10580 (need_step_over_p): New.
10581 (start_step_over): New.
10582 (finish_step_over): New.
10583 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10584 requests. Clear the thread's last reported target waitstatus.
10585 Don't use the `suspended' flag. Don't consider pending breakpoints.
10586 (linux_resume): Start a step-over if necessary.
10587 (proceed_one_lwp): New.
10588 (proceed_all_lwps): New.
10589 (unstop_all_lwps): New.
10590 * linux-low.h (struct lwp_info): Rewrite comment for the
10591 `suspended' flag. Add the `stop_pc' field. Delete the
10592 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10593 Add `'last_resume_kind' and `need_step_over' fields.
10594 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10595 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10596 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10597 (set_raw_breakpoint_at): New.
10598 (set_breakpoint_at): Rewrite to use it.
10599 (reinsert_breakpoint_handler): Delete.
10600 (set_reinsert_breakpoint): New.
10601 (reinsert_breakpoint_by_bp): Delete.
10602 (delete_reinsert_breakpoints): New.
10603 (uninsert_breakpoint): Rewrite.
10604 (uninsert_breakpoints_at): New.
10605 (reinsert_breakpoint): Rewrite.
10606 (reinsert_breakpoints_at): New.
10607 (check_breakpoints): Rewrite.
10608 (breakpoint_here): New.
10609 (breakpoint_inserted_here): New.
10610 (check_mem_read): Adjust.
10611 * mem-break.h (breakpoints_supported, breakpoint_here)
10612 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10613 (reinsert_breakpoint_by_bp): Delete declaration.
10614 (delete_reinsert_breakpoints): Declare.
10615 (reinsert_breakpoint): Delete declaration.
10616 (reinsert_breakpoints_at): Declare.
10617 (uninsert_breakpoint): Delete declaration.
10618 (uninsert_breakpoints_at): Declare.
10619 (check_breakpoints): Adjust prototype.
10620 * server.h: Adjust include order.
10621 (struct thread_info): Declare here. Add a `last_status' field.
10622
30ba68cb
MS
106232010-03-23 Michael Snyder <msnyder@vmware.com>
10624
10625 * server.c (crc32): New function.
10626 (handle_query): Add handling for 'qCRC:' request.
10627
b9a881c2
PA
106282010-03-23 Pedro Alves <pedro@codesourcery.com>
10629
10630 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10631 lwp had been stopped by a watchpoint.
10632
e92d13d5
PA
106332010-03-16 Pedro Alves <pedro@codesourcery.com>
10634
10635 * server.h (internal_error): Declare.
10636 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10637 * utils.c (internal_error): New function.
10638
64daa791
AS
106392010-03-15 Andreas Schwab <schwab@redhat.com>
10640
10641 * configure.srv: Fix typo setting srv_regobj.
10642
f52cd8cd
PA
106432010-03-15 Pedro Alves <pedro@codesourcery.com>
10644
10645 * linux-low.c (fetch_register): Avoid passing a non string literal
10646 format to `error'.
10647 (usr_store_inferior_registers): Ditto.
10648
93ae6fdc
PA
106492010-03-14 Pedro Alves <pedro@codesourcery.com>
10650
10651 * linux-low.c (linux_write_memory): Bail out early if peeking
10652 memory failed.
10653
c3adc08c
PA
106542010-03-14 Pedro Alves <pedro@codesourcery.com>
10655
10656 * linux-low.h (struct lwp_info): New fields
10657 `stopped_by_watchpoint' and `stopped_data_address'.
10658 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10659 here, and cache them in the lwp object.
10660 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10661 directly.
10662 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10663 field.
10664 (linux_stopped_by_watchpoint): Rewrite.
10665 (linux_stopped_data_address): Rewrite.
10666
bce522a2
PA
106672010-03-06 Simo Melenius <simo.melenius@iki.fi>
10668
10669 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10670 switching the current inferior, not before.
10671
90884b2b
L
106722010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10673
10674 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10675 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10676 i386-linux.c and amd64-linux.c.
10677 (reg-i386.o): Removed.
10678 (reg-i386.c): Likewise.
10679 (reg-i386-linux.o): Likewise.
10680 (reg-i386-linux.c): Likewise.
10681 (reg-x86-64.o): Likewise.
10682 (reg-x86-64.c): Likewise.
10683 (reg-x86-64-linux.o): Likewise.
10684 (reg-x86-64-linux.c): Likewise.
10685 (i386.o): New.
10686 (i386.c): Likewise.
10687 (i386-linux.o): Likewise.
10688 (i386-linux.c): Likewise.
10689 (amd64.o): Likewise.
10690 (amd64.c): Likewise.
10691 (amd64-linux.o): Likewise.
10692 (amd64-linux.c): Likewise.
10693
10694 * configure.srv (srv_i386_regobj): New.
10695 (srv_i386_linux_regobj): Likewise.
10696 (srv_amd64_regobj): Likewise.
10697 (srv_amd64_linux_regobj): Likewise.
10698 (srv_i386_32bit_xmlfiles): Likewise.
10699 (srv_i386_64bit_xmlfiles): Likewise.
10700 (srv_i386_xmlfiles): Likewise.
10701 (srv_amd64_xmlfiles): Likewise.
10702 (srv_i386_linux_xmlfiles): Likewise.
10703 (srv_amd64_linux_xmlfiles): Likewise.
10704 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10705 srv_xmlfiles to $srv_i386_xmlfiles.
10706 (i[34567]86-*-mingw32ce*): Likewise.
10707 (i[34567]86-*-mingw*): Likewise.
10708 (i[34567]86-*-nto*): Likewise.
10709 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10710 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10711 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10712 (x86_64-*-linux*): Likewise.
10713
10714 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10715 (init_registers_amd64_linux): New.
10716 (x86_arch_setup): Replace init_registers_x86_64_linux with
10717 init_registers_amd64_linux.
10718
193f13e6
MK
107192010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10720
10721 * configure.ac: Check for libdl. If it is not available link against
10722 static libthread_db.
10723 * configure: Regenerate.
10724
85d721b8
PA
107252010-02-22 Pedro Alves <pedro@codesourcery.com>
10726
10727 PR9605
10728
10729 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10730 handing a read watchpoint.
10731 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10732
6076632b
DE
107332010-02-12 Doug Evans <dje@google.com>
10734
10735 * linux-low.c (linux_supports_tracefork_flag): Document.
10736 (linux_look_up_symbols): Add comment.
10737
3327ccf7
L
107382010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10739
10740 * regcache.c (supply_register): Clear regcache if buf is NULL.
10741
0718675c 107422010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 10743 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
10744
10745 * inferiors.c (find_inferior): Add function documentation.
10746 (unloaded_dll): Handle the case where the unloaded dll has not
10747 been previously registered in the dll list.
10748
177321bd
DJ
107492010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10750
10751 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10752 (thumb2_breakpoint): New.
10753 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10754
2b009048
DJ
107552010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10756
10757 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10758 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10759 breakpoints.
10760
3be029c7
PA
107612010-01-21 Pedro Alves <pedro@codesourcery.com>
10762
10763 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10764
18f5de3b
JK
107652010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10766
10767 * linux-s390-low.c (s390_collect_ptrace_register)
10768 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10769
3743bb4f
DE
107702010-01-21 Doug Evans <dje@google.com>
10771
14ce3065
DE
10772 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10773 (PTRACE_ARG4_TYPE): New macro.
10774 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10775 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10776 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10777 (usr_store_inferior_registers): Ditto.
10778 (linux_read_memory, linux_write_memory): Ditto.
10779 (linux_test_for_tracefork): Ditto.
10780
3743bb4f
DE
10781 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10782 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10783
8b315be5
PA
107842010-01-21 Pedro Alves <pedro@codesourcery.com>
10785
10786 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10787 target.
10788
85492558
PA
107892010-01-21 Pedro Alves <pedro@codesourcery.com>
10790
10791 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10792 prototype to take a regcache. Adjust.
10793
442ea881
PA
107942010-01-20 Pedro Alves <pedro@codesourcery.com>
10795
10796 * regcache.h (struct thread_info): Forward declare.
10797 (struct regcache): New.
10798 (new_register_cache): Adjust prototype.
10799 (get_thread_regcache): Declare.
10800 (free_register_cache): Adjust prototype.
10801 (registers_to_string, registers_from_string): Ditto.
10802 (supply_register, supply_register_by_name, collect_register)
10803 (collect_register_as_string, collect_register_by_name): Ditto.
10804 * regcache.c (struct inferior_regcache_data): Delete.
10805 (get_regcache): Rename to ...
10806 (get_thread_regcache): ... this. Adjust. Switch inferior before
10807 fetching registers.
10808 (regcache_invalidate_one): Adjust.
10809 (regcache_invalidate): Fix prototype.
10810 (new_register_cache): Return the new register cache.
10811 (free_register_cache): Change prototype.
10812 (realloc_register_cache): Adjust.
10813 (registers_to_string): Change prototype to take a regcache. Adjust.
10814 (registers_from_string): Ditto.
10815 (register_data): Ditto.
10816 (supply_register): Ditto.
10817 (supply_register_by_name): Ditto.
10818 (collect_register): Ditto.
10819 (collect_register_as_string): Ditto.
10820 (collect_register_by_name): Ditto.
10821 * server.c (process_serial_event): Adjust.
10822 * linux-low.h (regset_fill_func, regset_store_func): Change
10823 prototype.
10824 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10825 Change prototype.
10826 * linux-low.c (get_stop_pc): Adjust.
10827 (check_removed_breakpoint): Adjust.
10828 (linux_wait_for_event): Adjust.
10829 (linux_resume_one_lwp): Adjust.
10830 (fetch_register): Add regcache parameter. Adjust.
10831 (usr_store_inferior_registers): Ditto.
10832 (regsets_fetch_inferior_registers): Ditto.
10833 (regsets_store_inferior_registers): Ditto.
10834 (linux_fetch_registers, linux_store_registers): Ditto.
10835 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10836 regcache. Adjust.
43aaf8b6
PA
10837 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10838 Ditto.
442ea881
PA
10839 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10840 prototype to take a regcache.
10841 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10842 * remote-utils.c (convert_ascii_to_int, outreg)
10843 (prepare_resume_reply): Change prototype to take a regcache.
10844 Adjust.
10845 * target.h (struct target_ops) <fetch_registers, store_registers>:
10846 Change prototype to take a regcache.
10847 (fetch_inferior_registers, store_inferior_registers): Change
10848 prototype to take a regcache. Adjust.
10849 * proc-service.c (ps_lgetregs): Adjust.
10850 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10851 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10852 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10853 take a regcache. Adjust.
10854 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10855 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10856 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10857 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10858 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10859 (cris_cannot_fetch_register):
10860 (cris_breakpoint_at): Change prototype to take a regcache.
10861 Adjust.
10862 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10863 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10864 to take a regcache. Adjust.
10865 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10866 Adjust.
10867 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10868 take a regcache. Adjust.
10869 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10870 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10871 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10872 * linux-mips-low.c (mips_get_pc):
10873 (mips_set_pc): Change prototype to take a regcache. Adjust.
10874 (mips_reinsert_addr): Adjust.
10875 (mips_collect_register): Change prototype to take a regcache.
10876 Adjust.
10877 (mips_supply_register):
10878 (mips_collect_register_32bit, mips_supply_register_32bit)
10879 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10880 (mips_store_fpregset): Ditto.
43aaf8b6
PA
10881 * linux-ppc-low.c (ppc_supply_ptrace_register)
10882 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
10883 (parse_spufs_run): Adjust.
10884 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10885 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10886 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10887 take a regcache. Adjust.
10888 * linux-s390-low.c (s390_collect_ptrace_register)
10889 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10890 (s390_set_pc): Change prototype to take a regcache. Adjust.
10891 (s390_arch_setup): Adjust.
10892 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10893 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10894 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10895 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10896 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10897 regcache. Adjust.
10898 (sparc_breakpoint_at): Adjust.
10899 * linux-xtensa-low.c (xtensa_fill_gregset):
10900 (xtensa_store_gregset):
10901 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10902 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10903 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10904 prototype to take a regcache. Adjust.
10905 * win32-arm-low.c (arm_fetch_inferior_register)
10906 (arm_store_inferior_register): Change prototype to take a
10907 regcache. Adjust.
10908 * win32-i386-low.c (i386_fetch_inferior_register)
10909 (i386_store_inferior_register): Change prototype to take a
10910 regcache. Adjust.
10911 * win32-low.c (child_fetch_inferior_registers)
10912 (child_store_inferior_registers): Change prototype to take a
10913 regcache. Adjust.
10914 (win32_wait): Adjust.
10915 (win32_fetch_inferior_registers): Change prototype to take a
10916 regcache. Adjust.
10917 (win32_store_inferior_registers): Adjust.
10918 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10919 store_inferior_register>: Change prototype to take a regcache.
10920
60c3d7b0
DE
109212010-01-20 Doug Evans <dje@google.com>
10922
10923 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10924 #ifdef.
10925 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 10926 (W_STOPCODE): Provide definition if missing.
60c3d7b0 10927
dc146f7c
VP
109282010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10929
10930 * linux-low.c (linux_core_of_thread): New.
10931 (compare_ints, show_process, list_threads): New.
10932 (linux_qxfer_osdata): Report threads and cores.
10933 (linux_target_op): Register linux_core_of_thread.
10934 * remote-utils.c (prepare_resume_reply): Report the core.
10935 (buffer_xml_printf): Support %d specifier.
10936 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10937 New.
10938 (handle_query): Handle qXfer:threads. Announce availability
10939 thereof.
10940 * target.h (struct target_ops): New field core_of_thread.
10941
7803799a
UW
109422010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10943
10944 * Makefile.in (clean): Remove new generated files.
10945 (reg-s390.o, reg-s390.c): Remove rules.
10946 (reg-s390x.o, reg-s390x.c): Likewise.
10947 (s390-linux32.o, s390-linux32.c): Add rules.
10948 (s390-linux64.o, s390-linux64.c): Likewise.
10949 (s390x-linux64.o, s390x-linux64.c): Likewise.
10950 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10951 * linux-s390-low.c: Include <elf.h>.
10952 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10953 (init_registers_s390): Remove prototype.
10954 (init_registers_s390x): Likewise.
10955 (init_registers_s390_linux32): Add prototype.
10956 (init_registers_s390_linux64): Likewise.
10957 (init_registers_s390x_linux64): Likewise.
10958 (s390_num_regs_3264): New define.
10959 (s390_regmap_3264): New global variable.
10960 (s390_cannot_fetch_register): Remove obsolete check.
10961 (s390_cannot_store_register): Likewise.
10962 (s390_collect_ptrace_register): Handle upper/lower register halves.
10963 (s390_supply_ptrace_register): Likewise.
10964 (s390_fill_gregset): Update to register number changes.
10965 (s390_get_hwcap): New routine.
10966 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10967 Install appropriate regmap and register set.
10968
6e7ffa39
JB
109692010-01-01 Joel Brobecker <brobecker@adacore.com>
10970
10971 * server.c (gdbserver_version): Update copyright year to 2010.
10972 * gdbreplay.c (gdbreplay_version): Likewise.
10973
957f3f49
DE
109742009-12-28 Doug Evans <dje@google.com>
10975
10976 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10977 elf/external.h. Include <elf.h> instead but only if necessary.
10978
ca5c370d
PA
109792009-12-28 Pedro Alves <pedro@codesourcery.com>
10980
10981 * linux-low.c (linux_remove_process): Remove `detaching'
10982 parameter. Don't release/detach from thread_db here.
10983 (linux_kill): Release/detach from thread_db here, ...
10984 (linux_detach): ... and here, before actually detaching.
10985 (linux_wait_1): ... and here, when a process exits.
10986 * thread-db.c (any_thread_of): New.
10987 (thread_db_free): Switch the current inferior to a thread of the
10988 passed in process.
10989
4ee62156
DE
109902009-12-21 Doug Evans <dje@google.com>
10991
d90e6a88
DE
10992 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10993
c5f62d5f
DE
10994 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10995 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10996 warning ifndef __NR_tkill. Move setting of errno there too.
10997 Delete unnecessary resetting of errno after syscall.
10998 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10999
10e86dd7
DE
11000 * configure.ac: Check for dladdr.
11001 * config.in: Regenerate.
11002 * configure: Regenerate.
11003 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11004 (try_thread_db_load): Update.
11005
4ee62156
DE
11006 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11007
00f515da
DE
110082009-12-18 Doug Evans <dje@google.com>
11009
e9464885
DE
11010 * event-loop.c: Include unistd.h if it exists.
11011
07d4f67e
DE
11012 * linux-low.c (my_waitpid): Move definition away from being in
11013 between linux_tracefork_child/linux_test_for_tracefork.
11014
00f515da
DE
11015 * gdb_proc_service.h (psaddr_t): Fix type.
11016 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11017 signature to match glibc.
11018
1de1badb
DE
110192009-12-16 Doug Evans <dje@google.com>
11020
11021 * linux-low.c (linux_read_memory): Fix argument to read.
11022
aeeb81d1
PA
110232009-11-26 Pedro Alves <pedro@codesourcery.com>
11024
11025 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11026 events, don't leave current_inferior pointing at null.
11027
10357975
PA
110282009-11-26 Pedro Alves <pedro@codesourcery.com>
11029
11030 * win32-low.c (LOG): Delete.
11031 (OUTMSG): Output to stderr.
11032 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11033 on compile time LOG macro.
11034 (win32_wait): Fix debug output.
11035
cf6e3471
PA
110362009-11-26 Pedro Alves <pedro@codesourcery.com>
11037
11038 * win32-low.c (win32_add_one_solib): If the dll name is
11039 "ntdll.dll", prepend the system directory to the dll path.
11040
0c85e18e
MK
110412009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11042
11043 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11044
9ac544ce 110452009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11046 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11047
11048 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11049 * configure.ac: Check for __mcoldfire__ and set
11050 gdb_cv_m68k_is_coldfire.
11051 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11052 reg-cf.o and reg-m68k.o.
11053 * configure: Regenerated.
11054
fd7dd3e6
PA
110552009-11-16 Pedro Alves <pedro@codesourcery.com>
11056
11057 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11058 Pass it to thread_db_free.
11059 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11060 proper `detaching' argument to linux_remove_process.
11061 * linux-low.h (thread_db_free): Add `detaching' parameter.
11062 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11063 to thread_db_free.
11064 (thread_db_free): Add `detaching' parameter. Only
11065 call td_ta_clear_event if detaching from process.
11066
75aa492e
MK
110672009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11068
11069 * thread-db.c (thread_db_free): Fix typo.
11070
21e1bee4
PP
110712009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11072
11073 PR gdb/10838
11074 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11075
8838b45e
NS
110762009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11077
11078 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11079 with an i686 compiler.
11080 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11081 needed.
11082 * configure: Rebuilt.
11083
8a35fb51
SL
110842009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11085
11086 PR gdb/10783
11087
11088 * server.c (handle_search_memory_1): Correct read_addr initialization
11089 in loop for searching subsequent chunks.
11090
96f15937
PP
110912009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11092
11093 * configure.ac: New --with-libthread-db option.
11094 * thread-db.c: Allow direct dependence on libthread_db.
11095 (thread_db_free): Adjust.
11096 * config.in: Regenerate.
11097 * configure: Likewise.
889bf7c5 11098
5f7d1694
PP
110992009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11100
11101 PR gdb/10757
11102 * thread-db.c (attach_thread): New function.
11103 (maybe_attach_thread): Return success/failure.
11104 (find_new_threads_callback): Adjust.
889bf7c5
PA
11105 (thread_db_find_new_threads): Loop until no new threads.
11106
88e3b899
PA
111072009-10-13 Pedro Alves <pedro@codesourcery.com>
11108
11109 * proc-service.c (ps_lgetregs): Formatting.
11110
cdbfd419
PP
111112009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11112
11113 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11114 * configure.ac: Adjust.
11115 * linux-low.h (struct process_info_private): Move members to struct
11116 thread_db.
11117 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11118 * linux-low.c (linux_remove_process): Adjust.
11119 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11120 * server.c (handle_query): Move code ...
11121 (handle_monitor_command): ... here. New function.
11122 * target.h (struct target_ops): New member.
11123 * thread-db.c (struct thread_db): New.
11124 (libthread_db_search_path): New variable.
11125 (thread_db_create_event, thread_db_enable_reporting)
11126 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11127 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11128 (try_thread_db_load_1, dladdr_to_soname): New functions.
11129 (try_thread_db_load, thread_db_load_search): New functions.
11130 (thread_db_init): Search for libthread_db.
11131 (thread_db_free): New function.
11132 (thread_db_handle_monitor_command): Likewise.
11133 * config.in: Regenerate.
11134 * configure: Regenerate.
889bf7c5 11135
4168d2d6
UW
111362009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11137
11138 * spu-low.c (spu_kill): Wait for inferior to terminate.
11139 Call clear_inferiors.
11140 (spu_detach): Call clear_inferiors.
11141
81ecdfbb
RW
111422009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11143
11144 * aclocal.m4: Regenerate.
11145 * config.in: Likewise.
11146 * configure: Likewise.
11147
0b9ff2c0
UW
111482009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11149
11150 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11151 (parse_spufs_run): New function.
11152 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11153 (ppc_breakpoint_at): Handle SPU breakpoints.
11154
efcbbd14
UW
111552009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11156
11157 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11158 (SPUFS_MAGIC): Define.
11159 (spu_enumerate_spu_ids): New function.
11160 (linux_qxfer_spu): New function.
11161 (linux_target_ops): Install linux_qxfer_spu.
11162
f4d9bade
UW
111632009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11164
11165 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11166 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11167 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11168 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11169 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11170 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11171 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11172 (init_registers_powerpc_cell32l): Add prototype.
11173 (init_registers_powerpc_cell64l): Likewise.
11174 (ppc_arch_setup): Detect Cell/B.E. architecture.
11175
96e946ca
RW
111762009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11177
11178 * Makefile.in (datarootdir): New variable.
11179
58d6951d
DJ
111802009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11181
11182 * linux-low.c (linux_write_memory): Update debugging output.
11183 * Makefile.in (clean): Add new descriptions.
11184 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11185 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11186 * configure.srv: Add new files for arm*-*-linux*.
11187 * linux-arm-low.c: Add new declarations.
11188 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11189 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11190 (HWCAP_VFPv3D16): New.
11191 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11192 instead of __IWMMXT__.
11193 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11194 (arm_arch_setup): New.
11195 (target_regsets): Remove #ifdef. Add VFP regset.
11196 (the_low_target): Use arm_arch_setup.
11197
12b42a12
DJ
111982009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11199
11200 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11201 the main thread again.
11202
ac8c974e
AR
112032009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11204
11205 Adding Neutrino gdbserver.
11206 * configure: Regenerated.
11207 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11208 * configure.srv (i[34567]86-*-nto*): New target.
11209 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11210 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11211 (nto_comctrl) [__QNX__]: New function.
11212 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11213
4424e0c3 112142009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
11215
11216 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11217 srv_tgtobj.
11218
912cf4ba
PA
112192009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11220 Pedro Alves <pedro@codesourcery.com>
11221
11222 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11223 don't support CONTEXT_EXTENDED_REGISTERS.
11224 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11225 (the_low_target): Install them.
11226 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11227 failing with ERROR_PIPE_NOT_CONNECTED.
11228
aa5ca48f
DE
112292009-06-30 Doug Evans <dje@google.com>
11230 Pierre Muller <muller@ics.u-strasbg.fr>
11231
11232 Add h/w watchpoint support to x86-linux, win32-i386.
11233 * Makefile.in (SFILES): Add i386-low.c
11234 (i386_low_h): Define.
11235 (i386-low.o): Add dependencies.
11236 (linux-x86-low.o): Add i386-low.h dependency.
11237 (win32-i386-low.o): Ditto.
11238 * i386-low.c: New file.
11239 * i386-low.h: New file.
11240 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11241 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11242 * linux-low.c (linux_add_process): Initialize arch_private.
11243 (linux_remove_process): Free arch_private.
11244 (add_lwp): Initialize arch_private.
11245 (delete_lwp): Free arch_private.
11246 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11247 provided.
11248 * linux-low.h (process_info_private): New member arch_private.
11249 (lwp_info): New member arch_private.
11250 (linux_target_ops): New members new_process, new_thread,
11251 prepare_to_resume.
11252 (ptid_of): New macro.
11253 * linux-x86-low.c: Include stddef.h, i386-low.h.
11254 (arch_process_info): New struct.
11255 (arch_lwp_info): New struct.
11256 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11257 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11258 (i386_dr_low_get_status): New function.
11259 (x86_insert_point, x86_remove_point): New functions.
11260 (x86_stopped_by_watchpoint): New function.
11261 (x86_stopped_data_address): New function.
11262 (x86_linux_new_process, x86_linux_new_thread): New functions.
11263 (x86_linux_prepare_to_resume): New function.
11264 (the_low_target): Add entries for insert_point, remove_point,
11265 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11266 prepare_to_resume.
11267 * server.c (debug_hw_points): New global.
11268 (monitor_show_help): Document set debug-hw-points.
11269 (handle_query): Process "set debug-hw-points".
11270 * server.h (debug_hw_points): Declare.
11271 (paddress): Declare.
11272 * utils.c (NUMCELLS, CELLSIZE): New macros.
11273 (get_sell, xsnprintf, paddress): New functions.
11274 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11275 remove_point, stopped_by_watchpoint, stopped_data_address.
11276 * win32-i386-low.c: Include i386-low.h.
11277 (debug_reg_state): Replaces dr.
11278 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11279 (i386_dr_low_get_status): New function.
11280 (i386_insert_point, i386_remove_point): New functions.
11281 (i386_stopped_by_watchpoint): New function.
11282 (i386_stopped_data_address): New function.
11283 (i386_initial_stuff): Update.
11284 (get_thread_context,set_thread_context,i386_thread_added): Update.
11285 (the_low_target): Add entries for insert_point,
11286 remove_point, stopped_by_watchpoint, stopped_data_address.
11287 * win32-low.c (win32_insert_watchpoint): New function.
11288 (win32_remove_watchpoint): New function.
11289 (win32_stopped_by_watchpoint): New function.
11290 (win32_stopped_data_address): New function.
11291 (win32_target_ops): Add entries for insert_watchpoint,
11292 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11293 * win32-low.h (win32_target_ops): New members insert_point,
11294 remove_point, stopped_by_watchpoint, stopped_data_address.
11295
d993e290
PA
112962009-06-25 Pedro Alves <pedro@codesourcery.com>
11297
11298 * server.c (process_serial_event): Re-return unsupported, not
11299 error, if the type isn't recognized. Re-allow supporting only
11300 insert or remove packets. Also call require_running for
11301 breakpoints. Add missing break statement to default case. Tidy.
11302 * target.h (struct target_ops): Rename insert_watchpoint to
11303 insert_point, and remove_watchpoint to remove_point.
11304
11305 * linux-low.h (struct linux_target_ops): Likewise.
11306 * linux-low.c (linux_insert_watchpoint): Rename to ...
11307 (linux_insert_point): ... this. Adjust.
11308 (linux_remove_watchpoint): Rename to ...
11309 (linux_remove_point): ... this. Adjust.
11310 (linux_target_ops): Adjust.
11311 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11312 (cris_insert_point): ... this.
11313 (cris_remove_watchpoint): Rename to ...
11314 (cris_remove_point): ... this.
11315 (the_low_target): Adjust.
11316
0f54c268
PM
113172009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11318
11319 * server.c (handle_v_kill): Pass signal_pid to
11320 kill_inferior if multi_process is zero.
11321
c6314022
AR
113222009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11323
11324 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11325 * target.h (target_ops): Comment for *_watchpoint to make it clear
11326 the functions can get types '0' and '1'.
11327
4463ce24
AR
113282009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11329
11330 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11331 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11332 * regcache.c (get_regcache): Likewise.
11333 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11334 * win32-low.c (child_fetch_inferior_registers): Remove check for
11335 regno 0.
11336
cf8fd78b
PA
113372009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11338 Pedro Alves <pedro@codesourcery.com>
11339
11340 * target.h (struct target_ops) <supports_multi_process>: New
11341 callback.
11342 (target_supports_multi_process): New.
11343 * server.c (handle_query): Even if GDB reports support, only
11344 enable multi-process if the target also supports it. Report
11345 multi-process support only if the target backend supports it.
11346 * linux-low.c (linux_supports_multi_process): New function.
11347 (linux_target_ops): Install it as target_supports_multi_process
11348 callback.
11349
47c0c975
DE
113502009-05-24 Doug Evans <dje@google.com>
11351
e09875d4
DE
11352 Global renaming of find_thread_pid to find_thread_ptid.
11353 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11354 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11355 All callers updated.
11356
e27d73f6
DE
11357 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11358 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11359 directly.
11360
47c0c975
DE
11361 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11362 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11363 (linux_resume_one_lwp): Ditto.
11364
2acc282a
DE
113652009-05-23 Doug Evans <dje@google.com>
11366
11367 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11368 from struct inferior_list_entry * to struct lwp_info *.
11369 All callers updated.
11370
9f1036c1
DE
113712009-05-13 Doug Evans <dje@google.com>
11372
11373 * linux-x86-low.c: Don't include assert.h.
11374 (x86_siginfo_fixup): Use fatal, not assert.
11375 (x86_arch_setup): Fix comment.
11376
d0722149
DE
113772009-05-12 Doug Evans <dje@google.com>
11378
11379 Biarch support for i386/amd64 gdbserver.
11380 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11381 Add linux-x86-low.c.
11382 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11383 (linux-x86-low.o): Add.
11384 * linux-x86-64-low.c: Delete.
11385 * linux-i386-low.c: Delete.
11386 * linux-x86-low.c: New file.
11387 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11388 linux-x86-low.o.
11389 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11390 linux-x86-low.o.
11391 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11392 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11393 (linux_child_pid_to_exec_file): New function.
11394 (elf_64_header_p, elf_64_file_p): New functions.
11395 (siginfo_fixup): New function.
11396 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11397 give target a chance to convert layout.
11398 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11399 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11400
fdeb2a12
DE
114012009-05-07 Doug Evans <dje@google.com>
11402
11403 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11404 (regsets_store_inferior_registers): Ditto.
11405
a6dbe5df
PA
114062009-05-06 Pedro Alves <pedro@codesourcery.com>
11407
11408 PR server/10048
11409
11410 * linux-low.c (must_set_ptrace_flags): Delete.
11411 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11412 of the global.
11413 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11414 `lwp->must_set_ptrace_flags' instead.
ba42693b 11415 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
11416 (linux_wait_1): ... not here.
11417
5091eb23
DE
114182009-04-30 Doug Evans <dje@google.com>
11419
9f767825
DE
11420 * inferiors.c (started_inferior_callback): New function.
11421 (attached_inferior_callback): New function.
11422 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11423 * server.c (print_started_pid, print_attached_pid): New functions.
11424 (detach_or_kill_for_exit): New function.
11425 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11426 * server.h (have_started_inferiors_p): Declare.
11427 (have_attached_inferiors_p): Declare.
11428
5091eb23
DE
11429 * inferiors.c (remove_process): Fix memory leak, free process.
11430 * linux-low.c (linux_remove_process): New function.
11431 (linux_kill): Call it instead of remove_process.
11432 (linux_detach, linux_wait_1): Ditto.
11433
155c8968
PA
114342009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11435
11436 * configure.srv: Add x86 Windows CE target.
11437
7fe519cb
UW
114382009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11439
11440 * inferiors.c (get_thread_process): Make global.
11441 * server.h (get_thread_process): Add prototype.
11442 * thread-db.c (find_one_thread): Use get_thread_process
11443 instead of current_process.
11444 (thread_db_get_tls_address): Do not crash if called when
11445 thread layer is not yet initialized.
11446
5472f405
UW
114472009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11448
11449 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11450 * spu-low.c (current_tid): Rename to ...
11451 (current_ptid): ... this.
11452 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11453 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11454 ptid_get_lwp (current_ptid) instead of current_tid.
11455 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11456 instead of current_tid. Use find_process_pid to verify pid
11457 argument is valid. Pass proper argument to remove_process.
11458 (spu_thread_alive): Compare current_ptid instead of current_tid.
11459 (spu_resume): Likewise.
11460
55ac2b99
PA
114612009-04-02 Pedro Alves <pedro@codesourcery.com>
11462
11463 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11464 variable.
11465
95954743
PA
114662009-04-01 Pedro Alves <pedro@codesourcery.com>
11467
11468 Implement the multiprocess extensions, and add linux multiprocess
11469 support.
11470
11471 * server.h (ULONGEST): Declare.
11472 (struct ptid, ptid_t): New.
11473 (minus_one_ptid, null_ptid): Declare.
11474 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11475 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11476 (struct inferior_list_entry): Change `id' type from unsigned from
11477 to ptid_t.
11478 (struct sym_cache, struct breakpoint, struct
11479 process_info_private): Forward declare.
11480 (struct process_info): Declare.
11481 (current_process): Declare.
11482 (all_processes): Declare.
11483 (initialize_inferiors): Declare.
11484 (add_thread): Adjust to use ptid_t.
11485 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11486 (add_process, remove_process, find_thread_pid): Declare.
11487 (find_inferior_id): Adjust to use ptid_t.
11488 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11489 (multi_process): Declare.
11490 (push_event): Adjust to use ptid_t.
11491 (read_ptid, write_ptid): Declare.
11492 (prepare_resume_reply): Adjust to use ptid_t.
11493 (clear_symbol_cache): Declare.
11494 * inferiors.c (all_processes): New.
11495 (null_ptid, minus_one_ptid): New.
11496 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11497 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11498 (add_thread): Change unsigned long to ptid. Remove gdb_id
11499 parameter. Adjust.
11500 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11501 (gdb_id_to_thread): Rename to ...
11502 (find_thread_pid): ... this. Change unsigned long to ptid.
11503 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11504 (loaded_dll, pull_pid_from_list): Adjust.
11505 (add_process, remove_process, find_process_pid)
11506 (get_thread_process, current_process, initialize_inferiors): New.
11507 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11508 (struct target_waitstatus) <related_pid>: Ditto.
11509 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11510 return type to int.
11511 (struct target_ops) <join>: Add `pid' argument.
11512 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11513 (struct target_ops) <wait>: Add `ptid' field. Change return type
11514 to ptid.
11515 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11516 (mywait): Add `ptid' argument. Change return type to ptid_t.
11517 (target_pid_to_str): Declare.
11518 * target.c (set_desired_inferior): Adjust to use ptids.
11519 (mywait): Add new `ptid' argument. Adjust.
11520 (target_pid_to_str): New.
11521 * mem-break.h (free_all_breakpoints): Declare.
11522 * mem-break.c (breakpoints): Delelete.
11523 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11524 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11525 to use per-process breakpoint list.
11526 (free_all_breakpoints): New.
11527 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11528 (symbol_cache, all_symbols_looked_up): Delete.
11529 (hexchars): New.
11530 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11531 read_ptid): New.
11532 (prepare_resume_reply): Change ptid argument's type from unsigned
11533 long to ptid_t. Adjust. Implement W;process and X;process.
11534 (free_sym_cache, clear_symbol_cache): New.
11535 (look_up_one_symbol): Adjust to per-process symbol cache. *
11536 * server.c (cont_thread, general_thread, step_thread): Change type
11537 to ptid_t.
11538 (attached): Delete.
11539 (multi_process): New.
11540 (last_ptid): Change type to ptid_t.
11541 (struct vstop_notif) <ptid>: Change type to ptid_t.
11542 (queue_stop_reply, push_event): Change `ptid' argument's type to
11543 ptid_t.
11544 (discard_queued_stop_replies): Add `pid' argument.
11545 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11546 changes. Don't reference the `attached' global.
11547 (attach_inferior): Adjust to mywait interface changes.
11548 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11549 features. Handle and report "multiprocess+". Handle
11550 "qAttached:PID".
11551 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11552 changes.
11553 (handle_v_kill): New.
11554 (handle_v_stopped): Adjust to use target_pid_to_str.
11555 (handle_v_requests): Allow multiple attaches and runs when
11556 multiprocess extensions are in effect. Handle "vKill".
11557 (myresume): Adjust to use ptids.
11558 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11559 (handle_status): Adjust to discard_queued_stop_replies interface
11560 change.
11561 (first_thread_of, kill_inferior_callback)
11562 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11563 (main): Call initialize_inferiors. Adjust to use ptids, killing
11564 and detaching from all inferiors. Handle multiprocess packet
11565 variants.
11566 * linux-low.h: Include gdb_proc_service.h.
11567 (struct process_info_private): New.
11568 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11569 <lwpid_of>: Use ptid_get_lwp.
11570 (get_lwp_thread): Adjust.
11571 (struct lwp_info): Add `dead' member.
11572 (find_lwp_pid): Declare.
11573 * linux-low.c (thread_db_active): Delete.
11574 (new_inferior): Adjust comment.
11575 (inferior_pid): Delete.
11576 (linux_add_process): New.
11577 (handle_extended_wait): Adjust.
11578 (add_lwp): Change unsigned long to ptid.
11579 (linux_create_inferior): Add process to processes table. Adjust
11580 to use ptids. Don't set new_inferior here.
11581 (linux_attach_lwp): Rename to ...
11582 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11583 it. Adjust to use ptids.
11584 (linux_attach_lwp): New.
11585 (linux_attach): Add process to processes table. Don't set
11586 new_inferior here.
11587 (struct counter): New.
11588 (second_thread_of_pid_p, last_thread_of_process_p): New.
11589 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11590 multiple processes.
11591 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11592 processes. Remove process from process table.
11593 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11594 to multiple processes.
11595 (any_thread_of): New.
11596 (linux_detach): Add `pid' argument, and handle it. Remove process
11597 from processes table.
11598 (linux_join): Add `pid' argument. Handle it.
11599 (linux_thread_alive): Change unsighed long argument to ptid_t.
11600 Consider dead lwps as not being alive.
11601 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11602 threads we're not interested in.
11603 (same_lwp, find_lwp_pid): New.
11604 (linux_wait_for_lwp): Change `pid' argument's type from int to
11605 ptid_t. Adjust.
11606 (linux_wait_for_event): Rename to ...
11607 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11608 from int to ptid_t. Adjust.
11609 (linux_wait_for_event): New.
11610 (linux_wait_1): Add `ptid' argument. Change return type to
11611 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11612 that exit from the process table.
11613 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11614 Adjust.
11615 (mark_lwp_dead): New.
11616 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11617 stopping all threads, mark its main lwp as dead.
11618 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11619 ptids.
11620 (fetch_register, usr_store_inferior_registers)
11621 (regsets_fetch_inferior_registers)
11622 (regsets_store_inferior_registers, linux_read_memory)
11623 (linux_write_memory): Inline `inferior_pid'.
11624 (linux_look_up_symbols): Adjust to use per-process
11625 `thread_db_active'.
11626 (linux_request_interrupt): Adjust to use ptids.
11627 (linux_read_auxv): Inline `inferior_pid'.
11628 (initialize_low): Don't reference thread_db_active.
11629 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11630 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11631 (ps_getpid): Return the pid of the current inferior.
11632 * thread-db.c (proc_handle, thread_agent): Delete.
11633 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11634 per-process data.
11635 (find_one_thread): Change argument type to ptid_t. Adjust to
11636 per-process data.
11637 (maybe_attach_thread): Adjust to per-process data and ptids.
11638 (thread_db_find_new_threads): Ditto.
11639 (thread_db_init): Ditto.
11640 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11641 processes table. Adjust to use ptids.
11642 (spu_kill, spu_detach): Adjust interface. Remove process from
11643 processes table.
11644 (spu_join, spu_thread_alive): Adjust interface.
11645 (spu_wait): Adjust interface. Remove process from processes
11646 table. Adjust to use ptids.
11647 * win32-low.c (current_inferior_tid): Delete.
11648 (current_inferior_ptid): New.
11649 (debug_event_ptid): New.
11650 (thread_rec): Take a ptid. Adjust.
11651 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11652 (child_delete_thread): Ditto.
11653 (do_initial_child_stuff): Add `attached' argument. Add process to
11654 processes table.
11655 (child_fetch_inferior_registers, child_store_inferior_registers):
11656 Adjust.
11657 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11658 (win32_attach): Pass 1 to do_initial_child_stuff.
11659 (win32_kill): Adjust interface. Remove process from processes
11660 table.
11661 (win32_detach): Ditto.
11662 (win32_join): Adjust interface.
11663 (win32_thread_alive): Take a ptid.
11664 (win32_resume): Adjust to use ptids.
11665 (get_child_debug_event): Ditto.
11666 (win32_wait): Adjust interface. Remove exiting process from
11667 processes table.
11668
bd99dc85
PA
116692009-04-01 Pedro Alves <pedro@codesourcery.com>
11670
11671 Non-stop mode support.
11672
11673 * server.h (non_stop): Declare.
11674 (gdb_client_data, handler_func): Declare.
11675 (delete_file_handler, add_file_handler, start_event_loop):
11676 Declare.
11677 (handle_serial_event, handle_target_event, push_event)
11678 (putpkt_notif): Declare.
11679 * target.h (enum resume_kind): New.
11680 (struct thread_resume): Replace `step' field by `kind' field.
11681 (TARGET_WNOHANG): Define.
11682 (struct target_ops) <wait>: Add `options' argument.
11683 <supports_non_stop, async, start_non_stop>: New fields.
11684 (target_supports_non_stop, target_async): New.
11685 (start_non_stop): Declare.
11686 (mywait): Add `options' argument.
11687 * target.c (mywait): Add `options' argument. Print child exit
11688 notifications here.
11689 (start_non_stop): New.
11690 * server.c (non_stop, own_buf, mem_buf): New globals.
11691 (struct vstop_notif): New.
11692 (notif_queue): New global.
11693 (queue_stop_reply, push_event, discard_queued_stop_replies)
11694 (send_next_stop_reply): New.
11695 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11696 interface changes.
11697 (attach_inferior): In non-stop mode, don't wait for the target
11698 here.
11699 (handle_general_set): Handle QNonStop.
11700 (handle_query): When handling qC, return the current general
11701 thread, instead of the first thread of the list.
11702 (handle_query): If the backend supports non-stop mode, include
11703 QNonStop+ in the qSupported query response.
11704 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11705 and non-stop mode.
11706 (handle_v_attach, handle_v_run): Handle non-stop mode.
11707 (handle_v_stopped): New.
11708 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11709 (myresume): Adjust to use resume_kind. Handle non-stop.
11710 (queue_stop_reply_callback): New.
11711 (handle_status): Handle non-stop mode.
11712 (main): Clear non_stop flag on reconnection. Use the event-loop.
11713 Refactor serial protocol handling from here ...
11714 (process_serial_event): ... to this new function. When GDB
11715 selects any thread, select one here. In non-stop mode, wait until
11716 GDB acks all pending events before exiting.
11717 (handle_serial_event, handle_target_event): New.
11718 * remote-utils.c (remote_open): Install remote_desc in the event
11719 loop.
11720 (remote_close): Remove remote_desc from the event loop.
11721 (putpkt_binary): Rename to...
11722 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11723 (putpkt_binary): New as wrapper around putpkt_binary_1.
11724 (putpkt_notif): New.
11725 (prepare_resume_reply): In non-stop mode, don't change the
11726 general_thread.
11727 * event-loop.c: New.
11728 * Makefile.in (OBJ): Add event-loop.o.
11729 (event-loop.o): New rule.
11730
11731 * linux-low.h (pid_of): Moved here.
11732 (lwpid_of): New.
11733 (get_lwp_thread): Use lwpid_of.
11734 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11735 * linux-low.c (pid_of): Delete.
11736 (inferior_pid): Use lwpid_of.
11737 (linux_event_pipe): New.
11738 (target_is_async_p): New.
11739 (delete_lwp): New.
11740 (handle_extended_wait): Use lwpid_of.
11741 (add_lwp): Don't set lwpid field.
11742 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11743 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11744 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11745 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11746 first. Adjust to linux_wait_for_event interface changes. Use
11747 lwpid_of.
11748 (linux_detach): Don't delete the main lwp here.
11749 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11750 (status_pending_p): Don't consider explicitly suspended lwps.
11751 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11752 pointer. Add OPTIONS argument. Change return type to int. Use
11753 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11754 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11755 pointer. Add status pointer argument. Return a pid instead of a
11756 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11757 changes. In non-stop mode, don't switch to a random thread.
11758 (linux_wait): Rename to...
11759 (linux_wait_1): ... this. Add target_options argument, and handle
11760 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11761 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11762 clean exit and signal exit code. Don't stop all threads in
11763 non-stop mode. In all-stop mode, only stop all threads when
11764 reporting a stop to GDB. Handle explicit thread stop requests.
11765 (async_file_flush, async_file_mark): New.
11766 (linux_wait): New.
11767 (send_sigstop): Use lwpid_of.
11768 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11769 interface changes. In non-stop mode, don't switch to a random
11770 thread.
11771 (linux_resume_one_lwp): Use lwpid_of.
11772 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11773 (linux_resume_one_thread): ... this. Handle resume_stop. In
11774 non-stop mode, don't look for pending flag in all threads.
11775 (resume_status_pending_p): Don't consider explicitly suspended
11776 threads.
11777 (my_waitpid): Reimplement. Emulate __WALL.
11778 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11779 Use lwpid_of.
11780 (sigchld_handler, linux_supports_non_stop, linux_async)
11781 (linux_start_non_stop): New.
11782 (linux_target_ops): Register linux_supports_non_stop, linux_async
11783 and linux_start_non_stop.
11784 (initialize_low): Install SIGCHLD handler.
11785 * thread-db.c (thread_db_create_event, find_one_thread)
11786 (thread_db_get_tls_address): Use lwpid_of.
11787 * win32-low.c (win32_detach): Adjust to use resume_kind.
11788 (win32_wait): Add `options' argument.
11789 * spu-low.c (spu_resume): Adjust to use resume_kind.
11790 (spu_wait): Add `options' argument.
11791
5b1c542e
PA
117922009-04-01 Pedro Alves <pedro@codesourcery.com>
11793
11794 Decouple target code from remote protocol.
11795
11796 * target.h (enum target_waitkind): New.
11797 (struct target_waitstatus): New.
11798 (struct target_ops) <wait>: Return an unsigned long. Take a
11799 target_waitstatus pointer instead of a char pointer.
11800 (mywait): Likewise.
11801 * target.c (mywait): Change prototype to return an unsigned long.
11802 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11803 * server.h (thread_from_wait, old_thread_from_wait): Delete
11804 declarations.
11805 (prepare_resume_reply): Change prototype to take a
11806 target_waitstatus.
11807 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11808 (last_status, last_ptid): New.
11809 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11810 pid instead of a signal.
11811 (attach_inferior): Remove "status" and "signal" parameters.
11812 Adjust.
11813 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11814 not as an address.
11815 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11816 (handle_v_requests, myresume): Remove "status" and "signal"
11817 parameters. Adjust.
11818 (handle_status): New.
11819 (main): Delete local `status'. Adjust.
11820 * remote-utils.c: Include target.h.
11821 (prepare_resume_reply): Change prototype to take a
11822 target_waitstatus. Adjust.
11823
11824 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11825 interface.
11826 * spu-low.c (spu_wait): Adjust.
11827 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11828 Delete.
11829 (win32_wait): Adjust.
11830
2bd7c093
PA
118312009-04-01 Pedro Alves <pedro@codesourcery.com>
11832
11833 * target.h (struct thread_resume): Delete leave_stopped member.
11834 (struct target_ops): Add a `n' argument to the `resume' callback.
11835 * server.c (start_inferior): Adjust.
11836 (handle_v_cont, myresume): Adjust.
11837 * linux-low.c (check_removed_breakpoint): Adjust to resume
11838 interface change, and to removed leave_stopped field.
11839 (resume_ptr): Delete.
11840 (struct thread_resume_array): New.
11841 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11842 resume interface change.
11843 (linux_continue_one_thread, linux_queue_one_thread)
11844 (resume_status_pending_p): Check if the resume field is NULL
11845 instead of checking the leave_stopped member.
11846 (linux_resume): Adjust to the target resume interface change.
11847 * spu-low.c (spu_resume): Adjust to the target resume interface
11848 change.
11849 * win32-low.c (win32_detach, win32_resume): Ditto.
11850
c35fafde
PA
118512009-04-01 Pedro Alves <pedro@codesourcery.com>
11852
11853 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11854 flag.
11855 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11856 pending.
11857 (linux_continue_one_thread): Only preserve the stepping flag if
11858 there's a pending breakpoint.
11859
0a59d50b
PA
118602009-03-31 Pedro Alves <pedro@codesourcery.com>
11861
11862 * server.c (main): After the inferior having exited, call
11863 remote_close before exiting gdbserver.
11864
f04c6d38
TJB
118652009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11866
11867 Fix size of FPSCR in Power 7 processors.
11868 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11869 (PPC_FEATURE_HAS_DFP): New #define.
11870 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11871 size of the FPSCR.
11872
78e5cee6
PA
118732009-03-23 Pedro Alves <pedro@codesourcery.com>
11874
11875 * server.c (handle_query) Whitespace and formatting.
11876
1b3f6016
PA
118772009-03-22 Pedro Alves <pedro@codesourcery.com>
11878
11879 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11880 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11881 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11882 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11883 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11884 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11885 Makefile.in, configure.ac: Fix whitespace throughout.
11886 * configure: Regenerate.
11887
a07b2135
PA
118882009-03-22 Pedro Alves <pedro@codesourcery.com>
11889
11890 * inferiors.c (find_inferior): Make it safe for the callback
11891 function to delete the currently iterated inferior.
11892
67cc2626
PA
118932009-03-22 Pedro Alves <pedro@codesourcery.com>
11894
11895 * Makefile.in (linuw_low_h): Move higher.
11896 (thread-db.o): Depend on $(linux_low_h).
11897
54a0b537
PA
118982009-03-17 Pedro Alves <pedro@codesourcery.com>
11899
11900 Rename "process" to "lwp" throughout.
11901
11902 * linux-low.c (all_processes): Rename to...
11903 (all_lwps): ... this.
11904 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11905 (add_process): Rename to ...
11906 (add_lwp): ... this. Adjust.
11907 (linux_create_inferior): Adjust.
11908 (linux_attach_lwp): Adjust.
11909 (linux_attach): Adjust.
11910 (linux_kill_one_process): Rename to ...
11911 (linux_kill_one_lwp): ... this. Adjust.
11912 (linux_kill): Adjust.
11913 (linux_detach_one_process): Rename to ...
11914 (linux_detach_one_lwp): ... this. Adjust.
11915 (linux_detach): Adjust.
11916 (check_removed_breakpoint): Adjust.
11917 (status_pending_p): Adjust.
11918 (linux_wait_for_process): Rename to ...
11919 (linux_wait_for_lwp): ... this. Adjust.
11920 (linux_wait_for_event): Adjust.
11921 (send_sigstop): Adjust.
11922 (wait_for_sigstop): Adjust.
11923 (stop_all_processes): Rename to ...
11924 (stop_all_lwps): ... this.
11925 (linux_resume_one_process): Rename to ...
11926 (linux_resume_one_lwp): ... this. Adjust.
11927 (linux_set_resume_request, linux_continue_one_thread)
11928 (linux_queue_one_thread, resume_status_pending_p)
11929 (usr_store_inferior_registers, regsets_store_inferior_registers)
11930 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11931 Adjust.
11932 * linux-low.h (get_process): Rename to ...
11933 (get_lwp): ... this. Adjust.
11934 (get_thread_process): Rename to ...
11935 (get_thread_lwp): ... this. Adjust.
11936 (get_process_thread): Rename to ...
11937 (get_lwp_thread): ... this. Adjust.
11938 (struct process_info): Rename to ...
11939 (struct lwp_info): ... this.
11940 (all_processes): Rename to ...
11941 (all_lwps): ... this.
11942 * proc-service.c (ps_lgetregs): Adjust.
11943 * thread-db.c (thread_db_create_event, find_one_thread)
11944 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11945
0b16c5cf
PA
119462009-03-14 Pedro Alves <pedro@codesourcery.com>
11947
11948 * server.c (handle_query): Handle "qAttached".
11949
32de4b9d
NS
119502009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11951
11952 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11953 GPLv3, update license URL.
11954
2aecd87f
DE
119552009-03-01 Doug Evans <dje@google.com>
11956
93efd302 11957 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
11958 (server_h): Add gdb_signals.h.
11959 (signals.o): Update.
11960 * server.h (target_signal_from_host,target_signal_to_host_p)
11961 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11962
86b1f9c5
PM
119632009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11964
11965 * remote-utils.c (getpkt): Also generate remote-debug
11966 information if noack_mode is set.
11967
4aa995e1
PA
119682009-02-06 Pedro Alves <pedro@codesourcery.com>
11969
11970 * server.c (handle_query): Report qXfer:siginfo:read and
11971 qXfer:siginfo:write as supported and handle them.
11972 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11973 * linux-low.c (linux_xfer_siginfo): New.
11974 (linux_target_ops): Set it.
11975
62709adf
PA
119762009-01-26 Pedro Alves <pedro@codesourcery.com>
11977
11978 * server.c (gdbserver_usage): Mention --remote-debug.
11979 (main): Accept '--remote-debug' switch.
11980
aef93bd7
DE
119812009-01-18 Doug Evans <dje@google.com>
11982
11983 * regcache.c (new_register_cache): No need to check result of xcalloc.
11984 * server.c (handle_search_memory): Back out calls to xmalloc,
11985 result is checked and error is returned to user upon failure.
11986 (handle_query): Ditto. Add more checks for result of malloc.
11987 (handle_v_cont): Check result of malloc, report error back to
11988 user upon failure.
11989 (handle_v_run): Ditto. Call freeargv.
11990 * server.h (freeargv): Declare.
11991 * utils.c (freeargv): New fn.
11992
54363045
DE
119932009-01-15 Doug Evans <dje@google.com>
11994
f626972c
DE
11995 * gdbreplay.c (perror_with_name): Make arg const char *.
11996 * server.h (target_signal_to_name): Make return type const char *.
0842e787 11997 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 11998 * utils.c (perror_with_name): Make arg const char *.
54363045 11999
18aae699
PA
120002009-01-14 Pedro Alves <pedro@codesourcery.com>
12001
12002 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12003 when handling a EXIT_PROCESS_DEBUG_EVENT.
12004
ff703abe
JB
120052009-01-06 Joel Brobecker <brobecker@adacore.com>
12006
12007 * gdbreplay.c (gdbreplay_version): Update copyright year.
12008 * server.c (gdbserver_version): Likewise.
12009
f21cc1a2 120102009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12011
12012 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12013 (handle_extended_wait): Improve comment.
0e21c1ec 12014
bca929d3
DE
120152008-12-13 Doug Evans <dje@google.com>
12016
12017 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12018 * server.h (ATTR_MALLOC): New macro.
12019 (xmalloc,xcalloc,xstrdup): Declare.
12020 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12021 * inferiors.c: Ditto.
12022 * linux-low.c: Ditto.
12023 * mem-break.c: Ditto.
12024 * regcache.c: Ditto.
12025 * remote-utils.c: Ditto.
12026 * server.c: Ditto.
12027 * target.c: Ditto.
12028 * win32-low.c: Ditto.
12029
97438e3f
DE
120302008-12-12 Doug Evans <dje@google.com>
12031
896c7fbb
DE
12032 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12033 in debugging printf.
12034
97438e3f
DE
12035 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12036
e3b886f8
DE
120372008-12-09 Doug Evans <dje@google.com>
12038
12039 * linux-low.h (struct process_info): Delete member tid, unused.
12040 * thread-db.c (find_one_thread): Update.
12041 (maybe_attach_thread): Update.
12042
07e059b5
VP
120432008-12-02 Pedro Alves <pedro@codesourcery.com>
12044
889bf7c5
PA
12045 * target.h (struct target_ops): Add qxfer_osdata member.
12046 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12047 and dirent.h.
12048 (linux_qxfer_osdata): New functions.
12049 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12050 callback.
12051 * server.c (handle_query): Handle "qXfer:osdata:read:".
12052 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12053 (buffer_xml_printf): New functions.
12054 * server.h (struct buffer): New.
12055 (buffer_grow_str, buffer_grow_str0): New macros.
12056 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12057 (buffer_xml_printf): Declare.
07e059b5 12058
4cab47ab
DE
120592008-11-24 Doug Evans <dje@google.com>
12060
12061 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12062
f142445f
DJ
120632008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12064
12065 * server.c (handle_v_run): Always use the supplied argument list.
12066
d0107bb6 120672008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12068
d0107bb6
BW
12069 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12070 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12071
2c4ad781
TJB
120722008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12073
12074 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12075 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12076 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12077 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12078 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12079 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12080 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12081 XML target descriptions.
12082 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12083 when inferior is running on an ISA 2.05 or later processor. Add
12084 special case to return offset for full 64-bit slot of FPSCR when
12085 in 32-bits.
12086
dfb64f85
DJ
120872008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12088
12089 * Makefile.in (SFILES, clean): Added sparc64 files.
12090 (reg-sparc64.o, reg-sparc64.c): New.
12091 * configure.srv (sparc*-*-linux*): New configuration.
12092 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12093 syscall arguments for SPARC.
12094 (regsets_store_inferior_registers): Likewise.
12095 * linux-sparc-low.c: New file.
12096
66b6e1dd
DE
120972008-10-21 Doug Evans <dje@google.com>
12098
12099 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12100 (READLINE_DIR,READLINE_DEP): Delete.
12101 (INTERNAL_CFLAGS): Update.
12102 (LINTFLAGS): Update.
12103
9b710a42
PA
121042008-10-10 Pedro Alves <pedro@codesourcery.com>
12105
12106 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12107 whole argv from the last run, not just argv[0].
12108
5822d809
PA
121092008-09-08 Pedro Alves <pedro@codesourcery.com>
12110
12111 * regcache.c (new_register_cache): Return NULL if the register
12112 cache size isn't known yet.
12113 (free_register_cache): Avoid dereferencing a NULL regcache.
12114
74aac56f
DJ
121152008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12116
12117 * configure.srv: Merge MIPS and MIPS64.
12118
400b20f5
MR
121192008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12120
12121 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12122
677c5bb1
LM
121232008-08-18 Luis Machado <luisgpm@br.ibm.com>
12124
12125 * Makefile.in: Add required vsx dependencies.
12126
12127 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12128 Declare init_registers_powerpc_vsx32l.
12129 Declare init_registers_powerpc_vsx64l.
12130 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12131 (ppc_arch_setup): Check for VSX in hwcap.
12132 (ppc_fill_vsxregset): New function.
12133 (ppc_store_vsxregset): New function.
12134 Add new VSX entry in regset_info target_regsets.
12135
12136 * configure.srv: Add new VSX dependencies.
12137
a6f3e723
SL
121382008-08-12 Pedro Alves <pedro@codesourcery.com>
12139
12140 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12141 (remote_open): Set or clear transport_is_reliable.
12142 (putpkt_binary): Don't expect acks in noack mode.
12143 (getpkt): Don't send ack/nac in noack mode.
12144 * server.c (handle_general_set): Handle QStartNoAckMode.
12145 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12146 qSupported.
12147 (main): Reset noack_mode on every connection.
12148 * server.h (noack_mode): Declare.
12149
a417dc56
RW
121502008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12151
12152 * Makefile.in (GDBREPLAY_OBS): New variable.
12153 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12154
3221518c
UW
121552008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12156 Daniel Jacobowitz <dan@codesourcery.com>
12157
12158 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12159 (usr_store_inferior_registers): Likewise.
12160 (regsets_store_inferior_registers): Likewise.
12161
ec56be1b
PA
121622008-07-31 Rolf Jansen <rj@surtec.com>
12163 Pedro Alves <pedro@codesourcery.com>
12164
12165 * configure.ac: Check for memmem declaration.
12166 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12167 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12168 (disable_packet_qfThreadInfo): Unconditionally compile.
12169 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12170 * configure, config.in: Regenerate.
12171
2fe5e3ff
DE
121722008-07-28 Doug Kwan <dougkwan@google.com>
12173
12174 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12175 (linux_write_memory): Remove declaration of errno.
12176
836acd6d
UW
121772008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12178
12179 * linux-low.c (handle_extended_wait): Do not use "status"
12180 variable uninitialized.
12181
aeba519e
PA
121822008-07-07 Pedro Alves <pedro@codesourcery.com>
12183
12184 * server.c (handle_v_attach): Inhibit reporting dll changes.
12185
db42f210
PA
121862008-06-27 Pedro Alves <pedro@codesourcery.com>
12187
12188 * remote-utils.c (prepare_resume_reply): If requested, don't
12189 output "thread:TID" in the T stop reply.
12190
12191 * server.c (disable_packet_vCont, disable_packet_Tthread)
12192 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12193 (handle_query): If requested, disable support for qC, qfThreadInfo
12194 and qsThreadInfo.
12195 (handle_v_requests): If requested, disable support for vCont.
12196 (gdbserver_show_disableable): New.
12197 (main): Handle --disable-packet and --disable-packet=LIST.
12198
12199 * server.h (disable_packet_vCont, disable_packet_Tthread)
12200 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12201
8e4c5421
CD
122022008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12203
12204 * server.c (gdbserver_usage): Mention --version.
12205
6e23a804
DJ
122062008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12207
12208 * Makefile.in (gdbreplay.o): New rule.
12209
90aa6a40
JM
122102008-06-06 Joseph Myers <joseph@codesourcery.com>
12211
12212 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12213 message, not gdbserver.
12214
c16158bc 122152008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
12216 Nathan Sidwell <nathan@codesourcery.com>
12217 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
12218
12219 * acinclude.m4: Include ../../config/acx.m4.
12220 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12221 * configure, config.in: Regenerate.
12222 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12223 * server.c (gdbserver_version): Print PKGVERSION.
12224 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12225 (main): Adjust gdbserver_usage calls.
12226 * gdbreplay.c (version, host_name): Add declarations.
12227 (gdbreplay_version, gdbreplay_usage): New.
12228 (main): Accept --version and --help options.
12229
aeb75bf5
DJ
122302008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12231
12232 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12233 (arm_breakpoint_at): Handle Thumb.
12234 (the_low_target): Add comment.
12235
76b233dd
UW
122362008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12237
12238 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12239
08388c79
DE
122402008-05-09 Doug Evans <dje@google.com>
12241
a3c83fae
DE
12242 * server.h (decode_search_memory_packet): Declare.
12243 * remote-utils.c (decode_search_memory_packet): New fn.
12244 * server.c (handle_search_memory_1): New fn.
08388c79
DE
12245 (handle_search_memory): New fn.
12246 (handle_query): Process qSearch:memory packets.
12247
bb9c3d36
UW
122482008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12249
12250 * regcache.c (registers_length): Remove.
12251 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12252 full register packet.
12253 * regcache.h (registers_length): Remove prototype.
12254 * server.h (PBUFSIZ): Define to 16384.
12255
7284e1be
UW
122562008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12257
12258 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12259 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12260 powerpc-64l.o, and powerpc-altivec64l.o.
12261 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12262 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12263 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12264 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12265 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12266 to srv_xmlfiles.
12267
12268 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12269 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12270 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12271 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12272 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12273 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12274 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12275 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12276 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12277 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12278 (clean): Update.
12279
12280 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12281 (init_registers_powerpc_32l): ... this new prototype.
12282 (init_registers_powerpc_32): Remove, replace by ...
12283 (init_registers_powerpc_altivec32l): ... this new prototype.
12284 (init_registers_powerpc_e500): Remove, replace by ...
12285 (init_registers_powerpc_e500l): ... this new prototype.
12286 (init_registers_ppc64): Remove, replace by ...
12287 (init_registers_powerpc_64l): ... this new prototype.
12288 (init_registers_powerpc_64): Remove, replace by ...
12289 (init_registers_powerpc_altivec64l): ... this new prototype.
12290 (ppc_num_regs): Set to 73.
12291 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12292 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12293 (ppc_cannot_store_register): Handle orig_r3 and trap.
12294 (ppc_arch_setup): Update init_registers_... calls.
12295 (ppc_fill_gregset): Handle orig_r3 and trap.
12296
12297 * inferiors.c (clear_inferiors): Reset current_inferior.
12298
fdc59709
PB
122992008-04-23 Paolo Bonzini <bonzini@gnu.org>
12300
889bf7c5
PA
12301 * acinclude.m4: Add override.m4.
12302 * configure: Regenerate.
fdc59709 12303
c9b2f845
UW
123042008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12305
12306 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12307 initial call to init_register_ppc64.
12308
550512b8
UW
123092008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12310
43aaf8b6
PA
12311 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12312 single powerpc*-*-linux* case.
550512b8
UW
12313 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12314
b6430ec3
UW
123152008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12316
12317 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 12318 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
12319 from reg_xmlfiles.
12320 * linux-ppc-low.c: Include <elf.h>.
12321 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12322 (ppc_hwcap): New global variable.
12323 (ppc_regmap): Remove __SPE__ #ifdef sections.
12324 (ppc_regmap_e500): New global variable.
12325 (ppc_cannot_store_register): Update __SPE__ special case.
12326 (ppc_get_hwcap): New function.
12327 (ppc_arch_setup): Use it to determine whether inferior supports
12328 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12329 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12330 Do not access registers if target does not support AltiVec.
12331 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12332 Do not access registers if target does not support SPE.
12333 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12334
52fa2412
UW
123352008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12336
12337 * linux-low.c (disabled_regsets, num_regsets): New.
12338 (use_regsets_p): Delete.
12339 (linux_wait_for_process): Clear disabled_regsets.
12340 (regsets_fetch_inferior_registers): Check and set it.
12341 (regsets_store_inferior_registers): Likewise.
12342 (linux_fetch_registers, linux_store_registers): Do not use
12343 use_regsets_p.
12344 (initialize_low): Allocate disabled_regsets.
12345
e28b3332
DJ
123462008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12347
12348 * Makefile.in (LIBOBJS): New.
12349 (OBS): Use LIBOBJS.
12350 (memmem.o): New rule.
12351 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12352 * configure: Regenerated.
12353
4536995d
UW
123542008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12355
12356 * server.c (handle_query): Never return "unsupported" for
12357 qXfer:features:read queries.
12358
221c031f
UW
123592008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12360
12361 * server.c (get_features_xml): Fix inverted condition.
12362 (handle_query): Always support qXfer:feature:read.
12363
ccd213ac
DJ
123642008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12365
12366 * server.c (wrapper_argv): New.
12367 (start_inferior): Handle wrapper_argv. If set, expect an extra
12368 trap.
12369 (gdbserver_usage): Document --wrapper.
12370 (main): Parse --wrapper.
12371
6fe305f7
UW
123722008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12373
12374 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12375 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12376 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12377 (ppc_set_pc): Likewise.
12378 (ppc_arch_setup): New function.
12379 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12380 of collect_register.
889bf7c5 12381 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 12382
5b0a002e
UW
123832008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12384
12385 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12386 instead of linux-ppc64-low.o.
12387 * linux-ppc64-low.c: Remove file.
12388 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12389 (linux-ppc64-low.o): Remove rule.
12390
12391 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12392 (init_registers_powerpc_64): Likewise.
12393 (ppc_regmap): Conditionally define depending on __powerpc64__.
12394 (ppc_cannot_store_register): Do not special-case "fpscr" when
12395 compiled on __powerpc64__.
12396 (ppc_collect_ptrace_register): New function.
12397 (ppc_supply_ptrace_register): New function.
12398 (ppc_breakpoint): Change type to "unsigned int".
12399 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12400 (the_low_target): Conditionally provide initializers for the
889bf7c5 12401 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
12402 collect_ptrace_register and supply_ptrace_register members.
12403
9b4b61c8
UW
124042008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12405
12406 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12407 * server.c (gdbserver_xmltarget): Define.
12408 (get_features_xml): Use it to replace "target.xml" and arch_string.
12409
12410 * configure.srv: Remove srv_xmltarget. Add XML files that were
12411 mentioned there to srv_xmlfiles instead. Remove conditional tests
12412 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12413 srv_xmlfiles and srv_regobj to include all possible choices.
12414 * configure.ac (srv_xmltarget): Remove.
12415 (srv_xmlfiles): Do not add "target.xml".
12416 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12417 checks for supplementary target information.
12418 * configure: Regenerate.
12419 * Makefile.in (XML_TARGET): Remove.
12420 (target.xml): Remove rule.
12421 (clean): Do not clean up target.xml.
12422 (.PRECIOUS): Do not mention target.xml.
12423
12424 * target.h (struct target_ops): Remove arch_string member.
12425 * linux-low.c (linux_arch_string): Remove.
12426 (linux_target_ops): Remove arch_string initializer.
12427 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12428 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12429 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12430 * spu-low.c (spu_arch_string): Remove.
12431 (spu_target_ops): Remove arch_string initializer.
12432 * win32-low.c (win32_arch_string): Remove.
12433 (win32_target_ops): Remove arch_string initializer.
12434 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12435 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12436 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12437
ee1a7ae4
UW
124382008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12439
12440 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12441 by collect_ptrace_register and supply_ptrace_register hooks.
12442 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12443 instead of checking for the_low_target.left_pad_xfer.
12444 (usr_store_inferior_registers): Use collect_ptrace_register callback
12445 instead of checking for the_low_target.left_pad_xfer.
12446
12447 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12448 (s390_supply_ptrace_register): Likewise.
12449 (s390_fill_gregset): Call s390_collect_ptrace_register.
12450 (the_low_target): Update.
12451
12452 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12453 (ppc_supply_ptrace_register): Likewise.
12454 (the_low_target): Update.
12455
12456 * linux-i386-low.c (the_low_target): Update.
12457 * linux-x86-64-low.c (the_low_target): Update.
12458
d61ddec4
UW
124592008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12460
12461 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12462 reg-s390.o and reg-s390x.o.
12463
12464 * linux-low.c (new_inferior): New global variable.
12465 (linux_create_inferior, linux_attach): Set it.
12466 (linux_wait_for_process): Call the_low_target.arch_setup after the
12467 target has stopped for the first time.
12468 (initialize_low): Do not call the_low_target.arch_setup.
12469
12470 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12471 (s390_set_pc): Likewise.
12472 (s390_arch_setup): New function.
12473 (the_low_target): Use s390_arch_setup as arch_setup routine.
12474
12475 * regcache.c (realloc_register_cache): New function.
12476 (set_register_cache): Call it for each existing regcache.
12477
d05b4ac3
UW
124782008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12479
12480 * server.h (init_registers): Remove prototype.
12481
12482 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12483 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12484 instead of init_registers ().
12485 * linux-arm-low.c (init_registers_arm): Add prototype.
12486 (init_registers_arm_with_iwmmxt): Likewise.
12487 (the_low_target): Add initializer for arch_setup field.
12488 * linux-cris-low.c (init_registers_cris): Add prototype.
12489 (the_low_target): Add initializer for arch_setup field.
12490 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12491 (the_low_target): Add initializer for arch_setup field.
12492 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12493 (the_low_target): Add initializer for arch_setup field.
12494 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12495 (the_low_target): Add initializer for arch_setup field.
12496 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12497 (the_low_target): Add initializer for arch_setup field.
12498 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12499 (the_low_target): Add initializer for arch_setup field.
12500 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12501 (init_registers_mips64_linux): Likewise.
12502 (the_low_target): Add initializer for arch_setup field.
12503 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12504 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12505 (the_low_target): Add initializer for arch_setup field.
12506 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12507 (init_registers_powerpc_64): Likewise.
12508 (the_low_target): Add initializer for arch_setup field.
12509 * linux-s390-low.c (init_registers_s390): Add prototype.
12510 (init_registers_s390x): Likewise.
12511 (the_low_target): Add initializer for arch_setup field.
12512 * linux-sh-low.c (init_registers_sh): Add prototype.
12513 (the_low_target): Add initializer for arch_setup field.
12514 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12515 (the_low_target): Add initializer for arch_setup field.
12516 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12517 (the_low_target): Add initializer for arch_setup field.
12518
12519 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12520 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12521 instead of init_registers ().
12522 * win32-arm-low.c (init_registers_arm): Add prototype.
12523 (the_low_target): Add initializer for arch_setup field.
12524 * win32-i386-low.c (init_registers_i386): Add prototype.
12525 (the_low_target): Add initializer for arch_setup field.
12526
12527 * spu-low.c (init_registers_spu): Add prototype.
12528 (initialize_low): Call initialie_registers_spu () instead of
12529 initialize_registers ().
12530
fd96d250
PA
125312008-02-19 Pedro Alves <pedro@codesourcery.com>
12532
12533 * server.c (handle_v_requests): When handling the vRun and vAttach
12534 packets, if already debugging a process, don't kill it. Return an
12535 error instead.
12536
d41b6bb4
DJ
125372008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12538
12539 * server.c (handle_query): Correct length check.
12540
5ac588cf
PA
125412008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12542
12543 * win32-low.c (do_initial_child_stuff): Add process handle
12544 parameter. Set current_process_handle and current_process_id from the
12545 parameters. Clear globals.
12546 (win32_create_inferior): Don't set current_process_handle and
12547 current_process_id here. Instead pass them on the call to
12548 do_initial_child_stuff.
12549 (win32_attach): Likewise.
12550 (win32_clear_inferiors): New.
12551 (win32_kill): Don't close the current process handle or the
12552 current thread handle here. Instead call win32_clear_inferiors.
12553 (win32_detach): Don't open a new handle to the process. Call
12554 win32_clear_inferiors.
12555 (win32_join): Don't rely on current_process_handle; open a new
12556 handle using the process id.
12557 (win32_wait): Call win32_clear_inferiors when the inferior process
12558 has exited.
12559
ecd7ecbc
DJ
125602008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12561
12562 * server.c (monitor_show_help): Add "exit".
12563
1525d545
MG
125642008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12565
ecd7ecbc 12566 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
12567 (clean): Add reg-xtensa.c.
12568 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
12569 * configure.srv (xtensa*-*-linux*) New target.
12570 * linux-xtensa-low.c: New.
12571 * xtensa-xtregs.c: New.
1525d545 12572
59a016f0
PA
125732008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12574
12575 * hostio.c: Don't include errno.h.
12576 (errno_to_fileio_errno): Move to hostio-errno.
12577 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12578 error number outputting to the target->hostio_last_error callback.
12579 (hostio_packet_error): Use FILEIO_EINVAL directly.
12580 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12581 calls to hostio_error.
12582 * hostio-errno.c: New.
12583 * server.h (hostio_last_error_from_errno): Declare.
12584 * target.h (target_ops): Add hostio_last_error member.
12585 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12586 as hostio_last_error handler.
889bf7c5 12587 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
12588 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12589 (wince_hostio_last_error): New functions.
12590 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12591 as hostio_last_error handler.
12592 (win32_target_ops) [!_WIN32_WCE]: Register
12593 hostio_last_error_from_errno as hostio_last_error handler.
12594 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12595 (hostio-errno.o): New rule.
12596 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12597 * configure.srv (srv_hostio_err_objs): New variable. Default to
12598 hostio-errno.o.
12599 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12600 * configure: Regenerate.
12601
2d717e4f
DJ
126022008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12603
12604 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12605 (linux_kill, linux_detach): Clean up the process list.
12606 * remote-utils.c (remote_open): Improve port number parsing.
12607 (putpkt_binary, input_interrupt): Only send interrupts if the target
12608 is running.
12609 * server.c (extended_protocol): Make static.
12610 (attached): Define earlier.
12611 (exit_requested, response_needed, program_argv): New variables.
12612 (target_running): New.
12613 (start_inferior): Clear attached here.
12614 (attach_inferior): Set attached here.
12615 (require_running): Define.
12616 (handle_query): Use require_running and target_running. Implement
12617 "monitor exit".
12618 (handle_v_attach, handle_v_run): New.
12619 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12620 (gdbserver_usage): Update.
12621 (main): Redo argument parsing. Handle --debug and --multi. Handle
12622 --attach along with other options or after the port. Save
12623 program_argv. Support no initial program. Resynchronize
12624 communication with GDB after an error. Handle "monitor exit".
12625 Use require_running and target_running. Always allow the extended
12626 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12627 restart in extended mode.
12628 * README: Refer to the GDB manual. Update --attach usage.
12629
7407e2de
AS
126302007-12-20 Andreas Schwab <schwab@suse.de>
12631
12632 * linux-low.c (STACK_SIZE): Define.
12633 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12634 (linux_test_for_tracefork): Likewise.
12635
b65d95c5
DJ
126362007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12637
12638 * linux-low.c (linux_wait_for_event): Update messages. Do not
12639 reinsert auto-delete breakpoints.
12640 * mem-break.c (struct breakpoint): Change return type of handler to
12641 int.
12642 (set_breakpoint_at): Update handler type.
12643 (reinsert_breakpoint_handler): Return 1 instead of calling
12644 delete_breakpoint.
12645 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12646 setting a new one.
12647 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12648 * mem-break.h (set_breakpoint_at): Update handler type.
12649 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12650 * win32-low.c (auto_delete_breakpoint): New.
12651 (get_child_debug_event): Use it.
12652
4e799345
DJ
126532007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12654
12655 * configure.ac: Check for pread and pwrite.
12656 * hostio.c (handle_pread): Fall back to lseek and read.
12657 (handle_pwrite): Fall back to lseek and write.
12658 * config.in, configure: Regenerated.
12659
27524b67
DJ
126602007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12661
12662 * server.c (myresume): Add own_buf argument.
12663 (main): Update calls.
12664
a20d5e98
DJ
126652007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12666
12667 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12668 * remote-utils.c (remote_open): Do not call disable_async_io.
12669 (block_async_io): Delete.
12670 (unblock_async_io): Make static.
12671 (initialize_async_io): New.
12672 * server.c (handle_v_cont): Handle async I/O here.
12673 (myresume): Likewise. Move other common resume tasks here...
12674 (main): ... from here. Call initialize_async_io. Disable async
12675 I/O before the main loop.
12676 * server.h (initialize_async_io): Declare.
12677 (block_async_io, unblock_async_io): Delete prototypes.
12678 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12679
b79d787e
DJ
126802007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12681
12682 * remote-utils.c (readchar): Allow binary data in received messages.
12683
d97903b2
PA
126842007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12685
12686 * win32-low.c (attaching): New global.
12687 (win32_create_inferior): Clear the `attaching' global.
12688 (win32_attach): Set the `attaching' global.
12689 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12690 attaching. Only set a breakpoint at the entry point if not
12691 attaching.
12692
311de423
PA
126932007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12694
12695 * server.c (main): Don't report dll events on the initial
12696 connection on attaches.
12697
6c2d16d2
PA
126982007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12699
12700 * server.c (main): Relax numerical bases supported for the pid of
12701 the --attach command line argument.
12702
5ca906e6
PA
127032007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12704
12705 * win32-low.c (win32_attach): Call OpenProcess before
12706 DebugActiveProcess, not after. Add last error output to error
12707 call.
12708
9c6c8194
PA
127092007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12710
12711 * win32-low.c (win32_get_thread_context)
12712 (win32_set_thread_context): New functions.
12713 (thread_rec): Use win32_get_thread_context.
12714 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12715 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12716 field.
12717
4d5d1aaa
PA
127182007-12-03 Leo Zayas
12719 Pedro Alves <pedro_alves@portugalmail.pt>
12720
12721 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12722 global variables.
12723 (child_add_thread): Minor cleanup.
12724 (child_continue): Resume artificially suspended threads before
12725 calling ContinueDebugEvent.
12726 (suspend_one_thread): New.
12727 (fake_breakpoint_event): New.
12728 (get_child_debug_event): Change return type to int. Check here if
12729 gdb sent an interrupt request. If a soft interrupt was requested,
12730 fake a breakpoint event. Return 0 if there is no event to handle,
12731 and 1 otherwise.
12732 (win32_wait): Don't check here if gdb sent an interrupt request.
12733 Ensure there is a valid event to handle.
12734 (win32_request_interrupt): Add soft interruption method as last
12735 resort.
12736
c436e841
PA
127372007-12-03 Leo Zayas
12738 Pedro Alves <pedro_alves@portugalmail.pt>
12739
12740 * win32-low.h (win32_thread_info): Add descriptions to the
12741 structure members. Replace `suspend_count' counter by a
12742 `suspended' flag.
12743 * win32-low.c (thread_rec): Update condition of when to get the
12744 context from the inferior. Rely on ContextFlags being set if it
12745 has already been retrieved. Only suspend the inferior thread if
12746 we haven't already. Warn if that fails.
12747 (continue_one_thread): s/suspend_count/suspended/. Only call
12748 ResumeThread once. Warn if that fails.
12749
e7b5fa67
PA
127502007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12751
12752 * win32-low.c (win32_wait): Don't read from the inferior when it
12753 has already exited.
12754
a385171d
PA
127552007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12756
12757 * Makefile.in (win32_low_h): New variable.
12758 (win32-low.o): Add dependency on $(win32_low_h).
12759 (win32-arm-low.o, win32-i386-low.o): New rules.
12760
f80c84b3
DJ
127612007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12762
12763 * hostio.c: Correct copyright year.
12764
a6b151f1
DJ
127652007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12766
12767 * Makefile.in (OBS): Add hostio.o.
12768 (hostio.o): New rule.
12769 * server.h (handle_vFile): Declare.
12770 * hostio.c: New file.
12771 * server.c (handle_v_requests): Take packet_len and new_packet_len
12772 for binary packets. Call handle_vFile.
12773 (main): Update call to handle_v_requests.
12774
f9387fc3
DJ
127752007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12776
12777 * linux-low.c: Include <sched.h>.
12778
51c2684e
DJ
127792007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12780
12781 * linux-low.c (linux_tracefork_grandchild): New.
12782 (linux_tracefork_child): Use clone.
12783 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12784
75f83163
JB
127852007-10-31 Joel Brobecker <brobecker@adacore.com>
12786
12787 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12788
da5898ce
DJ
127892007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12790
12791 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12792
24a09b5f
DJ
127932007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12794
12795 * inferiors.c (change_inferior_id): Delete.
12796 (add_pid_to_list, pull_pid_from_list): New.
12797 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12798 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12799 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12800 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12801 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12802 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12803 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12804 (using_threads): Always set to 1.
12805 (handle_extended_wait): New.
12806 (add_process): Do not set TID.
12807 (linux_create_inferior): Set must_set_ptrace_flags.
12808 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12809 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12810 (linux_thread_alive): Rename TID argument to LWPID.
12811 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12812 (linux_wait_for_event): Do not use TID or check using_threads. Update
12813 call to dead_thread_notify. Call handle_extended_wait.
12814 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12815 (send_sigstop): Delete sigstop_sent.
12816 (wait_for_sigstop): Avoid TID.
12817 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12818 (linux_test_for_tracefork): New.
12819 (linux_lookup_signals): Use thread_db_active and
12820 linux_supports_tracefork_flag.
12821 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12822 * linux-low.h (get_process_thread): Avoid TID.
12823 (struct process_ifo): Move thread_known and tid to the end. Remove
12824 sigstop_sent.
12825 (linux_attach_lwp, thread_db_init): Update prototypes.
12826 * server.h (change_inferior_id): Delete prototype.
12827 (add_pid_to_list, pull_pid_from_list): New prototypes.
12828 * thread-db.c (thread_db_use_events): New.
12829 (find_first_thread): Rename to...
12830 (find_one_thread): ...this. Update callers and messages. Do not
12831 call fatal. Check thread_db_use_events. Do not call
12832 change_inferior_id or new_thread_notify.
12833 (maybe_attach_thread): Update. Do not call new_thread_notify.
12834 (thread_db_init): Set thread_db_use_events. Check use_events.
12835 * utils.c (fatal, warning): Correct message prefix.
12836
30ed0a8f
DJ
128372007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12838
12839 * Makefile.in (clean): Remove new files.
12840 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12841 (powerpc-64.o, powerpc-64.c): New rules.
12842 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12843 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12844 with SPE.
12845 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12846 SPE targets.
12847 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12848 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12849 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12850 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12851 (target_regsets): Add AltiVec and SPE register sets.
12852 * configure.ac: Check for AltiVec and SPE.
12853 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12854 (ppc_fill_vrregset, ppc_store_vrregset): New.
12855 (target_regsets): Add AltiVec register set.
12856 * configure: Regenerated.
12857
fd462a61
DJ
128582007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12859
12860 * linux-low.c (O_LARGEFILE): Define.
12861 (linux_read_memory): Use /proc/PID/mem.
12862 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12863 * configure, config.in: Regenerated.
12864
69f223ed
DJ
128652007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12866
12867 * linux-low.c (linux_wait_for_event): Do not pass signals while
12868 single-stepping.
12869
aec18585
PA
128702007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12871
12872 * win32-low.c (create_process): New.
12873 (win32_create_inferior): Use create_process instead of
12874 CreateProcess. If create_process failed retry appending an ".exe"
12875 suffix. Store the GetLastError result immediatelly after
12876 create_process calls and use it on the call to error.
12877
34d86ddd
PA
128782007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12879
12880 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12881
5a0e3bd0
JB
128822007-08-23 Joel Brobecker <brobecker@adacore.com>
12883
12884 * configure.ac: Switch license to GPLv3.
12885
f88c79e6
MS
128862007-08-01 Michael Snyder <msnyder@access-company.com>
12887
12888 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12889
6b3d9b83
PA
128902007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12891
12892 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12893 typedef.
12894 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12895 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12896 CloseToolhelp32Snapshot.
12897 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12898 CloseToolhelp32Snapshot.
12899
c588c53c
MS
129002007-07-27 Michael Snyder <michael.snyder@access-company.com>
12901
12902 * server.c (main): Check for inferior exit before main loop.
12903
aa0403d9
PA
129042007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12905
12906 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12907 instead of on tmp_desc.
12908
255e7678
DJ
129092007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12910 Daniel Jacobowitz <dan@codesourcery.com>
12911
12912 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12913 (add_thread): Minor cleanups.
12914 (clear_inferiors): Move lower in the file. Clear the DLL
12915 list.
12916 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12917 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12918 (xml_escape_text): New.
12919 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12920 for qSupported.
12921 (handle_v_cont): Report errors.
12922 (gdbserver_version): Update.
12923 (main): Correct size of own_buf. Do not report initial DLL events.
12924 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12925 (unloaded_dll, xml_escape_text): New.
12926 * win32-low.c (enum target_waitkind): Update comments.
12927 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12928 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12929 (win32_EnumProcessModules, win32_GetModuleInformation)
12930 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12931 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12932 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12933 (win32_Module32First, win32_Module32Next, load_toolhelp)
12934 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12935 (get_child_debug_event): Handle DLL events.
12936 (win32_wait): Likewise.
12937
0d37add9
DJ
129382007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12939
12940 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12941 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12942
45e2715e
PA
129432007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12944
12945 * win32-low.c (handle_output_debug_string): Ignore event if not
12946 waiting.
12947
c5674cf1
PA
129482007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12949
12950 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12951
2bbe3cc1
DJ
129522007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12953
12954 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12955
ae13219e
DJ
129562007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12957
12958 * inferiors.c (change_inferior_id): Add comment.
12959 * linux-low.c (check_removed_breakpoint): Add an early
12960 prototype. Improve debug output.
12961 (linux_attach): Doc update.
12962 (linux_detach_one_process, linux_detach): Clean up before releasing
12963 each process.
12964 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12965 * linux-low.h (struct process_info): Doc improvement.
12966 * mem-break.c (delete_all_breakpoints): New.
12967 * mem-break.h (delete_all_breakpoints): New prototype.
12968 * thread-db.c (find_first_thread): New.
12969 (thread_db_create_event): Call it instead of
12970 thread_db_find_new_threads. Clean up unused variables.
12971 (maybe_attach_thread): Remove first thread handling.
12972 (thread_db_find_new_threads): Use find_first_thread.
12973 (thread_db_get_tls_address): Likewise.
12974
4105de34
DJ
129752007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12976
12977 * thread-db.c (thread_db_find_new_threads): Add prototype.
12978 (thread_db_create_event): Check for the main thread before adding
12979 a new thread.
12980 (maybe_attach_thread): Only enable event reporting if TID == 0.
12981 (thread_db_get_tls_address): Check for new threads.
12982
2b876972
DJ
129832007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
12984
12985 * linux-low.c (linux_create_inferior): Try execv before execvp.
12986 * spu-low.c (spu_create_inferior): Likewise.
12987
7a245884
DJ
129882007-06-13 Mike Frysinger <vapier@gentoo.org>
12989
12990 * linux-low.c (linux_create_inferior): Change execv to execvp.
12991 * spu-low.c (spu_create_inferior): Likewies.
12992
117ce543
DJ
129932007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
12994
12995 * Makefile.in (clean): Clean new files instead of deleted ones.
12996 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12997 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12998 rules.
12999 * configure.srv: Specify XML files and new regformats for MIPS and
13000 MIPS64 GNU/Linux.
13001 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13002 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13003 an entry for the restart register.
13004 (mips_cannot_fetch_register, mips_cannot_store_register)
13005 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13006 register names to match the XML descriptions.
13007 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13008 restart register instead of $0.
13009
0e7f50da
UW
130102007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13011 Markus Deuling <deuling@de.ibm.com>
13012
13013 * remote-utils.c (decode_xfer_write): New function.
13014 * server.h (decode_xfer_write): Add prototype.
13015 * server.c (handle_query): Add PACKET_LEN argument. Support
13016 qXfer:spu:read and qXfer:spu:write packets.
13017 (main): Pass packet_len to handle_query.
13018 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13019 * target.h (target_ops): Add qxfer_spu.
13020
374c1d38
UW
130212007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13022
13023 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13024 accessing non-seekable spufs files.
13025
bb63802a
UW
130262007-05-16 Markus Deuling <deuling@de.ibm.com>
13027
889bf7c5 13028 * server.c (handle_query): Add reply for qC packet.
bb63802a 13029
7390519e
PA
130302007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13031 Leo Zayas <lerele@champenstudios@com>
13032
13033 * server.h (check_remote_input_interrupt_request): New function.
13034 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13035 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13036 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13037 (check_remote_input_interrupt_request): New function.
13038 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13039 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13040 winapi_GenerateConsoleCtrlEvent): New typedefs.
13041 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13042 to 250 ms.
13043 (win32_wait): Check for remote interrupt request
13044 with check_remote_input_interrupt_request.
13045 (win32_request_interrupt): New function.
13046 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13047
34b34921
PA
130482007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13049
13050 * win32-low.c (debug_registers_changed,
13051 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13052 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13053 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13054 (thread_rec): Get context using the low target.
13055 (child_add_thread): Call thread_added on the low target,
13056 which does the same thing.
13057 (regptr): Delete.
13058 (do_initial_child_stuff): Remove debug registers references.
13059 Set context using the low target. Resume threads after
13060 setting the contexts.
13061 (child_continue): Remove dead variable. Remove debug
13062 registers references.
13063 (child_fetch_inferior_registers): Go through the low target.
13064 (do_child_store_inferior_registers): Remove.
13065 (child_store_inferior_registers): Go through the low target.
13066 (win32_resume): Remove debug registers references.
13067 Set context using the low target.
13068 (handle_exception): Change return type to void. Don't record
13069 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13070 first chance exception.
889bf7c5 13071 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13072 goto loop. Always return after waiting for debug event.
13073 (win32_wait): Convert to switch statement. Handle spurious
13074 events.
13075
13076 * win32-i386-low.c (debug_registers_changed,
13077 debug_registers_used): New.
13078 (initial_stuff): Rename to ...
13079 (i386_initial_stuff): ... this. Clear debug registers
13080 state variables.
13081 (store_debug_registers): Delete.
13082 (i386_get_thread_context): New.
13083 (load_debug_registers): Delete.
13084 (i386_set_thread_context): New.
13085 (i386_thread_added): New.
13086 (single_step): Rename to ...
13087 (i386_single_step): ... this.
13088 (do_fetch_inferior_registers): Rename to ...
13089 (i386_fetch_inferior_register): ... this.
13090 (i386_store_inferior_register): New.
13091 (the_low_target): Adapt to new interface.
13092
13093 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13094 (arm_get_thread_context): New.
13095 (arm_set_thread_context): New.
13096 (regptr): New.
13097 (do_fetch_inferior_registers): Rename to ...
13098 (arm_fetch_inferior_register): ... this.
13099 (arm_store_inferior_register): New.
13100 (arm_wince_breakpoint): Reimplement as unsigned long.
13101 (arm_wince_breakpoint_len): Define.
13102 (the_low_target): Adapt to new interface.
13103
13104 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13105 load_debug_registers. Add get_thread_context, set_thread_context,
13106 thread_added and store_inferior_register. Rename
13107 fetch_inferior_registers to fetch_inferior_register.
13108 (regptr): Remove declaration.
13109
dd6953e1
PA
131102007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13111
13112 * linux-low.c (linux_detach): Change return type to int. Return 0.
13113 * spu-low.c (spu_detach): Likewise.
13114
444d6139
PA
131152007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13116
13117 * target.h (target_ops): Change return type of detach to int.
13118 Add join.
13119 (join_inferior): New.
13120 * server.c (main): Don't skip detach support on mingw32.
13121 If the inferior doesn't support detaching return error.
13122 Call join_inferior instead of using waitpid.
13123 * linux-low.c (linux_join): New.
13124 (linux_target_op): Add linux_join.
13125 * spu-low.c (spu_join): New.
13126 (spu_target_ops): Add spu_join.
13127 * win32-low.c (win32_detach): Adapt to new interface.
13128 Reopen current_process_handle before detaching. Issue a child
13129 resume before detaching.
13130 (win32_join): New.
13131 (win32_target_op): Add win32_join.
13132
1d5315fe
PA
131332007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13134
13135 * win32-low.c (win32-attach): Fix return value.
13136 * target.h (target_ops): Describe ATTACH return values.
13137
bf914831
PA
131382007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13139
13140 * win32-low.c (GETPROCADDRESS): Define.
13141 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13142 (winapi_DebugSetProcessKillOnExit): Likewise.
13143 (win32_create_inferior): Force usage of ansi CreateProcessA.
13144 (win32_attach): Use GETPROCADDRESS.
13145 (win32_detach): Likewise.
13146
f72f3e60
PA
131472007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13148
13149 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13150
ed50f18f
PA
131512007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13152
13153 * win32-low.c: Commit leftover changes from 2007-03-29.
13154
0c2ead7e
DJ
131552007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13156
13157 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13158 fields short instead of int. Add explicit padding.
13159 (i387_cache_to_fsave): Remove unnecessary casts.
13160 (i387_fsave_to_cache): Doc fix.
13161 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13162
73725ff3
DJ
131632007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13164
13165 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13166 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13167
d99f33d8
PA
131682007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13169
13170 * configure.srv (arm*-*-mingw32ce*): Move near the other
13171 arm targets.
13172
68070c10
PA
131732007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13174
2482afc6 13175 * configure.ac: Add errno checking.
68070c10
PA
13176 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13177 sys/file.h and malloc.h.
13178 (AC_CHECK_DECLS): Add perror.
13179 (srv_mingwce): Handle.
2482afc6 13180 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
13181 win32-i386-low.o to srv_tgtobj.
13182 (i[34567]86-*-mingw*): Likewise.
13183 (arm*-*-mingw32ce*): Add case.
13184 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13185 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13186 [__MINGW32CE__] (strerror): New function.
13187 [__MINGW32CE__] (errno): Define to GetLastError.
13188 [__MINGW32CE__] (COUNTOF): New macro.
13189 (remote_open): Remove extra close call.
13190 * mem-break.c (delete_breakpoint_at): New function.
13191 * mem-break.h (delete_breakpoint_at): Declare.
13192 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13193 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13194 [USE_WIN32API] (read, write): Add char* casts.
13195 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13196 * server.h: Include wincecompat.h on Windows CE.
13197 [HAVE_ERRNO_H]: Check.
13198 (perror): Declare if not declared.
13199 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13200 (perror_with_name): Remove errno declaration.
13201 * wincecompat.h: New.
13202 * wincecompat.c: New.
13203 * win32-low.h: New.
13204 * win32-arm-low.c: New.
13205 * win32-i386-low.c: New.
13206 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13207 (OUTMSG2): Make it safe.
13208 (_T): New macro.
13209 (COUNTOF): New macro.
13210 (NUM_REGS): Get it from the low target.
13211 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13212 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13213 (thread_rec): Let low target handle debug registers.
13214 (child_add_thread): Likewise.
13215 (child_init_thread_list): Likewise.
13216 (continue_one_thread): Likewise.
13217 (regptr): New.
13218 (do_child_fetch_inferior_registers): Move to ...
13219 * win32-i386-low.c: ... here, and rename to ...
13220 (do_fetch_inferior_registers): ... this.
889bf7c5 13221 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
13222 Go through the low target.
13223 (do_child_store_inferior_registers): Use regptr.
13224 (strwinerror): New function.
13225 (win32_create_inferior): Handle Windows CE.
13226 Use strwinerror instead of strerror on Windows error
13227 codes. Add program to the error output.
13228 Don't close the main thread handle on Windows CE.
13229 (win32_attach): Use coredll.dll on Windows CE.
13230 (win32_kill): Close current process and current
13231 thread handles.
13232 (win32_detach): Use coredll.dll on Windows CE.
13233 (win32_resume): Let low target handle debug registers, and
13234 step request.
13235 (handle_exception): Add/Remove initial breakpoint. Avoid
13236 non-existant WSTOPSIG on Windows CE.
13237 (win32_read_inferior_memory): Cast to remove warning.
13238 (win32_arch_string): Go through the low target.
13239 (initialize_low): Call set_breakpoint_data with the low
13240 target's breakpoint.
13241 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13242 FOP_REGNUM, mappings): Move to ...
13243 * win32-i386-low.c: ... here.
13244 * win32-low.c (win32_thread_info): Move to ...
13245 * win32-low.h: ... here.
13246 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13247 win32-arm-low.c and wincecompat.c.
13248 (all:): Add $EXEEXT.
13249 (install-only:): Likewise.
13250 (gdbserver:): Likewise.
13251 (gdbreplay:): Likewise.
13252 * config.in: Regenerate.
13253 * configure: Regenerate.
13254
41093d81
PA
132552007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13256
13257 * win32-low.c: Rename typedef thread_info to
13258 win32_thread_info throughout.
13259
544afa54
PA
132602007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13261
13262 * win32-i386-low.c: Rename to ...
13263 * win32-low.c: ... this.
13264 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13265 * Makefile.in: Likewise.
13266
bce7165d
PA
132672007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13268
13269 * remote-utils.c (monitor_output): Constify msg parameter.
13270 * server.h (monitor_output): Likewise.
13271 * win32-i386-low.c (handle_output_debug_string): New.
13272 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13273 handle_output_debug_string.
13274 (get_child_debug_event): Likewise.
13275
506c7aa0
DJ
132762007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13277
13278 * server.c (main): Correct strtoul check.
13279
42c81e2a
DJ
132802007-03-27 Jon Ringle <jon@ringle.org>
13281
13282 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13283
9453113a
DJ
132842007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13285
13286 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13287
64a69107
DJ
132882007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13289
13290 * terminal.h: Check HAVE_SGTTY_H.
13291
132922007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
13293
13294 * remote-utils.c (remote_open): Print out the assigned port number.
13295
c74d0ad8
DJ
132962007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13297
13298 * remote-utils.c (monitor_output): New function.
13299 * server.c (debug_threads): Define here.
13300 (monitor_show_help): New function.
13301 (handle_query): Handle qRcmd.
13302 (main): Do not handle 'd' packet.
13303 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13304 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13305 of debug_threads.
13306
de7c3b4a
PA
133072007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13308
13309 * Makefile.in (EXEEXT): New.
13310 (clean): Use $(EXEEXT).
13311
ef57601b
PA
133122007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13313
13314 * target.h (target_ops): Rename send_signal to request_interrupt,
13315 and remove enum target_signal parameter.
13316 * linux-low.c (linux_request_interrupt): Rename from
13317 linux_send_signal, and always send SIGINT.
13318 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13319 and always send SIGINT.
13320 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13321 of send_signal.
13322 (input_interrupt): Likewise.
13323
820f2bda
PA
133242007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13325
13326 * server.c (get_features_xml): Check if target implemented
13327 arch_string.
13328 * win32-i386-low.c (win32_arch_string): New.
13329 (win32_target_ops): Add win32_arch_string as arch_string member.
13330
ab39bf24
UW
133312007-02-22 Markus Deuling <deuling@de.ibm.com>
13332
13333 * spu-low.c (spu_arch_string): New.
13334 (spu_target_ops): Add spu_arch_string.
13335
61ff6e04
DJ
133362007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13337
13338 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13339 * configure.ac: Do not check for terminal.h.
13340 * configure, config.in: Regenerated.
13341
fb1e4ffc
DJ
133422007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13343
13344 * Makefile.in (OBS): Add $(XML_BUILTIN).
13345 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13346 (clean): Update.
13347 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13348 (arm-with-iwmmxt.c): New.
13349 * config.in, configure: Regenerate.
13350 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13351 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13352 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13353 (arm*-*-linux*): Add iWMMXt and regset support.
13354 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13355 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13356 (arm_store_wmmxregset, target_regsets): New.
13357 * server.c (get_features_xml): Take annex argument. Check builtin
13358 XML documents.
13359 (handle_query): Handle multiple annexes.
13360
0f48aa01
DJ
133612007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13362
13363 * remote-utils.c [USE_WIN32API] (read, write): Define.
13364 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13365 write.
13366
23181151
DJ
133672007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13368
13369 * linux-i386-low.c (the_low_target): Set arch_string.
13370 * linux-x86-64-low.c (the_low_target): Likewise.
13371 * linux-low.c (linux_arch_string): New.
13372 (linux_target_ops): Add it.
13373 * linux-low.h (struct linux_target_ops): Add arch_string.
13374 * server.c (write_qxfer_response): Use const void * for DATA.
13375 (get_features_xml): New.
13376 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13377 * target.h (struct target_ops): Add arch_string method.
13378
9d606399
DJ
133792007-01-03 Denis Pilat <denis.pilat@st.com>
13380 Daniel Jacobowitz <dan@codesourcery.com>
13381
13382 * linux-low.c (linux_kill): Handle being called with no threads.
13383 * win32-i386-low.c (win32_kill): Likewise.
13384 (get_child_debug_event): Clear current_process_handle.
13385
133862006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
13387 Daniel Jacobowitz <dan@codesourcery.com>
13388
13389 * remote-utils.c (remote_open): Check the type of specified
13390 serial port devices before opening them.
13391 * server.c (main): Kill the inferior if an error occurs during
13392 the first remote_open.
13393
a5e13d24
DJ
133942006-12-05 Markus Deuling <deuling@de.ibm.com>
13395
13396 * README: Update supported targets.
13397
186947f7
DJ
133982006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13399
13400 * Makefile.in (clean): Remove reg-mips64.c.
13401 (reg-mips64.c, reg-mips64.o): New rules.
13402 * configure.srv: Handle mips64. Include regset support for mips.
13403 * linux-mips-low.c (union mips_register): New.
13404 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13405 (mips_breakpoint, mips_breakpoint_at): Use int.
13406 (mips_collect_register, mips_supply_register)
13407 (mips_collect_register_32bit, mips_supply_register_32bit)
13408 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13409 (mips_store_fpregset, target_regsets): New.
13410 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13411
a13e2c95
UW
134122006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13413
13414 * configure.srv: Add target "spu*-*-*".
13415 * Makefile.in (clean): Remove reg-spu.c.
13416 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13417 * spu-low.c: New file.
13418
cb7283db
DJ
134192006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13420
13421 * configure.ac: Correct td_thr_tls_get_addr test.
13422 * configure: Regenerated.
13423
89be2091
DJ
134242006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13425
13426 * linux-low.c (linux_wait_for_event): Reformat. Use the
13427 pass_signals array.
13428 * remote-utils.c (decode_address_to_semicolon): New.
13429 * server.c (pass_signals, handle_general_set): New.
13430 (handle_query): Mention QPassSignals for qSupported.
13431 (main): Call handle_general_set.
13432 * server.h (pass_signals, decode_address_to_semicolon): New.
13433
000ef4f0
DJ
134342006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13435
13436 * server.c (handle_query): Correct error handling for read_auxv.
13437
b7149293
UW
134382005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13439
13440 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13441 and srv_linux_thread_db to yes.
13442 * linux-s390-low.c (s390_fill_gregset): New function.
13443 (target_regsets): Define data structure.
13444
dae5f5cf
DJ
134452006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13446
13447 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13448 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13449 * config.in, configure: Regenerated.
13450 * inferiors.c (gdb_id_to_thread): New function.
13451 (gdb_id_to_thread_id): Use it.
13452 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13453 * linux-low.h (struct process_info): Add th member.
13454 (thread_db_get_tls_address): New prototype.
13455 * remote-utils.c (decode_address): Make non-static.
13456 * server.c (handle_query): Handle qGetTLSAddr.
13457 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13458 * target.h (struct target_ops): Add get_tls_address.
13459 * thread-db.c (maybe_attach_thread): Save the thread handle.
13460 (thread_db_get_tls_address): New.
13461
32ca6d61
DJ
134622006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13463
13464 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13465 (linux_resume_one_process): Take a siginfo_t *. Update all
13466 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13467 (struct pending_signals): Add a siginfo_t.
13468 (linux_wait_for_process): Always set last_status.
13469 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13470 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13471 * linux-low.h (struct process_info): Add last_status.
13472
5ffff7c1
DJ
134732006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13474
13475 * remote-utils.c (try_rle): New function.
13476 (putpkt_binary): Use it.
13477
8695c747
DJ
134782006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13479
13480 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13481 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13482 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13483 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13484 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13485 point registers.
13486
290fadea
RS
134872006-08-08 Richard Sandiford <richard@codesourcery.com>
13488
13489 * server.c (terminal_fd): New variable.
13490 (old_foreground_pgrp): Likewise.
13491 (restore_old_foreground_pgrp): New function.
13492 (start_inferior): Record the terminal file descriptor in terminal_fd
13493 and its original foreground group in old_foreground_pgrp. Register
13494 restore_old_foreground_pgrp with atexit().
13495
9f2e1e63
DJ
134962006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13497
13498 * server.c (handle_query): Correct qPart to qXfer.
13499
b80864fb
DJ
135002006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13501
13502 * configure.ac: Check for more headers which are missing on
13503 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13504 * configure.srv: Add Cygwin and mingw32.
13505 * remote-utils.c: Don't include headers unconditionally which
13506 are missing on mingw32. Include <winsock.h> for mingw32.
13507 (remote_open): Adjust for mingw32 support. Flush
13508 standard error after writing to it.
13509 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13510 (unblock_async_io, enable_async_io, disable_async_io)
13511 (readchar, getpkt): Update for Winsock support.
13512 (prepare_resume_reply): Expect a protocol signal number.
13513 * server.c: Disable <sys/wait.h> on mingw32.
13514 (start_inferior): Adjust for mingw32 support. Flush
13515 standard error after writing to it.
13516 (attach_inferior): Likewise. Use protocol signal
13517 numbers.
13518 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13519 and names.
13520 * win32-i386-low.c: New file.
13521 * Makefile.in (XM_CLIBS): Set.
13522 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13523 (win32-i386-low.o): New dependency rule.
13524 * linux-low.c (linux_wait): Use target signal numbers.
13525 * target.h (struct target_ops): Doc fix.
13526 * server.h (target_signal_to_name): New prototype.
13527 * gdbreplay.c: Don't include headers unconditionally which
13528 are missing on mingw32. Include <winsock.h> for mingw32.
13529 (remote_close, remote_open): Adjust for Winsock support.
13530 * configure, config.in: Regenerated.
13531
0876f84a
DJ
135322006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13533
13534 * server.c (decode_xfer_read, write_qxfer_response): New.
13535 (handle_query): Take a packet length argument. Handle
13536 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13537 the qSupported response.
13538 (main): Update call to handle_query.
13539
01f9e8fa
DJ
135402006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13541
13542 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13543 (putpkt_binary): Renamed from putpkt and adjusted for binary
13544 data.
13545 (putpkt): New wrapper for putpkt_binary.
13546 (readchar): Don't mask off the high bit.
13547 (decode_X_packet): New function.
13548 * server.c (main): Call putpkt_binary if a handler sets the packet
13549 length. Save the length of the incoming packet. Handle 'X'.
13550 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13551
be2a5f71
DJ
135522006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13553
13554 * server.c (handle_query): Handle qSupported.
13555
ea025f5f
DJ
135562006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13557
13558 * remote-utils.c (all_symbols_looked_up): New variable.
13559 (look_up_one_symbol): Check it.
13560 * server.h (look_up_one_symbol): New declaration.
13561 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13562
9308fc88
DJ
135632006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13564
13565 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 13566 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
13567 (PTRACE_GET_THREAD_AREA): Define.
13568 (ps_get_thread_area): New function.
13569
52fb6437
NS
135702006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13571
13572 * configure.srv (m68k*-*-uclinux*): New target.
13573 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13574 (linux_resume_one_process): Remove extraneous cast.
13575 (linux_read_offsets): New.
13576 (linux_target_op): Add linux_read_offsets on mmuless systems.
13577 * server.c (handle_query): Add qOffsets logic.
13578 * target.h (struct target_ops): Add read_offsets.
13579
21b0f40c
DJ
135802006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13581
13582 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13583 (PTRACE_GET_THREAD_AREA): Define.
13584 (ps_get_thread_area): New function.
13585 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13586 (linux-x86-64-low.o): Update.
13587
0050a760
DJ
135882006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13589
13590 * configure.ac: Remove checks for prfpregset_t.
13591 * gdb_proc_service.h: New file.
13592 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13593 new "gdb_proc_service.h".
13594 * proc-service.c: Likewise.
13595 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13596 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13597 * Makefile.in (gdb_proc_service_h): Updated.
13598 * configure, config.in: Regenerated.
13599
b92a518e
DJ
136002006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13601
13602 * remote-utils.c (prepare_resume_reply): Move declaration
13603 of gdb_id_from_wait to the top of the block.
13604
545587ee
DJ
136052006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13606
13607 * linux-low.c (regsets_store_inferior_registers): Read the regset
13608 from the target before filling it.
13609
9db87ebd
DJ
136102006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13611
13612 * server.c (attach_inferior): Return SIGTRAP for a successful
13613 attach.
13614
dd24457d
DJ
136152006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13616
13617 * Makefile.in (OBS): Add version.o.
13618 (STAGESTUFF): Delete.
13619 (version.o): Add dependencies.
13620 (version.c): Replace rule.
13621 (clean): Remove version.c.
13622 * server.c (gdbserver_version): New.
13623 (gdbserver_usage): Use printf.
13624 (main): Handle --version and --help.
13625 * server.h (version, host_name): Add declarations.
13626
6f0f660e
EZ
136272005-12-23 Eli Zaretskii <eliz@gnu.org>
13628
889bf7c5
PA
13629 * linux-arm-low.c:
13630 * linux-arm-low.c:
13631 * inferiors.c:
13632 * i387-fp.h:
13633 * i387-fp.c:
13634 * gdbreplay.c:
13635 * regcache.c:
13636 * proc-service.c:
13637 * mem-break.h:
13638 * mem-break.c:
13639 * linux-x86-64-low.c:
13640 * linux-sh-low.c:
13641 * linux-s390-low.c:
13642 * linux-ppc64-low.c:
13643 * linux-ppc-low.c:
13644 * linux-mips-low.c:
13645 * linux-m68k-low.c:
13646 * linux-m32r-low.c:
13647 * linux-low.h:
13648 * linux-low.c:
13649 * linux-ia64-low.c:
13650 * linux-i386-low.c:
13651 * linux-crisv32-low.c:
13652 * thread-db.c:
13653 * terminal.h:
13654 * target.h:
13655 * target.c:
13656 * server.h:
13657 * server.c:
13658 * remote-utils.c:
13659 * regcache.h:
13660 * utils.c:
13661 * Makefile.in:
13662 * configure.ac:
6f0f660e
EZ
13663 * gdbserver.1: Add (C) after Copyright. Update the FSF
13664 address.
13665
9d1fb177
DJ
136662005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13667
13668 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13669 (arm_breakpoint_at): Recognize both breakpoints.
13670 (the_low_target): Use the correct breakpoint instruction.
13671
011a70c2
DJ
136722005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13673
13674 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13675 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13676 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13677 (the_low_target): Update.
13678
7fb85e41
AS
136792005-10-25 Andreas Schwab <schwab@suse.de>
13680
13681 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13682
13683 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13684 (ia64_num_regs): Reduce to 462.
13685
3db0444b
DJ
136862005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13687
13688 * acinclude.m4: Correct quoting.
13689 * aclocal.m4: Regenerated.
13690
13691 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13692 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13693 (thread_db_init): Call thread_db_err_str.
13694 * configure.ac: Check for TD_VERSION.
13695 * config.in, configure: Regenerated.
13696
bee0189a
DJ
136972005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13698
13699 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13700
e9d25b98
DJ
137012005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13702
13703 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13704 is not available. Define HAVE_PTRACE_GETREGS if it is.
13705 * config.in, configure: Regenerated.
13706 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13707 * linux-i386-low.c, linux-m68k-low.c: Update to use
13708 HAVE_PTRACE_GETREGS.
13709 * linux-low.c (regsets_fetch_inferior_registers)
13710 (regsets_store_inferior_registers): Only return 0 if we processed
13711 GENERAL_REGS.
13712 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13713 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13714
a06660f7
DJ
137152005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13716
13717 * inferiors.c (struct thread_info): Add gdb_id.
13718 (add_thread): Add gdb_id argument.
13719 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13720 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13721 calls to add_thread.
13722 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13723 * server.c (handle_query): Use thread_to_gdb_id.
13724 (handle_v_cont, main): Use gdb_id_to_thread_id.
13725 * server.h (add_thread): Update prototype.
13726 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13727 prototypes.
13728
5a1f5858
DJ
137292005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13730
13731 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13732 left-padded registers.
13733 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13734 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13735
e122f1f5
SE
137362005-07-01 Steve Ellcey <sje@cup.hp.com>
13737
13738 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13739 * configure: Regenerate.
13740 * config.in: Regenerate.
13741 * server.h (NEED_DECLARATION_STRERROR):
13742 Replace with !HAVE_DECL_STRERROR.
13743
d592fa2f
DJ
137442005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13745
13746 * linux-low.c (linux_wait, linux_send_signal): Don't test
13747 an unsigned long variable for > 0 if it could be MAX_ULONG.
13748 * server.c (myresume): Likewise.
13749 * target.c (set_desired_inferior): Likewise.
13750
ccbd4912
MK
137512005-06-13 Mark Kettenis <kettenis@gnu.org>
13752
13753 * configure.ac: Simplify and improve check for socklen_t.
13754 * configure, config.in: Regenerate.
13755
f450004a
DJ
137562005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13757
13758 * acconfig.h: Remove.
13759 * configure.ac: Add a test for socklen_t. Use three-argument
13760 AC_DEFINE throughout.
13761 * config.in: Regenerated using autoheader 2.59.
13762 * configure: Regenerated.
13763
13764 * gdbreplay.c (socklen_t): Provide a default.
13765 (remote_open): Use socklen_t.
13766 * remote-utils.c (socklen_t): Provide a default.
13767 (remote_open): Use socklen_t.
13768 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13769 unsigned char.
13770
13771 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13772 char for buffers.
13773 * linux-low.c (linux_read_memory, linux_write_memory)
13774 (linux_read_auxv): Likewise.
13775 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13776 (check_mem_write): Likewise.
13777 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13778 Likewise.
13779 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13780 (registers_from_string, register_data): Likewise.
13781 * server.c (handle_query, main): Likewise.
13782 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13783 (decode_M_packet): Likewise.
13784 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13785 * target.h (struct target_ops): Update read_memory, write_memory,
13786 and read_auxv.
13787 (read_inferior_memory, write_inferior_memory): Update.
13788 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13789 to unsigned char *.
13790 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13791 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13792 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13793 linux-s390-low.c, linux-sh-low.c: Update for changes in
13794 read_inferior_memory and the_low_target->breakpoint.
13795
eee84df1
DJ
137962005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13797
13798 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13799 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13800 * configure.srv: Add powerpc64-*-linux*.
13801 * linux-ppc64-low.c: New file.
13802
45b134e5
OF
138032005-05-23 Orjan Friberg <orjanf@axis.com>
13804
13805 * linux-cris-low.c: New file with support for CRIS.
13806 * linux-crisv32-low.c: Ditto for CRISv32.
13807 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13808 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 13809 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
13810 reg-crisv32.o, and reg-crisv32.c to make rules.
13811 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13812 recognized targets.
13813
48d93c75
UW
138142005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13815
13816 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13817 of sizeof (PTRACE_XFER_TYPE).
13818 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13819
e013ee27
OF
138202005-05-12 Orjan Friberg <orjanf@axis.com>
13821
889bf7c5 13822 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
13823 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13824 pointers for hardware watchpoint support.
13825 * linux-low.h (struct linux_target_ops): Ditto.
13826 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13827 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13828 to linux_target_ops.
13829 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13830 reply packet.
13831 * server.c (main): Recognize 'Z' and 'z' packets.
13832
b0ded00b
UW
138332005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13834
13835 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13836 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13837 (the_low_target): Add new members.
13838
8643e2ad
DJ
138392005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13840
13841 * proc-service.c (ps_lgetregs): Search all_processes instead of
13842 all_threads.
13843
fc620387
DJ
138442005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13845
13846 * server.c (start_inferior): Change return type to int.
13847 (attach_inferior): Change sigptr to int *.
13848 (handle_v_cont, handle_v_requests): Change signal to int *.
13849 (main): Change signal to int.
13850
138512005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
13852
13853 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13854 * configure.srv: Add m32r*-*-linux*.
13855 * linux-m32r-low.c: New file.
13856
e0e76420
DJ
138572005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13858
13859 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13860
a1928bad
DJ
138612005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13862
13863 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13864 Take unsigned long arguments for PIDs.
13865 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13866 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13867 (wait_for_sigstop, linux_resume_one_process)
13868 (regsets_fetch_inferior_registers, linux_send_signal)
13869 (linux_read_auxv): Likewise. Update the types of variables holding
13870 PIDs. Update format string specifiers.
13871 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13872 * remote-utils.c (prepare_resume_reply): Likewise.
13873 * server.c (cont_thread, general_thread, step_thread)
13874 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13875 unsigned long.
13876 (handle_query): Update format specifiers.
13877 (handle_v_cont, main): Use strtoul for thread IDs.
13878 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13879 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13880 (general_thread, step_thread, thread_from_wait)
13881 (old_thread_from_wait): Update.
13882 * target.h (struct thread_resume): Use unsigned long for THREAD.
13883 (struct target_ops): Use unsigned long for arguments to attach and
13884 thread_alive.
13885
dcdb98d2
DJ
138862005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13887
13888 * acinclude.m4: Include bfd/bfd.m4 directly.
13889 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13890 <agriffis@toolchain.org>.
13891 * aclocal.m4, configure: Regenerated.
13892
bec39cab
AC
138932005-01-07 Andrew Cagney <cagney@gnu.org>
13894
13895 * configure.ac: Rename configure.in, require autoconf 2.59.
13896 * configure: Re-generate.
13897
434c4c77
DJ
138982004-12-08 Daniel Jacobowitz <dan@debian.org>
13899
13900 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13901 LIBS when finished.
13902 * aclocal.m4: Regenerated.
13903 * configure: Regenerated.
13904
db1d3e1b
AS
139052004-11-21 Andreas Schwab <schwab@suse.de>
13906
13907 * linux-m68k-low.c (m68k_num_gregs): Define.
13908 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13909 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13910 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13911 (m68k_breakpoint_at): New. Add to the_low_target.
13912
13913 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13914 srv_linux_thread_db to yes.
13915
43360365
JB
139162004-10-20 Joel Brobecker <brobecker@gnat.com>
13917
13918 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13919 (ARCH_SET_FS): Likewise.
13920 (ARCH_GET_FS): Likewise.
13921 (ARCH_GET_GS): Likewise.
13922
fd500816
DJ
139232004-10-16 Daniel Jacobowitz <dan@debian.org>
13924
13925 * linux-i386-low.c (ps_get_thread_area): New.
13926 * linux-x86-64-low.c (ps_get_thread_area): New.
13927 * linux-low.c: Include <sys/syscall.h>.
13928 (linux_kill_one_process): Don't kill the first thread here.
13929 (linux_kill): Kill the first thread here.
13930 (kill_lwp): New function.
13931 (send_sigstop, linux_send_signal): Use it.
13932 * proc-service.c: Clean up #ifdefs.
13933 (fpregset_info): Delete.
13934 (ps_lgetregs): Update and enable implementation.
13935 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13936 implementations.
13937 * remote-utils.c (struct sym_cache, symbol_cache): New.
13938 (input_interrupt): Print a clearer message.
13939 (async_io_enabled): New variable.
13940 (enable_async_io, disable_async_io): Use it. Update comments.
13941 (look_up_one_symbol): Use the symbol cache.
13942 * thread-db.c (thread_db_look_up_symbols): New function.
13943 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13944
f6de3c42
DJ
139452004-10-16 Daniel Jacobowitz <dan@debian.org>
13946
13947 * configure.in: Test for -rdynamic.
13948 * configure: Regenerated.
13949 * Makefile (INTERNAL_LDFLAGS): New.
13950 (gdbserver, gdbreplay): Use it.
13951
2c0fc042
AC
139522004-09-02 Andrew Cagney <cagney@gnu.org>
13953
13954 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13955
075b3282
DJ
139562004-03-23 Daniel Jacobowitz <drow@mvista.com>
13957
13958 * linux-low.c (linux_wait): Clear all_processes list also.
13959
fa6a77dc
DJ
139602004-03-12 Daniel Jacobowitz <drow@mvista.com>
13961
13962 * linux-low.c: Include <errno.h>. Remove extern declaration of
13963 errno.
13964
6d782a97
DJ
139652004-03-12 Daniel Jacobowitz <drow@mvista.com>
13966
13967 * gdbreplay.c, server.h, utils.c: Update copyright years.
13968
3a7fb99b
DJ
139692004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13970
13971 * server.c (main): Print child status or termination signal from
13972 variable 'signal', not 'sig'.
13973
c3e735a6
DJ
139742004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13975
13976 * linux-low.c (linux_read_memory): Change return type to
13977 int. Check for and return error from ptrace().
13978 * target.c (read_inferior_memory): Change return type to int. Pass
13979 back return status from the_target->read_memory().
13980 * target.h (struct target_ops): Adapt *read_memory() prototype.
13981 Update comment.
13982 (read_inferior_memory): Adapt prototype.
13983 * server.c (main): Return an error packet if
13984 read_inferior_memory() returns an error.
13985
a59d1c82
DJ
139862004-03-04 Daniel Jacobowitz <drow@mvista.com>
13987
13988 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13989 Unify with other clean targets.
13990
dc3f8883
DJ
139912004-02-29 Daniel Jacobowitz <drow@mvista.com>
13992
13993 * server.c (handle_v_cont): Call set_desired_inferior.
13994
89a208da
DJ
139952004-02-29 Daniel Jacobowitz <drow@mvista.com>
13996
13997 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13998
62ea82f5
DJ
139992004-02-29 Daniel Jacobowitz <drow@mvista.com>
14000
14001 * linux-low.c (linux_wait): Unblock async I/O.
14002 (linux_resume): Block and enable async I/O.
14003 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14004 * server.h (block_async_io, unblock_async_io): Add prototypes.
14005
6910d122
DJ
140062004-02-29 Daniel Jacobowitz <drow@mvista.com>
14007
14008 * remote-utils.c (remote_open): Print a status notice after
14009 opening a TCP port.
14010 * server.c (attach_inferior): Print a status notice after
14011 attaching.
14012
140132004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14014
14015 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14016
c89dc5d4
DJ
140172004-02-26 Daniel Jacobowitz <drow@mvista.com>
14018
14019 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14020 error packet.
14021 * server.c, target.h: Update copyright years.
14022
4b8dad4a
RM
140232004-02-25 Roland McGrath <roland@redhat.com>
14024
14025 * target.h (struct target_ops): New member `read_auxv'.
14026 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14027 * linux-low.c (linux_read_auxv): New function.
14028 (linux_target_ops): Initialize `read_auxv' member to that.
14029
d7446758
JB
140302004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14031
14032 Committed by Jim Blandy <jimb@redhat.com>.
14033
14034 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14035 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14036 instead of GPR_SIZE to distiguish s390 and s390x targets.
14037
5544ad89
DJ
140382004-01-31 Daniel Jacobowitz <drow@mvista.com>
14039
14040 * linux-low.c: Update copyright year.
14041 (check_removed_breakpoint): Clear pending_is_breakpoint.
14042 (linux_set_resume_request, linux_queue_one_thread)
14043 (resume_status_pending_p): New functions.
14044 (linux_continue_one_thread): Use process->resume.
14045 (linux_resume): Only resume threads if there are no pending events.
14046 * linux-low.h (struct process_info): Add resume request
14047 pointer.
14048
2a68b70e
DJ
140492004-01-30 Daniel Jacobowitz <drow@mvista.com>
14050
14051 * regcache.c (new_register_cache): Clear the allocated register
14052 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14053
64386c31
DJ
140542003-10-13 Daniel Jacobowitz <drow@mvista.com>
14055
14056 * linux-low.c (linux_resume): Take a struct thread_resume *
14057 argument.
14058 (linux_wait): Update call.
14059 (resume_ptr): New static variable.
14060 (linux_continue_one_thread): Renamed from
14061 linux_continue_one_process. Use resume_ptr.
14062 (linux_resume): Use linux_continue_one_thread.
14063 * server.c (handle_v_cont, handle_v_requests): New functions.
14064 (myresume): New function.
14065 (main): Handle 'v' case.
14066 * target.h (struct thread_resume): New type.
14067 (struct target_ops): Change argument of "resume" to struct
14068 thread_resume *.
14069 (myresume): Delete macro.
14070
c938e9b0
L
140712003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14072
14073 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14074 (uninstall): Support DESTDIR.
14075
7f313d07
BC
14076Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14077
14078 * configure.srv: Add xscale*linux copy of arm*linux entry.
14079
3b2fc2ea
DJ
140802003-07-24 Daniel Jacobowitz <drow@mvista.com>
14081
14082 * linux-arm-low.c (arm_reinsert_addr): New function.
14083 (the_low_target): Add arm_reinsert_addr.
14084
1c0a559e
MK
140852003-07-08 Mark Kettenis <kettenis@gnu.org>
14086
14087 * mem-break.c: Remove whitespace at end of file.
14088
43d5792c
DJ
140892003-06-28 Daniel Jacobowitz <drow@mvista.com>
14090
14091 * configure.in: Check whether we need to prototype strerror.
14092 * server.h: Optionally prototype strerror.
14093 * gdbreplay.c (perror_with_name): Use strerror.
14094 * linux-low.c (linux_attach_lwp): Use strerror.
14095 * utils.c (perror_with_name): Use strerror.
14096 * config.in, configure: Regenerated.
14097
c8a86edf
DJ
140982003-06-28 Daniel Jacobowitz <drow@mvista.com>
14099
14100 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14101 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14102
73d37363
DJ
141032003-06-20 Daniel Jacobowitz <drow@mvista.com>
14104
14105 * Makefile.in (SFILES): Update.
14106 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14107 low-sun3.c: Remove files.
14108
6ad8ae5c
DJ
141092003-06-17 Daniel Jacobowitz <drow@mvista.com>
14110
14111 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14112 (linux_detach_one_process, linux_detach): New functions.
14113 (linux_target_ops): Add linux_detach.
14114 * server.c (main): Handle 'D' packet.
14115 * target.h (struct target_ops): Add "detach" member.
14116 (detach_inferior): Define.
14117
1581182a
MK
141182003-06-13 Mark Kettenis <kettenis@gnu.org>
14119
14120 From Kelley Cook <kelleycook@wideopenwest.com>:
14121 * configure.srv: Accept i[34567]86 variants.
14122
e5379b03
DJ
141232003-06-05 Daniel Jacobowitz <drow@mvista.com>
14124
14125 * linux-low.c (linux_wait_for_event): Correct comment typos.
14126 (linux_resume_one_process): Call check_removed_breakpoint.
14127 (linux_send_signal): New function.
14128 (linux_target_ops): Add linux_send_signal.
14129 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14130 of kill.
14131 * target.h (struct target_ops): Add send_signal.
14132
2ff29de4
JB
141332003-05-29 Jim Blandy <jimb@redhat.com>
14134
14135 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14136 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14137 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14138 away part of the register's value.
14139
254787d4
DJ
141402003-03-26 Daniel Jacobowitz <drow@mvista.com>
14141
14142 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14143 (linux_wait_for_event, linux_init_signals): Likewise.
14144
94e10508
DJ
141452003-03-17 Daniel Jacobowitz <drow@mvista.com>
14146
14147 * configure.in: Check for stdlib.h.
14148 * configure: Regenerated.
14149 * config.in: Regenerated.
14150
4c0711e0
DJ
141512003-01-04 Andreas Schwab <schwab@suse.de>
14152
14153 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14154
ef66e766
AC
141552003-01-02 Andrew Cagney <ac131313@redhat.com>
14156
14157 * Makefile.in: Remove obsolete code.
14158
a1358604
DJ
141592002-11-20 Daniel Jacobowitz <drow@mvista.com>
14160
14161 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14162 defined(PT_FPR0_HI).
14163
23ce3b1c
DJ
141642002-11-17 Stuart Hughes <seh@zee2.com>
14165
14166 * linux-arm-low.c (arm_num_regs): Increase.
14167 (arm_regmap): Include status register.
14168
141692002-11-17 Daniel Jacobowitz <drow@mvista.com>
14170
14171 * linux-low.c (register_addr): Remove incorrect -1 check.
14172
a9fa9f7d
DJ
141732002-08-29 Daniel Jacobowitz <drow@mvista.com>
14174
14175 * linux-low.c (linux_create_inferior): Call setpgid. Return
14176 the new PID.
14177 (unstopped_p, linux_signal_pid): Remove.
14178 (linux_target_ops): Remove linux_signal_pid.
14179 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14180 global instead of target method.
14181 * target.h (struct target_ops): Remove signal_pid. Update comment
14182 for create_inferior.
14183 * server.c (signal_pid): New variable.
14184 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 14185 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
14186 (attach_inferior): Set signal_pid.
14187
17574093
DJ
141882002-08-23 Daniel Jacobowitz <drow@mvista.com>
14189
14190 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14191
141922002-08-20 Jim Blandy <jimb@redhat.com>
14193
14194 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14195 default for this.
14196
141972002-08-01 Andrew Cagney <cagney@redhat.com>
14198
14199 * Makefile.in: Make chill references obsolete.
14200
142012002-07-24 Kevin Buettner <kevinb@redhat.com>
14202
14203 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14204 * configure: Regenerate.
14205 * config.in: Regenerate.
14206
142072002-07-09 David O'Brien <obrien@FreeBSD.org>
14208
14209 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14210 (perror_with_name, remote_close, remote_open, expect, play): Static.
14211
142122002-07-04 Michal Ludvig <mludvig@suse.cz>
14213
4b8dad4a 14214 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
14215 byte offsets instead of an array of indexes.
14216 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14217
142182002-06-13 Daniel Jacobowitz <drow@mvista.com>
14219
14220 * regcache.c: Add comment.
14221
142222002-06-11 Daniel Jacobowitz <drow@mvista.com>
14223
14224 * thread-db.c: New file.
14225 * proc-service.c: New file.
14226 * acinclude.m4: New file.
14227 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14228 proc-service.o, and thread-db.o.
14229 (linux-low.o): Add USE_THREAD_DB.
14230 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14231 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14232 * aclocal.m4: Regenerated.
14233 * config.in: Regenerated.
14234 * configure: Regenerated.
14235 * configure.in: Check for proc_service.h, sys/procfs.h,
14236 thread_db.h, and linux/elf.h headrs.
14237 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14238 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14239 Check for -lthread_db and thread support.
14240 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14241 PowerPC, and SuperH.
14242 * i387-fp.c: Constify arguments.
14243 * i387-fp.h: Likewise.
14244 * inferiors.c: (struct thread_info): Renamed from
14245 `struct inferior_info'. Remove PID member. Use generic inferior
14246 list header. All uses updated.
14247 (inferiors, signal_pid): Removed.
14248 (all_threads): New variable.
14249 (get_thread): Define.
14250 (add_inferior_to_list): New function.
14251 (for_each_inferior): New function.
14252 (change_inferior_id): New function.
14253 (add_inferior): Removed.
14254 (remove_inferior): New function.
14255 (add_thread): New function.
14256 (free_one_thread): New function.
14257 (remove_thread): New function.
14258 (clear_inferiors): Use for_each_inferior and free_one_thread.
14259 (find_inferior): New function.
14260 (find_inferior_id): New function.
14261 (inferior_target_data): Update argument type.
14262 (set_inferior_target_data): Likewise.
14263 (inferior_regcache_data): Likewise.
14264 (set_inferior_regcache_data): Likewise.
14265 * linux-low.c (linux_bp_reinsert): Remove.
14266 (all_processes, stopping_threads, using_thrads)
14267 (struct pending_signals, debug_threads, pid_of): New.
14268 (inferior_pid): Replace with macro.
14269 (struct inferior_linux_data): Remove.
14270 (get_stop_pc, add_process): New functions.
14271 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14272 Use add_process and add_thread.
14273 (linux_attach_lwp): New function, based on old linux_attach. Use
14274 add_process and add_thread. Set stop_expected for new threads.
14275 (linux_attach): New function.
14276 (linux_kill_one_process): New function.
14277 (linux_kill): Kill all LWPs.
14278 (linux_thread_alive): Use find_inferior_id.
14279 (check_removed_breakpoints, status_pending_p): New functions.
14280 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14281 Update. Use WNOHANG. Wait for cloned processes also. Update process
14282 struct for the found process.
14283 (linux_wait_for_event): New function.
14284 (linux_wait): Use it. Support LWPs.
14285 (send_sigstop, wait_for_sigstop, stop_all_processes)
14286 (linux_resume_one_process, linux_continue_one_process): New functions.
14287 (linux_resume): Support LWPs.
14288 (REGISTER_RAW_SIZE): Remove.
14289 (fetch_register): Use register_size instead. Call supply_register.
14290 (usr_store_inferior_registers): Likewise. Call collect_register.
14291 Fix recursive case.
14292 (regsets_fetch_inferior_registers): Improve error message.
14293 (regsets_store_inferior_registers): Add debugging.
14294 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14295 (unstopped_p, linux_signal_pid): New functions.
14296 (linux_target_ops): Add linux_signal_pid.
14297 (linux_init_signals): New function.
14298 (initialize_low): Call it. Initialize using_threads.
14299 * regcache.c (inferior_regcache_data): Add valid
14300 flag.
14301 (get_regcache): Fetch registers lazily. Add fetch argument
14302 and update all callers.
14303 (regcache_invalidate_one, regcache_invalidate): New
14304 functions.
14305 (new_register_cache): Renamed from create_register_cache.
14306 Return the new regcache.
14307 (free_register_cache): Change argument to a void *.
14308 (registers_to_string, registers_from_string): Call get_regcache
14309 with fetch flag set.
14310 (register_data): Make static. Pass fetch flag to get_regcache.
14311 (supply_register): Call get_regcache with fetch flag clear.
14312 (collect_register): Call get_regcache with fetch flag set.
14313 (collect_register_as_string): New function.
14314 * regcache.h: Update.
14315 * remote-utils.c (putpkt): Flush after debug output and use
14316 stderr.
14317 Handle input interrupts while waiting for an ACK.
14318 (input_interrupt): Use signal_pid method.
14319 (getpkt): Flush after debug output and use stderr.
14320 (outreg): Use collect_register_as_string.
14321 (new_thread_notify, dead_thread_notify): New functions.
14322 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14323 and general_thread.
14324 (look_up_one_symbol): Flush after debug output.
14325 * server.c (step_thread, server_waiting): New variables.
14326 (start_inferior): Don't use signal_pid. Update call to mywait.
14327 (attach_inferior): Update call to mywait.
14328 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14329 (main): Don't fetch/store registers explicitly. Use
14330 set_desired_inferior. Support proposed ``Hs'' packet. Update
14331 calls to mywait.
14332 * server.h: Update.
14333 (struct inferior_list, struct_inferior_list_entry): New.
14334 * target.c (set_desired_inferior): New.
14335 (write_inferior_memory): Constify.
14336 (mywait): New function.
14337 * target.h: Update.
14338 (struct target_ops): New signal_pid method.
14339 (mywait): Removed macro, added prototype.
14340
14341 * linux-low.h (regset_func): Removed.
14342 (regset_fill_func, regset_store_func): New.
14343 (enum regset_type): New.
14344 (struct regset_info): Add type field. Use new operation types.
14345 (struct linux_target_ops): stop_pc renamed to get_pc.
14346 Add decr_pc_after_break and breakpoint_at.
14347 (get_process, get_thread_proess, get_process_thread)
14348 (strut process_info, all_processes, linux_attach_lwp)
14349 (thread_db_init): New.
14350
14351 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14352 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14353 (the_low_target): Add new members.
14354 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14355 (i386_store_fpxregset): Constify.
14356 (target_regsets): Add new kind identifier.
14357 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14358 (i386_set_pc): Add debugging.
14359 (i386_breakpoint_at): New function.
14360 (the_low_target): Add new members.
14361 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14362 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14363 (mips_breakpoint_at): New.
14364 (the_low_target): Add new members.
14365 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14366 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14367 (the_low_target): Add new members.
14368 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14369 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14370 (the_low_target): Add new members.
14371 * linux-x86-64-low.c (target_regsets): Add new kind
14372 identifier.
14373
143742002-05-15 Daniel Jacobowitz <drow@mvista.com>
14375
14376 From Martin Pool <mbp@samba.org>:
14377 * server.c (gdbserver_usage): New function.
14378 (main): Call it.
14379
143802002-05-14 Daniel Jacobowitz <drow@mvista.com>
14381
14382 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14383 stop_at -> stop_pc.
14384
143852002-05-04 Andrew Cagney <ac131313@redhat.com>
14386
14387 * Makefile.in: Remove obsolete code.
14388
143892002-04-24 Michal Ludvig <mludvig@suse.cz>
14390
14391 * linux-low.c (regsets_fetch_inferior_registers),
14392 (regsets_store_inferior_registers): Removed cast to int from
14393 ptrace() calls.
14394 * regcache.h: Added declaration of struct inferior_info.
14395
143962002-04-20 Daniel Jacobowitz <drow@mvista.com>
14397
14398 * inferiors.c (struct inferior_info): Add regcache_data.
14399 (add_inferior): Call create_register_cache.
14400 (clear_inferiors): Call free_register_cache.
14401 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14402 * regcache.c (struct inferior_regcache_data): New.
14403 (registers): Remove.
14404 (get_regcache): New function.
14405 (create_register_cache, free_register_cache): New functions.
14406 (set_register_cache): Don't initialize the register cache here.
14407 (registers_to_string, registers_from_string, register_data): Call
14408 get_regcache.
14409 * regcache.h: Add prototypes.
14410 * server.h: Likewise.
14411
144122002-04-20 Daniel Jacobowitz <drow@mvista.com>
14413
14414 * mem-break.c: New file.
14415 * mem-break.h: New file.
14416 * Makefile.in: Add mem-break.o rule; update server.h
14417 dependencies.
14418 * inferiors.c (struct inferior_info): Add target_data
14419 member.
14420 (clear_inferiors): Free target_data member if set.
14421 (inferior_target_data, set_inferior_target_data): New functions.
14422 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14423 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14424 * linux-low.c (linux_bp_reinsert): New variable.
14425 (struct inferior_linux_data): New.
14426 (linux_create_inferior): Use set_inferior_target_data.
14427 (linux_attach): Likewise. Call add_inferior.
14428 (linux_wait_for_one_inferior): New function.
14429 (linux_wait): Call it.
14430 (linux_write_memory): Add const.
14431 (initialize_low): Call set_breakpoint_data.
14432 * linux-low.h (struct linux_target_ops): Add breakpoint
14433 handling members.
14434 * server.c (attach_inferior): Remove extra add_inferior
14435 call.
14436 * server.h: Include mem-break.h. Update inferior.c
14437 prototypes.
14438 * target.c (read_inferior_memory)
14439 (write_inferior_memory): New functions.
14440 * target.h (read_inferior_memory)
14441 (write_inferior_memory): Change macros to prototypes.
14442 (struct target_ops): Update comments. Add const to write_memory
14443 definition.
14444
144452002-04-11 Daniel Jacobowitz <drow@mvista.com>
14446
14447 * linux-low.c (usr_store_inferior_registers): Support
14448 registers which are allowed to fail to store.
14449 * linux-low.h (linux_target_ops): Likewise.
14450 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14451 (ppc_cannot_store_register): FPSCR may not be storable.
14452
144532002-04-09 Daniel Jacobowitz <drow@mvista.com>
14454
14455 * server.h: Include <string.h> if HAVE_STRING_H.
14456 * ChangeLog: Correct paths in last ChangeLog entry.
14457
144582002-04-09 Daniel Jacobowitz <drow@mvista.com>
14459
14460 * linux-low.h: Remove obsolete prototypes.
14461 (struct linux_target_ops): New.
14462 (extern the_low_target): New.
14463 * linux-low.c (num_regs, regmap): Remove declarations.
14464 (register_addr): Use the_low_target explicitly.
14465 (fetch_register): Likewise.
14466 (usr_fetch_inferior_registers): Likewise.
14467 (usr_store_inferior_registers): Likewise.
14468 * linux-arm-low.c (num_regs): Remove.
14469 (arm_num_regs): Define.
14470 (arm_regmap): Renamed from regmap, made static.
14471 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14472 made static.
14473 (arm_cannot_store_register): Renamed from cannot_store_register,
14474 made static.
14475 (the_low_target): New.
14476 * linux-i386-low.c (num_regs): Remove.
14477 (i386_num_regs): Define.
14478 (i386_regmap): Renamed from regmap, made static.
14479 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14480 made static.
14481 (i386_cannot_store_register): Renamed from cannot_store_register,
14482 made static.
14483 (the_low_target): New.
14484 * linux-ia64-low.c (num_regs): Remove.
14485 (ia64_num_regs): Define.
14486 (ia64_regmap): Renamed from regmap, made static.
14487 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14488 made static.
14489 (ia64_cannot_store_register): Renamed from cannot_store_register,
14490 made static.
14491 (the_low_target): New.
14492 * linux-m68k-low.c (num_regs): Remove.
14493 (m68k_num_regs): Define.
14494 (m68k_regmap): Renamed from regmap, made static.
14495 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14496 made static.
14497 (m68k_cannot_store_register): Renamed from cannot_store_register,
14498 made static.
14499 (the_low_target): New.
14500 * linux-mips-low.c (num_regs): Remove.
14501 (mips_num_regs): Define.
14502 (mips_regmap): Renamed from regmap, made static.
14503 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14504 made static.
14505 (mips_cannot_store_register): Renamed from cannot_store_register,
14506 made static.
14507 (the_low_target): New.
14508 * linux-ppc-low.c (num_regs): Remove.
14509 (ppc_num_regs): Define.
14510 (ppc_regmap): Renamed from regmap, made static.
14511 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14512 made static.
14513 (ppc_cannot_store_register): Renamed from cannot_store_register,
14514 made static.
14515 (the_low_target): New.
14516 * linux-s390-low.c (num_regs): Remove.
14517 (s390_num_regs): Define.
14518 (s390_regmap): Renamed from regmap, made static.
14519 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14520 made static.
14521 (s390_cannot_store_register): Renamed from cannot_store_register,
14522 made static.
14523 (the_low_target): New.
14524 * linux-sh-low.c (num_regs): Remove.
14525 (sh_num_regs): Define.
14526 (sh_regmap): Renamed from regmap, made static.
14527 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14528 made static.
14529 (sh_cannot_store_register): Renamed from cannot_store_register,
14530 made static.
14531 (the_low_target): New.
14532 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14533 (the_low_target): New.
14534
145352002-04-09 Daniel Jacobowitz <drow@mvista.com>
14536
14537 * Makefile.in: Add stamp-h target.
14538 * configure.in: Create stamp-h.
14539 * configure: Regenerated.
14540
145412002-04-09 Daniel Jacobowitz <drow@mvista.com>
14542
14543 * inferiors.c: New file.
14544 * target.c: New file.
14545 * target.h: New file.
14546 * Makefile.in: Add target.o and inferiors.o. Update
14547 dependencies.
14548 * linux-low.c (inferior_pid): New static variable,
14549 moved from server.c.
14550 (linux_create_inferior): Renamed from create_inferior.
14551 Call add_inferior. Return 0 on success instead of a PID.
14552 (linux_attach): Renamed from myattach.
14553 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14554 (linux_thread_alive): Renamed from mythread_alive.
14555 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14556 child dies.
14557 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14558 (regsets_store_inferior_registers): Correct error message.
14559 Add missing ``return 0''.
14560 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14561 (linux_store_registers): Renamed from store_inferior_registers.
14562 (linux_read_memory): Renamed from read_inferior_memory.
14563 (linux_write_memory): Renamed from write_inferior_memory.
14564 (linux_target_ops): New structure.
14565 (initialize_low): Call set_target_ops ().
14566 * remote-utils.c (unhexify): New function.
14567 (hexify): New function.
14568 (input_interrupt): Send signals to ``signal_pid''.
14569 * server.c (inferior_pid): Remove.
14570 (start_inferior): Update create_inferior call.
14571 (attach_inferior): Call add_inferior.
14572 (handle_query): New function.
14573 (main): Call handle_query for `q' packets.
14574 * server.h: Include "target.h". Remove obsolete prototypes.
14575 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14576
145772002-04-09 Daniel Jacobowitz <drow@mvista.com>
14578
14579 * Makefile.in: Add WARN_CFLAGS. Update configury
14580 dependencies.
14581 * configure.in: Check for <string.h>
14582 * configure: Regenerate.
14583 * config.in: Regenerate.
14584 * gdbreplay.c: Include needed system headers.
14585 (remote_open): Remove strchr prototype.
14586 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14587 * regcache.c (supply_register): Change buf argument to const void *.
14588 (supply_register_by_name): Likewise.
14589 (collect_register): Change buf argument to void *.
14590 (collect_register_by_name): Likewise.
14591 * regcache.h: Add missing prototypes.
14592 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14593 * server.c (handle_query): New function.
14594 (attached): New static variable, moved out of main.
14595 (main): Quiet longjmp clobber warnings.
14596 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14597 * utils.c (error): Remove NORETURN.
14598 (fatal): Likewise.
This page took 1.819559 seconds and 4 git commands to generate.