]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
gdb: Require C++11
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
0bcda685
PA
12016-10-28 Pedro Alves <palves@redhat.com>
2
3 * Makefile.in (CXX_DIALECT): Get from configure.
4 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
5 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
6 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
7 * config.in: Regenerate.
8 * configure: Regenerate.
9
c3805894
YQ
102016-10-27 Yao Qi <yao.qi@linaro.org>
11
12 * linux-low.c (linux_supports_range_stepping): Return true if
13 can_software_single_step return true.
14
89342618
YQ
152016-10-27 Yao Qi <yao.qi@linaro.org>
16
17 * inferiors.c (find_inferior_in_random): New function.
18 * inferiors.h (find_inferior_in_random): Declare.
19 * linux-low.c (linux_wait_for_event_filtered): Call
20 find_inferior_in_random instead of find_inferior.
21
e3652c84
YQ
222016-10-27 Yao Qi <yao.qi@linaro.org>
23
24 * linux-low.c (linux_wait_1): If single-step breakpoints are
25 inserted, remove them.
26
5a04c4cf
PA
272016-10-26 Pedro Alves <palves@redhat.com>
28
29 * linux-low.c (handle_extended_wait): Link parent/child fork
30 threads.
31 (linux_wait_1): Unlink them.
32 (linux_set_resume_request): Ignore resume requests for
33 already-resumed and unhandled fork child threads.
34 * linux-low.h (struct lwp_info) <fork_relative>: New field.
35 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
36 New functions.
37 (handle_v_requests) <vCont>: Don't call require_running.
38 * server.h (in_queued_stop_replies): New declaration.
39
cb93dc7f
YQ
402016-10-24 Yao Qi <yao.qi@linaro.org>
41
42 PR server/20733
43 * linux-aarch64-low.c (append_insns): Cast the return value to
44 'uint32_t *'.
45
a1078bea
YQ
462016-10-10 Yao Qi <yao.qi@linaro.org>
47
48 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
49
1fb77080
SDJ
502016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
51
52 * target.c (target_supports_multi_process): New function, moved
53 from...
54 * target.h (target_supports_multi_process): ... here. Remove
55 macro.
56
39b5a3b9
TT
572016-10-05 Tom Tromey <tom@tromey.com>
58
59 PR remote/20655:
60 * tracepoint.c (handle_tracepoint_bkpts): Check
61 ipa_error_tracepoint, not ipa_stopping_tracepoint.
62
c1d0b70a
YQ
632016-10-05 Yao Qi <yao.qi@linaro.org>
64
65 * configure.srv: Update the path of arm-*.xml files.
66
0a69eedb
YQ
672016-10-05 Terry Guo <terry.guo@arm.com>
68 Yao Qi <yao.qi@linaro.org>
69
70 * Makefile.in: Adjust the path of rules.
71 * configure.srv: Update the path of xml files.
72 * regformats/arm-with-iwmmxt.dat: Regenerated.
73 * regformats/arm-with-neon.dat: Likewise.
74 * regformats/arm-with-vfpv2.dat: Likewise.
75 * regformats/arm-with-vfpv3.dat Likewise.
76
17e16485
YQ
772016-09-30 Yao Qi <yao.qi@linaro.org>
78
79 PR gdbserver/20627
80 * target.c (target_stop_and_wait): Don't call
81 target_continue_no_signal, use resume_stop instead.
82
edeeb602
YQ
832016-09-26 Yao Qi <yao.qi@linaro.org>
84
85 * linux-low.c (linux_wait_1): Call debug_exit.
86
503b1c39
PA
872016-09-23 Pedro Alves <palves@redhat.com>
88
89 * Makefile.in (SFILES): Add common/new-op.c.
90 (OBS): Add common/new-op.o.
91 (new-op.o): New rule.
92
74172ecf
SM
932016-09-21 Simon Marchi <simon.marchi@ericsson.com>
94
95 * .gitinore: Ignore more files.
96
fc6cda2e
YQ
972016-09-21 Yao Qi <yao.qi@linaro.org>
98
99 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
100 23.
101
bc1e6c81
SDJ
1022016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
103
104 * server.c (start_inferior): Call target_mourn_inferior instead of
105 mourn_inferior; pass ptid_t argument to it.
106 (resume): Likewise.
107 (handle_target_event): Likewise.
108 * target.c (target_mourn_inferior): New function.
109 * target.h (mourn_inferior): Delete macro.
110
0e00e962
AA
1112016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
112
113 * linux-low.c (lwp_is_stepping): New function.
114
1d8cb77d
CL
1152016-09-06 Carl Love <cel@us.ibm.com>
116
117 * server.c (start_inferior): Fixed comment, requested comment change
118 didn't get updated correctly. Removed reference to ptrace () call as
119 it is only true on Linux systems.
120
7313bced
CL
1212016-09-06 Carl Love <cel@us.ibm.com>
122
123 * server.c (start_inferior): Do not call
124 function target_post_create_inferior () if the
125 inferior process has already exited.
126
cf6de44d
PA
1272016-09-05 Pedro Alves <palves@redhat.com>
128
129 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
130 (COMPILE.pre, CC_LD): Use CXX directly.
131 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
132 * acinclude.m4: Don't include build-with-cxx.m4.
133 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
134 * configure: Regenerate.
135
c1da6748
AT
1362016-09-02 Akash Trehan <akash.trehan123@gmail.com>
137
138 PR gdb/19495
139 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
140 call writing data to own_buf.
141
f2b9e3df
SDJ
1422016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
143
144 * target.c (mywait): Call target_wait instead of
145 the_target->wait.
146 (target_wait): New function.
147
049a8570
SDJ
1482016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
149
150 * server.c (start_inferior): New variable 'ptid'. Replace calls
151 to the_target->resume by target_continue{,_no_signal}, depending
152 on the case.
153 * target.c (target_stop_and_wait): Call target_continue_no_signal
154 instead of the_target->resume.
155 (target_continue): New function.
156
3aa5cfa0
AT
1572016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
158
159 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
160
754653a7
AZ
1612016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
162
163 PR server/20491
164 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
165 ps_prochandle.
166 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
167 * linux-arm-low.c (ps_get_thread_area): Likewise.
168 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
169 * linux-m68k-low.c (ps_get_thread_area): Likewise.
170 * linux-mips-low.c (ps_get_thread_area): Likewise.
171 * linux-nios2-low.c (ps_get_thread_area): Likewise.
172 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
173 * linux-x86-low.c (ps_get_thread_area): Likewise.
174 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
175
ed036b40
PA
1762016-08-19 Pedro Alves <palves@redhat.com>
177
178 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
179
c8ef42ee
PA
1802016-08-19 Pedro Alves <palves@redhat.com>
181
182 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
183 comment. Use memcpy instead of casting through unsigned long.
184
9c235a72
PA
1852016-08-19 Pedro Alves <palves@redhat.com>
186
187 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
188 allocating around 0x80000000.
189
201506da
PA
1902016-08-19 Pedro Alves <palves@redhat.com>
191
192 PR gdb/20415
193 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
194 (x32-avx512-linux-ipa.o): New rules.
195 * configure.ac (x86_64-*-linux*): New x32 check.
196 * configure.srv (ipa_x32_linux_regobj): New.
197 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
198 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
199 descriptions.
200 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
201 descriptions.
202 * configure: Regenerate.
203
f348d89a
PA
2042016-08-09 Pedro Alves <palves@redhat.com>
205
206 PR gdb/18653
207 * Makefile.in (OBS): Add signals-state-save-restore.o.
208 (signals-state-save-restore.o): New rule.
209 * config.in: Regenerate.
210 * configure: Regenerate.
211 * linux-low.c: Include "signals-state-save-restore.h".
212 (linux_create_inferior): Call
213 restore_original_signals_state.
214 * server.c: Include "dispositions-save-restore.h".
215 (captured_main): Call save_original_signals_state.
216
1baf5149
PA
2172016-08-05 Pedro Alves <palves@redhat.com>
218
219 * configure: Regenerate.
220
fcd4a73d
YQ
2212016-08-04 Yao Qi <yao.qi@linaro.org>
222
223 * linux-low.c (regsets_fetch_inferior_registers): Check
224 errno is ESRCH or not.
225
979659d0
YQ
2262016-08-02 Yao Qi <yao.qi@linaro.org>
227
228 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
229 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
230 (thread_db_load_search): Update.
231 (try_thread_db_load_1): Don't look for td_ta_event_addr,
232 td_ta_set_event and td_ta_event_getmsg.
233
6598661d
PA
2342016-07-26 Pedro Alves <palves@redhat.com>
235
236 PR server/20414
237 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
238 of unsigned long for 64-bit registers and use uint32_t instead of
239 unsigned int for 32-bit registers.
240
9cf12d57
PA
2412016-07-26 Pedro Alves <palves@redhat.com>
242
243 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
244 to 'ptrace'.
245
305450ed
TT
2462016-07-21 Tom Tromey <tom@tromey.com>
247
248 * configure: Rebuild.
249
2583da7c
YQ
2502016-07-21 Yao Qi <yao.qi@linaro.org>
251
252 * mem-break.c (find_gdb_breakpoint): Cast bp to
253 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
254
21536b36
YQ
2552016-07-21 Yao Qi <yao.qi@linaro.org>
256
257 * server.c (handle_v_requests): Support s and S actions
258 if target_supports_software_single_step return true.
259
8901d193
YQ
2602016-07-21 Yao Qi <yao.qi@linaro.org>
261
262 * linux-low.c (resume_stopped_resumed_lwps): If resume request
263 is resume_step, call maybe_hw_step.
264 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
265 and unstop them.
266 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
267 breakpoints or not.
268 (proceed_one_lwp): If resume request is resume_step, install
269 reinsert breakpoints and call maybe_hw_step.
270
0e9a339e
YQ
2712016-07-21 Yao Qi <yao.qi@linaro.org>
272
273 * linux-low.c (proceed_one_lwp): Declare.
274 (linux_resume_one_thread): Remove local variable 'step'.
275 Lift code enqueue signal. Call proceed_one_lwp instead of
276 linux_resume_one_lwp.
277
4281b351
YQ
2782016-07-21 Yao Qi <yao.qi@linaro.org>
279
280 * linux-low.c (linux_resume_one_thread): Call
281 enqueue_pending_signal.
282
984a2c04
YQ
2832016-07-21 Yao Qi <yao.qi@linaro.org>
284
285 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
286 * inferiors.c (do_restore_current_thread_cleanup): New function.
287 (make_cleanup_restore_current_thread): Likewise.
288 * linux-low.c (install_software_single_step_breakpoints): Call
289 make_cleanup_restore_current_thread. Switch current_thread to
290 thread.
291
bec903c9
YQ
2922016-07-21 Yao Qi <yao.qi@linaro.org>
293
294 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
295 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
296 (clone_one_breakpoint): Likewise.
297 (delete_reinsert_breakpoints): Change parameter to thread.
298 Callers updated.
299 (has_reinsert_breakpoints): Likewise.
300 (uninsert_reinsert_breakpoints): Likewise.
301 (reinsert_reinsert_breakpoints): Likewise.
302 * mem-break.h (set_reinsert_breakpoint): Update declaration.
303 (delete_reinsert_breakpoints): Likewise.
304 (reinsert_reinsert_breakpoints): Likewise.
305 (uninsert_reinsert_breakpoints): Likewise.
306 (has_reinsert_breakpoints): Likewise.
307
63c40ec7
YQ
3082016-07-21 Yao Qi <yao.qi@linaro.org>
309
310 * inferiors.c (get_thread_process): Make parameter const.
311 * inferiors.h (get_thread_process): Update declaration.
312 * mem-break.c (clone_all_breakpoints): Remove all parameters.
313 Add new parameters child_thread and parent_thread. Callers
314 updated.
315 * mem-break.h (clone_all_breakpoints): Update declaration.
316
9aa76cd0
YQ
3172016-07-21 Yao Qi <yao.qi@linaro.org>
318
319 * mem-break.c (struct breakpoint) <cond_list>: Remove.
320 <command_list, handler>: Remove.
321 (struct gdb_breakpoint): New.
322 (struct other_breakpoint): New.
323 (struct reinsert_breakpoint): New.
324 (is_gdb_breakpoint): New function.
325 (any_persistent_commands): Update command_list if
326 is_gdb_breakpoint returns true.
327 (set_breakpoint): Create breakpoints according to their types.
328 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
329 (set_gdb_breakpoint_1): Likewise.
330 (set_gdb_breakpoint): Likewise.
331 (clear_breakpoint_conditions): Change parameter type to
332 'struct gdb_breakpoint *'.
333 (clear_breakpoint_commands): Likewise.
334 (clear_breakpoint_conditions_and_commands): Likewise.
335 (add_condition_to_breakpoint): Likewise.
336 (add_breakpoint_condition): Likewise.
337 (add_commands_to_breakpoint): Likewise.
338 (check_breakpoints): Check other_breakpoint.
339 (clone_one_breakpoint): Clone breakpopint according to its type.
340 * mem-break.h (struct gdb_breakpoint): Declare.
341 (set_gdb_breakpoint): Update declaration.
342 (clear_breakpoint_conditions_and_commands): Likewise.
343 (add_breakpoint_condition): Likewise.
344 (add_breakpoint_commands): Likewise.
345 * server.c (process_point_options): Change parameter type to
346 'struct gdb_breakpoint *'.
347
811f8301
YQ
3482016-07-21 Yao Qi <yao.qi@linaro.org>
349
350 * mem-break.c (set_breakpoint_at): Rename it to ...
351 (set_breakpoint_type_at): ... it.
352 (set_breakpoint_at): Call set_breakpoint_type_at.
353 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
354 * mem-break.h (set_breakpoint_at): Update comments.
355
b1c51e36
CLT
3562016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
357
358 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
359 to buf parameter.
360 (nios2_store_gregset): Likewise.
361
ced2dffb
PA
3622016-07-01 Pedro Alves <palves@redhat.com>
363 Antoine Tremblay <antoine.tremblay@ericsson.com>
364
365 * linux-low.c: Change interface to take the target lwp_info
366 pointer directly and return void. Handle detaching from a zombie
367 thread.
368 (linux_detach_lwp_callback): New function.
369 (linux_detach): Detach from the leader thread after detaching from
370 the clone threads.
371
2ac09a5b
YQ
3722016-06-28 Yao Qi <yao.qi@linaro.org>
373
374 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
375 for variable new_offset.
376 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
377 (aarch64_ftrace_insn_reloc_cb): Likewise.
378 (aarch64_ftrace_insn_reloc_tb): Likewise.
379 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
380 PRIx64 instead of PRIx32.
381
79e7fd4f
YQ
3822016-06-28 Yao Qi <yao.qi@linaro.org>
383
384 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
385 (the_low_target): Install arm_get_syscall_trapinfo.
386
061fc021
YQ
3872016-06-28 Yao Qi <yao.qi@linaro.org>
388
389 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
390 function.
391 (the_low_target): Install aarch64_get_syscall_trapinfo.
392
4cc32bec
YQ
3932016-06-28 Yao Qi <yao.qi@linaro.org>
394
395 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
396 Callers updated.
397 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
398 Remove parameter sysno.
399 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
400 sysret.
401
782c1122
AA
4022016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
403
404 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
405 (s390_emit_ne_goto): Likewise.
406 (s390_emit_lt_goto): Likewise.
407 (s390_emit_le_goto): Likewise.
408 (s390_emit_gt_goto): Likewise.
409 (s390_emit_ge_goto): Likewise.
410 (s390x_emit_eq_goto): Likewise.
411 (s390x_emit_ne_goto): Likewise.
412 (s390x_emit_lt_goto): Likewise.
413 (s390x_emit_le_goto): Likewise.
414 (s390x_emit_gt_goto): Likewise.
415 (s390x_emit_ge_goto): Likewise.
416 (s390_emit_ops_impl): Mark variable static.
417 (s390x_emit_ops): Likewise.
418
2e7b624b
YQ
4192016-06-17 Yao Qi <yao.qi@linaro.org>
420
421 * linux-low.c (handle_extended_wait): Call
422 uninsert_reinsert_breakpoints for the parent process. Remove
423 reinsert breakpoints from the child process. Reinsert them to
424 the parent process when vfork is done.
425 * mem-break.c (uninsert_reinsert_breakpoints): New function.
426 (reinsert_reinsert_breakpoints): New function.
427 * mem-break.h (uninsert_reinsert_breakpoints): Declare
428 (reinsert_reinsert_breakpoints): Declare.
429
8a81c5d7
YQ
4302016-06-17 Yao Qi <yao.qi@linaro.org>
431
432 * linux-low.c (handle_extended_wait): If the parent is doing
433 step-over, remove the reinsert breakpoints from the forked child.
434
f50bf8e5
YQ
4352016-06-17 Yao Qi <yao.qi@linaro.org>
436
437 * linux-low.c (unsuspend_all_lwps): Declare.
438 (linux_low_filter_event): If thread exited, call finish_step_over.
439 If step-over is finished, unsuspend other threads.
440
8376a3cb
YQ
4412016-06-17 Yao Qi <yao.qi@linaro.org>
442
443 * linux-low.c (linux_resume_one_lwp_throw): Assert
444 has_reinsert_breakpoints returns false.
445 * mem-break.c (delete_disabled_breakpoints): Assert
446 bp type isn't reinsert_breakpoint.
447
f79b145d
YQ
4482016-06-17 Yao Qi <yao.qi@linaro.org>
449
450 * linux-low.c (maybe_hw_step): New function.
451 (linux_resume_one_lwp_throw): Call maybe_hw_step.
452 (finish_step_over): Switch current_thread to lwp temporarily,
453 and assert has_reinsert_breakpoints returns true.
454 (proceed_one_lwp): Call maybe_hw_step.
455 * mem-break.c (has_reinsert_breakpoints): New function.
456 * mem-break.h (has_reinsert_breakpoints): Declare.
457
0ae534d2
JT
4582016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
459
460 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
461
fcdad592
YQ
4622016-05-17 Yao Qi <yao.qi@linaro.org>
463
464 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
465 instead of find_inferior.
466
9e784964
YQ
4672016-05-05 Yao Qi <yao.qi@linaro.org>
468
469 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
470 Initialize res to zero.
471
cf2ebb6e
YQ
4722016-05-05 Yao Qi <yao.qi@linaro.org>
473
474 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
475 to uint32_t.
476
c1aebf87
UW
4772016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
478
479 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
480 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
481 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
482
35fd2deb 4832016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 484 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
485
486 * tracepoint.c (write_inferior_int8): New function.
487 (cmd_qtenable_disable): Write enable flag using
488 write_inferior_int8.
489
484b3c32
YQ
4902016-04-25 Yao Qi <yao.qi@linaro.org>
491
492 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
493 (need_step_over_p): Return zero if the LWP has pending signals
494 can be delivered on software single step target.
495
85ba7d86
YQ
4962016-04-25 Yao Qi <yao.qi@linaro.org>
497
498 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
499 return instead of error.
500
3539aa13
YQ
5012016-04-22 Yao Qi <yao.qi@linaro.org>
502
503 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
504 to 23.
505
5b061e98
YQ
5062016-04-22 Yao Qi <yao.qi@linaro.org>
507
508 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
509 signal when stepping over breakpoint with software single
510 step.
511
3451269c
PA
5122016-04-21 Pedro Alves <palves@redhat.com>
513
514 * linux-s390-low.c (s390_collect_ptrace_register)
515 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
516 add casts.
517 (s390_check_regset): Use void * instead of gdb_byte *.
518
a2358508
PA
5192016-04-20 Pedro Alves <palves@redhat.com>
520
521 * configure: Renegerate.
522
6885166d
YQ
5232016-04-20 Yao Qi <yao.qi@linaro.org>
524
525 * linux-aarch32-low.c: Include "arch/arm-linux.h".
526 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
527 number 16.
528 (arm_store_gregset): Likewise.
529
2b863f51
WT
5302016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
531
532 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
533 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
534 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
535 (amd64-avx-mpx-linux.c): New rules.
536 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
537 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
538 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
539 (srv_amd64_regobj): Add amd64-avx-mpx.o.
540 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
541 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
542 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
543 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
544 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
545 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
546 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
547 * linux-x86-low.c (x86_linux_read_description): Add case for
548 X86_XSTATE_AVX_MPX_MASK.
549 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
550 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
551 init_registers_i386_avx_mpx_linux.
552 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
553 (initialize_low_tracepoint): Call
554 init_registers_i386_avx_mpx_linux.
555 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
556 (initialize_low_tracepoint): Call
557 init_registers_amd64_avx_mpx_linux.
558 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
559 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
560 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
561 declarations.
562
9b30624b
PA
5632016-04-18 Pedro Alves <palves@redhat.com>
564
565 * configure: Regenerate.
566
45e3745e
AT
5672016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
568
569 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
570 (aarch64_emit_sub): Likewise.
571
2afc13ff
PA
5722016-04-12 Pedro Alves <palves@redhat.com>
573
574 * utils.c (prepare_to_throw_exception): Delete.
575
6e774b13
SM
5762016-04-05 Simon Marchi <simon.marchi@ericsson.com>
577
578 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
579
4dca19f8
MK
5802016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
581
582 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
583
d0a9981f
MK
5842016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
585
586 * linux-aarch64-ipa.c: Add <elf.h> include.
587 * linux-ppc-ipa.c: Add <elf.h> include.
588 * linux-s390-ipa.c: Add <elf.h> include.
589
252db07e
MK
5902016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
591
592 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
593 (get_raw_reg_ptr): Likewise.
594 (get_trace_state_variable_value_ptr): Likewise.
595 (set_trace_state_variable_value_ptr): Likewise.
596 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
597 char *.
598
14e2b6d9
MK
5992016-03-31 Wei-cheng Wang <cole945@gmail.com>
600 Marcin Kościelnicki <koriakin@0x04.net>
601
602 PR/17221
603 * linux-ppc-low.c (emit_insns): New function.
604 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
605 (ppc_emit_prologue): New function.
606 (ppc_emit_epilogue): New function.
607 (ppc_emit_add): New function.
608 (ppc_emit_sub): New function.
609 (ppc_emit_mul): New function.
610 (ppc_emit_lsh): New function.
611 (ppc_emit_rsh_signed): New function.
612 (ppc_emit_rsh_unsigned): New function.
613 (ppc_emit_ext): New function.
614 (ppc_emit_zero_ext): New function.
615 (ppc_emit_log_not): New function.
616 (ppc_emit_bit_and): New function.
617 (ppc_emit_bit_or): New function.
618 (ppc_emit_bit_xor): New function.
619 (ppc_emit_bit_not): New function.
620 (ppc_emit_equal): New function.
621 (ppc_emit_less_signed): New function.
622 (ppc_emit_less_unsigned): New function.
623 (ppc_emit_ref): New function.
624 (ppc_emit_const): New function.
625 (ppc_emit_reg): New function.
626 (ppc_emit_pop): New function.
627 (ppc_emit_stack_flush): New function.
628 (ppc_emit_swap): New function.
629 (ppc_emit_stack_adjust): New function.
630 (ppc_emit_call): New function.
631 (ppc_emit_int_call_1): New function.
632 (ppc_emit_void_call_2): New function.
633 (ppc_emit_if_goto): New function.
634 (ppc_emit_goto): New function.
635 (ppc_emit_eq_goto): New function.
636 (ppc_emit_ne_goto): New function.
637 (ppc_emit_lt_goto): New function.
638 (ppc_emit_le_goto): New function.
639 (ppc_emit_gt_goto): New function.
640 (ppc_emit_ge_goto): New function.
641 (ppc_write_goto_address): New function.
642 (ppc_emit_ops_impl): New static variable.
643 (ppc64v1_emit_prologue): New function.
644 (ppc64v2_emit_prologue): New function.
645 (ppc64_emit_epilogue): New function.
646 (ppc64_emit_add): New function.
647 (ppc64_emit_sub): New function.
648 (ppc64_emit_mul): New function.
649 (ppc64_emit_lsh): New function.
650 (ppc64_emit_rsh_signed): New function.
651 (ppc64_emit_rsh_unsigned): New function.
652 (ppc64_emit_ext): New function.
653 (ppc64_emit_zero_ext): New function.
654 (ppc64_emit_log_not): New function.
655 (ppc64_emit_bit_and): New function.
656 (ppc64_emit_bit_or): New function.
657 (ppc64_emit_bit_xor): New function.
658 (ppc64_emit_bit_not): New function.
659 (ppc64_emit_equal): New function.
660 (ppc64_emit_less_signed): New function.
661 (ppc64_emit_less_unsigned): New function.
662 (ppc64_emit_ref): New function.
663 (ppc64_emit_const): New function.
664 (ppc64v1_emit_reg): New function.
665 (ppc64v2_emit_reg): New function.
666 (ppc64_emit_pop): New function.
667 (ppc64_emit_stack_flush): New function.
668 (ppc64_emit_swap): New function.
669 (ppc64v1_emit_call): New function.
670 (ppc64v2_emit_call): New function.
671 (ppc64v1_emit_int_call_1): New function.
672 (ppc64v2_emit_int_call_1): New function.
673 (ppc64v1_emit_void_call_2): New function.
674 (ppc64v2_emit_void_call_2): New function.
675 (ppc64_emit_if_goto): New function.
676 (ppc64_emit_eq_goto): New function.
677 (ppc64_emit_ne_goto): New function.
678 (ppc64_emit_lt_goto): New function.
679 (ppc64_emit_le_goto): New function.
680 (ppc64_emit_gt_goto): New function.
681 (ppc64_emit_ge_goto): New function.
682 (ppc64v1_emit_ops_impl): New static variable.
683 (ppc64v2_emit_ops_impl): New static variable.
684 (ppc_emit_ops): New function.
685 (linux_low_target): Wire in ppc_emit_ops.
686
a2174ba4
MK
6872016-03-31 Wei-cheng Wang <cole945@gmail.com>
688 Marcin Kościelnicki <koriakin@0x04.net>
689
690 PR/17221
691 * Makefile.in: Add powerpc-*-ipa.o
692 * configure.srv: Add ipa_obj for powerpc*-linux.
693 * linux-ppc-ipa.c: New file.
694 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
695 includes.
696 (PPC_FIELD): New macro.
697 (PPC_SEXT): New macro.
698 (PPC_OP6): New macro.
699 (PPC_BO): New macro.
700 (PPC_LI): New macro.
701 (PPC_BD): New macro.
702 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
703 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
704 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
705 (ppc_get_thread_area): New function.
706 (is_elfv2_inferior): New function.
707 (gen_ds_form): New function.
708 (GEN_STD): New macro.
709 (GEN_STDU): New macro.
710 (GEN_LD): New macro.
711 (GEN_LDU): New macro.
712 (gen_d_form): New function.
713 (GEN_ADDI): New macro.
714 (GEN_ADDIS): New macro.
715 (GEN_LI): New macro.
716 (GEN_LIS): New macro.
717 (GEN_ORI): New macro.
718 (GEN_ORIS): New macro.
719 (GEN_LWZ): New macro.
720 (GEN_STW): New macro.
721 (GEN_STWU): New macro.
722 (gen_xfx_form): New function.
723 (GEN_MFSPR): New macro.
724 (GEN_MTSPR): New macro.
725 (GEN_MFCR): New macro.
726 (GEN_MTCR): New macro.
727 (GEN_SYNC): New macro.
728 (GEN_LWSYNC): New macro.
729 (gen_x_form): New function.
730 (GEN_OR): New macro.
731 (GEN_MR): New macro.
732 (GEN_LWARX): New macro.
733 (GEN_STWCX): New macro.
734 (GEN_CMPW): New macro.
735 (gen_md_form): New function.
736 (GEN_RLDICL): New macro.
737 (GEN_RLDICR): New macro.
738 (gen_i_form): New function.
739 (GEN_B): New macro.
740 (GEN_BL): New macro.
741 (gen_b_form): New function.
742 (GEN_BNE): New macro.
743 (GEN_LOAD): New macro.
744 (GEN_STORE): New macro.
745 (gen_limm): New function.
746 (gen_atomic_xchg): New function.
747 (gen_call): New function.
748 (ppc_relocate_instruction): New function.
749 (ppc_install_fast_tracepoint_jump_pad): New function.
750 (ppc_get_min_fast_tracepoint_insn_len): New function.
751 (ppc_get_ipa_tdesc_idx): New function.
752 (the_low_target): Wire in the new functions.
753 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
754 tdescs.
755 * linux-ppc-tdesc.h: New file.
756
a13c4696
MK
7572016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
758
759 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
760 (alloc_jump_pad_buffer): New function.
761 * linux-amd64-ipa.c: Add <sys/mman.h> include.
762 (alloc_jump_pad_buffer): New function.
763 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
764 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
765 (alloc_jump_pad_buffer): New function.
766 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
767 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
768 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
769 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
770
1cda1512
MK
7712016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
772
773 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
774 * linux-amd64-ipa.c: Likewise.
775 * linux-i386-ipa.c: Likewise.
776 * linux-s390-ipa.c: Likewise.
777 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
778 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
779 set_trace_state_variable_value_ptr.
780 (struct ipa_sym_addresses): Likewise.
781 (symbol_list): Likewise.
782 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
783 accessing gdb_collect directly.
784 (gdb_collect_ptr_type): New typedef.
785 (get_raw_reg_ptr_type): New typedef.
786 (get_trace_state_variable_value_ptr_type): New typedef.
787 (set_trace_state_variable_value_ptr_type): New typedef.
788 (gdb_collect_ptr): New global.
789 (get_raw_reg_ptr): New global.
790 (get_trace_state_variable_value_ptr): New global.
791 (set_trace_state_variable_value_ptr): New global.
792 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
793 accessing get_raw_reg directly.
794 (get_get_tsv_func_addr): Likewise for
795 get_trace_state_variable_value_ptr.
796 (get_set_tsv_func_addr): Likewise for
797 set_trace_state_variable_value_ptr.
798 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
799
72fb5488
SM
8002016-03-30 Simon Marchi <simon.marchi@ericsson.com>
801
802 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
803
28170b88
MK
8042016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
805
806 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
807 packets.
808 (relocate_instruction): Remove own_buf.
809 * server.c (own_buf): Make global.
810 (handle_v_requests): Make global.
811 * server.h (own_buf): New declaration.
812 (handle_v_requests): New prototype.
813
f39e8743
MK
8142016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
815
816 PR 18377
817 * linux-s390-low.c (add_insns): New function.
818 (s390_emit_prologue): New function.
819 (s390_emit_epilogue): New function.
820 (s390_emit_add): New function.
821 (s390_emit_sub): New function.
822 (s390_emit_mul): New function.
823 (s390_emit_lsh): New function.
824 (s390_emit_rsh_signed): New function.
825 (s390_emit_rsh_unsigned): New function.
826 (s390_emit_ext): New function.
827 (s390_emit_log_not): New function.
828 (s390_emit_bit_and): New function.
829 (s390_emit_bit_or): New function.
830 (s390_emit_bit_xor): New function.
831 (s390_emit_bit_not): New function.
832 (s390_emit_equal): New function.
833 (s390_emit_less_signed): New function.
834 (s390_emit_less_unsigned): New function.
835 (s390_emit_ref): New function.
836 (s390_emit_if_goto): New function.
837 (s390_emit_goto): New function.
838 (s390_write_goto_address): New function.
839 (s390_emit_litpool): New function.
840 (s390_emit_const): New function.
841 (s390_emit_call): New function.
842 (s390_emit_reg): New function.
843 (s390_emit_pop): New function.
844 (s390_emit_stack_flush): New function.
845 (s390_emit_zero_ext): New function.
846 (s390_emit_swap): New function.
847 (s390_emit_stack_adjust): New function.
848 (s390_emit_set_r2): New function.
849 (s390_emit_int_call_1): New function.
850 (s390_emit_void_call_2): New function.
851 (s390_emit_eq_goto): New function.
852 (s390_emit_ne_goto): New function.
853 (s390_emit_lt_goto): New function.
854 (s390_emit_le_goto): New function.
855 (s390_emit_gt_goto): New function.
856 (s390_emit_ge_goto): New function.
857 (s390x_emit_prologue): New function.
858 (s390x_emit_epilogue): New function.
859 (s390x_emit_add): New function.
860 (s390x_emit_sub): New function.
861 (s390x_emit_mul): New function.
862 (s390x_emit_lsh): New function.
863 (s390x_emit_rsh_signed): New function.
864 (s390x_emit_rsh_unsigned): New function.
865 (s390x_emit_ext): New function.
866 (s390x_emit_log_not): New function.
867 (s390x_emit_bit_and): New function.
868 (s390x_emit_bit_or): New function.
869 (s390x_emit_bit_xor): New function.
870 (s390x_emit_bit_not): New function.
871 (s390x_emit_equal): New function.
872 (s390x_emit_less_signed): New function.
873 (s390x_emit_less_unsigned): New function.
874 (s390x_emit_ref): New function.
875 (s390x_emit_if_goto): New function.
876 (s390x_emit_const): New function.
877 (s390x_emit_call): New function.
878 (s390x_emit_reg): New function.
879 (s390x_emit_pop): New function.
880 (s390x_emit_stack_flush): New function.
881 (s390x_emit_zero_ext): New function.
882 (s390x_emit_swap): New function.
883 (s390x_emit_stack_adjust): New function.
884 (s390x_emit_int_call_1): New function.
885 (s390x_emit_void_call_2): New function.
886 (s390x_emit_eq_goto): New function.
887 (s390x_emit_ne_goto): New function.
888 (s390x_emit_lt_goto): New function.
889 (s390x_emit_le_goto): New function.
890 (s390x_emit_gt_goto): New function.
891 (s390x_emit_ge_goto): New function.
892 (s390_emit_ops): New function.
893 (struct linux_target_ops): Fill in emit_ops hook.
894
abd9baf9
MK
8952016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
896
897 PR 18377
898 * Makefile.in: Add s390 IPA files.
899 * configure.srv: Build IPA for s390.
900 * linux-s390-ipa.c: New file.
901 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
902 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
903 (tdesc_s390_linux32): Likewise.
904 (init_registers_s390_linux32v1): Likewise.
905 (tdesc_s390_linux32v1): Likewise.
906 (init_registers_s390_linux32v2): Likewise.
907 (tdesc_s390_linux32v2): Likewise.
908 (init_registers_s390_linux64): Likewise.
909 (tdesc_s390_linux64): Likewise.
910 (init_registers_s390_linux64v1): Likewise.
911 (tdesc_s390_linux64v1): Likewise.
912 (init_registers_s390_linux64v2): Likewise.
913 (tdesc_s390_linux64v2): Likewise.
914 (init_registers_s390_te_linux64): Likewise.
915 (tdesc_s390_te_linux64): Likewise.
916 (init_registers_s390_vx_linux64): Likewise.
917 (tdesc_s390_vx_linux64): Likewise.
918 (init_registers_s390_tevx_linux64): Likewise.
919 (tdesc_s390_tevx_linux64): Likewise.
920 (init_registers_s390x_linux64): Likewise.
921 (tdesc_s390x_linux64): Likewise.
922 (init_registers_s390x_linux64v1): Likewise.
923 (tdesc_s390x_linux64v1): Likewise.
924 (init_registers_s390x_linux64v2): Likewise.
925 (tdesc_s390x_linux64v2): Likewise.
926 (init_registers_s390x_te_linux64): Likewise.
927 (tdesc_s390x_te_linux64): Likewise.
928 (init_registers_s390x_vx_linux64): Likewise.
929 (tdesc_s390x_vx_linux64): Likewise.
930 (init_registers_s390x_tevx_linux64): Likewise.
931 (tdesc_s390x_tevx_linux64): Likewise.
932 (have_hwcap_s390_vx): New static variable.
933 (s390_arch_setup): Fill have_hwcap_s390_vx.
934 (s390_get_thread_area): New function.
935 (s390_ft_entry_gpr_esa): New const.
936 (s390_ft_entry_gpr_zarch): New const.
937 (s390_ft_entry_misc): New const.
938 (s390_ft_entry_fr): New const.
939 (s390_ft_entry_vr): New const.
940 (s390_ft_main_31): New const.
941 (s390_ft_main_64): New const.
942 (s390_ft_exit_fr): New const.
943 (s390_ft_exit_vr): New const.
944 (s390_ft_exit_misc): New const.
945 (s390_ft_exit_gpr_esa): New const.
946 (s390_ft_exit_gpr_zarch): New const.
947 (append_insns): New function.
948 (s390_relocate_instruction): New function.
949 (s390_install_fast_tracepoint_jump_pad): New function.
950 (s390_get_min_fast_tracepoint_insn_len): New function.
951 (s390_get_ipa_tdesc_idx): New function.
952 (struct linux_target_ops): Wire in the above functions.
953 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
954 * linux-s390-tdesc.h: New file.
955
a4105d04
MK
9562016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
957
958 * linux-s390-low.c (s390_supports_tracepoints): New function.
959 (struct linux_target_ops): Fill supports_tracepoints hook.
960
35ac8b3e
YQ
9612016-03-18 Yao Qi <yao.qi@linaro.org>
962
963 * linux-low.c (lwp_signal_can_be_delivered): New function.
964 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
965
94610ec4
YQ
9662016-03-18 Yao Qi <yao.qi@linaro.org>
967
968 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
969 0 if signal is enqueued. Remove 'signal' from one debugging
970 message. Move one debugging message to some lines below.
971 Remove code setting 'signal' to 0.
972
80aea927
YQ
9732016-03-18 Yao Qi <yao.qi@linaro.org>
974
975 * linux-low.c (linux_low_filter_event): Remove redundant
976 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
977
b04fd3be
MK
9782016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
979
980 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
981 (struct linux_target_ops): Wire in the above.
982
c40c8d4b
YQ
9832016-03-03 Yao Qi <yao.qi@linaro.org>
984
985 * linux-low.c: Update comments to start_step_over.
986
0f8288ae
YQ
9872016-03-03 Yao Qi <yao.qi@linaro.org>
988
989 PR server/19736
990 * linux-low.c (handle_extended_wait): Set child suspended
991 if event_lwp->bp_reinsert isn't zero.
992
fdbd04a8
YQ
9932016-03-02 Yao Qi <yao.qi@linaro.org>
994
995 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
996 enqueue_pending_signal.
997
6896a8fa
MK
9982016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
999
1000 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1001 is actually loaded.
1002
ab503087
MK
10032016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1004
1005 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1006 (s390_regmap_3264) [!__s390x__]: New global.
1007 (s390_collect_ptrace_register): Skip map entries containing -1.
1008 (s390_supply_ptrace_register): Ditto.
1009 (s390_fill_gprs_high): New function.
1010 (s390_store_gprs_high): New function.
1011 (s390_regsets): Add NT_S390_HIGH_GPRS.
1012 (s390_get_hwcap): Enable on 31-bit.
1013 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1014 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1015 Detect NT_S390_HIGH_GPRS.
1016 (s390_usrregs_info_3264): Enable on 31-bit.
1017 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1018 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1019
ae91f625
MK
10202016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1021
1022 PR gdb/13808
1023 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1024 * configure.srv: Ditto.
1025 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1026 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1027 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1028 (init_registers_amd64_linux): Remove prototype.
1029 (tdesc_amd64_linux): Remove declaration.
1030 (get_ipa_tdesc): New function.
1031 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1032 initialize remaining tdescs.
1033 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1034 (init_registers_i386_linux): Remove prototype.
1035 (tdesc_i386_linux): Remove declaration.
1036 (get_ipa_tdesc): New function.
1037 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1038 initialize remaining tdescs.
1039 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1040 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1041 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1042 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1043 (x86_get_ipa_tdesc_idx): New function.
1044 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1045 * linux-x86-tdesc.h: New file.
1046 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1047 (target_get_ipa_tdesc_idx): New macro.
1048 * tracepoint.c (ipa_tdesc_idx): New macro.
1049 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1050 (symbol_list): Add ipa_tdesc_idx.
1051 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1052 (ipa_tdesc): Remove.
1053 (ipa_tdesc_idx): New variable.
1054 (get_context_regcache): Use get_ipa_tdesc.
1055 (gdb_collect): Ditto.
1056 (gdb_probe): Ditto.
1057 * tracepoint.h (get_ipa_tdesc): New prototype.
1058 (ipa_tdesc): Remove.
1059
e7ad2f14
PA
10602016-02-24 Pedro Alves <palves@redhat.com>
1061
1062 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1063 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1064 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1065 Factor out common code between the USE_SIGTRAP_SIGINFO and
1066 !USE_SIGTRAP_SIGINFO blocks.
1067 (linux_low_filter_event): Call save_stop_reason instead of
1068 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1069 Update comments.
1070 (linux_wait_1): Update comments.
1071
657f9cde
WW
10722016-02-24 Wei-cheng Wang <cole945@gmail.com>
1073
1074 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1075 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1076 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1077 ppc_insert_point, ppc_remove_point.
1078
b00b61e1
MK
10792016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1080
1081 * linux-s390-low.c (s390_supports_z_point_type): New function.
1082 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1083
553cb527
YQ
10842016-02-16 Yao Qi <yao.qi@linaro.org>
1085
1086 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1087 PC. Get pc from regcache_read_pc.
1088
a5652c21
YQ
10892016-02-12 Yao Qi <yao.qi@linaro.org>
1090
1091 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1092 or linux_get_pc_32bit.
1093 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1094
ed443b61
YQ
10952016-02-12 Yao Qi <yao.qi@linaro.org>
1096
1097 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1098 arm_linux_get_next_pcs_fixup.
1099
020ecd38
MK
11002016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1101
1102 * tracepoint.c (x_tracepoint_action_download): Change
1103 write_inferior_data_ptr to write_inferior_data_pointer.
1104 (cmd_qtstart): Likewise.
1105 (write_inferior_data_ptr): Remove.
1106 (download_agent_expr): Change write_inferior_data_ptr to
1107 write_inferior_data_pointer.
1108 (download_tracepoint_1): Likewise.
1109 (download_tracepoint): Likewise.
1110 (download_trace_state_variables): Likewise.
1111
7cae9051
WW
11122016-02-11 Wei-cheng Wang <cole945@gmail.com>
1113 Marcin Kościelnicki <koriakin@0x04.net>
1114
1115 * tracepoint.c (struct tracepoint_action_ops): Remove.
1116 (struct tracepoint_action): Remove ops.
1117 (m_tracepoint_action_download, r_tracepoint_action_download)
1118 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1119 size and offset accordingly.
1120 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1121 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1122 (tracepoint_action_send, tracepoint_action_download): New functions.
1123 Helpers for trace action handlers.
1124 (add_tracepoint_action): Remove setup actions ops.
1125 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1126
9f6a71b4
YQ
11272016-02-10 Yao Qi <yao.qi@linaro.org>
1128
1129 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1130
1e94266c
SM
11312016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1132
1133 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1134 to AC_OUTPUT.
1135 * configure: Regenerate.
1136
8adce034
SM
11372016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1138
1139 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1140 void * to gdb_byte *.
1141 * linux-low.c (siginfo_fixup): Likewise.
1142 (linux_xfer_siginfo): Likewise.
1143 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1144 Likewise.
1145 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1146
93813b37
WT
11472016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1148
1149 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1150 to srv_tgtobj.
1151 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1152 to srv_tgtobj.
1153 * linux-x86-low.c [__x86_64__]: Include
1154 "nat/amd64-linux-siginfo.h".
1155 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1156 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1157 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1158 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1159 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1160 (cpt_si_fd, si_timerid, si_overrun): Move from
1161 nat/amd64-linux-siginfo.c.
1162 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1163
8424cc97
SM
11642016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1165
1166 * server.c (skip_to_semicolon): Remove.
1167 (process_point_options): Use strchrnul instead of
1168 skip_to_semicolon.
1169
4d18591b
YQ
11702016-01-26 Yao Qi <yao.qi@linaro.org>
1171
1172 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1173 * linux-low.c (install_software_single_step_breakpoints): Don't
1174 call regcache_read_pc.
1175 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1176 argument pc.
1177
d8020970
YQ
11782016-01-26 Yao Qi <yao.qi@linaro.org>
1179
1180 * linux-low.c (install_software_single_step_breakpoints): Call
1181 regcache_read_pc instead of get_pc.
1182
8b207339
YQ
11832016-01-26 Yao Qi <yao.qi@linaro.org>
1184
1185 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1186 (unblock_async_io): Rename to ...
1187 (block_unblock_async_io): ... it. New function.
1188 (enable_async_io): Don't install SIGIO handler. Unblock it
1189 instead.
1190 (disable_async_io): Don't ignore SIGIO. Block it instead.
1191 (initialize_async_io): Install SIGIO handler. Don't call
1192 unblock_async_io.
1193
18879fef
YQ
11942016-01-26 Yao Qi <yao.qi@linaro.org>
1195
1196 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1197 first character is '\003', call *the_target->request_interrupt.
1198
a0f8e08a
YQ
11992016-01-25 Yao Qi <yao.qi@linaro.org>
1200
1201 * remote-utils.c (new_thread_notify): Remove.
1202 (dead_thread_notify): Likewise.
1203 * remote-utils.h (new_thread_notify): Remove declaration.
1204 (dead_thread_notify): Likewise.
1205
cc5fd9ab
MK
12062016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1207
1208 * gdb.trace/pending.exp: Fix expected message on continue.
1209
99e8eb11
MK
12102016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1211
1212 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1213 it works properly on big-endian machines where sizeof (CORE_ADDR)
1214 != sizeof (void *).
1215
a994041d
PA
12162016-01-21 Pedro Alves <palves@redhat.com>
1217
1218 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1219 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1220 * configure: Regenerate.
1221
f7a6a40d
YQ
12222016-01-21 Yao Qi <yao.qi@linaro.org>
1223
1224 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1225 is_thumb and set it according to CPSR saved on the stack.
1226 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1227 arm_sigreturn_next_pc.
1228
6f69e520
YQ
12292016-01-18 Yao Qi <yao.qi@linaro.org>
1230
1231 * linux-low.c (linux_set_pc_64bit): New function.
1232 (linux_get_pc_64bit): New function.
1233 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1234 Declare.
1235 * linux-sparc-low.c (debug_threads): Remove declaration.
1236 (sparc_get_pc): Remove.
1237 (the_low_target): Use linux_get_pc_64bit instead of
1238 sparc_get_pc.
1239 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1240 (the_low_target): Use linux_get_pc_64bit and
1241 linux_set_pc_64bit.
1242
276d4552
YQ
12432016-01-18 Yao Qi <yao.qi@linaro.org>
1244
1245 * linux-arm-low.c (debug_threads): Remove declaration.
1246 (arm_get_pc, arm_set_pc): Remove.
1247 (the_low_target): Use linux_get_pc_32bit and
1248 linux_set_pc_32bit.
1249 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1250 (the_low_target): Use linux_get_pc_32bit and
1251 linux_set_pc_32bit.
1252 * linux-cris-low.c (debug_threads): Remove declaration.
1253 (cris_get_pc, cris_set_pc,): Remove.
1254 (the_low_target): Use linux_get_pc_32bit and
1255 linux_set_pc_32bit.
1256 * linux-crisv32-low.c (debug_threads): Remove declaration.
1257 (cris_get_pc, cris_set_pc): Remove.
1258 (the_low_target): Use linux_get_pc_32bit and
1259 linux_set_pc_32bit.
1260 * linux-low.c: Include inttypes.h.
1261 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1262 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1263 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1264 (the_low_target): Use linux_get_pc_32bit and
1265 linux_set_pc_32bit.
1266 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1267 (the_low_target): Use linux_get_pc_32bit and
1268 linux_set_pc_32bit.
1269 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1270 (the_low_target): Use linux_get_pc_32bit and
1271 linux_set_pc_32bit.
1272 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1273 (the_low_target): Use linux_get_pc_32bit and
1274 linux_set_pc_32bit.
1275 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1276 (the_low_target): Use linux_get_pc_32bit and
1277 linux_set_pc_32bit.
1278
eb0edac8
GB
12792016-01-18 Gary Benson <gbenson@redhat.com>
1280
1281 * configure.ac (AC_FUNC_FORK): New check.
1282 * config.in: Regenerate.
1283 * configure: Likewise.
1284
1b451dda
YQ
12852016-01-14 Yao Qi <yao.qi@linaro.org>
1286
1287 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1288 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1289 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1290 arm_get_next_pcs_ctor.
1291
82075af2
JS
12922016-01-12 Josh Stone <jistone@redhat.com>
1293 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1294
1295 * inferiors.h: Include "gdb_vecs.h".
1296 (struct process_info): Add syscalls_to_catch.
1297 * inferiors.c (remove_process): Free syscalls_to_catch.
1298 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1299 syscall_return stops.
1300 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1301 * server.c (handle_general_set): Handle QCatchSyscalls.
1302 (handle_query): Report support for QCatchSyscalls.
1303 * target.h (struct target_ops): Add supports_catch_syscall.
1304 (target_supports_catch_syscall): New macro.
1305 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1306 (struct lwp_info): Add syscall_state.
1307 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1308 Maintain syscall_state and syscalls_to_catch across exec.
1309 (get_syscall_trapinfo): New function, proxy to the_low_target.
1310 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1311 (linux_low_filter_event): Toggle syscall_state entry/return for
1312 syscall traps, and set it ignored for all others.
1313 (gdb_catching_syscalls_p): New function.
1314 (gdb_catch_this_syscall_p): New function.
1315 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1316 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1317 (linux_supports_catch_syscall): New function.
1318 (linux_target_ops): Install it.
1319 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1320 (the_low_target): Install it.
1321
8f13a3ce
MF
13222016-01-12 Mike Frysinger <vapier@gentoo.org>
1323
1324 * acinclude.m4: Include new ../warning.m4 file.
1325 * configure: Regenerated.
1326 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1327
5b3da067
MF
13282016-01-12 Mike Frysinger <vapier@gentoo.org>
1329
1330 * ax.c (is_goto_target): Mark static.
1331 * linux-low.c (register_addr): Likewise.
1332 (linux_fetch_registers, linux_store_registers): Likewise.
1333 * mem-break.c (any_persistent_commands): Fix old prototype.
1334 (add_commands_to_breakpoint): Mark static.
1335 * regcache.c (find_register_by_name): Delete unused func.
1336 * remote-utils.c (hex_or_minus_one): Mark static.
1337 * server.c (monitor_show_help): Mark static.
1338 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1339 handle_v_requests): Likewise.
1340
bc504a31
PA
13412016-01-12 Pedro Alves <palves@redhat.com>
1342
1343 Remove use of the registered trademark symbol throughout.
1344
5a0dd67a
YQ
13452016-01-08 Yao Qi <yao.qi@linaro.org>
1346
1347 * remote-utils.c (getpkt): If c is '\003', call target hook
1348 request_interrupt.
1349
b2ca446f
YQ
13502016-01-06 Yao Qi <yao.qi@linaro.org>
1351
1352 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1353 linux-aarch32-low.c.
1354 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1355 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1356 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1357 (thumb2_breakpoint): Declare.
1358 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1359 linux-aarch32-low.h.
1360 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1361 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1362 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1363
edd88788
JB
13642016-01-01 Joel Brobecker <brobecker@adacore.com>
1365
1366 * gdbreplay.c (gdbreplay_version): Change copyright year in
1367 version message.
1368 * server.c (gdbserver_version): Likewise.
1369
65da7f14
PP
13702015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1371
1372 * server.c (crc32_table): Delete.
1373 (crc32): Use libiberty's xcrc32 function.
1374
4abd5ed2
JB
13752015-12-22 Joel Brobecker <brobecker@adacore.com>
1376
1377 * lynx-low.c (lynx_delete_thread_callback): New function.
1378 (lynx_mourn): Properly delete our process and all of its
1379 threads. Remove call to clear_inferiors.
1380
0e50fe5c
JB
13812015-12-22 Joel Brobecker <brobecker@adacore.com>
1382
1383 * target.c (thread_search_callback): Add check that
1384 the thread_stopped target callback is not NULL before
1385 calling it.
1386
35adc03f
YQ
13872015-12-21 Yao Qi <yao.qi@linaro.org>
1388
1389 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1390 arm breakpoint.
1391
bd2b2909
AT
13922015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1393
1394 * server.c (handle_query): Call target_supports_software_single_step.
1395
7fe5e27e
AT
13962015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1397
1398 * linux-low.c (single_step): New function.
1399 (linux_resume_one_lwp_throw): Call single_step.
1400 (start_step_over): Likewise.
1401
d9311bfa
AT
14022015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1403
1404 * Makefile.in (SFILES): Append arch/arm-linux.c,
1405 arch/arm-get-next-pcs.c.
1406 (arm-linux.o): New rule.
1407 (arm-get-next-pcs.o): New rule.
1408 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1409 arm-linux.o.
1410 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1411 to linux-aarch32-low.c.
1412 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1413 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1414 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1415 (thumb2_breakpoint_len): Likewise.
1416 (arm_is_thumb_mode): Make non-static.
1417 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1418 from linux-aarch32-low.c.
1419 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1420 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1421 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1422 (thumb2_breakpoint_len): Likewise.
1423 (arm_is_thumb_mode): New declaration.
1424 * linux-arm-low.c: Include arch/arm-linux.h
1425 aarch/arm-get-next-pcs.h, sys/syscall.h.
1426 (get_next_pcs_ops): New struct.
1427 (get_next_pcs_addr_bits_remove): New function.
1428 (get_next_pcs_is_thumb): New function.
1429 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1430 (arm_sigreturn_next_pc): Likewise.
1431 (get_next_pcs_syscall_next_pc): Likewise.
1432 (arm_gdbserver_get_next_pcs): Likewise.
1433 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1434 Initialize.
1435 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1436 * server.h: Include gdb_vecs.h.
1437
68ce2059
AT
14382015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1439
1440 * Makefile.in (SFILES): Append common/common-regcache.c.
1441 (OBS): Append common-regcache.o.
1442 (common-regcache.o): New rule.
1443 * regcache.c (init_register_cache): Initialize cache to
1444 REG_UNAVAILABLE.
1445 (regcache_raw_read_unsigned): New function.
1446 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1447 register_status enum.
1448
fa5308bd
AT
14492015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1450
1451 * linux-aarch64-low.c (the_low_targets): Rename
1452 breakpoint_reinsert_addr to get_next_pcs.
1453 * linux-arm-low.c (the_low_targets): Likewise.
1454 * linux-bfin-low.c (the_low_targets): Likewise.
1455 * linux-cris-low.c (the_low_targets): Likewise.
1456 * linux-crisv32-low.c (the_low_targets): Likewise.
1457 * linux-low.c (can_software_single_step): Likewise.
1458 (install_software_single_step_breakpoints): New function.
1459 (start_step_over): Use install_software_single_step_breakpoints.
1460 * linux-low.h: New CORE_ADDR vector.
1461 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1462 get_next_pcs.
1463 * linux-mips-low.c (the_low_targets): Likewise.
1464 * linux-nios2-low.c (the_low_targets): Likewise.
1465 * linux-sparc-low.c (the_low_targets): Likewise.
1466
4a6ed09b
PA
14672015-12-17 Pedro Alves <palves@redhat.com>
1468
1469 * linux-low.c (linux_kill_one_lwp): Remove references to
1470 LinuxThreads.
1471 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1472 to 'kill'.
1473 (linux_init_signals): Delete.
1474 (initialize_low): Adjust.
1475 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1476
7544db95
PA
14772015-12-16 Pedro Alves <palves@redhat.com>
1478
1479 * configure.ac (compiler warning flags): When testing a
1480 -Wno-foo option, check whether -Wfoo works instead.
1481 * configure: Regenerate.
1482
8020350c
DB
14832015-12-11 Don Breazeal <donb@codesourcery.com>
1484
1485 * server.c (process_serial_event): Don't exit from gdbserver
1486 in remote mode if there are still active inferiors.
1487
db91f502
YQ
14882015-12-11 Yao Qi <yao.qi@linaro.org>
1489
1490 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1491 arm_breakpoint_at if the process is 32-bit.
1492
b37a6290
YQ
14932015-12-11 Yao Qi <yao.qi@linaro.org>
1494
1495 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1496 arm breakpoint.
1497
17b1509a
YQ
14982015-12-07 Yao Qi <yao.qi@linaro.org>
1499
1500 * configure.srv: Append arm.o to srv_tgtobj for
1501 aarch64*-*-linux* target.
1502 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1503 from linux-arm-low.c.
1504 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1505 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1506 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1507 (thumb2_breakpoint_len): Likewise.
1508 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1509 (arm_breakpoint_kinds): Likewise.
1510 (arm_breakpoint_kind_from_pc): Likewise.
1511 (arm_sw_breakpoint_from_kind): Likewise.
1512 (arm_breakpoint_kind_from_current_state): Likewise.
1513 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1514 (arm_sw_breakpoint_from_kind): Declare.
1515 (arm_breakpoint_kind_from_current_state): Declare.
1516 (arm_breakpoint_at): Declare.
1517 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1518 arm_sw_breakpoint_from_kind if process is 32-bit.
1519 (aarch64_breakpoint_kind_from_pc): New function.
1520 (aarch64_breakpoint_kind_from_current_state): New function.
1521 (the_low_target): Initialize fields breakpoint_kind_from_pc
1522 and breakpoint_kind_from_current_state.
1523 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1524 linux-aarch32-low.c.
1525 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1526 (arm_breakpoint, arm_breakpoint_len): Likewise.
1527 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1528 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1529 (arm_is_thumb_mode): Likewise.
1530 (arm_breakpoint_at): Likewise.
1531 (arm_breakpoint_kind_from_pc): Likewise.
1532 (arm_sw_breakpoint_from_kind): Likewise.
1533 (arm_breakpoint_kind_from_current_state): Likewise.
1534
1535 Revert:
1536 2015-08-04 Yao Qi <yao.qi@linaro.org>
1537
1538 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1539 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1540 * server.c (extended_protocol): Remove "static".
1541 * server.h (extended_protocol): Declare it.
1542
ece66d65
JS
15432015-12-04 Josh Stone <jistone@redhat.com>
1544
1545 * target.h (struct target_ops) <arch_setup>: Rename to ...
1546 (struct target_ops) <post_create_inferior>: ... this.
1547 (target_arch_setup): Rename to ...
1548 (target_post_create_inferior): ... this, calling post_create_inferior.
1549 * server.c (start_inferior): Update target_arch_setup calls to
1550 target_post_create_inferior.
1551 * linux-low.c (linux_low_ptrace_options): Forward declare.
1552 (linux_arch_setup): Update its comment for general use.
1553 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1554 (struct linux_target_ops): Use linux_post_create_inferior.
1555 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1556 to post_create_inferior.
1557 * nto-low.c (struct nto_target_ops): Likewise.
1558 * spu-low.c (struct spu_target_ops): Likewise.
1559 * win32-low.c (struct win32_target_ops): Likewise.
1560
e58c48b4
AT
15612015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1562
1563 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1564
fbec8956
AT
15652015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1566
1567 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1568 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1569 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1570 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1571 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1572 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1573 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1574 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1575 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1576 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1577 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1578 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1579
9b4c5f87
AT
15802015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1581
1582 * linux-low.c (linux_look_up_symbols): Don't call
1583 linux_supports_traceclone.
1584 * linux-low.h (thread_db_init): Remove use_events argument.
1585 * thread-db.c (thread_db_use_event): Remove global variable.
1586 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1587 (struct thread_db) <td_create_bp>: Remove field.
1588 (thread_db_create_event): Remove function.
1589 (thread_db_enable_reporting): Likewise.
1590 (find_one_thread): Don't check for thread_db_use_events.
1591 (attach_thread): Likewise.
1592 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1593 (try_thread_db_load_1): Don't check for thread_db_use_events.
1594 (thread_db_init): Remove use_events argument and thread events
1595 handling.
1596 (remove_thread_event_breakpoints): Remove function.
1597 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1598
7d00775e
AT
15992015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1600
1601 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1602 New function.
1603 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1604 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1605 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1606 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1607 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1608 Initialize.
1609 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1610 New function.
1611 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1612 * linux-low.c (can_hardware_single_step): Use
1613 supports_hardware_single_step.
1614 (can_software_single_step): New function.
1615 (start_step_over): Call can_software_single_step.
1616 (linux_supports_hardware_single_step): New function.
1617 (struct target_ops) <supports_software_single_step>: Initialize.
1618 * linux-low.h (struct linux_target_ops)
1619 <supports_hardware_single_step>: Initialize.
1620 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1621 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1622 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1623 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1624 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1625 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1626 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1627 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1628 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1629 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1630 Initialize.
1631 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1632 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1633 Initialize.
1634 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1635 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1636 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1637 New function.
1638 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1639 * target.h (struct target_ops): <supports_software_single_step>:
1640 New field.
1641 (target_supports_software_single_step): New macro.
1642
2d97cd35
AT
16432015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1644
1645 * linux-low.c (linux_wait_1): Fix pc advance condition.
1646 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1647 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1648
769ef81f
AT
16492015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1650
1651 * linux-arm-low.c (arm_is_thumb_mode): New function.
1652 (arm_breakpoint_at): Use arm_is_thumb_mode.
1653 (arm_breakpoint_kind_from_current_state): New function.
1654 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1655 Initialize.
1656 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1657 (linux_breakpoint_kind_from_current_state): New function.
1658 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1659 * linux-low.h (struct linux_target_ops)
1660 <breakpoint_kind_from_current_state>: New field.
1661 * target.h (struct target_ops): Likewise.
1662 (target_breakpoint_kind_from_current_state): New macro.
1663
1bebeeca
PA
16642015-11-30 Pedro Alves <palves@redhat.com>
1665
1666 * linux-low.c (linux_resume): Wake up the event loop before
1667 returning.
1668
a67a9fae
PA
16692015-11-30 Pedro Alves <palves@redhat.com>
1670
1671 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1672 check.
1673 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1674 to -1.
1675 * target.c (struct thread_search): New structure.
1676 (thread_search_callback): New function.
1677 (prev_general_thread): New global.
1678 (prepare_to_access_memory, done_accessing_memory): New functions.
1679 * target.h (prepare_to_access_memory, done_accessing_memory):
1680 Replace macros with function declarations.
1681
f2faf941
PA
16822015-11-30 Pedro Alves <palves@redhat.com>
1683
1684 PR 14618
1685 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1686 report TARGET_WAITKIND_NO_RESUMED.
1687 * remote-utils.c (prepare_resume_reply): Handle
1688 TARGET_WAITKIND_NO_RESUMED.
1689 * server.c (report_no_resumed): New global.
1690 (handle_query) <qSupported>: Handle "no-resumed+". Report
1691 "no-resumed+" support.
1692 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1693 return error if the client doesn't support no-resumed events.
1694 (push_stop_notification): New function.
1695 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1696 events if the client supports them.
1697
a681f9c9
PA
16982015-11-30 Pedro Alves <palves@redhat.com>
1699
1700 * linux-low.c (thread_still_has_status_pending_p): Don't check
1701 vCont;t here.
1702 (lwp_resumed): New function.
1703 (status_pending_p_callback): Return early if the LWP is not
1704 supposed to be resumed.
1705
65706a29
PA
17062015-11-30 Pedro Alves <palves@redhat.com>
1707
1708 * linux-low.c (handle_extended_wait): Assert that the LWP's
1709 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1710 thread create events, leave the new child's status pending.
1711 (linux_low_filter_event): If GDB wants to hear about thread exit
1712 events, leave the LWP marked dead and don't delete it.
1713 (linux_wait_for_event_filtered): Don't check for thread exit.
1714 (filter_exit_event): New function.
1715 (linux_wait_1): Use it, when returning an exit event.
1716 (linux_resume_one_lwp_throw): Assert that the LWP's
1717 waitstatus is TARGET_WAITKIND_IGNORE.
1718 * remote-utils.c (prepare_resume_reply): Handle
1719 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1720 * server.c (report_thread_events): New global.
1721 (handle_general_set): Handle QThreadEvents.
1722 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1723 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1724 TARGET_WAITKIND_THREAD_EXITED.
1725 * server.h (report_thread_events): Declare.
1726
56cf4bed
PA
17272015-11-30 Pedro Alves <palves@redhat.com>
1728
1729 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1730 the thread's last_resume_kind was resume_stop.
1731
500c1d85
PA
17322015-11-30 Pedro Alves <palves@redhat.com>
1733
1734 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1735 before returning.
1736
de979965
PA
17372015-11-30 Pedro Alves <palves@redhat.com>
1738
1739 * server.c (handle_v_requests): Handle vCtrlC.
1740
34c65914
PA
17412015-11-30 Pedro Alves <palves@redhat.com>
1742
1743 * gdbthread.h (find_any_thread_of_pid): Declare.
1744 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1745 functions.
1746 * server.c (handle_query): If current_thread is NULL, look for
1747 another thread of the selected process.
1748
79efa585 17492015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 1750 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
1751
1752 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1753 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1754 name in reply.
1755 * target.h (struct target_ops) <thread_name>: New field.
1756 (target_thread_name): New macro.
1757
80d82c19
JB
17582015-11-23 Joel Brobecker <brobecker@adacore.com>
1759
1760 * regcache.h (regcache_invalidate_pid): Add declaration.
1761 * regcache.c (regcache_invalidate_pid): New function, extracted
1762 from regcache_invalidate.
1763 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1764 Add trivial documentation comment.
1765 * lynx-low.c: Use regcache_invalidate_pid instead of
1766 regcache_invalidate.
1767
64da5dd5
JB
17682015-11-23 Joel Brobecker <brobecker@adacore.com>
1769
1770 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1771 and Elf64_auxv_t if the target is Android.
1772
37ce4055
DE
17732015-11-22 Doug Evans <xdje42@gmail.com>
1774
1775 * target.h: #include <sys/types.h>.
1776
06e03fff
PA
17772015-11-19 Pedro Alves <palves@redhat.com>
1778
1779 * linux-low.c (linux_process_qsupported): Change prototype.
1780 Adjust.
1781 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1782 Change prototype.
1783 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1784 and adjust to loop over all features.
1785 * server.c (handle_query) <qSupported>: Adjust to call
1786 target_process_qsupported once, passing it a vector of unprocessed
1787 features.
1788 * target.h (struct target_ops) <process_qsupported>: Change
1789 prototype.
1790 (target_process_qsupported): Adjust.
1791
9a084706
PA
17922015-11-19 Pedro Alves <palves@redhat.com>
1793
1794 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1795 mode.
1796 * configure: Regenerate.
1797
dad44a1f
PA
17982015-11-19 Pedro Alves <palves@redhat.com>
1799
1800 * configure: Regenerate.
1801
231c0592
YQ
18022015-11-19 Yao Qi <yao.qi@linaro.org>
1803
1804 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1805 type to uint32_t.
1806
6c1c9a8b
YQ
18072015-11-19 Yao Qi <yao.qi@linaro.org>
1808
1809 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1810 (struct aarch64_operand): Move enum out.
1811
9caa3311
YQ
18122015-11-19 Yao Qi <yao.qi@linaro.org>
1813
1814 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1815 struct user_fpsimd_state *.
1816 (aarch64_store_fpregset): Likewise.
1817
6a69a054
YQ
18182015-11-19 Yao Qi <yao.qi@linaro.org>
1819
1820 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1821 struct user_pt_regs *.
1822 (aarch64_store_gregset): Likewise.
1823
1798301e
PA
18242015-11-18 Pedro Alves <palves@redhat.com>
1825
1826 * Makefile.in (all_object_files): Add $IPA_OBJS.
1827
ce7715e2
PA
18282015-11-17 Pedro Alves <palves@redhat.com>
1829
1830 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1831 GDB_SIGNAL_0 and gdb_signal_to_string.
1832
c0879059
PA
18332015-11-17 Pedro Alves <palves@redhat.com>
1834
1835 * win32-low.c (handle_output_debug_string): Remove parameter.
1836 (win32_kill): Remove our_status local and adjust call to
1837 handle_output_debug_string.
1838 (get_child_debug_event): Adjust call to
1839 handle_output_debug_string.
1840
1996e237
SM
18412015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1842
1843 * linux-mips-low.c (mips_fill_gregset): Add cast.
1844 (mips_store_gregset): Likewise.
1845 (mips_fill_fpregset): Likewise.
1846 (mips_store_fpregset): Likewise.
1847
cbec665b
SM
18482015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1849
1850 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1851 priv.
1852
eb3e3c67
SM
18532015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1854
1855 * linux-mips-low.c (mips_linux_new_thread): Change type of
1856 watch_type to enum target_hw_bp_type.
1857
171de4b8
SM
18582015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1859
1860 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1861 Change return type to arm_hwbp_type.
1862
04248ead
SM
18632015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1864
1865 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1866 (arm_store_gregset): Likewise.
1867 * linux-arm-low.c (arm_get_hwcap): Likewise.
1868 (arm_read_description): Likewise.
1869
04b3479c
SM
18702015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1871
1872 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1873
2bc84e8a
SM
18742015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1875
1876 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1877 (ppc_fill_vsxregset): Likewise.
1878 (ppc_store_vsxregset): Likewise.
1879 (ppc_fill_vrregset): Likewise.
1880 (ppc_store_vrregset): Likewise.
1881 (ppc_fill_evrregset): Likewise.
1882 (ppc_store_evrregset): Likewise.
1883
e6c5bb05
SM
18842015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1885
1886 * linux-ppc-low.c (ppc_usrregs_info): Remove
1887 forward-declaration.
1888 (ppc_arch_setup): Move lower in file.
1889
7ea45d72
SM
18902015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1891
1892 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1893 (ps_pdwrite): Likewise.
1894
69291610
HW
18952015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1896
1897 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1898 to after assert checks.
1899
b42945fd
SM
19002015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1901
1902 * proc-service.c (ps_pdread): Add/adjust casts.
1903 (ps_pdwrite): Add/adjust casts.
1904
d6f85c84
SM
19052015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1906
1907 * server.c (handle_search_memory_1): Cast return value of
1908 memmem.
1909
f98cd059
SM
19102015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1911
1912 * server.c (write_qxfer_response): Change type of data to
1913 gdb_byte *.
1914
d2412fa5
PA
19152015-10-29 Pedro Alves <palves@redhat.com>
1916
1917 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1918
c17414a2
PA
19192015-10-29 Pedro Alves <palves@redhat.com>
1920
1921 * tracepoint.c (clear_installed_tracepoints): Add casts.
1922
e053fbc4
PA
19232015-10-29 Pedro Alves <palves@redhat.com>
1924
1925 * server.c (handle_v_cont, process_serial_event): Add enum
1926 gdb_signal casts to signal parsing code.
1927
add67df8
PA
19282015-10-29 Pedro Alves <palves@redhat.com>
1929
1930 * linux-low.h (NULL_REGSET): Define.
1931 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1932 * linux-arm-low.c (arm_regsets): Likewise.
1933 * linux-crisv32-low.c (cris_regsets): Likewise.
1934 * linux-m68k-low.c (m68k_regsets): Likewise.
1935 * linux-mips-low.c (mips_regsets): Likewise.
1936 * linux-nios2-low.c (nios2_regsets): Likewise.
1937 * linux-ppc-low.c (ppc_regsets): Likewise.
1938 * linux-s390-low.c (s390_regsets): Likewise.
1939 * linux-sh-low.c (sh_regsets): Likewise.
1940 * linux-sparc-low.c (sparc_regsets): Likewise.
1941 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1942 * linux-tile-low.c (tile_regsets): Likewise.
1943 * linux-x86-low.c (x86_regsets): Likewise.
1944 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1945
50bc912a
PA
19462015-10-29 Pedro Alves <palves@redhat.com>
1947
1948 * linux-low.h (NULL_REGSET): Define.
1949 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1950 * linux-arm-low.c (arm_regsets): Likewise.
1951 * linux-crisv32-low.c (cris_regsets): Likewise.
1952 * linux-m68k-low.c (m68k_regsets): Likewise.
1953 * linux-mips-low.c (mips_regsets): Likewise.
1954 * linux-nios2-low.c (nios2_regsets): Likewise.
1955 * linux-ppc-low.c (ppc_regsets): Likewise.
1956 * linux-s390-low.c (s390_regsets): Likewise.
1957 * linux-sh-low.c (sh_regsets): Likewise.
1958 * linux-sparc-low.c (sparc_regsets): Likewise.
1959 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1960 * linux-tile-low.c (tile_regsets): Likewise.
1961 * linux-x86-low.c (x86_regsets): Likewise.
1962 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1963
682b2546
DE
19642015-10-26 Doug Evans <dje@google.com>
1965
1966 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1967
963843d4
DE
19682015-10-26 Doug Evans <dje@google.com>
1969
1970 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1971
d41401ac
DE
19722015-10-26 Doug Evans <dje@google.com>
1973
1974 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1975 for debug_printf.
1976 (attach_thread, find_new_threads_callback): Ditto.
1977
3db28855
AT
19782015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1979
1980 * mem-break.h (set_breakpoint_data): Remove.
1981
fb78e89c
AT
19822015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1983
1984 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1985 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1986 (initialize_low): Remove set_breakpoint_data call.
1987 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1988 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1989 (initialize_low): Remove set_breakpoint_data call.
1990 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1991 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1992 (initialize_low): Remove set_breakpoint_data call.
1993
2e6ee069
AT
19942015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1995
1996 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
1997 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
1998 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
1999 * target.h (target_breakpoint_kind_from_pc): New macro.
2000
1652a986
AT
20012015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2002
2003 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2004 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2005 the default breakpoint kind.
2006
abeead09
AT
20072015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2008
2009 * linux-arm-low.c (arm_supports_z_point_type): Add software
2010 breakpoint support.
2011
b0b4b501
AT
20122015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2013
2014 * linux-arm-low.c: Refactor breakpoint definitions.
2015 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2016 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2017
8689682c
AT
20182015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2019
2020 * Makefile.in: Add arm.c/o.
2021 * configure.srv: Likewise.
2022 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2023 (arm_breakpoint_kind_from_pc): New function.
2024 (arm_sw_breakpoint_from_kind): Return proper kind.
2025 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2026
27165294
AT
20272015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2028
2029 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2030 removal.
2031 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2032 (struct raw_breakpoint) <size>: Remove.
2033 (struct raw_breakpoint) <kind>: Add.
2034 (bp_size): New function.
2035 (bp_opcode): Likewise.
2036 (find_raw_breakpoint_at): Adjust for kind.
2037 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2038 (remove_memory_breakpoint): Adjust for kind call bp_size.
2039 (set_raw_breakpoint_at): Adjust for kind.
2040 (set_breakpoint): Likewise.
2041 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2042 (delete_raw_breakpoint): Adjust for kind.
2043 (delete_breakpoint): Likewise.
2044 (find_gdb_breakpoint): Likewise.
2045 (set_gdb_breakpoint_1): Likewise.
2046 (set_gdb_breakpoint): Likewise.
2047 (delete_gdb_breakpoint_1): Likewise.
2048 (delete_gdb_breakpoint): Likewise.
2049 (uninsert_raw_breakpoint): Likewise.
2050 (reinsert_raw_breakpoint): Likewise.
2051 (set_breakpoint_data): Remove.
2052 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2053 (check_mem_read): Adjust for kind call bp_size.
2054 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2055 (clone_one_breakpoint): Adjust for kind.
2056 * mem-break.h (set_gdb_breakpoint): Likewise.
2057 (delete_gdb_breakpoint): Likewise.
2058 * server.c (process_serial_event): Likewise.
2059
dd373349
AT
20602015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2061
2062 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2063 (struct linux_target_ops) <breakpoint>: Remove.
2064 (struct linux_target_ops) <breakpoint_len>: Remove.
2065 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2066 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2067 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2068 (arm_sw_breakpoint_from_kind): New function.
2069 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2070 (struct linux_target_ops) <breakpoint>: Remove.
2071 (struct linux_target_ops) <breakpoint_len>: Remove.
2072 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2073 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2074 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2075 (struct linux_target_ops) <breakpoint>: Remove.
2076 (struct linux_target_ops) <breakpoint_len>: Remove.
2077 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2078 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2079 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2080 (struct linux_target_ops) <breakpoint>: Remove.
2081 (struct linux_target_ops) <breakpoint_len>: Remove.
2082 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2083 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2084 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2085 and sw_breakpoint_from_kind to increment the pc.
2086 (linux_breakpoint_kind_from_pc): New function.
2087 (linux_sw_breakpoint_from_kind): New function.
2088 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2089 (initialize_low): Call breakpoint_kind_from_pc and
2090 sw_breakpoint_from_kind to replace breakpoint_data/len.
2091 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2092 New field.
2093 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2094 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2095 (struct linux_target_ops) <breakpoint>: Remove.
2096 (struct linux_target_ops) <breakpoint_len>: Remove.
2097 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2098 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2099 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2100 (struct linux_target_ops) <breakpoint>: Remove.
2101 (struct linux_target_ops) <breakpoint_len>: Remove.
2102 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2103 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2104 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2105 (struct linux_target_ops) <breakpoint>: Remove.
2106 (struct linux_target_ops) <breakpoint_len>: Remove.
2107 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2108 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2109 * linux-nios2-low.c (nios2_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-ppc-low.c (ppc_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-s390-low.c (s390_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-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2125 (struct linux_target_ops) <breakpoint>: Remove.
2126 (struct linux_target_ops) <breakpoint_len>: Remove.
2127 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2128 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2129 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2130 (struct linux_target_ops) <breakpoint>: Remove.
2131 (struct linux_target_ops) <breakpoint_len>: Remove.
2132 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2133 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2134 * linux-tic6x-low.c (tic6x_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-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2140 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2141 (struct linux_target_ops) <breakpoint>: Remove.
2142 (struct linux_target_ops) <breakpoint_len>: Remove.
2143 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2144 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2145 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2146 (struct linux_target_ops) <breakpoint>: Remove.
2147 (struct linux_target_ops) <breakpoint_len>: Remove.
2148 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2149 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2150
4cd98a19
AT
21512015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2152
2153 * linux-cris-low.c (cris_get_pc): Remove void arg.
2154
774ee6d2
AR
21552015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2156
2157 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2158 variable name.
2159
833dcd29
AR
21602015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2161
2162 * inferiors.c (thread_pid_matches_callback): New function.
2163 (find_thread_process): New function.
2164 (remove_thread): Reset current_thread.
2165 (remove_process): Assert threads have been removed first.
2166
8d689ee5
YQ
21672015-10-15 Yao Qi <yao.qi@linaro.org>
2168
2169 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2170 if it is 3.
2171 (aarch64_remove_point): Likewise.
2172 * regcache.c (regcache_register_size): New function.
2173
1c2e1515
YQ
21742015-10-12 Yao Qi <yao.qi@linaro.org>
2175
2176 * linux-aarch64-low.c: Update all callers as emit_load_store
2177 is renamed to aarch64_emit_load_store.
2178
e1c587c3
YQ
21792015-10-12 Yao Qi <yao.qi@linaro.org>
2180
2181 * linux-aarch64-low.c: Update all callers of function renaming
2182 from emit_insn to aarch64_emit_insn.
2183
b6542f81
YQ
21842015-10-12 Yao Qi <yao.qi@linaro.org>
2185
2186 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2187 arch/aarch64-insn.h.
2188 (struct aarch64_memory_operand): Likewise.
2189 (ENCODE): Likewise.
2190 (emit_insn): Move to arch/aarch64-insn.c.
2191 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2192 (emit_load_store): Move to arch/aarch64-insn.c.
2193 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2194 (can_encode_int32): Remove.
2195
246994ce
YQ
21962015-10-12 Yao Qi <yao.qi@linaro.org>
2197
2198 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2199 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2200 (aarch64_relocate_instruction): Likewise.
2201 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2202 (struct aarch64_insn_visitor): Likewise.
2203
0badd99f
YQ
22042015-10-12 Yao Qi <yao.qi@linaro.org>
2205
2206 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2207 (struct aarch64_insn_visitor): New.
2208 (struct aarch64_insn_relocation_data): New.
2209 (aarch64_ftrace_insn_reloc_b): New function.
2210 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2211 (aarch64_ftrace_insn_reloc_cb): Likewise.
2212 (aarch64_ftrace_insn_reloc_tb): Likewise.
2213 (aarch64_ftrace_insn_reloc_adr): Likewise.
2214 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2215 (aarch64_ftrace_insn_reloc_others): Likewise.
2216 (visitor): New.
2217 (aarch64_relocate_instruction): Use visitor.
2218
dfaffe9d
YQ
22192015-10-12 Yao Qi <yao.qi@linaro.org>
2220
2221 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2222 int. Add argument buf.
2223 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2224 aarch64_relocate_instruction.
2225
70b439f0
YQ
22262015-10-12 Yao Qi <yao.qi@linaro.org>
2227
2228 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2229 argument insn. Remove local variable insn. Don't call
2230 target_read_uint32.
2231 (aarch64_install_fast_tracepoint_jump_pad): Call
2232 target_read_uint32.
2233
7781c06f
YQ
22342015-09-30 Yao Qi <yao.qi@linaro.org>
2235
2236 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2237 (emit_load_store_pair): Likewise.
2238
9a3c8263
SM
22392015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2240
2241 * dll.c (match_dll): Add cast(s).
2242 (unloaded_dll): Likewise.
2243 * linux-low.c (second_thread_of_pid_p): Likewise.
2244 (delete_lwp_callback): Likewise.
2245 (count_events_callback): Likewise.
2246 (select_event_lwp_callback): Likewise.
2247 (linux_set_resume_request): Likewise.
2248 * server.c (accumulate_file_name_length): Likewise.
2249 (emit_dll_description): Likewise.
2250 (handle_qxfer_threads_worker): Likewise.
2251 (visit_actioned_threads): Likewise.
2252 * thread-db.c (any_thread_of): Likewise.
2253 * tracepoint.c (same_process_p): Likewise.
2254 (match_blocktype): Likewise.
2255 (build_traceframe_info_xml): Likewise.
2256
224c3ddb
SM
22572015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2258
2259 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2260 assignment.
2261 (gdb_unparse_agent_expr): Likewise.
2262 * hostio.c (require_data): Likewise.
2263 (handle_pread): Likewise.
2264 * linux-low.c (disable_regset): Likewise.
2265 (fetch_register): Likewise.
2266 (store_register): Likewise.
2267 (get_dynamic): Likewise.
2268 (linux_qxfer_libraries_svr4): Likewise.
2269 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2270 (set_fast_tracepoint_jump): Likewise.
2271 (uninsert_fast_tracepoint_jumps_at): Likewise.
2272 (reinsert_fast_tracepoint_jumps_at): Likewise.
2273 (validate_inserted_breakpoint): Likewise.
2274 (clone_agent_expr): Likewise.
2275 * regcache.c (init_register_cache): Likewise.
2276 * remote-utils.c (putpkt_binary_1): Likewise.
2277 (decode_M_packet): Likewise.
2278 (decode_X_packet): Likewise.
2279 (look_up_one_symbol): Likewise.
2280 (relocate_instruction): Likewise.
2281 (monitor_output): Likewise.
2282 * server.c (handle_search_memory): Likewise.
2283 (handle_qxfer_exec_file): Likewise.
2284 (handle_qxfer_libraries): Likewise.
2285 (handle_qxfer): Likewise.
2286 (handle_query): Likewise.
2287 (handle_v_cont): Likewise.
2288 (handle_v_run): Likewise.
2289 (captured_main): Likewise.
2290 * target.c (write_inferior_memory): Likewise.
2291 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2292 * tracepoint.c (init_trace_buffer): Likewise.
2293 (add_tracepoint_action): Likewise.
2294 (add_traceframe): Likewise.
2295 (add_traceframe_block): Likewise.
2296 (cmd_qtdpsrc): Likewise.
2297 (cmd_qtdv): Likewise.
2298 (cmd_qtstatus): Likewise.
2299 (response_source): Likewise.
2300 (response_tsv): Likewise.
2301 (cmd_qtnotes): Likewise.
2302 (gdb_collect): Likewise.
2303 (initialize_tracepoint): Likewise.
2304
afbe19f8
PL
23052015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2306
2307 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2308 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2309 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2310 <NOP>: New.
2311 (enum aarch64_condition_codes): New enum.
2312 (w0): New static global.
2313 (fp): Likewise.
2314 (lr): Likewise.
2315 (struct aarch64_memory_operand) <type>: New
2316 MEMORY_OPERAND_POSTINDEX type.
2317 (postindex_memory_operand): New helper function.
2318 (emit_ret): New function.
2319 (emit_load_store_pair): New function, factored out of emit_stp
2320 with support for MEMORY_OPERAND_POSTINDEX.
2321 (emit_stp): Rewrite using emit_load_store_pair.
2322 (emit_ldp): New function.
2323 (emit_load_store): Likewise.
2324 (emit_ldr): Mention post-index instruction in comment.
2325 (emit_ldrh): New function.
2326 (emit_ldrb): New function.
2327 (emit_ldrsw): Mention post-index instruction in comment.
2328 (emit_str): Likewise.
2329 (emit_subs): New function.
2330 (emit_cmp): Likewise.
2331 (emit_and): Likewise.
2332 (emit_orr): Likewise.
2333 (emit_orn): Likewise.
2334 (emit_eor): Likewise.
2335 (emit_mvn): Likewise.
2336 (emit_lslv): Likewise.
2337 (emit_lsrv): Likewise.
2338 (emit_asrv): Likewise.
2339 (emit_mul): Likewise.
2340 (emit_sbfm): Likewise.
2341 (emit_sbfx): Likewise.
2342 (emit_ubfm): Likewise.
2343 (emit_ubfx): Likewise.
2344 (emit_csinc): Likewise.
2345 (emit_cset): Likewise.
2346 (emit_nop): Likewise.
2347 (emit_ops_insns): New helper function.
2348 (emit_pop): Likewise.
2349 (emit_push): Likewise.
2350 (aarch64_emit_prologue): New function.
2351 (aarch64_emit_epilogue): Likewise.
2352 (aarch64_emit_add): Likewise.
2353 (aarch64_emit_sub): Likewise.
2354 (aarch64_emit_mul): Likewise.
2355 (aarch64_emit_lsh): Likewise.
2356 (aarch64_emit_rsh_signed): Likewise.
2357 (aarch64_emit_rsh_unsigned): Likewise.
2358 (aarch64_emit_ext): Likewise.
2359 (aarch64_emit_log_not): Likewise.
2360 (aarch64_emit_bit_and): Likewise.
2361 (aarch64_emit_bit_or): Likewise.
2362 (aarch64_emit_bit_xor): Likewise.
2363 (aarch64_emit_bit_not): Likewise.
2364 (aarch64_emit_equal): Likewise.
2365 (aarch64_emit_less_signed): Likewise.
2366 (aarch64_emit_less_unsigned): Likewise.
2367 (aarch64_emit_ref): Likewise.
2368 (aarch64_emit_if_goto): Likewise.
2369 (aarch64_emit_goto): Likewise.
2370 (aarch64_write_goto_address): Likewise.
2371 (aarch64_emit_const): Likewise.
2372 (aarch64_emit_call): Likewise.
2373 (aarch64_emit_reg): Likewise.
2374 (aarch64_emit_pop): Likewise.
2375 (aarch64_emit_stack_flush): Likewise.
2376 (aarch64_emit_zero_ext): Likewise.
2377 (aarch64_emit_swap): Likewise.
2378 (aarch64_emit_stack_adjust): Likewise.
2379 (aarch64_emit_int_call_1): Likewise.
2380 (aarch64_emit_void_call_2): Likewise.
2381 (aarch64_emit_eq_goto): Likewise.
2382 (aarch64_emit_ne_goto): Likewise.
2383 (aarch64_emit_lt_goto): Likewise.
2384 (aarch64_emit_le_goto): Likewise.
2385 (aarch64_emit_gt_goto): Likewise.
2386 (aarch64_emit_ge_got): Likewise.
2387 (aarch64_emit_ops_impl): New static global variable.
2388 (aarch64_emit_ops): New target function, return
2389 &aarch64_emit_ops_impl.
2390 (struct linux_target_ops): Install it.
2391
bb903df0
PL
23922015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2393
2394 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2395 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2396 aarch64-ipa.o.
2397 * linux-aarch64-ipa.c: New file.
2398 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2399 and endian.h.
2400 (aarch64_get_thread_area): New target method.
2401 (extract_signed_bitfield): New helper function.
2402 (aarch64_decode_ldr_literal): New function.
2403 (enum aarch64_opcodes): New enum.
2404 (struct aarch64_register): New struct.
2405 (struct aarch64_operand): New struct.
2406 (x0): New static global.
2407 (x1): Likewise.
2408 (x2): Likewise.
2409 (x3): Likewise.
2410 (x4): Likewise.
2411 (w2): Likewise.
2412 (ip0): Likewise.
2413 (sp): Likewise.
2414 (xzr): Likewise.
2415 (aarch64_register): New helper function.
2416 (register_operand): Likewise.
2417 (immediate_operand): Likewise.
2418 (struct aarch64_memory_operand): New struct.
2419 (offset_memory_operand): New helper function.
2420 (preindex_memory_operand): Likewise.
2421 (enum aarch64_system_control_registers): New enum.
2422 (ENCODE): New macro.
2423 (emit_insn): New helper function.
2424 (emit_b): New function.
2425 (emit_bcond): Likewise.
2426 (emit_cb): Likewise.
2427 (emit_tb): Likewise.
2428 (emit_blr): Likewise.
2429 (emit_stp): Likewise.
2430 (emit_ldp_q_offset): Likewise.
2431 (emit_stp_q_offset): Likewise.
2432 (emit_load_store): Likewise.
2433 (emit_ldr): Likewise.
2434 (emit_ldrsw): Likewise.
2435 (emit_str): Likewise.
2436 (emit_ldaxr): Likewise.
2437 (emit_stxr): Likewise.
2438 (emit_stlr): Likewise.
2439 (emit_data_processing_reg): Likewise.
2440 (emit_data_processing): Likewise.
2441 (emit_add): Likewise.
2442 (emit_sub): Likewise.
2443 (emit_mov): Likewise.
2444 (emit_movk): Likewise.
2445 (emit_mov_addr): Likewise.
2446 (emit_mrs): Likewise.
2447 (emit_msr): Likewise.
2448 (emit_sevl): Likewise.
2449 (emit_wfe): Likewise.
2450 (append_insns): Likewise.
2451 (can_encode_int32_in): New helper function.
2452 (aarch64_relocate_instruction): New function.
2453 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2454 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2455 (struct linux_target_ops): Install aarch64_get_thread_area,
2456 aarch64_install_fast_tracepoint_jump_pad and
2457 aarch64_get_min_fast_tracepoint_insn_len.
2458
787749ea
PL
24592015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2460
2461 * Makefile.in (aarch64-insn.o): New rule.
2462 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2463
9812b2e6
YQ
24642015-09-21 Yao Qi <yao.qi@linaro.org>
2465
2466 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2467
18fe412b
YQ
24682015-09-21 Yao Qi <yao.qi@linaro.org>
2469
2470 * tracepoint.c (max_jump_pad_size): Remove.
2471
a0cc84cd
YQ
24722015-09-18 Yao Qi <yao.qi@linaro.org>
2473
2474 * linux-aarch64-low.c: Don't include sys/uio.h.
2475 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2476
d78908cf
WW
24772015-09-16 Wei-cheng Wang <cole945@gmail.com>
2478
2479 * tracepoint.c (eval_result_type): Change prototype.
2480 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2481
d57e0d50
PA
24822015-09-15 Pedro Alves <palves@redhat.com>
2483
2484 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2485 Check whether to report exec events instead of checking whether
2486 multiprocess is enabled.
2487
5a676acc
PA
24882015-09-15 Pedro Alves <palves@redhat.com>
2489
2490 PR remote/18965
2491 * remote-utils.c (prepare_resume_reply): Merge
2492 TARGET_WAITKIND_VFORK_DONE switch case with the
2493 TARGET_WAITKIND_FORKED case.
2494
7c5d0fad
YQ
24952015-09-15 Yao Qi <yao.qi@linaro.org>
2496
2497 * server.c (handle_query): Check string comparison using
2498 "else if" instead of "if".
2499
750ce8d1
YQ
25002015-09-15 Yao Qi <yao.qi@linaro.org>
2501
2502 * server.c (vCont_supported): New global variable.
2503 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2504 matches. Append ";vContSupported+" to own_buf.
2505 (handle_v_requests): Append ";s;S" to own_buf if target supports
2506 hardware single step or vCont_supported is false.
2507 (capture_main): Set vCont_supported to zero.
2508
70b90b91
YQ
25092015-09-15 Yao Qi <yao.qi@linaro.org>
2510
2511 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2512 it to ...
2513 (linux_supports_hardware_single_step): ... New function.
2514 (linux_target_ops): Update.
2515 * lynx-low.c (lynx_target_ops): Set field
2516 supports_hardware_single_step to target_can_do_hardware_single_step.
2517 * nto-low.c (nto_target_ops): Likewise.
2518 * spu-low.c (spu_target_ops): Likewise.
2519 * win32-low.c (win32_target_ops): Likewise.
2520 * target.c (target_can_do_hardware_single_step): New function.
2521 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2522 Remove. <supports_hardware_single_step>: New field.
2523 (target_supports_conditional_breakpoints): Remove.
2524 (target_supports_hardware_single_step): New macro.
2525 (target_can_do_hardware_single_step): Declare.
2526 * server.c (handle_query): Use target_supports_hardware_single_step
2527 instead of target_supports_conditional_breakpoints.
2528
ade90bde
YQ
25292015-09-15 Yao Qi <yao.qi@linaro.org>
2530
2531 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2532 function.
2533 (struct linux_target_ops the_low_target): Install
2534 aarch64_linux_siginfo_fixup.
2535
94585166
DB
25362015-09-11 Don Breazeal <donb@codesourcery.com>
2537 Luis Machado <lgustavo@codesourcery.com>
2538
2539 * linux-low.c (linux_mourn): Static declaration.
2540 (linux_arch_setup): Move in front of
2541 handle_extended_wait.
2542 (linux_arch_setup_thread): New function.
2543 (handle_extended_wait): Handle exec events. Call
2544 linux_arch_setup_thread. Make event_lwp argument a
2545 pointer-to-a-pointer.
2546 (check_zombie_leaders): Do not check stopped threads.
2547 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2548 (linux_low_filter_event): Add lwp and thread for exec'ing
2549 non-leader thread if leader thread has been deleted.
2550 Refactor code into linux_arch_setup_thread and call it.
2551 Pass child lwp pointer by reference to handle_extended_wait.
2552 (linux_wait_for_event_filtered): Update comment.
2553 (linux_wait_1): Prevent clobbering exec event status.
2554 (linux_supports_exec_events): New function.
2555 (linux_target_ops) <supports_exec_events>: Initialize new member.
2556 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2557 new member.
2558 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2559 * server.c (report_exec_events): New global variable.
2560 (handle_query): Handle qSupported query for exec-events feature.
2561 (captured_main): Initialize report_exec_events.
2562 * server.h (report_exec_events): Declare new global variable.
2563 * target.h (struct target_ops) <supports_exec_events>: New
2564 member.
2565 (target_supports_exec_events): New macro.
2566 * win32-low.c (win32_target_ops) <supports_exec_events>:
2567 Initialize new member.
2568
0568462b
MM
25692015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2570
2571 * linux-low.c (linux_low_enable_btrace): Remove.
2572 (linux_target_ops): Replace linux_low_enable_btrace with
2573 linux_enable_btrace.
2574
39edd165
YQ
25752015-09-03 Yao Qi <yao.qi@linaro.org>
2576
2577 * linux-aarch64-low.c (aarch64_insert_point): Call
2578 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2579 returns true.
2580
1db33b5a
UW
25812015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2582
2583 * linux-low.c (check_stopped_by_breakpoint): Use
2584 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2585
ab290430
PA
25862015-08-27 Pedro Alves <palves@redhat.com>
2587
2588 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2589
8d749320
SM
25902015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2591
6711b7f8
SM
2592 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2593 the XNEW-family equivalent.
8d749320
SM
2594 (compile_bytecodes): Likewise.
2595 * dll.c (loaded_dll): Likewise.
2596 * event-loop.c (append_callback_event): Likewise.
2597 (create_file_handler): Likewise.
2598 (create_file_event): Likewise.
2599 * hostio.c (handle_open): Likewise.
2600 * inferiors.c (add_thread): Likewise.
2601 (add_process): Likewise.
2602 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2603 * linux-arm-low.c (arm_new_process): Likewise.
2604 (arm_new_thread): Likewise.
2605 * linux-low.c (add_to_pid_list): Likewise.
2606 (linux_add_process): Likewise.
2607 (handle_extended_wait): Likewise.
2608 (add_lwp): Likewise.
2609 (enqueue_one_deferred_signal): Likewise.
2610 (enqueue_pending_signal): Likewise.
2611 (linux_resume_one_lwp_throw): Likewise.
2612 (linux_resume_one_thread): Likewise.
2613 (linux_read_memory): Likewise.
2614 (linux_write_memory): Likewise.
2615 * linux-mips-low.c (mips_linux_new_process): Likewise.
2616 (mips_linux_new_thread): Likewise.
2617 (mips_add_watchpoint): Likewise.
2618 * linux-x86-low.c (initialize_low_arch): Likewise.
2619 * lynx-low.c (lynx_add_process): Likewise.
2620 * mem-break.c (set_raw_breakpoint_at): Likewise.
2621 (set_breakpoint): Likewise.
2622 (add_condition_to_breakpoint): Likewise.
2623 (add_commands_to_breakpoint): Likewise.
2624 (clone_agent_expr): Likewise.
2625 (clone_one_breakpoint): Likewise.
2626 * regcache.c (new_register_cache): Likewise.
2627 * remote-utils.c (look_up_one_symbol): Likewise.
2628 * server.c (queue_stop_reply): Likewise.
2629 (start_inferior): Likewise.
2630 (queue_stop_reply_callback): Likewise.
2631 (handle_target_event): Likewise.
2632 * spu-low.c (fetch_ppc_memory): Likewise.
2633 (store_ppc_memory): Likewise.
2634 * target.c (set_target_ops): Likewise.
2635 * thread-db.c (thread_db_load_search): Likewise.
2636 (try_thread_db_load_1): Likewise.
2637 * tracepoint.c (add_tracepoint): Likewise.
2638 (add_tracepoint_action): Likewise.
2639 (create_trace_state_variable): Likewise.
2640 (cmd_qtdpsrc): Likewise.
2641 (cmd_qtro): Likewise.
2642 (add_while_stepping_state): Likewise.
2643 * win32-low.c (child_add_thread): Likewise.
2644 (get_image_name): Likewise.
2645
ed8b7b42
YQ
26462015-08-25 Yao Qi <yao.qi@linaro.org>
2647
2648 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2649
db3cb7cb
YQ
26502015-08-25 Yao Qi <yao.qi@linaro.org>
2651
2652 * Makefile.in (aarch64-linux.o): New rule.
2653 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2654 srv_tgtobj.
2655 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2656 (aarch64_init_debug_reg_state): Make it extern.
2657 (aarch64_linux_prepare_to_resume): Remove.
2658
f6011a1c
YQ
26592015-08-25 Yao Qi <yao.qi@linaro.org>
2660
2661 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2662 lwp_arch_private_info and ptid_of_lwp.
2663
88e2cf7e
YQ
26642015-08-25 Yao Qi <yao.qi@linaro.org>
2665
2666 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2667 Find proc_info by find_process_pid. All callers updated.
2668
5e35436e
YQ
26692015-08-25 Yao Qi <yao.qi@linaro.org>
2670
2671 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2672 Remove.
2673 (debug_reg_change_callback): Remove.
2674 (aarch64_notify_debug_reg_change): Remove.
2675
4a8a7965
YQ
26762015-08-25 Yao Qi <yao.qi@linaro.org>
2677
2678 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2679 Call current_lwp_ptid.
2680
32a271ee
YQ
26812015-08-25 Yao Qi <yao.qi@linaro.org>
2682
2683 * linux-aarch64-low.c (debug_reg_change_callback): Use
2684 debug_printf.
2685
0d51c8d7
YQ
26862015-08-25 Yao Qi <yao.qi@linaro.org>
2687
2688 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2689
31a43dd5
YQ
26902015-08-25 Yao Qi <yao.qi@linaro.org>
2691
2692 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2693
8ee52567
YQ
26942015-08-25 Yao Qi <yao.qi@linaro.org>
2695
2696 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2697 the code.
2698
ff3f0f45
YQ
26992015-08-25 Yao Qi <yao.qi@linaro.org>
2700
2701 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2702 Remove.
2703 (debug_reg_change_callback): Remove argument entry and add argument
2704 lwp. Remove local variable thread. Don't print thread id in the
2705 debugging output. Don't check whether pid of thread equals to pid.
2706 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2707 iterate_over_lwps instead find_inferior.
2708
3d40fbb5
PA
27092015-08-24 Pedro Alves <palves@redhat.com>
2710
2711 * inferiors.c (get_first_process): New function.
2712 * inferiors.h (get_first_process): New declaration.
2713 * remote-utils.c (read_ptid): Default to the first process in the
2714 list, instead of to the current thread's process.
2715
438e1e42
PA
27162015-08-24 Pedro Alves <palves@redhat.com>
2717
2718 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2719 * event-loop.c: Likewise.
2720 * remote-utils.c: Likewise.
2721 * tracepoint.c: Likewise.
2722
a8c6d4fc
PA
27232015-08-24 Pedro Alves <palves@redhat.com>
2724
2725 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2726 ptid_get_lwp.
2727
99b0bb12
PA
27282015-08-21 Pedro Alves <palves@redhat.com>
2729
2730 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2731 instead of literal 1.
2732
f8904751
PA
27332015-08-21 Pedro Alves <palves@redhat.com>
2734
2735 * tdesc.c (default_description): Explicitly zero-initialize.
2736
465a859e
PA
27372015-08-21 Pedro Alves <palves@redhat.com>
2738
2739 PR gdb/18749
2740 * inferiors.c (remove_thread): Discard any pending stop reply for
2741 this thread.
2742 * server.c (remove_all_on_match_pid): Rename to ...
2743 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2744 instead of a pid.
2745 (discard_queued_stop_replies): Change parameter to a ptid. Now
2746 extern.
2747 (handle_v_kill, kill_inferior_callback, captured_main)
2748 (process_serial_event): Adjust.
2749 * server.h (discard_queued_stop_replies): Declare.
2750
f0db101d
PA
27512015-08-21 Pedro Alves <palves@redhat.com>
2752
2753 * linux-low.c (wait_for_sigstop): Always switch to no thread
2754 selected if the previously current thread dies.
2755 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2756 process instead of the current thread's.
2757 * remote-utils.c (input_interrupt): Don't check if there's no
2758 current thread.
2759 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2760 current thread to the general thread fails, error out.
2761 (handle_qxfer_auxv, handle_qxfer_libraries)
2762 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2763 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2764 (handle_query): Check if there's a thread selected instead of
2765 checking whether there's any thread in the thread list.
2766 (handle_qxfer_threads, handle_qxfer_btrace)
2767 (handle_qxfer_btrace_conf): Don't error out early if there's no
2768 thread in the thread list.
2769 (handle_v_cont, myresume): Don't set the current thread to the
2770 continue thread.
2771 (process_serial_event) <Hg handling>: Also set thread_id if the
2772 previous general thread is still alive.
2773 (process_serial_event) <g/G handling>: If setting the current
2774 thread to the general thread fails, error out.
2775 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2776 thread's lwp instead of the current thread's.
2777 * target.c (set_desired_thread): If the desired thread was not
2778 found, leave the current thread pointing to NULL. Return an int
2779 (boolean) indicating success.
2780 * target.h (set_desired_thread): Change return type to int.
2781
40045d91
MF
27822015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2783
2784 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2785 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2786 #includes.
2787 (ps_get_thread_area): New function.
2788
45face3b
GB
27892015-08-19 Gary Benson <gbenson@redhat.com>
2790
2791 * hostio.c (handle_pread): Do not attempt to read more data
2792 than hostio_reply_with_data can fit in a packet.
2793
16d5f642
JB
27942015-08-18 Joel Brobecker <brobecker@adacore.com>
2795
2796 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2797
a738da3a
MF
27982015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2799
2800 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2801
33ebda9d
PA
28022015-08-06 Pedro Alves <palves@redhat.com>
2803
2804 * tracepoint.c (expr_eval_result): Now an int.
2805
a44892be
PA
28062015-08-06 Pedro Alves <palves@redhat.com>
2807
2808 * gdbthread.h (struct regcache): Forward declare.
2809 (struct thread_info) <regcache_data>: Now a struct regcache
2810 pointer.
2811 * inferiors.c (inferior_regcache_data)
2812 (set_inferior_regcache_data): Now work with struct regcache
2813 pointers.
2814 * inferiors.h (struct regcache): Forward declare.
2815 (inferior_regcache_data, set_inferior_regcache_data): Now work
2816 with struct regcache pointers.
2817 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2818 (free_register_cache_thread): Remove struct regcache pointer
2819 casts.
2820
608a1e46
PA
28212015-08-06 Pedro Alves <palves@redhat.com>
2822
2823 * server.c (captured_main): On error, print the exception message
2824 to stderr, and if run_once is set, throw a quit.
2825
f0ce0d3a
PA
28262015-08-06 Pedro Alves <palves@redhat.com>
2827
2828 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2829 the current thread.
2830
bf47e248
PA
28312015-08-06 Pedro Alves <palves@redhat.com>
2832
2833 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2834 reading beyond the passed in buffer length.
2835
b6b9ffcc
PL
28362015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2837
2838 * tracepoint.c (symbol_list) <required>: Remove.
2839
863d01bd
PA
28402015-08-06 Pedro Alves <palves@redhat.com>
2841
2842 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2843 count if stopping and suspending threads.
2844 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2845 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2846 (linux_detach): Complete an ongoing step-over.
2847 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2848 throughout.
2849 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2850 (linux_wait_1): If passing a signal to the inferior after
2851 finishing a step-over, unsuspend and re-resume all lwps. If we
2852 see a single-step event but the thread should be continuing, don't
2853 pass the trap to gdb.
2854 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2855 internal_error instead of gdb_assert.
2856 (enqueue_pending_signal): New function.
2857 (check_ptrace_stopped_lwp_gone): Add debug output.
2858 (start_step_over): Use internal_error instead of gdb_assert.
2859 (complete_ongoing_step_over): New function.
2860 (linux_resume_one_thread): Don't resume a suspended thread.
2861 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2862 it stepping.
2863
00db26fa
PA
28642015-08-06 Pedro Alves <palves@redhat.com>
2865
2866 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2867 (linux_thread_alive): Use lwp_is_marked_dead.
2868 (extended_event_reported): Delete.
2869 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2870 instead of extended_event_reported.
2871 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2872 as well.
2873 (lwp_is_marked_dead): New function.
2874 (lwp_running): Use lwp_is_marked_dead.
2875 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2876 comment.
2877
ad071a30
PA
28782015-08-06 Pedro Alves <palves@redhat.com>
2879
2880 * linux-low.c (linux_wait_1): Move fork event output out of the
2881 !report_to_gdb check. Pass event_child->waitstatus to
2882 target_waitstatus_to_string instead of ourstatus.
2883
524b57e6
YQ
28842015-08-04 Yao Qi <yao.qi@linaro.org>
2885
2886 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2887 if current_thread is 32 bit.
2888
6085d6f6
YQ
28892015-08-04 Yao Qi <yao.qi@linaro.org>
2890
2891 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2892 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2893 * server.c (extended_protocol): Remove "static".
2894 * server.h (extended_protocol): Declare it.
2895
8a7e4587
YQ
28962015-08-04 Yao Qi <yao.qi@linaro.org>
2897
2898 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2899 both aarch64 and aarch32.
2900 (aarch64_set_pc): Likewise.
2901
3b53ae99
YQ
29022015-08-04 Yao Qi <yao.qi@linaro.org>
2903
2904 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2905 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2906 arm-with-neon.xml to srv_xmlfiles.
2907 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2908 (is_64bit_tdesc): New function.
2909 (aarch64_linux_read_description): New function.
2910 (aarch64_arch_setup): Call aarch64_linux_read_description.
2911 (regs_info): Rename to regs_info_aarch64.
2912 (aarch64_regs_info): Return right regs_info.
2913 (initialize_low_arch): Call initialize_low_arch_aarch32.
2914
bd9e6534
YQ
29152015-08-04 Yao Qi <yao.qi@linaro.org>
2916
2917 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2918 * linux-aarch32-low.c: New file.
2919 * linux-aarch32-low.h: New file.
2920 * linux-arm-low.c (arm_fill_gregset): Move it to
2921 linux-aarch32-low.c.
2922 (arm_store_gregset): Likewise.
2923 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2924 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2925 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2926 (regs_info): Rename to regs_info_arm.
2927 (arm_regs_info): Return regs_info_aarch32 if
2928 have_ptrace_getregset is 1 and target description is
2929 arm_with_neon or arm_with_vfpv3.
2930 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2931 Call initialize_low_arch_aarch32 instead.
2932
ded48a5e
YQ
29332015-08-04 Yao Qi <yao.qi@linaro.org>
2934
2935 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2936 * linux-low.c: ... here.
2937 * linux-low.h (have_ptrace_getregset): Declare it.
2938
96e9210f
PA
29392015-08-04 Pedro Alves <palves@redhat.com>
2940
2941 * thread-db.c (struct thread_db): Use new typedefs.
2942 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2943 CHK calls.
2944 (disable_thread_event_reporting): Cast result of dlsym to
2945 destination function pointer type.
2946 (thread_db_mourn): Use td_ta_delete_ftype.
2947
af60a1ef
SL
29482015-08-03 Sandra Loosemore <sandra@codesourcery.com>
2949
2950 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2951 arch variant.
2952 (CDX_BREAKPOINT): Define for R2.
2953 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2954 (the_low_target): Add comments.
2955
e8b41681
YQ
29562015-07-30 Yao Qi <yao.qi@linaro.org>
2957
2958 * linux-arm-low.c (arm_hwcap): Remove it.
2959 (arm_read_description): New local variable arm_hwcap. Don't
2960 set arm_hwcap to zero.
2961
89abb039
YQ
29622015-07-30 Yao Qi <yao.qi@linaro.org>
2963
2964 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2965 Use regcache->tdesc instead.
2966 (arm_store_wmmxregset): Likewise.
2967 (arm_fill_vfpregset): Likewise.
2968 (arm_store_vfpregset): Likewise.
2969
deca266c
YQ
29702015-07-30 Yao Qi <yao.qi@linaro.org>
2971
2972 * linux-arm-low.c: Include arch/arm.h.
2973 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2974 (arm_store_gregset): Likewise.
2975
aa58a496
SM
29762015-07-29 Simon Marchi <simon.marchi@ericsson.com>
2977
2978 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2979 ptrace's 4th parameter.
2980
50904b25
YQ
29812015-07-27 Yao Qi <yao.qi@linaro.org>
2982
2983 * configure.srv (case aarch64*-*-linux*): Don't set
2984 srv_linux_usrregs.
2985
5826e159
PA
29862015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
2987
2988 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2989 sys/ptrace.h.
2990 * linux-arm-low.c: Likewise.
2991 * linux-cris-low.c: Likewise.
2992 * linux-crisv32-low.c: Likewise.
2993 * linux-low.c: Likewise.
2994 * linux-m68k-low.c: Likewise.
2995 * linux-mips-low.c: Likewise.
2996 * linux-nios2-low.c: Likewise.
2997 * linux-s390-low.c: Likewise.
2998 * linux-sparc-low.c: Likewise.
2999 * linux-tic6x-low.c: Likewise.
3000 * linux-tile-low.c: Likewise.
3001 * linux-x86-low.c: Likewise.
3002
54019719
PA
30032015-07-24 Pedro Alves <palves@redhat.com>
3004
3005 * config.in: Regenerate.
3006 * configure: Regenerate.
3007
eb7aa561
PA
30082015-07-24 Pedro Alves <palves@redhat.com>
3009
3010 * acinclude.m4: Include ../ptrace.m4.
3011 * configure.ac: Call GDB_AC_PTRACE.
3012 * config.in, configure: Regenerate.
3013
55d7b841
YQ
30142015-07-24 Yao Qi <yao.qi@linaro.org>
3015
3016 * linux-low.c (linux_create_inferior): Remove setting to
3017 proc->priv->new_inferior.
3018 (linux_attach): Likewise.
3019 (linux_low_filter_event): Likewise.
3020 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3021
c06cbd92
YQ
30222015-07-24 Yao Qi <yao.qi@linaro.org>
3023
3024 * linux-low.c (linux_arch_setup): New function.
3025 (linux_low_filter_event): If proc->tdesc is NULL and
3026 proc->attached is true, call the_low_target.arch_setup.
3027 Otherwise, keep status pending, and return.
3028 (linux_resume_one_lwp_throw): Don't call get_pc if
3029 thread->while_stepping isn't NULL. Don't call
3030 get_thread_regcache if proc->tdesc is NULL.
3031 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3032 (linux_target_ops): Install arch_setup.
3033 * server.c (start_inferior): Call the_target->arch_setup.
3034 * target.h (struct target_ops) <arch_setup>: New field.
3035 (target_arch_setup): New marco.
3036 * lynx-low.c (lynx_target_ops): Update.
3037 * nto-low.c (nto_target_ops): Update.
3038 * spu-low.c (spu_target_ops): Update.
3039 * win32-low.c (win32_target_ops): Update.
3040
5ae3ebba
YQ
30412015-07-24 Yao Qi <yao.qi@linaro.org>
3042
3043 * linux-low.c (linux_add_process): Don't set
3044 proc->priv->new_inferior.
3045 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3046 (linux_attach): Likewise.
3047
eb97750b
YQ
30482015-07-24 Yao Qi <yao.qi@linaro.org>
3049
3050 * server.c (start_inferior): Code refactor.
3051
51aee833
YQ
30522015-07-24 Yao Qi <yao.qi@linaro.org>
3053
3054 * server.c (process_serial_event): Set general_thread.
3055
af1b22f3
YQ
30562015-07-21 Yao Qi <yao.qi@linaro.org>
3057
3058 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3059 aarch64_linux_get_debug_reg_capacity.
3060
554717a3
YQ
30612015-07-17 Yao Qi <yao.qi@linaro.org>
3062
3063 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3064 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3065 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3066 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3067 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3068 (AARCH64_HWP_ALIGNMENT): Likewise.
3069 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3070 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3071 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3072 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3073 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3074 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3075 (struct aarch64_debug_reg_state): Likewise.
3076 (struct arch_lwp_info): Likewise.
3077 (aarch64_align_watchpoint): Likewise.
3078 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3079 (aarch64_watchpoint_length): Likewise.
3080 (aarch64_point_encode_ctrl_reg): Likewise
3081 (aarch64_point_is_aligned): Likewise.
3082 (aarch64_align_watchpoint): Likewise.
3083 (aarch64_linux_set_debug_regs):
3084 (aarch64_dr_state_insert_one_point): Likewise.
3085 (aarch64_dr_state_remove_one_point): Likewise.
3086 (aarch64_handle_breakpoint): Likewise.
3087 (aarch64_handle_aligned_watchpoint): Likewise.
3088 (aarch64_handle_unaligned_watchpoint): Likewise.
3089 (aarch64_handle_watchpoint): Likewise.
3090
c67ca4de
YQ
30912015-07-17 Yao Qi <yao.qi@linaro.org>
3092
3093 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3094 and don't aarch64_get_debug_reg_state. All callers update.
3095 (aarch64_handle_aligned_watchpoint): Likewise.
3096 (aarch64_handle_unaligned_watchpoint): Likewise.
3097 (aarch64_handle_watchpoint): Likewise.
3098 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3099 (aarch64_remove_point): Likewise.
3100
25abf979
YQ
31012015-07-17 Yao Qi <yao.qi@linaro.org>
3102
3103 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3104 debug_printf.
3105 (aarch64_handle_unaligned_watchpoint): Likewise.
3106
db1ff28b
JK
31072015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3108
3109 Revert the previous 3 commits:
3110 Move gdb_regex* to common/
3111 Move linux_find_memory_regions_full & co.
3112 gdbserver build-id attribute generator
3113
700ca40f
JK
31142015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3115 Jan Kratochvil <jan.kratochvil@redhat.com>
3116
3117 gdbserver build-id attribute generator.
3118 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3119 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3120 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3121 (find_phdr): New.
3122 (get_dynamic): Use find_pdhr to traverse program headers.
3123 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3124 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3125 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3126 (get_hex_build_id): New.
3127 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3128 to reply XML document.
3129
9904185c
JK
31302015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3131 Jan Kratochvil <jan.kratochvil@redhat.com>
3132
3133 * target.c: Include target/target-utils.h and fcntl.h.
3134 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3135 (target_fileio_read_stralloc): New functions.
3136
6e5b4429
JK
31372015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3138
3139 * Makefile.in (OBS): Add gdb_regex.o.
3140 (gdb_regex.o): New.
3141 * config.in: Rebuilt.
3142 * configure: Rebuilt.
3143
ddc98fbf
JK
31442015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3145 Jan Kratochvil <jan.kratochvil@redhat.com>
3146
3147 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3148 * Makefile.in (OBS): Add target-utils.o.
3149 (linux-maps.o, target-utils.o): New.
3150 * configure.srv (srv_linux_obj): Add linux-maps.o.
3151
e57bb7a0
PL
31522015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3153
3154 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3155 function, return 1.
3156 (the_low_target): Install it.
3157
586b02a9
PA
31582015-07-14 Pedro Alves <palves@redhat.com>
3159
3160 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3161 Instead, ignore ECHILD, and throw an error for other errnos.
3162
58c1b36c
PA
31632015-07-10 Pedro Alves <palves@redhat.com>
3164
3165 * event-loop.c (struct callback_event) <data>: Change type to
3166 gdb_client_data instance instead of gdb_client_data pointer.
3167 (append_callback_event): Adjust.
3168
421530db
PL
31692015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3170
3171 * linux-aarch64-low.c: Add comments for each linux_target_ops
3172 method. Remove comments already covered in target_ops and
3173 linux_target_ops definitions.
3174 (the_low_target): Add comments for each unimplemented method.
3175
c2d65f38
YQ
31762015-07-09 Yao Qi <yao.qi@linaro.org>
3177
3178 * linux-aarch64-low.c (aarch64_regmap): Remove.
3179 (aarch64_usrregs_info): Remove.
3180 (regs_info): Set field usrregs to NULL.
3181
b20a6524
MM
31822015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3183
3184 * linux-low.c: Include "rsp-low.h"
3185 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3186 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3187 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3188 (handle_btrace_enable_pt): New.
3189 (handle_btrace_general_set): Support "pt".
3190 (handle_btrace_conf_general_set): Support "pt:size".
3191
96c97461
PL
31922015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3193
3194 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3195 Z_PACKET_SW_BP.
3196
37d66942
PL
31972015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3198
3199 * linux-aarch64-low.c: Remove comment about endianness.
3200 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3201 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3202 memcmp.
3203
dc06243f
GB
32042015-06-24 Gary Benson <gbenson@redhat.com>
3205
3206 * linux-i386-ipa.c (stdint.h): Do not include.
3207 * lynx-i386-low.c (stdint.h): Likewise.
3208 * lynx-ppc-low.c (stdint.h): Likewise.
3209 * mem-break.c (stdint.h): Likewise.
3210 * thread-db.c (stdint.h): Likewise.
3211 * tracepoint.c (stdint.h): Likewise.
3212 * win32-low.c (stdint.h): Likewise.
3213
124e13d9
SM
32142015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3215
3216 * server.c (write_qxfer_response): Update call to
3217 remote_escape_output.
3218
909c2cda
JK
32192015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3220 Jan Kratochvil <jan.kratochvil@redhat.com>
3221
3222 Merge multiple hex conversions.
3223 * gdbreplay.c (tohex): Rename to 'fromhex'.
3224 (logchar): Use fromhex.
3225
24c05f46
JK
32262015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3227
3228 * server.c (handle_qxfer_libraries): Set `version' attribute for
3229 <library-list>.
3230
14d2069a
GB
32312015-06-10 Gary Benson <gbenson@redhat.com>
3232
3233 * target.h (struct target_ops) <multifs_open>: New field.
3234 <multifs_unlink>: Likewise.
3235 <multifs_readlink>: Likewise.
3236 * linux-low.c (nat/linux-namespaces.h): New include.
3237 (linux_target_ops): Initialize the_target->multifs_open,
3238 the_target->multifs_unlink and the_target->multifs_readlink.
3239 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3240 * hostio.c (hostio_fs_pid): New static variable.
3241 (hostio_handle_new_gdb_connection): New function.
3242 (handle_setfs): Likewise.
3243 (handle_open): Use the_target->multifs_open as appropriate.
3244 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3245 (handle_readlink): Use the_target->multifs_readlink as
3246 appropriate.
3247 (handle_vFile): Handle vFile:setfs packets.
3248 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3249 after target_handle_new_gdb_connection.
3250
4b8b5e72
GB
32512015-06-10 Gary Benson <gbenson@redhat.com>
3252
3253 * configure.ac (AC_CHECK_FUNCS): Add setns.
3254 * config.in: Regenerate.
3255 * configure: Likewise.
3256 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3257 (linux-namespaces.o): New rule.
3258 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3259
3ac2e371
GB
32602015-06-09 Gary Benson <gbenson@redhat.com>
3261
3262 * hostio.c (handle_open): Process mode argument with
3263 fileio_to_host_mode.
3264
ca9b78ce
YQ
32652015-06-01 Yao Qi <yao.qi@linaro.org>
3266
3267 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3268 * linux-x86-low.c: Likewise.
3269
bfacd19d
DB
32702015-05-28 Don Breazeal <donb@codesourcery.com>
3271
3272 * linux-low.c (handle_extended_wait): Initialize
3273 thread_info.last_resume_kind for new fork children.
3274
452003ef
PA
32752015-05-15 Pedro Alves <palves@redhat.com>
3276
3277 * target.h (target_handle_new_gdb_connection): Rewrite using if
3278 wrapped in do/while.
3279
1041a03c
JB
32802015-05-14 Joel Brobecker <brobecker@adacore.com>
3281
3282 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3283 * configure, config.in: Regenerate.
3284 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3285 Declare typedef.
3286
c269dbdb
DB
32872015-05-12 Don Breazeal <donb@codesourcery.com>
3288
3289 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3290 PTRACE_EVENT_VFORK_DONE.
3291 (linux_low_ptrace_options, extended_event_reported): Add vfork
3292 events.
3293 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3294 and "vforkdone" for RSP 'T' Stop Reply Packet.
3295 * server.h (report_vfork_events): Declare
3296 global variable.
3297
3a8a0396
DB
32982015-05-12 Don Breazeal <donb@codesourcery.com>
3299
3300 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3301 (the_low_target) <new_fork>: Initialize new member.
3302 * linux-arm-low.c (arm_new_fork): New function.
3303 (the_low_target) <new_fork>: Initialize new member.
3304 * linux-low.c (handle_extended_wait): Call new target function
3305 new_fork.
3306 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3307 * linux-mips-low.c (mips_add_watchpoint): New function
3308 extracted from mips_insert_point.
3309 (the_low_target) <new_fork>: Initialize new member.
3310 (mips_linux_new_fork): New function.
3311 (mips_insert_point): Call mips_add_watchpoint.
3312 * linux-x86-low.c (x86_linux_new_fork): New function.
3313 (the_low_target) <new_fork>: Initialize new member.
3314
de0d863e
DB
33152015-05-12 Don Breazeal <donb@codesourcery.com>
3316
3317 * linux-low.c (handle_extended_wait): Implement return value,
3318 rename argument 'event_child' to 'event_lwp', handle
3319 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3320 (linux_low_ptrace_options): New function.
3321 (linux_low_filter_event): Call linux_low_ptrace_options,
3322 use different argument fo linux_enable_event_reporting,
3323 use return value from handle_extended_wait.
3324 (extended_event_reported): New function.
3325 (linux_wait_1): Call extended_event_reported and set
3326 status to report fork events.
3327 (linux_write_memory): Add pid to debug message.
3328 (reset_lwp_ptrace_options_callback): New function.
3329 (linux_handle_new_gdb_connection): New function.
3330 (linux_target_ops): Initialize new structure member.
3331 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3332 * lynx-low.c: Initialize new structure member.
3333 * remote-utils.c (prepare_resume_reply): Implement stop reason
3334 "fork" for "T" stop message.
3335 * server.c (handle_query): Call handle_new_gdb_connection.
3336 * server.h (report_fork_events): Declare global flag.
3337 * target.h (struct target_ops) <handle_new_gdb_connection>:
3338 New member.
3339 (target_handle_new_gdb_connection): New macro.
3340 * win32-low.c: Initialize new structure member.
3341
ddcbc397
DB
33422015-05-12 Don Breazeal <donb@codesourcery.com>
3343
3344 * mem-break.c (APPEND_TO_LIST): Define macro.
3345 (clone_agent_expr): New function.
3346 (clone_one_breakpoint): New function.
3347 (clone_all_breakpoints): New function.
3348 * mem-break.h: Declare new functions.
3349
89245bc0
DB
33502015-05-12 Don Breazeal <donb@codesourcery.com>
3351
3352 * linux-low.c (linux_supports_fork_events): New function.
3353 (linux_supports_vfork_events): New function.
3354 (linux_target_ops): Initialize new structure members.
3355 (initialize_low): Call linux_check_ptrace_features.
3356 * lynx-low.c (lynx_target_ops): Initialize new structure
3357 members.
3358 * server.c (report_fork_events, report_vfork_events):
3359 New global flags.
3360 (handle_query): Add new features to qSupported packet and
3361 response.
3362 (captured_main): Initialize new global variables.
3363 * target.h (struct target_ops) <supports_fork_events>:
3364 New member.
3365 <supports_vfork_events>: New member.
3366 (target_supports_fork_events): New macro.
3367 (target_supports_vfork_events): New macro.
3368 * win32-low.c (win32_target_ops): Initialize new structure
3369 members.
3370
835205d0
GB
33712015-05-12 Gary Benson <gbenson@redhat.com>
3372
3373 * server.c (handle_qxfer_exec_file): Use current process
3374 if annex is empty.
3375
21e94bd9
SL
33762015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3377
3378 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3379 Remove HAVE_PTRACE_GETREGS conditionals.
3380 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3381 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3382
45614f15
YQ
33832015-05-08 Yao Qi <yao.qi@linaro.org>
3384
3385 * linux-low.c (linux_supports_conditional_breakpoints): New
3386 function.
3387 (linux_target_ops): Install new target method.
3388 * lynx-low.c (lynx_target_ops): Install NULL hook for
3389 supports_conditional_breakpoints.
3390 * nto-low.c (nto_target_ops): Likewise.
3391 * spu-low.c (spu_target_ops): Likewise.
3392 * win32-low.c (win32_target_ops): Likewise.
3393 * server.c (handle_query): Check
3394 target_supports_conditional_breakpoints.
3395 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3396 New field.
3397 (target_supports_conditional_breakpoints): New macro.
3398
80ad801e
PA
33992015-05-06 Pedro Alves <palves@redhat.com>
3400
3401 PR server/18081
3402 * server.c (start_inferior): If the process exits, mourn it.
3403
819843c7
GB
34042015-04-21 Gary Benson <gbenson@redhat.com>
3405
3406 * hostio.c (fileio_open_flags_to_host): Factored out to
3407 fileio_to_host_openflags in common/fileio.c. Single use
3408 updated.
3409
a2d5a9d7
MF
34102015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3411
3412 * linux-xtensa-low.c (xtensa_fill_gregset)
3413 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3414 XCHAL_HAVE_LOOP.
3415
deb44829
MF
34162015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3417
3418 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3419 (regs_info): Replace usrregs pointer with NULL.
3420
e57f1de3
GB
34212015-04-17 Gary Benson <gbenson@redhat.com>
3422
3423 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3424 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3425 * server.c (handle_qxfer_exec_file): New function.
3426 (qxfer_packets): Add exec-file entry.
3427 (handle_query): Report qXfer:exec-file:read as supported packet.
3428
62828379
RN
34292015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3430
3431 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3432
b88bb450
GB
34332015-04-09 Gary Benson <gbenson@redhat.com>
3434
3435 * hostio-errno.c (errno_to_fileio_error): Remove function.
3436 Update caller to use remote_fileio_to_fio_error.
3437
c8f4bfdd
YQ
34382015-04-09 Yao Qi <yao.qi@linaro.org>
3439
3440 * linux-low.c (linux_insert_point): Call
3441 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3442 (linux_remove_point): Call remove_memory_breakpoint if type is
3443 raw_bkpt_type_sw.
3444 * linux-x86-low.c (x86_insert_point): Don't call
3445 insert_memory_breakpoint.
3446 (x86_remove_point): Don't call remove_memory_breakpoint.
3447
41f98f02
PA
34482015-04-01 Pedro Alves <palves@redhat.com>
3449 Cleber Rosa <crosa@redhat.com>
3450
3451 * server.c (gdbserver_usage): Reorganize and extend the usage
3452 message.
3453
2bf6fb9d
PA
34542015-03-24 Pedro Alves <palves@redhat.com>
3455
3456 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3457 output. Also dump TRAP_TRACE.
3458 (linux_low_filter_event): In debug output, distinguish a
3459 resume_stop SIGSTOP from a delayed SIGSTOP.
3460
369f6daa
GB
34612015-03-24 Gary Benson <gbenson@redhat.com>
3462
3463 * linux-x86-low.c (x86_linux_new_thread): Moved to
3464 nat/x86-linux.c.
3465 (x86_linux_prepare_to_resume): Likewise.
3466
8e5d4070
GB
34672015-03-24 Gary Benson <gbenson@redhat.com>
3468
3469 * Makefile.in (x86-linux-dregs.o): New rule.
3470 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3471 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3472 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3473 (x86_linux_dr_get): Likewise.
3474 (x86_linux_dr_set): Likewise.
3475 (update_debug_registers_callback): Likewise.
3476 (x86_linux_dr_set_addr): Likewise.
3477 (x86_linux_dr_get_addr): Likewise.
3478 (x86_linux_dr_set_control): Likewise.
3479 (x86_linux_dr_get_control): Likewise.
3480 (x86_linux_dr_get_status): Likewise.
3481 (x86_linux_update_debug_registers): Likewise.
3482
2b95d440
GB
34832015-03-24 Gary Benson <gbenson@redhat.com>
3484
3485 * linux-x86-low.c (x86_linux_update_debug_registers):
3486 New function, factored out from...
3487 (x86_linux_prepare_to_resume): ...this.
3488
14b0bc68
GB
34892015-03-24 Gary Benson <gbenson@redhat.com>
3490
3491 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3492 (x86_linux_dr_set): Likewise.
3493 (update_debug_registers_callback): Likewise.
3494 (x86_linux_dr_set_addr): Likewise.
3495 (x86_linux_dr_get_addr): Likewise.
3496 (x86_linux_dr_set_control): Likewise.
3497 (x86_linux_dr_get_control): Likewise.
3498 (x86_linux_dr_get_status): Likewise.
3499 (x86_linux_prepare_to_resume): Likewise.
3500
5dfe6ca8
GB
35012015-03-24 Gary Benson <gbenson@redhat.com>
3502
3503 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3504 Use perror_with_name. Pass string through gettext.
3505 (x86_linux_dr_set): Likewise.
3506
d33472ad
GB
35072015-03-24 Gary Benson <gbenson@redhat.com>
3508
3509 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3510 (x86_linux_dr_set_addr): ...this.
3511 (x86_dr_low_get_addr): Rename to...
3512 (x86_linux_dr_get_addr): ...this.
3513 (x86_dr_low_set_control): Rename to...
3514 (x86_linux_dr_set_control): ...this.
3515 (x86_dr_low_get_control): Rename to...
3516 (x86_linux_dr_get_control): ...this.
3517 (x86_dr_low_get_status): Rename to...
3518 (x86_linux_dr_get_status): ...this.
3519 (x86_dr_low): Update with new function names.
3520
4b134ca1
GB
35212015-03-24 Gary Benson <gbenson@redhat.com>
3522
3523 * Makefile.in (x86-linux.o): New rule.
3524 * configure.srv: Add x86-linux.o to relevant targets.
3525 * linux-low.c (lwp_set_arch_private_info): New function.
3526 (lwp_arch_private_info): Likewise.
3527 * linux-x86-low.c: Include nat/x86-linux.h.
3528 (arch_lwp_info): Removed structure.
3529 (update_debug_registers_callback):
3530 Use lwp_set_debug_registers_changed.
3531 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3532 and lwp_set_debug_registers_changed.
3533 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3534
34c703da
GB
35352015-03-24 Gary Benson <gbenson@redhat.com>
3536
3537 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3538 * linux-arm-low.c (arm_new_thread): Likewise.
3539 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3540 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3541 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3542 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3543
cff068da
GB
35442015-03-24 Gary Benson <gbenson@redhat.com>
3545
3546 * linux-low.c (ptid_of_lwp): New function.
3547 (lwp_is_stopped): Likewise.
3548 (lwp_stop_reason): Likewise.
3549 * linux-x86-low.c (update_debug_registers_callback):
3550 Use lwp_is_stopped.
3551 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3552 lwp_stop_reason.
3553
b2f7c7e8
GB
35542015-03-24 Gary Benson <gbenson@redhat.com>
3555
3556 * linux-low.h (linux_stop_lwp): Remove declaration.
3557
6d4ee8c6
GB
35582015-03-24 Gary Benson <gbenson@redhat.com>
3559
3560 * linux-low.h: Include nat/linux-nat.h.
3561 * linux-low.c (iterate_over_lwps_args): New structure.
3562 (iterate_over_lwps_filter): New function.
3563 (iterate_over_lwps): Likewise.
3564 * linux-x86-low.c (update_debug_registers_callback):
3565 Update signature to what iterate_over_lwps expects.
3566 Remove PID check that iterate_over_lwps now performs.
3567 (x86_dr_low_set_addr): Use iterate_over_lwps.
3568 (x86_dr_low_set_control): Likewise.
3569
70a0bb6b
GB
35702015-03-24 Gary Benson <gbenson@redhat.com>
3571
3572 * linux-x86-low.c (x86_debug_reg_state): New function.
3573 (x86_linux_prepare_to_resume): Use the above.
3574
7b669087
GB
35752015-03-24 Gary Benson <gbenson@redhat.com>
3576
3577 * linux-low.c (current_lwp_ptid): New function.
3578 * linux-x86-low.c: Include nat/linux-nat.h.
3579 (x86_dr_low_get_addr): Use current_lwp_ptid.
3580 (x86_dr_low_get_control): Likewise.
3581 (x86_dr_low_get_status): Likewise.
3582
eef49a3d
PA
35832015-03-20 Pedro Alves <palves@redhat.com>
3584
3585 * tracepoint.c (cmd_qtstatus): Make "str" const.
3586
b2333d22
PA
35872015-03-20 Pedro Alves <palves@redhat.com>
3588
3589 * server.c (handle_general_set): Make "req_str" const.
3590
23f238d3
PA
35912015-03-19 Pedro Alves <palves@redhat.com>
3592
3593 * linux-low.c (linux_resume_one_lwp): Rename to ...
3594 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3595 instead call perror_with_name.
3596 (check_ptrace_stopped_lwp_gone): New function.
3597 (linux_resume_one_lwp): Reimplement as wrapper around
3598 linux_resume_one_lwp_throw that swallows errors if the LWP is
3599 gone.
3600
91baf43f
PA
36012015-03-19 Pedro Alves <palves@redhat.com>
3602
3603 * linux-low.c (count_events_callback, select_event_lwp_callback):
3604 No longer check whether the thread has resume_stop as last resume
3605 kind.
3606
8bf3b159
PA
36072015-03-19 Pedro Alves <palves@redhat.com>
3608
3609 * linux-low.c (count_events_callback, select_event_lwp_callback):
3610 Use the lwp's status_pending_p field, not the thread's.
3611
b90fc188
PA
36122015-03-19 Pedro Alves <palves@redhat.com>
3613
3614 * linux-low.c (select_event_lwp_callback): Update comments to
3615 no longer mention SIGTRAP.
3616
464b0089
GB
36172015-03-18 Gary Benson <gbenson@redhat.com>
3618
3619 * server.c (handle_query): Do not report vFile:fstat as supported.
3620
aa9e327f
GB
36212015-03-11 Gary Benson <gbenson@redhat.com>
3622
3623 * hostio.c (sys/types.h): New include.
3624 (sys/stat.h): Likewise.
3625 (common-remote-fileio.h): Likewise.
3626 (handle_fstat): New function.
3627 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 3628
791c0056
GB
36292015-03-11 Gary Benson <gbenson@redhat.com>
3630
3631 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3632 struct stat.st_blocks and struct stat.st_blksize.
3633 * configure: Regenerate.
3634 * config.in: Likewise.
3635 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3636 (OBS): Add common-remote-fileio.o.
3637 (common-remote-fileio.o): New rule.
3638
9a9df970
PA
36392015-03-09 Pedro Alves <palves@redhat.com>
3640
3641 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3642 'struct sockaddr' pointer in 'accept' call.
3643
9eb1356e
PA
36442015-03-09 Pedro Alves <palves@redhat.com>
3645
3646 Revert:
3647 2015-03-07 Pedro Alves <palves@redhat.com>
3648 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3649 or <winsock2.h> here. Instead include "gdb_socket.h".
3650 (remote_open): Use union gdb_sockaddr_u.
3651 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3652 or <winsock2.h> here. Instead include "gdb_socket.h".
3653 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3654 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3655 or <sys/un.h>.
3656 (init_named_socket, gdb_agent_helper_thread): Use union
3657 gdb_sockaddr_u.
3658
aac331e4
PA
36592015-03-07 Pedro Alves <palves@redhat.com>
3660
3661 * configure.ac (build_warnings): Move
3662 -Wdeclaration-after-statement to the C-specific set.
3663 * configure: Regenerate.
3664
366c75fc
PA
36652015-03-07 Pedro Alves <palves@redhat.com>
3666
3667 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3668 or <winsock2.h> here. Instead include "gdb_socket.h".
3669 (remote_open): Use union gdb_sockaddr_u.
3670 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3671 or <winsock2.h> here. Instead include "gdb_socket.h".
3672 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3673 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3674 or <sys/un.h>.
3675 (init_named_socket, gdb_agent_helper_thread): Use union
3676 gdb_sockaddr_u.
3677
492d29ea
PA
36782015-03-07 Pedro Alves <palves@redhat.com>
3679
3680 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3681 instead.
3682
60a191ed
YQ
36832015-03-06 Yao Qi <yao.qi@linaro.org>
3684
3685 * linux-aarch64-low.c (aarch64_insert_point): Use
3686 show_debug_regs as a boolean.
3687 (aarch64_remove_point): Likewise.
3688
f5771b1d
PA
36892015-03-05 Pedro Alves <palves@redhat.com>
3690
3691 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3692 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3693 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3694 * nto-low.c (nto_target_ops): Likewise.
3695 * spu-low.c (spu_target_ops): Likewise.
3696 * win32-low.c (win32_target_ops): Likewise.
3697
3e572f71
PA
36982015-03-04 Pedro Alves <palves@redhat.com>
3699
72f4393d 3700 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
3701 Decide whether a breakpoint triggered based on the SIGTRAP's
3702 siginfo.si_code.
72f4393d
L
3703 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3704 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
3705 (linux_low_filter_event): Check for breakpoints before checking
3706 watchpoints.
3707 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3708 siginfo.si_code.
72f4393d
L
3709 (linux_stopped_by_sw_breakpoint)
3710 (linux_supports_stopped_by_sw_breakpoint)
3711 (linux_stopped_by_hw_breakpoint)
3712 (linux_supports_stopped_by_hw_breakpoint): New functions.
3713 (linux_target_ops): Install new target methods.
3e572f71 3714
1ec68e26
PA
37152015-03-04 Pedro Alves <palves@redhat.com>
3716
3717 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3718 * server.c (swbreak_feature, hwbreak_feature): New globals.
3719 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3720 (captured_main): Clear swbreak_feature and hwbreak_feature.
3721 * server.h (swbreak_feature, hwbreak_feature): Declare.
3722 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3723 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3724 supports_stopped_by_hw_breakpoint>: New fields.
3725 (target_supports_stopped_by_sw_breakpoint)
3726 (target_stopped_by_sw_breakpoint)
3727 (target_supports_stopped_by_hw_breakpoint)
3728 (target_stopped_by_hw_breakpoint): Declare.
3729
15c66dd6
PA
37302015-03-04 Pedro Alves <palves@redhat.com>
3731
3732 enum lwp_stop_reason -> enum target_stop_reason
3733 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3734 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3735 (linux_wait_1, stuck_in_jump_pad_callback)
3736 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3737 (linux_stopped_by_watchpoint):
3738 * linux-low.h (enum lwp_stop_reason): Delete.
3739 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3740 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3741
98fc70d6
YQ
37422015-03-04 Yao Qi <yao.qi@linaro.org>
3743
3744 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3745
dd2ac174
GB
37462015-03-03 Gary Benson <gbenson@redhat.com>
3747
3748 * hostio.c (handle_vFile): Fix prefix lengths.
3749
d68e53f4
MM
37502015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3751
3752 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3753 ptr_bits.
3754
bf2d68ab
AA
37552015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3756
3757 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3758 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3759 (clean): Add "rm -f" for above C files.
3760 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3761 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3762 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3763 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3764 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3765 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3766 (init_registers_s390x_vx_linux64)
3767 (init_registers_s390x_tevx_linux64)
3768 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3769 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3770 declarations.
3771 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3772 (s390_store_vxrs_high): New functions.
3773 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3774 NT_S390_VXRS_HIGH.
3775 (s390_arch_setup): Add logic for selecting one of the new target
3776 descriptions. Activate the new vector regsets if applicable.
3777 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3778 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3779 and init_registers_s390x_tevx_linux64.
3780
c966a859
PA
37812015-03-01 Pedro Alves <palves@redhat.com>
3782
3783 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3784 parameter.
3785
4180215b
PA
37862015-02-27 Pedro Alves <palves@redhat.com>
3787
3788 * linux-x86-low.c (u_debugreg_offset): New function.
3789 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3790
749bab01
PA
37912015-02-27 Pedro Alves <palves@redhat.com>
3792
3793 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3794 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3795 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3796 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3797 (ps_lsetfpregs, ps_getpid)
3798 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3799 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3800 (ps_lsetxregs, ps_plog): Declare.
3801
3c14e5a3
PA
38022015-02-27 Pedro Alves <palves@redhat.com>
3803
3804 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3805 IP_AGENT_EXPORT_FUNC.
3806 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3807 IP_AGENT_EXPORT_FUNC.
3808 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3809 (IP_AGENT_EXPORT): Delete.
3810 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3811 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3812 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3813 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3814 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3815 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3816 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3817 (traceframe_read_count, traceframe_write_count)
3818 (traceframes_created, trace_state_variables, get_raw_reg)
3819 (get_trace_state_variable_value, set_trace_state_variable_value)
3820 (ust_loaded, helper_thread_id, cmd_buf): Use
3821 IPA_SYM_EXPORTED_NAME.
3822 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3823 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3824 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3825 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3826 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3827 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3828 EXTERN_C_PUSH/EXTERN_C_POP.
3829 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3830 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3831 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3832 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3833 (traceframe_write_count, traceframe_read_count)
3834 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3835 (about_to_request_buffer_space, get_trace_state_variable_value)
3836 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3837 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3838 EXTERN_C_PUSH/EXTERN_C_POP.
3839 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3840 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3841 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3842 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3843 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3844 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3845 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3846 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3847 Define.
3848 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3849 (IP_AGENT_EXPORT_VAR_DECL): Define.
3850 (tracing): Declare.
3851 (gdb_agent_get_raw_reg): Declare.
3852
fe978cb0
PA
38532015-02-27 Tom Tromey <tromey@redhat.com>
3854 Pedro Alves <palves@redhat.com>
3855
3856 Rename symbols whose names are reserved C++ keywords throughout.
3857
3bc3d82a
PA
38582015-02-27 Pedro Alves <palves@redhat.com>
3859
3860 * Makefile.in (COMPILER): New, get it from autoconf.
3861 (CXX): Get from autoconf instead.
3862 (COMPILE.pre): Use COMPILER.
3863 (CC-LD): Rename to ...
3864 (CC_LD): ... this. Use COMPILER.
3865 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3866 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3867 * acinclude.m4: Include build-with-cxx.m4.
3868 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3869 Disable -Werror by default if building in C++ mode.
3870 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3871 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3872 the C++ compiler. Save/restore CXXFLAGS too.
3873 * configure: Regenerate.
3874
07697489
PA
38752015-02-27 Pedro Alves <palves@redhat.com>
3876
3877 * acinclude.m4: Include libiberty.m4.
3878 * configure.ac: Call libiberty_INIT.
3879 * config.in, configure: Regenerate.
3880
9beb7c4e
PA
38812015-02-26 Pedro Alves <palves@redhat.com>
3882
3883 * linux-low.c (linux_wait_1): When incrementing the PC past a
3884 program breakpoint always use the_low_target.breakpoint_len as
3885 increment, rather than the maximum between that and
3886 the_low_target.decr_pc_after_break.
3887
8090aef2
PA
38882015-02-23 Pedro Alves <palves@redhat.com>
3889
3890 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3891 thread was doing a step-over; always adjust the PC if
3892 we stepped over a permanent breakpoint.
3893 (linux_wait_1): If we stepped over breakpoint that was on top of a
3894 permanent breakpoint, manually advance the PC past it.
3895
bc9540e8
PA
38962015-02-23 Pedro Alves <palves@redhat.com>
3897
3898 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3899 modes.
3900 (x86_fill_gregset, x86_store_gregset): Use it when handling
3901 $orig_eax.
3902
2db9a427
PA
39032015-02-20 Pedro Alves <palves@redhat.com>
3904
3905 * thread-db.c: Include "nat/linux-procfs.h".
3906 (thread_db_init): Skip listing new threads if the kernel supports
3907 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3908
afa8d396
PA
39092015-02-20 Pedro Alves <palves@redhat.com>
3910
3911 * linux-low.c (status_pending_p_callback): Use ptid_match.
3912
c9587f88
AT
39132015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3914
3915 PR breakpoints/16812
3916 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3917 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3918 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3919
b05ec7a5
AT
39202015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3921
3922 PR breakpoints/15956
3923 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3924
d33501a5
MM
39252015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3926
3927 * linux-low.c (linux_low_btrace_conf): Print size.
3928 * server.c (handle_btrace_conf_general_set): New.
3929 (hanle_general_set): Call handle_btrace_conf_general_set.
3930 (handle_query): Report Qbtrace-conf:bts:size as supported.
3931
f4abbc16
MM
39322015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3933
3934 * linux-low.c (linux_low_enable_btrace): Update parameters.
3935 (linux_low_btrace_conf): New.
3936 (linux_target_ops)<to_btrace_conf>: Initialize.
3937 * server.c (current_btrace_conf): New.
3938 (handle_btrace_enable): Rename to ...
3939 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
3940 to target_enable_btrace. Update comment. Update users.
3941 (handle_qxfer_btrace_conf): New.
3942 (qxfer_packets): Add btrace-conf entry.
3943 (handle_query): Report qXfer:btrace-conf:read as supported packet.
3944 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3945 (target_ops)<read_btrace_conf>: New.
3946 (target_enable_btrace): Update parameters.
3947 (target_read_btrace_conf): New.
3948
043c3577
MM
39492015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3950
3951 * server.c (handle_btrace_general_set): Remove call to
3952 target_supports_btrace.
3953 (supported_btrace_packets): New.
3954 (handle_query): Call supported_btrace_packets.
3955 * target.h: include btrace-common.h.
3956 (btrace_target_info): Removed.
3957 (supports_btrace, target_supports_btrace): Update parameters.
3958
734b0e4b
MM
39592015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3960
3961 * Makefile.in (SFILES): Add common/btrace-common.c.
3962 (OBS): Add common/btrace-common.o.
3963 (btrace-common.o): Add build rules.
3964 * linux-low: Include btrace-common.h.
3965 (linux_low_read_btrace): Use struct btrace_data. Call
3966 btrace_data_init and btrace_data_fini.
3967
d6c146e9
PA
39682015-02-06 Pedro Alves <palves@redhat.com>
3969
3970 * thread-db.c (find_new_threads_callback): Add debug output.
3971
20ba1ce6
PA
39722015-02-04 Pedro Alves <palves@redhat.com>
3973
3974 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3975 (resume_stopped_resumed_lwps): New function.
3976 (linux_wait_for_event_filtered): Use it.
3977
8cc73a39
SDJ
39782015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3979
3980 * Makefile.in (SFILES): Add linux-personality.c.
3981 (linux-personality.o): New rule.
3982 * configure.srv (srv_linux_obj): Add linux-personality.o to the
3983 list of objects to be built.
3984 * linux-low.c: Include nat/linux-personality.h.
3985 (linux_create_inferior): Remove code to disable address space
3986 randomization (moved to ../nat/linux-personality.c). Create
3987 cleanup to disable address space randomization.
3988
fb23d554
SDJ
39892015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3990
3991 * Makefile.in (posix-strerror.o): New rule.
3992 (mingw-strerror.o): Likewise.
3993 * configure: Regenerated.
3994 * configure.ac: Source file ../common/common.host. Initialize new
3995 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
3996
cdf43629
YQ
39972015-01-14 Yao Qi <yao@codesourcery.com>
3998
3999 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4000 (ppc-linux.o): New rule.
4001 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4002 * configure.ac: AC_CHECK_FUNCS(getauxval).
4003 * config.in: Re-generated.
4004 * configure: Re-generated.
4005 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4006 ppc64_64bit_inferior_p
4007
514c5338
YQ
40082015-01-14 Yao Qi <yao@codesourcery.com>
4009
4010 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4011 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4012 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4013 (PT_ORIG_R3, PT_TRAP): Likewise.
4014 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4015 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4016 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4017
3368c1e5
JB
40182015-01-10 Joel Brobecker <brobecker@adacore.com>
4019
4020 * i387-fp.c (i387_cache_to_xsave): In look over
4021 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4022 zmmh_low_space field by use of zmmh_high_space.
4023
582511be
PA
40242015-01-09 Pedro Alves <palves@redhat.com>
4025
4026 * linux-low.c (step_over_bkpt): Move higher up in the file.
4027 (handle_extended_wait): Don't store the stop_pc here.
4028 (get_stop_pc): Adjust comments and rename to ...
4029 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4030 stopped for a software breakpoint or hardware breakpoint.
4031 (thread_still_has_status_pending_p): New function.
4032 (status_pending_p_callback): Use
4033 thread_still_has_status_pending_p. If the event is no longer
4034 interesting, resume the LWP.
4035 (handle_tracepoints): Add assert.
4036 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4037 (wstatus_maybe_breakpoint): New function.
4038 (cancel_breakpoint): Delete function.
4039 (check_stopped_by_watchpoint): New function, factored out from
4040 linux_low_filter_event.
4041 (lp_status_maybe_breakpoint): Delete function.
4042 (linux_low_filter_event): Remove filter_ptid argument.
4043 Leave thread group exits pending here. Store the LWP's stop PC.
4044 Always leave events pending.
4045 (linux_wait_for_event_filtered): Pull all events out of the
4046 kernel, and leave them all pending.
4047 (count_events_callback, select_event_lwp_callback): Consider all
4048 events.
4049 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4050 (select_event_lwp): Only give preference to the stepping LWP in
4051 all-stop mode. Adjust comments.
4052 (ignore_event): New function.
4053 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4054 references to cancel_breakpoints. Adjust to renames. Also give
4055 equal priority to all LWPs that have had events in non-stop mode.
4056 If reporting a software breakpoint event, unadjust the LWP's PC.
4057 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4058 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4059 Adjust.
4060 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4061 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4062 (linux_stopped_by_watchpoint): Adjust.
4063 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4064 * linux-low.h (enum lwp_stop_reason): New.
4065 (struct lwp_info) <stop_pc>: Adjust comment.
4066 <stopped_by_watchpoint>: Delete field.
4067 <stop_reason>: New field.
4068 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4069 * mem-break.c (software_breakpoint_inserted_here)
4070 (hardware_breakpoint_inserted_here): New function.
4071 * mem-break.h (software_breakpoint_inserted_here)
4072 (hardware_breakpoint_inserted_here): Declare.
4073 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4074 (cancel_breakpoints): Delete.
4075 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4076 (upload_fast_traceframes): Remove references to
4077 cancel_breakpoints.
4078
a33e3959
PA
40792015-01-09 Pedro Alves <palves@redhat.com>
4080
4081 * thread-db.c (find_new_threads_callback): Ignore thread if the
4082 kernel thread ID is -1.
4083
8784d563
PA
40842015-01-09 Pedro Alves <palves@redhat.com>
4085
4086 * linux-low.c (linux_attach_fail_reason_string): Move to
4087 nat/linux-ptrace.c, and rename.
4088 (linux_attach_lwp): Update comment.
4089 (attach_proc_task_lwp_callback): New function.
4090 (linux_attach): Adjust to rename and use
4091 linux_proc_attach_tgid_threads.
4092 (linux_attach_fail_reason_string): Delete declaration.
4093
76f2b779
JB
40942015-01-01 Joel Brobecker <brobecker@adacore.com>
4095
4096 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4097 * server.c (gdbserver_version): Likewise.
4098
fafcc06a
SDJ
40992014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4100
4101 * remote-utils.c: Include ctype.h.
4102 (input_interrupt): Explicitly handle the case when the char
4103 received is the NUL byte. Improve the printing of non-ASCII
4104 characters.
4105
beed38b8
JB
41062014-12-16 Joel Brobecker <brobecker@adacore.com>
4107
4108 * linux-low.c (linux_low_filter_event): Update call to
4109 linux_enable_event_reporting following the addition of
4110 a new parameter to that function.
4111
bf330350
CU
41122014-12-16 Catalin Udma <catalin.udma@freescale.com>
4113
4114 PR server/17457
4115 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4116 (AARCH64_FPCR_REGNO): Likewise.
4117 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4118 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4119 (aarch64_store_fpregset): Likewise.
4120
5227d625
JB
41212014-12-15 Joel Brobecker <brobecker@adacore.com>
4122
4123 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4124 Remove FIXME comment about assumption about N.
4125
f93b65a0
JB
41262014-12-13 Joel Brobecker <brobecker@adacore.com>
4127
4128 * configure.ac: If large-file support is disabled in GDBserver,
4129 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4130 * configure: Regenerate.
4131
e5a9158d
AA
41322014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4133
4134 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4135 warning upon ENODATA from ptrace.
4136 * linux-s390-low.c (s390_store_tdb): New.
4137 (s390_regsets): Add regset for NT_S390_TDB.
4138
feea5f36
AA
41392014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4140
4141 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4142 without a fill_function.
4143 * linux-s390-low.c (s390_fill_last_break): Remove.
4144 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4145 (s390_arch_setup): Use regset's size instead of fill_function for
4146 loop end condition.
4147
098dbe61
AA
41482014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4149
4150 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4151 the regset's store function when ptrace returned an error.
4152 * regcache.c (get_thread_regcache): Invalidate register cache
4153 before fetching inferior's registers.
4154
28eef672
AA
41552014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4156
4157 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4158 while-loop as for-loop.
4159 (regsets_store_inferior_registers): Likewise.
4160
bdca27a2
YQ
41612014-11-28 Yao Qi <yao@codesourcery.com>
4162
4163 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4164 * config.in, configure: Re-generate.
4165 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4166 is defined.
4167
9c232dda
YQ
41682014-11-21 Yao Qi <yao@codesourcery.com>
4169
4170 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4171 (AC_CHECK_HEADERS): Remove malloc.h.
4172 * configure: Re-generated.
4173 * config.in: Re-generated.
4174 * server.h: Don't include alloca.h and malloc.h.
4175 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4176 Don't include malloc.h.
4177
43968415
JB
41782014-11-17 Joel Brobecker <brobecker@adacore.com>
4179
4180 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4181 corresponding ERRNO check in same block.
4182
40e91bc7
PA
41832014-11-12 Pedro Alves <palves@redhat.com>
4184
4185 * server.c (cont_thread): Update comment.
4186 (start_inferior, attach_inferior): No longer clear cont_thread.
4187 (handle_v_cont): No longer set cont_thread.
4188 (captured_main): Clear cont_thread each time a GDB connects.
4189
c2c118cf
PA
41902014-11-12 Pedro Alves <palves@redhat.com>
4191
4192 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4193 thread, and don't resume all threads if the Hc thread has exited.
4194
78708b7c
PA
41952014-11-12 Pedro Alves <palves@redhat.com>
4196
4197 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4198 the process group instead of to a specific LWP.
4199
a2abc7de
PA
42002014-10-15 Pedro Alves <palves@redhat.com>
4201
4202 PR server/17487
4203 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4204 parameter.
4205 (arm_set_thread_context): Delete.
4206 (the_low_target): Adjust.
4207 * win32-i386-low.c (debug_registers_changed)
4208 (debug_registers_used): Delete.
4209 (update_debug_registers_callback): New function.
4210 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4211 needing to update their debug registers.
4212 (win32_get_current_dr): New function.
4213 (x86_dr_low_get_addr, x86_dr_low_get_control)
4214 (x86_dr_low_get_status): Fetch the debug register from the thread
4215 record's context.
4216 (i386_initial_stuff): Adjust.
4217 (i386_get_thread_context): Remove current_event parameter. Don't
4218 clear debug_registers_changed nor copy DR values to
4219 debug_reg_state.
4220 (i386_set_thread_context): Delete.
4221 (i386_prepare_to_resume): New function.
4222 (i386_thread_added): Mark the thread as needing to update irs
4223 debug registers.
4224 (the_low_target): Remove i386_set_thread_context and install
4225 i386_prepare_to_resume.
4226 * win32-low.c (win32_get_thread_context): Adjust.
4227 (win32_set_thread_context): Use SetThreadContext
4228 directly.
4229 (win32_prepare_to_resume): New function.
4230 (win32_require_context): New function, factored out from ...
4231 (thread_rec): ... this.
4232 (continue_one_thread): Call win32_prepare_to_resume on each thread
4233 we're about to continue.
4234 (win32_resume): Call win32_prepare_to_resume on the event thread.
4235 * win32-low.h (struct win32_thread_info)
4236 <debug_registers_changed>: New field.
4237 (struct win32_target_ops): Change prototype of set_thread_context,
4238 delete set_thread_context and add prepare_to_resume.
4239 (win32_require_context): New declaration.
4240
a442d071
GB
42412014-10-08 Gary Benson <gbenson@redhat.com>
4242
4243 * server.h: Do not include common-exceptions.h.
4244
6f1947e8
GB
42452014-10-08 Gary Benson <gbenson@redhat.com>
4246
4247 * server.h: Do not include cleanups.h.
4248
63b434a4
JH
42492014-09-30 James Hogan <james.hogan@imgtec.com>
4250
4251 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4252 mips64-dsp-linux.c.
4253
c4d9ceb6
YQ
42542014-09-23 Yao Qi <yao@codesourcery.com>
4255
4256 * linux-low.c (lp_status_maybe_breakpoint): New function.
4257 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4258 (count_events_callback): Likewise.
4259 (select_event_lwp_callback): Likewise.
4260 (cancel_breakpoints_callback): Likewise.
4261
89a5711c
DB
42622014-09-19 Don Breazeal <donb@codesourcery.com>
4263
4264 * linux-low.c (handle_extended_wait): Call
4265 linux_ptrace_get_extended_event.
4266 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4267 linux_is_extended_waitstatus.
4268
bffc0964
JB
42692014-09-16 Joel Brobecker <brobecker@adacore.com>
4270
4271 * Makefile.in (CPPFLAGS): Define.
4272 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4273 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4274
0bfdf32f
GB
42752014-09-16 Gary Benson <gbenson@redhat.com>
4276
4277 * inferiors.h (current_inferior): Renamed as...
4278 (current_thread): New variable. All uses updated.
4279 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4280 (maybe_move_out_of_jump_pad): Likewise.
4281 (cancel_breakpoint): Likewise.
4282 (linux_low_filter_event): Likewise.
4283 (wait_for_sigstop): Likewise.
4284 (linux_resume_one_lwp): Likewise.
4285 (need_step_over_p): Likewise.
4286 (start_step_over): Likewise.
4287 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4288 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4289 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4290 and save_inferior as saved_thread.
4291 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4292 saved_thread.
4293 (regcache_invalidate_thread): Likewise.
4294 * remote-utils.c (prepare_resume_reply): Likewise.
4295 * thread-db.c (thread_db_get_tls_address): Likewise.
4296 (disable_thread_event_reporting): Likewise.
4297 (remove_thread_event_breakpoints): Likewise.
4298 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4299 as saved_thread.
4300 * target.h (set_desired_inferior): Renamed as...
4301 (set_desired_thread): New declaration. All uses updated.
4302 * server.c (myresume): Updated comment to reference thread instead
4303 of inferior.
4304 (handle_serial_event): Likewise.
4305 (handle_target_event): Likewise.
4306
361c8ade
GB
43072014-09-12 Tom Tromey <tromey@redhat.com>
4308 Gary Benson <gbenson@redhat.com>
4309
4310 * regcache.h: Include common-regcache.h.
4311 (regcache_read_pc): Don't declare.
4312 * regcache.c (get_thread_regcache_for_ptid): New function.
4313
bd9269f7
GB
43142014-09-11 Tom Tromey <tromey@redhat.com>
4315 Gary Benson <gbenson@redhat.com>
4316
4317 * symbol.c: New file.
4318 * Makefile.in (SFILES): Add symbol.c.
4319 (OBS): Add symbol.o.
4320
f8c1d06b
GB
43212014-09-11 Gary Benson <gbenson@redhat.com>
4322
4323 * target.c (target_stop_ptid, target_continue_ptid): New
4324 functions.
4325
721ec300
GB
43262014-09-11 Tom Tromey <tromey@redhat.com>
4327 Gary Benson <gbenson@redhat.com>
4328
4329 * target.h: Include target/target.h.
4330 * target.c (target_read_memory, target_read_uint32)
4331 (target_write_memory): New functions.
4332
c5e92cca
GB
43332014-09-11 Gary Benson <gbenson@redhat.com>
4334
4335 * server.h (debug_hw_points): Don't declare.
4336 * server.c (debug_hw_points): Don't define. Replace all uses
4337 with show_debug_regs.
4338 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4339 all uses with show_debug_regs.
4340
2e4bb98a
EBM
43412014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4342
4343 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4344 endianness into account.
4345 (ppc_supply_ptrace_register): Likewise.
4346
ac740bc7
JH
43472014-09-03 James Hogan <james.hogan@imgtec.com>
4348
4349 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4350 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4351
97ea6506
GB
43522014-09-03 Gary Benson <gbenson@redhat.com>
4353
4354 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4355 ALL_DEBUG_ADDRESS_REGISTERS.
4356
df7e5265
GB
43572014-09-02 Gary Benson <gbenson@redhat.com>
4358
4359 * i386-low.h: Renamed as...
4360 * x86-low.h: New file. All type, function and variable name
4361 prefixes changed from "i386_" to "x86_". All references updated.
4362 * i386-low.c: Renamed as...
4363 * x86-low.c: New file. All type, function and variable name
4364 prefixes changed from "i386_" to "x86_". All references updated.
4365
ed859da7
GB
43662014-09-02 Gary Benson <gbenson@redhat.com>
4367
4368 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4369 (x86_linux_new_thread): Likewise.
4370
860789c7
GB
43712014-08-29 Gary Benson <gbenson@redhat.com>
4372
4373 * server.h (setjmp.h): Do not include.
4374 (toplevel): Do not declare.
4375 (common-exceptions.h): Include.
4376 (cleanups.h): Likewise.
4377 * server.c (toplevel): Do not define.
4378 (exit_code): New static global.
4379 (detach_or_kill_for_exit_cleanup): New function.
4380 (main): New function. Original main renamed to...
4381 (captured_main): New function.
4382 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4383
ff55e1b5
GB
43842014-08-29 Gary Benson <gbenson@redhat.com>
4385
4386 * Makefile.in (SFILES): Add common/common-exceptions.c.
4387 (OBS): Add common-exceptions.o.
4388 (common-exceptions.o): New rule.
4389 * utils.c (prepare_to_throw_exception): New function.
4390
e9bcb658
GB
43912014-08-29 Gary Benson <gbenson@redhat.com>
4392
4393 * config.in: Regenerate.
4394 * configure: Likewise.
4395
e3180625
GB
43962014-08-29 Gary Benson <gbenson@redhat.com>
4397
4398 * Makefile.in (SFILES): Add common/cleanups.c.
4399 (OBS): cleanups.o.
4400 (cleanups.o): New rule.
4401
e3d6ba5d
GB
44022014-08-29 Gary Benson <gbenson@redhat.com>
4403
4404 * utils.c (internal_vwarning): New function.
4405
7096e886
GB
44062014-08-28 Gary Benson <gbenson@redhat.com>
4407
4408 * utils.h (fatal): Remove declaration.
4409 * utils.c (fatal): Remove function.
4410
14ce3192
GB
44112014-08-28 Gary Benson <gbenson@redhat.com>
4412
4413 * tracepoint.c (gdb_agent_init): Replace fatal with
4414 perror_with_name.
4415 (initialize_tracepoint): Likewise.
4416
50278d59
GB
44172014-08-28 Gary Benson <gbenson@redhat.com>
4418
4419 * remote-utils.c (remote_prepare): Replace fatal with error.
4420
aa96c426
GB
44212014-08-28 Gary Benson <gbenson@redhat.com>
4422
4423 * linux-low.c (linux_async): Replace fatal with warning.
4424 Tidy up and return.
4425 (linux_start_non_stop): Return -1 if linux_async failed.
4426
f7160e97
GB
44272014-08-28 Gary Benson <gbenson@redhat.com>
4428
4429 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4430 gdb_assert.
4431 (i386_dr_low_get_addr): Remove vague comment.
4432 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4433 gdb_assert.
4434
38e08fca
GB
44352014-08-28 Gary Benson <gbenson@redhat.com>
4436
4437 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4438 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4439 internal_error.
4440 (linux_resume_one_lwp): Likewise.
4441 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4442 gdb_assert.
4443 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4444 with internal_error.
4445 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4446 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4447 (find_register_by_name): Replace fatal with internal_error.
4448 (find_regno): Likewise.
4449 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4450 * thread-db.c (thread_db_create_event): Likewise.
4451 (thread_db_load_search): Likewise.
4452 (try_thread_db_load_1): Likewise.
4453 * tracepoint.c (get_jump_space_head): Replace fatal with
4454 internal_error.
4455 (claim_trampoline_space): Likewise.
4456 (have_fast_tracepoint_trampoline_buffer): Likewise.
4457 (cmd_qtstart): Likewise.
4458 (stop_tracing): Likewise.
4459 (fast_tracepoint_collecting): Likewise.
4460 (target_malloc): Likewise.
4461 (download_tracepoint): Likewise.
4462 (download_trace_state_variables): Replace check with gdb_assert.
4463 (upload_fast_traceframes): Replace fatal with internal_error.
4464
34abf635
GB
44652014-08-19 Tom Tromey <tromey@redhat.com>
4466 Gary Benson <gbenson@redhat.com>
4467
4468 * Makefile.in (SFILES): Add common/common-debug.c.
4469 (OBS): Add common-debug.o.
4470 (common-debug.o): New rule.
4471 * debug.h (debug_printf): Don't declare.
4472 * debug.c (debug_printf): Renamed and rewritten as...
4473 (debug_vprintf): New function.
4474
f6e94d78
GB
44752014-08-19 Gary Benson <gbenson@redhat.com>
4476
4477 * utils.h: Do not include print-utils.h.
4478
9239eeab
GB
44792014-08-19 Tom Tromey <tromey@redhat.com>
4480 Gary Benson <gbenson@redhat.com>
4481
4482 * server.h: Add static assertion.
4483 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4484
ef87c8bb
GB
44852014-08-19 Tom Tromey <tromey@redhat.com>
4486 Gary Benson <gbenson@redhat.com>
4487
4488 * Makefile.in (SFILES): Add common/errors.c.
4489 (OBS): Add errors.o.
4490 (IPA_OBS): Add errors-ipa.o.
4491 (errors.o): New rule.
4492 (errors-ipa.o): Likewise.
4493 * utils.h (perror_with_name, error, warning): Don't declare.
4494 * utils.c (warning): Renamed and rewritten as...
4495 (vwarning): New function.
4496 (error): Renamed and rewritten as...
4497 (verror): New function.
4498 (internal_error): Renamed and rewritten as...
4499 (internal_verror): New function.
4500
bb974a24
GB
45012014-08-07 Gary Benson <gbenson@redhat.com>
4502
4503 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4504 * configure: Regenerate.
4505 * config.in: Likewise.
4506 * server.h: Do not include errno.h.
4507 * event-loop.c: Likewise.
4508 * hostio-errno.c: Likewise.
4509 * linux-low.c: Likewise.
4510 * remote-utils.c: Likewise.
4511 * spu-low.c: Likewise.
4512 * utils.c: Likewise.
4513 * gdbreplay.c: Unconditionally include errno.h.
4514
6d3d12eb
GB
45152014-08-07 Gary Benson <gbenson@redhat.com>
4516
4517 * server.h: Do not include string.h.
4518 * event-loop.c: Likewise.
4519 * linux-low.c: Likewise.
4520 * regcache.c: Likewise.
4521 * remote-utils.c: Likewise.
4522 * spu-low.c: Likewise.
4523 * utils.c: Likewise.
4524
dccbb609
GB
45252014-08-07 Gary Benson <gbenson@redhat.com>
4526
4527 * server.h: Do not include gdb_assert.h.
4528
e76df0d0
GB
45292014-08-07 Gary Benson <gbenson@redhat.com>
4530
4531 * server.h: Do not include common-utils.h.
4532
4cb9c816
GB
45332014-08-07 Gary Benson <gbenson@redhat.com>
4534
4535 * server.h: Do not include ptid.h.
4536 * notif.h: Likewise.
4537
3995eeee
GB
45382014-08-07 Gary Benson <gbenson@redhat.com>
4539
4540 * server.h: Do not include gdb_locale.h.
4541
cb9f1a9b
GB
45422014-08-07 Gary Benson <gbenson@redhat.com>
4543
4544 * server.h: Do not include gdb/signals.h.
4545 * win32-low.c: Likewise.
4546
a5fceff8
GB
45472014-08-07 Gary Benson <gbenson@redhat.com>
4548
4549 * server.h: Do not include pathmax.h.
4550
b9391142
GB
45512014-08-07 Gary Benson <gbenson@redhat.com>
4552
4553 * server.h: Do not include libiberty.h.
4554 * linux-bfin-low.c: Likewise.
4555
0e443c87
GB
45562014-08-07 Gary Benson <gbenson@redhat.com>
4557
4558 * server.h: Do not include ansidecl.h.
4559
8ebb3f56
GB
45602014-08-07 Gary Benson <gbenson@redhat.com>
4561
4562 * linux-x86-low.c: Do not include stddef.h.
4563 * lynx-ppc-low.c: Likewise.
4564 * tracepoint.c: Likewise.
4565
8980bdf6
GB
45662014-08-07 Gary Benson <gbenson@redhat.com>
4567
4568 * server.h: Do not include stdarg.h.
4569 * nto-low.c: Likewise.
4570
d7096f71
GB
45712014-08-07 Gary Benson <gbenson@redhat.com>
4572
4573 * server.h: Do not include stdlib.h.
4574 * inferiors.c: Likewise.
4575 * linux-low.c: Likewise.
4576 * regcache.c: Likewise.
4577 * spu-low.c: Likewise.
4578 * tracepoint.c: Likewise.
4579 * utils.c: Likewise.
4580
d02f550d
GB
45812014-08-07 Gary Benson <gbenson@redhat.com>
4582
4583 * server.h: Do not include stdio.h.
4584 * linux-low.c: Likewise.
4585 * remote-utils.c: Likewise.
4586 * spu-low.c: Likewise.
4587 * utils.c: Likewise.
4588 * wincecompat.c: Likewise.
4589
87f6c4e3
GB
45902014-08-06 Gary Benson <gbenson@redhat.com>
4591
4592 * regcache.c (init_register_cache): Move conditionals inside if.
4593
7089dca4
GB
45942014-08-06 Gary Benson <gbenson@redhat.com>
4595
4596 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4597
462f517e
GB
45982014-07-31 Gary Benson <gbenson@redhat.com>
4599
4600 * ax.h: Do not include server.h.
4601 * gdbthread.h: Likewise.
4602 * lynx-low.h: Likewise.
4603 * notif.h: Likewise.
4604
976411d6
GB
46052014-07-30 Gary Benson <gbenson@redhat.com>
4606
4607 * server.h: Include common-defs.h.
4608 Do not include config.h or build-gnulib-gdbserver/config.h.
4609
d41f6d8e
GB
46102014-07-30 Gary Benson <gbenson@redhat.com>
4611
4612 * hostio-errno.c: Move server.h to top of includes list.
4613 * inferiors.c: Likewise.
4614 * linux-x86-low.c: Likewise.
4615 * notif.c: Include server.h.
4616
314c6a35
TT
46172014-07-24 Tom Tromey <tromey@redhat.com>
4618 Gary Benson <gbenson@redhat.com>
4619
4620 * server.h (CORE_ADDR): Now unsigned.
4621
69ff6be5
PA
46222014-07-16 Pedro Alves <palves@redhat.com>
4623
4624 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4625
ce9e3fe7
PA
46262014-07-15 Pedro Alves <palves@redhat.com>
4627
4628 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4629 copy.
4630
e76126e8
PA
46312014-07-11 Pedro Alves <palves@redhat.com>
4632
4633 * linux-low.c (kill_wait_lwp): New function, based on
4634 kill_one_lwp_callback, but use my_waitpid directly.
4635 (kill_one_lwp_callback, linux_kill): Use it.
4636
8e9db26e
PA
46372014-06-23 Pedro Alves <palves@redhat.com>
4638
4639 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4640 before setting DR0..DR3.
4641
698b3e08
GB
46422014-06-20 Gary Benson <gbenson@redhat.com>
4643
4644 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4645 * configure: Regenerated.
4646 * config.in: Likewise.
4647
125f8a3d
GB
46482014-06-20 Gary Benson <gbenson@redhat.com>
4649
4650 * Makefile.in (SFILES): Update locations for files moved
4651 from common to nat.
4652 (object file files): Reordered.
4653
42995dbd
GB
46542014-06-20 Gary Benson <gbenson@redhat.com>
4655
4656 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4657 (i386_dr_low_set_addr): Likewise.
4658 (i386_dr_low_get_addr): Likewise.
4659 (i386_dr_low_can_set_control): Likewise.
4660 (i386_dr_low_set_control): Likewise.
4661 (i386_dr_low_get_control): Likewise.
4662 (i386_dr_low_get_status): Likewise.
4663 (i386_get_debug_register_length): Likewise.
4664 * linux-x86-low.c (i386_dr_low_set_addr):
4665 Changed signature. Made static.
4666 (i386_dr_low_get_addr): Likewise.
4667 (i386_dr_low_set_control): Likewise.
4668 (i386_dr_low_get_control): Likewise.
4669 (i386_dr_low_get_status): Likewise.
4670 (i386_dr_low): New global variable.
4671 * win32-i386-low.c (i386_dr_low_set_addr):
4672 Changed signature. Made static.
4673 (i386_dr_low_get_addr): Likewise.
4674 (i386_dr_low_set_control): Likewise.
4675 (i386_dr_low_get_control): Likewise.
4676 (i386_dr_low_get_status): Likewise.
4677 (i386_dr_low): New global variable.
4678
e1d2394b
MS
46792014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4680
4681 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4682 * Makefile.in (AR, AR_FLAGS): Define.
4683 * configure: Regenerate.
4684
3a8ee006
GB
46852014-06-19 Gary Benson <gbenson@redhat.com>
4686
4687 * Makefile.in (i386-dregs.o): New rule.
4688 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4689 * i386-low.c (target.h): Remove include.
4690 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4691 (DR_CONTROL_SHIFT): Likewise.
4692 (DR_CONTROL_SIZE): Likewise.
4693 (DR_RW_EXECUTE): Likewise.
4694 (DR_RW_WRITE): Likewise.
4695 (DR_RW_READ): Likewise.
4696 (DR_RW_IORW): Likewise.
4697 (DR_LEN_1): Likewise.
4698 (DR_LEN_2): Likewise.
4699 (DR_LEN_4): Likewise.
4700 (DR_LEN_8): Likewise.
4701 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4702 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4703 (DR_ENABLE_SIZE): Likewise.
4704 (DR_LOCAL_SLOWDOWN): Likewise.
4705 (DR_GLOBAL_SLOWDOWN): Likewise.
4706 (DR_CONTROL_RESERVED): Likewise.
4707 (I386_DR_CONTROL_MASK): Likewise.
4708 (I386_DR_VACANT): Likewise.
4709 (I386_DR_LOCAL_ENABLE): Likewise.
4710 (I386_DR_GLOBAL_ENABLE): Likewise.
4711 (I386_DR_DISABLE): Likewise.
4712 (I386_DR_SET_RW_LEN): Likewise.
4713 (I386_DR_GET_RW_LEN): Likewise.
4714 (I386_DR_WATCH_HIT): Likewise.
4715 (i386_wp_op_t): Likewise.
4716 (i386_show_dr): Likewise.
4717 (i386_length_and_rw_bits): Likewise.
4718 (i386_insert_aligned_watchpoint): Likewise.
4719 (i386_remove_aligned_watchpoint): Likewise.
4720 (i386_handle_nonaligned_watchpoint): Likewise.
4721 i386_update_inferior_debug_regs(): Likewise.
4722 (i386_dr_insert_watchpoint): Likewise.
4723 (i386_dr_remove_watchpoint): Likewise.
4724 (i386_dr_region_ok_for_watchpoint): Likewise.
4725 (i386_dr_stopped_data_address): Likewise.
4726 (i386_dr_stopped_by_watchpoint): Likewise.
4727
8f26655c
GB
47282014-06-19 Gary Benson <gbenson@redhat.com>
4729
4730 * i386-low.c (i386_dr_show): Renamed to
4731 i386_show_dr and made static. All uses updated.
4732 (i386_dr_length_and_rw_bits): Renamed to
4733 i386_length_and_rw_bits and made static.
4734 All uses updated.
4735 (i386_dr_insert_aligned_watchpoint): Renamed to
4736 i386_insert_aligned_watchpoint and made static.
4737 All uses updated.
4738 (i386_dr_remove_aligned_watchpoint): Renamed to
4739 i386_remove_aligned_watchpoint and made static.
4740 All uses updated.
4741 (i386_dr_update_inferior_debug_regs): Renamed to
4742 i386_update_inferior_debug_regs and made static.
4743 All uses updated.
4744
b9228891
GB
47452014-06-18 Gary Benson <gbenson@redhat.com>
4746
5171def3
GB
4747 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4748 (i386_dr_low_can_set_control): Likewise.
4749 (i386_get_debug_register_length): Likewise.
4750 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4751 (i386_dr_low_can_set_control): Likewise.
4752 (i386_get_debug_register_length): Likewise.
4753
47542014-06-17 Gary Benson <gbenson@redhat.com>
4755
b9228891
GB
4756 * i386-low.h (i386-dregs.h): New include.
4757 (DR_FIRSTADDR): Now in i386-dregs.h.
4758 (DR_LASTADDR): Likewise.
4759 (DR_NADDR): Likewise.
4760 (DR_STATUS): Likewise.
4761 (DR_CONTROL): Likewise.
4762 (i386_debug_reg_state): Likewise.
4763 (i386_dr_insert_watchpoint): Likewise.
4764 (i386_dr_remove_watchpoint): Likewise.
4765 (i386_dr_region_ok_for_watchpoint): Likewise.
4766 (i386_dr_stopped_data_address): Likewise.
4767 (i386_dr_stopped_by_watchpoint): Likewise.
4768 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4769
4be83cc2
GB
47702014-06-18 Gary Benson <gbenson@redhat.com>
4771
4772 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4773 i386_dr_insert_watchpoint.
4774 (i386_low_remove_watchpoint): Renamed to
4775 i386_dr_remove_watchpoint.
4776 (i386_low_region_ok_for_watchpoint): Renamed to
4777 i386_dr_region_ok_for_watchpoint.
4778 (i386_low_stopped_data_address): Renamed to
4779 i386_dr_stopped_data_address.
4780 (i386_low_stopped_by_watchpoint): Renamed to
4781 i386_dr_stopped_by_watchpoint.
4782 * i386-low.c (i386_show_dr): Renamed to
4783 i386_dr_show and made nonstatic. All uses updated.
4784 (i386_length_and_rw_bits): Renamed to
4785 i386_dr_length_and_rw_bits and made nonstatic.
4786 All uses updated.
4787 (i386_insert_aligned_watchpoint): Renamed to
4788 i386_dr_insert_aligned_watchpoint and made nonstatic.
4789 All uses updated.
4790 (i386_remove_aligned_watchpoint): Renamed to
4791 i386_dr_remove_aligned_watchpoint and made nonstatic.
4792 All uses updated.
4793 (i386_update_inferior_debug_regs): Renamed to
4794 i386_dr_update_inferior_debug_regs and made nonstatic.
4795 All uses updated.
4796 (i386_low_insert_watchpoint): Renamed to
4797 i386_dr_insert_watchpoint. All uses updated.
4798 (i386_low_remove_watchpoint): Renamed to
4799 i386_dr_remove_watchpoint. All uses updated.
4800 (i386_low_region_ok_for_watchpoint): Renamed to
4801 i386_dr_region_ok_for_watchpoint. All uses updated.
4802 (i386_low_stopped_data_address): Renamed to
4803 i386_dr_stopped_data_address. All uses updated.
4804 (i386_low_stopped_by_watchpoint): Renamed to
4805 i386_dr_stopped_by_watchpoint. All uses updated.
4806
131aa0d4
GB
48072014-06-18 Gary Benson <gbenson@redhat.com>
4808
4809 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4810 (i386_dr_low_can_set_control): Likewise.
4811 (i386_insert_aligned_watchpoint): New check.
4812
d9305f7f
GB
48132014-06-18 Gary Benson <gbenson@redhat.com>
4814
4815 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4816 Renamed to state.
4817
e927c9fc
GB
48182014-06-18 Gary Benson <gbenson@redhat.com>
4819
4820 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4821 instead of fatal and error.
4822 (i386_handle_nonaligned_watchpoint): Likewise.
4823
1b6d4134
GB
48242014-06-18 Gary Benson <gbenson@redhat.com>
4825
4826 * i386-low.c (i386_get_debug_register_length): New macro.
4827 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4828 (i386_show_dr): Use debug_printf instead of fprintf. Use
4829 phex to format values.
4830
6e62758f
GB
48312014-06-18 Gary Benson <gbenson@redhat.com>
4832
4833 * i386-low.h: Comment changes.
4834 * i386-low.c: Likewise.
4835
fc6e2f03
GB
48362014-06-18 Gary Benson <gbenson@redhat.com>
4837
4838 * i386-low.c: Whitespace changes.
4839
f9d1eeed
TT
48402014-06-12 Tom Tromey <tromey@redhat.com>
4841
4842 * utils.c (freeargv): Remove.
4843
0b04e523
TT
48442014-06-12 Tom Tromey <tromey@redhat.com>
4845
4846 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4847 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4848 (parse_debug_format_options): Likewise.
4849 (gdbserver_usage): Likewise.
4850 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4851 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4852 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4853 against libiberty.
4854 ($(LIBGNU)): Depend on libiberty.
4855 (all-lib): Recurse into all subdirs.
4856 (install-only): Invoke "install" target in subdirs.
4857 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4858 targets.
4859 * configure: Rebuild.
4860 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4861 for vasprintf, vsnprintf, or gettimeofday.
4862 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4863 srv_tgtobj.
4864
270c9937
JB
48652014-06-05 Joel Brobecker <brobecker@adacore.com>
4866
4867 * development.sh: Delete.
4868 * Makefile.in (config.status): Adjust dependency on development.sh.
4869 * configure.ac: Adjust development.sh source call.
4870 * configure: Regenerate.
4871
0a261ed8
PA
48722014-06-02 Pedro Alves <palves@redhat.com>
4873
4874 * ax.c (gdb_free_agent_expr): New function.
4875 * ax.h (gdb_free_agent_expr): New declaration.
4876 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4877 list.
4878 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4879 static.
4880 (clear_breakpoint_conditions_and_commands): New function.
4881 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4882 (clear_breakpoint_conditions_and_commands): New declaration.
4883
e9dae05e
RR
48842014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4885
4886 * linux-aarch64-low.c (asm/ptrace.h): Include.
4887
5876f503
JK
48882014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4889
4890 Fix TLS access for -static -pthread.
4891 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4892 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4893 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4894
802e8e6d
PA
48952014-05-20 Pedro Alves <palves@redhat.com>
4896
4897 * linux-aarch64-low.c (aarch64_insert_point)
4898 (aarch64_remove_point): No longer check whether the type is
4899 supported here. Adjust to new interface.
4900 (the_low_target): Install aarch64_supports_z_point_type as
4901 supports_z_point_type method.
4902 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4903 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4904 instead of a Z packet char. Adjust.
4905 (arm_supports_z_point_type): New function.
4906 (arm_insert_point, arm_remove_point): Adjust to new interface.
4907 (the_low_target): Install arm_supports_z_point_type.
4908 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4909 (cris_insert_point, cris_remove_point): Adjust to new interface.
4910 Don't check whether the type is supported here.
4911 (the_low_target): Install cris_supports_z_point_type.
4912 * linux-low.c (linux_supports_z_point_type): New function.
4913 (linux_insert_point, linux_remove_point): Adjust to new interface.
4914 * linux-low.h (struct linux_target_ops) <insert_point,
4915 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4916 raw_breakpoint pointer parameter.
4917 <supports_z_point_type>: New method.
4918 * linux-mips-low.c (mips_supports_z_point_type): New function.
4919 (mips_insert_point, mips_remove_point): Adjust to new interface.
4920 Use mips_supports_z_point_type.
4921 (the_low_target): Install mips_supports_z_point_type.
4922 * linux-ppc-low.c (the_low_target): Install NULL as
4923 supports_z_point_type method.
4924 * linux-s390-low.c (the_low_target): Install NULL as
4925 supports_z_point_type method.
4926 * linux-sparc-low.c (the_low_target): Install NULL as
4927 supports_z_point_type method.
4928 * linux-x86-low.c (x86_supports_z_point_type): New function.
4929 (x86_insert_point): Adjust to new insert_point interface. Use
4930 insert_memory_breakpoint. Adjust to new
4931 i386_low_insert_watchpoint interface.
4932 (x86_remove_point): Adjust to remove_point interface. Use
4933 remove_memory_breakpoint. Adjust to new
4934 i386_low_remove_watchpoint interface.
4935 (the_low_target): Install x86_supports_z_point_type.
4936 * lynx-low.c (lynx_target_ops): Install NULL as
4937 supports_z_point_type callback.
4938 * nto-low.c (nto_supports_z_point_type): New.
4939 (nto_insert_point, nto_remove_point): Adjust to new interface.
4940 (nto_target_ops): Install nto_supports_z_point_type.
4941 * mem-break.c: Adjust intro comment.
4942 (struct raw_breakpoint) <raw_type, size>: New fields.
4943 <inserted>: Update comment.
4944 <shlib_disabled>: Delete field.
4945 (enum bkpt_type) <gdb_breakpoint>: Delete value.
4946 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4947 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4948 (raw_bkpt_type_to_target_hw_bp_type): New function.
4949 (find_enabled_raw_code_breakpoint_at): New function.
4950 (find_raw_breakpoint_at): New type and size parameters. Use them.
4951 (insert_memory_breakpoint): New function, based off
4952 set_raw_breakpoint_at.
4953 (remove_memory_breakpoint): New function.
4954 (set_raw_breakpoint_at): Reimplement.
4955 (set_breakpoint): New, based on set_breakpoint_at.
4956 (set_breakpoint_at): Reimplement.
4957 (delete_raw_breakpoint): Go through the_target->remove_point
4958 instead of assuming memory breakpoints.
4959 (find_gdb_breakpoint_at): Delete.
4960 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4961 (find_gdb_breakpoint): New function.
4962 (set_gdb_breakpoint_at): Delete.
4963 (z_type_supported): New function.
4964 (set_gdb_breakpoint_1): New function, loosely based off
4965 set_gdb_breakpoint_at.
4966 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4967 (delete_gdb_breakpoint_at): Delete.
4968 (delete_gdb_breakpoint_1): New function, loosely based off
4969 delete_gdb_breakpoint_at.
4970 (delete_gdb_breakpoint): New function.
4971 (clear_gdb_breakpoint_conditions): Rename to ...
4972 (clear_breakpoint_conditions): ... this. Don't handle a NULL
4973 breakpoint.
4974 (add_condition_to_breakpoint): Make static.
4975 (add_breakpoint_condition): Take a struct breakpoint pointer
4976 instead of an address. Adjust.
4977 (gdb_condition_true_at_breakpoint): Rename to ...
4978 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4979 z_type parameter.
4980 (gdb_condition_true_at_breakpoint): Reimplement.
4981 (add_breakpoint_commands): Take a struct breakpoint pointer
4982 instead of an address. Adjust.
4983 (gdb_no_commands_at_breakpoint): Rename to ...
4984 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
4985 parameter. Return true if no breakpoint was found. Change debug
4986 output.
4987 (gdb_no_commands_at_breakpoint): Reimplement.
4988 (run_breakpoint_commands): Rename to ...
4989 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
4990 and change return type to boolean.
4991 (run_breakpoint_commands): New function.
4992 (gdb_breakpoint_here): Also check for Z1 breakpoints.
4993 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
4994 breakpoint. Go through the_target->remove_point instead of
4995 assuming memory breakpoint.
4996 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
4997 software and hardware breakpoints.
4998 (reinsert_raw_breakpoint): Go through the_target->insert_point
4999 instead of assuming memory breakpoint.
5000 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5001 software and hardware breakpoints.
5002 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5003 Check both software and hardware breakpoints.
5004 (validate_inserted_breakpoint): Assert the breakpoint is a
5005 software breakpoint. Set the inserted flag to -1 instead of
5006 setting shlib_disabled.
5007 (delete_disabled_breakpoints): Adjust.
5008 (validate_breakpoints): Only validate software breakpoints.
5009 Adjust to inserted flag change.
5010 (check_mem_read, check_mem_write): Skip breakpoint types other
5011 than software breakpoints. Adjust to inserted flag change.
5012 * mem-break.h (enum raw_bkpt_type): New enum.
5013 (raw_breakpoint, struct process_info): Forward declare.
5014 (Z_packet_to_target_hw_bp_type): Delete declaration.
5015 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5016 (set_gdb_breakpoint, delete_gdb_breakpoint)
5017 (clear_breakpoint_conditions): New declarations.
5018 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5019 (breakpoint_inserted_here): Update comment.
5020 (add_breakpoint_condition, add_breakpoint_commands): Replace
5021 address parameter with a breakpoint pointer parameter.
5022 (gdb_breakpoint_here): Update comment.
5023 (delete_gdb_breakpoint_at): Delete.
5024 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5025 * server.c (process_point_options): Take a struct breakpoint
5026 pointer instead of an address. Adjust.
5027 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5028 delete_gdb_breakpoint.
5029 * spu-low.c (spu_target_ops): Install NULL as
5030 supports_z_point_type method.
5031 * target.h: Include mem-break.h.
5032 (struct target_ops) <prepare_to_access_memory>: Update comment.
5033 <supports_z_point_type>: New field.
5034 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5035 instead of a char. Also take a raw breakpoint pointer.
5036 * win32-arm-low.c (the_low_target): Install NULL as
5037 supports_z_point_type.
5038 * win32-i386-low.c (i386_supports_z_point_type): New function.
5039 (i386_insert_point, i386_remove_point): Adjust to new interface.
5040 (the_low_target): Install i386_supports_z_point_type.
5041 * win32-low.c (win32_supports_z_point_type): New function.
5042 (win32_insert_point, win32_remove_point): Adjust to new interface.
5043 (win32_target_ops): Install win32_supports_z_point_type.
5044 * win32-low.h (struct win32_target_ops):
5045 <supports_z_point_type>: New method.
5046 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5047 instead of a char. Also take a raw breakpoint pointer.
5048
932539e3
PA
50492014-05-20 Pedro Alves <palves@redhat.com>
5050
5051 * mem-break.h: Include break-common.h.
5052 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5053 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5054 (Z_packet_to_target_hw_bp_type): New declaration.
5055 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5056 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5057 (Z_PACKET_ACCESS_WP): Delete macros.
5058 (Z_packet_to_hw_type): Delete function.
5059 * i386-low.h: Don't include break-common.h here.
5060 (Z_packet_to_hw_type): Delete declaration.
5061 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5062 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5063 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5064 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5065 * linux-aarch64-low.c: Don't include break-common.h here.
5066 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5067 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5068 (Z_packet_to_target_hw_bp_type): Delete function.
5069 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5070 function.
5071 (mips_insert_point, mips_remove_point): Use
5072 Z_packet_to_target_hw_bp_type.
5073
4ff0d3d8
PA
50742014-05-20 Pedro Alves <palves@redhat.com>
5075
5076 * linux-aarch64-low.c: Include break-common.h.
5077 (enum target_point_type): Delete.
5078 (Z_packet_to_point_type): Rename to ...
5079 (Z_packet_to_target_hw_bp_type): ... this, and return a
5080 target_hw_bp_type instead.
5081 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5082 instead of an enum target_point_type.
5083 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5084 breakpoint type.
5085 (aarch64_dr_state_insert_one_point)
5086 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5087 (aarch64_handle_aligned_watchpoint)
5088 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5089 Take an enum target_hw_bp_type instead of an enum
5090 target_point_type.
5091 (aarch64_supports_z_point_type): New function.
5092 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5093 use Z_packet_to_target_hw_bp_type.
5094
786dc519
JB
50952014-05-20 Joel Brobecker <brobecker@adacore.com>
5096
5097 * configure.ac: Only use -Werror by default when DEVELOPMENT
5098 is true.
5099 * configure: Regenerate.
5100
9e0aa64f
JK
51012014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5102
5103 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5104 * linux-x86-low.c (X86_64_USER_REGS): New.
5105 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5106
2b577b92
YQ
51072014-04-28 Yao Qi <yao@codesourcery.com>
5108
5109 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5110 name.
5111
94611da2
PA
51122014-04-25 Pedro Alves <palves@redhat.com>
5113
5114 PR server/16255
5115 * linux-low.c (linux_attach_fail_reason_string): New function.
5116 (linux_attach_lwp): Delete.
5117 (linux_attach_lwp_1): Rename to ...
5118 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5119 argument. Remove "initial" parameter. Return int instead of
5120 void. Don't error or warn here.
5121 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5122 failure to attach to the tgid. Call warning when failing to
5123 attach to an lwp.
5124 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5125 argument. Remove "initial" parameter. Return int instead of
5126 void. Don't error or warn here.
5127 (linux_attach_fail_reason_string): New declaration.
5128 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5129 interface change. Use linux_attach_fail_reason_string.
5130
01f9f808
MS
51312014-04-24 Michael Sturm <michael.sturm@mintel.com>
5132 Walfred Tedeschi <walfred.tedeschi@intel.com>
5133
5134 * Makefile.in: Added rules to handle new files
5135 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5136 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5137 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5138 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5139 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5140 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5141 x32-avx512-linux.o.
5142 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5143 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5144 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5145 i386/x32-avx512.xml.
5146 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5147 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5148 i386/x32-avx512-linux.xml.
5149 * i387-fp.c (num_avx512_k_registers): New constant for number
5150 of K registers.
5151 (num_avx512_zmmh_low_registers): New constant for number of
5152 lower ZMM registers (0-15).
5153 (num_avx512_zmmh_high_registers): New constant for number of
5154 higher ZMM registers (16-31).
5155 (num_avx512_ymmh_registers): New contant for number of higher
5156 YMM registers (ymm16-31 added by avx521 on x86_64).
5157 (num_avx512_xmm_registers): New constant for number of higher
5158 XMM registers (xmm16-31 added by AVX512 on x86_64).
5159 (struct i387_xsave): Add space for AVX512 registers.
5160 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5161 Add code to handle AVX512 registers.
5162 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5163 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5164 prototypei from generated file.
5165 (tdesc_amd64_avx512_linux): Likewise.
5166 (init_registers_x32_avx512_linux): Likewise.
5167 (tdesc_x32_avx512_linux): Likewise.
5168 (init_registers_i386_avx512_linux): Likewise.
5169 (tdesc_i386_avx512_linux): Likewise.
5170 (x86_64_regmap): Add AVX512 registers.
5171 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5172 mask.
5173 (initialize_low_arch): Add code to initialize AVX512 registers.
5174
51aa91f9
PA
51752014-04-23 Pedro Alves <palves@redhat.com>
5176
5177 * mem-break.c (find_gdb_breakpoint_at): Make static.
5178 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5179
a4165e94
PA
51802014-04-23 Pedro Alves <palves@redhat.com>
5181
5182 * i386-low.c: Don't include break-common.h here.
5183 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5184 prototype to take target_hw_bp_type as argument instead of a Z
5185 packet char.
5186 * i386-low.h: Include break-common.h here.
5187 (Z_packet_to_hw_type): Declare.
5188 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5189 prototypes.
5190 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5191 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5192 (x86_remove_point): Convert the packet number to a
5193 target_hw_bp_type before calling i386_low_remove_watchpoint.
5194 * win32-i386-low.c (i386_insert_point): Convert the packet number
5195 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5196 (i386_remove_point): Convert the packet number to a
5197 target_hw_bp_type before calling i386_low_remove_watchpoint.
5198
b8acf843
PA
51992014-04-23 Pedro Alves <palves@redhat.com>
5200
5201 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5202
d708bcd1
PA
52032014-04-10 Pedro Alves <palves@redhat.com>
5204
5205 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5206 Check if the condition or command is NULL before checking if the
5207 breakpoint is known. On success, return true.
5208 * mem-break.h (add_breakpoint_condition): Document return.
5209 (add_breakpoint_commands): Add describing comment.
5210 * server.c (skip_to_semicolon): New function.
5211 (process_point_options): Use it.
5212
2eec7d5b
PA
52132014-04-09 Pedro Alves <palves@redhat.com>
5214
5215 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5216 to lwpid_of.
5217
fa96cb38
PA
52182014-02-27 Pedro Alves <palves@redhat.com>
5219
5220 PR 12702
5221 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5222 macros.
5223 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5224 output.
5225 (last_thread_of_process_p): Take a PID argument instead of a
5226 thread pointer.
5227 (linux_wait_for_lwp): Delete.
5228 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5229 functions.
5230 (linux_low_filter_event): New function, party factored out from
5231 linux_wait_for_event.
5232 (linux_wait_for_event): Rename to ...
5233 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5234 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5235 sigsuspend. Check for zombie leaders.
5236 (linux_wait_for_event): Reimplement as wrapper around
5237 linux_wait_for_event_filtered.
5238 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5239 a normal or signal exit is seen, it's the whole process exiting.
5240 (wait_for_sigstop): No longer a for_each_inferior callback.
5241 Rewrite on top of linux_wait_for_event_filtered.
5242 (stop_all_lwps): Call wait_for_sigstop directly.
5243 * server.c (resume, handle_target_event): Handle
5244 TARGET_WAITKIND_NO_RESUMED.
5245
d763de10
JB
52462014-02-26 Joel Brobecker <brobecker@adacore.com>
5247
5248 * win32-low.c (psapi_get_dll_name,
5249 * win32_CreateToolhelp32Snapshot): Delete.
5250 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5251 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5252 Delete.
5253 (handle_load_dll): Add function description.
5254 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5255
850a0f76
JB
52562014-02-26 Joel Brobecker <brobecker@adacore.com>
5257
5258 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5259 Add comment.
5260 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5261 base address when calling win32_add_one_solib.
5262 (handle_load_dll): Delete local variable load_addr.
5263 Remove 0x1000 offset applied to DLL base address when calling
5264 win32_add_one_solib.
5265 (handle_unload_dll): Add comment.
5266
f25b3fc3
JB
52672014-02-26 Joel Brobecker <brobecker@adacore.com>
5268
5269 * win32-low.c (win32_add_all_dlls): Renames
5270 win32_ensure_ntdll_loaded. Rewrite function documentation.
5271 Adjust implementation to always load all DLLs.
5272 Add 0x1000 offset to DLL base address when calling
5273 win32_add_one_solib.
5274 (child_initialization_done): New static global.
5275 (do_initial_child_stuff): Set child_initialization_done to
5276 zero during child initialization, and 1 after. Replace call
5277 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5278 Add comment.
5279 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5280 (handle_unload_dll): Add function documentation.
5281 (get_child_debug_event): Ignore load and unload DLL events
5282 during child initialization.
5283
d86d4aaf
DE
52842014-02-20 Doug Evans <dje@google.com>
5285
3bc32da3 5286 Remove global all_lwps.
d86d4aaf
DE
5287 * inferiors.h (ptid_of): Move here from linux-low.h.
5288 (pid_of, lwpid_of): Ditto.
5289 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5290 parameter is a struct thread_info * now.
5291 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5292 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5293 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5294 directly.
5295 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5296 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5297 * linux-arm-low.c (update_registers_callback): Update, "entry"
5298 parameter is a struct thread_info * now.
5299 Fetch lwpid from current_inferior directly.
5300 (arm_insert_point): Pass &all_threads to find_inferior instead of
5301 &all_lwps.
5302 (arm_remove_point): Ditto.
5303 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5304 (arm_prepare_to_resume): Fetch pid from thread.
5305 (arm_read_description): Fetch lwpid from current_inferior directly.
5306 * linux-low.c (all_lwps): Delete.
5307 (delete_lwp): Delete call to remove_inferior.
5308 (handle_extended_wait): Fetch lwpid from thread.
5309 (add_lwp): Don't set lwp->entry.id. Remove call to
5310 add_inferior_to_list.
5311 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5312 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5313 (kill_one_lwp_callback): Ditto.
5314 (linux_kill): Don't dereference NULL pointer.
5315 Fetch ptid,lwpid from thread.
5316 (get_detach_signal): Fetch ptid from thread.
5317 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5318 Simplify call to regcache_invalidate_thread.
5319 (delete_lwp_callback): Update, "entry" parameter is a
5320 struct thread_info * now. Fetch pid from thread.
5321 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5322 (status_pending_p_callback): Update, "entry" parameter is a
5323 struct thread_info * now. Fetch ptid from thread.
5324 (find_lwp_pid): Update, "entry" parameter is a
5325 struct thread_info * now.
5326 (linux_wait_for_lwp): Fetch pid from thread.
5327 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5328 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5329 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5330 (dequeue_one_deferred_signal): Ditto.
5331 (cancel_breakpoint): Fetch ptid from current_inferior.
5332 (linux_wait_for_event): Pass &all_threads to find_inferior,
5333 not &all_lwps. Fetch ptid, lwpid from thread.
5334 (count_events_callback): Update, "entry" parameter is a
5335 struct thread_info * now.
5336 (select_singlestep_lwp_callback): Ditto.
5337 (select_event_lwp_callback): Ditto.
5338 (cancel_breakpoints_callback): Ditto.
5339 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5340 not &all_lwps.
5341 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5342 (unsuspend_one_lwp): Update, "entry" parameter is a
5343 struct thread_info * now.
5344 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5345 not &all_lwps.
5346 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5347 Fetch lwpid from thread, not lwp.
5348 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5349 Pass &all_threads to find_inferior, not &all_lwps.
5350 (send_sigstop): Fetch lwpid from thread, not lwp.
5351 (send_sigstop_callback): Update, "entry" parameter is a
5352 struct thread_info * now.
5353 (suspend_and_send_sigstop_callback): Ditto.
5354 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5355 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5356 struct thread_info * now.
5357 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5358 from thread, lwp.
5359 (lwp_running): Update, "entry" parameter is a
5360 struct thread_info * now.
5361 (stop_all_lwps): Fetch ptid from thread.
5362 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5363 (linux_resume_one_lwp): Fetch lwpid from thread.
5364 (linux_set_resume_request): Update, "entry" parameter is a
5365 struct thread_info * now. Fetch pid, lwpid from thread.
5366 (resume_status_pending_p): Update, "entry" parameter is a
5367 struct thread_info * now.
5368 (need_step_over_p): Ditto. Fetch lwpid from thread.
5369 (start_step_over): Fetch lwpid from thread.
5370 (linux_resume_one_thread): Update, "entry" parameter is a
5371 struct thread_info * now. Fetch lwpid from thread.
5372 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5373 (proceed_one_lwp): Update, "entry" parameter is a
5374 struct thread_info * now. Fetch lwpid from thread.
5375 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5376 struct thread_info * now.
5377 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5378 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5379 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5380 directly.
5381 (regsets_store_inferior_registers): Ditto.
5382 (fetch_register, store_register): Ditto.
5383 (linux_read_memory, linux_write_memory): Ditto.
5384 (linux_request_interrupt): Ditto.
5385 (linux_read_auxv): Ditto.
5386 (linux_xfer_siginfo): Ditto.
5387 (linux_qxfer_spu): Ditto.
5388 (linux_qxfer_libraries_svr4): Ditto.
5389 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5390 moved to inferiors.h.
5391 (get_lwp): Delete.
5392 (get_thread_lwp): Update.
5393 (struct lwp_info): Delete member "entry". Simplify comment for
5394 member "thread".
5395 (all_lwps): Delete.
5396 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5397 current_inferior directly.
5398 (update_watch_registers_callback): Update, "entry" parameter is a
5399 struct thread_info * now. Fetch pid from thread.
5400 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5401 (mips_insert_point): Fetch lwpid from current_inferior.
5402 Pass &all_threads to find_inferior, not &all_lwps.
5403 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5404 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5405 directly.
5406 (mips_stopped_data_address): Ditto.
5407 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5408 directly.
5409 * linux-tile-low.c (tile_arch_setup): Ditto.
5410 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5411 (update_debug_registers_callback): Update, "entry" parameter is a
5412 struct thread_info * now. Fetch pid from thread.
5413 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5414 Pass &all_threads to find_inferior, not &all_lwps.
5415 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5416 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5417 Pass &all_threads to find_inferior, not &all_lwps.
5418 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5419 (i386_dr_low_get_status): Ditto.
5420 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5421 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5422 (x86_linux_read_description): Ditto.
5423 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5424
3b8361aa
DE
54252014-02-20 Doug Evans <dje@google.com>
5426
5427 * inferiors.c (get_first_inferior): Fix buglet.
5428
f7667f0d
DE
54292014-02-19 Doug Evans <dje@google.com>
5430
5431 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5432 * inferiors.c (add_thread): Change result type to struct thread_info *.
5433 All callers updated.
5434 (add_lwp): Call add_thread here instead of in callers.
5435 All callers updated.
5436 * linux-low.h (get_lwp_thread): Rewrite.
5437 (struct lwp_info): New member "thread".
5438
b3312d80
DE
54392014-02-19 Doug Evans <dje@google.com>
5440
5441 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5442 All callers updated.
5443
ecc6f45c
DE
54442014-02-19 Doug Evans <dje@google.com>
5445
5446 * inferiors.c (add_thread): Fix whitespace.
5447
649ebbca
DE
54482014-02-19 Doug Evans <dje@google.com>
5449
5450 * dll.c (clear_dlls): Replace accessing list implemention details
5451 with API function.
5452 * gdbthread.h (get_first_thread): Declare.
5453 * inferiors.c (for_each_inferior_with_data): New function.
5454 (get_first_thread): New function.
5455 (find_thread_ptid): Simplify.
5456 (get_first_inferior): New function.
5457 (clear_list): Delete.
5458 (one_inferior_p): New function.
5459 (clear_inferior_list): New function.
5460 (clear_inferiors): Update.
5461 * inferiors.h (for_each_inferior_with_data): Declare.
5462 (clear_inferior_list): Declare.
5463 (one_inferior_p): Declare.
5464 (get_first_inferior): Declare.
5465 * linux-low.c (linux_wait_for_event): Replace accessing list
5466 implemention details with API function.
5467 * server.c (target_running): Ditto.
5468 (accumulate_file_name_length): New function.
5469 (emit_dll_description): New function.
5470 (handle_qxfer_libraries): Replace accessing list implemention
5471 details with API function.
5472 (handle_qxfer_threads_worker): New function.
5473 (handle_qxfer_threads_proper): Replace accessing list implemention
5474 details with API function.
5475 (handle_query): Ditto.
5476 (visit_actioned_threads_callback_ftype): New typedef.
5477 (visit_actioned_threads_data): New struct.
5478 (visit_actioned_threads): Rewrite to be find_inferior callback.
5479 (resume): Call find_inferior.
5480 (handle_status): Replace accessing list implemention
5481 details with API function.
5482 (process_serial_event): Replace accessing list implemention details
5483 with API function.
5484 * target.c (set_desired_inferior): Replace accessing list implemention
5485 details with API function.
5486 * tracepoint.c (same_process_p): New function.
5487 (gdb_agent_about_to_close): Replace accessing list implemention
5488 details with API function.
5489 * win32-low.c (child_delete_thread): Replace accessing list
5490 implemention details with API function.
5491 (match_dll_by_basename): New function.
5492 (dll_is_loaded_by_basename): New function.
5493 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5494 details call to dll_is_loaded_by_basename.
5495
80894984
DE
54962014-02-19 Doug Evans <dje@google.com>
5497
5498 * dll.h (struct dll_info): Add comment.
5499 * gdbthread.h (struct thread_info): Add comment.
5500 (current_ptid): Simplify.
5501 * inferiors.c (add_process): Update.
5502 (remove_process): Update.
5503 * inferiors.h (struct process_info): Rename member "head" to "entry".
5504 * linux-low.c (delete_lwp): Update.
5505 (add_lwp): Update.
5506 (last_thread_of_process_p): Update.
5507 (kill_one_lwp_callback, linux_kill): Update.
5508 (status_pending_p_callback): Update.
5509 (wait_for_sigstop): Update. Simplify read of ptid.
5510 (start_step_over): Update.
5511 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5512 (get_lwp_thread): Update.
5513 (struct lwp_info): Rename member "head" to "entry".
5514 * regcache.h (inferior_list_entry): Delete.
5515 * server.c (kill_inferior_callback): Update.
5516 (detach_or_kill_inferior_callback): Update.
5517 (print_started_pid): Update.
5518 (print_attached_pid): Update.
5519 (process_serial_event): Simplify read of ptid.
5520 * thread-db.c (thread_db_create_event): Update.
5521 (thread_db_get_tls_address): Update.
5522 * win32-low.c (current_inferior_ptid): Simplify.
5523
46917d26
TT
55242014-02-19 Tom Tromey <tromey@redhat.com>
5525
5526 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5527 argument.
5528 (target_supports_btrace): Update.
5529
0759a81e
YQ
55302014-02-14 Yao Qi <yao@codesourcery.com>
5531
5532 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5533 (rsp-low-ipa.o): New target.
5534
a7191e8b
TT
55352014-02-12 Tom Tromey <tromey@redhat.com>
5536
5537 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5538 convert_ascii_to_int.
5539 * regcache.c (registers_to_string): Likewise.
5540 * remote-utils.c (decode_M_packet): Likewise.
5541 * server.c (process_serial_event): Likewise.
5542
ff0e980e
TT
55432014-02-12 Tom Tromey <tromey@redhat.com>
5544
5545 * server.c (handle_query, handle_v_run): Use hex2bin, not
5546 unhexify.
5547 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5548
e9371aff
TT
55492014-02-12 Tom Tromey <tromey@redhat.com>
5550
5551 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5552 convert_int_to_ascii.
5553 * regcache.c (registers_to_string, collect_register_as_string):
5554 Likewise.
5555 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5556 Likewise.
5557 * server.c (process_serial_event): Likewise.
5558 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5559 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5560
971dc0b8
TT
55612014-02-12 Tom Tromey <tromey@redhat.com>
5562
5563 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5564 bin2hex, not hexify.
5565 * tracepoint.c (cmd_qtstatus): Likewise.
5566
0a822afb
TT
55672014-02-12 Tom Tromey <tromey@redhat.com>
5568
5569 * remote-utils.c (monitor_output): Pass explicit length to
5570 hexify.
5571
9c3d6531
TT
55722014-02-12 Tom Tromey <tromey@redhat.com>
5573
5574 * tracepoint.c: Include rsp-low.h.
5575 * server.c: Include rsp-low.h.
5576 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5577 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5578 declare.
5579 * remote-utils.c: Include rsp-low.h.
5580 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5581 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5582 (convert_int_to_ascii, convert_ascii_to_int): Move to
5583 common/rsp-low.c.
5584 * regcache.c: Include rsp-low.h.
5585 * ax.c: Include rsp-low.h.
5586 * Makefile.in (SFILES): Add common/rsp-low.c.
5587 (OBS): Add rsp-low.o.
5588 (rsp-low.o): New target.
5589
01fd3ea5
TT
55902014-02-12 Tom Tromey <tromey@redhat.com>
5591
5592 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5593 Include print-utils.h.
5594 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5595 (plongest, thirty_two, phex_nz): Remove.
5596 * Makefile.in (SFILES): Add common/print-utils.c.
5597 (OBS): Add print-utils.o.
5598 (print-utils-ipa.o): New target.
5599 (print-utils.o): New target.
5600 (IPA_OBJS): Add print-utils-ipa.o.
5601
e99dc820
TT
56022014-02-06 Tom Tromey <tromey@redhat.com>
5603
5604 * Makefile.in (SFILES): Fix indentation.
5605
ee1e2d4f
DE
56062014-02-05 Doug Evans <dje@google.com>
5607
5608 * linux-low.c (linux_wait_for_event): Improve comment.
5609 (linux_wait_1): Keep current_inferior in sync with event_child.
5610
f5a02773
DE
56112014-01-22 Doug Evans <dje@google.com>
5612
5613 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5614
87ce2a04
DE
56152014-01-22 Doug Evans <dje@google.com>
5616
5617 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5618 * configure: Regenerate.
5619 * config.in: Regenerate.
5620 * Makefile.in (SFILES): Add debug.c.
5621 (OBS): Add debug.o.
5622 * debug.c: New file.
5623 * debug.h: New file.
5624 * linux-aarch64-low.c (*): Update all debugging printfs to use
5625 debug_printf instead of fprintf.
5626 * linux-arm-low.c (*): Ditto.
5627 * linux-cris-low.c (*): Ditto.
5628 * linux-crisv32-low.c (*): Ditto.
5629 * linux-m32r-low.c (*): Ditto.
5630 * linux-sparc-low.c (*): Ditto.
5631 * linux-x86.c (*): Ditto.
5632 * linux-low.c (*): Ditto.
5633 (linux_wait_1): Add calls to debug_enter, debug_exit.
5634 (linux_wait): Remove redundant debugging printf.
5635 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5636 (linux_resume, unstop_all_lwps): Ditto.
5637 * mem-break.c (*): Update all debugging printfs to use
5638 debug_printf instead of fprintf.
5639 * remote-utils.c (*): Ditto.
5640 * thread-db.c (*): Ditto.
5641 * server.c #include <ctype.h>, "gdb_vecs.h".
5642 (debug_threads): Moved to debug.c.
5643 (*): Update all debugging printfs to use debug_printf instead of
5644 fprintf.
5645 (start_inferior): Replace call to fflush with call to debug_flush.
5646 (monitor_show_help): Mention set debug-format.
5647 (parse_debug_format_options): New function.
5648 (handle_monitor_command): Handle "monitor set debug-format".
5649 (gdbserver_usage): Mention --debug-format.
5650 (main): Parse --debug-format.
5651 * server.h (debug_threads): Declaration moved to debug.h.
5652 #include "debug.h".
5653 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5654 trace_debug_1 that uses debug_printf.
5655 (tracepoint_look_up_symbols): Update all debugging printfs to use
5656 debug_printf instead of fprintf.
5657
e671835b
BS
56582014-01-20 Baruch Siach <baruch@tkos.co.il>
5659
5660 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5661 sys/ptrace.h.
5662
b5737fa9
PA
56632014-01-17 Pedro Alves <palves@redhat.com>
5664
ea38d2a9 5665 PR build/16445
c7faa97a
PA
5666 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5667 defined after including gdb_proc_service.h.
b5737fa9 5668
40ed484e
DE
56692014-01-16 Doug Evans <dje@google.com>
5670
5671 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5672 (match_dll): Use it.
5673
969c39fb
MM
56742014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5675
5676 * target.h (target_ops) <read_btrace>: Change parameters and
5677 return type to allow error reporting.
5678 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5679 trace reading errors on.
5680 * linux-low.c (linux_low_read_btrace): Pass trace reading
5681 errors on.
5682 (linux_low_disable_btrace): New.
5683
ab7f45ba
DE
56842014-01-15 Doug Evans <dje@google.com>
5685
5686 * inferiors.c (thread_id_to_gdb_id): Delete.
5687 * inferiors.h (thread_id_to_gdb_id): Delete.
5688
66af0f44
EZ
56892014-01-13 Eli Zaretskii <eliz@gnu.org>
5690
5691 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5692 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5693 versions.
5694
9939e131
PA
56952014-01-08 Pedro Alves <palves@redhat.com>
5696
5697 * server.c (handle_status): Don't discard previous queued stop
5698 replies or thread's pending status here.
5699 (main) <disconnection>: Do it here instead.
5700
b7ea362b
PA
57012014-01-08 Pedro Alves <palves@redhat.com>
5702
5703 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5704 * server.c (visit_actioned_threads, handle_pending_status): New
5705 function.
5706 (handle_v_cont): Factor out parts to ...
5707 (resume): ... this new function. If in all-stop, and a thread
5708 being resumed has a pending status, report it without actually
5709 resuming.
5710 (myresume): Adjust to use the new 'resume' function.
5711 (clear_pending_status_callback, set_pending_status_callback)
5712 (find_status_pending_thread_callback): New functions.
5713 (handle_status): Handle the case of multiple threads having
5714 interesting statuses to report. Report threads' real last signal
5715 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5716 with an interesting thread to report the status for, instead of
5717 always reporting the status of the first thread.
5718
28498c42
JB
57192014-01-01 Joel Brobecker <brobecker@adacore.com>
5720
5721 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5722 * gdbreplay.c (gdbreplay_version): Likewise.
5723
f45c82da
YZ
57242013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5725
5726 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5727 iov.iov_len with the real length in use.
5728
379a5e2d
JB
57292013-12-13 Joel Brobecker <brobecker@adacore.com>
5730
5731 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5732 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5733 for all targets that use win32-low.c.
5734 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5735 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5736
4210d83e
PA
57372013-12-13 Pedro Alves <palves@redhat.com>
5738
5739 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5740 if equal to TARGET_WAITKIND_LOADED.
5741 * win32-low.c (cached_status): New static global.
5742 (win32_wait): Add declaration.
5743 (do_initial_child_stuff): Flush all initial pending debug events
5744 up to the initial breakpoint.
5745 (win32_wait): If CACHED_STATUS was set, return that instead
5746 of doing a real wait. Remove the code resuming the execution
5747 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5748 during the initial phase. Also remove the code changing
5749 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5750 TARGET_WAITKIND_STOPPED.
5751
e7f0d979
YQ
57522013-12-11 Yao Qi <yao@codesourcery.com>
5753
5754 * notif.c (handle_notif_ack): Return 0 if no notification
5755 matches.
5756
ebcf782c
DE
57572013-11-20 Doug Evans <dje@google.com>
5758
5759 * linux-low.c (linux_set_resume_request): Fix comment.
5760
20ad9378
DE
57612013-11-20 Doug Evans <dje@google.com>
5762
5763 * linux-low.c (resume_status_pending_p): Tweak comment.
5764
a196ebeb
WT
57652013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5766
5767 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5768 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5769 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5770 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5771 (srv_amd64_regobj): Add amd64-mpx.o.
5772 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5773 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5774 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5775 * i387-fp.c (num_pl_bnd_register) Added constant.
5776 (num_pl_bnd_cfg_registers) Added constant.
5777 (struct i387_xsave) Added reserved area and MPX fields.
5778 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5779 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5780 function.
5781 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5782 (init_registers_amd64_mpx_linux): Declare new function.
5783 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5784 (x86_64_regmap): Add MPX registers.
5785 (x86_linux_read_description): Add MPX case.
5786 (initialize_low_arch): Initialize MPX targets.
5787
0080a2f6
TT
57882013-11-18 Tom Tromey <tromey@redhat.com>
5789
5790 * configure: Rebuild.
5791 * configure.ac: Don't check for stdlib.h.
5792 * gdbreplay.c: Unconditionally include stdlib.h.
5793
2978b111
TT
57942013-11-18 Tom Tromey <tromey@redhat.com>
5795
5796 * config.in: Rebuild.
5797 * configure: Rebuild.
5798 * configure.ac: Don't use AC_HEADER_DIRENT.
5799
a3d08894
TT
58002013-11-18 Tom Tromey <tromey@redhat.com>
5801
5802 * server.h: Don't check HAVE_STRING_H.
5803 * gdbreplay.c: Don't check HAVE_STRING_H.
5804 * configure: Rebuild.
5805
0a5dd17d
TT
58062013-11-18 Tom Tromey <tromey@redhat.com>
5807
5808 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5809 LIBGNU.
5810
1bd2f0ba
TT
58112013-11-08 Tom Tromey <tromey@redhat.com>
5812
5813 * configure, config.in: Rebuild.
5814 * configure.ac: Remove unused configury.
5815
3266f10b
TT
58162013-11-08 Tom Tromey <tromey@redhat.com>
5817
5818 * acinclude.m4: Include common.m4, codeset.m4.
5819 * configure, config.in: Rebuild.
5820 * configure.ac: Use GDB_AC_COMMON.
5821
6682d959
AA
58222013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5823
5824 * linux-s390-low.c (HWCAP_S390_TE): New define.
5825 (s390_arch_setup): Consider the TE field in the HWCAP for
5826 determining 'have_regset_tdb'.
5827
fd0a4d76
SDJ
58282013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5829
5830 PR gdb/16014
5831 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5832 call to sizeof.
5833
1a3d890b
PA
58342013-10-02 Pedro Alves <palves@redhat.com>
5835
5836 * server.c (process_serial_event): Don't output "GDBserver
5837 exiting" if GDB is connected through stdio.
5838 * target.c (mywait): Likewise, be silent if GDB is connected
5839 through stdio.
5840
97ad4581
JB
58412013-10-01 Joel Brobecker <brobecker@adacore.com>
5842
5843 * lynx-low.c (lynx_add_threads_after_attach): New function.
5844 (lynx_attach): Remove call to add_thread. Add call to
5845 lynx_add_threads_after_attach instead.
5846
5b4e221c
MF
58472013-09-28 Mike Frysinger <vapier@gentoo.org>
5848
5849 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5850 * config.in, configure: Regenerated.
5851
ee47b2f8
YQ
58522013-09-18 Yao Qi <yao@codesourcery.com>
5853
5854 PR server/15959
5855 * server.c (start_inferior): Clear 'resume_info'.
5856
d6707650 58572013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5858
d6707650
JW
5859 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5860 for each register.
5861
9243dd0e 58622013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5863
9243dd0e
JW
5864 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5865 linux-tile-low.o to srv_tgtobj.
5866
c623a6ef
WN
58672013-09-16 Will Newton <will.newton@linaro.org>
5868
5869 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5870 out regs.
5871
fb71d39e
PA
58722013-09-06 Pedro Alves <palves@redhat.com>
5873
5874 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5875 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5876 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5877 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5878 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5879 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5880
8e7e9910
PA
58812013-09-06 Pedro Alves <palves@redhat.com>
5882
5883 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5884 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5885
7c3a12ca
PA
58862013-09-06 Pedro Alves <palves@redhat.com>
5887
5888 * linux-amd64-ipa.c: Include tracepoint.h.
5889 * linux-i386-ipa.c: Include tracepoint.h.
5890
8eb3d7b6
RW
58912013-09-06 Ricard Wanderlof <ricardw@axis.com>
5892
5893 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5894 (ps_get_thread_area): New function.
5895
eddddb9d
RW
58962013-09-06 Ricard Wanderlof <ricardw@axis.com>
5897
5898 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5899 (initialize_low_arch): Call init_registers_crisv32 rather than
5900 init_register_crisv32.
5901
533b0600
PA
59022013-09-05 Pedro Alves <palves@redhat.com>
5903
5904 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5905 to ...
5906 * hostio.h: ... this new file.
5907 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5908 win32-low.c: Include hostio.h.
5909
0ce3d3b5
PA
59102013-09-05 Pedro Alves <palves@redhat.com>
5911
5912 * server.h (gdb_client_data, handler_func, callback_handler_func)
5913 (delete_file_handler, add_file_handler, append_callback_event)
5914 (delete_callback_event, start_event_loop, initialize_event_loop):
5915 Move to event-loop.h and include it.
5916 * event-loop.h: New file.
5917
799cdc37
PA
59182013-09-05 Pedro Alves <palves@redhat.com>
5919
5920 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5921 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5922 (loaded_dll, unloaded_dll): Move to ...
5923 * dll.h: ... this new file.
5924 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5925
6a6bbd9d
PA
59262013-09-05 Pedro Alves <palves@redhat.com>
5927
5928 * server.h (current_process, get_thread_process, all_processes)
5929 (add_inferior_to_list, for_each_inferior, current_inferior)
5930 (remove_inferior, add_process, remove_process, find_process_pid)
5931 (have_started_inferiors_p, have_attached_inferiors_p)
5932 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5933 (clear_inferiors, find_inferior, find_inferior_id)
5934 (inferior_target_data, set_inferior_target_data)
5935 (inferior_regcache_data, set_inferior_regcache_data): Move to
5936 inferiors.h, and include it.
5937 * inferiors.h: New file.
5938
f699aaba
PA
59392013-09-05 Pedro Alves <palves@redhat.com>
5940
5941 * server.h (struct emit_ops, current_insn_ptr, emit_error):
5942 Move ...
72f4393d 5943 * ax.h: ... here.
f699aaba 5944
c144c7a0
PA
59452013-09-05 Pedro Alves <palves@redhat.com>
5946
5947 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5948 tracepoint.h.
5949 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5950 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5951 (handle_tracepoint_general_set, handle_tracepoint_query)
5952 (tracepoint_finished_step, tracepoint_was_hit)
5953 (release_while_stepping_state_list, current_traceframe)
5954 (in_readonly_region, traceframe_read_mem)
5955 (fetch_traceframe_registers, traceframe_read_sdata)
5956 (traceframe_read_info, struct fast_tpoint_collect_status)
5957 (fast_tracepoint_collecting, force_unlock_trace_buffer)
5958 (handle_tracepoit_bkpts, initialize_low_tracepoint)
5959 (supply_fast_tracepoint_registers)
5960 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5961 (ipa_tdesc, claim_trampoline_space)
5962 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5963 (agent_mem_read, agent_get_trace_state_variable_value)
5964 (agent_set_trace_state_variable_value, agent_tsv_read)
5965 (agent_mem_read_string, get_raw_reg_func_addr)
5966 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5967 * tracepoint.h: ... this new file.
5968
ff42e6ab
PA
59692013-09-05 Pedro Alves <palves@redhat.com>
5970
5971 * server.h (perror_with_name, error, fatal, warning, paddress)
5972 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5973 include it.
5974 * utils.h: New file.
5975
541af0f4
PA
59762013-09-05 Pedro Alves <palves@redhat.com>
5977
5978 * server.h (remote_debug, noack_mode, transport_is_reliable)
5979 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5980 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5981 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5982 (write_enn, initialize_async_io, enable_async_io)
5983 (disable_async_io, check_remote_input_interrupt_request)
5984 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5985 (dead_thread_notify, prepare_resume_reply)
5986 (decode_address_to_semicolon, decode_address, decode_m_packet)
5987 (decode_M_packet, decode_X_packet, decode_xfer_write)
5988 (decode_search_memory_packet, unhexify, hexify)
5989 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5990 (look_up_one_symbol, relocate_instruction)
5991 (monitor_output): Move to remote-utils.h, and include it.
5992 * remote-utils.h: New file.
5993
eebdf26b
PA
59942013-09-05 Pedro Alves <palves@redhat.com>
5995
5996 * server.h (_): Delete.
5997
3aafd2ff
PA
59982013-09-02 Pedro Alves <palves@redhat.com>
5999
6000 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6001 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6002 allocated.
6003 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6004
cee83bcb
PM
60052013-09-02 Pierre Muller <muller@sourceware.org>
6006
6007 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6008 or WriteProcessMemory complete successfully and handle
6009 ERROR_PARTIAL_COPY error.
6010
9a13b2fa
PA
60112013-09-02 Pedro Alves <palves@redhat.com>
6012
6013 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6014 error instead of EIO.
6015
602e3198
JK
60162013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6017
6018 PR server/15604
6019 * linux-low.c: Include filestuff.h.
6020 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6021 * lynx-low.c: Include filestuff.h.
6022 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6023 * server.c: Include filestuff.h.
6024 (main): Call notice_open_fds.
6025 * spu-low.c: Include filestuff.h.
6026 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6027
96d7229d
LM
60282013-08-22 Luis Machado <lgustavo@codesourcery.com>
6029
6030 * Makefile.in: Explain why ../target and ../nat are not
6031 listed as include file search paths.
6032 (linux-waitpid.o): New object file rule.
6033 * configure.srv (srv_native_linux_obj): New variable.
6034 Replace all occurrences of linux native object files with
6035 $srv_native_linux_obj.
6036 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6037 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6038 (linux_enable_event_reporting): Remove declaration.
6039 (my_waitpid): Moved to common/linux-waitpid.c.
6040 (linux_wait_for_event): Pass ptid when calling
6041 linux_enable_event_reporting.
6042 (linux_supports_tracefork_flag): Remove.
6043 (linux_enable_event_reporting): Likewise.
6044 (linux_tracefork_grandchild): Remove.
6045 (STACK_SIZE): Moved to common/linux-ptrace.c.
6046 (linux_tracefork_child): Remove.
6047 (linux_test_for_tracefork): Remove.
6048 (linux_look_up_symbols): Call linux_supports_traceclone.
6049 (initialize_low): Remove call to linux_test_for_tracefork.
6050 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6051 common/linux-ptrace.h.
6052 (PTRACE_TYPE_ARG4): Likewise.
6053 Include linux-ptrace.h.
6054
32940073
PA
60552013-08-21 Pedro Alves <palves@redhat.com>
6056
6057 * config.in: Renegerate.
6058
33b60d58 60592013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6060
33b60d58
LM
6061 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6062 (SFILES): Remove $(srcdir)/common/target-common.c and
6063 add $(srcdir)/target/waitstatus.c.
6064 (OBS): Remove target-common.o and add waitstatus.o.
6065 (server_h): Remove $(srcdir)/../common/target-common.h and
6066 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6067 and $(srcdir)/../target/waitstatus.h.
6068 (target-common.o): Remove.
6069 (waitstatus.o): New target object file.
6070 * target.h: Do not include target-common.h and
6071 include target/resume.h, target/wait.h and
6072 target/waitstatus.h.
6073
b8e1b30e
LM
60742013-08-13 Luis Machado <lgustavo@codesourcery.com>
6075
6076 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6077 to PTRACE_TYPE_ARG3.
6078 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6079 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6080 PTRACE_TYPE_ARG4.
6081 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6082 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6083
7a60ad40
YQ
60842013-07-27 Jie Zhang <jie@codesourcery.com>
6085 Daniel Jacobowitz <dan@codesourcery.com>
6086 Yao Qi <yao@codesourcery.com>
6087
6088 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6089 (mips-linux-watch.o): New rule.
6090 (mips_linux_watch_h): New variable.
6091 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6092 srv_tgtobj.
6093 * linux-mips-low.c: Include mips-linux-watch.h.
6094 (struct arch_process_info, struct arch_lwp_info): New.
6095 (update_watch_registers_callback): New function.
6096 (mips_linux_new_process, mips_linux_new_thread) New functions.
6097 (mips_linux_prepare_to_resume, mips_insert_point): New
6098 functions.
6099 (mips_remove_point, mips_stopped_by_watchpoint): New
6100 functions.
6101 (rsp_bp_type_to_target_hw_bp_type): New function.
6102 (mips_stopped_data_address): New function.
6103 (the_low_target): Add watchpoint support functions.
6104
de6f69ad
YQ
61052013-07-27 Yao Qi <yao@codesourcery.com>
6106
6107 * i386-low.c: Include break-common.h.
6108 (enum target_hw_bp_type): Remove.
6109
3360c0bf
LM
61102013-07-24 Luis Machado <lgustavo@codesourcery.com>
6111
6112 * Makefile.in (SFILES): /common/target-common.c.
6113 (OBS): Add target-common.o.
6114 (server_h): Add $(srcdir)/../common/target-common.h.
6115 (target-common.o): New target.
6116 * server.c (queue_stop_reply_callback): Free
6117 status string after use.
6118 * target.c (target_waitstatus_to_string): Remove.
6119 * target.h: Include target-common.h.
6120 (resume_kind): Likewise.
6121 (target_waitkind): Likewise.
6122 (target_waitstatus): Likewise.
6123 (TARGET_WNOHANG): Likewise.
6124
bd885420
YQ
61252013-07-04 Yao Qi <yao@codesourcery.com>
6126
6127 * Makefile.in (host_alias): Use @host_noncanonical@.
6128 (target_alias): Use @target_noncanonical@.
6129 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6130 ACX_NONCANONICAL_HOST.
6131 * configure: Regenerated.
6132
6133 Revert:
6134 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6135
6136 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6137 * configure: Rebuild.
6138 * Makefile.in (version_host, version_target): Get from configure.
6139 (version.c): Use $(version_host) and $(version_target).
6140
17ef446e
PA
61412013-07-03 Pedro Alves <palves@redhat.com>
6142
6143 * Makefile.in (config.status): Depend on development.sh.
6144 * acinclude.m4: Include libmcheck.m4.
6145 * configure: Regenerate.
6146
7a9a7487
MG
61472013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6148
6149 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6150 attribute inside the parentheses.
6151 (winapi_DebugSetProcessKillOnExit): Ditto.
6152 (winapi_DebugBreakProcess): Ditto.
6153 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 6154
49b64de6
MG
61552013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6156
6157 * notif.h (notif_event): Add a dummy member to avoid compiler
6158 errors.
6159
d5749ee7
PA
61602013-07-01 Pedro Alves <palves@redhat.com>
6161
6162 * hostio.c (HOSTIO_PATH_MAX): Define.
6163 (require_filename, handle_open, handle_unlink, handle_readlink):
6164 Use it.
6165
d8d2a3ee
PA
61662013-07-01 Pedro Alves <palves@redhat.com>
6167
6168 * server.h: Include "pathmax.h".
6169 * linux-low.c: Don't include sys/param.h.
6170 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6171 MAXPATHLEN.
6172 * win32-low.c: Don't include sys/param.h.
6173 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6174
bc7dea8d
PA
61752013-07-01 Pedro Alves <palves@redhat.com>
6176
6177 * event-loop.c: Don't check HAVE_UNISTD_H before including
6178 <unistd.h>.
6179 * gdbreplay.c: Likewise.
6180 * remote-utils.c: Likewise.
6181 * server.c: Likewise.
6182 * configure.ac: Don't check for unistd.h.
6183 * configure: Regenerate.
6184
d6c2da54
TT
61852013-06-28 Tom Tromey <tromey@redhat.com>
6186
6187 * Makefile.in (version.c): Use version.in, not
6188 common/version.in.
6189
257b6bec
MG
61902013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6191
6192 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6193 * configure: Rebuild.
6194 * Makefile.in (version_host, version_target): Get from configure.
6195 (version.c): Use $(version_host) and $(version_target).
6196
86ebe149
DK
61972013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6198
6199 Fix trace-status to output user name without trailing colon.
6200 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6201
f30aa5af
DK
62022013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6203
6204 Fix trace-status to output proper start-time and stop-time.
6205 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6206 output start time and stop time in hex as gdb expects.
6207
28a93511
YQ
62082013-06-26 Pedro Alves <pedro@codesourcery.com>
6209
6210 * tracepoint.c (build_traceframe_info_xml): Output trace state
6211 variables present in the trace buffer.
6212
01208463
TT
62132013-06-24 Tom Tromey <tromey@redhat.com>
6214
6215 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6216 create-version.sh.
6217 (version.o): Remove.
6218 * gdbreplay.c: Include version.h.
6219 (version, host_name): Don't declare.
6220 * server.h: Include version.h.
6221 (version, host_name): Don't declare.
6222
760256f9
PA
62232013-06-12 Pedro Alves <palves@redhat.com>
6224
6225 * linux-x86-low.c (linux_is_elf64): Delete global.
6226 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6227 with local linux_pid_exe_is_elf_64_file use.
6228
030031ee
PA
62292013-06-11 Pedro Alves <palves@redhat.com>
6230
6231 * linux-low.c (regset_disabled, disable_regset): New functions.
6232 (regsets_fetch_inferior_registers)
6233 (regsets_store_inferior_registers): Use them.
6234 (initialize_regsets_info); Don't allocate the disabled_regsets
6235 array here.
6236 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6237 comment.
6238
5da6eb0a
PA
62392013-06-11 Pedro Alves <palves@redhat.com>
6240
6241 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6242 xmalloc.
6243
7e5aaa09
PA
62442013-06-11 Pedro Alves <palves@redhat.com>
6245
6246 * linux-x86-low.c (initialize_low_arch): Call
6247 init_registers_x32_avx_linux.
6248
d878444c
JK
62492013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6250
6251 Fix compatibility with Android Bionic.
6252 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6253 it is not empty.
6254
3aee8918
PA
62552013-06-07 Pedro Alves <palves@redhat.com>
6256
5f2b57b5 6257 PR server/14823
3aee8918
PA
6258 * Makefile.in (OBS): Add tdesc.o.
6259 (IPA_OBJS): Add tdesc-ipa.o.
6260 (tdesc-ipa.o): New rule.
6261 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6262 interface.
6263 * linux-low.c (new_inferior): Delete.
6264 (disabled_regsets, num_regsets): Delete.
6265 (linux_add_process): Adjust to set the new per-process
6266 new_inferior flag.
6267 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6268 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6269 was a stop. When calling arch_setup, switch the current inferior
6270 to the thread that got an event.
6271 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6272 (regsets_fetch_inferior_registers)
6273 (regsets_store_inferior_registers): New regsets_info parameter.
6274 Adjust to use it.
6275 (linux_register_in_regsets): New regs_info parameter. Adjust to
6276 use it.
6277 (register_addr, fetch_register, store_register): New usrregs_info
6278 parameter. Adjust to use it.
6279 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6280 parameter regs_info. Adjust to use it.
6281 (linux_fetch_registers): Get the current inferior's regs_info, and
6282 adjust to use it.
6283 (linux_store_registers): Ditto.
6284 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6285 (initialize_low): Don't initialize the target_regsets here. Call
6286 initialize_low_arch.
6287 * linux-low.h (target_regsets): Delete declaration.
6288 (struct regsets_info): New.
6289 (struct usrregs_info): New.
6290 (struct regs_info): New.
6291 (struct process_info_private) <new_inferior>: New field.
6292 (struct linux_target_ops): Delete the num_regs, regmap, and
6293 regset_bitmap fields. New field regs_info.
6294 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6295 * i387-fp.c (num_xmm_registers): Delete.
6296 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6297 calls to new interface.
6298 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6299 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6300 Infer the number of xmm registers from the regcache's target
6301 description.
6302 * i387-fp.h (num_xmm_registers): Delete.
6303 * inferiors.c (add_thread): Don't install the thread's regcache
6304 here.
6305 * proc-service.c (gregset_info): Fetch the current inferior's
6306 regs_info. Adjust to use it.
6307 * regcache.c: Include tdesc.h.
6308 (register_bytes, reg_defs, num_registers)
6309 (gdbserver_expedite_regs): Delete.
6310 (get_thread_regcache): If the thread doesn't have a regcache yet,
6311 create one, instead of aborting gdbserver.
6312 (regcache_invalidate_one): Rename to ...
6313 (regcache_invalidate_thread): ... this.
6314 (regcache_invalidate_one): New.
6315 (regcache_invalidate): Only invalidate registers of the current
6316 process.
6317 (init_register_cache): Add target_desc parameter, and use it.
6318 (new_register_cache): Ditto. Assert the target description has a
6319 non zero registers_size.
6320 (regcache_cpy): Add assertions. Adjust.
6321 (realloc_register_cache, set_register_cache): Delete.
6322 (registers_to_string, registers_from_string): Adjust.
6323 (find_register_by_name, find_regno, find_register_by_number)
6324 (register_cache_size): Add target_desc parameter, and use it.
6325 (free_register_cache_thread, free_register_cache_thread_one)
6326 (regcache_release, register_cache_size): New.
6327 (register_size): Add target_desc parameter, and use it.
6328 (register_data, supply_register, supply_register_zeroed)
6329 (supply_regblock, supply_register_by_name, collect_register)
6330 (collect_register_as_string, collect_register_by_name): Adjust.
6331 * regcache.h (struct target_desc): Forward declare.
6332 (struct regcache) <tdesc>: New field.
6333 (init_register_cache, new_register_cache): Add target_desc
6334 parameter.
6335 (regcache_invalidate_thread): Declare.
6336 (regcache_invalidate_one): Delete declaration.
6337 (regcache_release): Declare.
6338 (find_register_by_number, register_cache_size, register_size)
6339 (find_regno): Add target_desc parameter.
6340 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6341 declarations.
6342 * remote-utils.c: Include tdesc.h.
6343 (outreg, prepare_resume_reply): Adjust.
6344 * server.c: Include tdesc.h.
6345 (gdbserver_xmltarget): Delete declaration.
6346 (get_features_xml, process_serial_event): Adjust.
6347 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6348 declare.
6349 (struct process_info) <tdesc>: New field.
6350 (ipa_tdesc): Declare.
6351 * tdesc.c: New file.
6352 * tdesc.h: New file.
6353 * tracepoint.c: Include tdesc.h.
6354 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6355 (get_context_regcache): Adjust to pass ipa_tdesc down.
6356 (do_action_at_tracepoint): Adjust to get the register cache size
6357 from the context regcache's description.
6358 (traceframe_walk_blocks): Adjust to get the register cache size
6359 from the current trace frame's description.
6360 (traceframe_get_pc): Adjust to get current trace frame's
6361 description and pass it down.
6362 (gdb_collect): Adjust to get the register cache size from the
6363 IPA's description.
6364 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6365 (gdbserver_xmltarget): Delete.
6366 (initialize_low_tracepoint): Set the ipa's target description.
6367 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6368 (initialize_low_tracepoint): Set the ipa's target description.
6369 * linux-x86-low.c: Include tdesc.h.
6370 [__x86_64__] (is_64bit_tdesc): New.
6371 (ps_get_thread_area, x86_get_thread_area): Use it.
6372 (i386_cannot_store_register): Rename to ...
6373 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6374 (i386_cannot_fetch_register): Rename to ...
6375 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6376 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6377 to new interface.
6378 (target_regsets): Rename to ...
6379 (x86_regsets): ... this.
6380 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6381 interface.
6382 (x86_siginfo_fixup): Use is_64bit_tdesc.
6383 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6384 (tdesc_x32_avx_linux, tdesc_x32_linux)
6385 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6386 Declare.
6387 (x86_linux_update_xmltarget): Delete.
6388 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6389 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6390 (AMD64_LINUX_USER64_CS): New.
6391 (x86_linux_read_description): New, based on
6392 x86_linux_update_xmltarget.
6393 (same_process_callback): New.
6394 (x86_arch_setup_process_callback): New.
6395 (x86_linux_update_xmltarget): New.
6396 (x86_regsets_info): New.
6397 (amd64_linux_regs_info): New.
6398 (i386_linux_usrregs_info): New.
6399 (i386_linux_regs_info): New.
6400 (x86_linux_regs_info): New.
6401 (x86_arch_setup): Reimplement.
6402 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6403 (x86_emit_ops): Ditto.
6404 (the_low_target): Adjust. Install x86_linux_regs_info,
6405 x86_cannot_fetch_register, and x86_cannot_store_register.
6406 (initialize_low_arch): New.
6407 * linux-ia64-low.c (tdesc_ia64): Declare.
6408 (ia64_fetch_register): Adjust.
6409 (ia64_usrregs_info, regs_info): New globals.
6410 (ia64_regs_info): New function.
6411 (the_low_target): Adjust.
6412 (initialize_low_arch): New function.
6413 * linux-sparc-low.c (tdesc_sparc64): Declare.
6414 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6415 Adjust.
6416 (sparc_arch_setup): New function.
6417 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6418 (the_low_target): Adjust.
6419 (initialize_low_arch): New function.
6420 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6421 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6422 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6423 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6424 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6425 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6426 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6427 (tdesc_powerpc_isa205_vsx64l): Declare.
6428 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6429 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6430 (ppc_set_pc, ppc_get_hwcap): Adjust.
6431 (ppc_usrregs_info): Forward declare.
6432 (!__powerpc64__) ppc_regmap_adjusted: New global.
6433 (ppc_arch_setup): Adjust to the current process'es target
6434 description.
6435 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6436 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6437 (ppc_store_evrregset): Adjust.
6438 (target_regsets): Rename to ...
6439 (ppc_regsets): ... this, and make static.
6440 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6441 (ppc_regs_info): New function.
6442 (the_low_target): Adjust.
6443 (initialize_low_arch): New function.
6444 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6445 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6446 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6447 (tdesc_s390x_linux64v2): Declare.
6448 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6449 (s390_fill_gregset, s390_store_last_break): Adjust.
6450 (target_regsets): Rename to ...
6451 (s390_regsets): ... this, and make static.
6452 (s390_get_pc, s390_set_pc): Adjust.
6453 (s390_get_hwcap): New target_desc parameter, and use it.
6454 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6455 (s390_arch_setup): Adjust to set the current process'es target
6456 description. Don't adjust the regmap.
6457 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6458 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6459 (regs_info_3264): New globals.
6460 (s390_regs_info): New function.
6461 (the_low_target): Adjust.
6462 (initialize_low_arch): New function.
6463 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6464 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6465 [__mips64] (init_registers_mips_linux)
6466 (init_registers_mips_dsp_linux): Delete defines.
6467 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6468 (have_dsp): New global.
6469 (mips_read_description): New, based on mips_arch_setup.
6470 (mips_arch_setup): Reimplement.
6471 (get_usrregs_info): New function.
6472 (mips_cannot_fetch_register, mips_cannot_store_register)
6473 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6474 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6475 (target_regsets): Rename to ...
6476 (mips_regsets): ... this, and make static.
6477 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6478 (dsp_regs_info, regs_info): New globals.
6479 (mips_regs_info): New function.
6480 (the_low_target): Adjust.
6481 (initialize_low_arch): New function.
6482 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6483 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6484 Declare.
6485 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6486 (arm_read_description): New, with bits factored from
6487 arm_arch_setup.
6488 (arm_arch_setup): Reimplement.
6489 (target_regsets): Rename to ...
6490 (arm_regsets): ... this, and make static.
6491 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6492 (arm_regs_info): New function.
6493 (the_low_target): Adjust.
6494 (initialize_low_arch): New function.
6495 * linux-m68k-low.c (tdesc_m68k): Declare.
6496 (target_regsets): Rename to ...
6497 (m68k_regsets): ... this, and make static.
6498 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6499 (m68k_regs_info): New function.
6500 (m68k_arch_setup): New function.
6501 (the_low_target): Adjust.
6502 (initialize_low_arch): New function.
6503 * linux-sh-low.c (tdesc_sharch): Declare.
6504 (target_regsets): Rename to ...
6505 (sh_regsets): ... this, and make static.
6506 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6507 (sh_regs_info, sh_arch_setup): New functions.
6508 (the_low_target): Adjust.
6509 (initialize_low_arch): New function.
6510 * linux-bfin-low.c (tdesc_bfin): Declare.
6511 (bfin_arch_setup): New function.
6512 (bfin_usrregs_info, regs_info): New globals.
6513 (bfin_regs_info): New function.
6514 (the_low_target): Adjust.
6515 (initialize_low_arch): New function.
6516 * linux-cris-low.c (tdesc_cris): Declare.
6517 (cris_arch_setup): New function.
6518 (cris_usrregs_info, regs_info): New globals.
6519 (cris_regs_info): New function.
6520 (the_low_target): Adjust.
6521 (initialize_low_arch): New function.
6522 * linux-cris-low.c (tdesc_crisv32): Declare.
6523 (cris_arch_setup): New function.
6524 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6525 (cris_regs_info): New function.
6526 (the_low_target): Adjust.
6527 (initialize_low_arch): New function.
6528 * linux-m32r-low.c (tdesc_m32r): Declare.
6529 (m32r_arch_setup): New function.
6530 (m32r_usrregs_info, regs_info): New globals.
6531 (m32r_regs_info): Adjust.
6532 (initialize_low_arch): New function.
6533 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6534 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6535 (tic6x_usrregs_info): Forward declare.
6536 (tic6x_read_description): New function, based on ...
6537 (tic6x_arch_setup): ... this. Reimplement.
6538 (target_regsets): Rename to ...
6539 (tic6x_regsets): ... this, and make static.
6540 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6541 (tic6x_regs_info): New function.
6542 (the_low_target): Adjust.
6543 (initialize_low_arch): New function.
6544 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6545 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6546 (target_regsets): Rename to ...
6547 (xtensa_regsets): ... this, and make static.
6548 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6549 globals.
6550 (xtensa_arch_setup, xtensa_regs_info): New functions.
6551 (the_low_target): Adjust.
6552 (initialize_low_arch): New function.
6553 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6554 (nios2_arch_setup): Set the current process'es tdesc.
6555 (target_regsets): Rename to ...
6556 (nios2_regsets): ... this.
6557 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6558 (nios2_regs_info): New function.
6559 (the_low_target): Adjust.
6560 (initialize_low_arch): New function.
a261b8f5
PA
6561 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6562 (aarch64_arch_setup): Set the current process'es tdesc.
6563 (target_regsets): Rename to ...
6564 (aarch64_regsets): ... this.
6565 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6566 (aarch64_regs_info): New function.
6567 (the_low_target): Adjust.
6568 (initialize_low_arch): New function.
3aee8918
PA
6569 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6570 globals.
6571 (target_regsets): Rename to ...
6572 (tile_regsets): ... this.
6573 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6574 (tile_regs_info): New function.
6575 (tile_arch_setup): Set the current process'es tdesc.
6576 (the_low_target): Adjust.
6577 (initialize_low_arch): New function.
6578 * spu-low.c (tdesc_spu): Declare.
6579 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6580 * win32-arm-low.c (tdesc_arm): Declare.
6581 (arm_arch_setup): New function.
6582 (the_low_target): Install arm_arch_setup instead of
6583 init_registers_arm.
6584 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6585 (init_windows_x86): Rename to ...
6586 (i386_arch_setup): ... this. Set `win32_tdesc'.
6587 (the_low_target): Adjust.
6588 * win32-low.c (win32_tdesc): New global.
6589 (child_add_thread): Don't create the thread cache here.
6590 (do_initial_child_stuff): Set the new process'es tdesc.
6591 * win32-low.h (struct target_desc): Forward declare.
6592 (win32_tdesc): Declare.
6593 * lynx-i386-low.c (tdesc_i386): Declare global.
6594 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6595 * lynx-low.c (lynx_tdesc): New global.
6596 (lynx_add_process): Set the new process'es tdesc.
6597 * lynx-low.h (struct target_desc): Forward declare.
6598 (lynx_tdesc): Declare global.
6599 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6600 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6601 * nto-low.c (nto_tdesc): New global.
6602 (do_attach): Set the new process'es tdesc.
6603 * nto-low.h (struct target_desc): Forward declare.
6604 (nto_tdesc): Declare.
6605 * nto-x86-low.c (tdesc_i386): Declare.
6606 (nto_x86_arch_setup): Set `nto_tdesc'.
6607
b1fbec62
GB
66082013-06-04 Gary Benson <gbenson@redhat.com>
6609
6610 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6611 to qSupported response when appropriate.
6612 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6613 with nonzero-length annex.
6614 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6615 arguments supplied in annex.
6616
d1ec4ce7
DE
66172013-05-31 Doug Evans <dje@google.com>
6618
ac44adcb 6619 PR server/15594
d1ec4ce7
DE
6620 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6621 64 bits in 64-cross-32 environment.
6622
9b25f2d3
PA
66232013-05-28 Pedro Alves <palves@redhat.com>
6624
6625 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6626 (aarch64-without-fpu.c): Delete rule.
6627 * configure.srv (aarch64*-*-linux*): Remove references to
6628 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6629 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6630 declaration.
6631
6740dc9c
PA
66322013-05-24 Pedro Alves <palves@redhat.com>
6633
6634 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6635 instead of strchr/decode_address. Error if the range isn't split
6636 with a ','. Don't assume there's be a ':' in the action.
6637
c2d6af84
PA
66382013-05-23 Yao Qi <yao@codesourcery.com>
6639 Pedro Alves <palves@redhat.com>
6640
6641 * linux-low.c (lwp_in_step_range): New function.
6642 (linux_wait_1): If the thread was range stepping and stopped
6643 outside the stepping range, report the stop to GDB. Otherwise,
6644 continue stepping. Add range stepping debug output.
6645 (linux_set_resume_request): Copy the step range from the resume
6646 request to the lwp.
6647 (linux_supports_range_stepping): New.
6648 (linux_target_ops) <supports_range_stepping>: Set to
6649 linux_supports_range_stepping.
6650 * linux-low.h (struct linux_target_ops)
6651 <supports_range_stepping>: New field.
6652 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6653 * linux-x86-low.c (x86_supports_range_stepping): New.
6654 (the_low_target) <supports_range_stepping>: Set to
6655 x86_supports_range_stepping.
6656 * server.c (handle_v_cont): Handle 'r' action.
6657 (handle_v_requests): Append ";r" if the target supports range
6658 stepping.
6659 * target.h (struct thread_resume) <step_range_start,
6660 step_range_end>: New fields.
6661 (struct target_ops) <supports_range_stepping>:
6662 New field.
6663 (target_supports_range_stepping): New macro.
6664
58794e1a
JB
66652013-05-17 Joel Brobecker <brobecker@adacore.com>
6666
6667 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6668 confusion in comment.
6669
d631c5a7
JB
66702013-05-17 Joel Brobecker <brobecker@adacore.com>
6671
6672 * lynx-low.c (struct process_info_private): New type.
6673 (lynx_add_process): New function.
6674 (lynx_create_inferior, lynx_attach): Replace calls to
6675 add_process by calls to lynx_add_process.
6676 (lynx_resume): If PTID is null, then try using
6677 current_process()->private->last_wait_event_ptid.
6678 Add comments.
6679 (lynx_clear_inferiors): Delete. The contents of that function
6680 has been inlined in lynx_mourn;
6681 (lynx_wait_1): Save the ptid in the process's private data.
6682 (lynx_mourn): Free the process' private data. Replace call
6683 to lynx_clear_inferiors by call to clear_inferiors.
6684
96f7a20f
YQ
66852013-05-17 Yao Qi <yao@codesourcery.com>
6686
6687 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6688 the right place.
6689
db0dfaa0
LM
66902013-05-16 Luis Machado <lgustavo@codesourcery.com>
6691
6692 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6693 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6694 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6695 PT_TEXT_END_ADDR guards. Update comments.
6696 (linux_target_op) <read_offsets>: Conditionally define to
6697 linux_read_offsets if the target is UCLIBC and if it defines
6698 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6699
68f5f838
SL
67002013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6701 Andrew Jenner <andrew@codesourcery.com>
6702
6703 * Makefile.in (SFILES): Add linux-nios2-low.c.
6704 (clean): Add action to delete nios2-linux.c.
6705 (nios2-linux.c): New rule.
6706 * configure.srv: Add nios2*-*-linux*.
6707 * linux-nios2-low.c: New.
6708
1ebff1fd
HAQ
67092013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6710
6711 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6712
f6150862
HZ
67132013-04-25 Hui Zhu <hui@codesourcery.com>
6714
6715 PR gdb/15186
f6150862
HZ
6716 * ax.c (ax_printf): Add fflush.
6717
614c279d
TT
67182013-04-22 Tom Tromey <tromey@redhat.com>
6719
6720 * Makefile.in (SFILES): Add filestuff.c.
6721 (OBS): Add filestuff.o.
6722 (filestuff.o): New target.
6723 * config.in, configure: Rebuild.
6724 * configure.ac: Check for fdwalk, pipe2.
6725
7d4e5717
PA
67262013-04-17 Pedro Alves <palves@redhat.com>
6727
6728 * configure.ac (USE_THREAD_DB): Delete variable.
6729 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6730 Don't AC_SUBST USE_THREAD_DB.
6731 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6732 * config.in, configure: Regenerate.
6733
d5c93e41
PA
67342013-04-16 Pedro Alves <palves@redhat.com>
6735
6736 * linux-low.h (struct lwp_info) <thread_known>: Move under
6737 the USE_THREAD_DB #ifdef.
6738
04f5fe89
PA
67392013-04-16 Pedro Alves <palves@redhat.com>
6740
6741 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6742 (linux-low.o): Delete rule.
6743 * linux-low.h: Always include "gdb_thread_db.h" instead of
6744 conditionally including thread_db.h.
6745 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6746 HAVE_THREAD_DB_H.
6747
480b27bf
JK
67482013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6749
6750 * Makefile.in (install-only): Fix make install regression.
6751
43662968
JK
67522013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6753
6754 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6755 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6756 installation.
6757 * gdbserver.1: Remove.
6758
3e74e146
PA
67592013-03-22 Pedro Alves <palves@redhat.com>
6760
6761 * linux-low.c (handle_extended_wait): Don't call
6762 linux_enable_event_reporting.
6763
a8347a2a
TT
67642013-03-15 Tony Theodore <tonyt@logyst.com>
6765
6766 PR build/9098:
6767 * Makefile.in (SHELL): Use @SHELL@.
6768
eeb56fa7
SDJ
67692013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6770
6771 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6772 compiler warning.
6773
4fa7e2ff
JB
67742013-03-13 Joel Brobecker <brobecker@adacore.com>
6775
6776 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6777 Remove extraneous NULL element.
6778
8ddb1965
YQ
67792013-03-13 Yao Qi <yao@codesourcery.com>
6780
6781 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6782 'V' block in trace frame.
6783
9accd112
MM
67842013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6785
6786 * target.h (struct target_ops): Add btrace ops.
6787 (target_supports_btrace): New macro.
6788 (target_enable_btrace): New macro.
6789 (target_disable_btrace): New macro.
6790 (target_read_btrace): New macro.
6791 * gdbthread.h (struct thread_info): Add btrace field.
6792 * server.c: Include btrace-common.h.
6793 (handle_btrace_general_set): New function.
6794 (handle_btrace_enable): New function.
6795 (handle_btrace_disable): New function.
6796 (handle_general_set): Call handle_btrace_general_set.
6797 (handle_qxfer_btrace): New function.
6798 (struct qxfer qxfer_packets[]): Add btrace entry.
6799 * inferiors.c (remove_thread): Disable btrace.
6800 * linux-low: Include linux-btrace.h.
6801 (linux_low_enable_btrace): New function.
6802 (linux_low_read_btrace): New function.
6803 (linux_target_ops): Add btrace ops.
6804 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6805 Add srv_linux_btrace=yes.
6806 (x86_64-*-linux*): Add linux-btrace.o.
6807 Add srv_linux_btrace=yes.
6808 * configure.ac: Define HAVE_LINUX_BTRACE.
6809 * config.in: Regenerated.
6810 * configure: Regenerated.
6811
5cc22e4c
MM
68122013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6813
6814 * server.c (handle_qxfer): Preserve error message if -3 is
6815 returned.
6816 (qxfer): Document the -3 return value.
6817
7c97f91e
MM
68182013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6819
6820 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6821 (linux_btrace_h): New variable.
6822 (linux-btrace.o): New rule.
6823
be9a119c 68242013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
6825 Hafiz Abid Qadeer <abidh@codesourcery.com>
6826
6827 * tracepoint.c (trace_buffer_size): New global.
6828 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6829 (init_trace_buffer): Change to one-argument function. Allocate
6830 trace buffer memory.
6831 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6832 handle QTBuffer:size packet.
6833 (cmd_bigqtbuffer_size): New function.
6834 (initialize_tracepoint): Call init_trace_buffer with
6835 DEFAULT_TRACE_BUFFER_SIZE.
6836 * server.c (handle_query): Add QTBuffer:size in the
6837 supported packets.
6838
e64f7499
YQ
68392013-03-07 Yao Qi <yao@codesourcery.com>
6840
6841 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6842 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6843 of -1.
6844 (cmd_qtsp): Adjust condition. Do post increment.
6845 Set cur_action and cur_step_action back to 0.
6846
f0ae6fc3
PA
68472013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6848
6849 PR server/15236
6850 * linux-low.c (linux_write_memory): Return early success if LEN is
6851 zero.
6852
b5b0b0af
CV
68532013-03-05 Corinna Vinschen <vinschen@redhat.de>
6854
334ad4a8 6855 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 6856
589bc927
TT
68572013-02-28 Tom Tromey <tromey@redhat.com>
6858
6859 * configure.ac: Invoke AC_SYS_LARGEFILE.
6860 * configure, config.in: Rebuild.
6861
dfe07582
CV
68622013-02-28 Corinna Vinschen <vinschen@redhat.com>
6863
6864 * win32-low.c: Throughout, fix format strings and casts of
6865 printf-like functions to avoid type related warnings on all
6866 platforms.
6867 (get_child_debug_event): Print dwDebugEventCode as hex since
6868 that's how it's usually documented.
6869
736cd585
YQ
68702013-02-28 Yao Qi <yao@codesourcery.com>
6871
6872 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6873 pulongest.
6874
e1f58301
JW
68752013-02-27 Jiong Wang <jiwang@tilera.com>
6876
6877 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6878 (reg-tilegx32.c): New rule.
6879 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6880 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6881 different register info initializer according to elf class.
6882 (init_registers_tilgx32): New function. The tilegx32 register info
6883 initializer.
6884 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6885 (tile_store_gregset): Likewise.
6886
d171ca78
YQ
68872013-02-27 Yao Qi <yao@codesourcery.com>
6888
6889 * server.c (process_point_options): Print debug message when
6890 debug_threads is true.
6891
282bbdf3
YQ
68922013-02-26 Yao Qi <yao@codesourcery.com>
6893
6894 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6895
aca22551
PA
68962013-02-19 Pedro Alves <palves@redhat.com>
6897 Kai Tietz <ktietz@redhat.com>
6898
6899 PR gdb/15161
6900
6901 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6902 instead of strtoul to extract address from packet.
6903 (process_serial_event) <'z'>: Likewise.
6904
4f3cee1c
YQ
69052013-02-18 Yao Qi <yao@codesourcery.com>
6906
6907 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6908
8e1d55a3
PA
69092013-02-14 Pedro Alves <palves@redhat.com>
6910
6911 Plug memory leak.
6912
6913 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6914 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6915
458820da
PA
69162013-02-14 Pedro Alves <palves@redhat.com>
6917
6918 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6919
baea0dae
PA
69202013-02-14 Pedro Alves <palves@redhat.com>
6921
6922 * tracepoint.c (save_string): Delete.
6923 (add_tracepoint_action): Use savestring instead of save_string.
6924
0b1afbb3
PA
69252013-02-12 Pedro Alves <palves@redhat.com>
6926
6927 * linux-xtensa-low.c: Ditto.
6928 * xtensa-xtregs.c: Ditto.
6929
8a4ac37e
PA
69302013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6931
6932 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6933 thread_db.
6934
148de6bb
MS
69352013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6936
6937 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6938 aarch64_num_wp_regs and aarch64_num_bp_regs to
6939 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6940
55fac6e0
MS
69412013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6942
6943 * linux-aarch64-low.c (ps_get_thread_area): Replace
6944 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6945
176eb98c
MS
69462013-02-04 Jim MacArthur <jim.macarthur@arm.com>
6947 Marcus Shawcroft <marcus.shawcroft@arm.com>
6948 Nigel Stephens <nigel.stephens@arm.com>
6949 Yufeng Zhang <yufeng.zhang@arm.com>
6950
6951 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6952 (aarch64.c, aarch64-without-fpu.c): New targets.
6953 * configure.srv (aarch64*-*-linux*): New.
6954 * linux-aarch64-low.c: New file.
6955
56f7af9c
MS
69562013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
6957
43aaf8b6 6958 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
6959 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6960 (dequeue_one_deferred_signal, linux_resume_one_thread)
6961 (fetch_register, linux_write_memory, linux_enable_event_reporting)
6962 (linux_tracefork_grandchild, linux_test_for_tracefork)
6963 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6964 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6965 where the argument is 0.
6966
60f662b0
YQ
69672013-01-25 Yao Qi <yao@codesourcery.com>
6968
6969 * event-loop.c: Include "queue.h".
6970 (gdb_event_p): New typedef.
6971 (struct gdb_event) <next_event>: Remove.
6972 (event_queue): Change to QUEUE(gdb_event_p).
6973 (async_queue_event): Remove.
6974 (gdb_event_xfree): New.
6975 (initialize_event_loop): New.
6976 (process_event): Use API from QUEUE.
6977 (wait_for_event): Likewise.
6978 * server.c (main): Call initialize_event_loop.
6979 * server.h (initialize_event_loop): Declare.
6980
5ae4861a
YQ
69812013-01-18 Yao Qi <yao@codesourcery.com>
6982
6983 * ax.h (struct eval_agent_expr_context): New.
6984 (gdb_eval_agent_expr): Update declaration.
6985 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6986 TFRAME. Add new argument CTX.
6987 * server.h (struct eval_agent_expr_context): Declare.
6988 (agent_mem_read, agent_tsv_read): Update declaration.
6989 (agent_mem_read_string): Likewise.
6990 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6991 (add_traceframe_block): Add new argument TPOINT.
6992 Increase TPOINT->traceframe_usage.
6993 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
6994 eval_tracepoint_agent_expr.
6995 (condition_true_at_tracepoint): Likewise.
6996 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
6997 (agent_mem_read_string, agent_tsv_read): Likewise.
6998
85e00e85
YQ
69992013-01-16 Yao Qi <yao@codesourcery.com>
7000
7001 * linux-low.c (linux_resume_one_lwp): Don't check
7002 'lwp->bp_reinsert != 0'.
7003
4039cf45
JB
70042013-01-07 Joel Brobecker <brobecker@adacore.com>
7005 Pedro Alves <palves@redhat.com>
7006
7007 * lynx-low.c (ptrace_request_to_str): Define a temporary
7008 macro and use it to simplify this function's implementation.
7009
9044dee2
JB
70102013-01-07 Joel Brobecker <brobecker@adacore.com>
7011
7012 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7013 sets errno.
7014
e6352c8f
JB
70152013-01-07 Joel Brobecker <brobecker@adacore.com>
7016
7017 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7018
50681a27
JB
70192013-01-07 Joel Brobecker <brobecker@adacore.com>
7020
7021 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7022
3f6e77ef
JB
70232013-01-07 Joel Brobecker <brobecker@adacore.com>
7024
7025 * lynx-low.c (lynx_resume): Use the resume_info parameter
7026 to determine the ptid for the lynx_ptrace call, unless
7027 it is equal to minus_one_ptid, in which case we use the
7028 ptid of the current_inferior.
7029 (lynx_wait_1): After having received a thread create/exit
7030 event, resume the inferior's execution using the signaling
7031 thread's ptid, rather than the old ptid.
7032
7fda33ae
JB
70332013-01-07 Joel Brobecker <brobecker@adacore.com>
7034
7035 * lynx-low.c (lynx_resume): Delete variable ret.
7036
b9786c74
JB
70372013-01-01 Joel Brobecker <brobecker@adacore.com>
7038
7039 * gdbreplay.c (gdbreplay_version): Update copyright year.
7040 * server.c (gdbserver_version): Likewise.
7041
8b93d60f
JB
70422012-12-17 Joel Brobecker <brobecker@adacore.com>
7043
7044 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7045 new thread.
7046
037335a7
JB
70472012-12-17 Joel Brobecker <brobecker@adacore.com>
7048
7049 * lynx-low.c (ptrace_request_to_str): Add handling for
7050 PTRACE_GETTRACESIG.
7051
52d4cbd8
JB
70522012-12-17 Joel Brobecker <brobecker@adacore.com>
7053
7054 * lynx-low.c (lynx_attach): Delete variable new_process.
7055
ab8f6ca9
JB
70562012-12-17 Joel Brobecker <brobecker@adacore.com>
7057
7058 * lynx-low.c (lynx_create_inferior): Delete variable
7059 new_process.
7060
78cbc024
JB
70612012-12-17 Joel Brobecker <brobecker@adacore.com>
7062
7063 * lynx-low.c (ptrace_request_to_str): Do not handle
7064 PTRACE_GETTHREADLIST if this macro does not exist.
7065
14a00470
YQ
70662012-12-15 Yao Qi <yao@codesourcery.com>
7067
7068 * Makefile.in (OBS): Add notif.o.
7069 * notif.c, notif.h: New.
7070 * server.c: Include "notif.h".
7071 (struct vstop_notif) <next>: Remove.
7072 <base>: New field.
7073 (queue_stop_reply): Update.
7074 (push_event, send_next_stop_reply): Remove.
7075 (discard_queued_stop_replies): Update.
7076 (notif_stop): New variable.
7077 (handle_v_stopped): Remove.
7078 (handle_v_requests): Don't call handle_v_stopped. Call
7079 handle_ack_notif instead.
7080 (queue_stop_reply_callback): Call notif_event_enque instead
7081 of queue_stop_reply.
7082 (handle_status): Don't call send_next_stop_reply, call
7083 notif_write_event instead.
7084 (kill_inferior_callback): Likewise.
7085 (detach_or_kill_inferior_callback): Likewise.
7086 (main): Call initialize_notif.
7087 (process_serial_event): Call QUEUE_is_empty.
7088 (handle_target_event): Call notif_push instead of push event.
7089 * server.h (push_event): Remove declaration.
7090
61c125b9
TT
70912012-12-10 Tom Tromey <tromey@redhat.com>
7092
7093 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7094 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7095 macros.
7096 (.c.o): Rewrite.
7097 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7098 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7099 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7100 (amd64-linux-ipa.o, ax.o): Rewrite.
7101 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7102 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7103 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7104 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7105 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7106 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7107 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7108 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7109 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7110 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7111 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7112 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7113 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7114 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7115 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7116 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7117 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7118 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7119 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7120 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7121 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7122 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7123 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7124 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7125 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7126 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7127 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7128 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7129 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7130 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7131 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7132 (reg-tilegx.o): Remove.
7133 (all_object_files): New macro.
7134 Include .deps files.
7135 * aclocal.m4, configure: Rebuild.
7136 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7137 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7138 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7139
e90e9ad9
TT
71402012-12-05 Tom Tromey <tromey@redhat.com>
7141
7142 PR gdb/14917:
7143 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7144
02d403bf 71452012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
7146
7147 * configure.ac: Check for linux/perf_event.h.
7148 * config.in: Regenerated.
7149 * configure: Regenerated.
7150
0270a750
PA
71512012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7152
7153 * hostio.c (handle_readlink): Decrease buffer size
7154 parameter passed to readlink by one byte.
7155
8c29b58e
YQ
71562012-11-26 Yao Qi <yao@codesourcery.com>
7157
7158 * configure.ac (build_warnings): Append '-Wempty-body'.
7159 * configure: Regenerated.
7160 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7161 body.
7162
8bdce1ff
PM
71632012-11-15 Pierre Muller <muller@sourceware.org>
7164
7165 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7166 * config.in: Regenerate.
7167 * configure: Regenerate.
7168 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7169 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7170 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7171 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7172 header.
7173 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7174 instead of <sys/wait.h> header.
7175 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7176
02d403bf 71772012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
7178
7179 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7180 (various make rules): Remove -DGDBSERVER
7181
fbd5db48
YQ
71822012-11-09 Yao Qi <yao@codesourcery.com>
7183
7184 * spu-low.c (current_ptid): Move it to ..
7185 * gdbthread.h: ... here. New.
7186 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7187 * server.c (myresume, process_serial_event): Likewise.
7188 * thread-db.c (thread_db_find_new_threads): Likewise.
7189 * tracepoint.c (run_inferior_command): Likewise.
7190
b3dc46ff
AB
71912012-10-01 Andrew Burgess <aburgess@broadcom.com>
7192
7193 * server.c (handle_search_memory_1): Include access length in
7194 warning message.
7195
07c04788
HPN
71962012-09-05 Michael Brandt <michael.brandt@axis.com>
7197
7198 * linux-crisv32-low.c: Fix compile errors.
7199
918d227b
YQ
72002012-09-04 Yao Qi <yao@codesourcery.com>
7201
7202 * tracepoint.c (cmd_qtsv): Adjust debug message.
7203 Don't check CUR_TPOINT.
7204
18c1b81a
YQ
72052012-08-28 Yao Qi <yao@codesourcery.com>
7206
7207 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7208 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7209 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7210 Remove declarations of xmalloc, xreallloc, xstrdup and
7211 freeargv.
7212 * Makefile.in (libiberty_h): New.
7213 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7214 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7215
dc82f37b
YQ
72162012-08-23 Yao Qi <yao@codesourcery.com>
7217
7218 * server.h: Remove declaration of 'xsnprintf'.
7219
406b1477
KS
72202012-08-22 Keith Seitz <keiths@redhat.com>
7221
7222 * server.h: Include build-gnulib-gbserver/config.h.
7223 * gdbreplay.c: Likewise.
7224
e6712ff1
DE
72252012-08-08 Doug Evans <dje@google.com>
7226
7227 * Makefile.in (SFILES): Add gdb_vecs.c.
7228 (OBS): Add gdb_vecs.o.
7229 (gdb_vecs_h, host_defs_h): New variables.
7230 (thread-db.o): Add $(gdb_vecs_h) dependency.
7231 (gdb_vecs.o): New rule.
7232 * thread-db.c: #include "gdb_vecs.h".
7233 (thread_db_load_search): Use a vector to iterate over path elements.
7234 Handle text appearing after "$pdir".
7235
7236 * configure.ac: Add check for strstr.
7237 * config.in: Regenerate.
7238 * configure: Regenerate.
7239
7c3270ae
UW
72402012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7241
7242 * hostio.c (handle_pread): If pread fails, fall back to attempting
7243 lseek/read.
7244 (handle_pwrite): Likewise for pwrite.
7245
b62e2b27
UW
72462012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7247
7248 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7249 between unsupported TYPE and unimplementable ADDR/LEN combination.
7250 (arm_insert_point): Act on new return value.
7251
78a99e91
PA
72522012-07-31 Pedro Alves <palves@redhat.com>
7253
7254 * server.c (process_point_options): Only skip tokens if we find
7255 one that is unrecognized. Don't treat 'X' specially while
7256 skipping unrecognized tokens.
7257
fcf303ab
UW
72582012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7259
7260 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7261 to 4-byte-align HW breakpoint addresses for Thumb.
7262
7255706c
YQ
72632012-07-27 Yao Qi <yao@codesourcery.com>
7264
7265 PR remote/14161.
7266
7267 * server.h: Declare gdb_agent_about_to_close.
7268 * target.c (kill_inferior): Include "agent.h".
7269 New. Send command 'kill'.
7270 * target.h (kill_inferior): Removed macro.
7271 * tracepoint.c (gdb_agent_about_to_close): New.
7272 (gdb_agent_helper_thread): Handle command 'close'.
7273 Wait endlessly until the inferior stops.
7274 Install gdb_agent_remove_socket to atexit hook.
7275 (agent_socket_name): New static variable.
7276 (gdb_agent_socket_init): Replace local variable 'name' with
7277 'agent_socket_name'.
7278 (gdb_agent_remove_socket): New.
7279
5a3f286f
YQ
72802012-07-27 Yao Qi <yao@codesourcery.com>
7281
7282 * server.c (process_point_options): Stop at 'X' when parsing.
7283
961bd387
ME
72842012-07-19 Michael Eager <eager@eagercon.com>
7285
a261b8f5 7286 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
7287 to hw_execute.
7288 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7289 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7290 hardware breakpoint.
7291
aa7c7447
JK
72922012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7293
7294 * gdbserver/linux-low.c (initialize_low): Call
7295 linux_ptrace_init_warnings.
7296
7f216e7c
DE
72972012-07-02 Doug Evans <dje@google.com>
7298
7299 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7300 pointer to int.
7301
d3ce09f5
SS
73022012-07-02 Stan Shebs <stan@codesourcery.com>
7303
7304 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7305 (ax.o): Add it to build rule.
7306 (ax-ipa.o): Ditto.
7307 (OBS): Add format.o.
7308 (IPA_OBS): Add format.o.
7309 * server.c (handle_query): Claim support for breakpoint commands.
7310 (process_point_options): Add command case.
7311 (process_serial_event): Leave running if there are printfs in
7312 effect.
7313 * mem-break.h (any_persistent_commands): Declare.
7314 (add_breakpoint_commands): Declare.
7315 (gdb_no_commands_at_breakpoint): Declare.
7316 (run_breakpoint_commands): Declare.
7317 * mem-break.c (struct point_command_list): New struct.
7318 (struct breakpoint): New field command_list.
7319 (any_persistent_commands): New function.
7320 (add_commands_to_breakpoint): New function.
7321 (add_breakpoint_commands): New function.
7322 (gdb_no_commands_at_breakpoint): New function.
7323 (run_breakpoint_commands): New function.
7324 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7325 locally.
7326 * ax.c: Include format.h.
7327 (ax_printf): New function.
7328 (gdb_eval_agent_expr): Add printf opcode.
7329
2f8f6aed
YQ
73302012-06-13 Yao Qi <yao@codesourcery.com>
7331
7332 * server.c (start_inferior): Remove duplicated writes to fields
7333 'last_resume_kind' and 'last_status' of 'current_inferior'.
7334
0c9070b3
YQ
73352012-06-12 Yao Qi <yao@codesourcery.com>
7336 Pedro Alves <palves@redhat.com>
7337
7338 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7339 comment.
7340 * server.c (handle_v_cont): Extend comment.
7341
c52daf70
YQ
73422012-06-11 Yao Qi <yao@codesourcery.com>
7343
7344 * linux-low.c (linux_attach): Add 'static'.
7345
d38bbb0a
YQ
73462012-06-06 Yao Qi <yao@codesourcery.com>
7347
7348 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7349
89dc0afd
JK
73502012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7351
7352 Fix gcc -flto compilation warning.
7353 * server.c (main): Make variable multi_mode and attach volatile.
7354
75f62ce7
TJB
73552012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7356
7357 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7358 if the platform doesn't know about it.
7359
65f479b6
PA
73602012-05-30 Jeff Kenton <jkenton@tilera.com>
7361
7362 * Makefile.in (SFILES): Add linux-tile-low.c.
7363 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7364 * configure.srv: Handle tilegx-*-linux*.
7365 * linux-tile-low.c: New file.
7366
0c5bf5a9
JK
73672012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7368
7369 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7370
a493e3e2
PA
73712012-05-24 Pedro Alves <palves@redhat.com>
7372
7373 PR gdb/7205
7374
43aaf8b6 7375 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 7376
2ea28649
PA
73772012-05-24 Pedro Alves <palves@redhat.com>
7378
7379 PR gdb/7205
7380
7381 Replace target_signal with gdb_signal throughout.
7382
8d409d16
MR
73832012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7384
7385 * linux-low.c (linux_store_registers): Avoid the copying sequence
7386 when no data has been retrieved by ptrace.
7387
23512c01
MGD
73882012-05-22 Will Deacon <will.deacon@arm.com>
7389
7390 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7391 Include asm/ptrace.h.
7392 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7393 already defined.
7394
4934b29e
MR
73952012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7396
7397 * linux-low.c (linux_store_registers): Don't re-retrieve data
7398 with ptrace that has already been obtained from /proc. Always
7399 copy any data retrieved with ptrace to the buffer supplied.
7400
bde24c0a
PA
74012012-05-11 Yao Qi <yao@codesourcery.com>
7402 Pedro Alves <palves@redhat.com>
7403
7404 * linux-low.c (enum stopping_threads_kind): New.
7405 (stopping_threads): Change type to `enum stopping_threads_kind'.
7406 (handle_extended_wait): If stopping and suspending threads, leave
7407 the new_lwp suspended too.
7408 (linux_wait_for_event): Adjust.
7409 (stop_all_lwps): Set `stopping_threads' to
7410 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7411 whether we're suspending threads or just stopping them. Assert no
7412 recursion happens.
7413
623b6bdf
YQ
74142012-04-29 Yao Qi <yao@codesourcery.com>
7415
7416 * server.h: Move some code to ...
7417 * gdbthread.h: ... here. New.
7418 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7419 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7420 (nto-low.o, win32-low.o): Likewise.
7421 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7422 * regcache.c, remote-utils.c, server.c: Likewise.
7423 * target.c, tracepoint.c, win32-low.c: Likewise.
7424
f15f9948
TJB
74252012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7426
7427 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7428 (PTRACE_ARG4_TYPE): Likewise.
7429 (PTRACE_XFER_TYPE): Likewise.
7430 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7431 ptrace to PTRACE_ARG3_TYPE.
7432 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7433 (PTRACE_ARG4_TYPE): Likewise.
7434 (PTRACE_XFER_TYPE): Likewise.
7435 (linux_detach_one_lwp): Cast fourth argument of
7436 ptrace to long then PTRACE_ARG4_TYPE.
7437 (regsets_fetch_inferior_registers): Cast third argument of
7438 ptrace to long then PTRACE_ARG3_TYPE.
7439 (regsets_store_inferior_registers): Likewise.
7440
38ea300a
PA
74412012-04-20 Pedro Alves <palves@redhat.com>
7442
7443 * configure: Regenerate.
7444
c971b7fa
PA
74452012-04-19 Pedro Alves <palves@redhat.com>
7446
43aaf8b6 7447 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 7448 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
7449 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7450 (all, install-only, uninstall, clean-info, all-lib, clean): No
7451 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7452 (maintainer-clean realclean distclean): Use subdir_do.
7453 (subdir_do): New.
7454 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 7455 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
7456 * acinclude.m4: Include acx_configure_dir.m4.
7457 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7458 calls. Call AC_PROG_RANLIB. Configure gnulib using
7459 ACX_CONFIGURE_DIR.
7460 (GNULIB): New.
7461 (GNULIB_STDINT_H): Adjust.
7462 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7463 * gdbreplay.c: Include build-gnulib/config.h.
7464 * server.h: Likewise.
7465 * aclocal.m4: Regenerate.
7466 * config.in: Regenerate.
7467 * configure: Regenerate.
c971b7fa 7468
809277f8
PA
74692012-04-19 Pedro Alves <palves@redhat.com>
7470
7471 * Makefile.in (LIBGNU, INCGNU): Adjust.
7472 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7473 (all, install-only, uninstall, clean-info, all-lib, clean)
7474 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7475 * configure.ac: Adjust AC_OUTPUT output.
7476 * aclocal.m4: Regenerate.
7477 * configure: Regenerate.
7478
fd9bb8b8
PA
74792012-04-19 Pedro Alves <palves@redhat.com>
7480
7481 * Makefile.in (generated_files): New.
7482 (server_h): Remove the explicit dependency on config.h, and depend
7483 on $generated_files.
7484
1c298c66
PA
74852012-04-19 Pedro Alves <palves@redhat.com>
7486
7487 * Makefile.in (INCGNU): Add -Ignulib.
7488
57c4b50b
PA
74892012-04-19 Pedro Alves <palves@redhat.com>
7490
7491 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7492 (INCGNU): ... this, and spell out -I here.
7493 (GNULIB_LIB): Rename to ...
7494 (LIBGNU): ... this.
7495 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7496
1030e047
PA
74972012-04-19 Pedro Alves <palves@redhat.com>
7498
7499 * config.in: Regenerate.
7500
447d4319
PA
75012012-04-19 Pedro Alves <palves@redhat.com>
7502
7503 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7504 * server.h (memmem): Remove declaration.
7505 * config.in: Regenerate.
7506 * configure: Regenerate.
7507
aad9eab9
YQ
75082012-04-19 Yao Qi <yao@codesourcery.com>
7509
7510 * Makefile.in (SFILES): Add common/vec.c.
7511 (OBS): Add vec.o.
7512 (vec.o): New rule.
7513
3e10640f
YQ
75142012-04-19 Yao Qi <yao@codesourcery.com>
7515
7516 * remote-utils.c (prepare_resume_reply): Replace with macro
7517 target_core_of_thread.
7518 * server.c (handle_qxfer_threads_proper): Likewise.
7519 * target.h (traget_core_of_thread): New macro.
7520
71622373
PA
75212012-04-18 Pedro Alves <palves@redhat.com>
7522
7523 * aclocal.m4: Regenerate.
7524 * configure: Regenerate.
7525
80d26939
YQ
75262012-04-16 Yao Qi <yao@codesourcery.com>
7527
7528 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7529 duplicated on address.
7530
42476b70
YQ
75312012-04-16 Yao Qi <yao@codesourcery.com>
7532
7533 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7534 (struct tracepoint_action_ops) <send>: New field.
7535 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7536 (agent_expr_send, x_tracepoint_action_send): New.
7537 (l_tracepoint_action_send): New.
7538 (cmd_qtdp): Download and install tracepoint
7539 according to `use_agent'.
7540 (run_inferior_command): Add one more parameter `len'.
7541 Update callers.
7542 (tracepoint_send_agent): New.
7543 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7544
7bc83639
YQ
75452012-04-16 Yao Qi <yao@codesourcery.com>
7546
7547 * tracepoint.c (download_tracepoints): Moved to ...
7548 (cmd_qtstart): ... here.
7549
5f18041e
YQ
75502012-04-14 Yao Qi <yao@codesourcery.com>
7551
7552 * tracepoint.c: Include inttypes.h.
7553 (struct collect_memory_action): Use sized types.
7554 (struct tracepoint): Likewise.
7555 (cmd_qtdp, stop_tracing): Update print specifiers.
7556 (cmd_qtp, response_tracepoint): Likewise.
7557 (collect_data_at_tracepoint): Likewise.
7558 (collect_data_at_step): Likewise.
7559
55a8c076
YQ
75602012-04-14 Yao Qi <yao@codesourcery.com>
7561
7562 Import gnulib module inttypes.
7563 * aclocal.m4, config.in, configure: Regenerated.
7564
dc750257
YQ
75652012-04-14 Yao Qi <yao@codesourcery.com>
7566
7567 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7568 Makefile and config.status at last.
7569
0ab5faf9
YQ
75702012-04-13 Yao Qi <yao@codesourcery.com>
7571
7572 * tracepoint.c: Include stdint.h unconditionally.
7573
18f5fd81
TJB
75742012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7575
7576 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7577 on BFD_HAVE_SYS_PROCFS_TYPE.
7578 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7579 * configure: Regenerate.
7580 * config.in: Likewise.
7581
4d47af5c
L
75822012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7583
7584 * Makefile.in (clean): Also remove x32.c x32-linux.c
7585 x32-avx.c x32-avx-linux.c.
7586 (x32.o): New target.
7587 (x32.c): Likewise.
7588 (x32-linux.o): Likewise.
7589 (x32-linux.c): Likewise.
7590 (x32-avx.o): Likewise.
7591 (x32-avx.c): Likewise.
7592 (x32-avx-linux.o): Likewise.
7593 (x32-avx-linux.c): Likewise.
7594
7595 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7596 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7597 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7598 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7599 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7600 i386/x32-avx-linux.xml.
7601
7602 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7603 (init_registers_x32_avx_linux): Likwise.
7604 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7605 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7606
ecedbe58
PA
76072012-04-13 Pedro Alves <palves@redhat.com>
7608
7609 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7610 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7611 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7612 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7613 the sub-make.
7614
c92b5177
L
76152012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7616
7617 * linux-x86-low.c (compat_x32_clock_t): New.
7618 (compat_x32_siginfo_t): Likewise.
7619 (compat_x32_siginfo_from_siginfo): Likewise.
7620 (siginfo_from_compat_x32_siginfo): Likewise.
7621 (linux_is_elf64): Likewise.
7622 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7623 and siginfo_from_compat_x32_siginfo for x32.
7624 (x86_arch_setup): Set linux_is_elf64.
7625
214d508e
L
76262012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7627
7628 PR gdb/13969
7629 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7630 e_machine field.
7631 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7632 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7633 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7634 compatible with process.
7635
c9a1864a
YQ
76362012-04-12 Yao Qi <yao@codesourcery.com>
7637
7638 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7639 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7640 (install-only, install-info, clean): Handle sub dir gnulib.
7641 (all-lib, am--refresh): New targets.
7642 (memmem.o): Remove target.
7643 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7644 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7645 (AC_REPLACE_FUNCS): Remove memmem.
7646 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7647 (AC_OUTPUT): Generate Makefile in gnulib/.
7648 * aclocal.m4, config.in, configure: Regenerated.
7649
367ba2c2
MR
76502012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7651
7652 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7653
9d236627
PA
76542012-04-05 Pedro Alves <palves@redhat.com>
7655
7656 -Werror=strict-aliasing
7657
7658 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7659 pointer.
7660
111217b3
PA
76612012-04-04 Pedro Alves <palves@redhat.com>
7662
7663 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7664 (sparc_store_gregset_from_stack, sparc_store_gregset)
7665 (sparc_breakpoint_at): Fix formatting.
7666
8365dcf5
TJB
76672012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7668
7669 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7670 are available.
7671 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7672 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7673 * config.in: Regenerate.
7674 * configure: Likewise.
7675
689cc2ae
PA
76762012-03-29 Pedro Alves <palves@redhat.com>
7677
7678 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7679 Correct ptrace arguments.
7680
c14dfd32
PA
76812012-03-28 Pedro Alves <palves@redhat.com>
7682
7683 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7684 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7685 (IA64_FR1_REGNUM): New defines.
7686 (ia64_fetch_register): New.
7687 (the_low_target): Install it.
7688 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7689 field.
7690 * linux-low.c (linux_fetch_registers): Try the
7691 the_low_target.fetch_register hook first.
7692
7693 * linux-arm-low.c (the_low_target): Adjust.
7694 * linux-bfin-low.c (the_low_target): Adjust.
7695 * linux-cris-low.c (the_low_target): Adjust.
7696 * linux-crisv32-low.c (the_low_target): Adjust.
7697 * linux-m32r-low.c (the_low_target): Adjust.
7698 * linux-m68k-low.c (the_low_target): Adjust.
7699 * linux-mips-low.c (the_low_target): Adjust.
7700 * linux-ppc-low.c (the_low_target): Adjust.
7701 * linux-s390-low.c (the_low_target): Adjust.
7702 * linux-sh-low.c (the_low_target): Adjust.
7703 * linux-sparc-low.c (the_low_target): Adjust.
7704 * linux-tic6x-low.c (the_low_target): Adjust.
7705 * linux-x86-low.c (the_low_target): Adjust.
7706 * linux-xtensa-low.c (the_low_target): Adjust.
7707
63c88e13
PA
77082012-03-26 Pedro Alves <palves@redhat.com>
7709
7710 * server.c (handle_qxfer_libraries): Don't bail early if
7711 the_target->qxfer_libraries_svr4 is not NULL.
7712
fb723180
PA
77132012-03-26 Pedro Alves <palves@redhat.com>
7714
7715 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7716
0afae3cf
PA
77172012-03-23 Pedro Alves <palves@redhat.com>
7718
7719 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7720 "library-list-svr4" element's start tag when the the DSO list is
7721 empty.
7722
485f1ee4
PA
77232012-03-23 Pedro Alves <palves@redhat.com>
7724
7725 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7726 a variable whose type size is the same as the inferior's pointer
7727 size.
7728
a5362b9a
TS
77292012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7730
7731 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7732 struct siginfo.
7733 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7734 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7735 * linux-low.h: Include <signal.h>.
7736 (struct siginfo): Remove forward declaration.
7737 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7738 struct siginfo.
7739
d226c142
MF
77402012-03-21 Mike Frysinger <vapier@gentoo.org>
7741
7742 * .gitignore: Ignore more files.
7743
122f36ef
PA
77442012-03-19 Pedro Alves <palves@redhat.com>
7745 Jan Kratochvil <jan.kratochvil@redhat.com>
7746
7747 * server.c (cont_thread, general_thread): Add describing comments.
7748 (start_inferior): Clear `cont_thread'.
7749 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7750 of a process.
7751
fc3e5175
YQ
77522012-03-15 Yao Qi <yao@codesourcery.com>
7753
7754 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7755 handling to ...
7756 (cmd_qtdp): ... here.
7757
8d0d92cd
YQ
77582012-03-15 Yao Qi <yao@codesourcery.com>
7759
7760 * tracepoint.c (struct tracepoint_action_ops): New.
7761 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7762 (m_tracepoint_action_download): New.
7763 (r_tracepoint_action_download): New.
7764 (x_tracepoint_action_download): New.
7765 (l_tracepoint_action_download): New.
7766 (add_tracepoint_action): Install `action->ops' according type.
7767 (download_tracepoint_1): Move code `download' function pointer
7768 of various tracepoint_action_ops.
7769
87b0bb13
JK
77702012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7771
7772 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7773 linux_ptrace_attach_warnings.
7774
5f572dec
JK
77752012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7776
7777 * Makefile.in (linux-ptrace.o): New.
7778 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7779 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7780 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7781 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7782 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7783 of these targets.
7784 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7785
f4647387
YQ
77862012-03-08 Yao Qi <yao@codesourcery.com>
7787 Pedro Alves <palves@redhat.com>
7788
7789 Fix PR server/13392.
7790 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7791 offset of JMP insn.
7792 * tracepoint.c (remove_tracepoint): New.
7793 (cmd_qtdp): Call remove_tracepoint when failed to install.
7794
9b224c5e
PA
77952012-03-07 Pedro Alves <palves@redhat.com>
7796
7797 * linux-low.c (get_detach_signal): New.
7798 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7799 Pass on pending signals to PTRACE_DETACH. Check the result of the
7800 ptrace call.
7801 * server.c (program_signals, program_signals_p): New.
7802 (handle_general_set): Handle QProgramSignals.
7803 * server.h (program_signals, program_signals_p): Declare.
7804
e237a7e2
JK
78052012-03-05 Pedro Alves <palves@redhat.com>
7806 Jan Kratochvil <jan.kratochvil@redhat.com>
7807
7808 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7809 New comment why.
7810
5808517f
YQ
78112012-03-03 Yao Qi <yao@codesourcery.com>
7812
7813 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7814 agent_look_up_symbols.
7815
58b4daa5
YQ
78162012-03-03 Yao Qi <yao@codesourcery.com>
7817
7818 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7819 (linux-x86-low.o): Likewise.
7820 * server.h: Remove in_process_agent_loaded.
7821 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7822 common/agent.c.
7823 Update callers.
7824
8ffcbaaf
YQ
78252012-03-03 Yao Qi <yao@codesourcery.com>
7826
7827 * tracepoint.c (gdb_agent_capability): New global.
7828 (in_process_agent_loaded_ust): Renamed to
7829 `in_process_agent_supports_ust'.
7830 Update callers.
7831 (in_process_agent_supports_ust): Call agent_capability_check.
7832 (clear_installed_tracepoints): Assert that agent supports
7833 agent.
7834
d1feda86
YQ
78352012-03-03 Yao Qi <yao@codesourcery.com>
7836
7837 * linux-low.c (linux_supports_agent): New.
7838 (linux_target_ops): Initialize field `supports_agent' with
7839 linux_supports_agent.
7840 * target.h (struct target_ops) <supports_agent>: New.
7841 (target_supports_agent): New macro.
7842 * server.c (handle_general_set): Handle packet 'QAgent'.
7843 (handle_query): Send `QAgent+'.
7844 * Makefile.in (server.o): Depends on agent.h.
7845
2fa291ac
YQ
78462012-03-03 Yao Qi <yao@codesourcery.com>
7847
7848 * Makefile.in (OBS): Add agent.o.
7849 Add new rule for agent.o.
7850 Track dependence of tracepoint.c on agent.h.
7851 * tracepoint.c (run_inferior_command_1):
7852 (run_inferior_command): Call agent_run_command.
7853 (gdb_ust_connect_sync_socket): Deleted. Move it to
7854 common/agent.c.
7855 (resume_thread, stop_thread): Likewise.
7856 (gdb_ust_socket_init): Renamed to ...
7857 (gdb_agent_socket_init): ... New.
7858 (gdb_ust_thread): Renamed to ...
7859 (gdb_agent_helper_thread): ... New.
7860 (gdb_ust_init): Move some code to ...
7861 (gdb_agent_init): ... here. New.
7862 [HAVE_UST]: Call gdb_ust_init.
7863 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7864 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7865 * config.in, configure: Regenerated.
7866
05044653
PA
78672012-03-02 Pedro Alves <palves@redhat.com>
7868
7869 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7870 * linux-low.c (struct simple_pid_list): New.
7871 (stopped_pids): New a struct simple_pid_list pointer.
7872 (add_to_pid_list, pull_pid_from_list): New.
7873 (handle_extended_wait): Don't assume the first signal new children
7874 report is SIGSTOP. Adjust call to pull_pid_from_list.
7875 (linux_wait_for_lwp): Adjust.
7876
8d00225b
YQ
78772012-03-02 Yao Qi <yao@codesourcery.com>
7878
7879 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7880 debug log.
7881
19560ba5
YQ
78822012-03-02 Yao Qi <yao@codesourcery.com>
7883
7884 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7885 `stop_pc' and `tpoint'. Update caller.
7886
1faeff08
MR
78872012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7888
7889 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7890 * linux-low.c (use_linux_regsets): New macro.
7891 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7892 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7893 (linux_register_in_regsets): New function.
7894 (usr_fetch_inferior_registers): Skip registers covered by
7895 regsets.
7896 (usr_store_inferior_registers): Likewise.
7897 (usr_fetch_inferior_registers): New macro.
7898 (usr_store_inferior_registers): Likewise.
7899 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7900 (linux_store_registers): Likewise.
7901 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7902 prototype.
7903 (init_registers_mips64_dsp_linux): Likewise.
7904 (init_registers_mips_linux): New macro.
7905 (init_registers_mips_dsp_linux): Likewise.
7906 (mips_dsp_num_regs): Likewise.
7907 (DSP_BASE, DSP_CONTROL): New fallback macros.
7908 (mips_base_regs): New macro.
7909 (mips_regmap): Use it. Fix the size.
7910 (mips_dsp_regmap): New variable.
7911 (mips_dsp_regset_bitmap): Likewise.
7912 (mips_arch_setup): New function.
7913 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7914 than mips_regmap.
7915 (mips_cannot_store_register): Likewise.
7916 (the_low_target): Update .arch_setup, .num_regs and .regmap
7917 initializers. Add .regset_bitmap initializer.
7918 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7919 initializer.
7920 * linux-bfin-low.c (the_low_target): Likewise.
7921 * linux-cris-low.c (the_low_target): Likewise.
7922 * linux-crisv32-low.c (the_low_target): Likewise.
7923 * linux-ia64-low.c (the_low_target): Likewise.
7924 * linux-m32r-low.c (the_low_target): Likewise.
7925 * linux-m68k-low.c (the_low_target): Likewise.
7926 * linux-ppc-low.c (the_low_target): Likewise.
7927 * linux-s390-low.c (the_low_target): Likewise.
7928 * linux-sh-low.c (the_low_target): Likewise.
7929 * linux-sparc-low.c (the_low_target): Likewise.
7930 * linux-tic6x-low.c (the_low_target): Likewise.
7931 * linux-x86-low.c (the_low_target): Likewise.
7932 * linux-xtensa-low.c (the_low_target): Likewise.
7933 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7934 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7935 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7936 srv_xmlfiles.
7937 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7938 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7939
c03e6ccc
YQ
79402012-02-29 Yao Qi <yao@codesourcery.com>
7941 Pedro Alves <palves@redhat.com>
7942
7943 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7944 `step_over_finished' is true.
7945
644cebc9
PA
79462012-02-27 Pedro Alves <palves@redhat.com>
7947
7948 * linux-low.c (pid_is_stopped): Delete, moved to common/.
7949 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7950
c14d7ab2
PA
79512012-02-27 Pedro Alves <palves@redhat.com>
7952
7953 PR server/9684
7954 * linux-low.c (pid_is_stopped): New.
7955 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7956
412c89dd
LM
79572012-02-25 Luis Machado <lgustavo@codesourcery.com>
7958
7959 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7960 of conditions.
7961
b745defe
MR
79622012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
7963
7964 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7965
9f3a5c85
LM
79662012-02-24 Luis Machado <lgustavo@codesourcery>
7967
7968 * server.c (handle_query): Advertise support for target-side
7969 breakpoint condition evaluation.
7970 (process_point_options): New function.
7971 (process_serial_event): When inserting a breakpoint, check for
7972 a target-side condition that should be evaluated.
7973
7974 * mem-break.c: Include regcache.h and ax.h.
7975 (point_cond_list_t): New data structure.
7976 (breakpoint) <cond_list>: New field.
7977 (find_gdb_breakpoint_at): Make non-static.
7978 (delete_gdb_breakpoint_at): Clear any target-side
7979 conditions.
7980 (clear_gdb_breakpoint_conditions): New function.
7981 (add_condition_to_breakpoint): Likewise.
7982 (add_breakpoint_condition): Likewise.
7983 (gdb_condition_true_at_breakpoint): Likewise.
7984 (gdb_breakpoint_here): Return result directly instead
7985 of going through a local variable.
7986
7987 * mem-break.h (find_gdb_breakpoint_at): New prototype.
7988 (clear_gdb_breakpoint_conditions): Likewise.
7989 (add_breakpoint_condition): Likewise.
7990 (gdb_condition_true_at_breakpoint): Likewise.
7991
7992 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
7993 (need_step_over_p): Take target-side breakpoint condition into
7994 consideration.
7995
5e1dc496
LM
79962012-02-24 Luis Machado <lgustavo@codesourcery>
7997
7998 * server.h: Include tracepoint.h.
7999 (agent_mem_read, agent_get_trace_state_variable_value,
8000 agent_set_trace_state_variable_value,
8001 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8002 get_set_tsv_func_addr): New prototypes.
8003
8004 * ax.h: New include file.
8005 * ax.c: New source file.
8006
8007 * tracepoint.c: Include ax.h.
8008 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8009 agent_expr, eval_result_type): Move to ax.h.
8010 (parse_agent_expr): Rename to ...
8011 (gdb_parse_agent_expr): ... this, make it non-static and move
8012 to ax.h.
8013 (unparse_agent_expr) Rename to ...
8014 (gdb_unparse_agent_expr): ... this, make it non-static and move
8015 to ax.h.
8016 (eval_agent_expr): Rename to ...
8017 (eval_tracepoint_agent_expr): ... this.
8018 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8019 forward declarations.
8020 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8021 (agent_get_trace_state_variable_value): New function.
8022 (agent_set_trace_state_variable_value): New function.
8023 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8024 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8025 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8026 (condition_true_at_tracepoint): Likewise.
8027 (parse_agent_expr): Rename to ...
8028 (gdb_parse_agent_expr): ... this and move to ax.c.
8029 (unparse_agent_expr): Rename to ...
8030 (gdb_unparse_agent_expr): ... this and move to ax.c.
8031 (gdb_agent_op_name): Move to ax.c.
8032 (eval_agent_expr): Rename to ...
8033 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8034 and move to ax.c.
8035 (eval_tracepoint_agent_expr): New function.
8036 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8037 non-static.
5e1dc496
LM
8038 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8039 ax.c.
8040 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8041 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8042 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8043 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8044 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8045 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8046 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8047 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8048 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8049 (compile_bytecodes): Remove forward declaration.
8050 (is_goto_target): Move to ax.c.
8051 (compile_bytecodes): Move to ax.c and call
8052 agent_get_trace_state_variable_value (...) and
8053 agent_set_trace_state_variable_value (...).
8054
8055 * Makefile.in: Update ax.c and IPA dependencies.
8056
277e4e52
PA
80572012-02-24 Pedro Alves <palves@redhat.com>
8058
8059 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8060 (cmd_bigqtbuffer_circular): ... this. Only handle
8061 'QTBuffer:circular:'.
8062 (handle_tracepoint_general_set): Adjust.
8063
bf4c19f7
YQ
80642012-02-16 Yao Qi <yao@codesourcery.com>
8065
8066 * inferiors.c: Move code to ...
8067 * dll.c: .... here. New.
8068 * server.h: Declare clear_dlls.
8069 * Makefile.in (SFILES): Add dll.c.
8070 (OBS): Add dll.o
8071 (dll.o): New rule.
8072
d73f2619
YQ
80732012-02-11 Yao Qi <yao@codesourcery.com>
8074
8075 * server.c: (handle_monitor_command): Add a new parameter
8076 `own_buf'.
8077 (handle_query): Update caller.
8078
f8255c2a
JB
80792012-02-09 Joel Brobecker <brobecker@adacore.com>
8080
8081 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8082 * configure, config.in: Regenerate.
8083 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8084 is not defined.
8085
da84f473
PA
80862012-02-02 Pedro Alves <palves@redhat.com>
8087
8088 Try SIGKILL first, then PTRACE_KILL.
8089 * linux-low.c (linux_kill_one_lwp): New.
8090 (linux_kill_one_lwp): Rename to ...
8091 (kill_one_lwp_callback): ... this. Use the new
8092 linux_kill_one_lwp.
8093
e886a173
PA
80942012-02-02 Pedro Alves <palves@redhat.com>
8095
8096 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8097 inferior.
8098
be07f1a2
PA
80992012-01-27 Pedro Alves <palves@redhat.com>
8100
8101 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8102 (elf_64_file_p): Make static.
8103 (linux_pid_exe_is_elf_64_file): New.
8104 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8105 Delete declarations.
8106 (linux_pid_exe_is_elf_64_file): Declare.
8107 * linux-x86-low.c (x86_arch_setup): Use
8108 linux_pid_exe_is_elf_64_file.
8109
d8301ad1
JK
81102012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8111
8112 * linux-low.c (linux_wait_for_event_1): Rename to ...
8113 (linux_wait_for_event): ... here and merge it with former
8114 linux_wait_for_event - new variable wait_ptid, use it.
8115 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8116
01b17894
PA
81172012-01-23 Pedro Alves <palves@redhat.com>
8118
8119 * server.c (main): Avoid yet another case of infinite loop while
8120 detaching/killing after a longjmp.
8121
e825046f
JK
81222012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8123
8124 Code cleanup.
8125 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8126
b9e7b9c3
UW
81272012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8128
8129 * hostio.c (handle_readlink): New function.
8130 (handle_vFile): Call it to handle "vFile:readlink" packets.
8131
901f9912
UW
81322012-01-20 Pedro Alves <palves@redhat.com>
8133 Ulrich Weigand <ulrich.weigand@linaro.org>
8134
8135 * server.c (handle_v_requests): Only support vAttach and vRun to
8136 start multiple processes when in extended protocol mode.
8137
fc1ab1a0
PA
81382012-01-17 Pedro Alves <palves@redhat.com>
8139
8140 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8141 memalign plus mprotect to allocate the scratch buffer.
8142
7d5d4e98
PA
81432012-01-13 Pedro Alves <palves@redhat.com>
8144
8145 * server.c (attach_inferior): Clear `cont_thread'.
8146
f128d5e9
PA
81472012-01-13 Pedro Alves <palves@redhat.com>
8148
8149 * server.c (main): Avoid infinite loop while detaching/killing
8150 after a longjmp.
8151
06db92f0
DE
81522012-01-09 Doug Evans <dje@google.com>
8153
8154 * server.c (start_inferior): Set last_ptid in --wrapper case.
8155
32d92999
YQ
81562012-01-06 Yao Qi <yao@codesourcery.com>
8157
8158 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8159 defined.
8160 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8161
5e0a92a9
YQ
81622012-01-04 Yao Qi <yao@codesourcery.com>
8163
8164 * tracepoint.c (cmd_qtdp): Print debug message
8165 for static tracepoint.
8166
ae639e8c
YQ
81672012-01-04 Yao Qi <yao@codesourcery.com>
8168
8169 * tracepoint.c (trace_vdebug): Differentiate debug message
8170 between gdbserver and IPA.
8171
f72429c5
YQ
81722012-01-03 Yao Qi <yao@codesourcery.com>
8173
8174 * tracepoint.c (tracepoint_was_hit): Don't collect for
8175 static tracepoint.
8176
12c3e59c
JB
81772012-01-02 Joel Brobecker <brobecker@adacore.com>
8178
8179 * terminal.h: Reformat copyright header.
8180
67827812
JB
81812012-01-02 Joel Brobecker <brobecker@adacore.com>
8182
8183 * server.c (gdbserver_version): Update copyright year.
8184 * gdbreplay.c (gdbreplay_version): Likewise.
8185
3e52c33d
JK
81862011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8187
8188 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8189
8190 Revert:
8191 2011-12-18 Hui Zhu <teawater@gmail.com>
8192 * linux-low.c (linux_create_inferior): Save return value to ret.
8193
66f1260e
HZ
81942011-12-18 Hui Zhu <teawater@gmail.com>
8195
8196 * linux-low.c (linux_create_inferior): Save return value to ret.
8197
e77616d7
DE
81982011-12-16 Doug Evans <dje@google.com>
8199
e7b06c57
DE
8200 * linux-low.c (linux_create_inferior): If stdio connection,
8201 redirect stdin from /dev/null, stdout to stderr.
8202 * remote-utils.c (remote_is_stdio): New static global.
8203 (remote_connection_is_stdio): New function.
8204 (remote_prepare): Handle stdio connection.
8205 (remote_open): Ditto.
8206 (remote_close): Don't close stdin for stdio connections.
8207 (read_prim,write_prim): New functions. Replace all calls to
8208 read/write to these.
8209 * server.c (main): Watch for "-" argument. Move call to
8210 remote_prepare before start_inferior.
8211 * server.h (STDIO_CONNECTION_NAME): New macro.
8212 (remote_connection_is_stdio): Declare.
8213
e77616d7
DE
8214 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8215 in debugging output.
8216
82067193
YQ
82172011-12-15 Yao Qi <yao@codesourcery.com>
8218
8219 * tracepoint.c: Include sys/syscall.h.
8220 (gdb_ust_thread): Remove preprocessor conditional.
8221
82bfbe7e
PA
82222011-12-14 Pedro Alves <pedro@codesourcery.com>
8223
8224 * linux-low.c (linux_detach_one_lwp): Call
8225 the_low_target.prepare_to_resume before detaching.
8226
712c6575
YQ
82272011-12-14 Yao Qi <yao@codesourcery.com>
8228
8229 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8230 of write.
8231
d54d1edf
YQ
82322011-12-14 Yao Qi <yao@codesourcery.com>
8233
8234 * i386-low.c (i386_low_stopped_data_address): Initialize local
8235 variable `control'.
8236
6210a125
PA
82372011-12-13 Pedro Alves <pedro@codesourcery.com>
8238
8239 PR remote/13492
8240
8241 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8242 DR_CONTROL unless necessary. Extend comments.
8243 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8244 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8245
2ece8244
YQ
82462011-12-13 Yao Qi <yao@codesourcery.com>
8247
8248 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8249 macros.
8250 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8251
784867a5
JK
82522011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8253
8254 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8255 Print new debug message for such case.
8256
6bf36717
JK
82572011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8258
8259 Fix overlapping memcpy.
8260 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8261 the read_inferior_memory transfer.
8262 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8263 write_inferior_memory transfer.
8264 (set_fast_tracepoint_jump): New variable buf. Use it for the
8265 read_inferior_memory and write_inferior_memory transfers.
8266 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8267 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8268 Use it for the write_inferior_memory transfer.
8269 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8270 buffers.
8271
50275556
MR
82722011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8273
8274 * linux-low.c (fetch_register, store_register): Make code
8275 consistent, fix formatting.
8276
7325beb4
MR
82772011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8278
8279 * linux-low.c (usr_store_inferior_registers): Factor out code
8280 to handle individual registers into...
8281 (store_register): ... this new function.
8282
c642a434
UW
82832011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8284
8285 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8286 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8287 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8288 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8289 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8290 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8291 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8292 (srv_xmlfiles): Add new XML files.
8293
8294 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8295 and <sys/uio.h>.
8296 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8297 (init_registers_s390_linux32v1): Add prototype.
8298 (init_registers_s390_linux32v2): Likewise.
8299 (init_registers_s390_linux64v1): Likewise.
8300 (init_registers_s390_linux64v2): Likewise.
8301 (init_registers_s390x_linux64v1): Likewise.
8302 (init_registers_s390x_linux64v2): Likewise.
8303 (s390_num_regs): Increment to 52.
8304 (s390_regmap): Add orig_r2 register.
8305 (s390_num_regs_3264): Increment to 68.
8306 (s390_regmap_3264): Add orig_r2 register.
8307 (s390_collect_ptrace_register): Handle orig_r2 register.
8308 (s390_supply_ptrace_register): Likewise.
8309 (s390_fill_last_break): New function.
8310 (s390_store_last_break): Likewise.
8311 (s390_fill_system_call): New function.
8312 (s390_store_system_call): Likewise.
8313 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8314 register sets.
8315 (s390_check_regset): New function.
8316 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8317 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8318 Update target_regsets for available register sets.
8319
2268b414
JK
83202011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8321 Jan Kratochvil <jan.kratochvil@redhat.com>
8322
8323 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8324 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8325 New.
8326 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8327 * linux-low.h (struct process_info_private): New member r_debug.
8328 * server.c (handle_qxfer_libraries): Call
8329 the_target->qxfer_libraries_svr4.
8330 (handle_qxfer_libraries_svr4): New function.
8331 (qxfer_packets): New entry "libraries-svr4".
8332 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8333 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8334 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8335 PACKET_qXfer_libraries_svr4.
8336
d6db1fab
UW
83372011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8338
8339 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8340 PSW address/mask between 8-byte and 16-byte formats.
8341 (s390_supply_ptrace_register): Likewise.
8342 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8343 basic addressing mode bit.
8344
242f5f1c
SS
83452011-11-24 Stan Shebs <stan@codesourcery.com>
8346
8347 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8348
f196051f
SS
83492011-11-17 Stan Shebs <stan@codesourcery.com>
8350
8351 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8352 (tracing_start_time): New global.
8353 (tracing_stop_time): New global.
8354 (tracing_user_name): New global.
8355 (tracing_notes): New global.
8356 (tracing_stop_note): New global.
8357 (cmd_qtstart): Set traceframe_usage, start_time.
8358 (stop_tracing): Set stop_time.
8359 (cmd_qtstatus): Report additional status.
8360 (cmd_qtp): New function.
8361 (handle_tracepoint_query): Call it.
8362 (cmd_qtnotes): New function.
8363 (handle_tracepoint_general_set): Call it.
8364 (get_timestamp): Rename from tsv_get_timestamp.
8365
405f8e94
SS
83662011-11-14 Stan Shebs <stan@codesourcery.com>
8367 Kwok Cheung Yeung <kcy@codesourcery.com>
8368
8369 * linux-x86-low.c (small_jump_insn): New.
8370 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8371 trampoline and error message, build a trampoline and issue a small
8372 jump instruction to it.
8373 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8374 trampoline and error message.
8375 (x86_get_min_fast_tracepoint_insn_len): New.
8376 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8377 * linux-low.h (struct linux_target_ops): Add arguments to
8378 install_fast_tracepoint_jump_pad operation, add new operation.
8379 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8380 arguments.
8381 (linux_get_min_fast_tracepoint_insn_len): New function.
8382 (linux_target_op): Add new operation.
8383 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8384 (gdb_trampoline_buffer_end): Ditto.
8385 (gdb_trampoline_buffer_error): Ditto.
8386 (struct ipa_sym_addresses): Add fields for new IPA variables.
8387 (symbol_list): Add entries for new IPA variables.
8388 (struct tracepoint): Add fields to hold the address range of the
8389 trampoline used by the tracepoint.
8390 (trampoline_buffer_head): New static variable.
8391 (trampoline_buffer_tail): Ditto.
8392 (claim_trampoline_space): New function.
8393 (have_fast_tracepoint_trampoline_buffer): New function.
8394 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8395 structure.
8396 (install_fast_tracepoint): Ditto, also add error buffer argument.
8397 (cmd_qtminftpilen): New function.
8398 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8399 (fast_tracepoint_from_trampoline_address): New function.
8400 (fast_tracepoint_collecting): Handle trampoline as part of jump
8401 pad space.
8402 (set_trampoline_buffer_space): New function.
8403 (initialize_tracepoint): Initialize new IPA variables.
8404 * target.h (struct target_ops): Add arguments to
8405 install_fast_tracepoint_jump_pad operation, add new
8406 get_min_fast_tracepoint_insn_len operation.
8407 (target_get_min_fast_tracepoint_insn_len): New.
8408 (install_fast_tracepoint_jump_pad): Add arguments.
8409 * server.h (IPA_BUFSIZ): Define.
8410 * linux-i386-ipa.c: Include extra header files.
8411 (initialize_fast_tracepoint_trampoline_buffer): New function.
8412 (initialize_low_tracepoint): Call it.
8413 * server.h (set_trampoline_buffer_space): Declare.
8414 (claim_trampoline_space): Ditto.
8415 (have_fast_tracepoint_trampoline_buffer): Ditto.
8416
1e4d1764
YQ
84172011-11-14 Yao Qi <yao@codesourcery.com>
8418
8419 * server.c (handle_query): Handle InstallInTrace for qSupported.
8420 * tracepoint.c (add_tracepoint): Sort list.
8421 (install_tracepoint, download_tracepoint): New.
8422 (cmd_qtdp): Call them to install and download tracepoints.
8423 (sort_tracepoints): Removed.
8424 (cmd_qtstart): Update.
8425
5c73ff4e
YQ
84262011-11-14 Yao Qi <yao@codesourcery.com>
8427
8428 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8429 * mem-break.h: Declare.
8430 * tracepoint.c (cmd_qtstart): Move some code to ...
8431 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8432 New.
8433 (download_tracepoints): Move some code to ...
8434 (download_tracepoint_1): ... here. New.
8435
86a30030
YQ
84362011-11-08 Yao Qi <yao@codesourcery.com>
8437
8438 * remote-utils.c (relocate_instruction): A comment fix.
8439
8d26e50c
JB
84402011-11-07 Joel Brobecker <brobecker@adacore.com>
8441
8442 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8443 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8444 dr_status_mirror and dr_control_mirror from debug_reg_state.
8445 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8446 (i386_initial_stuff): Remove use of deleted globals.
8447 (i386_get_thread_context, i386_set_thread_context,
8448 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8449 from debug_reg_state.
8450
a59306a3
YQ
84512011-11-05 Yao Qi <yao@codesourcery.com>
8452
8453 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8454 address as TPOINT's.
8455
3065dfb6
SS
84562011-11-02 Stan Shebs <stan@codesourcery.com>
8457
8458 * tracepoint.c (agent_mem_read_string): New function.
8459 (eval_agent_expr): Call it for tracenz.
8460 * server.c (handle_query): Report support for tracenz.
8461
fd0d8c7c
YQ
84622011-11-02 Yao Qi <yao@codesourcery.com>
8463
8464 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8465
609086b1
YQ
84662011-11-02 Yao Qi <yao@codesourcery.com>
8467
8468 * target.h: Fix a typo in comment.
8469
b9fd1791
PA
84702011-10-31 Pedro Alves <pedro@codesourcery.com>
8471
8472 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8473 clobber the breakpoints' shadows with fast tracepoint jumps.
8474 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8475 * target.c (write_inferior_memory): Also pass MYADDR down to
8476 check_mem_write.
8477
03583c20
UW
84782011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8479
8480 * configure.ac: Check support for personality routine.
8481 * configure: Regenerate.
8482 * config.in: Likewise.
8483 * linux-low.c: Include <sys/personality.h>.
8484 Define ADDR_NO_RANDOMIZE if necessary.
8485 (linux_create_inferior): Disable address space randomization when
8486 forking inferior, if requested.
8487 (linux_supports_disable_randomization): New function.
8488 (linux_target_ops): Install it.
8489 * server.h (disable_randomization): Declare.
8490 * server.c (disable_randomization): New global variable.
8491 (handle_general_set): Handle QDisableRandomization.
8492 (handle_query): Likewise for qSupported.
8493 (main): Support --disable-randomization and --no-disable-randomization
8494 command line arguments.
8495 * target.h (struct target_ops): Add supports_disable_randomization.
8496 (target_supports_disable_randomization): New macro.
8497
723b724b
MF
84982011-09-29 Mike Frysinger <vapier@gentoo.org>
8499
8500 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8501 ifdef check.
8502 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8503 [!PT_GETDSBT] (target_loadmap): New definition.
8504 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8505 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8506 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8507 and PT_GETDSBT to LINUX_LOADMAP.
8508 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8509 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8510
55329a5c 85112011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
8512
8513 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8514 (arm_linux_hwbp_cap): New static variable.
8515 (arm_linux_get_hwbp_cap): Replace by ...
8516 (arm_linux_init_hwbp_cap): ... this new function.
8517 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8518 (arm_linux_get_hw_watchpoint_count): Likewise.
8519 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8520 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8521 (arm_prepare_to_resume): Use perror_with_name instead of error.
8522
55329a5c 85232011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
8524
8525 * linux-arm-low.c: Include <signal.h>.
8526 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8527 (struct arm_linux_hwbp_cap): New data type.
8528 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8529 (struct arm_linux_hw_breakpoint): New data type.
8530 (MAX_BPTS, MAX_WPTS): Define.
8531 (struct arch_process_info, struct arch_lwp_info): New data types.
8532 (arm_linux_get_hwbp_cap): New function.
8533 (arm_linux_get_hw_breakpoint_count): Likewise.
8534 (arm_linux_get_hw_watchpoint_count): Likewise.
8535 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8536 (arm_hwbp_control_initialize): Likewise.
8537 (arm_hwbp_control_is_enabled): Likewise.
8538 (arm_hwbp_control_is_initialized): Likewise.
8539 (arm_hwbp_control_disable): Likewise.
8540 (arm_linux_hw_breakpoint_equal): Likewise.
8541 (arm_linux_hw_point_initialize): Likewise.
8542 (struct update_registers_data): New data structure.
8543 (update_registers_callback: New function.
8544 (arm_insert_point): Likewise.
8545 (arm_remove_point): Likewise.
8546 (arm_stopped_by_watchpoint): Likewise.
8547 (arm_stopped_data_address): Likewise.
8548 (arm_new_process): Likewise.
8549 (arm_new_thread): Likewise.
8550 (arm_prepare_to_resume): Likewise.
8551 (the_low_target): Register arm_insert_point, arm_remove_point,
8552 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8553 arm_new_thread, and arm_prepare_to_resume.
8554
6b9801d4
SS
85552011-09-15 Stan Shebs <stan@codesourcery.com>
8556
8557 * server.h (struct emit_ops): Add compare-goto fields.
8558 * tracepoint.c (gdb_agent_op_sizes): New table.
8559 (emit_eq_goto): New function.
8560 (emit_ne_goto): New function.
8561 (emit_lt_goto): New function.
8562 (emit_le_goto): New function.
8563 (emit_gt_goto): New function.
8564 (emit_ge_goto): New function.
8565 (is_goto_target): New function.
8566 (compile_bytecodes): Recognize special cases of compare-goto
8567 combinations and call specialized emitters for them.
8568 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8569 (amd64_emit_ne_goto): New function.
8570 (amd64_emit_lt_goto): New function.
8571 (amd64_emit_le_goto): New function.
8572 (amd64_emit_gt_goto): New function.
8573 (amd64_emit_ge_goto): New function.
8574 (amd64_emit_ops): Add the new functions.
8575 (i386_emit_eq_goto): New function.
8576 (i386_emit_ne_goto): New function.
8577 (i386_emit_lt_goto): New function.
8578 (i386_emit_le_goto): New function.
8579 (i386_emit_gt_goto): New function.
8580 (i386_emit_ge_goto): New function.
8581 (i386_emit_ops): Add the new functions.
8582
bf15cbda
SS
85832011-09-08 Stan Shebs <stan@codesourcery.com>
8584
8585 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8586 (i386_emit_epilogue): Restore %ebx.
8587
943ca1dd
JZ
85882011-08-31 Jie Zhang <jzhang918@gmail.com>
8589
8590 * server.c (step_thread): Remove definition.
8591 (process_serial_event): Don't handle Hs.
8592 * server.h (step_thread): Remove declaration.
8593 * target.c (set_desired_inferior): Remove use of step_thread.
8594
e3deef73
LM
85952011-08-24 Luis Machado <lgustavo@codesourcery.com>
8596
8597 * linux-low.c: Include linux-procfs.h.
8598 (linux_attach_lwp_1): Update comments.
8599 (linux_attach): Scan for existing threads when attaching to a
8600 process that is the tgid.
8601 * Makefile.in: Update dependencies.
8602
13da1c97
LM
86032011-08-24 Luis Machado <lgustavo@codesourcery.com>
8604
8605 * configure.srv: Add linux-procfs.o dependencies.
8606
881127c9
YQ
86072011-08-14 Yao Qi <yao@codesourcery.com>
8608
8609 * target.h (struct target_ops): Fix indent.
8610 * win32-low.c (win32_target_ops): Fix comment.
8611
58dbd541
YQ
86122011-08-14 Andrew Jenner <andrew@codesourcery.com>
8613 Yao Qi <yao@codesourcery.com>
8614
8615 * Makefile.in (clean): Remove tic6x-*.c files.
8616 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8617 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8618 (tic6x-c64xp-linux.c): Likewise.
8619 * configure.srv: Add support for tic6x-*-uclinux.
8620 * linux-tic6x-low.c: New.
8621 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8622
78d85199
YQ
86232011-08-14 Andrew Stubbs <ams@codesourcery.com>
8624 Yao Qi <yao@codesourcery.com>
8625
8626 * target.h (struct target_ops): Add read_loadmap.
8627 * linux-low.c (struct target_loadseg): New type.
8628 (struct target_loadmap): New type.
8629 (linux_read_loadmap): New function.
8630 (linux_target_ops): Add linux_read_loadmap.
8631 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
8632 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8633 to NULL.
78d85199 8634
a959a88d
EZ
86352011-08-05 Eli Zaretskii <eliz@gnu.org>
8636
8637 * win32-low.c: Include <stdint.h>.
8638
1ced966e
PA
86392011-07-22 Pedro Alves <pedro@codesourcery.com>
8640
8641 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8642 to the inferior here.
8643 (i386_remove_aligned_watchpoint): Ditto.
8644 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8645 fit part of the watchpoint in the debug registers.
8646 (i386_update_inferior_debug_regs): New.
8647 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8648 registers, and only update the inferior on success.
8649 (i386_low_remove_watchpoint): Ditto.
8650
d26e3629
KY
86512011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8652
8653 * linux-low.c (compare_ints, unique, list_threads, show_process,
8654 linux_core_of_thread): Delete.
8655 (linux_target_ops): Change linux_core_of_thread to
8656 linux_common_core_of_thread.
8657 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8658 * utils.c (malloc_failure): Change type of argument.
8659 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8660 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8661 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8662 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8663 (IPA_OBJS): Add common-utils-ipa.o.
8664 (ptid_h, linux_osdata_h): New macros.
8665 (server_h): Add common/common-utils.h, common/xml-utils.h,
8666 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8667 common/ptid.h.
8668 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8669 ptid.o, buffer.o): New rules.
8670 (linux-low.o): Add common/linux-osdata.h as a dependency.
8671 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8672 * configure.ac: Add AC_HEADER_DIRENT check.
8673 * config.in: Regenerate.
8674 * configure: Regenerate.
8675 * remote-utils.c (xml_escape_text): Delete.
8676 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8677 buffer_xml_printf): Move to common/buffer.c.
8678 * server.c (main): Remove call to initialize_inferiors.
8679 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8680 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8681 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8682 internal_error, gdb_assert, gdb_assert_fail): Delete.
8683 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8684 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8685 common/buffer.h.
8686 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8687 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8688 initialize_inferiors): Delete.
8689
2275a1a7
PA
86902011-07-20 Pedro Alves <pedro@codesourcery.com>
8691
8692 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8693 symbol error.
8694
0a5b1e09
PA
86952011-05-31 Pedro Alves <pedro@codesourcery.com>
8696
8697 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8698 assertion.
8699 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8700
6938fd34
YQ
87012011-05-26 Yao Qi <yao@codesourcery.com>
8702
8703 * Makefile.in (thread-db.o): Track dependence to
8704 common/gdb_thread_db.h.
8705 * thread-db.c: include gdb_thread_db.h from right place.
8706
b481f9e0
TT
87072011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8708
8709 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8710 __FILE__ and __LINE__ to internal_error.
8711
98a5dd13
DE
87122011-05-13 Doug Evans <dje@google.com>
8713
8714 * thread-db.c (try_thread_db_load_from_sdir): New function.
8715 (try_thread_db_load_from_dir): New function.
8716 (thread_db_load_search): Handle $sdir, ignore $pdir.
8717 Remove trying of system directories if search of
8718 libthread-db-search-path fails, that is now done via $sdir.
8719
d248b706
KY
87202011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8721
8722 * server.c (handle_query): Add EnableDisableTracepoints to the list
8723 of supported features.
43aaf8b6 8724 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 8725 tracepoints.
43aaf8b6
PA
8726 (cmd_qtenable_disable): New.
8727 (cmd_qtstart): Install tracepoints even if disabled.
8728 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8729 receiving a QTEnable or QTDisable packet.
8730 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8731 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8732 tracepoints.
8733 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 8734
84e578fb
DE
87352011-05-10 Doug Evans <dje@google.com>
8736
8737 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8738
71f55dd8
DE
87392011-05-04 Doug Evans <dje@google.com>
8740
8741 * linux-low.c (linux_join): Skip process lookup.
8742 * spu-low.c (spu_join): Ditto.
8743 * server.c (join_inferiors_callback): Delete.
8744 (process_serial_event): For 'D' packet (detach) call join_inferior
8745 directly.
8746
4d393d60
JM
87472011-05-04 Joseph Myers <joseph@codesourcery.com>
8748
8749 * README: Don't mention xscale*-*-linux*.
8750 * configure.srv (xscale*-*-linux*): Don't handle target.
8751
b00ad6ff
NF
87522011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8753
8754 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8755 casting pointers.
8756 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8757 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8758 (i386_emit_void_call_2): Likewise.
8759
af96c192
YQ
87602011-04-26 Yao Qi <yao@codesourcery.com>
8761
43aaf8b6
PA
8762 * linux-low.c: Move common macros to linux-ptrace.h.
8763 Include linux-ptrace.h.
af96c192
YQ
8764 * Makefile.in (linux_ptrace_h): New.
8765 (linux-low.o): Depends on linux-ptrace.h.
8766
03f2bd59
JK
87672011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8768
8769 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8770 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8771 (remote_prepare): New function with most of the TCP code from ...
8772 (remote_open): ... here. Detect PORT here unconditionally. Move also
8773 setting transport_is_reliable.
8774 * server.c (run_once): New variable.
8775 (gdbserver_usage): Document it.
8776 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8777 the first run if RUN_ONCE.
8778 * server.h (run_once, remote_prepare): New declarations.
8779
7a9dd1b2
TT
87802011-04-19 Tom Tromey <tromey@redhat.com>
8781
8782 * win32-low.c (handle_load_dll): Remove duplicate "the".
8783
81239425
PM
87842011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8785
8786 Remove support for old Cygwin 1.5 versions.
8787 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8788 function to avoid warning.
8789 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8790 warning.
8791
9e0627f1
PM
87922011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8793
8794 * gdbserver/server.h (Macro _): Define it if not available.
8795
588eebee
MS
87962011-03-14 Michael Snyder <msnyder@vmware.com>
8797
348af9f7 8798 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 8799
43f70d4c
JB
88002011-03-10 Joel Brobecker <brobecker@adacore.com>
8801
8802 * Makefile.in (maintainer-clean realclean distclean): Remove
8803 "make ... subdir_do" command.
8804
348af9f7
MS
88052011-03-10 Michael Snyder <msnyder@vmware.com>
8806
8807 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8808
8809 * server.c (handle_v_run): Free alloced buffer on early return.
8810
e637a4f5
YQ
88112011-03-09 Yao Qi <yao@codesourcery.com>
8812
8813 Revert:
8814 2011-03-04 Yao Qi <yao@codesourcery.com>
8815
8816 * Makefile.in: Remove GNU make feature --directory.
8817
8818 2011-03-05 Yao Qi <yao@codesourcery.com>
8819
8820 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8821 (subdir_do): New make target. Copied from gdb/Makefile.
8822 (maintainer-clean, realclean, distclean, clean): Call corresponding
8823 make targets in common/Makefile.
8824
8825 2011-02-11 Yao Qi <yao@codesourcery.com>
8826
8827 * configure.ac: Call AC_PROG_RANLIB.
8828 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8829 * configure: Regenerate.
8830
e6edda56
JK
88312011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8832
8833 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8834
e5141119
JB
88352011-03-06 Yao Qi <yao@codesourcery.com>
8836
8837 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8838
64794aa4
JB
88392011-03-05 Yao Qi <yao@codesourcery.com>
8840
8841 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8842 (subdir_do): New make target. Copied from gdb/Makefile.
8843 (maintainer-clean, realclean, distclean, clean): Call corresponding
8844 make targets in common/Makefile.
8845
7a762829
YQ
88462011-03-04 Yao Qi <yao@codesourcery.com>
8847
8848 * Makefile.in: Remove GNU make feature --directory.
8849
348af9f7
MS
88502011-03-04 Michael Snyder <msnyder@vmware.com>
8851
8852 * server.c (queue_stop_reply): Call xmalloc not malloc.
8853
88542011-03-02 Michael Snyder <msnyder@vmware.com>
8855
8856 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8857
9f72fee2
MS
88582011-02-28 Michael Snyder <msnyder@vmware.com>
8859
588eebee
MS
8860 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8861 (cmd_qtframe): Ditto.
8862 (cmd_qtbuffer): Ditto.
8863 (cmd_bigqtbuffer): Ditto.
8864
9f72fee2
MS
8865 * utils.c (decimal2str): Initialize 'width' to nine, then
8866 don't mess with it.
8867
8040bd49
UW
88682011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8869
8870 * hostio.c (require_data): Free *data, not data.
8871
7e52cbd0
JK
88722011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8873
8874 * hostio.c (require_data): Use free, not xfree.
8875
9130f83e
MS
88762011-02-27 Michael Snyder <msnyder@vmware.com>
8877
4b812f4e
MS
8878 * server.c (handle_query): Discard unused value.
8879
9130f83e
MS
8880 * hostio.c (require_data): Free malloc memory before returning
8881 error.
8882
69d37113
MS
88832011-02-26 Michael Snyder <msnyder@vmware.com>
8884
8885 * linux-low.c (list_threads): Call closedir for dirent.
8886
35f5825a
MS
88872011-02-27 Michael Snyder <msnyder@vmware.com>
8888
2a589cef
MS
8889 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8890 a case statement falls through.
8891
0adea5f7
MS
8892 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8893
35f5825a
MS
8894 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8895 in comparison.
8896
238f1c74
MS
88972011-02-26 Michael Snyder <msnyder@vmware.com>
8898
8899 * utils.c (decimal2str): Eliminate dead code and dead param.
8900 (pulongest): Drop dead param from call to decimal2str.
8901 (plongest): Ditto.
8902
633ff500
JB
89032011-02-24 Joel Brobecker <brobecker@adacore.com>
8904
8905 Revert the following patch (not approved yet):
8906 2011-02-21 Hui Zhu <teawater@gmail.com>
8907 * tracepoint.c (tp_printf): New function.
8908 (eval_agent_expr): Handle gdb_agent_op_printf.
8909
f9c6ff72
HZ
89102011-02-21 Hui Zhu <teawater@gmail.com>
8911
8912 * tracepoint.c (tp_printf): New function.
8913 (eval_agent_expr): Handle gdb_agent_op_printf.
8914
94d5e490
TT
89152011-02-18 Tom Tromey <tromey@redhat.com>
8916
8917 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8918 (tracepoint.o): Likewise.
8919 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8920 (gdb_agent_op_names): Likewise.
8921
c7f96d2b
TT
89222011-02-18 Tom Tromey <tromey@redhat.com>
8923
8924 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8925 gdb_agent_op_rot>: New constants.
8926 (gdb_agent_op_names): Add pick and roll.
8927 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8928 cases.
8929
0feedb2c
JK
89302011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8931
8932 * aclocal.m4: Regenerated with aclocal-1.11.1.
8933
b3b9301e
PA
89342011-02-14 Pedro Alves <pedro@codesourcery.com>
8935
8936 * server.c (handle_qxfer_traceframe_info): New.
8937 (qxfer_packets): Register "traceframe-info".
8938 (handle_query): Report support for qXfer:traceframe-info:read+.
8939 * tracepoint.c (match_blocktype): New.
8940 (traceframe_find_block_type): Rename to ...
8941 (traceframe_walk_blocks): ... this. Add callback filter argument,
8942 and use it.
8943 (traceframe_find_block_type): New, reimplemented on top of
8944 traceframe_walk_blocks.
8945 (build_traceframe_info_xml): New.
8946 (traceframe_read_info): New.
8947 * server.h (traceframe_read_info): Declare.
8948
4f3e6fb7
YQ
89492011-02-11 Yao Qi <yao@codesourcery.com>
8950
8951 * configure.ac: Call AC_PROG_RANLIB.
8952 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8953 * configure: Regenerate.
8954
764880b7
PA
89552011-02-07 Pedro Alves <pedro@codesourcery.com>
8956
8957 * server.c (gdb_read_memory): Change return semantics to allow
8958 partial transfers.
8959 (handle_search_memory_1): Adjust.
8960 (process_serial_event) <'m' packet>: Handle partial transfers.
8961 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8962
1c79eb8a
PA
89632011-01-28 Pedro Alves <pedro@codesourcery.com>
8964
8965 * regcache.c (init_register_cache): Initialize
8966 regcache->register_status.
8967 (free_register_cache): Release regcache->register_status.
8968 (regcache_cpy): Copy register_status.
8969 (registers_to_string): Print 'x's for unavailable registers.
8970 (supply_register): Mark the register's status valid or
8971 unavailable, depending on whether a buffer was passed in or not.
8972 (supply_register_zeroed): New.
8973 (supply_regblock): Mark the registers' status valid or
8974 unavailable, depending on whether a buffer was passed in or not.
8975 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8976 (struct regcache): New `register_status' field.
8977 (supply_register_zeroed): Declare.
8978 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8979 supply_register_zeroed, rather than passing a NULL buffer to
8980 supply_register.
8981 * tracepoint.c (fetch_traceframe_registers): Update comment.
8982
85724a0e
PA
89832011-01-28 Pedro Alves <pedro@codesourcery.com>
8984
8985 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8986 buffer explicit.
8987
d08aafef
PA
89882011-01-25 Pedro Alves <pedro@codesourcery.com>
8989
8990 * server.h (decode_xfer_write): Change prototype.
8991 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
8992 and don't extract the annex here.
8993 * server.c (decode_xfer_read): Remove `annex' parameter,
8994 and don't extract the annex here.
8995 (decode_xfer): New.
8996 (struct qxfer): New.
8997 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
8998 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
8999 (handle_qxfer_statictrace): New functions, abstracted out from
9000 handle_query, and made to use the struct qxfer interface.
9001 (handle_threads_qxfer_proper): Rename to ...
9002 (handle_qxfer_threads_proper): ... this.
9003 (handle_threads_qxfer): Rename to ...
9004 (handle_qxfer_threads): ... this. Adjust.
9005 (qxfer_packets): New array.
9006 (handle_qxfer): New function.
9007 (handle_query): Use handle_qxfer.
9008
493e2a69
MS
90092011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9010
9011 * gdbreplay.c: Shorten lines of >= 80 columns.
9012 * linux-low.c: Ditto.
9013 * linux-ppc-low.c: Ditto.
9014 * linux-s390-low.c: Ditto.
9015 * linux-sparc-low.c: Ditto.
9016 * linux-x86-low.c: Ditto.
9017 * linux-xtensa-low.c: Ditto.
9018 * mem-break.c: Ditto.
9019 * nto-low.c: Ditto.
9020 * regcache.h: Ditto.
9021 * remote-utils.c: Ditto.
9022 * server.c: Ditto.
9023 * server.h: Ditto.
9024 * thread-db.c: Ditto.
9025 * tracepoint.c: Ditto.
9026 * utils.c: Ditto.
9027 * win32-low.h: Ditto.
9028
44944448
JB
90292011-01-05 Joel Brobecker <brobecker@adacore.com>
9030
9031 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9032 update.
9033
71ce852c
JB
90342011-01-01 Joel Brobecker <brobecker@adacore.com>
9035
9036 * server.c (gdbserver_version): Update copyright year in version
9037 output.
9038 * gdbreplay.c (gdbreplay_version): Ditto.
9039
eb826dc6
MF
90402010-12-29 Jie Zhang <jie.zhang@analog.com>
9041
9042 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9043 * linux-bfin-low.c: New file.
9044 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9045 PT_DATA_ADDR for BFIN targets.
9046 * Makefile.in (SFILES): Add linux-bfin-low.c.
9047 (clean): Remove reg-bfin.c.
9048 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9049 * README: Mention supported Blackfin targets.
9050
39ab222a
MF
90512010-12-23 Mike Frysinger <vapier@gentoo.org>
9052
9053 * .gitignore: New file.
9054
a1f2ce7d
MF
90552010-11-16 Mike Frysinger <vapier@gentoo.org>
9056
9057 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9058
f474844c
JZ
90592010-10-22 Jie Zhang <jie@codesourcery.com>
9060
9061 * Makefile.in: Add FLAGS_TO_PASS variable.
9062 (install): Remove dependency of install-only and recursively
9063 invoke make for install-only.
9064
f1048712
DE
90652010-10-04 Doug Evans <dje@google.com>
9066
9067 * Makefile.in (uninstall): Use $(DESTDIR).
9068
b53a1623
PA
90692010-09-24 Pedro Alves <pedro@codesourcery.com>
9070
e6ee044d
PA
9071 PR gdb/11842
9072
b53a1623
PA
9073 * linux-x86-low.c (compat_siginfo_from_siginfo)
9074 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9075 si_code is < 0. Check for si_code == SI_TIMER before checking for
9076 si_code < 0.
9077
fa1bd1e4
JB
90782010-09-13 Joel Brobecker <brobecker@adacore.com>
9079
9080 * lynx-i386-low.c: New file.
9081 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9082
47fac8f8
JB
90832010-09-13 Joel Brobecker <brobecker@adacore.com>
9084
9085 * lynx-low.c (ptrace_request_to_str): Remove handling for
9086 request values that have been removed in LynxOS 5.x.
9087
1adfc54d
JB
90882010-09-13 Joel Brobecker <brobecker@adacore.com>
9089
9090 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9091 <ptrace.h>
9092
c2a66c29
NS
90932010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9094
9095 * configure.ac: Add --enable-inprocess-agent option.
9096 * configure: Rebuilt.
9097
32fcada3
YQ
90982010-09-06 Yao Qi <yao@codesourcery.com>
9099
9100 * linux-low.c (linux_kill): Remove unused variable.
9101 (linux_stabilize_threads): Likewise.
9102 * server.c (start_inferior): Likewise.
9103 (queue_stop_reply_callback): Likewise.
9104 * tracepoint.c (do_action_at_tracepoint): Likewise.
9105
0cccb683
YQ
91062010-09-06 Yao Qi <yao@codesourcery.com>
9107
9108 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9109 on return.
9110
423ec54c
JK
91112010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9112
9113 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9114
12ac6819
PA
91152010-09-06 Pedro Alves <pedro@codesourcery.com>
9116
9117 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9118 "$(IPA_DEPFILES)".
9119
8ed54b31
JB
91202010-09-01 Joel Brobecker <brobecker@adacore.com>
9121
9122 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9123 gdbserver/lynx-ppc-low.c: New files.
9124 * Makefile.in (lynx_low_h): New variable.
9125 (lynx-low.o, lynx-ppc-low.o): New rules.
9126 * configure.ac: On LynxOS, link with -lnetinet.
9127 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9128 * configure: regenerate.
9129
bb0116a4
JB
91302010-09-01 Joel Brobecker <brobecker@adacore.com>
9131
9132 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9133 * configure.ac: Add check for vasprintf and vsnprintf.
9134 * configure, config.in: Regenerate.
9135 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9136
a778ab81 91372010-09-01 Joel Brobecker <brobecker@adacore.com>
9138
9139 * gdbreplay.c: Move include of alloca.h up, next to include of
9140 malloc.h.
9141 * server.h: Add include of malloc.h.
9142 * mem-break.c: Remove include of malloc.h.
9143 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9144
8b034a19 91452010-09-01 Joel Brobecker <brobecker@adacore.com>
9146
9147 * Makefile.in (memmem.o): Build with -Wno-error.
9148
91492010-09-01 Joel Brobecker <brobecker@adacore.com>
9150
9151 * utils.c (xsnprintf): Make non-static.
9152 * server.h: Add xsnprintf declaration.
9153 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9154 replace calls to snprintf by calls to xsnprintf throughout.
9155
91562010-09-01 Joel Brobecker <brobecker@adacore.com>
9157
9158 * configure.ac: Add configure check for alloca.
9159 * configure, config.in: Regenerate.
9160 * server.h: Include alloca.h if it exists.
9161 * gdbreplay.c: Include alloca.h if it exists.
9162
1a981360
PA
91632010-08-28 Pedro Alves <pedro@codesourcery.com>
9164
9165 * linux-low.c (__SIGRTMIN): Define if not already defined.
9166 (linux_create_inferior): Check for __ANDROID__ rather than
9167 __SIGRTMIN.
9168 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9169 are already deferred.
9170 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9171 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9172 stopped and already has a pending signal to report.
9173 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9174 a pending signal to report or is moving out of a jump pad.
9175 (linux_init_signals): Check for __ANDROID__ rather than
9176 __SIGRTMIN.
9177
b4d51a55
PA
91782010-08-28 Pedro Alves <pedro@codesourcery.com>
9179
9180 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9181 debug_threads check. Avoid a linear search when not doing debug
9182 output.
9183
ec48365d
PA
91842010-08-27 Pedro Alves <pedro@codesourcery.com>
9185
9186 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9187 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9188 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9189 (process_event): Change local fd's type to gdb_fildes_t.
9190 (create_file_handler): Adjust prototype.
9191 (delete_file_handler): Adjust prototype.
9192 (handle_file_event): Adjust prototype. Use pfildes.
9193 (create_file_event): Adjsut prototype.
9194 * remote-utils.c (remote_desc, listen_desc): Change type to
9195 gdb_fildes_t.
9196 * server.h: New gdb_fildes_t typedef.
9197 [USE_WIN32API]: Include winsock2.h.
9198 (delete_file_handler, add_file_handler): Adjust prototypes.
9199 (pfildes): Declare.
9200 * utils.c (pfildes): New.
9201
854d88f0
PA
92022010-08-27 Pedro Alves <pedro@codesourcery.com>
9203
9204 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9205 * configure: Regenerate.
9206
0146f85b
PA
92072010-08-27 Pedro Alves <pedro@codesourcery.com>
9208
9209 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9210 (linux_done_accessing_memory): ... this.
9211 (linux_target_ops): Adjust.
9212 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9213 * nto-low.c (nto_target_ops): Adjust comment.
9214 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9215 * spu-low.c (spu_target_ops): Adjust comment.
9216 * target.h (target_ops): Rename unprepare_to_access_memory field
9217 to done_accessing_memory.
9218 (unprepare_to_access_memory): Rename to ...
9219 (done_accessing_memory): ... this.
9220
90d74c30
PA
92212010-08-26 Pedro Alves <pedro@codesourcery.com>
9222
9223 * linux-low.c (linux_prepare_to_access_memory): New.
9224 (linux_unprepare_to_access_memory): New.
9225 (linux_target_ops): Install them.
9226 * server.c (read_memory): Rename to ...
9227 (gdb_read_memory): ... this. Use
9228 prepare_to_access_memory/prepare_to_access_memory.
9229 (write_memory): Rename to ...
9230 (gdb_write_memory): ... this. Use
9231 prepare_to_access_memory/prepare_to_access_memory.
9232 (handle_search_memory_1): Adjust.
9233 (process_serial_event): Adjust.
9234 * target.h (struct target_ops): New fields
9235 prepare_to_access_memory and unprepare_to_access_memory.
9236 (prepare_to_access_memory, unprepare_to_access_memory): New.
9237 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9238 prepare_to_access_memory/prepare_to_access_memory.
9239 * nto-low.c (nto_target_ops): Adjust.
9240 * spu-low.c (spu_target_ops): Adjust.
9241 * win32-low.c (win32_target_ops): Adjust.
9242
fd467969
PA
92432010-08-26 Pedro Alves <pedro@codesourcery.com>
9244
9245 * Makefile.in (WARN_CFLAGS): Get it from configure.
9246 (WERROR_CFLAGS): New.
9247 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9248 * configure.ac: Introduce --enable-werror, which adds -Werror to
9249 the compiler command line. Enabled by default. Disable with
9250 --disable-werror. Add -Wdeclaration-after-statement
9251 Wpointer-arith and -Wformat-nonliteral to warning flags.
9252 * configure: Regenerate.
9253
331e2f5f
PA
92542010-08-26 Pedro Alves <pedro@codesourcery.com>
9255
9256 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9257
e581f2b4
PA
92582010-08-26 Pedro Alves <pedro@codesourcery.com>
9259
9260 * gdbreplay.c (remote_error): New.
9261 (gdbchar): New.
9262 (expect): Use gdbchar. Check for error reading from GDB.
9263 Clarify sync error output.
9264 (play): Check for errors writing to GDB.
9265 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9266 * remote-utils.c (getpkt): Check for errors writing to the remote
9267 descriptor.
9268
3c11dd79
PA
92692010-08-25 Pedro Alves <pedro@codesourcery.com>
9270
9271 * linux-low.c (linux_wait_1): Move non-debugging code out of
9272 `debug_threads' control.
9273
d20a8ad9
PA
92742010-08-25 Pedro Alves <pedro@codesourcery.com>
9275
9276 * linux-low.c (linux_wait_1): Don't set last_status here.
9277 * server.c (push_event, queue_stop_reply_callback): Assert we're
9278 not pushing a TARGET_WAITKIND_IGNORE event.
9279 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9280 (myresume, handle_target_event): Set the thread's last_resume_kind
9281 and last_status from the target returned status.
9282
964e4306
PA
92832010-08-25 Pedro Alves <pedro@codesourcery.com>
9284
9285 PR threads/10729
9286
9287 * linux-x86-low.c (update_debug_registers_callback): New.
9288 (i386_dr_low_set_addr): Use it.
9289 (i386_dr_low_get_addr): New.
9290 (i386_dr_low_set_control): Use update_debug_registers_callback.
9291 (i386_dr_low_get_control): New.
9292 (i386_dr_low_get_status): Adjust.
9293 * linux-low.c (linux_stop_lwp): New.
9294 * linux-low.h (linux_stop_lwp): Declare.
9295
9296 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9297 argument instead of a i386_debug_reg_state.
9298 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9299 a i386_debug_reg_state.
9300 (i386_insert_aligned_watchpoint): Adjust.
9301 (i386_remove_aligned_watchpoint): Adjust.
9302 (i386_low_stopped_data_address): Read the debug registers from the
9303 inferior instead of from the mirrors.
9304 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9305 (i386_dr_low_get_addr): Declare.
9306 (i386_dr_low_get_control): Declare.
9307 (i386_dr_low_get_status): Change prototype.
9308
9309 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9310 (i386_dr_low_get_addr): New.
9311 (i386_dr_low_get_control): New.
9312 (i386_dr_low_get_status): Adjust prototype. Return
9313 dr_status_mirror.
9314 (i386_initial_stuff): Clear dr_status_mirror and
9315 dr_control_mirror.
9316 (i386_get_thread_context): Adjust.
9317 (i386_set_thread_context): Adjust.
9318 (i386_thread_added): Adjust.
9319
5f21a75b
PA
93202010-08-24 Pedro Alves <pedro@codesourcery.com>
9321
9322 * linux-low.h (linux_thread_area): Delete declaration.
9323
3e4c1235
TS
93242010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9325
9326 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9327 after its termination.
9328
1971b033
PA
93292010-08-09 Pedro Alves <pedro@codesourcery.com>
9330
9331 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9332 (gdb_wants_all_stopped): Delete.
9333 (linux_wait_1): Don't call them.
9334 * server.c (handle_v_cont): Tag all threads as want-stopped.
9335 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9336 stopped as "client-wants-stopped".
9337
310444ac
PA
93382010-07-31 Pedro Alves <pedro@codesourcery.com>
9339
9340 * Makefile.in (signals_h): New.
9341 (server_h): Depend on it.
9342 (server.o): Don't depend on $(signals_def).
9343 (signals.o): Depend on $(signals_def).
9344
a19cae16
JK
93452010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9346
9347 * Makefile.in (signals_def): New.
9348 (server_h): Append include/gdb/signals.h and signals_def.
9349 (server.o): Append signals_def.
9350
30d50328
JK
93512010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9352
9353 * server.c (handle_target_event): Use target_signal_to_host for
9354 resume_info.sig initialization.
9355 * target.h (struct thread_resume) <sig>: New comment.
9356
5c3216e2
OS
93572010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9358
c6f46ca0
OS
9359 * server.c (handle_query): strcpy() the returned string from paddress()
9360 instead of sprintf().
5c3216e2
OS
9361 * utils.c (paddress): Return phex_nz().
9362
6bd31874
JB
93632010-07-07 Joel Brobecker <brobecker@adacore.com>
9364
9365 * server.c (handle_v_cont): Call mourn_inferior if process
9366 just exited.
9367 (myresume): Likewise.
9368
0fb4aa4b
PA
93692010-07-01 Pedro Alves <pedro@codesourcery.com>
9370
9371 Static tracepoints, and integration with UST.
9372
9373 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9374 * mem-break.c (uninsert_all_breakpoints)
9375 (reinsert_all_breakpoints): New.
9376 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9377 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9378 (gdb_agent_ust_loaded, helper_thread_id)
9379 (gdb_agent_helper_thread_id): New macros.
9380 (struct ipa_sym_addresses): Add addr_ust_loaded,
9381 addr_helper_thread_id, addr_cmd_buf.
9382 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9383 (in_process_agent_loaded_ust): New.
9384 (write_e_ust_not_loaded): New.
9385 (maybe_write_ipa_ust_not_loaded): New.
9386 (struct collect_static_trace_data_action): New.
9387 (enum tracepoint_type) <static_tracepoint>: New.
9388 (struct tracepoint) <handle>: Mention static tracepoints.
9389 (struct static_tracepoint_ctx): New.
9390 (CMD_BUF_SIZE): New.
9391 (add_tracepoint_action): Handle static tracepoint actions.
9392 (unprobe_marker_at): New.
9393 (clear_installed_tracepoints): Handle static tracepoints.
9394 (cmd_qtdp): Handle static tracepoints.
9395 (probe_marker_at): New.
9396 (cmd_qtstart): Handle static tracepoints.
9397 (response_tracepoint): Handle static tracepoints.
9398 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9399 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9400 (get_context_regcache): Handle static tracepoints.
9401 (do_action_at_tracepoint): Handle static tracepoint actions.
9402 (traceframe_find_block_type): Handle static trace data blocks.
9403 (traceframe_read_sdata): New.
9404 (download_tracepoints): Download static tracepoint actions.
9405 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9406 (GDB_PROBE_NAME): New.
9407 (ust_ops): New.
9408 (GET_UST_SYM): New.
9409 (USTF): New.
9410 (dlsym_ust): New.
9411 (ust_marker_to_static_tracepoint): New.
9412 (gdb_probe): New.
9413 (collect_ust_data_at_tracepoint): New.
9414 (gdb_ust_probe): New.
9415 (UNIX_PATH_MAX, SOCK_DIR): New.
9416 (gdb_ust_connect_sync_socket): New.
9417 (resume_thread, stop_thread): New.
9418 (run_inferior_command): New.
9419 (init_named_socket): New.
9420 (gdb_ust_socket_init): New.
9421 (cstr_to_hexstr): New.
9422 (next_st): New.
9423 (first_marker, next_marker): New.
9424 (response_ust_marker): New.
9425 (cmd_qtfstm, cmd_qtsstm): New.
9426 (unprobe_marker_at, probe_marker_at): New.
9427 (cmd_qtstmat, gdb_ust_thread): New.
9428 (gdb_ust_init): New.
9429 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9430 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9431 (ST_REGENTRY): New.
9432 (x86_64_st_collect_regmap): New.
9433 (X86_64_NUM_ST_COLLECT_GREGS): New.
9434 (AMD64_RIP_REGNUM): New.
9435 (supply_static_tracepoint_registers): New.
9436 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9437 (ST_REGENTRY): New.
9438 (i386_st_collect_regmap): New.
9439 (i386_NUM_ST_COLLECT_GREGS): New.
9440 (supply_static_tracepoint_registers): New.
9441 * server.c (handle_query): Handle qXfer:statictrace:read.
9442 <qSupported>: Report support for StaticTracepoints, and
9443 qXfer:statictrace:read features.
9444 * server.h (traceframe_read_sdata)
9445 (supply_static_tracepoint_registers): Declare.
9446 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9447 (unpack_varlen_hex): Include in IPA build.
9448 * Makefile.in (ustlibs, ustinc): New.
9449 (IPA_OBJS): Add remote-utils-ipa.o.
9450 ($(IPA_LIB)): Link -ldl and -lpthread.
9451 (UST_CFLAGS): New.
9452 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9453 * config.in, configure: Regenerate.
9454
9e4344e5
PA
94552010-06-20 Ian Lance Taylor <iant@google.com>
9456 Pedro Alves <pedro@codesourcery.com>
9457
9458 * linux-x86-low.c (always_true): Delete.
9459 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9460 trying to fool the compiler with always_true.
9461
c6beb2cb
PA
94622010-06-20 Pedro Alves <pedro@codesourcery.com>
9463
9464 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9465 conditions in gdbserver.
9466
d2ed6730
UW
94672010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9468
9469 * spu-low.c (spu_read_memory): Wrap around local store limit.
9470 (spu_write_memory): Likewise.
9471
4e29fb54
PA
94722010-06-15 Pedro Alves <pedro@codesourcery.com>
9473
9474 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9475 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9476 LONGEST uses.
9477 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9478 uses.
9479 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9480 uses with LONGEST uses.
9481
6a271cae
PA
94822010-06-14 Stan Shebs <stan@codesourcery.com>
9483 Pedro Alves <pedro@codesourcery.com>
9484
9485 Bytecode compiler.
9486
9487 * linux-x86-low.c: Include limits.h.
9488 (add_insns): New.
9489 (always_true): New.
9490 (EMIT_ASM): New.
9491 (EMIT_ASM32): New.
9492 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9493 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9494 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9495 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9496 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9497 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9498 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9499 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9500 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9501 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9502 (amd64_emit_void_call_2): New.
9503 (amd64_emit_ops): New.
9504 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9505 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9506 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9507 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9508 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9509 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9510 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9511 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9512 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9513 (i386_emit_stack_adjust, i386_emit_int_call_1)
9514 (i386_emit_void_call_2): New.
9515 (i386_emit_ops): New.
9516 (x86_emit_ops): New.
9517 (the_low_target): Install x86_emit_ops.
9518 * server.h (struct emit_ops): New.
9519 (get_raw_reg_func_addr): Declare.
9520 (current_insn_ptr, emit_error): Declare.
9521 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9522 (set_trace_state_variable_value): New defines.
9523 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9524 addr_get_trace_state_variable_value and
9525 addr_set_trace_state_variable_value.
9526 (symbol_list): New fields for get_raw_reg,
9527 get_trace_state_variable_value and set_trace_state_variable_value.
9528 (condfn): New typedef.
9529 (struct tracepoint): New field `compiled_cond'.
9530 (do_action_at_tracepoint): Clear compiled_cond.
9531 (get_trace_state_variable_value, set_trace_state_variable_value):
9532 Export in the IPA.
9533 (condition_true_at_tracepoint): If there's a compiled condition,
9534 run that.
9535 (current_insn_ptr, emit_error): New globals.
9536 (struct bytecode_address): New.
9537 (get_raw_reg_func_addr): New.
9538 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9539 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9540 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9541 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9542 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9543 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9544 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9545 (compile_tracepoint_condition, compile_bytecodes): New.
9546 * target.h (emit_ops): Forward declare.
9547 (struct target_ops): New field emit_ops.
9548 (target_emit_ops): New.
9549 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9550 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9551 * linux-low.c (linux_emit_ops): New.
9552 (linux_target_ops): Install it.
9553 * linux-low.h (struct linux_target_ops): New field emit_ops.
9554
92b72907
UW
95552010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9556
9557 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9558 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9559
fa593d66
PA
95602010-06-01 Pedro Alves <pedro@codesourcery.com>
9561 Stan Shebs <stan@codesourcery.com>
9562
9563 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9564 (all): Depend on $(extra_libraries).
9565 (install-only): Install the IPA.
9566 (IPA_OBJS, IPA_LIB): New.
9567 (clean): Remove the IPA lib.
9568 (IPAGENT_CFLAGS): New.
9569 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9570 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9571 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9572 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9573 * configure.ac: Check for atomic builtins support in the compiler.
9574 (IPA_DEPFILES, extra_libraries): Define.
9575 * configure.srv (ipa_obj): Add description.
9576 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9577 (i[34567]86-*-linux*): Set ipa_obj.
9578 (x86_64-*-linux*): Set ipa_obj.
9579 * linux-low.c (stabilizing_threads): New.
9580 (supports_fast_tracepoints): New.
9581 (linux_detach): Stabilize threads before detaching.
9582 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9583 the lwp is either not stabilizing, or is moving out of a jump pad.
9584 (linux_fast_tracepoint_collecting): New.
9585 (maybe_move_out_of_jump_pad): New.
9586 (enqueue_one_deferred_signal): New.
9587 (dequeue_one_deferred_signal): New.
9588 (linux_wait_for_event_1): If moving out of a jump pad, defer
9589 pending signals to later.
9590 (linux_stabilize_threads): New.
9591 (linux_wait_1): Check if threads need moving out of jump pads, and
9592 do it if so.
9593 (stuck_in_jump_pad_callback): New.
9594 (move_out_of_jump_pad_callback): New.
9595 (lwp_running): New.
9596 (linux_resume_one_lwp): Handle moving out of jump pads.
9597 (linux_set_resume_request): Dequeue deferred signals.
9598 (need_step_over_p): Also step over fast tracepoint jumps.
9599 (start_step_over): Also uninsert fast tracepoint jumps.
9600 (finish_step_over): Also reinsert fast tracepoint jumps.
9601 (linux_install_fast_tracepoint_jump): New.
9602 (linux_target_ops): Install linux_stabilize_threads and
9603 linux_install_fast_tracepoint_jump_pad.
9604 * linux-low.h (linux_target_ops) <get_thread_area,
9605 install_fast_tracepoint_jump_pad>: New fields.
9606 (struct lwp_info) <collecting_fast_tracepoint,
9607 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9608 (linux_get_thread_area): Declare.
9609 * linux-x86-low.c (jump_insn): New.
9610 (x86_get_thread_area): New.
9611 (append_insns): New.
9612 (push_opcode): New.
9613 (amd64_install_fast_tracepoint_jump_pad): New.
9614 (i386_install_fast_tracepoint_jump_pad): New.
9615 (x86_install_fast_tracepoint_jump_pad): New.
9616 (the_low_target): Install x86_get_thread_area and
9617 x86_install_fast_tracepoint_jump_pad.
9618 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9619 (struct fast_tracepoint_jump): New.
9620 (fast_tracepoint_jump_insn): New.
9621 (fast_tracepoint_jump_shadow): New.
9622 (find_fast_tracepoint_jump_at): New.
9623 (fast_tracepoint_jump_here): New.
9624 (delete_fast_tracepoint_jump): New.
9625 (set_fast_tracepoint_jump): New.
9626 (uninsert_fast_tracepoint_jumps_at): New.
9627 (reinsert_fast_tracepoint_jumps_at): New.
9628 (set_breakpoint_at): Use write_inferior_memory.
9629 (uninsert_raw_breakpoint): Use write_inferior_memory.
9630 (check_mem_read): Mask out fast tracepoint jumps.
9631 (check_mem_write): Mask out fast tracepoint jumps.
9632 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9633 (set_fast_tracepoint_jump): Declare.
9634 (delete_fast_tracepoint_jump)
9635 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9636 (reinsert_fast_tracepoint_jumps_at): Declare.
9637 * regcache.c: Don't compile many functions when building the
9638 in-process agent library.
9639 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9640 the register buffer in the heap.
9641 (free_register_cache): If the register buffer isn't owned by the
9642 regcache, don't free it.
9643 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9644 pre-existing register caches.
9645 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9646 type.
9647 (convert_ascii_to_int): : Constify `from' parameter type.
9648 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9649 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9650 the needed buffer in-place.
9651 (relocate_instruction): New.
9652 * server.c (handle_query) <qSymbols>: If the target supports
9653 tracepoints, give it a chance of looking up symbols. Report
9654 support for fast tracepoints.
9655 (handle_status): Stabilize threads.
9656 (process_serial_event): Adjust.
9657 * server.h (struct fast_tracepoint_jump): Forward declare.
9658 (struct process_info) <fast_tracepoint_jumps>: New field.
9659 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9660 (decode_X_packet, decode_M_packet): Adjust.
9661 (relocate_instruction): Declare.
9662 (in_process_agent_loaded): Declare.
9663 (tracepoint_look_up_symbols): Declare.
9664 (struct fast_tpoint_collect_status): Declare.
9665 (fast_tracepoint_collecting): Declare.
9666 (force_unlock_trace_buffer): Declare.
9667 (handle_tracepoint_bkpts): Declare.
9668 (initialize_low_tracepoint)
9669 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9670 * target.h (struct target_ops) <stabilize_threads,
9671 install_fast_tracepoint_jump_pad>: New fields.
9672 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9673 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9674 [HAVE_STDINT_H]: Include stdint.h.
9675 (trace_debug_1): Rename to ...
9676 (trace_vdebug): ... this.
9677 (trace_debug): Rename to ...
9678 (trace_debug_1): ... this. Add `level' parameter.
9679 (trace_debug): New.
9680 (ATTR_USED, ATTR_NOINLINE): New.
9681 (IP_AGENT_EXPORT): New.
9682 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9683 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9684 (about_to_request_buffer_space, trace_buffer_is_full)
9685 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9686 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9687 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9688 (traceframe_write_count, traceframes_created)
9689 (trace_state_variables)
9690 New renaming defines.
9691 (struct ipa_sym_addresses): New.
9692 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9693 (symbol_list): New.
9694 (ipa_sym_addrs): New.
9695 (all_tracepoint_symbols_looked_up): New.
9696 (in_process_agent_loaded): New.
9697 (write_e_ipa_not_loaded): New.
9698 (maybe_write_ipa_not_loaded): New.
9699 (tracepoint_look_up_symbols): New.
9700 (debug_threads) [IN_PROCESS_AGENT]: New.
9701 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9702 (UNKNOWN_SIDE_EFFECTS): New.
9703 (stop_tracing): New.
9704 (flush_trace_buffer): New.
9705 (stop_tracing_bkpt): New.
9706 (flush_trace_buffer_bkpt): New.
9707 (read_inferior_integer): New.
9708 (read_inferior_uinteger): New.
9709 (read_inferior_data_pointer): New.
9710 (write_inferior_data_pointer): New.
9711 (write_inferior_integer): New.
9712 (write_inferior_uinteger): New.
9713 (struct collect_static_trace_data_action): Delete.
9714 (enum tracepoint_type): New.
9715 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
9716 <actions_str, step_actions, step_actions_str>: Only include in
9717 GDBserver.
fa593d66
PA
9718 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9719 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9720 (tracepoints): Use IP_AGENT_EXPORT.
9721 (last_tracepoint): Don't include in the IPA.
9722 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9723 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9724 (alloced_trace_state_variables): New.
9725 (trace_state_variables): Use IP_AGENT_EXPORT.
9726 (traceframe_t): Delete unused variable.
9727 (circular_trace_buffer): Don't include in the IPA.
9728 (trace_buffer_start): Delete.
9729 (struct trace_buffer_control): New.
9730 (trace_buffer_free): Delete.
9731 (struct ipa_trace_buffer_control): New.
9732 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9733 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9734 New.
9735 (trace_buffer_ctrl): New.
9736 (TRACE_BUFFER_CTRL_CURR): New.
9737 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9738 Reimplement as macros.
9739 (trace_buffer_wrap): Delete.
9740 (traceframe_write_count, traceframe_read_count)
9741 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9742 (struct tracepoint_hit_ctx) <type>: New field.
9743 (struct fast_tracepoint_ctx): New.
9744 (memory_barrier): New.
9745 (cmpxchg): New.
9746 (record_tracepoint_error): Update atomically in the IPA.
9747 (clear_inferior_trace_buffer): New.
9748 (about_to_request_buffer_space): New.
9749 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9750 updating the same buffer.
9751 (add_tracepoint): Default the tracepoint's type to trap
9752 tracepoint, and orig_size to -1.
9753 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9754 internal variables.
9755 (create_trace_state_variable): New parameter `gdb'. Handle it.
9756 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9757 (cmd_qtdp): Handle fast tracepoints.
9758 (cmd_qtdv): Adjust.
9759 (max_jump_pad_size): New.
9760 (gdb_jump_pad_head): New.
9761 (get_jump_space_head): New.
9762 (claim_jump_space): New.
9763 (sort_tracepoints): New.
9764 (MAX_JUMP_SIZE): New.
9765 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9766 IPA.
9767 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9768 support. Upload fast traceframes, and delete internal IPA
9769 breakpoints.
9770 (stop_tracing_handler): New.
9771 (flush_trace_buffer_handler): New.
9772 (cmd_qtstop): Upload fast tracepoints.
9773 (response_tracepoint): Handle fast tracepoints.
9774 (tracepoint_finished_step): Upload fast traceframes. Set the
9775 tracepoint hit context's tracepoint type.
9776 (handle_tracepoint_bkpts): New.
9777 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9778 type. Add comment about fast tracepoints.
9779 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9780 non-existing action_str field.
9781 (get_context_regcache): Handle fast tracepoints.
9782 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9783 to the regcache.
9784 (fast_tracepoint_from_jump_pad_address): New.
9785 (fast_tracepoint_from_ipa_tpoint_address): New.
9786 (collecting_t): New.
9787 (force_unlock_trace_buffer): New.
9788 (fast_tracepoint_collecting): New.
9789 (collecting): New.
9790 (gdb_collect): New.
9791 (write_inferior_data_ptr): New.
9792 (target_tp_heap): New.
9793 (target_malloc): New.
9794 (download_agent_expr): New.
9795 (UALIGN): New.
9796 (download_tracepoints): New.
9797 (download_trace_state_variables): New.
9798 (upload_fast_traceframes): New.
9799 (IPA_FIRST_TRACEFRAME): New.
9800 (IPA_NEXT_TRACEFRAME_1): New.
9801 (IPA_NEXT_TRACEFRAME): New.
9802 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9803 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9804 (gdb_jump_pad_buffer_end): New.
9805 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9806 (initialize_tracepoint): Adjust.
9807 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9808 buffer. Initialize the low module.
9809 * utils.c (PREFIX, TOOLNAME): New.
9810 (malloc_failure): Use PREFIX.
9811 (error): In the IPA, an error causes an exit.
9812 (fatal, warning): Use PREFIX.
9813 (internal_error): Use TOOLNAME.
9814 (NUMCELLS): Increase to 10.
9815 * configure, config.in: Regenerate.
9816
d149dd1d
PA
98172010-06-01 Pedro Alves <pedro@codesourcery.com>
9818
9819 * server.c (handle_query) <qSupported>: Do two passes over the
9820 qSupported string to avoid nesting strtok.
9821
f6528abd
JK
98222010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9823
9824 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9825 (CDEPS): New.
9826 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9827 -Wl,--dynamic-list.
9828 * configure: Regenerate.
9829 * proc-service.list: New.
9830
ca2a87a0
JK
98312010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9832
9833 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9834 New comment.
9835
363a6e9f
OS
98362010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9837
9838 * gdbreplay.c (remote_open): Check error return from socket() call by
9839 its equality to -1 not by it being negative.
9840 * remote-utils.c (remote_open): Likewise.
9841
d23b6cb1
PA
98422010-05-23 Pedro Alves <pedro@codesourcery.com>
9843
9844 * config.h: Regenerate.
9845
28d3cf85
MK
98462010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9847
9848 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9849 doesn't provide PTRACE_GET_THREAD_AREA.
9850
fea36a59
MK
98512010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9852
9853 * linux-m68k-low.c: Include <asm/ptrace.h>
9854 (ps_get_thread_area): Implement.
9855
24b066ba
DE
98562010-05-03 Doug Evans <dje@google.com>
9857
9858 * event-loop.c (struct callback_event): New struct.
9859 (callback_list): New global.
9860 (append_callback_event, delete_callback_event): New functions.
9861 (process_callback): New function.
9862 (start_event_loop): Call it.
9863 * remote-utils.c (NOT_SCHEDULED): Define.
9864 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9865 moved out of readchar.
9866 (readchar): Rewrite. Call reschedule before returning.
9867 (reset_readchar): New function.
9868 (remote_close): Call it.
9869 (process_remaining, reschedule): New functions.
9870 * server.h (callback_handler_func): New typedef.
9871 (append_callback_event, delete_callback_event): Declare.
9872
9836d6ea
PA
98732010-05-03 Pedro Alves <pedro@codesourcery.com>
9874
9875 * proc-service.c (ps_pglobal_lookup): Use
9876 thread_db_look_up_one_symbol.
9877 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9878 parameter. Use it instead of all_symbols_looked_up.
9879 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9880 field.
9881 (all_symbols_looked_up): Don't declare.
9882 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9883 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9884 field.
9885 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9886 Set all_symbols_looked_up here.
9887 (thread_db_look_up_one_symbol): New.
9888 (thread_db_get_tls_address): Adjust.
9889 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9890 thread_db object on the heap, and tentatively set it in the
9891 process structure.
9892 (thread_db_init): Don't set all_symbols_looked_up here.
9893 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9894
7984d532
PA
98952010-05-03 Pedro Alves <pedro@codesourcery.com>
9896
9897 * linux-low.c (linux_kill, linux_detach): Adjust.
9898 (status_pending_p_callback): Remove redundant statement. Check
9899 for !TARGET_WAITIKIND_IGNORE, instead of
9900 TARGET_WAITKIND_STOPPED.
9901 (handle_tracepoints): Make sure LWP is locked. Adjust.
9902 (linux_wait_for_event_1): Adjust.
9903 (linux_cancel_breakpoints): New.
9904 (unsuspend_one_lwp): New.
9905 (unsuspend_all_lwps): New.
9906 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9907 (send_sigstop_callback): Change return type to int, add new
9908 `except' parameter and handle it.
9909 (suspend_and_send_sigstop_callback): New.
9910 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9911 pass them down. If SUSPEND, also increment the lwp's suspend
9912 count.
9913 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9914 (need_step_over_p): Don't consider suspended LWPs.
9915 (start_step_over): Adjust.
9916 (proceed_one_lwp): Change return type to int, add new `except'
9917 parameter and handle it.
9918 (unsuspend_and_proceed_one_lwp): New.
9919 (proceed_all_lwps): Use find_inferior instead of
9920 for_each_inferior.
9921 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9922 also decrement the suspend count of LWPs. Pass `except' down,
9923 instead of hacking its suspend count.
9924 (linux_pause_all): Add `freeze' parameter. Adjust.
9925 (linux_unpause_all): New.
9926 (linux_target_ops): Install linux_unpause_all.
9927 * server.c (handle_status): Adjust.
9928 * target.h (struct target_ops): New fields `unpause_all' and
9929 `cancel_breakpoints'. Add new parameter to `pause_all'.
9930 (pause_all): Add new `freeze' parameter.
9931 (unpause_all): New.
9932 (cancel_breakpoints): New.
9933 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9934 cancel breakpoints.
9935 (cmd_qtstart): Pause threads.
9936 (stop_tracing): Pause threads, and cancel breakpoints.
9937 * win32-low.c (win32_target_ops): Adjust.
9938
e471f25b
PA
99392010-05-03 Pedro Alves <pedro@codesourcery.com>
9940
9941 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9942 the inferior right away from here...
9943 (linux_wait_1): ... to here, and adjust to check the thread's
9944 last_resume_kind instead of the lwp's step or stop_expected flags.
9945
1915ef4f
PA
99462010-05-02 Pedro Alves <pedro@codesourcery.com>
9947
9948 * README: Use consistent `GDB' and `GDBserver' spellings.
9949
f9e39928
PA
99502010-05-02 Pedro Alves <pedro@codesourcery.com>
9951
9952 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9953 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
9954 (linux_detach_one_lwp): Assume the lwp is stopped.
9955 (any_thread_of): Delete.
9956 (linux_detach): Stop all lwps here. Don't blindly delete all
9957 breakpoints.
9958 (delete_lwp_callback): New.
9959 (linux_mourn): Delete all lwps of the process that is gone.
9960 (linux_wait_1): Don't delete the last lwp of the process here.
9961 * mem-break.h (mark_breakpoints_out): Declare.
9962 * mem-break.c (mark_breakpoints_out): New.
9963 (free_all_breakpoints): Use it.
9964 * server.c (handle_target_event): If the process is gone, mark
9965 breakpoints out.
9966 * thread-db.c (struct thread_db) <create_bp>: New field.
9967 (thread_db_enable_reporting): Fix prototype. Store a thread event
9968 breakpoint reference in the thread_db struct.
9969 (thread_db_load_search): Clear the thread_db object.
9970 (try_thread_db_load_1): Ditto.
9971 (switch_to_process): New.
9972 (disable_thread_event_reporting): Use it.
9973 (remove_thread_event_breakpoints): New.
9974 (thread_db_detach, thread_db_mourn): Use it.
9975
1e7fc18c
PA
99762010-05-01 Pedro Alves <pedro@codesourcery.com>
9977
9978 * linux-low.c (linux_enable_event_reporting): New.
9979 (linux_wait_for_event_1, handle_extended_wait): Use it.
9980
02fc4de7
PA
99812010-04-30 Pedro Alves <pedro@codesourcery.com>
9982
9983 * linux-low.c (linux_kill_one_lwp, linux_kill)
9984 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9985 (send_sigstop): Take an lwp_info as parameter instead. Queue a
9986 SIGSTOP even if the LWP is stopped.
9987 (send_sigstop_callback): New.
9988 (stop_all_lwps): Use send_sigstop_callback instead.
9989 (linux_resume_one_thread): Adjust.
9990 (proceed_one_lwp): Still proceed an LWP that the client has
9991 requested to stop, if we haven't reported it as stopped yet. Make
9992 sure that LWPs the client want stopped, have a pending SIGSTOP.
9993
bc3b5632
DE
99942010-04-26 Doug Evans <dje@google.com>
9995
ae1ada35
DE
9996 * server.c (handle_general_set): Make static.
9997
bc3b5632
DE
9998 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
9999 Print received char after testing for error/eof instead of before.
10000 (input_interrupt): Tweak comment.
10001
65730243
DE
100022010-04-23 Doug Evans <dje@google.com>
10003
10004 * server.c (start_inferior): Print inferior argv if --debug.
10005
a8ae7dc0
AR
100062010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10007
10008 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10009 * nto-x86-low.c: Include server.h
10010
1c07cc19
PM
100112010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10012
10013 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10014 be consistent with other sources of this directory.
10015 (init_registers_amd64): Correct name of source file of this function
10016 in the comment.
10017
e0a61e09
PM
100182010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10019
10020 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10021 64-bit executables.
10022
54709339
PM
100232010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10024
10025 * win32-i386-low.c: Add 64-bit support.
10026 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10027 (init_registers_amd64): Declare.
10028 (mappings): Add 64-bit version of array.
10029 (init_windows_x86): New function.
10030 (the_low_target): Change init_arch field to init_windows_x86.
10031
e8f0053d
PM
100322010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10033
10034 * win32-low.c: Adapt to support also 64-bit architecture.
10035 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10036 (get_image_name): Use SIZE_T type for local variable `done'.
10037 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10038 (toolhelp_get_dll_name): Idem.
10039 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10040 Use uintptr_t typecast to avoid warning.
10041 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10042 (handle_exception): Use phex_nz to avoid warning.
10043 (win32_wait): Remove unused local variable `process'.
10044
c481e77e
PM
100452010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10046
10047 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10048 `amd64-avx.o'.
10049
12ea4b69
PM
100502010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10051
10052 * configure.ac: Use `ws2_32' library for srv_mingw.
10053 * configure: Regenerate.
10054 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10055 * remote-utils.c: Likewise.
10056
f6d1620c
L
100572010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10058
10059 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10060 if __x86_64__ is defined.
10061
8e642873
PM
100622010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10063
10064 * configure: Regenerate.
10065
711e434b
PM
100662010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10067
10068 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10069 * target.h (target_ops): New get_tib_address field.
10070 * win32-low.h (win32_thread_info): Add thread_local_base field.
10071 * win32-low.c (child_add_thread): Add tlb argument.
10072 Set thread_local_base field to TLB.
10073 (get_child_debug_event): Adapt to child_add_thread change.
10074 (win32_get_tib_address): New function.
10075 (win32_target_ops): Set get_tib_address field to
10076 win32_get_tib_address.
10077 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10078
505106cd
PA
100792010-04-12 Pedro Alves <pedro@codesourcery.com>
10080
505106cd
PA
10081 * linux-low.c (linux_mourn): Also remove the process.
10082 * server.c (handle_target_event): Don't remove the process here.
10083 * nto-low.c (nto_mourn): New.
10084 (nto_target_ops): Install it.
10085 * spu-low.c (spu_mourn): New.
10086 (spu_target_ops): Install it.
10087 * win32-low.c (win32_mourn): New.
10088 (win32_target_ops): Install it.
10089
e8470a06
PA
100902010-04-12 Pedro Alves <pedro@codesourcery.com>
10091
10092 * server.h (buffer_xml_printf): Remove redundant `;'.
10093
45ba0d02
PA
100942010-04-12 Pedro Alves <pedro@codesourcery.com>
10095
10096 * regcache.c (set_register_cache): Invalidate regcaches before
10097 changing the register cache layout.
10098 (regcache_invalidate_one): Allow a NULL regcache.
10099 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10100 regcaches before changing the register cache layout or the target
10101 regsets.
10102
59e04013
L
101032010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10104
10105 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10106 variable warning on Linux/x86-64.
10107
8336d594
PA
101082010-04-11 Pedro Alves <pedro@codesourcery.com>
10109
10110 GDBserver disconnected tracing support.
10111
10112 * linux-low.c (linux_remove_process): Delete.
10113 (add_lwp): Don't set last_resume_kind here.
10114 (linux_kill): Use `mourn'.
10115 (linux_detach): Use `thread_db_detach', and `mourn'.
10116 (linux_mourn): New.
10117 (linux_attach_lwp_1): Adjust comment.
10118 (linux_attach): last_resume_kind moved the thread_info; adjust.
10119 (status_pending_p_callback): Adjust.
10120 (linux_wait_for_event_1): Adjust.
10121 (count_events_callback, select_singlestep_lwp_callback)
10122 (select_event_lwp_callback, cancel_breakpoints_callback)
10123 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10124 (proceed_one_lwp): Adjust.
10125 (linux_async): Add debug output.
10126 (linux_thread_stopped): New.
10127 (linux_pause_all): New.
10128 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10129 linux_pause_all.
10130 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10131 (thread_db_free): Delete declaration.
10132 (thread_db_detach, thread_db_mourn): Declare.
10133 * thread-db.c (thread_db_init): Use thread_db_mourn.
10134 (thread_db_free): Delete, split in two.
10135 (disable_thread_event_reporting): New.
10136 (thread_db_detach): New.
10137 (thread_db_mourn): New.
10138
10139 * server.h (struct thread_info) <last_resume_kind>: New field.
10140 <attached>: Add comment.
10141 <gdb_detached>: New field.
10142 (handler_func): Change return type to int.
10143 (handle_serial_event, handle_target_event): Ditto.
10144 (gdb_connected): Declare.
10145 (tracing): Delete.
10146 (disconnected_tracing): Declare.
10147 (stop_tracing): Declare.
10148
10149 * server.c (handle_query) <qSupported>: Report support for
10150 disconnected tracing.
10151 (queue_stop_reply_callback): Account for running threads.
10152 (gdb_wants_thread_stopped): New.
10153 (gdb_wants_all_threads_stopped): New.
10154 (gdb_reattached_process): New.
10155 (handle_status): Clear the `gdb_detached' flag of all processes.
10156 In all-stop, stop all threads.
10157 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10158 (process_serial_event): If the remote connection breaks, or if an
10159 exit was forced with "monitor exit", force an event loop exit.
10160 Handle disconnected tracing on detach.
10161 (handle_serial_event): Adjust.
10162 (handle_target_event): If GDB isn't connected, forward events back
10163 to the inferior, unless the last process exited, in which case,
10164 exit gdbserver. Adjust interface.
10165
10166 * remote-utils.c (remote_open): Don't block in accept. Instead
10167 register an event loop source on the listen socket file
10168 descriptor. Refactor bits into ...
10169 (listen_desc): ... this new global.
10170 (gdb_connected): ... this new function.
10171 (enable_async_notification): ... this new function.
10172 (handle_accept_event): ... this new function.
10173 (remote_close): Clear remote_desc.
10174
10175 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10176
10177 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10178 New fields.
10179 (mourn_inferior): Define.
10180 (target_process_qsupported): Avoid the dangling else problem.
10181 (thread_stopped): Define.
10182 (pause_all): Define.
10183 (target_waitstatus_to_string): Declare.
10184 * target.c (target_waitstatus_to_string): New.
10185
10186 * tracepoint.c (tracing): Make extern.
10187 (disconnected_tracing): New.
10188 (stop_tracing): Make extern. Handle tracing stops due to GDB
10189 disconnecting.
10190 (cmd_qtdisconnected): New.
10191 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10192 (handle_tracepoint_general_set): Handle QTDisconnected.
10193
10194 * event-loop.c (event_handler_func): Change return type to int.
10195 (process_event): Bail out if the event handler wants the event
10196 loop to stop.
10197 (handle_file_event): Ditto.
10198 (start_event_loop): Bail out if the event handler wants the event
10199 loop to stop.
10200
10201 * nto-low.c (nto_target_ops): Adjust.
10202 * spu-low.c (spu_wait): Don't remove the process here.
10203 (spu_target_ops): Adjust.
10204 * win32-low.c (win32_wait): Don't remove the process here.
10205 (win32_target_ops): Adjust.
10206
5d267c4c
PA
102072010-04-11 Pedro Alves <pedro@codesourcery.com>
10208
10209 * regcache.c (realloc_register_cache): Invalidate inferior's
10210 regcache before recreating it.
10211
623ccd72
PA
102122010-04-09 Pedro Alves <pedro@codesourcery.com>
10213
10214 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10215
219f2f23
PA
102162010-04-09 Stan Shebs <stan@codesourcery.com>
10217 Pedro Alves <pedro@codesourcery.com>
10218
10219 * server.h (LONGEST): New.
10220 (struct thread_info) <while_stepping>: New field.
10221 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10222 Declare.
10223 (initialize_tracepoint, handle_tracepoint_general_set)
10224 (handle_tracepoint_query, tracepoint_finished_step)
10225 (tracepoint_was_hit, release_while_stepping_state_list):
10226 (current_traceframe): Declare.
10227 * server.c (handle_general_set): Handle tracepoint packets.
10228 (read_memory): New.
10229 (write_memory): New.
10230 (handle_search_memory_1): Use read_memory.
10231 (handle_query): Report support for conditional tracepoints, trace
10232 state variables, and tracepoint sources. Handle tracepoint
10233 queries.
10234 (main): Initialize the tracepoints module.
10235 (process_serial_event): Handle traceframe reads/writes.
10236
10237 * linux-low.c (handle_tracepoints): New.
10238 (linux_wait_1): Call it.
10239 (linux_resume_one_lwp): Handle while-stepping.
10240 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10241 (linux_target_ops): Install them.
10242 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10243 New field.
10244 * linux-x86-low.c (x86_supports_tracepoints): New.
10245 (the_low_target). Install it.
10246
10247 * mem-break.h (delete_breakpoint): Declare.
10248 * mem-break.c (delete_breakpoint): Make external.
10249
10250 * target.h (struct target_ops): Add `supports_tracepoints',
10251 `read_pc', and `write_pc' fields.
10252 (target_supports_tracepoints): Define.
10253 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10254 (phex_nz): New.
10255
10256 * regcache.h (struct regcache) <registers_owned>: New field.
10257 (init_register_cache, regcache_cpy): Declare.
10258 (regcache_read_pc, regcache_write_pc): Declare.
10259 (register_cache_size): Declare.
10260 (supply_regblock): Declare.
10261 * regcache.c (init_register_cache): New.
10262 (new_register_cache): Use it.
10263 (regcache_cpy): New.
10264 (register_cache_size): New.
10265 (supply_regblock): New.
10266 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 10267
219f2f23
PA
10268 * tracepoint.c: New.
10269
10270 * Makefile.in (OBS): Add tracepoint.o.
10271 (tracepoint.o): New rule.
10272
3a13a53b
L
102732010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10274
10275 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10276 (i386-mmx.o): New.
10277 (i386-mmx.c): Likewise.
10278 (i386-mmx-linux.o): Likewise.
10279 (i386-mmx-linux.c): Likewise.
10280
10281 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10282 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10283 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10284 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10285
10286 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10287 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10288 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10289
1570b33e
L
102902010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10291
10292 * Makefile.in (clean): Updated.
10293 (i386-avx.o): New.
10294 (i386-avx.c): Likewise.
10295 (i386-avx-linux.o): Likewise.
10296 (i386-avx-linux.c): Likewise.
10297 (amd64-avx.o): Likewise.
10298 (amd64-avx.c): Likewise.
10299 (amd64-avx-linux.o): Likewise.
10300 (amd64-avx-linux.c): Likewise.
10301
10302 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10303 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10304 (srv_amd64_regobj): Add amd64-avx.o.
10305 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10306 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10307 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10308 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10309 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10310 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10311 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10312
10313 * i387-fp.c: Include "i386-xstate.h".
10314 (i387_xsave): New.
10315 (i387_cache_to_xsave): Likewise.
10316 (i387_xsave_to_cache): Likewise.
10317 (x86_xcr0): Likewise.
10318
10319 * i387-fp.h (i387_cache_to_xsave): Likewise.
10320 (i387_xsave_to_cache): Likewise.
10321 (x86_xcr0): Likewise.
10322
10323 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10324 * linux-crisv32-low.c (target_regsets): Likewise.
10325 * linux-m68k-low.c (target_regsets): Likewise.
10326 * linux-mips-low.c (target_regsets): Likewise.
10327 * linux-ppc-low.c (target_regsets): Likewise.
10328 * linux-s390-low.c (target_regsets): Likewise.
10329 * linux-sh-low.c (target_regsets): Likewise.
10330 * linux-sparc-low.c (target_regsets): Likewise.
10331 * linux-xtensa-low.c (target_regsets): Likewise.
10332
10333 * linux-low.c: Include <sys/uio.h>.
10334 (regsets_fetch_inferior_registers): Support nt_type.
10335 (regsets_store_inferior_registers): Likewise.
10336 (linux_process_qsupported): New.
10337 (linux_target_ops): Add linux_process_qsupported.
10338
10339 * linux-low.h (regset_info): Add nt_type.
10340 (linux_target_ops): Add process_qsupported.
10341
10342 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10343 and <sys/uio.h>.
10344 (init_registers_i386_avx_linux): New.
10345 (init_registers_amd64_avx_linux): Likewise.
10346 (xmltarget_i386_linux_no_xml): Likewise.
10347 (xmltarget_amd64_linux_no_xml): Likewise.
10348 (PTRACE_GETREGSET): Likewise.
10349 (PTRACE_SETREGSET): Likewise.
10350 (x86_fill_xstateregset): Likewise.
10351 (x86_store_xstateregset): Likewise.
10352 (use_xml): Likewise.
10353 (x86_linux_update_xmltarget): Likewise.
10354 (x86_linux_process_qsupported): Likewise.
10355 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10356 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10357 init_registers_i386_linux here. Call
10358 x86_linux_update_xmltarget.
10359 (the_low_target): Add x86_linux_process_qsupported.
10360
10361 * server.c (handle_query): Call target_process_qsupported.
10362
10363 * target.h (target_ops): Add process_qsupported.
10364 (target_process_qsupported): New.
10365
fc7238bb
PA
103662010-04-03 Pedro Alves <pedro@codesourcery.com>
10367
10368 * inferiors.c (add_thread): Set last_status kind to
10369 TARGET_WAITKIND_IGNORE.
10370 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10371 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10372 (linux_wait_1): Move `thread' local definition to block that uses
10373 it. Don't NULL initialize `event_child'.
10374 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10375 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10376 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10377
bdabb078
PA
103782010-04-01 Pedro Alves <pedro@codesourcery.com>
10379
10380 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10381 an extended waitstatus, or by a watchpoint.
10382 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10383 thread was stepping or has been stopped by a watchpoint.
10384
d3bbe7a0
PA
103852010-04-01 Pedro Alves <pedro@codesourcery.com>
10386
10387 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10388 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10389 of another, then delete the previous, and validate all
10390 breakpoints.
10391 (validate_inserted_breakpoint): New.
10392 (delete_disabled_breakpoints): New.
10393 (validate_breakpoints): New.
10394 (check_mem_read): Validate breakpoints before trusting their
10395 shadow. Delete disabled breakpoints.
10396 (check_mem_write): Validate breakpoints before trusting they
10397 should be inserted. Delete disabled breakpoints.
10398 * mem-break.h (validate_breakpoints):
10399 * server.c (handle_query): Validate breakpoints when we see a
10400 qSymbol query.
10401
8b07ae33
PA
104022010-04-01 Pedro Alves <pedro@codesourcery.com>
10403
10404 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10405 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10406 if we could tell there's a GDB breakpoint at stop_pc.
10407 (need_step_over_p): Don't do a step over if we find a GDB
10408 breakpoint at the resume PC.
10409
10410 * mem-break.c (struct raw_breakpoint): New.
10411 (enum bkpt_type): New type `gdb_breakpoint'.
10412 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10413 fields. New field `raw'.
10414 (find_raw_breakpoint_at): New.
10415 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10416 breakpoint instead.
10417 (set_breakpoint_at): Adjust.
10418 (delete_raw_breakpoint): New.
10419 (release_breakpoint): New.
10420 (delete_breakpoint): Rename to...
10421 (delete_breakpoint_1): ... this. Add proc parameter. Use
10422 release_breakpoint. Return ENOENT.
10423 (delete_breakpoint): Reimplement.
10424 (find_breakpoint_at): Delete.
10425 (find_gdb_breakpoint_at): New.
10426 (delete_breakpoint_at): Delete.
10427 (set_gdb_breakpoint_at): New.
10428 (delete_gdb_breakpoint_at): New.
10429 (gdb_breakpoint_here): New.
10430 (set_reinsert_breakpoint): Use release_breakpoint.
10431 (uninsert_breakpoint): Rename to ...
10432 (uninsert_raw_breakpoint): ... this.
10433 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10434 (reinsert_raw_breakpoint): Change parameter type to
10435 raw_breakpoint.
10436 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10437 instead.
10438 (check_breakpoints): Adjust. Use release_breakpoint.
10439 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10440 (breakpoint_inserted_here): Ditto.
10441 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10442 Don't trust the breakpoint's shadow if it is not inserted.
10443 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10444 (delete_all_breakpoints): Adjust.
10445 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10446 use delete_breakpoint_1.
10447
10448 * mem-break.h (breakpoints_supported): Delete declaration.
10449 (set_gdb_breakpoint_at): Declare.
10450 (gdb_breakpoint_here): Declare.
10451 (delete_breakpoint_at): Delete.
10452 (delete_gdb_breakpoint_at): Declare.
10453
10454 * server.h (struct raw_breakpoint): Forward declare.
10455 (struct process_info): New field `raw_breakpoints'.
10456
10457 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10458 breakpoints.
10459
6bf5e0ba
PA
104602010-03-24 Pedro Alves <pedro@codesourcery.com>
10461
10462 * linux-low.c (status_pending_p_callback): Fix comment.
10463 (linux_wait_for_event_1): Move most of the internal breakpoint
10464 handling from here...
10465 (linux_wait_1): ... to here.
10466 (count_events_callback): New.
10467 (select_singlestep_lwp_callback): New.
10468 (select_event_lwp_callback): New.
10469 (cancel_breakpoints_callback): New.
10470 (select_event_lwp): New.
10471 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10472 priority to all LWPs that have had events that should be reported
10473 to the client. Cancel breakpoints when about to reporting the
10474 event to the client, not while stopping lwps. No longer cancel
10475 finished single-steps here.
10476 (cancel_finished_single_step): Delete.
10477 (cancel_finished_single_steps): Delete.
10478
414a389f
PA
104792010-03-24 Pedro Alves <pedro@codesourcery.com>
10480
10481 * mem-break.c (enum bkpt_type): New.
10482 (struct breakpoint): New field `type'.
10483 (set_breakpoint_at): Change return type to struct breakpoint
10484 pointer. Set type to `other_breakpoint' by default.
10485 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10486 in the breakpoint list.
10487 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10488 (reinsert_breakpoint): Rename to ...
10489 (reinsert_raw_breakpoint): ... this.
10490 (reinsert_breakpoints_at): Adjust.
10491 * mem-break.h (struct breakpoint): Declare.
10492 (set_breakpoint_at): Change return type to struct breakpoint
10493 pointer.
10494
2280c721
PA
104952010-03-24 Pedro Alves <pedro@codesourcery.com>
10496
10497 * server.c (handle_query): Assign, not compare.
10498
d50171e4
PA
104992010-03-24 Pedro Alves <pedro@codesourcery.com>
10500
10501 Teach linux gdbserver to step-over-breakpoints.
10502
10503 * linux-low.c (can_hardware_single_step): New.
10504 (supports_breakpoints): New.
10505 (handle_extended_wait): If stopping threads, read the stop pc of
10506 the new cloned LWP.
10507 (get_pc): New.
10508 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10509 low target doesn't support retrieving the PC.
10510 (add_lwp): Set last_resume_kind to resume_continue.
10511 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10512 (linux_attach): Don't clear stop_expected. Set the lwp's
10513 last_resume_kind to resume_stop.
10514 (linux_detach_one_lwp): Don't check for removed breakpoints.
10515 (check_removed_breakpoint): Delete.
10516 (status_pending_p): Rename to ...
10517 (status_pending_p_callback): ... this. Don't check for removed
10518 breakpoints. Don't consider threads that are stopped from GDB's
10519 perspective.
10520 (linux_wait_for_lwp): Always read the stop_pc here.
10521 (cancel_breakpoint): New.
10522 (step_over_bkpt): New global.
10523 (linux_wait_for_event_1): Implement stepping over breakpoints.
10524 (gdb_wants_lwp_stopped): New.
10525 (gdb_wants_all_stopped): New.
10526 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10527 single-step traps here. Store the thread's last reported target
10528 wait status.
10529 (send_sigstop): Don't clear stop_expected. Always set it,
10530 instead.
10531 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10532 (cancel_finished_single_step): New.
10533 (cancel_finished_single_steps): New.
10534 (wait_for_sigstop): Don't cancel finished single-step traps here.
10535 (linux_resume_one_lwp): Don't check for removed breakpoints.
10536 Don't set `step' on non-hardware step archs.
10537 (linux_set_resume_request): Ignore resume_stop requests if already
10538 stopping or stopped. Set the lwp's last_resume_kind.
10539 (resume_status_pending_p): Don't check for removed breakpoints.
10540 (need_step_over_p): New.
10541 (start_step_over): New.
10542 (finish_step_over): New.
10543 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10544 requests. Clear the thread's last reported target waitstatus.
10545 Don't use the `suspended' flag. Don't consider pending breakpoints.
10546 (linux_resume): Start a step-over if necessary.
10547 (proceed_one_lwp): New.
10548 (proceed_all_lwps): New.
10549 (unstop_all_lwps): New.
10550 * linux-low.h (struct lwp_info): Rewrite comment for the
10551 `suspended' flag. Add the `stop_pc' field. Delete the
10552 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10553 Add `'last_resume_kind' and `need_step_over' fields.
10554 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10555 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10556 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10557 (set_raw_breakpoint_at): New.
10558 (set_breakpoint_at): Rewrite to use it.
10559 (reinsert_breakpoint_handler): Delete.
10560 (set_reinsert_breakpoint): New.
10561 (reinsert_breakpoint_by_bp): Delete.
10562 (delete_reinsert_breakpoints): New.
10563 (uninsert_breakpoint): Rewrite.
10564 (uninsert_breakpoints_at): New.
10565 (reinsert_breakpoint): Rewrite.
10566 (reinsert_breakpoints_at): New.
10567 (check_breakpoints): Rewrite.
10568 (breakpoint_here): New.
10569 (breakpoint_inserted_here): New.
10570 (check_mem_read): Adjust.
10571 * mem-break.h (breakpoints_supported, breakpoint_here)
10572 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10573 (reinsert_breakpoint_by_bp): Delete declaration.
10574 (delete_reinsert_breakpoints): Declare.
10575 (reinsert_breakpoint): Delete declaration.
10576 (reinsert_breakpoints_at): Declare.
10577 (uninsert_breakpoint): Delete declaration.
10578 (uninsert_breakpoints_at): Declare.
10579 (check_breakpoints): Adjust prototype.
10580 * server.h: Adjust include order.
10581 (struct thread_info): Declare here. Add a `last_status' field.
10582
30ba68cb
MS
105832010-03-23 Michael Snyder <msnyder@vmware.com>
10584
10585 * server.c (crc32): New function.
10586 (handle_query): Add handling for 'qCRC:' request.
10587
b9a881c2
PA
105882010-03-23 Pedro Alves <pedro@codesourcery.com>
10589
10590 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10591 lwp had been stopped by a watchpoint.
10592
e92d13d5
PA
105932010-03-16 Pedro Alves <pedro@codesourcery.com>
10594
10595 * server.h (internal_error): Declare.
10596 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10597 * utils.c (internal_error): New function.
10598
64daa791
AS
105992010-03-15 Andreas Schwab <schwab@redhat.com>
10600
10601 * configure.srv: Fix typo setting srv_regobj.
10602
f52cd8cd
PA
106032010-03-15 Pedro Alves <pedro@codesourcery.com>
10604
10605 * linux-low.c (fetch_register): Avoid passing a non string literal
10606 format to `error'.
10607 (usr_store_inferior_registers): Ditto.
10608
93ae6fdc
PA
106092010-03-14 Pedro Alves <pedro@codesourcery.com>
10610
10611 * linux-low.c (linux_write_memory): Bail out early if peeking
10612 memory failed.
10613
c3adc08c
PA
106142010-03-14 Pedro Alves <pedro@codesourcery.com>
10615
10616 * linux-low.h (struct lwp_info): New fields
10617 `stopped_by_watchpoint' and `stopped_data_address'.
10618 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10619 here, and cache them in the lwp object.
10620 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10621 directly.
10622 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10623 field.
10624 (linux_stopped_by_watchpoint): Rewrite.
10625 (linux_stopped_data_address): Rewrite.
10626
bce522a2
PA
106272010-03-06 Simo Melenius <simo.melenius@iki.fi>
10628
10629 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10630 switching the current inferior, not before.
10631
90884b2b
L
106322010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10633
10634 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10635 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10636 i386-linux.c and amd64-linux.c.
10637 (reg-i386.o): Removed.
10638 (reg-i386.c): Likewise.
10639 (reg-i386-linux.o): Likewise.
10640 (reg-i386-linux.c): Likewise.
10641 (reg-x86-64.o): Likewise.
10642 (reg-x86-64.c): Likewise.
10643 (reg-x86-64-linux.o): Likewise.
10644 (reg-x86-64-linux.c): Likewise.
10645 (i386.o): New.
10646 (i386.c): Likewise.
10647 (i386-linux.o): Likewise.
10648 (i386-linux.c): Likewise.
10649 (amd64.o): Likewise.
10650 (amd64.c): Likewise.
10651 (amd64-linux.o): Likewise.
10652 (amd64-linux.c): Likewise.
10653
10654 * configure.srv (srv_i386_regobj): New.
10655 (srv_i386_linux_regobj): Likewise.
10656 (srv_amd64_regobj): Likewise.
10657 (srv_amd64_linux_regobj): Likewise.
10658 (srv_i386_32bit_xmlfiles): Likewise.
10659 (srv_i386_64bit_xmlfiles): Likewise.
10660 (srv_i386_xmlfiles): Likewise.
10661 (srv_amd64_xmlfiles): Likewise.
10662 (srv_i386_linux_xmlfiles): Likewise.
10663 (srv_amd64_linux_xmlfiles): Likewise.
10664 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10665 srv_xmlfiles to $srv_i386_xmlfiles.
10666 (i[34567]86-*-mingw32ce*): Likewise.
10667 (i[34567]86-*-mingw*): Likewise.
10668 (i[34567]86-*-nto*): Likewise.
10669 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10670 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10671 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10672 (x86_64-*-linux*): Likewise.
10673
10674 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10675 (init_registers_amd64_linux): New.
10676 (x86_arch_setup): Replace init_registers_x86_64_linux with
10677 init_registers_amd64_linux.
10678
193f13e6
MK
106792010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10680
10681 * configure.ac: Check for libdl. If it is not available link against
10682 static libthread_db.
10683 * configure: Regenerate.
10684
85d721b8
PA
106852010-02-22 Pedro Alves <pedro@codesourcery.com>
10686
10687 PR9605
10688
10689 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10690 handing a read watchpoint.
10691 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10692
6076632b
DE
106932010-02-12 Doug Evans <dje@google.com>
10694
10695 * linux-low.c (linux_supports_tracefork_flag): Document.
10696 (linux_look_up_symbols): Add comment.
10697
3327ccf7
L
106982010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10699
10700 * regcache.c (supply_register): Clear regcache if buf is NULL.
10701
0718675c 107022010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 10703 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
10704
10705 * inferiors.c (find_inferior): Add function documentation.
10706 (unloaded_dll): Handle the case where the unloaded dll has not
10707 been previously registered in the dll list.
10708
177321bd
DJ
107092010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10710
10711 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10712 (thumb2_breakpoint): New.
10713 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10714
2b009048
DJ
107152010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10716
10717 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10718 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10719 breakpoints.
10720
3be029c7
PA
107212010-01-21 Pedro Alves <pedro@codesourcery.com>
10722
10723 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10724
18f5de3b
JK
107252010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10726
10727 * linux-s390-low.c (s390_collect_ptrace_register)
10728 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10729
3743bb4f
DE
107302010-01-21 Doug Evans <dje@google.com>
10731
14ce3065
DE
10732 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10733 (PTRACE_ARG4_TYPE): New macro.
10734 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10735 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10736 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10737 (usr_store_inferior_registers): Ditto.
10738 (linux_read_memory, linux_write_memory): Ditto.
10739 (linux_test_for_tracefork): Ditto.
10740
3743bb4f
DE
10741 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10742 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10743
8b315be5
PA
107442010-01-21 Pedro Alves <pedro@codesourcery.com>
10745
10746 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10747 target.
10748
85492558
PA
107492010-01-21 Pedro Alves <pedro@codesourcery.com>
10750
10751 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10752 prototype to take a regcache. Adjust.
10753
442ea881
PA
107542010-01-20 Pedro Alves <pedro@codesourcery.com>
10755
10756 * regcache.h (struct thread_info): Forward declare.
10757 (struct regcache): New.
10758 (new_register_cache): Adjust prototype.
10759 (get_thread_regcache): Declare.
10760 (free_register_cache): Adjust prototype.
10761 (registers_to_string, registers_from_string): Ditto.
10762 (supply_register, supply_register_by_name, collect_register)
10763 (collect_register_as_string, collect_register_by_name): Ditto.
10764 * regcache.c (struct inferior_regcache_data): Delete.
10765 (get_regcache): Rename to ...
10766 (get_thread_regcache): ... this. Adjust. Switch inferior before
10767 fetching registers.
10768 (regcache_invalidate_one): Adjust.
10769 (regcache_invalidate): Fix prototype.
10770 (new_register_cache): Return the new register cache.
10771 (free_register_cache): Change prototype.
10772 (realloc_register_cache): Adjust.
10773 (registers_to_string): Change prototype to take a regcache. Adjust.
10774 (registers_from_string): Ditto.
10775 (register_data): Ditto.
10776 (supply_register): Ditto.
10777 (supply_register_by_name): Ditto.
10778 (collect_register): Ditto.
10779 (collect_register_as_string): Ditto.
10780 (collect_register_by_name): Ditto.
10781 * server.c (process_serial_event): Adjust.
10782 * linux-low.h (regset_fill_func, regset_store_func): Change
10783 prototype.
10784 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10785 Change prototype.
10786 * linux-low.c (get_stop_pc): Adjust.
10787 (check_removed_breakpoint): Adjust.
10788 (linux_wait_for_event): Adjust.
10789 (linux_resume_one_lwp): Adjust.
10790 (fetch_register): Add regcache parameter. Adjust.
10791 (usr_store_inferior_registers): Ditto.
10792 (regsets_fetch_inferior_registers): Ditto.
10793 (regsets_store_inferior_registers): Ditto.
10794 (linux_fetch_registers, linux_store_registers): Ditto.
10795 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10796 regcache. Adjust.
43aaf8b6
PA
10797 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10798 Ditto.
442ea881
PA
10799 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10800 prototype to take a regcache.
10801 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10802 * remote-utils.c (convert_ascii_to_int, outreg)
10803 (prepare_resume_reply): Change prototype to take a regcache.
10804 Adjust.
10805 * target.h (struct target_ops) <fetch_registers, store_registers>:
10806 Change prototype to take a regcache.
10807 (fetch_inferior_registers, store_inferior_registers): Change
10808 prototype to take a regcache. Adjust.
10809 * proc-service.c (ps_lgetregs): Adjust.
10810 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10811 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10812 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10813 take a regcache. Adjust.
10814 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10815 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10816 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10817 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10818 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10819 (cris_cannot_fetch_register):
10820 (cris_breakpoint_at): Change prototype to take a regcache.
10821 Adjust.
10822 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10823 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10824 to take a regcache. Adjust.
10825 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10826 Adjust.
10827 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10828 take a regcache. Adjust.
10829 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10830 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10831 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10832 * linux-mips-low.c (mips_get_pc):
10833 (mips_set_pc): Change prototype to take a regcache. Adjust.
10834 (mips_reinsert_addr): Adjust.
10835 (mips_collect_register): Change prototype to take a regcache.
10836 Adjust.
10837 (mips_supply_register):
10838 (mips_collect_register_32bit, mips_supply_register_32bit)
10839 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10840 (mips_store_fpregset): Ditto.
43aaf8b6
PA
10841 * linux-ppc-low.c (ppc_supply_ptrace_register)
10842 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
10843 (parse_spufs_run): Adjust.
10844 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10845 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10846 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10847 take a regcache. Adjust.
10848 * linux-s390-low.c (s390_collect_ptrace_register)
10849 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10850 (s390_set_pc): Change prototype to take a regcache. Adjust.
10851 (s390_arch_setup): Adjust.
10852 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10853 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10854 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10855 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10856 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10857 regcache. Adjust.
10858 (sparc_breakpoint_at): Adjust.
10859 * linux-xtensa-low.c (xtensa_fill_gregset):
10860 (xtensa_store_gregset):
10861 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10862 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10863 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10864 prototype to take a regcache. Adjust.
10865 * win32-arm-low.c (arm_fetch_inferior_register)
10866 (arm_store_inferior_register): Change prototype to take a
10867 regcache. Adjust.
10868 * win32-i386-low.c (i386_fetch_inferior_register)
10869 (i386_store_inferior_register): Change prototype to take a
10870 regcache. Adjust.
10871 * win32-low.c (child_fetch_inferior_registers)
10872 (child_store_inferior_registers): Change prototype to take a
10873 regcache. Adjust.
10874 (win32_wait): Adjust.
10875 (win32_fetch_inferior_registers): Change prototype to take a
10876 regcache. Adjust.
10877 (win32_store_inferior_registers): Adjust.
10878 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10879 store_inferior_register>: Change prototype to take a regcache.
10880
60c3d7b0
DE
108812010-01-20 Doug Evans <dje@google.com>
10882
10883 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10884 #ifdef.
10885 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 10886 (W_STOPCODE): Provide definition if missing.
60c3d7b0 10887
dc146f7c
VP
108882010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10889
10890 * linux-low.c (linux_core_of_thread): New.
10891 (compare_ints, show_process, list_threads): New.
10892 (linux_qxfer_osdata): Report threads and cores.
10893 (linux_target_op): Register linux_core_of_thread.
10894 * remote-utils.c (prepare_resume_reply): Report the core.
10895 (buffer_xml_printf): Support %d specifier.
10896 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10897 New.
10898 (handle_query): Handle qXfer:threads. Announce availability
10899 thereof.
10900 * target.h (struct target_ops): New field core_of_thread.
10901
7803799a
UW
109022010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10903
10904 * Makefile.in (clean): Remove new generated files.
10905 (reg-s390.o, reg-s390.c): Remove rules.
10906 (reg-s390x.o, reg-s390x.c): Likewise.
10907 (s390-linux32.o, s390-linux32.c): Add rules.
10908 (s390-linux64.o, s390-linux64.c): Likewise.
10909 (s390x-linux64.o, s390x-linux64.c): Likewise.
10910 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10911 * linux-s390-low.c: Include <elf.h>.
10912 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10913 (init_registers_s390): Remove prototype.
10914 (init_registers_s390x): Likewise.
10915 (init_registers_s390_linux32): Add prototype.
10916 (init_registers_s390_linux64): Likewise.
10917 (init_registers_s390x_linux64): Likewise.
10918 (s390_num_regs_3264): New define.
10919 (s390_regmap_3264): New global variable.
10920 (s390_cannot_fetch_register): Remove obsolete check.
10921 (s390_cannot_store_register): Likewise.
10922 (s390_collect_ptrace_register): Handle upper/lower register halves.
10923 (s390_supply_ptrace_register): Likewise.
10924 (s390_fill_gregset): Update to register number changes.
10925 (s390_get_hwcap): New routine.
10926 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10927 Install appropriate regmap and register set.
10928
6e7ffa39
JB
109292010-01-01 Joel Brobecker <brobecker@adacore.com>
10930
10931 * server.c (gdbserver_version): Update copyright year to 2010.
10932 * gdbreplay.c (gdbreplay_version): Likewise.
10933
957f3f49
DE
109342009-12-28 Doug Evans <dje@google.com>
10935
10936 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10937 elf/external.h. Include <elf.h> instead but only if necessary.
10938
ca5c370d
PA
109392009-12-28 Pedro Alves <pedro@codesourcery.com>
10940
10941 * linux-low.c (linux_remove_process): Remove `detaching'
10942 parameter. Don't release/detach from thread_db here.
10943 (linux_kill): Release/detach from thread_db here, ...
10944 (linux_detach): ... and here, before actually detaching.
10945 (linux_wait_1): ... and here, when a process exits.
10946 * thread-db.c (any_thread_of): New.
10947 (thread_db_free): Switch the current inferior to a thread of the
10948 passed in process.
10949
4ee62156
DE
109502009-12-21 Doug Evans <dje@google.com>
10951
d90e6a88
DE
10952 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10953
c5f62d5f
DE
10954 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10955 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10956 warning ifndef __NR_tkill. Move setting of errno there too.
10957 Delete unnecessary resetting of errno after syscall.
10958 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10959
10e86dd7
DE
10960 * configure.ac: Check for dladdr.
10961 * config.in: Regenerate.
10962 * configure: Regenerate.
10963 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10964 (try_thread_db_load): Update.
10965
4ee62156
DE
10966 * linux-low.c (my_waitpid): Delete unnecessary prototype.
10967
00f515da
DE
109682009-12-18 Doug Evans <dje@google.com>
10969
e9464885
DE
10970 * event-loop.c: Include unistd.h if it exists.
10971
07d4f67e
DE
10972 * linux-low.c (my_waitpid): Move definition away from being in
10973 between linux_tracefork_child/linux_test_for_tracefork.
10974
00f515da
DE
10975 * gdb_proc_service.h (psaddr_t): Fix type.
10976 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10977 signature to match glibc.
10978
1de1badb
DE
109792009-12-16 Doug Evans <dje@google.com>
10980
10981 * linux-low.c (linux_read_memory): Fix argument to read.
10982
aeeb81d1
PA
109832009-11-26 Pedro Alves <pedro@codesourcery.com>
10984
10985 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10986 events, don't leave current_inferior pointing at null.
10987
10357975
PA
109882009-11-26 Pedro Alves <pedro@codesourcery.com>
10989
10990 * win32-low.c (LOG): Delete.
10991 (OUTMSG): Output to stderr.
10992 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
10993 on compile time LOG macro.
10994 (win32_wait): Fix debug output.
10995
cf6e3471
PA
109962009-11-26 Pedro Alves <pedro@codesourcery.com>
10997
10998 * win32-low.c (win32_add_one_solib): If the dll name is
10999 "ntdll.dll", prepend the system directory to the dll path.
11000
0c85e18e
MK
110012009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11002
11003 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11004
9ac544ce 110052009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11006 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11007
11008 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11009 * configure.ac: Check for __mcoldfire__ and set
11010 gdb_cv_m68k_is_coldfire.
11011 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11012 reg-cf.o and reg-m68k.o.
11013 * configure: Regenerated.
11014
fd7dd3e6
PA
110152009-11-16 Pedro Alves <pedro@codesourcery.com>
11016
11017 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11018 Pass it to thread_db_free.
11019 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11020 proper `detaching' argument to linux_remove_process.
11021 * linux-low.h (thread_db_free): Add `detaching' parameter.
11022 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11023 to thread_db_free.
11024 (thread_db_free): Add `detaching' parameter. Only
11025 call td_ta_clear_event if detaching from process.
11026
75aa492e
MK
110272009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11028
11029 * thread-db.c (thread_db_free): Fix typo.
11030
21e1bee4
PP
110312009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11032
11033 PR gdb/10838
11034 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11035
8838b45e
NS
110362009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11037
11038 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11039 with an i686 compiler.
11040 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11041 needed.
11042 * configure: Rebuilt.
11043
8a35fb51
SL
110442009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11045
11046 PR gdb/10783
11047
11048 * server.c (handle_search_memory_1): Correct read_addr initialization
11049 in loop for searching subsequent chunks.
11050
96f15937
PP
110512009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11052
11053 * configure.ac: New --with-libthread-db option.
11054 * thread-db.c: Allow direct dependence on libthread_db.
11055 (thread_db_free): Adjust.
11056 * config.in: Regenerate.
11057 * configure: Likewise.
889bf7c5 11058
5f7d1694
PP
110592009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11060
11061 PR gdb/10757
11062 * thread-db.c (attach_thread): New function.
11063 (maybe_attach_thread): Return success/failure.
11064 (find_new_threads_callback): Adjust.
889bf7c5
PA
11065 (thread_db_find_new_threads): Loop until no new threads.
11066
88e3b899
PA
110672009-10-13 Pedro Alves <pedro@codesourcery.com>
11068
11069 * proc-service.c (ps_lgetregs): Formatting.
11070
cdbfd419
PP
110712009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11072
11073 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11074 * configure.ac: Adjust.
11075 * linux-low.h (struct process_info_private): Move members to struct
11076 thread_db.
11077 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11078 * linux-low.c (linux_remove_process): Adjust.
11079 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11080 * server.c (handle_query): Move code ...
11081 (handle_monitor_command): ... here. New function.
11082 * target.h (struct target_ops): New member.
11083 * thread-db.c (struct thread_db): New.
11084 (libthread_db_search_path): New variable.
11085 (thread_db_create_event, thread_db_enable_reporting)
11086 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11087 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11088 (try_thread_db_load_1, dladdr_to_soname): New functions.
11089 (try_thread_db_load, thread_db_load_search): New functions.
11090 (thread_db_init): Search for libthread_db.
11091 (thread_db_free): New function.
11092 (thread_db_handle_monitor_command): Likewise.
11093 * config.in: Regenerate.
11094 * configure: Regenerate.
889bf7c5 11095
4168d2d6
UW
110962009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11097
11098 * spu-low.c (spu_kill): Wait for inferior to terminate.
11099 Call clear_inferiors.
11100 (spu_detach): Call clear_inferiors.
11101
81ecdfbb
RW
111022009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11103
11104 * aclocal.m4: Regenerate.
11105 * config.in: Likewise.
11106 * configure: Likewise.
11107
0b9ff2c0
UW
111082009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11109
11110 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11111 (parse_spufs_run): New function.
11112 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11113 (ppc_breakpoint_at): Handle SPU breakpoints.
11114
efcbbd14
UW
111152009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11116
11117 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11118 (SPUFS_MAGIC): Define.
11119 (spu_enumerate_spu_ids): New function.
11120 (linux_qxfer_spu): New function.
11121 (linux_target_ops): Install linux_qxfer_spu.
11122
f4d9bade
UW
111232009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11124
11125 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11126 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11127 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11128 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11129 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11130 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11131 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11132 (init_registers_powerpc_cell32l): Add prototype.
11133 (init_registers_powerpc_cell64l): Likewise.
11134 (ppc_arch_setup): Detect Cell/B.E. architecture.
11135
96e946ca
RW
111362009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11137
11138 * Makefile.in (datarootdir): New variable.
11139
58d6951d
DJ
111402009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11141
11142 * linux-low.c (linux_write_memory): Update debugging output.
11143 * Makefile.in (clean): Add new descriptions.
11144 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11145 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11146 * configure.srv: Add new files for arm*-*-linux*.
11147 * linux-arm-low.c: Add new declarations.
11148 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11149 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11150 (HWCAP_VFPv3D16): New.
11151 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11152 instead of __IWMMXT__.
11153 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11154 (arm_arch_setup): New.
11155 (target_regsets): Remove #ifdef. Add VFP regset.
11156 (the_low_target): Use arm_arch_setup.
11157
12b42a12
DJ
111582009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11159
11160 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11161 the main thread again.
11162
ac8c974e
AR
111632009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11164
11165 Adding Neutrino gdbserver.
11166 * configure: Regenerated.
11167 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11168 * configure.srv (i[34567]86-*-nto*): New target.
11169 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11170 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11171 (nto_comctrl) [__QNX__]: New function.
11172 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11173
4424e0c3 111742009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
11175
11176 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11177 srv_tgtobj.
11178
912cf4ba
PA
111792009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11180 Pedro Alves <pedro@codesourcery.com>
11181
11182 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11183 don't support CONTEXT_EXTENDED_REGISTERS.
11184 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11185 (the_low_target): Install them.
11186 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11187 failing with ERROR_PIPE_NOT_CONNECTED.
11188
aa5ca48f
DE
111892009-06-30 Doug Evans <dje@google.com>
11190 Pierre Muller <muller@ics.u-strasbg.fr>
11191
11192 Add h/w watchpoint support to x86-linux, win32-i386.
11193 * Makefile.in (SFILES): Add i386-low.c
11194 (i386_low_h): Define.
11195 (i386-low.o): Add dependencies.
11196 (linux-x86-low.o): Add i386-low.h dependency.
11197 (win32-i386-low.o): Ditto.
11198 * i386-low.c: New file.
11199 * i386-low.h: New file.
11200 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11201 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11202 * linux-low.c (linux_add_process): Initialize arch_private.
11203 (linux_remove_process): Free arch_private.
11204 (add_lwp): Initialize arch_private.
11205 (delete_lwp): Free arch_private.
11206 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11207 provided.
11208 * linux-low.h (process_info_private): New member arch_private.
11209 (lwp_info): New member arch_private.
11210 (linux_target_ops): New members new_process, new_thread,
11211 prepare_to_resume.
11212 (ptid_of): New macro.
11213 * linux-x86-low.c: Include stddef.h, i386-low.h.
11214 (arch_process_info): New struct.
11215 (arch_lwp_info): New struct.
11216 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11217 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11218 (i386_dr_low_get_status): New function.
11219 (x86_insert_point, x86_remove_point): New functions.
11220 (x86_stopped_by_watchpoint): New function.
11221 (x86_stopped_data_address): New function.
11222 (x86_linux_new_process, x86_linux_new_thread): New functions.
11223 (x86_linux_prepare_to_resume): New function.
11224 (the_low_target): Add entries for insert_point, remove_point,
11225 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11226 prepare_to_resume.
11227 * server.c (debug_hw_points): New global.
11228 (monitor_show_help): Document set debug-hw-points.
11229 (handle_query): Process "set debug-hw-points".
11230 * server.h (debug_hw_points): Declare.
11231 (paddress): Declare.
11232 * utils.c (NUMCELLS, CELLSIZE): New macros.
11233 (get_sell, xsnprintf, paddress): New functions.
11234 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11235 remove_point, stopped_by_watchpoint, stopped_data_address.
11236 * win32-i386-low.c: Include i386-low.h.
11237 (debug_reg_state): Replaces dr.
11238 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11239 (i386_dr_low_get_status): New function.
11240 (i386_insert_point, i386_remove_point): New functions.
11241 (i386_stopped_by_watchpoint): New function.
11242 (i386_stopped_data_address): New function.
11243 (i386_initial_stuff): Update.
11244 (get_thread_context,set_thread_context,i386_thread_added): Update.
11245 (the_low_target): Add entries for insert_point,
11246 remove_point, stopped_by_watchpoint, stopped_data_address.
11247 * win32-low.c (win32_insert_watchpoint): New function.
11248 (win32_remove_watchpoint): New function.
11249 (win32_stopped_by_watchpoint): New function.
11250 (win32_stopped_data_address): New function.
11251 (win32_target_ops): Add entries for insert_watchpoint,
11252 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11253 * win32-low.h (win32_target_ops): New members insert_point,
11254 remove_point, stopped_by_watchpoint, stopped_data_address.
11255
d993e290
PA
112562009-06-25 Pedro Alves <pedro@codesourcery.com>
11257
11258 * server.c (process_serial_event): Re-return unsupported, not
11259 error, if the type isn't recognized. Re-allow supporting only
11260 insert or remove packets. Also call require_running for
11261 breakpoints. Add missing break statement to default case. Tidy.
11262 * target.h (struct target_ops): Rename insert_watchpoint to
11263 insert_point, and remove_watchpoint to remove_point.
11264
11265 * linux-low.h (struct linux_target_ops): Likewise.
11266 * linux-low.c (linux_insert_watchpoint): Rename to ...
11267 (linux_insert_point): ... this. Adjust.
11268 (linux_remove_watchpoint): Rename to ...
11269 (linux_remove_point): ... this. Adjust.
11270 (linux_target_ops): Adjust.
11271 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11272 (cris_insert_point): ... this.
11273 (cris_remove_watchpoint): Rename to ...
11274 (cris_remove_point): ... this.
11275 (the_low_target): Adjust.
11276
0f54c268
PM
112772009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11278
11279 * server.c (handle_v_kill): Pass signal_pid to
11280 kill_inferior if multi_process is zero.
11281
c6314022
AR
112822009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11283
11284 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11285 * target.h (target_ops): Comment for *_watchpoint to make it clear
11286 the functions can get types '0' and '1'.
11287
4463ce24
AR
112882009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11289
11290 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11291 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11292 * regcache.c (get_regcache): Likewise.
11293 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11294 * win32-low.c (child_fetch_inferior_registers): Remove check for
11295 regno 0.
11296
cf8fd78b
PA
112972009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11298 Pedro Alves <pedro@codesourcery.com>
11299
11300 * target.h (struct target_ops) <supports_multi_process>: New
11301 callback.
11302 (target_supports_multi_process): New.
11303 * server.c (handle_query): Even if GDB reports support, only
11304 enable multi-process if the target also supports it. Report
11305 multi-process support only if the target backend supports it.
11306 * linux-low.c (linux_supports_multi_process): New function.
11307 (linux_target_ops): Install it as target_supports_multi_process
11308 callback.
11309
47c0c975
DE
113102009-05-24 Doug Evans <dje@google.com>
11311
e09875d4
DE
11312 Global renaming of find_thread_pid to find_thread_ptid.
11313 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11314 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11315 All callers updated.
11316
e27d73f6
DE
11317 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11318 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11319 directly.
11320
47c0c975
DE
11321 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11322 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11323 (linux_resume_one_lwp): Ditto.
11324
2acc282a
DE
113252009-05-23 Doug Evans <dje@google.com>
11326
11327 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11328 from struct inferior_list_entry * to struct lwp_info *.
11329 All callers updated.
11330
9f1036c1
DE
113312009-05-13 Doug Evans <dje@google.com>
11332
11333 * linux-x86-low.c: Don't include assert.h.
11334 (x86_siginfo_fixup): Use fatal, not assert.
11335 (x86_arch_setup): Fix comment.
11336
d0722149
DE
113372009-05-12 Doug Evans <dje@google.com>
11338
11339 Biarch support for i386/amd64 gdbserver.
11340 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11341 Add linux-x86-low.c.
11342 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11343 (linux-x86-low.o): Add.
11344 * linux-x86-64-low.c: Delete.
11345 * linux-i386-low.c: Delete.
11346 * linux-x86-low.c: New file.
11347 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11348 linux-x86-low.o.
11349 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11350 linux-x86-low.o.
11351 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11352 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11353 (linux_child_pid_to_exec_file): New function.
11354 (elf_64_header_p, elf_64_file_p): New functions.
11355 (siginfo_fixup): New function.
11356 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11357 give target a chance to convert layout.
11358 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11359 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11360
fdeb2a12
DE
113612009-05-07 Doug Evans <dje@google.com>
11362
11363 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11364 (regsets_store_inferior_registers): Ditto.
11365
a6dbe5df
PA
113662009-05-06 Pedro Alves <pedro@codesourcery.com>
11367
11368 PR server/10048
11369
11370 * linux-low.c (must_set_ptrace_flags): Delete.
11371 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11372 of the global.
11373 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11374 `lwp->must_set_ptrace_flags' instead.
ba42693b 11375 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
11376 (linux_wait_1): ... not here.
11377
5091eb23
DE
113782009-04-30 Doug Evans <dje@google.com>
11379
9f767825
DE
11380 * inferiors.c (started_inferior_callback): New function.
11381 (attached_inferior_callback): New function.
11382 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11383 * server.c (print_started_pid, print_attached_pid): New functions.
11384 (detach_or_kill_for_exit): New function.
11385 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11386 * server.h (have_started_inferiors_p): Declare.
11387 (have_attached_inferiors_p): Declare.
11388
5091eb23
DE
11389 * inferiors.c (remove_process): Fix memory leak, free process.
11390 * linux-low.c (linux_remove_process): New function.
11391 (linux_kill): Call it instead of remove_process.
11392 (linux_detach, linux_wait_1): Ditto.
11393
155c8968
PA
113942009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11395
11396 * configure.srv: Add x86 Windows CE target.
11397
7fe519cb
UW
113982009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11399
11400 * inferiors.c (get_thread_process): Make global.
11401 * server.h (get_thread_process): Add prototype.
11402 * thread-db.c (find_one_thread): Use get_thread_process
11403 instead of current_process.
11404 (thread_db_get_tls_address): Do not crash if called when
11405 thread layer is not yet initialized.
11406
5472f405
UW
114072009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11408
11409 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11410 * spu-low.c (current_tid): Rename to ...
11411 (current_ptid): ... this.
11412 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11413 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11414 ptid_get_lwp (current_ptid) instead of current_tid.
11415 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11416 instead of current_tid. Use find_process_pid to verify pid
11417 argument is valid. Pass proper argument to remove_process.
11418 (spu_thread_alive): Compare current_ptid instead of current_tid.
11419 (spu_resume): Likewise.
11420
55ac2b99
PA
114212009-04-02 Pedro Alves <pedro@codesourcery.com>
11422
11423 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11424 variable.
11425
95954743
PA
114262009-04-01 Pedro Alves <pedro@codesourcery.com>
11427
11428 Implement the multiprocess extensions, and add linux multiprocess
11429 support.
11430
11431 * server.h (ULONGEST): Declare.
11432 (struct ptid, ptid_t): New.
11433 (minus_one_ptid, null_ptid): Declare.
11434 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11435 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11436 (struct inferior_list_entry): Change `id' type from unsigned from
11437 to ptid_t.
11438 (struct sym_cache, struct breakpoint, struct
11439 process_info_private): Forward declare.
11440 (struct process_info): Declare.
11441 (current_process): Declare.
11442 (all_processes): Declare.
11443 (initialize_inferiors): Declare.
11444 (add_thread): Adjust to use ptid_t.
11445 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11446 (add_process, remove_process, find_thread_pid): Declare.
11447 (find_inferior_id): Adjust to use ptid_t.
11448 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11449 (multi_process): Declare.
11450 (push_event): Adjust to use ptid_t.
11451 (read_ptid, write_ptid): Declare.
11452 (prepare_resume_reply): Adjust to use ptid_t.
11453 (clear_symbol_cache): Declare.
11454 * inferiors.c (all_processes): New.
11455 (null_ptid, minus_one_ptid): New.
11456 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11457 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11458 (add_thread): Change unsigned long to ptid. Remove gdb_id
11459 parameter. Adjust.
11460 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11461 (gdb_id_to_thread): Rename to ...
11462 (find_thread_pid): ... this. Change unsigned long to ptid.
11463 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11464 (loaded_dll, pull_pid_from_list): Adjust.
11465 (add_process, remove_process, find_process_pid)
11466 (get_thread_process, current_process, initialize_inferiors): New.
11467 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11468 (struct target_waitstatus) <related_pid>: Ditto.
11469 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11470 return type to int.
11471 (struct target_ops) <join>: Add `pid' argument.
11472 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11473 (struct target_ops) <wait>: Add `ptid' field. Change return type
11474 to ptid.
11475 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11476 (mywait): Add `ptid' argument. Change return type to ptid_t.
11477 (target_pid_to_str): Declare.
11478 * target.c (set_desired_inferior): Adjust to use ptids.
11479 (mywait): Add new `ptid' argument. Adjust.
11480 (target_pid_to_str): New.
11481 * mem-break.h (free_all_breakpoints): Declare.
11482 * mem-break.c (breakpoints): Delelete.
11483 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11484 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11485 to use per-process breakpoint list.
11486 (free_all_breakpoints): New.
11487 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11488 (symbol_cache, all_symbols_looked_up): Delete.
11489 (hexchars): New.
11490 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11491 read_ptid): New.
11492 (prepare_resume_reply): Change ptid argument's type from unsigned
11493 long to ptid_t. Adjust. Implement W;process and X;process.
11494 (free_sym_cache, clear_symbol_cache): New.
11495 (look_up_one_symbol): Adjust to per-process symbol cache. *
11496 * server.c (cont_thread, general_thread, step_thread): Change type
11497 to ptid_t.
11498 (attached): Delete.
11499 (multi_process): New.
11500 (last_ptid): Change type to ptid_t.
11501 (struct vstop_notif) <ptid>: Change type to ptid_t.
11502 (queue_stop_reply, push_event): Change `ptid' argument's type to
11503 ptid_t.
11504 (discard_queued_stop_replies): Add `pid' argument.
11505 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11506 changes. Don't reference the `attached' global.
11507 (attach_inferior): Adjust to mywait interface changes.
11508 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11509 features. Handle and report "multiprocess+". Handle
11510 "qAttached:PID".
11511 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11512 changes.
11513 (handle_v_kill): New.
11514 (handle_v_stopped): Adjust to use target_pid_to_str.
11515 (handle_v_requests): Allow multiple attaches and runs when
11516 multiprocess extensions are in effect. Handle "vKill".
11517 (myresume): Adjust to use ptids.
11518 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11519 (handle_status): Adjust to discard_queued_stop_replies interface
11520 change.
11521 (first_thread_of, kill_inferior_callback)
11522 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11523 (main): Call initialize_inferiors. Adjust to use ptids, killing
11524 and detaching from all inferiors. Handle multiprocess packet
11525 variants.
11526 * linux-low.h: Include gdb_proc_service.h.
11527 (struct process_info_private): New.
11528 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11529 <lwpid_of>: Use ptid_get_lwp.
11530 (get_lwp_thread): Adjust.
11531 (struct lwp_info): Add `dead' member.
11532 (find_lwp_pid): Declare.
11533 * linux-low.c (thread_db_active): Delete.
11534 (new_inferior): Adjust comment.
11535 (inferior_pid): Delete.
11536 (linux_add_process): New.
11537 (handle_extended_wait): Adjust.
11538 (add_lwp): Change unsigned long to ptid.
11539 (linux_create_inferior): Add process to processes table. Adjust
11540 to use ptids. Don't set new_inferior here.
11541 (linux_attach_lwp): Rename to ...
11542 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11543 it. Adjust to use ptids.
11544 (linux_attach_lwp): New.
11545 (linux_attach): Add process to processes table. Don't set
11546 new_inferior here.
11547 (struct counter): New.
11548 (second_thread_of_pid_p, last_thread_of_process_p): New.
11549 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11550 multiple processes.
11551 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11552 processes. Remove process from process table.
11553 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11554 to multiple processes.
11555 (any_thread_of): New.
11556 (linux_detach): Add `pid' argument, and handle it. Remove process
11557 from processes table.
11558 (linux_join): Add `pid' argument. Handle it.
11559 (linux_thread_alive): Change unsighed long argument to ptid_t.
11560 Consider dead lwps as not being alive.
11561 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11562 threads we're not interested in.
11563 (same_lwp, find_lwp_pid): New.
11564 (linux_wait_for_lwp): Change `pid' argument's type from int to
11565 ptid_t. Adjust.
11566 (linux_wait_for_event): Rename to ...
11567 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11568 from int to ptid_t. Adjust.
11569 (linux_wait_for_event): New.
11570 (linux_wait_1): Add `ptid' argument. Change return type to
11571 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11572 that exit from the process table.
11573 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11574 Adjust.
11575 (mark_lwp_dead): New.
11576 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11577 stopping all threads, mark its main lwp as dead.
11578 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11579 ptids.
11580 (fetch_register, usr_store_inferior_registers)
11581 (regsets_fetch_inferior_registers)
11582 (regsets_store_inferior_registers, linux_read_memory)
11583 (linux_write_memory): Inline `inferior_pid'.
11584 (linux_look_up_symbols): Adjust to use per-process
11585 `thread_db_active'.
11586 (linux_request_interrupt): Adjust to use ptids.
11587 (linux_read_auxv): Inline `inferior_pid'.
11588 (initialize_low): Don't reference thread_db_active.
11589 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11590 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11591 (ps_getpid): Return the pid of the current inferior.
11592 * thread-db.c (proc_handle, thread_agent): Delete.
11593 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11594 per-process data.
11595 (find_one_thread): Change argument type to ptid_t. Adjust to
11596 per-process data.
11597 (maybe_attach_thread): Adjust to per-process data and ptids.
11598 (thread_db_find_new_threads): Ditto.
11599 (thread_db_init): Ditto.
11600 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11601 processes table. Adjust to use ptids.
11602 (spu_kill, spu_detach): Adjust interface. Remove process from
11603 processes table.
11604 (spu_join, spu_thread_alive): Adjust interface.
11605 (spu_wait): Adjust interface. Remove process from processes
11606 table. Adjust to use ptids.
11607 * win32-low.c (current_inferior_tid): Delete.
11608 (current_inferior_ptid): New.
11609 (debug_event_ptid): New.
11610 (thread_rec): Take a ptid. Adjust.
11611 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11612 (child_delete_thread): Ditto.
11613 (do_initial_child_stuff): Add `attached' argument. Add process to
11614 processes table.
11615 (child_fetch_inferior_registers, child_store_inferior_registers):
11616 Adjust.
11617 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11618 (win32_attach): Pass 1 to do_initial_child_stuff.
11619 (win32_kill): Adjust interface. Remove process from processes
11620 table.
11621 (win32_detach): Ditto.
11622 (win32_join): Adjust interface.
11623 (win32_thread_alive): Take a ptid.
11624 (win32_resume): Adjust to use ptids.
11625 (get_child_debug_event): Ditto.
11626 (win32_wait): Adjust interface. Remove exiting process from
11627 processes table.
11628
bd99dc85
PA
116292009-04-01 Pedro Alves <pedro@codesourcery.com>
11630
11631 Non-stop mode support.
11632
11633 * server.h (non_stop): Declare.
11634 (gdb_client_data, handler_func): Declare.
11635 (delete_file_handler, add_file_handler, start_event_loop):
11636 Declare.
11637 (handle_serial_event, handle_target_event, push_event)
11638 (putpkt_notif): Declare.
11639 * target.h (enum resume_kind): New.
11640 (struct thread_resume): Replace `step' field by `kind' field.
11641 (TARGET_WNOHANG): Define.
11642 (struct target_ops) <wait>: Add `options' argument.
11643 <supports_non_stop, async, start_non_stop>: New fields.
11644 (target_supports_non_stop, target_async): New.
11645 (start_non_stop): Declare.
11646 (mywait): Add `options' argument.
11647 * target.c (mywait): Add `options' argument. Print child exit
11648 notifications here.
11649 (start_non_stop): New.
11650 * server.c (non_stop, own_buf, mem_buf): New globals.
11651 (struct vstop_notif): New.
11652 (notif_queue): New global.
11653 (queue_stop_reply, push_event, discard_queued_stop_replies)
11654 (send_next_stop_reply): New.
11655 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11656 interface changes.
11657 (attach_inferior): In non-stop mode, don't wait for the target
11658 here.
11659 (handle_general_set): Handle QNonStop.
11660 (handle_query): When handling qC, return the current general
11661 thread, instead of the first thread of the list.
11662 (handle_query): If the backend supports non-stop mode, include
11663 QNonStop+ in the qSupported query response.
11664 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11665 and non-stop mode.
11666 (handle_v_attach, handle_v_run): Handle non-stop mode.
11667 (handle_v_stopped): New.
11668 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11669 (myresume): Adjust to use resume_kind. Handle non-stop.
11670 (queue_stop_reply_callback): New.
11671 (handle_status): Handle non-stop mode.
11672 (main): Clear non_stop flag on reconnection. Use the event-loop.
11673 Refactor serial protocol handling from here ...
11674 (process_serial_event): ... to this new function. When GDB
11675 selects any thread, select one here. In non-stop mode, wait until
11676 GDB acks all pending events before exiting.
11677 (handle_serial_event, handle_target_event): New.
11678 * remote-utils.c (remote_open): Install remote_desc in the event
11679 loop.
11680 (remote_close): Remove remote_desc from the event loop.
11681 (putpkt_binary): Rename to...
11682 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11683 (putpkt_binary): New as wrapper around putpkt_binary_1.
11684 (putpkt_notif): New.
11685 (prepare_resume_reply): In non-stop mode, don't change the
11686 general_thread.
11687 * event-loop.c: New.
11688 * Makefile.in (OBJ): Add event-loop.o.
11689 (event-loop.o): New rule.
11690
11691 * linux-low.h (pid_of): Moved here.
11692 (lwpid_of): New.
11693 (get_lwp_thread): Use lwpid_of.
11694 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11695 * linux-low.c (pid_of): Delete.
11696 (inferior_pid): Use lwpid_of.
11697 (linux_event_pipe): New.
11698 (target_is_async_p): New.
11699 (delete_lwp): New.
11700 (handle_extended_wait): Use lwpid_of.
11701 (add_lwp): Don't set lwpid field.
11702 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11703 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11704 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11705 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11706 first. Adjust to linux_wait_for_event interface changes. Use
11707 lwpid_of.
11708 (linux_detach): Don't delete the main lwp here.
11709 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11710 (status_pending_p): Don't consider explicitly suspended lwps.
11711 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11712 pointer. Add OPTIONS argument. Change return type to int. Use
11713 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11714 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11715 pointer. Add status pointer argument. Return a pid instead of a
11716 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11717 changes. In non-stop mode, don't switch to a random thread.
11718 (linux_wait): Rename to...
11719 (linux_wait_1): ... this. Add target_options argument, and handle
11720 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11721 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11722 clean exit and signal exit code. Don't stop all threads in
11723 non-stop mode. In all-stop mode, only stop all threads when
11724 reporting a stop to GDB. Handle explicit thread stop requests.
11725 (async_file_flush, async_file_mark): New.
11726 (linux_wait): New.
11727 (send_sigstop): Use lwpid_of.
11728 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11729 interface changes. In non-stop mode, don't switch to a random
11730 thread.
11731 (linux_resume_one_lwp): Use lwpid_of.
11732 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11733 (linux_resume_one_thread): ... this. Handle resume_stop. In
11734 non-stop mode, don't look for pending flag in all threads.
11735 (resume_status_pending_p): Don't consider explicitly suspended
11736 threads.
11737 (my_waitpid): Reimplement. Emulate __WALL.
11738 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11739 Use lwpid_of.
11740 (sigchld_handler, linux_supports_non_stop, linux_async)
11741 (linux_start_non_stop): New.
11742 (linux_target_ops): Register linux_supports_non_stop, linux_async
11743 and linux_start_non_stop.
11744 (initialize_low): Install SIGCHLD handler.
11745 * thread-db.c (thread_db_create_event, find_one_thread)
11746 (thread_db_get_tls_address): Use lwpid_of.
11747 * win32-low.c (win32_detach): Adjust to use resume_kind.
11748 (win32_wait): Add `options' argument.
11749 * spu-low.c (spu_resume): Adjust to use resume_kind.
11750 (spu_wait): Add `options' argument.
11751
5b1c542e
PA
117522009-04-01 Pedro Alves <pedro@codesourcery.com>
11753
11754 Decouple target code from remote protocol.
11755
11756 * target.h (enum target_waitkind): New.
11757 (struct target_waitstatus): New.
11758 (struct target_ops) <wait>: Return an unsigned long. Take a
11759 target_waitstatus pointer instead of a char pointer.
11760 (mywait): Likewise.
11761 * target.c (mywait): Change prototype to return an unsigned long.
11762 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11763 * server.h (thread_from_wait, old_thread_from_wait): Delete
11764 declarations.
11765 (prepare_resume_reply): Change prototype to take a
11766 target_waitstatus.
11767 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11768 (last_status, last_ptid): New.
11769 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11770 pid instead of a signal.
11771 (attach_inferior): Remove "status" and "signal" parameters.
11772 Adjust.
11773 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11774 not as an address.
11775 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11776 (handle_v_requests, myresume): Remove "status" and "signal"
11777 parameters. Adjust.
11778 (handle_status): New.
11779 (main): Delete local `status'. Adjust.
11780 * remote-utils.c: Include target.h.
11781 (prepare_resume_reply): Change prototype to take a
11782 target_waitstatus. Adjust.
11783
11784 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11785 interface.
11786 * spu-low.c (spu_wait): Adjust.
11787 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11788 Delete.
11789 (win32_wait): Adjust.
11790
2bd7c093
PA
117912009-04-01 Pedro Alves <pedro@codesourcery.com>
11792
11793 * target.h (struct thread_resume): Delete leave_stopped member.
11794 (struct target_ops): Add a `n' argument to the `resume' callback.
11795 * server.c (start_inferior): Adjust.
11796 (handle_v_cont, myresume): Adjust.
11797 * linux-low.c (check_removed_breakpoint): Adjust to resume
11798 interface change, and to removed leave_stopped field.
11799 (resume_ptr): Delete.
11800 (struct thread_resume_array): New.
11801 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11802 resume interface change.
11803 (linux_continue_one_thread, linux_queue_one_thread)
11804 (resume_status_pending_p): Check if the resume field is NULL
11805 instead of checking the leave_stopped member.
11806 (linux_resume): Adjust to the target resume interface change.
11807 * spu-low.c (spu_resume): Adjust to the target resume interface
11808 change.
11809 * win32-low.c (win32_detach, win32_resume): Ditto.
11810
c35fafde
PA
118112009-04-01 Pedro Alves <pedro@codesourcery.com>
11812
11813 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11814 flag.
11815 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11816 pending.
11817 (linux_continue_one_thread): Only preserve the stepping flag if
11818 there's a pending breakpoint.
11819
0a59d50b
PA
118202009-03-31 Pedro Alves <pedro@codesourcery.com>
11821
11822 * server.c (main): After the inferior having exited, call
11823 remote_close before exiting gdbserver.
11824
f04c6d38
TJB
118252009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11826
11827 Fix size of FPSCR in Power 7 processors.
11828 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11829 (PPC_FEATURE_HAS_DFP): New #define.
11830 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11831 size of the FPSCR.
11832
78e5cee6
PA
118332009-03-23 Pedro Alves <pedro@codesourcery.com>
11834
11835 * server.c (handle_query) Whitespace and formatting.
11836
1b3f6016
PA
118372009-03-22 Pedro Alves <pedro@codesourcery.com>
11838
11839 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11840 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11841 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11842 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11843 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11844 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11845 Makefile.in, configure.ac: Fix whitespace throughout.
11846 * configure: Regenerate.
11847
a07b2135
PA
118482009-03-22 Pedro Alves <pedro@codesourcery.com>
11849
11850 * inferiors.c (find_inferior): Make it safe for the callback
11851 function to delete the currently iterated inferior.
11852
67cc2626
PA
118532009-03-22 Pedro Alves <pedro@codesourcery.com>
11854
11855 * Makefile.in (linuw_low_h): Move higher.
11856 (thread-db.o): Depend on $(linux_low_h).
11857
54a0b537
PA
118582009-03-17 Pedro Alves <pedro@codesourcery.com>
11859
11860 Rename "process" to "lwp" throughout.
11861
11862 * linux-low.c (all_processes): Rename to...
11863 (all_lwps): ... this.
11864 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11865 (add_process): Rename to ...
11866 (add_lwp): ... this. Adjust.
11867 (linux_create_inferior): Adjust.
11868 (linux_attach_lwp): Adjust.
11869 (linux_attach): Adjust.
11870 (linux_kill_one_process): Rename to ...
11871 (linux_kill_one_lwp): ... this. Adjust.
11872 (linux_kill): Adjust.
11873 (linux_detach_one_process): Rename to ...
11874 (linux_detach_one_lwp): ... this. Adjust.
11875 (linux_detach): Adjust.
11876 (check_removed_breakpoint): Adjust.
11877 (status_pending_p): Adjust.
11878 (linux_wait_for_process): Rename to ...
11879 (linux_wait_for_lwp): ... this. Adjust.
11880 (linux_wait_for_event): Adjust.
11881 (send_sigstop): Adjust.
11882 (wait_for_sigstop): Adjust.
11883 (stop_all_processes): Rename to ...
11884 (stop_all_lwps): ... this.
11885 (linux_resume_one_process): Rename to ...
11886 (linux_resume_one_lwp): ... this. Adjust.
11887 (linux_set_resume_request, linux_continue_one_thread)
11888 (linux_queue_one_thread, resume_status_pending_p)
11889 (usr_store_inferior_registers, regsets_store_inferior_registers)
11890 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11891 Adjust.
11892 * linux-low.h (get_process): Rename to ...
11893 (get_lwp): ... this. Adjust.
11894 (get_thread_process): Rename to ...
11895 (get_thread_lwp): ... this. Adjust.
11896 (get_process_thread): Rename to ...
11897 (get_lwp_thread): ... this. Adjust.
11898 (struct process_info): Rename to ...
11899 (struct lwp_info): ... this.
11900 (all_processes): Rename to ...
11901 (all_lwps): ... this.
11902 * proc-service.c (ps_lgetregs): Adjust.
11903 * thread-db.c (thread_db_create_event, find_one_thread)
11904 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11905
0b16c5cf
PA
119062009-03-14 Pedro Alves <pedro@codesourcery.com>
11907
11908 * server.c (handle_query): Handle "qAttached".
11909
32de4b9d
NS
119102009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11911
11912 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11913 GPLv3, update license URL.
11914
2aecd87f
DE
119152009-03-01 Doug Evans <dje@google.com>
11916
93efd302 11917 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
11918 (server_h): Add gdb_signals.h.
11919 (signals.o): Update.
11920 * server.h (target_signal_from_host,target_signal_to_host_p)
11921 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11922
86b1f9c5
PM
119232009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11924
11925 * remote-utils.c (getpkt): Also generate remote-debug
11926 information if noack_mode is set.
11927
4aa995e1
PA
119282009-02-06 Pedro Alves <pedro@codesourcery.com>
11929
11930 * server.c (handle_query): Report qXfer:siginfo:read and
11931 qXfer:siginfo:write as supported and handle them.
11932 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11933 * linux-low.c (linux_xfer_siginfo): New.
11934 (linux_target_ops): Set it.
11935
62709adf
PA
119362009-01-26 Pedro Alves <pedro@codesourcery.com>
11937
11938 * server.c (gdbserver_usage): Mention --remote-debug.
11939 (main): Accept '--remote-debug' switch.
11940
aef93bd7
DE
119412009-01-18 Doug Evans <dje@google.com>
11942
11943 * regcache.c (new_register_cache): No need to check result of xcalloc.
11944 * server.c (handle_search_memory): Back out calls to xmalloc,
11945 result is checked and error is returned to user upon failure.
11946 (handle_query): Ditto. Add more checks for result of malloc.
11947 (handle_v_cont): Check result of malloc, report error back to
11948 user upon failure.
11949 (handle_v_run): Ditto. Call freeargv.
11950 * server.h (freeargv): Declare.
11951 * utils.c (freeargv): New fn.
11952
54363045
DE
119532009-01-15 Doug Evans <dje@google.com>
11954
f626972c
DE
11955 * gdbreplay.c (perror_with_name): Make arg const char *.
11956 * server.h (target_signal_to_name): Make return type const char *.
0842e787 11957 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 11958 * utils.c (perror_with_name): Make arg const char *.
54363045 11959
18aae699
PA
119602009-01-14 Pedro Alves <pedro@codesourcery.com>
11961
11962 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11963 when handling a EXIT_PROCESS_DEBUG_EVENT.
11964
ff703abe
JB
119652009-01-06 Joel Brobecker <brobecker@adacore.com>
11966
11967 * gdbreplay.c (gdbreplay_version): Update copyright year.
11968 * server.c (gdbserver_version): Likewise.
11969
f21cc1a2 119702009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
11971
11972 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 11973 (handle_extended_wait): Improve comment.
0e21c1ec 11974
bca929d3
DE
119752008-12-13 Doug Evans <dje@google.com>
11976
11977 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11978 * server.h (ATTR_MALLOC): New macro.
11979 (xmalloc,xcalloc,xstrdup): Declare.
11980 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11981 * inferiors.c: Ditto.
11982 * linux-low.c: Ditto.
11983 * mem-break.c: Ditto.
11984 * regcache.c: Ditto.
11985 * remote-utils.c: Ditto.
11986 * server.c: Ditto.
11987 * target.c: Ditto.
11988 * win32-low.c: Ditto.
11989
97438e3f
DE
119902008-12-12 Doug Evans <dje@google.com>
11991
896c7fbb
DE
11992 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
11993 in debugging printf.
11994
97438e3f
DE
11995 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
11996
e3b886f8
DE
119972008-12-09 Doug Evans <dje@google.com>
11998
11999 * linux-low.h (struct process_info): Delete member tid, unused.
12000 * thread-db.c (find_one_thread): Update.
12001 (maybe_attach_thread): Update.
12002
07e059b5
VP
120032008-12-02 Pedro Alves <pedro@codesourcery.com>
12004
889bf7c5
PA
12005 * target.h (struct target_ops): Add qxfer_osdata member.
12006 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12007 and dirent.h.
12008 (linux_qxfer_osdata): New functions.
12009 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12010 callback.
12011 * server.c (handle_query): Handle "qXfer:osdata:read:".
12012 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12013 (buffer_xml_printf): New functions.
12014 * server.h (struct buffer): New.
12015 (buffer_grow_str, buffer_grow_str0): New macros.
12016 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12017 (buffer_xml_printf): Declare.
07e059b5 12018
4cab47ab
DE
120192008-11-24 Doug Evans <dje@google.com>
12020
12021 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12022
f142445f
DJ
120232008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12024
12025 * server.c (handle_v_run): Always use the supplied argument list.
12026
d0107bb6 120272008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12028
d0107bb6
BW
12029 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12030 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12031
2c4ad781
TJB
120322008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12033
12034 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12035 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12036 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12037 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12038 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12039 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12040 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12041 XML target descriptions.
12042 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12043 when inferior is running on an ISA 2.05 or later processor. Add
12044 special case to return offset for full 64-bit slot of FPSCR when
12045 in 32-bits.
12046
dfb64f85
DJ
120472008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12048
12049 * Makefile.in (SFILES, clean): Added sparc64 files.
12050 (reg-sparc64.o, reg-sparc64.c): New.
12051 * configure.srv (sparc*-*-linux*): New configuration.
12052 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12053 syscall arguments for SPARC.
12054 (regsets_store_inferior_registers): Likewise.
12055 * linux-sparc-low.c: New file.
12056
66b6e1dd
DE
120572008-10-21 Doug Evans <dje@google.com>
12058
12059 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12060 (READLINE_DIR,READLINE_DEP): Delete.
12061 (INTERNAL_CFLAGS): Update.
12062 (LINTFLAGS): Update.
12063
9b710a42
PA
120642008-10-10 Pedro Alves <pedro@codesourcery.com>
12065
12066 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12067 whole argv from the last run, not just argv[0].
12068
5822d809
PA
120692008-09-08 Pedro Alves <pedro@codesourcery.com>
12070
12071 * regcache.c (new_register_cache): Return NULL if the register
12072 cache size isn't known yet.
12073 (free_register_cache): Avoid dereferencing a NULL regcache.
12074
74aac56f
DJ
120752008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12076
12077 * configure.srv: Merge MIPS and MIPS64.
12078
400b20f5
MR
120792008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12080
12081 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12082
677c5bb1
LM
120832008-08-18 Luis Machado <luisgpm@br.ibm.com>
12084
12085 * Makefile.in: Add required vsx dependencies.
12086
12087 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12088 Declare init_registers_powerpc_vsx32l.
12089 Declare init_registers_powerpc_vsx64l.
12090 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12091 (ppc_arch_setup): Check for VSX in hwcap.
12092 (ppc_fill_vsxregset): New function.
12093 (ppc_store_vsxregset): New function.
12094 Add new VSX entry in regset_info target_regsets.
12095
12096 * configure.srv: Add new VSX dependencies.
12097
a6f3e723
SL
120982008-08-12 Pedro Alves <pedro@codesourcery.com>
12099
12100 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12101 (remote_open): Set or clear transport_is_reliable.
12102 (putpkt_binary): Don't expect acks in noack mode.
12103 (getpkt): Don't send ack/nac in noack mode.
12104 * server.c (handle_general_set): Handle QStartNoAckMode.
12105 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12106 qSupported.
12107 (main): Reset noack_mode on every connection.
12108 * server.h (noack_mode): Declare.
12109
a417dc56
RW
121102008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12111
12112 * Makefile.in (GDBREPLAY_OBS): New variable.
12113 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12114
3221518c
UW
121152008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12116 Daniel Jacobowitz <dan@codesourcery.com>
12117
12118 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12119 (usr_store_inferior_registers): Likewise.
12120 (regsets_store_inferior_registers): Likewise.
12121
ec56be1b
PA
121222008-07-31 Rolf Jansen <rj@surtec.com>
12123 Pedro Alves <pedro@codesourcery.com>
12124
12125 * configure.ac: Check for memmem declaration.
12126 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12127 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12128 (disable_packet_qfThreadInfo): Unconditionally compile.
12129 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12130 * configure, config.in: Regenerate.
12131
2fe5e3ff
DE
121322008-07-28 Doug Kwan <dougkwan@google.com>
12133
12134 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12135 (linux_write_memory): Remove declaration of errno.
12136
836acd6d
UW
121372008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12138
12139 * linux-low.c (handle_extended_wait): Do not use "status"
12140 variable uninitialized.
12141
aeba519e
PA
121422008-07-07 Pedro Alves <pedro@codesourcery.com>
12143
12144 * server.c (handle_v_attach): Inhibit reporting dll changes.
12145
db42f210
PA
121462008-06-27 Pedro Alves <pedro@codesourcery.com>
12147
12148 * remote-utils.c (prepare_resume_reply): If requested, don't
12149 output "thread:TID" in the T stop reply.
12150
12151 * server.c (disable_packet_vCont, disable_packet_Tthread)
12152 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12153 (handle_query): If requested, disable support for qC, qfThreadInfo
12154 and qsThreadInfo.
12155 (handle_v_requests): If requested, disable support for vCont.
12156 (gdbserver_show_disableable): New.
12157 (main): Handle --disable-packet and --disable-packet=LIST.
12158
12159 * server.h (disable_packet_vCont, disable_packet_Tthread)
12160 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12161
8e4c5421
CD
121622008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12163
12164 * server.c (gdbserver_usage): Mention --version.
12165
6e23a804
DJ
121662008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12167
12168 * Makefile.in (gdbreplay.o): New rule.
12169
90aa6a40
JM
121702008-06-06 Joseph Myers <joseph@codesourcery.com>
12171
12172 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12173 message, not gdbserver.
12174
c16158bc 121752008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
12176 Nathan Sidwell <nathan@codesourcery.com>
12177 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
12178
12179 * acinclude.m4: Include ../../config/acx.m4.
12180 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12181 * configure, config.in: Regenerate.
12182 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12183 * server.c (gdbserver_version): Print PKGVERSION.
12184 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12185 (main): Adjust gdbserver_usage calls.
12186 * gdbreplay.c (version, host_name): Add declarations.
12187 (gdbreplay_version, gdbreplay_usage): New.
12188 (main): Accept --version and --help options.
12189
aeb75bf5
DJ
121902008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12191
12192 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12193 (arm_breakpoint_at): Handle Thumb.
12194 (the_low_target): Add comment.
12195
76b233dd
UW
121962008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12197
12198 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12199
08388c79
DE
122002008-05-09 Doug Evans <dje@google.com>
12201
a3c83fae
DE
12202 * server.h (decode_search_memory_packet): Declare.
12203 * remote-utils.c (decode_search_memory_packet): New fn.
12204 * server.c (handle_search_memory_1): New fn.
08388c79
DE
12205 (handle_search_memory): New fn.
12206 (handle_query): Process qSearch:memory packets.
12207
bb9c3d36
UW
122082008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12209
12210 * regcache.c (registers_length): Remove.
12211 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12212 full register packet.
12213 * regcache.h (registers_length): Remove prototype.
12214 * server.h (PBUFSIZ): Define to 16384.
12215
7284e1be
UW
122162008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12217
12218 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12219 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12220 powerpc-64l.o, and powerpc-altivec64l.o.
12221 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12222 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12223 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12224 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12225 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12226 to srv_xmlfiles.
12227
12228 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12229 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12230 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12231 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12232 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12233 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12234 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12235 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12236 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12237 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12238 (clean): Update.
12239
12240 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12241 (init_registers_powerpc_32l): ... this new prototype.
12242 (init_registers_powerpc_32): Remove, replace by ...
12243 (init_registers_powerpc_altivec32l): ... this new prototype.
12244 (init_registers_powerpc_e500): Remove, replace by ...
12245 (init_registers_powerpc_e500l): ... this new prototype.
12246 (init_registers_ppc64): Remove, replace by ...
12247 (init_registers_powerpc_64l): ... this new prototype.
12248 (init_registers_powerpc_64): Remove, replace by ...
12249 (init_registers_powerpc_altivec64l): ... this new prototype.
12250 (ppc_num_regs): Set to 73.
12251 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12252 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12253 (ppc_cannot_store_register): Handle orig_r3 and trap.
12254 (ppc_arch_setup): Update init_registers_... calls.
12255 (ppc_fill_gregset): Handle orig_r3 and trap.
12256
12257 * inferiors.c (clear_inferiors): Reset current_inferior.
12258
fdc59709
PB
122592008-04-23 Paolo Bonzini <bonzini@gnu.org>
12260
889bf7c5
PA
12261 * acinclude.m4: Add override.m4.
12262 * configure: Regenerate.
fdc59709 12263
c9b2f845
UW
122642008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12265
12266 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12267 initial call to init_register_ppc64.
12268
550512b8
UW
122692008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12270
43aaf8b6
PA
12271 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12272 single powerpc*-*-linux* case.
550512b8
UW
12273 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12274
b6430ec3
UW
122752008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12276
12277 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 12278 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
12279 from reg_xmlfiles.
12280 * linux-ppc-low.c: Include <elf.h>.
12281 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12282 (ppc_hwcap): New global variable.
12283 (ppc_regmap): Remove __SPE__ #ifdef sections.
12284 (ppc_regmap_e500): New global variable.
12285 (ppc_cannot_store_register): Update __SPE__ special case.
12286 (ppc_get_hwcap): New function.
12287 (ppc_arch_setup): Use it to determine whether inferior supports
12288 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12289 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12290 Do not access registers if target does not support AltiVec.
12291 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12292 Do not access registers if target does not support SPE.
12293 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12294
52fa2412
UW
122952008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12296
12297 * linux-low.c (disabled_regsets, num_regsets): New.
12298 (use_regsets_p): Delete.
12299 (linux_wait_for_process): Clear disabled_regsets.
12300 (regsets_fetch_inferior_registers): Check and set it.
12301 (regsets_store_inferior_registers): Likewise.
12302 (linux_fetch_registers, linux_store_registers): Do not use
12303 use_regsets_p.
12304 (initialize_low): Allocate disabled_regsets.
12305
e28b3332
DJ
123062008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12307
12308 * Makefile.in (LIBOBJS): New.
12309 (OBS): Use LIBOBJS.
12310 (memmem.o): New rule.
12311 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12312 * configure: Regenerated.
12313
4536995d
UW
123142008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12315
12316 * server.c (handle_query): Never return "unsupported" for
12317 qXfer:features:read queries.
12318
221c031f
UW
123192008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12320
12321 * server.c (get_features_xml): Fix inverted condition.
12322 (handle_query): Always support qXfer:feature:read.
12323
ccd213ac
DJ
123242008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12325
12326 * server.c (wrapper_argv): New.
12327 (start_inferior): Handle wrapper_argv. If set, expect an extra
12328 trap.
12329 (gdbserver_usage): Document --wrapper.
12330 (main): Parse --wrapper.
12331
6fe305f7
UW
123322008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12333
12334 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12335 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12336 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12337 (ppc_set_pc): Likewise.
12338 (ppc_arch_setup): New function.
12339 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12340 of collect_register.
889bf7c5 12341 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 12342
5b0a002e
UW
123432008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12344
12345 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12346 instead of linux-ppc64-low.o.
12347 * linux-ppc64-low.c: Remove file.
12348 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12349 (linux-ppc64-low.o): Remove rule.
12350
12351 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12352 (init_registers_powerpc_64): Likewise.
12353 (ppc_regmap): Conditionally define depending on __powerpc64__.
12354 (ppc_cannot_store_register): Do not special-case "fpscr" when
12355 compiled on __powerpc64__.
12356 (ppc_collect_ptrace_register): New function.
12357 (ppc_supply_ptrace_register): New function.
12358 (ppc_breakpoint): Change type to "unsigned int".
12359 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12360 (the_low_target): Conditionally provide initializers for the
889bf7c5 12361 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
12362 collect_ptrace_register and supply_ptrace_register members.
12363
9b4b61c8
UW
123642008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12365
12366 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12367 * server.c (gdbserver_xmltarget): Define.
12368 (get_features_xml): Use it to replace "target.xml" and arch_string.
12369
12370 * configure.srv: Remove srv_xmltarget. Add XML files that were
12371 mentioned there to srv_xmlfiles instead. Remove conditional tests
12372 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12373 srv_xmlfiles and srv_regobj to include all possible choices.
12374 * configure.ac (srv_xmltarget): Remove.
12375 (srv_xmlfiles): Do not add "target.xml".
12376 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12377 checks for supplementary target information.
12378 * configure: Regenerate.
12379 * Makefile.in (XML_TARGET): Remove.
12380 (target.xml): Remove rule.
12381 (clean): Do not clean up target.xml.
12382 (.PRECIOUS): Do not mention target.xml.
12383
12384 * target.h (struct target_ops): Remove arch_string member.
12385 * linux-low.c (linux_arch_string): Remove.
12386 (linux_target_ops): Remove arch_string initializer.
12387 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12388 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12389 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12390 * spu-low.c (spu_arch_string): Remove.
12391 (spu_target_ops): Remove arch_string initializer.
12392 * win32-low.c (win32_arch_string): Remove.
12393 (win32_target_ops): Remove arch_string initializer.
12394 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12395 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12396 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12397
ee1a7ae4
UW
123982008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12399
12400 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12401 by collect_ptrace_register and supply_ptrace_register hooks.
12402 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12403 instead of checking for the_low_target.left_pad_xfer.
12404 (usr_store_inferior_registers): Use collect_ptrace_register callback
12405 instead of checking for the_low_target.left_pad_xfer.
12406
12407 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12408 (s390_supply_ptrace_register): Likewise.
12409 (s390_fill_gregset): Call s390_collect_ptrace_register.
12410 (the_low_target): Update.
12411
12412 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12413 (ppc_supply_ptrace_register): Likewise.
12414 (the_low_target): Update.
12415
12416 * linux-i386-low.c (the_low_target): Update.
12417 * linux-x86-64-low.c (the_low_target): Update.
12418
d61ddec4
UW
124192008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12420
12421 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12422 reg-s390.o and reg-s390x.o.
12423
12424 * linux-low.c (new_inferior): New global variable.
12425 (linux_create_inferior, linux_attach): Set it.
12426 (linux_wait_for_process): Call the_low_target.arch_setup after the
12427 target has stopped for the first time.
12428 (initialize_low): Do not call the_low_target.arch_setup.
12429
12430 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12431 (s390_set_pc): Likewise.
12432 (s390_arch_setup): New function.
12433 (the_low_target): Use s390_arch_setup as arch_setup routine.
12434
12435 * regcache.c (realloc_register_cache): New function.
12436 (set_register_cache): Call it for each existing regcache.
12437
d05b4ac3
UW
124382008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12439
12440 * server.h (init_registers): Remove prototype.
12441
12442 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12443 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12444 instead of init_registers ().
12445 * linux-arm-low.c (init_registers_arm): Add prototype.
12446 (init_registers_arm_with_iwmmxt): Likewise.
12447 (the_low_target): Add initializer for arch_setup field.
12448 * linux-cris-low.c (init_registers_cris): Add prototype.
12449 (the_low_target): Add initializer for arch_setup field.
12450 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12451 (the_low_target): Add initializer for arch_setup field.
12452 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12453 (the_low_target): Add initializer for arch_setup field.
12454 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12455 (the_low_target): Add initializer for arch_setup field.
12456 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12457 (the_low_target): Add initializer for arch_setup field.
12458 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12459 (the_low_target): Add initializer for arch_setup field.
12460 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12461 (init_registers_mips64_linux): Likewise.
12462 (the_low_target): Add initializer for arch_setup field.
12463 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12464 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12465 (the_low_target): Add initializer for arch_setup field.
12466 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12467 (init_registers_powerpc_64): Likewise.
12468 (the_low_target): Add initializer for arch_setup field.
12469 * linux-s390-low.c (init_registers_s390): Add prototype.
12470 (init_registers_s390x): Likewise.
12471 (the_low_target): Add initializer for arch_setup field.
12472 * linux-sh-low.c (init_registers_sh): Add prototype.
12473 (the_low_target): Add initializer for arch_setup field.
12474 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12475 (the_low_target): Add initializer for arch_setup field.
12476 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12477 (the_low_target): Add initializer for arch_setup field.
12478
12479 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12480 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12481 instead of init_registers ().
12482 * win32-arm-low.c (init_registers_arm): Add prototype.
12483 (the_low_target): Add initializer for arch_setup field.
12484 * win32-i386-low.c (init_registers_i386): Add prototype.
12485 (the_low_target): Add initializer for arch_setup field.
12486
12487 * spu-low.c (init_registers_spu): Add prototype.
12488 (initialize_low): Call initialie_registers_spu () instead of
12489 initialize_registers ().
12490
fd96d250
PA
124912008-02-19 Pedro Alves <pedro@codesourcery.com>
12492
12493 * server.c (handle_v_requests): When handling the vRun and vAttach
12494 packets, if already debugging a process, don't kill it. Return an
12495 error instead.
12496
d41b6bb4
DJ
124972008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12498
12499 * server.c (handle_query): Correct length check.
12500
5ac588cf
PA
125012008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12502
12503 * win32-low.c (do_initial_child_stuff): Add process handle
12504 parameter. Set current_process_handle and current_process_id from the
12505 parameters. Clear globals.
12506 (win32_create_inferior): Don't set current_process_handle and
12507 current_process_id here. Instead pass them on the call to
12508 do_initial_child_stuff.
12509 (win32_attach): Likewise.
12510 (win32_clear_inferiors): New.
12511 (win32_kill): Don't close the current process handle or the
12512 current thread handle here. Instead call win32_clear_inferiors.
12513 (win32_detach): Don't open a new handle to the process. Call
12514 win32_clear_inferiors.
12515 (win32_join): Don't rely on current_process_handle; open a new
12516 handle using the process id.
12517 (win32_wait): Call win32_clear_inferiors when the inferior process
12518 has exited.
12519
ecd7ecbc
DJ
125202008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12521
12522 * server.c (monitor_show_help): Add "exit".
12523
1525d545
MG
125242008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12525
ecd7ecbc 12526 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
12527 (clean): Add reg-xtensa.c.
12528 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
12529 * configure.srv (xtensa*-*-linux*) New target.
12530 * linux-xtensa-low.c: New.
12531 * xtensa-xtregs.c: New.
1525d545 12532
59a016f0
PA
125332008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12534
12535 * hostio.c: Don't include errno.h.
12536 (errno_to_fileio_errno): Move to hostio-errno.
12537 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12538 error number outputting to the target->hostio_last_error callback.
12539 (hostio_packet_error): Use FILEIO_EINVAL directly.
12540 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12541 calls to hostio_error.
12542 * hostio-errno.c: New.
12543 * server.h (hostio_last_error_from_errno): Declare.
12544 * target.h (target_ops): Add hostio_last_error member.
12545 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12546 as hostio_last_error handler.
889bf7c5 12547 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
12548 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12549 (wince_hostio_last_error): New functions.
12550 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12551 as hostio_last_error handler.
12552 (win32_target_ops) [!_WIN32_WCE]: Register
12553 hostio_last_error_from_errno as hostio_last_error handler.
12554 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12555 (hostio-errno.o): New rule.
12556 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12557 * configure.srv (srv_hostio_err_objs): New variable. Default to
12558 hostio-errno.o.
12559 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12560 * configure: Regenerate.
12561
2d717e4f
DJ
125622008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12563
12564 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12565 (linux_kill, linux_detach): Clean up the process list.
12566 * remote-utils.c (remote_open): Improve port number parsing.
12567 (putpkt_binary, input_interrupt): Only send interrupts if the target
12568 is running.
12569 * server.c (extended_protocol): Make static.
12570 (attached): Define earlier.
12571 (exit_requested, response_needed, program_argv): New variables.
12572 (target_running): New.
12573 (start_inferior): Clear attached here.
12574 (attach_inferior): Set attached here.
12575 (require_running): Define.
12576 (handle_query): Use require_running and target_running. Implement
12577 "monitor exit".
12578 (handle_v_attach, handle_v_run): New.
12579 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12580 (gdbserver_usage): Update.
12581 (main): Redo argument parsing. Handle --debug and --multi. Handle
12582 --attach along with other options or after the port. Save
12583 program_argv. Support no initial program. Resynchronize
12584 communication with GDB after an error. Handle "monitor exit".
12585 Use require_running and target_running. Always allow the extended
12586 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12587 restart in extended mode.
12588 * README: Refer to the GDB manual. Update --attach usage.
12589
7407e2de
AS
125902007-12-20 Andreas Schwab <schwab@suse.de>
12591
12592 * linux-low.c (STACK_SIZE): Define.
12593 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12594 (linux_test_for_tracefork): Likewise.
12595
b65d95c5
DJ
125962007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12597
12598 * linux-low.c (linux_wait_for_event): Update messages. Do not
12599 reinsert auto-delete breakpoints.
12600 * mem-break.c (struct breakpoint): Change return type of handler to
12601 int.
12602 (set_breakpoint_at): Update handler type.
12603 (reinsert_breakpoint_handler): Return 1 instead of calling
12604 delete_breakpoint.
12605 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12606 setting a new one.
12607 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12608 * mem-break.h (set_breakpoint_at): Update handler type.
12609 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12610 * win32-low.c (auto_delete_breakpoint): New.
12611 (get_child_debug_event): Use it.
12612
4e799345
DJ
126132007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12614
12615 * configure.ac: Check for pread and pwrite.
12616 * hostio.c (handle_pread): Fall back to lseek and read.
12617 (handle_pwrite): Fall back to lseek and write.
12618 * config.in, configure: Regenerated.
12619
27524b67
DJ
126202007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12621
12622 * server.c (myresume): Add own_buf argument.
12623 (main): Update calls.
12624
a20d5e98
DJ
126252007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12626
12627 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12628 * remote-utils.c (remote_open): Do not call disable_async_io.
12629 (block_async_io): Delete.
12630 (unblock_async_io): Make static.
12631 (initialize_async_io): New.
12632 * server.c (handle_v_cont): Handle async I/O here.
12633 (myresume): Likewise. Move other common resume tasks here...
12634 (main): ... from here. Call initialize_async_io. Disable async
12635 I/O before the main loop.
12636 * server.h (initialize_async_io): Declare.
12637 (block_async_io, unblock_async_io): Delete prototypes.
12638 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12639
b79d787e
DJ
126402007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12641
12642 * remote-utils.c (readchar): Allow binary data in received messages.
12643
d97903b2
PA
126442007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12645
12646 * win32-low.c (attaching): New global.
12647 (win32_create_inferior): Clear the `attaching' global.
12648 (win32_attach): Set the `attaching' global.
12649 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12650 attaching. Only set a breakpoint at the entry point if not
12651 attaching.
12652
311de423
PA
126532007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12654
12655 * server.c (main): Don't report dll events on the initial
12656 connection on attaches.
12657
6c2d16d2
PA
126582007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12659
12660 * server.c (main): Relax numerical bases supported for the pid of
12661 the --attach command line argument.
12662
5ca906e6
PA
126632007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12664
12665 * win32-low.c (win32_attach): Call OpenProcess before
12666 DebugActiveProcess, not after. Add last error output to error
12667 call.
12668
9c6c8194
PA
126692007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12670
12671 * win32-low.c (win32_get_thread_context)
12672 (win32_set_thread_context): New functions.
12673 (thread_rec): Use win32_get_thread_context.
12674 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12675 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12676 field.
12677
4d5d1aaa
PA
126782007-12-03 Leo Zayas
12679 Pedro Alves <pedro_alves@portugalmail.pt>
12680
12681 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12682 global variables.
12683 (child_add_thread): Minor cleanup.
12684 (child_continue): Resume artificially suspended threads before
12685 calling ContinueDebugEvent.
12686 (suspend_one_thread): New.
12687 (fake_breakpoint_event): New.
12688 (get_child_debug_event): Change return type to int. Check here if
12689 gdb sent an interrupt request. If a soft interrupt was requested,
12690 fake a breakpoint event. Return 0 if there is no event to handle,
12691 and 1 otherwise.
12692 (win32_wait): Don't check here if gdb sent an interrupt request.
12693 Ensure there is a valid event to handle.
12694 (win32_request_interrupt): Add soft interruption method as last
12695 resort.
12696
c436e841
PA
126972007-12-03 Leo Zayas
12698 Pedro Alves <pedro_alves@portugalmail.pt>
12699
12700 * win32-low.h (win32_thread_info): Add descriptions to the
12701 structure members. Replace `suspend_count' counter by a
12702 `suspended' flag.
12703 * win32-low.c (thread_rec): Update condition of when to get the
12704 context from the inferior. Rely on ContextFlags being set if it
12705 has already been retrieved. Only suspend the inferior thread if
12706 we haven't already. Warn if that fails.
12707 (continue_one_thread): s/suspend_count/suspended/. Only call
12708 ResumeThread once. Warn if that fails.
12709
e7b5fa67
PA
127102007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12711
12712 * win32-low.c (win32_wait): Don't read from the inferior when it
12713 has already exited.
12714
a385171d
PA
127152007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12716
12717 * Makefile.in (win32_low_h): New variable.
12718 (win32-low.o): Add dependency on $(win32_low_h).
12719 (win32-arm-low.o, win32-i386-low.o): New rules.
12720
f80c84b3
DJ
127212007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12722
12723 * hostio.c: Correct copyright year.
12724
a6b151f1
DJ
127252007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12726
12727 * Makefile.in (OBS): Add hostio.o.
12728 (hostio.o): New rule.
12729 * server.h (handle_vFile): Declare.
12730 * hostio.c: New file.
12731 * server.c (handle_v_requests): Take packet_len and new_packet_len
12732 for binary packets. Call handle_vFile.
12733 (main): Update call to handle_v_requests.
12734
f9387fc3
DJ
127352007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12736
12737 * linux-low.c: Include <sched.h>.
12738
51c2684e
DJ
127392007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12740
12741 * linux-low.c (linux_tracefork_grandchild): New.
12742 (linux_tracefork_child): Use clone.
12743 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12744
75f83163
JB
127452007-10-31 Joel Brobecker <brobecker@adacore.com>
12746
12747 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12748
da5898ce
DJ
127492007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12750
12751 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12752
24a09b5f
DJ
127532007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12754
12755 * inferiors.c (change_inferior_id): Delete.
12756 (add_pid_to_list, pull_pid_from_list): New.
12757 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12758 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12759 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12760 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12761 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12762 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12763 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12764 (using_threads): Always set to 1.
12765 (handle_extended_wait): New.
12766 (add_process): Do not set TID.
12767 (linux_create_inferior): Set must_set_ptrace_flags.
12768 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12769 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12770 (linux_thread_alive): Rename TID argument to LWPID.
12771 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12772 (linux_wait_for_event): Do not use TID or check using_threads. Update
12773 call to dead_thread_notify. Call handle_extended_wait.
12774 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12775 (send_sigstop): Delete sigstop_sent.
12776 (wait_for_sigstop): Avoid TID.
12777 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12778 (linux_test_for_tracefork): New.
12779 (linux_lookup_signals): Use thread_db_active and
12780 linux_supports_tracefork_flag.
12781 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12782 * linux-low.h (get_process_thread): Avoid TID.
12783 (struct process_ifo): Move thread_known and tid to the end. Remove
12784 sigstop_sent.
12785 (linux_attach_lwp, thread_db_init): Update prototypes.
12786 * server.h (change_inferior_id): Delete prototype.
12787 (add_pid_to_list, pull_pid_from_list): New prototypes.
12788 * thread-db.c (thread_db_use_events): New.
12789 (find_first_thread): Rename to...
12790 (find_one_thread): ...this. Update callers and messages. Do not
12791 call fatal. Check thread_db_use_events. Do not call
12792 change_inferior_id or new_thread_notify.
12793 (maybe_attach_thread): Update. Do not call new_thread_notify.
12794 (thread_db_init): Set thread_db_use_events. Check use_events.
12795 * utils.c (fatal, warning): Correct message prefix.
12796
30ed0a8f
DJ
127972007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12798
12799 * Makefile.in (clean): Remove new files.
12800 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12801 (powerpc-64.o, powerpc-64.c): New rules.
12802 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12803 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12804 with SPE.
12805 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12806 SPE targets.
12807 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12808 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12809 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12810 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12811 (target_regsets): Add AltiVec and SPE register sets.
12812 * configure.ac: Check for AltiVec and SPE.
12813 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12814 (ppc_fill_vrregset, ppc_store_vrregset): New.
12815 (target_regsets): Add AltiVec register set.
12816 * configure: Regenerated.
12817
fd462a61
DJ
128182007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12819
12820 * linux-low.c (O_LARGEFILE): Define.
12821 (linux_read_memory): Use /proc/PID/mem.
12822 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12823 * configure, config.in: Regenerated.
12824
69f223ed
DJ
128252007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12826
12827 * linux-low.c (linux_wait_for_event): Do not pass signals while
12828 single-stepping.
12829
aec18585
PA
128302007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12831
12832 * win32-low.c (create_process): New.
12833 (win32_create_inferior): Use create_process instead of
12834 CreateProcess. If create_process failed retry appending an ".exe"
12835 suffix. Store the GetLastError result immediatelly after
12836 create_process calls and use it on the call to error.
12837
34d86ddd
PA
128382007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12839
12840 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12841
5a0e3bd0
JB
128422007-08-23 Joel Brobecker <brobecker@adacore.com>
12843
12844 * configure.ac: Switch license to GPLv3.
12845
f88c79e6
MS
128462007-08-01 Michael Snyder <msnyder@access-company.com>
12847
12848 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12849
6b3d9b83
PA
128502007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12851
12852 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12853 typedef.
12854 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12855 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12856 CloseToolhelp32Snapshot.
12857 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12858 CloseToolhelp32Snapshot.
12859
c588c53c
MS
128602007-07-27 Michael Snyder <michael.snyder@access-company.com>
12861
12862 * server.c (main): Check for inferior exit before main loop.
12863
aa0403d9
PA
128642007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12865
12866 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12867 instead of on tmp_desc.
12868
255e7678
DJ
128692007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12870 Daniel Jacobowitz <dan@codesourcery.com>
12871
12872 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12873 (add_thread): Minor cleanups.
12874 (clear_inferiors): Move lower in the file. Clear the DLL
12875 list.
12876 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12877 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12878 (xml_escape_text): New.
12879 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12880 for qSupported.
12881 (handle_v_cont): Report errors.
12882 (gdbserver_version): Update.
12883 (main): Correct size of own_buf. Do not report initial DLL events.
12884 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12885 (unloaded_dll, xml_escape_text): New.
12886 * win32-low.c (enum target_waitkind): Update comments.
12887 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12888 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12889 (win32_EnumProcessModules, win32_GetModuleInformation)
12890 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12891 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12892 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12893 (win32_Module32First, win32_Module32Next, load_toolhelp)
12894 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12895 (get_child_debug_event): Handle DLL events.
12896 (win32_wait): Likewise.
12897
0d37add9
DJ
128982007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12899
12900 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12901 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12902
45e2715e
PA
129032007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12904
12905 * win32-low.c (handle_output_debug_string): Ignore event if not
12906 waiting.
12907
c5674cf1
PA
129082007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12909
12910 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12911
2bbe3cc1
DJ
129122007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12913
12914 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12915
ae13219e
DJ
129162007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12917
12918 * inferiors.c (change_inferior_id): Add comment.
12919 * linux-low.c (check_removed_breakpoint): Add an early
12920 prototype. Improve debug output.
12921 (linux_attach): Doc update.
12922 (linux_detach_one_process, linux_detach): Clean up before releasing
12923 each process.
12924 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12925 * linux-low.h (struct process_info): Doc improvement.
12926 * mem-break.c (delete_all_breakpoints): New.
12927 * mem-break.h (delete_all_breakpoints): New prototype.
12928 * thread-db.c (find_first_thread): New.
12929 (thread_db_create_event): Call it instead of
12930 thread_db_find_new_threads. Clean up unused variables.
12931 (maybe_attach_thread): Remove first thread handling.
12932 (thread_db_find_new_threads): Use find_first_thread.
12933 (thread_db_get_tls_address): Likewise.
12934
4105de34
DJ
129352007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12936
12937 * thread-db.c (thread_db_find_new_threads): Add prototype.
12938 (thread_db_create_event): Check for the main thread before adding
12939 a new thread.
12940 (maybe_attach_thread): Only enable event reporting if TID == 0.
12941 (thread_db_get_tls_address): Check for new threads.
12942
2b876972
DJ
129432007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
12944
12945 * linux-low.c (linux_create_inferior): Try execv before execvp.
12946 * spu-low.c (spu_create_inferior): Likewise.
12947
7a245884
DJ
129482007-06-13 Mike Frysinger <vapier@gentoo.org>
12949
12950 * linux-low.c (linux_create_inferior): Change execv to execvp.
12951 * spu-low.c (spu_create_inferior): Likewies.
12952
117ce543
DJ
129532007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
12954
12955 * Makefile.in (clean): Clean new files instead of deleted ones.
12956 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12957 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12958 rules.
12959 * configure.srv: Specify XML files and new regformats for MIPS and
12960 MIPS64 GNU/Linux.
12961 * linux-mips-low.c (mips_num_regs): Set to only used registers.
12962 (mips_regmap): Do not fetch $0. Remove unused registers. Add
12963 an entry for the restart register.
12964 (mips_cannot_fetch_register, mips_cannot_store_register)
12965 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12966 register names to match the XML descriptions.
12967 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
12968 restart register instead of $0.
12969
0e7f50da
UW
129702007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12971 Markus Deuling <deuling@de.ibm.com>
12972
12973 * remote-utils.c (decode_xfer_write): New function.
12974 * server.h (decode_xfer_write): Add prototype.
12975 * server.c (handle_query): Add PACKET_LEN argument. Support
12976 qXfer:spu:read and qXfer:spu:write packets.
12977 (main): Pass packet_len to handle_query.
12978 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12979 * target.h (target_ops): Add qxfer_spu.
12980
374c1d38
UW
129812007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12982
12983 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12984 accessing non-seekable spufs files.
12985
bb63802a
UW
129862007-05-16 Markus Deuling <deuling@de.ibm.com>
12987
889bf7c5 12988 * server.c (handle_query): Add reply for qC packet.
bb63802a 12989
7390519e
PA
129902007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12991 Leo Zayas <lerele@champenstudios@com>
12992
12993 * server.h (check_remote_input_interrupt_request): New function.
12994 * remote_utils.c (INVALID_DESCRIPTOR): New define.
12995 (remote_desc): Initialize with INVALID_DESCRIPTOR.
12996 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
12997 (check_remote_input_interrupt_request): New function.
12998 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 12999 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13000 winapi_GenerateConsoleCtrlEvent): New typedefs.
13001 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13002 to 250 ms.
13003 (win32_wait): Check for remote interrupt request
13004 with check_remote_input_interrupt_request.
13005 (win32_request_interrupt): New function.
13006 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13007
34b34921
PA
130082007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13009
13010 * win32-low.c (debug_registers_changed,
13011 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13012 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13013 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13014 (thread_rec): Get context using the low target.
13015 (child_add_thread): Call thread_added on the low target,
13016 which does the same thing.
13017 (regptr): Delete.
13018 (do_initial_child_stuff): Remove debug registers references.
13019 Set context using the low target. Resume threads after
13020 setting the contexts.
13021 (child_continue): Remove dead variable. Remove debug
13022 registers references.
13023 (child_fetch_inferior_registers): Go through the low target.
13024 (do_child_store_inferior_registers): Remove.
13025 (child_store_inferior_registers): Go through the low target.
13026 (win32_resume): Remove debug registers references.
13027 Set context using the low target.
13028 (handle_exception): Change return type to void. Don't record
13029 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13030 first chance exception.
889bf7c5 13031 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13032 goto loop. Always return after waiting for debug event.
13033 (win32_wait): Convert to switch statement. Handle spurious
13034 events.
13035
13036 * win32-i386-low.c (debug_registers_changed,
13037 debug_registers_used): New.
13038 (initial_stuff): Rename to ...
13039 (i386_initial_stuff): ... this. Clear debug registers
13040 state variables.
13041 (store_debug_registers): Delete.
13042 (i386_get_thread_context): New.
13043 (load_debug_registers): Delete.
13044 (i386_set_thread_context): New.
13045 (i386_thread_added): New.
13046 (single_step): Rename to ...
13047 (i386_single_step): ... this.
13048 (do_fetch_inferior_registers): Rename to ...
13049 (i386_fetch_inferior_register): ... this.
13050 (i386_store_inferior_register): New.
13051 (the_low_target): Adapt to new interface.
13052
13053 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13054 (arm_get_thread_context): New.
13055 (arm_set_thread_context): New.
13056 (regptr): New.
13057 (do_fetch_inferior_registers): Rename to ...
13058 (arm_fetch_inferior_register): ... this.
13059 (arm_store_inferior_register): New.
13060 (arm_wince_breakpoint): Reimplement as unsigned long.
13061 (arm_wince_breakpoint_len): Define.
13062 (the_low_target): Adapt to new interface.
13063
13064 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13065 load_debug_registers. Add get_thread_context, set_thread_context,
13066 thread_added and store_inferior_register. Rename
13067 fetch_inferior_registers to fetch_inferior_register.
13068 (regptr): Remove declaration.
13069
dd6953e1
PA
130702007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13071
13072 * linux-low.c (linux_detach): Change return type to int. Return 0.
13073 * spu-low.c (spu_detach): Likewise.
13074
444d6139
PA
130752007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13076
13077 * target.h (target_ops): Change return type of detach to int.
13078 Add join.
13079 (join_inferior): New.
13080 * server.c (main): Don't skip detach support on mingw32.
13081 If the inferior doesn't support detaching return error.
13082 Call join_inferior instead of using waitpid.
13083 * linux-low.c (linux_join): New.
13084 (linux_target_op): Add linux_join.
13085 * spu-low.c (spu_join): New.
13086 (spu_target_ops): Add spu_join.
13087 * win32-low.c (win32_detach): Adapt to new interface.
13088 Reopen current_process_handle before detaching. Issue a child
13089 resume before detaching.
13090 (win32_join): New.
13091 (win32_target_op): Add win32_join.
13092
1d5315fe
PA
130932007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13094
13095 * win32-low.c (win32-attach): Fix return value.
13096 * target.h (target_ops): Describe ATTACH return values.
13097
bf914831
PA
130982007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13099
13100 * win32-low.c (GETPROCADDRESS): Define.
13101 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13102 (winapi_DebugSetProcessKillOnExit): Likewise.
13103 (win32_create_inferior): Force usage of ansi CreateProcessA.
13104 (win32_attach): Use GETPROCADDRESS.
13105 (win32_detach): Likewise.
13106
f72f3e60
PA
131072007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13108
13109 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13110
ed50f18f
PA
131112007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13112
13113 * win32-low.c: Commit leftover changes from 2007-03-29.
13114
0c2ead7e
DJ
131152007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13116
13117 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13118 fields short instead of int. Add explicit padding.
13119 (i387_cache_to_fsave): Remove unnecessary casts.
13120 (i387_fsave_to_cache): Doc fix.
13121 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13122
73725ff3
DJ
131232007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13124
13125 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13126 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13127
d99f33d8
PA
131282007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13129
13130 * configure.srv (arm*-*-mingw32ce*): Move near the other
13131 arm targets.
13132
68070c10
PA
131332007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13134
2482afc6 13135 * configure.ac: Add errno checking.
68070c10
PA
13136 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13137 sys/file.h and malloc.h.
13138 (AC_CHECK_DECLS): Add perror.
13139 (srv_mingwce): Handle.
2482afc6 13140 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
13141 win32-i386-low.o to srv_tgtobj.
13142 (i[34567]86-*-mingw*): Likewise.
13143 (arm*-*-mingw32ce*): Add case.
13144 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13145 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13146 [__MINGW32CE__] (strerror): New function.
13147 [__MINGW32CE__] (errno): Define to GetLastError.
13148 [__MINGW32CE__] (COUNTOF): New macro.
13149 (remote_open): Remove extra close call.
13150 * mem-break.c (delete_breakpoint_at): New function.
13151 * mem-break.h (delete_breakpoint_at): Declare.
13152 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13153 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13154 [USE_WIN32API] (read, write): Add char* casts.
13155 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13156 * server.h: Include wincecompat.h on Windows CE.
13157 [HAVE_ERRNO_H]: Check.
13158 (perror): Declare if not declared.
13159 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13160 (perror_with_name): Remove errno declaration.
13161 * wincecompat.h: New.
13162 * wincecompat.c: New.
13163 * win32-low.h: New.
13164 * win32-arm-low.c: New.
13165 * win32-i386-low.c: New.
13166 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13167 (OUTMSG2): Make it safe.
13168 (_T): New macro.
13169 (COUNTOF): New macro.
13170 (NUM_REGS): Get it from the low target.
13171 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13172 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13173 (thread_rec): Let low target handle debug registers.
13174 (child_add_thread): Likewise.
13175 (child_init_thread_list): Likewise.
13176 (continue_one_thread): Likewise.
13177 (regptr): New.
13178 (do_child_fetch_inferior_registers): Move to ...
13179 * win32-i386-low.c: ... here, and rename to ...
13180 (do_fetch_inferior_registers): ... this.
889bf7c5 13181 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
13182 Go through the low target.
13183 (do_child_store_inferior_registers): Use regptr.
13184 (strwinerror): New function.
13185 (win32_create_inferior): Handle Windows CE.
13186 Use strwinerror instead of strerror on Windows error
13187 codes. Add program to the error output.
13188 Don't close the main thread handle on Windows CE.
13189 (win32_attach): Use coredll.dll on Windows CE.
13190 (win32_kill): Close current process and current
13191 thread handles.
13192 (win32_detach): Use coredll.dll on Windows CE.
13193 (win32_resume): Let low target handle debug registers, and
13194 step request.
13195 (handle_exception): Add/Remove initial breakpoint. Avoid
13196 non-existant WSTOPSIG on Windows CE.
13197 (win32_read_inferior_memory): Cast to remove warning.
13198 (win32_arch_string): Go through the low target.
13199 (initialize_low): Call set_breakpoint_data with the low
13200 target's breakpoint.
13201 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13202 FOP_REGNUM, mappings): Move to ...
13203 * win32-i386-low.c: ... here.
13204 * win32-low.c (win32_thread_info): Move to ...
13205 * win32-low.h: ... here.
13206 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13207 win32-arm-low.c and wincecompat.c.
13208 (all:): Add $EXEEXT.
13209 (install-only:): Likewise.
13210 (gdbserver:): Likewise.
13211 (gdbreplay:): Likewise.
13212 * config.in: Regenerate.
13213 * configure: Regenerate.
13214
41093d81
PA
132152007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13216
13217 * win32-low.c: Rename typedef thread_info to
13218 win32_thread_info throughout.
13219
544afa54
PA
132202007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13221
13222 * win32-i386-low.c: Rename to ...
13223 * win32-low.c: ... this.
13224 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13225 * Makefile.in: Likewise.
13226
bce7165d
PA
132272007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13228
13229 * remote-utils.c (monitor_output): Constify msg parameter.
13230 * server.h (monitor_output): Likewise.
13231 * win32-i386-low.c (handle_output_debug_string): New.
13232 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13233 handle_output_debug_string.
13234 (get_child_debug_event): Likewise.
13235
506c7aa0
DJ
132362007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13237
13238 * server.c (main): Correct strtoul check.
13239
42c81e2a
DJ
132402007-03-27 Jon Ringle <jon@ringle.org>
13241
13242 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13243
9453113a
DJ
132442007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13245
13246 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13247
64a69107
DJ
132482007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13249
13250 * terminal.h: Check HAVE_SGTTY_H.
13251
132522007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
13253
13254 * remote-utils.c (remote_open): Print out the assigned port number.
13255
c74d0ad8
DJ
132562007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13257
13258 * remote-utils.c (monitor_output): New function.
13259 * server.c (debug_threads): Define here.
13260 (monitor_show_help): New function.
13261 (handle_query): Handle qRcmd.
13262 (main): Do not handle 'd' packet.
13263 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13264 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13265 of debug_threads.
13266
de7c3b4a
PA
132672007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13268
13269 * Makefile.in (EXEEXT): New.
13270 (clean): Use $(EXEEXT).
13271
ef57601b
PA
132722007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13273
13274 * target.h (target_ops): Rename send_signal to request_interrupt,
13275 and remove enum target_signal parameter.
13276 * linux-low.c (linux_request_interrupt): Rename from
13277 linux_send_signal, and always send SIGINT.
13278 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13279 and always send SIGINT.
13280 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13281 of send_signal.
13282 (input_interrupt): Likewise.
13283
820f2bda
PA
132842007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13285
13286 * server.c (get_features_xml): Check if target implemented
13287 arch_string.
13288 * win32-i386-low.c (win32_arch_string): New.
13289 (win32_target_ops): Add win32_arch_string as arch_string member.
13290
ab39bf24
UW
132912007-02-22 Markus Deuling <deuling@de.ibm.com>
13292
13293 * spu-low.c (spu_arch_string): New.
13294 (spu_target_ops): Add spu_arch_string.
13295
61ff6e04
DJ
132962007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13297
13298 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13299 * configure.ac: Do not check for terminal.h.
13300 * configure, config.in: Regenerated.
13301
fb1e4ffc
DJ
133022007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13303
13304 * Makefile.in (OBS): Add $(XML_BUILTIN).
13305 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13306 (clean): Update.
13307 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13308 (arm-with-iwmmxt.c): New.
13309 * config.in, configure: Regenerate.
13310 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13311 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13312 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13313 (arm*-*-linux*): Add iWMMXt and regset support.
13314 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13315 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13316 (arm_store_wmmxregset, target_regsets): New.
13317 * server.c (get_features_xml): Take annex argument. Check builtin
13318 XML documents.
13319 (handle_query): Handle multiple annexes.
13320
0f48aa01
DJ
133212007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13322
13323 * remote-utils.c [USE_WIN32API] (read, write): Define.
13324 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13325 write.
13326
23181151
DJ
133272007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13328
13329 * linux-i386-low.c (the_low_target): Set arch_string.
13330 * linux-x86-64-low.c (the_low_target): Likewise.
13331 * linux-low.c (linux_arch_string): New.
13332 (linux_target_ops): Add it.
13333 * linux-low.h (struct linux_target_ops): Add arch_string.
13334 * server.c (write_qxfer_response): Use const void * for DATA.
13335 (get_features_xml): New.
13336 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13337 * target.h (struct target_ops): Add arch_string method.
13338
9d606399
DJ
133392007-01-03 Denis Pilat <denis.pilat@st.com>
13340 Daniel Jacobowitz <dan@codesourcery.com>
13341
13342 * linux-low.c (linux_kill): Handle being called with no threads.
13343 * win32-i386-low.c (win32_kill): Likewise.
13344 (get_child_debug_event): Clear current_process_handle.
13345
133462006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
13347 Daniel Jacobowitz <dan@codesourcery.com>
13348
13349 * remote-utils.c (remote_open): Check the type of specified
13350 serial port devices before opening them.
13351 * server.c (main): Kill the inferior if an error occurs during
13352 the first remote_open.
13353
a5e13d24
DJ
133542006-12-05 Markus Deuling <deuling@de.ibm.com>
13355
13356 * README: Update supported targets.
13357
186947f7
DJ
133582006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13359
13360 * Makefile.in (clean): Remove reg-mips64.c.
13361 (reg-mips64.c, reg-mips64.o): New rules.
13362 * configure.srv: Handle mips64. Include regset support for mips.
13363 * linux-mips-low.c (union mips_register): New.
13364 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13365 (mips_breakpoint, mips_breakpoint_at): Use int.
13366 (mips_collect_register, mips_supply_register)
13367 (mips_collect_register_32bit, mips_supply_register_32bit)
13368 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13369 (mips_store_fpregset, target_regsets): New.
13370 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13371
a13e2c95
UW
133722006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13373
13374 * configure.srv: Add target "spu*-*-*".
13375 * Makefile.in (clean): Remove reg-spu.c.
13376 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13377 * spu-low.c: New file.
13378
cb7283db
DJ
133792006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13380
13381 * configure.ac: Correct td_thr_tls_get_addr test.
13382 * configure: Regenerated.
13383
89be2091
DJ
133842006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13385
13386 * linux-low.c (linux_wait_for_event): Reformat. Use the
13387 pass_signals array.
13388 * remote-utils.c (decode_address_to_semicolon): New.
13389 * server.c (pass_signals, handle_general_set): New.
13390 (handle_query): Mention QPassSignals for qSupported.
13391 (main): Call handle_general_set.
13392 * server.h (pass_signals, decode_address_to_semicolon): New.
13393
000ef4f0
DJ
133942006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13395
13396 * server.c (handle_query): Correct error handling for read_auxv.
13397
b7149293
UW
133982005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13399
13400 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13401 and srv_linux_thread_db to yes.
13402 * linux-s390-low.c (s390_fill_gregset): New function.
13403 (target_regsets): Define data structure.
13404
dae5f5cf
DJ
134052006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13406
13407 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13408 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13409 * config.in, configure: Regenerated.
13410 * inferiors.c (gdb_id_to_thread): New function.
13411 (gdb_id_to_thread_id): Use it.
13412 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13413 * linux-low.h (struct process_info): Add th member.
13414 (thread_db_get_tls_address): New prototype.
13415 * remote-utils.c (decode_address): Make non-static.
13416 * server.c (handle_query): Handle qGetTLSAddr.
13417 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13418 * target.h (struct target_ops): Add get_tls_address.
13419 * thread-db.c (maybe_attach_thread): Save the thread handle.
13420 (thread_db_get_tls_address): New.
13421
32ca6d61
DJ
134222006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13423
13424 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13425 (linux_resume_one_process): Take a siginfo_t *. Update all
13426 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13427 (struct pending_signals): Add a siginfo_t.
13428 (linux_wait_for_process): Always set last_status.
13429 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13430 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13431 * linux-low.h (struct process_info): Add last_status.
13432
5ffff7c1
DJ
134332006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13434
13435 * remote-utils.c (try_rle): New function.
13436 (putpkt_binary): Use it.
13437
8695c747
DJ
134382006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13439
13440 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13441 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13442 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13443 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13444 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13445 point registers.
13446
290fadea
RS
134472006-08-08 Richard Sandiford <richard@codesourcery.com>
13448
13449 * server.c (terminal_fd): New variable.
13450 (old_foreground_pgrp): Likewise.
13451 (restore_old_foreground_pgrp): New function.
13452 (start_inferior): Record the terminal file descriptor in terminal_fd
13453 and its original foreground group in old_foreground_pgrp. Register
13454 restore_old_foreground_pgrp with atexit().
13455
9f2e1e63
DJ
134562006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13457
13458 * server.c (handle_query): Correct qPart to qXfer.
13459
b80864fb
DJ
134602006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13461
13462 * configure.ac: Check for more headers which are missing on
13463 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13464 * configure.srv: Add Cygwin and mingw32.
13465 * remote-utils.c: Don't include headers unconditionally which
13466 are missing on mingw32. Include <winsock.h> for mingw32.
13467 (remote_open): Adjust for mingw32 support. Flush
13468 standard error after writing to it.
13469 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13470 (unblock_async_io, enable_async_io, disable_async_io)
13471 (readchar, getpkt): Update for Winsock support.
13472 (prepare_resume_reply): Expect a protocol signal number.
13473 * server.c: Disable <sys/wait.h> on mingw32.
13474 (start_inferior): Adjust for mingw32 support. Flush
13475 standard error after writing to it.
13476 (attach_inferior): Likewise. Use protocol signal
13477 numbers.
13478 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13479 and names.
13480 * win32-i386-low.c: New file.
13481 * Makefile.in (XM_CLIBS): Set.
13482 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13483 (win32-i386-low.o): New dependency rule.
13484 * linux-low.c (linux_wait): Use target signal numbers.
13485 * target.h (struct target_ops): Doc fix.
13486 * server.h (target_signal_to_name): New prototype.
13487 * gdbreplay.c: Don't include headers unconditionally which
13488 are missing on mingw32. Include <winsock.h> for mingw32.
13489 (remote_close, remote_open): Adjust for Winsock support.
13490 * configure, config.in: Regenerated.
13491
0876f84a
DJ
134922006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13493
13494 * server.c (decode_xfer_read, write_qxfer_response): New.
13495 (handle_query): Take a packet length argument. Handle
13496 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13497 the qSupported response.
13498 (main): Update call to handle_query.
13499
01f9e8fa
DJ
135002006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13501
13502 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13503 (putpkt_binary): Renamed from putpkt and adjusted for binary
13504 data.
13505 (putpkt): New wrapper for putpkt_binary.
13506 (readchar): Don't mask off the high bit.
13507 (decode_X_packet): New function.
13508 * server.c (main): Call putpkt_binary if a handler sets the packet
13509 length. Save the length of the incoming packet. Handle 'X'.
13510 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13511
be2a5f71
DJ
135122006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13513
13514 * server.c (handle_query): Handle qSupported.
13515
ea025f5f
DJ
135162006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13517
13518 * remote-utils.c (all_symbols_looked_up): New variable.
13519 (look_up_one_symbol): Check it.
13520 * server.h (look_up_one_symbol): New declaration.
13521 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13522
9308fc88
DJ
135232006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13524
13525 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 13526 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
13527 (PTRACE_GET_THREAD_AREA): Define.
13528 (ps_get_thread_area): New function.
13529
52fb6437
NS
135302006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13531
13532 * configure.srv (m68k*-*-uclinux*): New target.
13533 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13534 (linux_resume_one_process): Remove extraneous cast.
13535 (linux_read_offsets): New.
13536 (linux_target_op): Add linux_read_offsets on mmuless systems.
13537 * server.c (handle_query): Add qOffsets logic.
13538 * target.h (struct target_ops): Add read_offsets.
13539
21b0f40c
DJ
135402006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13541
13542 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13543 (PTRACE_GET_THREAD_AREA): Define.
13544 (ps_get_thread_area): New function.
13545 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13546 (linux-x86-64-low.o): Update.
13547
0050a760
DJ
135482006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13549
13550 * configure.ac: Remove checks for prfpregset_t.
13551 * gdb_proc_service.h: New file.
13552 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13553 new "gdb_proc_service.h".
13554 * proc-service.c: Likewise.
13555 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13556 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13557 * Makefile.in (gdb_proc_service_h): Updated.
13558 * configure, config.in: Regenerated.
13559
b92a518e
DJ
135602006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13561
13562 * remote-utils.c (prepare_resume_reply): Move declaration
13563 of gdb_id_from_wait to the top of the block.
13564
545587ee
DJ
135652006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13566
13567 * linux-low.c (regsets_store_inferior_registers): Read the regset
13568 from the target before filling it.
13569
9db87ebd
DJ
135702006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13571
13572 * server.c (attach_inferior): Return SIGTRAP for a successful
13573 attach.
13574
dd24457d
DJ
135752006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13576
13577 * Makefile.in (OBS): Add version.o.
13578 (STAGESTUFF): Delete.
13579 (version.o): Add dependencies.
13580 (version.c): Replace rule.
13581 (clean): Remove version.c.
13582 * server.c (gdbserver_version): New.
13583 (gdbserver_usage): Use printf.
13584 (main): Handle --version and --help.
13585 * server.h (version, host_name): Add declarations.
13586
6f0f660e
EZ
135872005-12-23 Eli Zaretskii <eliz@gnu.org>
13588
889bf7c5
PA
13589 * linux-arm-low.c:
13590 * linux-arm-low.c:
13591 * inferiors.c:
13592 * i387-fp.h:
13593 * i387-fp.c:
13594 * gdbreplay.c:
13595 * regcache.c:
13596 * proc-service.c:
13597 * mem-break.h:
13598 * mem-break.c:
13599 * linux-x86-64-low.c:
13600 * linux-sh-low.c:
13601 * linux-s390-low.c:
13602 * linux-ppc64-low.c:
13603 * linux-ppc-low.c:
13604 * linux-mips-low.c:
13605 * linux-m68k-low.c:
13606 * linux-m32r-low.c:
13607 * linux-low.h:
13608 * linux-low.c:
13609 * linux-ia64-low.c:
13610 * linux-i386-low.c:
13611 * linux-crisv32-low.c:
13612 * thread-db.c:
13613 * terminal.h:
13614 * target.h:
13615 * target.c:
13616 * server.h:
13617 * server.c:
13618 * remote-utils.c:
13619 * regcache.h:
13620 * utils.c:
13621 * Makefile.in:
13622 * configure.ac:
6f0f660e
EZ
13623 * gdbserver.1: Add (C) after Copyright. Update the FSF
13624 address.
13625
9d1fb177
DJ
136262005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13627
13628 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13629 (arm_breakpoint_at): Recognize both breakpoints.
13630 (the_low_target): Use the correct breakpoint instruction.
13631
011a70c2
DJ
136322005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13633
13634 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13635 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13636 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13637 (the_low_target): Update.
13638
7fb85e41
AS
136392005-10-25 Andreas Schwab <schwab@suse.de>
13640
13641 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13642
13643 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13644 (ia64_num_regs): Reduce to 462.
13645
3db0444b
DJ
136462005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13647
13648 * acinclude.m4: Correct quoting.
13649 * aclocal.m4: Regenerated.
13650
13651 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13652 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13653 (thread_db_init): Call thread_db_err_str.
13654 * configure.ac: Check for TD_VERSION.
13655 * config.in, configure: Regenerated.
13656
bee0189a
DJ
136572005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13658
13659 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13660
e9d25b98
DJ
136612005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13662
13663 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13664 is not available. Define HAVE_PTRACE_GETREGS if it is.
13665 * config.in, configure: Regenerated.
13666 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13667 * linux-i386-low.c, linux-m68k-low.c: Update to use
13668 HAVE_PTRACE_GETREGS.
13669 * linux-low.c (regsets_fetch_inferior_registers)
13670 (regsets_store_inferior_registers): Only return 0 if we processed
13671 GENERAL_REGS.
13672 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13673 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13674
a06660f7
DJ
136752005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13676
13677 * inferiors.c (struct thread_info): Add gdb_id.
13678 (add_thread): Add gdb_id argument.
13679 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13680 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13681 calls to add_thread.
13682 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13683 * server.c (handle_query): Use thread_to_gdb_id.
13684 (handle_v_cont, main): Use gdb_id_to_thread_id.
13685 * server.h (add_thread): Update prototype.
13686 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13687 prototypes.
13688
5a1f5858
DJ
136892005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13690
13691 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13692 left-padded registers.
13693 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13694 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13695
e122f1f5
SE
136962005-07-01 Steve Ellcey <sje@cup.hp.com>
13697
13698 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13699 * configure: Regenerate.
13700 * config.in: Regenerate.
13701 * server.h (NEED_DECLARATION_STRERROR):
13702 Replace with !HAVE_DECL_STRERROR.
13703
d592fa2f
DJ
137042005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13705
13706 * linux-low.c (linux_wait, linux_send_signal): Don't test
13707 an unsigned long variable for > 0 if it could be MAX_ULONG.
13708 * server.c (myresume): Likewise.
13709 * target.c (set_desired_inferior): Likewise.
13710
ccbd4912
MK
137112005-06-13 Mark Kettenis <kettenis@gnu.org>
13712
13713 * configure.ac: Simplify and improve check for socklen_t.
13714 * configure, config.in: Regenerate.
13715
f450004a
DJ
137162005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13717
13718 * acconfig.h: Remove.
13719 * configure.ac: Add a test for socklen_t. Use three-argument
13720 AC_DEFINE throughout.
13721 * config.in: Regenerated using autoheader 2.59.
13722 * configure: Regenerated.
13723
13724 * gdbreplay.c (socklen_t): Provide a default.
13725 (remote_open): Use socklen_t.
13726 * remote-utils.c (socklen_t): Provide a default.
13727 (remote_open): Use socklen_t.
13728 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13729 unsigned char.
13730
13731 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13732 char for buffers.
13733 * linux-low.c (linux_read_memory, linux_write_memory)
13734 (linux_read_auxv): Likewise.
13735 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13736 (check_mem_write): Likewise.
13737 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13738 Likewise.
13739 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13740 (registers_from_string, register_data): Likewise.
13741 * server.c (handle_query, main): Likewise.
13742 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13743 (decode_M_packet): Likewise.
13744 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13745 * target.h (struct target_ops): Update read_memory, write_memory,
13746 and read_auxv.
13747 (read_inferior_memory, write_inferior_memory): Update.
13748 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13749 to unsigned char *.
13750 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13751 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13752 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13753 linux-s390-low.c, linux-sh-low.c: Update for changes in
13754 read_inferior_memory and the_low_target->breakpoint.
13755
eee84df1
DJ
137562005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13757
13758 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13759 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13760 * configure.srv: Add powerpc64-*-linux*.
13761 * linux-ppc64-low.c: New file.
13762
45b134e5
OF
137632005-05-23 Orjan Friberg <orjanf@axis.com>
13764
13765 * linux-cris-low.c: New file with support for CRIS.
13766 * linux-crisv32-low.c: Ditto for CRISv32.
13767 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13768 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 13769 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
13770 reg-crisv32.o, and reg-crisv32.c to make rules.
13771 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13772 recognized targets.
13773
48d93c75
UW
137742005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13775
13776 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13777 of sizeof (PTRACE_XFER_TYPE).
13778 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13779
e013ee27
OF
137802005-05-12 Orjan Friberg <orjanf@axis.com>
13781
889bf7c5 13782 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
13783 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13784 pointers for hardware watchpoint support.
13785 * linux-low.h (struct linux_target_ops): Ditto.
13786 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13787 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13788 to linux_target_ops.
13789 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13790 reply packet.
13791 * server.c (main): Recognize 'Z' and 'z' packets.
13792
b0ded00b
UW
137932005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13794
13795 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13796 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13797 (the_low_target): Add new members.
13798
8643e2ad
DJ
137992005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13800
13801 * proc-service.c (ps_lgetregs): Search all_processes instead of
13802 all_threads.
13803
fc620387
DJ
138042005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13805
13806 * server.c (start_inferior): Change return type to int.
13807 (attach_inferior): Change sigptr to int *.
13808 (handle_v_cont, handle_v_requests): Change signal to int *.
13809 (main): Change signal to int.
13810
138112005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
13812
13813 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13814 * configure.srv: Add m32r*-*-linux*.
13815 * linux-m32r-low.c: New file.
13816
e0e76420
DJ
138172005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13818
13819 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13820
a1928bad
DJ
138212005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13822
13823 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13824 Take unsigned long arguments for PIDs.
13825 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13826 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13827 (wait_for_sigstop, linux_resume_one_process)
13828 (regsets_fetch_inferior_registers, linux_send_signal)
13829 (linux_read_auxv): Likewise. Update the types of variables holding
13830 PIDs. Update format string specifiers.
13831 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13832 * remote-utils.c (prepare_resume_reply): Likewise.
13833 * server.c (cont_thread, general_thread, step_thread)
13834 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13835 unsigned long.
13836 (handle_query): Update format specifiers.
13837 (handle_v_cont, main): Use strtoul for thread IDs.
13838 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13839 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13840 (general_thread, step_thread, thread_from_wait)
13841 (old_thread_from_wait): Update.
13842 * target.h (struct thread_resume): Use unsigned long for THREAD.
13843 (struct target_ops): Use unsigned long for arguments to attach and
13844 thread_alive.
13845
dcdb98d2
DJ
138462005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13847
13848 * acinclude.m4: Include bfd/bfd.m4 directly.
13849 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13850 <agriffis@toolchain.org>.
13851 * aclocal.m4, configure: Regenerated.
13852
bec39cab
AC
138532005-01-07 Andrew Cagney <cagney@gnu.org>
13854
13855 * configure.ac: Rename configure.in, require autoconf 2.59.
13856 * configure: Re-generate.
13857
434c4c77
DJ
138582004-12-08 Daniel Jacobowitz <dan@debian.org>
13859
13860 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13861 LIBS when finished.
13862 * aclocal.m4: Regenerated.
13863 * configure: Regenerated.
13864
db1d3e1b
AS
138652004-11-21 Andreas Schwab <schwab@suse.de>
13866
13867 * linux-m68k-low.c (m68k_num_gregs): Define.
13868 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13869 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13870 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13871 (m68k_breakpoint_at): New. Add to the_low_target.
13872
13873 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13874 srv_linux_thread_db to yes.
13875
43360365
JB
138762004-10-20 Joel Brobecker <brobecker@gnat.com>
13877
13878 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13879 (ARCH_SET_FS): Likewise.
13880 (ARCH_GET_FS): Likewise.
13881 (ARCH_GET_GS): Likewise.
13882
fd500816
DJ
138832004-10-16 Daniel Jacobowitz <dan@debian.org>
13884
13885 * linux-i386-low.c (ps_get_thread_area): New.
13886 * linux-x86-64-low.c (ps_get_thread_area): New.
13887 * linux-low.c: Include <sys/syscall.h>.
13888 (linux_kill_one_process): Don't kill the first thread here.
13889 (linux_kill): Kill the first thread here.
13890 (kill_lwp): New function.
13891 (send_sigstop, linux_send_signal): Use it.
13892 * proc-service.c: Clean up #ifdefs.
13893 (fpregset_info): Delete.
13894 (ps_lgetregs): Update and enable implementation.
13895 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13896 implementations.
13897 * remote-utils.c (struct sym_cache, symbol_cache): New.
13898 (input_interrupt): Print a clearer message.
13899 (async_io_enabled): New variable.
13900 (enable_async_io, disable_async_io): Use it. Update comments.
13901 (look_up_one_symbol): Use the symbol cache.
13902 * thread-db.c (thread_db_look_up_symbols): New function.
13903 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13904
f6de3c42
DJ
139052004-10-16 Daniel Jacobowitz <dan@debian.org>
13906
13907 * configure.in: Test for -rdynamic.
13908 * configure: Regenerated.
13909 * Makefile (INTERNAL_LDFLAGS): New.
13910 (gdbserver, gdbreplay): Use it.
13911
2c0fc042
AC
139122004-09-02 Andrew Cagney <cagney@gnu.org>
13913
13914 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13915
075b3282
DJ
139162004-03-23 Daniel Jacobowitz <drow@mvista.com>
13917
13918 * linux-low.c (linux_wait): Clear all_processes list also.
13919
fa6a77dc
DJ
139202004-03-12 Daniel Jacobowitz <drow@mvista.com>
13921
13922 * linux-low.c: Include <errno.h>. Remove extern declaration of
13923 errno.
13924
6d782a97
DJ
139252004-03-12 Daniel Jacobowitz <drow@mvista.com>
13926
13927 * gdbreplay.c, server.h, utils.c: Update copyright years.
13928
3a7fb99b
DJ
139292004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13930
13931 * server.c (main): Print child status or termination signal from
13932 variable 'signal', not 'sig'.
13933
c3e735a6
DJ
139342004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13935
13936 * linux-low.c (linux_read_memory): Change return type to
13937 int. Check for and return error from ptrace().
13938 * target.c (read_inferior_memory): Change return type to int. Pass
13939 back return status from the_target->read_memory().
13940 * target.h (struct target_ops): Adapt *read_memory() prototype.
13941 Update comment.
13942 (read_inferior_memory): Adapt prototype.
13943 * server.c (main): Return an error packet if
13944 read_inferior_memory() returns an error.
13945
a59d1c82
DJ
139462004-03-04 Daniel Jacobowitz <drow@mvista.com>
13947
13948 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13949 Unify with other clean targets.
13950
dc3f8883
DJ
139512004-02-29 Daniel Jacobowitz <drow@mvista.com>
13952
13953 * server.c (handle_v_cont): Call set_desired_inferior.
13954
89a208da
DJ
139552004-02-29 Daniel Jacobowitz <drow@mvista.com>
13956
13957 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13958
62ea82f5
DJ
139592004-02-29 Daniel Jacobowitz <drow@mvista.com>
13960
13961 * linux-low.c (linux_wait): Unblock async I/O.
13962 (linux_resume): Block and enable async I/O.
13963 * remote-utils.c (block_async_io, unblock_async_io): New functions.
13964 * server.h (block_async_io, unblock_async_io): Add prototypes.
13965
6910d122
DJ
139662004-02-29 Daniel Jacobowitz <drow@mvista.com>
13967
13968 * remote-utils.c (remote_open): Print a status notice after
13969 opening a TCP port.
13970 * server.c (attach_inferior): Print a status notice after
13971 attaching.
13972
139732004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
13974
13975 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13976
c89dc5d4
DJ
139772004-02-26 Daniel Jacobowitz <drow@mvista.com>
13978
13979 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13980 error packet.
13981 * server.c, target.h: Update copyright years.
13982
4b8dad4a
RM
139832004-02-25 Roland McGrath <roland@redhat.com>
13984
13985 * target.h (struct target_ops): New member `read_auxv'.
13986 * server.c (handle_query): Handle qPart:auxv:read: query using that.
13987 * linux-low.c (linux_read_auxv): New function.
13988 (linux_target_ops): Initialize `read_auxv' member to that.
13989
d7446758
JB
139902004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13991
13992 Committed by Jim Blandy <jimb@redhat.com>.
13993
13994 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 13995 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
13996 instead of GPR_SIZE to distiguish s390 and s390x targets.
13997
5544ad89
DJ
139982004-01-31 Daniel Jacobowitz <drow@mvista.com>
13999
14000 * linux-low.c: Update copyright year.
14001 (check_removed_breakpoint): Clear pending_is_breakpoint.
14002 (linux_set_resume_request, linux_queue_one_thread)
14003 (resume_status_pending_p): New functions.
14004 (linux_continue_one_thread): Use process->resume.
14005 (linux_resume): Only resume threads if there are no pending events.
14006 * linux-low.h (struct process_info): Add resume request
14007 pointer.
14008
2a68b70e
DJ
140092004-01-30 Daniel Jacobowitz <drow@mvista.com>
14010
14011 * regcache.c (new_register_cache): Clear the allocated register
14012 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14013
64386c31
DJ
140142003-10-13 Daniel Jacobowitz <drow@mvista.com>
14015
14016 * linux-low.c (linux_resume): Take a struct thread_resume *
14017 argument.
14018 (linux_wait): Update call.
14019 (resume_ptr): New static variable.
14020 (linux_continue_one_thread): Renamed from
14021 linux_continue_one_process. Use resume_ptr.
14022 (linux_resume): Use linux_continue_one_thread.
14023 * server.c (handle_v_cont, handle_v_requests): New functions.
14024 (myresume): New function.
14025 (main): Handle 'v' case.
14026 * target.h (struct thread_resume): New type.
14027 (struct target_ops): Change argument of "resume" to struct
14028 thread_resume *.
14029 (myresume): Delete macro.
14030
c938e9b0
L
140312003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14032
14033 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14034 (uninstall): Support DESTDIR.
14035
7f313d07
BC
14036Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14037
14038 * configure.srv: Add xscale*linux copy of arm*linux entry.
14039
3b2fc2ea
DJ
140402003-07-24 Daniel Jacobowitz <drow@mvista.com>
14041
14042 * linux-arm-low.c (arm_reinsert_addr): New function.
14043 (the_low_target): Add arm_reinsert_addr.
14044
1c0a559e
MK
140452003-07-08 Mark Kettenis <kettenis@gnu.org>
14046
14047 * mem-break.c: Remove whitespace at end of file.
14048
43d5792c
DJ
140492003-06-28 Daniel Jacobowitz <drow@mvista.com>
14050
14051 * configure.in: Check whether we need to prototype strerror.
14052 * server.h: Optionally prototype strerror.
14053 * gdbreplay.c (perror_with_name): Use strerror.
14054 * linux-low.c (linux_attach_lwp): Use strerror.
14055 * utils.c (perror_with_name): Use strerror.
14056 * config.in, configure: Regenerated.
14057
c8a86edf
DJ
140582003-06-28 Daniel Jacobowitz <drow@mvista.com>
14059
14060 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14061 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14062
73d37363
DJ
140632003-06-20 Daniel Jacobowitz <drow@mvista.com>
14064
14065 * Makefile.in (SFILES): Update.
14066 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14067 low-sun3.c: Remove files.
14068
6ad8ae5c
DJ
140692003-06-17 Daniel Jacobowitz <drow@mvista.com>
14070
14071 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14072 (linux_detach_one_process, linux_detach): New functions.
14073 (linux_target_ops): Add linux_detach.
14074 * server.c (main): Handle 'D' packet.
14075 * target.h (struct target_ops): Add "detach" member.
14076 (detach_inferior): Define.
14077
1581182a
MK
140782003-06-13 Mark Kettenis <kettenis@gnu.org>
14079
14080 From Kelley Cook <kelleycook@wideopenwest.com>:
14081 * configure.srv: Accept i[34567]86 variants.
14082
e5379b03
DJ
140832003-06-05 Daniel Jacobowitz <drow@mvista.com>
14084
14085 * linux-low.c (linux_wait_for_event): Correct comment typos.
14086 (linux_resume_one_process): Call check_removed_breakpoint.
14087 (linux_send_signal): New function.
14088 (linux_target_ops): Add linux_send_signal.
14089 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14090 of kill.
14091 * target.h (struct target_ops): Add send_signal.
14092
2ff29de4
JB
140932003-05-29 Jim Blandy <jimb@redhat.com>
14094
14095 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14096 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14097 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14098 away part of the register's value.
14099
254787d4
DJ
141002003-03-26 Daniel Jacobowitz <drow@mvista.com>
14101
14102 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14103 (linux_wait_for_event, linux_init_signals): Likewise.
14104
94e10508
DJ
141052003-03-17 Daniel Jacobowitz <drow@mvista.com>
14106
14107 * configure.in: Check for stdlib.h.
14108 * configure: Regenerated.
14109 * config.in: Regenerated.
14110
4c0711e0
DJ
141112003-01-04 Andreas Schwab <schwab@suse.de>
14112
14113 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14114
ef66e766
AC
141152003-01-02 Andrew Cagney <ac131313@redhat.com>
14116
14117 * Makefile.in: Remove obsolete code.
14118
a1358604
DJ
141192002-11-20 Daniel Jacobowitz <drow@mvista.com>
14120
14121 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14122 defined(PT_FPR0_HI).
14123
23ce3b1c
DJ
141242002-11-17 Stuart Hughes <seh@zee2.com>
14125
14126 * linux-arm-low.c (arm_num_regs): Increase.
14127 (arm_regmap): Include status register.
14128
141292002-11-17 Daniel Jacobowitz <drow@mvista.com>
14130
14131 * linux-low.c (register_addr): Remove incorrect -1 check.
14132
a9fa9f7d
DJ
141332002-08-29 Daniel Jacobowitz <drow@mvista.com>
14134
14135 * linux-low.c (linux_create_inferior): Call setpgid. Return
14136 the new PID.
14137 (unstopped_p, linux_signal_pid): Remove.
14138 (linux_target_ops): Remove linux_signal_pid.
14139 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14140 global instead of target method.
14141 * target.h (struct target_ops): Remove signal_pid. Update comment
14142 for create_inferior.
14143 * server.c (signal_pid): New variable.
14144 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 14145 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
14146 (attach_inferior): Set signal_pid.
14147
17574093
DJ
141482002-08-23 Daniel Jacobowitz <drow@mvista.com>
14149
14150 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14151
141522002-08-20 Jim Blandy <jimb@redhat.com>
14153
14154 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14155 default for this.
14156
141572002-08-01 Andrew Cagney <cagney@redhat.com>
14158
14159 * Makefile.in: Make chill references obsolete.
14160
141612002-07-24 Kevin Buettner <kevinb@redhat.com>
14162
14163 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14164 * configure: Regenerate.
14165 * config.in: Regenerate.
14166
141672002-07-09 David O'Brien <obrien@FreeBSD.org>
14168
14169 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14170 (perror_with_name, remote_close, remote_open, expect, play): Static.
14171
141722002-07-04 Michal Ludvig <mludvig@suse.cz>
14173
4b8dad4a 14174 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
14175 byte offsets instead of an array of indexes.
14176 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14177
141782002-06-13 Daniel Jacobowitz <drow@mvista.com>
14179
14180 * regcache.c: Add comment.
14181
141822002-06-11 Daniel Jacobowitz <drow@mvista.com>
14183
14184 * thread-db.c: New file.
14185 * proc-service.c: New file.
14186 * acinclude.m4: New file.
14187 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14188 proc-service.o, and thread-db.o.
14189 (linux-low.o): Add USE_THREAD_DB.
14190 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14191 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14192 * aclocal.m4: Regenerated.
14193 * config.in: Regenerated.
14194 * configure: Regenerated.
14195 * configure.in: Check for proc_service.h, sys/procfs.h,
14196 thread_db.h, and linux/elf.h headrs.
14197 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14198 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14199 Check for -lthread_db and thread support.
14200 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14201 PowerPC, and SuperH.
14202 * i387-fp.c: Constify arguments.
14203 * i387-fp.h: Likewise.
14204 * inferiors.c: (struct thread_info): Renamed from
14205 `struct inferior_info'. Remove PID member. Use generic inferior
14206 list header. All uses updated.
14207 (inferiors, signal_pid): Removed.
14208 (all_threads): New variable.
14209 (get_thread): Define.
14210 (add_inferior_to_list): New function.
14211 (for_each_inferior): New function.
14212 (change_inferior_id): New function.
14213 (add_inferior): Removed.
14214 (remove_inferior): New function.
14215 (add_thread): New function.
14216 (free_one_thread): New function.
14217 (remove_thread): New function.
14218 (clear_inferiors): Use for_each_inferior and free_one_thread.
14219 (find_inferior): New function.
14220 (find_inferior_id): New function.
14221 (inferior_target_data): Update argument type.
14222 (set_inferior_target_data): Likewise.
14223 (inferior_regcache_data): Likewise.
14224 (set_inferior_regcache_data): Likewise.
14225 * linux-low.c (linux_bp_reinsert): Remove.
14226 (all_processes, stopping_threads, using_thrads)
14227 (struct pending_signals, debug_threads, pid_of): New.
14228 (inferior_pid): Replace with macro.
14229 (struct inferior_linux_data): Remove.
14230 (get_stop_pc, add_process): New functions.
14231 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14232 Use add_process and add_thread.
14233 (linux_attach_lwp): New function, based on old linux_attach. Use
14234 add_process and add_thread. Set stop_expected for new threads.
14235 (linux_attach): New function.
14236 (linux_kill_one_process): New function.
14237 (linux_kill): Kill all LWPs.
14238 (linux_thread_alive): Use find_inferior_id.
14239 (check_removed_breakpoints, status_pending_p): New functions.
14240 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14241 Update. Use WNOHANG. Wait for cloned processes also. Update process
14242 struct for the found process.
14243 (linux_wait_for_event): New function.
14244 (linux_wait): Use it. Support LWPs.
14245 (send_sigstop, wait_for_sigstop, stop_all_processes)
14246 (linux_resume_one_process, linux_continue_one_process): New functions.
14247 (linux_resume): Support LWPs.
14248 (REGISTER_RAW_SIZE): Remove.
14249 (fetch_register): Use register_size instead. Call supply_register.
14250 (usr_store_inferior_registers): Likewise. Call collect_register.
14251 Fix recursive case.
14252 (regsets_fetch_inferior_registers): Improve error message.
14253 (regsets_store_inferior_registers): Add debugging.
14254 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14255 (unstopped_p, linux_signal_pid): New functions.
14256 (linux_target_ops): Add linux_signal_pid.
14257 (linux_init_signals): New function.
14258 (initialize_low): Call it. Initialize using_threads.
14259 * regcache.c (inferior_regcache_data): Add valid
14260 flag.
14261 (get_regcache): Fetch registers lazily. Add fetch argument
14262 and update all callers.
14263 (regcache_invalidate_one, regcache_invalidate): New
14264 functions.
14265 (new_register_cache): Renamed from create_register_cache.
14266 Return the new regcache.
14267 (free_register_cache): Change argument to a void *.
14268 (registers_to_string, registers_from_string): Call get_regcache
14269 with fetch flag set.
14270 (register_data): Make static. Pass fetch flag to get_regcache.
14271 (supply_register): Call get_regcache with fetch flag clear.
14272 (collect_register): Call get_regcache with fetch flag set.
14273 (collect_register_as_string): New function.
14274 * regcache.h: Update.
14275 * remote-utils.c (putpkt): Flush after debug output and use
14276 stderr.
14277 Handle input interrupts while waiting for an ACK.
14278 (input_interrupt): Use signal_pid method.
14279 (getpkt): Flush after debug output and use stderr.
14280 (outreg): Use collect_register_as_string.
14281 (new_thread_notify, dead_thread_notify): New functions.
14282 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14283 and general_thread.
14284 (look_up_one_symbol): Flush after debug output.
14285 * server.c (step_thread, server_waiting): New variables.
14286 (start_inferior): Don't use signal_pid. Update call to mywait.
14287 (attach_inferior): Update call to mywait.
14288 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14289 (main): Don't fetch/store registers explicitly. Use
14290 set_desired_inferior. Support proposed ``Hs'' packet. Update
14291 calls to mywait.
14292 * server.h: Update.
14293 (struct inferior_list, struct_inferior_list_entry): New.
14294 * target.c (set_desired_inferior): New.
14295 (write_inferior_memory): Constify.
14296 (mywait): New function.
14297 * target.h: Update.
14298 (struct target_ops): New signal_pid method.
14299 (mywait): Removed macro, added prototype.
14300
14301 * linux-low.h (regset_func): Removed.
14302 (regset_fill_func, regset_store_func): New.
14303 (enum regset_type): New.
14304 (struct regset_info): Add type field. Use new operation types.
14305 (struct linux_target_ops): stop_pc renamed to get_pc.
14306 Add decr_pc_after_break and breakpoint_at.
14307 (get_process, get_thread_proess, get_process_thread)
14308 (strut process_info, all_processes, linux_attach_lwp)
14309 (thread_db_init): New.
14310
14311 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14312 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14313 (the_low_target): Add new members.
14314 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14315 (i386_store_fpxregset): Constify.
14316 (target_regsets): Add new kind identifier.
14317 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14318 (i386_set_pc): Add debugging.
14319 (i386_breakpoint_at): New function.
14320 (the_low_target): Add new members.
14321 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14322 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14323 (mips_breakpoint_at): New.
14324 (the_low_target): Add new members.
14325 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14326 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14327 (the_low_target): Add new members.
14328 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14329 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14330 (the_low_target): Add new members.
14331 * linux-x86-64-low.c (target_regsets): Add new kind
14332 identifier.
14333
143342002-05-15 Daniel Jacobowitz <drow@mvista.com>
14335
14336 From Martin Pool <mbp@samba.org>:
14337 * server.c (gdbserver_usage): New function.
14338 (main): Call it.
14339
143402002-05-14 Daniel Jacobowitz <drow@mvista.com>
14341
14342 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14343 stop_at -> stop_pc.
14344
143452002-05-04 Andrew Cagney <ac131313@redhat.com>
14346
14347 * Makefile.in: Remove obsolete code.
14348
143492002-04-24 Michal Ludvig <mludvig@suse.cz>
14350
14351 * linux-low.c (regsets_fetch_inferior_registers),
14352 (regsets_store_inferior_registers): Removed cast to int from
14353 ptrace() calls.
14354 * regcache.h: Added declaration of struct inferior_info.
14355
143562002-04-20 Daniel Jacobowitz <drow@mvista.com>
14357
14358 * inferiors.c (struct inferior_info): Add regcache_data.
14359 (add_inferior): Call create_register_cache.
14360 (clear_inferiors): Call free_register_cache.
14361 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14362 * regcache.c (struct inferior_regcache_data): New.
14363 (registers): Remove.
14364 (get_regcache): New function.
14365 (create_register_cache, free_register_cache): New functions.
14366 (set_register_cache): Don't initialize the register cache here.
14367 (registers_to_string, registers_from_string, register_data): Call
14368 get_regcache.
14369 * regcache.h: Add prototypes.
14370 * server.h: Likewise.
14371
143722002-04-20 Daniel Jacobowitz <drow@mvista.com>
14373
14374 * mem-break.c: New file.
14375 * mem-break.h: New file.
14376 * Makefile.in: Add mem-break.o rule; update server.h
14377 dependencies.
14378 * inferiors.c (struct inferior_info): Add target_data
14379 member.
14380 (clear_inferiors): Free target_data member if set.
14381 (inferior_target_data, set_inferior_target_data): New functions.
14382 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14383 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14384 * linux-low.c (linux_bp_reinsert): New variable.
14385 (struct inferior_linux_data): New.
14386 (linux_create_inferior): Use set_inferior_target_data.
14387 (linux_attach): Likewise. Call add_inferior.
14388 (linux_wait_for_one_inferior): New function.
14389 (linux_wait): Call it.
14390 (linux_write_memory): Add const.
14391 (initialize_low): Call set_breakpoint_data.
14392 * linux-low.h (struct linux_target_ops): Add breakpoint
14393 handling members.
14394 * server.c (attach_inferior): Remove extra add_inferior
14395 call.
14396 * server.h: Include mem-break.h. Update inferior.c
14397 prototypes.
14398 * target.c (read_inferior_memory)
14399 (write_inferior_memory): New functions.
14400 * target.h (read_inferior_memory)
14401 (write_inferior_memory): Change macros to prototypes.
14402 (struct target_ops): Update comments. Add const to write_memory
14403 definition.
14404
144052002-04-11 Daniel Jacobowitz <drow@mvista.com>
14406
14407 * linux-low.c (usr_store_inferior_registers): Support
14408 registers which are allowed to fail to store.
14409 * linux-low.h (linux_target_ops): Likewise.
14410 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14411 (ppc_cannot_store_register): FPSCR may not be storable.
14412
144132002-04-09 Daniel Jacobowitz <drow@mvista.com>
14414
14415 * server.h: Include <string.h> if HAVE_STRING_H.
14416 * ChangeLog: Correct paths in last ChangeLog entry.
14417
144182002-04-09 Daniel Jacobowitz <drow@mvista.com>
14419
14420 * linux-low.h: Remove obsolete prototypes.
14421 (struct linux_target_ops): New.
14422 (extern the_low_target): New.
14423 * linux-low.c (num_regs, regmap): Remove declarations.
14424 (register_addr): Use the_low_target explicitly.
14425 (fetch_register): Likewise.
14426 (usr_fetch_inferior_registers): Likewise.
14427 (usr_store_inferior_registers): Likewise.
14428 * linux-arm-low.c (num_regs): Remove.
14429 (arm_num_regs): Define.
14430 (arm_regmap): Renamed from regmap, made static.
14431 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14432 made static.
14433 (arm_cannot_store_register): Renamed from cannot_store_register,
14434 made static.
14435 (the_low_target): New.
14436 * linux-i386-low.c (num_regs): Remove.
14437 (i386_num_regs): Define.
14438 (i386_regmap): Renamed from regmap, made static.
14439 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14440 made static.
14441 (i386_cannot_store_register): Renamed from cannot_store_register,
14442 made static.
14443 (the_low_target): New.
14444 * linux-ia64-low.c (num_regs): Remove.
14445 (ia64_num_regs): Define.
14446 (ia64_regmap): Renamed from regmap, made static.
14447 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14448 made static.
14449 (ia64_cannot_store_register): Renamed from cannot_store_register,
14450 made static.
14451 (the_low_target): New.
14452 * linux-m68k-low.c (num_regs): Remove.
14453 (m68k_num_regs): Define.
14454 (m68k_regmap): Renamed from regmap, made static.
14455 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14456 made static.
14457 (m68k_cannot_store_register): Renamed from cannot_store_register,
14458 made static.
14459 (the_low_target): New.
14460 * linux-mips-low.c (num_regs): Remove.
14461 (mips_num_regs): Define.
14462 (mips_regmap): Renamed from regmap, made static.
14463 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14464 made static.
14465 (mips_cannot_store_register): Renamed from cannot_store_register,
14466 made static.
14467 (the_low_target): New.
14468 * linux-ppc-low.c (num_regs): Remove.
14469 (ppc_num_regs): Define.
14470 (ppc_regmap): Renamed from regmap, made static.
14471 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14472 made static.
14473 (ppc_cannot_store_register): Renamed from cannot_store_register,
14474 made static.
14475 (the_low_target): New.
14476 * linux-s390-low.c (num_regs): Remove.
14477 (s390_num_regs): Define.
14478 (s390_regmap): Renamed from regmap, made static.
14479 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14480 made static.
14481 (s390_cannot_store_register): Renamed from cannot_store_register,
14482 made static.
14483 (the_low_target): New.
14484 * linux-sh-low.c (num_regs): Remove.
14485 (sh_num_regs): Define.
14486 (sh_regmap): Renamed from regmap, made static.
14487 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14488 made static.
14489 (sh_cannot_store_register): Renamed from cannot_store_register,
14490 made static.
14491 (the_low_target): New.
14492 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14493 (the_low_target): New.
14494
144952002-04-09 Daniel Jacobowitz <drow@mvista.com>
14496
14497 * Makefile.in: Add stamp-h target.
14498 * configure.in: Create stamp-h.
14499 * configure: Regenerated.
14500
145012002-04-09 Daniel Jacobowitz <drow@mvista.com>
14502
14503 * inferiors.c: New file.
14504 * target.c: New file.
14505 * target.h: New file.
14506 * Makefile.in: Add target.o and inferiors.o. Update
14507 dependencies.
14508 * linux-low.c (inferior_pid): New static variable,
14509 moved from server.c.
14510 (linux_create_inferior): Renamed from create_inferior.
14511 Call add_inferior. Return 0 on success instead of a PID.
14512 (linux_attach): Renamed from myattach.
14513 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14514 (linux_thread_alive): Renamed from mythread_alive.
14515 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14516 child dies.
14517 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14518 (regsets_store_inferior_registers): Correct error message.
14519 Add missing ``return 0''.
14520 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14521 (linux_store_registers): Renamed from store_inferior_registers.
14522 (linux_read_memory): Renamed from read_inferior_memory.
14523 (linux_write_memory): Renamed from write_inferior_memory.
14524 (linux_target_ops): New structure.
14525 (initialize_low): Call set_target_ops ().
14526 * remote-utils.c (unhexify): New function.
14527 (hexify): New function.
14528 (input_interrupt): Send signals to ``signal_pid''.
14529 * server.c (inferior_pid): Remove.
14530 (start_inferior): Update create_inferior call.
14531 (attach_inferior): Call add_inferior.
14532 (handle_query): New function.
14533 (main): Call handle_query for `q' packets.
14534 * server.h: Include "target.h". Remove obsolete prototypes.
14535 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14536
145372002-04-09 Daniel Jacobowitz <drow@mvista.com>
14538
14539 * Makefile.in: Add WARN_CFLAGS. Update configury
14540 dependencies.
14541 * configure.in: Check for <string.h>
14542 * configure: Regenerate.
14543 * config.in: Regenerate.
14544 * gdbreplay.c: Include needed system headers.
14545 (remote_open): Remove strchr prototype.
14546 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14547 * regcache.c (supply_register): Change buf argument to const void *.
14548 (supply_register_by_name): Likewise.
14549 (collect_register): Change buf argument to void *.
14550 (collect_register_by_name): Likewise.
14551 * regcache.h: Add missing prototypes.
14552 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14553 * server.c (handle_query): New function.
14554 (attached): New static variable, moved out of main.
14555 (main): Quiet longjmp clobber warnings.
14556 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14557 * utils.c (error): Remove NORETURN.
14558 (fatal): Likewise.