GDB: Fix some null pointer dereferences due to disassembler-options patch.
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
239b6d10
WT
12017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2
3 * configure.ac: Check if the fs_base and gs_base members of
4 `struct user_regs_struct' exist.
5 * config.in: Regenerated.
6 * configure: Likewise.
7
694b382c
AT
82017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
9
10 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
11 target_read_memory.
12 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
13 (get_next_pcs_syscall_next_pc): Likewise.
14
7dc53023
LM
152016-12-23 Luis Machado <lgustavo@codesourcery.com>
16
17 * win32-i386-low.c: Fix incorrect reference to a couple source files.
18 * nto-x86-low.c: Likewise.
19
ad02e4fe
SM
202016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
21
22 * Makefile.in: Include disable-implicit-rules.mk.
23
dcb07cfa
PA
242016-11-23 Pedro Alves <palves@redhat.com>
25
26 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
27 (debug_vprintf): Use std::chrono::steady_clock instead of
28 gettimeofday. Use '.' instead of ':'.
29 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
30 (get_timestamp): Use std::chrono::steady_clock instead of
31 gettimeofday.
32
8629c02c
SM
332016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
34
35 * Makefile.in: Fix whitespace formatting.
36
b593ecca
SM
372016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
38
39 * Makefile.in (SFILES, OBS): Flatten list and order
40 alphabetically.
41
9986ba08
PA
422016-11-23 Pedro Alves <palves@redhat.com>
43
44 * event-loop.c (handle_file_event): Use warning.
45 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
46 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
47 Use warning.
48
4eefa7bc
PA
492016-11-23 Pedro Alves <palves@redhat.com>
50
51 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
52 output.
53 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
54 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
55 debug_printf and debug_flush for debug output.
56 * server.c (handle_general_set): Likewise.
57 * thread-db.c (try_thread_db_load): Use debug_printf for debug
58 output.
59
5443506e
SM
602016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
61
62 * Makefile.in (.c.o): Replace rule with ...
63 (%.o: %.c): ... this one.
64
3b165252
SM
652016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
66
67 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
68 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
69 make.
70 * configure.ac: Remove checks for the make program.
71 * configure: Re-generate.
72
0bcda685
PA
732016-10-28 Pedro Alves <palves@redhat.com>
74
75 * Makefile.in (CXX_DIALECT): Get from configure.
76 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
77 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
78 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
79 * config.in: Regenerate.
80 * configure: Regenerate.
81
c3805894
YQ
822016-10-27 Yao Qi <yao.qi@linaro.org>
83
84 * linux-low.c (linux_supports_range_stepping): Return true if
85 can_software_single_step return true.
86
89342618
YQ
872016-10-27 Yao Qi <yao.qi@linaro.org>
88
89 * inferiors.c (find_inferior_in_random): New function.
90 * inferiors.h (find_inferior_in_random): Declare.
91 * linux-low.c (linux_wait_for_event_filtered): Call
92 find_inferior_in_random instead of find_inferior.
93
e3652c84
YQ
942016-10-27 Yao Qi <yao.qi@linaro.org>
95
96 * linux-low.c (linux_wait_1): If single-step breakpoints are
97 inserted, remove them.
98
5a04c4cf
PA
992016-10-26 Pedro Alves <palves@redhat.com>
100
101 * linux-low.c (handle_extended_wait): Link parent/child fork
102 threads.
103 (linux_wait_1): Unlink them.
104 (linux_set_resume_request): Ignore resume requests for
105 already-resumed and unhandled fork child threads.
106 * linux-low.h (struct lwp_info) <fork_relative>: New field.
107 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
108 New functions.
109 (handle_v_requests) <vCont>: Don't call require_running.
110 * server.h (in_queued_stop_replies): New declaration.
111
cb93dc7f
YQ
1122016-10-24 Yao Qi <yao.qi@linaro.org>
113
114 PR server/20733
115 * linux-aarch64-low.c (append_insns): Cast the return value to
116 'uint32_t *'.
117
a1078bea
YQ
1182016-10-10 Yao Qi <yao.qi@linaro.org>
119
120 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
121
1fb77080
SDJ
1222016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
123
124 * target.c (target_supports_multi_process): New function, moved
125 from...
126 * target.h (target_supports_multi_process): ... here. Remove
127 macro.
128
39b5a3b9
TT
1292016-10-05 Tom Tromey <tom@tromey.com>
130
131 PR remote/20655:
132 * tracepoint.c (handle_tracepoint_bkpts): Check
133 ipa_error_tracepoint, not ipa_stopping_tracepoint.
134
c1d0b70a
YQ
1352016-10-05 Yao Qi <yao.qi@linaro.org>
136
137 * configure.srv: Update the path of arm-*.xml files.
138
0a69eedb
YQ
1392016-10-05 Terry Guo <terry.guo@arm.com>
140 Yao Qi <yao.qi@linaro.org>
141
142 * Makefile.in: Adjust the path of rules.
143 * configure.srv: Update the path of xml files.
144 * regformats/arm-with-iwmmxt.dat: Regenerated.
145 * regformats/arm-with-neon.dat: Likewise.
146 * regformats/arm-with-vfpv2.dat: Likewise.
147 * regformats/arm-with-vfpv3.dat Likewise.
148
17e16485
YQ
1492016-09-30 Yao Qi <yao.qi@linaro.org>
150
151 PR gdbserver/20627
152 * target.c (target_stop_and_wait): Don't call
153 target_continue_no_signal, use resume_stop instead.
154
edeeb602
YQ
1552016-09-26 Yao Qi <yao.qi@linaro.org>
156
157 * linux-low.c (linux_wait_1): Call debug_exit.
158
503b1c39
PA
1592016-09-23 Pedro Alves <palves@redhat.com>
160
161 * Makefile.in (SFILES): Add common/new-op.c.
162 (OBS): Add common/new-op.o.
163 (new-op.o): New rule.
164
74172ecf
SM
1652016-09-21 Simon Marchi <simon.marchi@ericsson.com>
166
167 * .gitinore: Ignore more files.
168
fc6cda2e
YQ
1692016-09-21 Yao Qi <yao.qi@linaro.org>
170
171 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
172 23.
173
bc1e6c81
SDJ
1742016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
175
176 * server.c (start_inferior): Call target_mourn_inferior instead of
177 mourn_inferior; pass ptid_t argument to it.
178 (resume): Likewise.
179 (handle_target_event): Likewise.
180 * target.c (target_mourn_inferior): New function.
181 * target.h (mourn_inferior): Delete macro.
182
0e00e962
AA
1832016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
184
185 * linux-low.c (lwp_is_stepping): New function.
186
1d8cb77d
CL
1872016-09-06 Carl Love <cel@us.ibm.com>
188
189 * server.c (start_inferior): Fixed comment, requested comment change
190 didn't get updated correctly. Removed reference to ptrace () call as
191 it is only true on Linux systems.
192
7313bced
CL
1932016-09-06 Carl Love <cel@us.ibm.com>
194
195 * server.c (start_inferior): Do not call
196 function target_post_create_inferior () if the
197 inferior process has already exited.
198
cf6de44d
PA
1992016-09-05 Pedro Alves <palves@redhat.com>
200
201 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
202 (COMPILE.pre, CC_LD): Use CXX directly.
203 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
204 * acinclude.m4: Don't include build-with-cxx.m4.
205 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
206 * configure: Regenerate.
207
c1da6748
AT
2082016-09-02 Akash Trehan <akash.trehan123@gmail.com>
209
210 PR gdb/19495
211 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
212 call writing data to own_buf.
213
f2b9e3df
SDJ
2142016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
215
216 * target.c (mywait): Call target_wait instead of
217 the_target->wait.
218 (target_wait): New function.
219
049a8570
SDJ
2202016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
221
222 * server.c (start_inferior): New variable 'ptid'. Replace calls
223 to the_target->resume by target_continue{,_no_signal}, depending
224 on the case.
225 * target.c (target_stop_and_wait): Call target_continue_no_signal
226 instead of the_target->resume.
227 (target_continue): New function.
228
3aa5cfa0
AT
2292016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
230
231 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
232
754653a7
AZ
2332016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
234
235 PR server/20491
236 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
237 ps_prochandle.
238 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
239 * linux-arm-low.c (ps_get_thread_area): Likewise.
240 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
241 * linux-m68k-low.c (ps_get_thread_area): Likewise.
242 * linux-mips-low.c (ps_get_thread_area): Likewise.
243 * linux-nios2-low.c (ps_get_thread_area): Likewise.
244 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
245 * linux-x86-low.c (ps_get_thread_area): Likewise.
246 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
247
ed036b40
PA
2482016-08-19 Pedro Alves <palves@redhat.com>
249
250 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
251
c8ef42ee
PA
2522016-08-19 Pedro Alves <palves@redhat.com>
253
254 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
255 comment. Use memcpy instead of casting through unsigned long.
256
9c235a72
PA
2572016-08-19 Pedro Alves <palves@redhat.com>
258
259 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
260 allocating around 0x80000000.
261
201506da
PA
2622016-08-19 Pedro Alves <palves@redhat.com>
263
264 PR gdb/20415
265 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
266 (x32-avx512-linux-ipa.o): New rules.
267 * configure.ac (x86_64-*-linux*): New x32 check.
268 * configure.srv (ipa_x32_linux_regobj): New.
269 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
270 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
271 descriptions.
272 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
273 descriptions.
274 * configure: Regenerate.
275
f348d89a
PA
2762016-08-09 Pedro Alves <palves@redhat.com>
277
278 PR gdb/18653
279 * Makefile.in (OBS): Add signals-state-save-restore.o.
280 (signals-state-save-restore.o): New rule.
281 * config.in: Regenerate.
282 * configure: Regenerate.
283 * linux-low.c: Include "signals-state-save-restore.h".
284 (linux_create_inferior): Call
285 restore_original_signals_state.
286 * server.c: Include "dispositions-save-restore.h".
287 (captured_main): Call save_original_signals_state.
288
1baf5149
PA
2892016-08-05 Pedro Alves <palves@redhat.com>
290
291 * configure: Regenerate.
292
fcd4a73d
YQ
2932016-08-04 Yao Qi <yao.qi@linaro.org>
294
295 * linux-low.c (regsets_fetch_inferior_registers): Check
296 errno is ESRCH or not.
297
979659d0
YQ
2982016-08-02 Yao Qi <yao.qi@linaro.org>
299
300 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
301 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
302 (thread_db_load_search): Update.
303 (try_thread_db_load_1): Don't look for td_ta_event_addr,
304 td_ta_set_event and td_ta_event_getmsg.
305
6598661d
PA
3062016-07-26 Pedro Alves <palves@redhat.com>
307
308 PR server/20414
309 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
310 of unsigned long for 64-bit registers and use uint32_t instead of
311 unsigned int for 32-bit registers.
312
9cf12d57
PA
3132016-07-26 Pedro Alves <palves@redhat.com>
314
315 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
316 to 'ptrace'.
317
305450ed
TT
3182016-07-21 Tom Tromey <tom@tromey.com>
319
320 * configure: Rebuild.
321
2583da7c
YQ
3222016-07-21 Yao Qi <yao.qi@linaro.org>
323
324 * mem-break.c (find_gdb_breakpoint): Cast bp to
325 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
326
21536b36
YQ
3272016-07-21 Yao Qi <yao.qi@linaro.org>
328
329 * server.c (handle_v_requests): Support s and S actions
330 if target_supports_software_single_step return true.
331
8901d193
YQ
3322016-07-21 Yao Qi <yao.qi@linaro.org>
333
334 * linux-low.c (resume_stopped_resumed_lwps): If resume request
335 is resume_step, call maybe_hw_step.
336 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
337 and unstop them.
338 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
339 breakpoints or not.
340 (proceed_one_lwp): If resume request is resume_step, install
341 reinsert breakpoints and call maybe_hw_step.
342
0e9a339e
YQ
3432016-07-21 Yao Qi <yao.qi@linaro.org>
344
345 * linux-low.c (proceed_one_lwp): Declare.
346 (linux_resume_one_thread): Remove local variable 'step'.
347 Lift code enqueue signal. Call proceed_one_lwp instead of
348 linux_resume_one_lwp.
349
4281b351
YQ
3502016-07-21 Yao Qi <yao.qi@linaro.org>
351
352 * linux-low.c (linux_resume_one_thread): Call
353 enqueue_pending_signal.
354
984a2c04
YQ
3552016-07-21 Yao Qi <yao.qi@linaro.org>
356
357 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
358 * inferiors.c (do_restore_current_thread_cleanup): New function.
359 (make_cleanup_restore_current_thread): Likewise.
360 * linux-low.c (install_software_single_step_breakpoints): Call
361 make_cleanup_restore_current_thread. Switch current_thread to
362 thread.
363
bec903c9
YQ
3642016-07-21 Yao Qi <yao.qi@linaro.org>
365
366 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
367 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
368 (clone_one_breakpoint): Likewise.
369 (delete_reinsert_breakpoints): Change parameter to thread.
370 Callers updated.
371 (has_reinsert_breakpoints): Likewise.
372 (uninsert_reinsert_breakpoints): Likewise.
373 (reinsert_reinsert_breakpoints): Likewise.
374 * mem-break.h (set_reinsert_breakpoint): Update declaration.
375 (delete_reinsert_breakpoints): Likewise.
376 (reinsert_reinsert_breakpoints): Likewise.
377 (uninsert_reinsert_breakpoints): Likewise.
378 (has_reinsert_breakpoints): Likewise.
379
63c40ec7
YQ
3802016-07-21 Yao Qi <yao.qi@linaro.org>
381
382 * inferiors.c (get_thread_process): Make parameter const.
383 * inferiors.h (get_thread_process): Update declaration.
384 * mem-break.c (clone_all_breakpoints): Remove all parameters.
385 Add new parameters child_thread and parent_thread. Callers
386 updated.
387 * mem-break.h (clone_all_breakpoints): Update declaration.
388
9aa76cd0
YQ
3892016-07-21 Yao Qi <yao.qi@linaro.org>
390
391 * mem-break.c (struct breakpoint) <cond_list>: Remove.
392 <command_list, handler>: Remove.
393 (struct gdb_breakpoint): New.
394 (struct other_breakpoint): New.
395 (struct reinsert_breakpoint): New.
396 (is_gdb_breakpoint): New function.
397 (any_persistent_commands): Update command_list if
398 is_gdb_breakpoint returns true.
399 (set_breakpoint): Create breakpoints according to their types.
400 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
401 (set_gdb_breakpoint_1): Likewise.
402 (set_gdb_breakpoint): Likewise.
403 (clear_breakpoint_conditions): Change parameter type to
404 'struct gdb_breakpoint *'.
405 (clear_breakpoint_commands): Likewise.
406 (clear_breakpoint_conditions_and_commands): Likewise.
407 (add_condition_to_breakpoint): Likewise.
408 (add_breakpoint_condition): Likewise.
409 (add_commands_to_breakpoint): Likewise.
410 (check_breakpoints): Check other_breakpoint.
411 (clone_one_breakpoint): Clone breakpopint according to its type.
412 * mem-break.h (struct gdb_breakpoint): Declare.
413 (set_gdb_breakpoint): Update declaration.
414 (clear_breakpoint_conditions_and_commands): Likewise.
415 (add_breakpoint_condition): Likewise.
416 (add_breakpoint_commands): Likewise.
417 * server.c (process_point_options): Change parameter type to
418 'struct gdb_breakpoint *'.
419
811f8301
YQ
4202016-07-21 Yao Qi <yao.qi@linaro.org>
421
422 * mem-break.c (set_breakpoint_at): Rename it to ...
423 (set_breakpoint_type_at): ... it.
424 (set_breakpoint_at): Call set_breakpoint_type_at.
425 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
426 * mem-break.h (set_breakpoint_at): Update comments.
427
b1c51e36
CLT
4282016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
429
430 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
431 to buf parameter.
432 (nios2_store_gregset): Likewise.
433
ced2dffb
PA
4342016-07-01 Pedro Alves <palves@redhat.com>
435 Antoine Tremblay <antoine.tremblay@ericsson.com>
436
437 * linux-low.c: Change interface to take the target lwp_info
438 pointer directly and return void. Handle detaching from a zombie
439 thread.
440 (linux_detach_lwp_callback): New function.
441 (linux_detach): Detach from the leader thread after detaching from
442 the clone threads.
443
2ac09a5b
YQ
4442016-06-28 Yao Qi <yao.qi@linaro.org>
445
446 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
447 for variable new_offset.
448 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
449 (aarch64_ftrace_insn_reloc_cb): Likewise.
450 (aarch64_ftrace_insn_reloc_tb): Likewise.
451 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
452 PRIx64 instead of PRIx32.
453
79e7fd4f
YQ
4542016-06-28 Yao Qi <yao.qi@linaro.org>
455
456 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
457 (the_low_target): Install arm_get_syscall_trapinfo.
458
061fc021
YQ
4592016-06-28 Yao Qi <yao.qi@linaro.org>
460
461 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
462 function.
463 (the_low_target): Install aarch64_get_syscall_trapinfo.
464
4cc32bec
YQ
4652016-06-28 Yao Qi <yao.qi@linaro.org>
466
467 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
468 Callers updated.
469 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
470 Remove parameter sysno.
471 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
472 sysret.
473
782c1122
AA
4742016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
475
476 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
477 (s390_emit_ne_goto): Likewise.
478 (s390_emit_lt_goto): Likewise.
479 (s390_emit_le_goto): Likewise.
480 (s390_emit_gt_goto): Likewise.
481 (s390_emit_ge_goto): Likewise.
482 (s390x_emit_eq_goto): Likewise.
483 (s390x_emit_ne_goto): Likewise.
484 (s390x_emit_lt_goto): Likewise.
485 (s390x_emit_le_goto): Likewise.
486 (s390x_emit_gt_goto): Likewise.
487 (s390x_emit_ge_goto): Likewise.
488 (s390_emit_ops_impl): Mark variable static.
489 (s390x_emit_ops): Likewise.
490
2e7b624b
YQ
4912016-06-17 Yao Qi <yao.qi@linaro.org>
492
493 * linux-low.c (handle_extended_wait): Call
494 uninsert_reinsert_breakpoints for the parent process. Remove
495 reinsert breakpoints from the child process. Reinsert them to
496 the parent process when vfork is done.
497 * mem-break.c (uninsert_reinsert_breakpoints): New function.
498 (reinsert_reinsert_breakpoints): New function.
499 * mem-break.h (uninsert_reinsert_breakpoints): Declare
500 (reinsert_reinsert_breakpoints): Declare.
501
8a81c5d7
YQ
5022016-06-17 Yao Qi <yao.qi@linaro.org>
503
504 * linux-low.c (handle_extended_wait): If the parent is doing
505 step-over, remove the reinsert breakpoints from the forked child.
506
f50bf8e5
YQ
5072016-06-17 Yao Qi <yao.qi@linaro.org>
508
509 * linux-low.c (unsuspend_all_lwps): Declare.
510 (linux_low_filter_event): If thread exited, call finish_step_over.
511 If step-over is finished, unsuspend other threads.
512
8376a3cb
YQ
5132016-06-17 Yao Qi <yao.qi@linaro.org>
514
515 * linux-low.c (linux_resume_one_lwp_throw): Assert
516 has_reinsert_breakpoints returns false.
517 * mem-break.c (delete_disabled_breakpoints): Assert
518 bp type isn't reinsert_breakpoint.
519
f79b145d
YQ
5202016-06-17 Yao Qi <yao.qi@linaro.org>
521
522 * linux-low.c (maybe_hw_step): New function.
523 (linux_resume_one_lwp_throw): Call maybe_hw_step.
524 (finish_step_over): Switch current_thread to lwp temporarily,
525 and assert has_reinsert_breakpoints returns true.
526 (proceed_one_lwp): Call maybe_hw_step.
527 * mem-break.c (has_reinsert_breakpoints): New function.
528 * mem-break.h (has_reinsert_breakpoints): Declare.
529
0ae534d2
JT
5302016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
531
532 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
533
fcdad592
YQ
5342016-05-17 Yao Qi <yao.qi@linaro.org>
535
536 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
537 instead of find_inferior.
538
9e784964
YQ
5392016-05-05 Yao Qi <yao.qi@linaro.org>
540
541 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
542 Initialize res to zero.
543
cf2ebb6e
YQ
5442016-05-05 Yao Qi <yao.qi@linaro.org>
545
546 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
547 to uint32_t.
548
c1aebf87
UW
5492016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
550
551 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
552 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
553 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
554
35fd2deb 5552016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 556 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
557
558 * tracepoint.c (write_inferior_int8): New function.
559 (cmd_qtenable_disable): Write enable flag using
560 write_inferior_int8.
561
484b3c32
YQ
5622016-04-25 Yao Qi <yao.qi@linaro.org>
563
564 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
565 (need_step_over_p): Return zero if the LWP has pending signals
566 can be delivered on software single step target.
567
85ba7d86
YQ
5682016-04-25 Yao Qi <yao.qi@linaro.org>
569
570 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
571 return instead of error.
572
3539aa13
YQ
5732016-04-22 Yao Qi <yao.qi@linaro.org>
574
575 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
576 to 23.
577
5b061e98
YQ
5782016-04-22 Yao Qi <yao.qi@linaro.org>
579
580 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
581 signal when stepping over breakpoint with software single
582 step.
583
3451269c
PA
5842016-04-21 Pedro Alves <palves@redhat.com>
585
586 * linux-s390-low.c (s390_collect_ptrace_register)
587 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
588 add casts.
589 (s390_check_regset): Use void * instead of gdb_byte *.
590
a2358508
PA
5912016-04-20 Pedro Alves <palves@redhat.com>
592
593 * configure: Renegerate.
594
6885166d
YQ
5952016-04-20 Yao Qi <yao.qi@linaro.org>
596
597 * linux-aarch32-low.c: Include "arch/arm-linux.h".
598 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
599 number 16.
600 (arm_store_gregset): Likewise.
601
2b863f51
WT
6022016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
603
604 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
605 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
606 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
607 (amd64-avx-mpx-linux.c): New rules.
608 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
609 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
610 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
611 (srv_amd64_regobj): Add amd64-avx-mpx.o.
612 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
613 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
614 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
615 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
616 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
617 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
618 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
619 * linux-x86-low.c (x86_linux_read_description): Add case for
620 X86_XSTATE_AVX_MPX_MASK.
621 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
622 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
623 init_registers_i386_avx_mpx_linux.
624 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
625 (initialize_low_tracepoint): Call
626 init_registers_i386_avx_mpx_linux.
627 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
628 (initialize_low_tracepoint): Call
629 init_registers_amd64_avx_mpx_linux.
630 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
631 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
632 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
633 declarations.
634
9b30624b
PA
6352016-04-18 Pedro Alves <palves@redhat.com>
636
637 * configure: Regenerate.
638
45e3745e
AT
6392016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
640
641 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
642 (aarch64_emit_sub): Likewise.
643
2afc13ff
PA
6442016-04-12 Pedro Alves <palves@redhat.com>
645
646 * utils.c (prepare_to_throw_exception): Delete.
647
6e774b13
SM
6482016-04-05 Simon Marchi <simon.marchi@ericsson.com>
649
650 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
651
4dca19f8
MK
6522016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
653
654 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
655
d0a9981f
MK
6562016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
657
658 * linux-aarch64-ipa.c: Add <elf.h> include.
659 * linux-ppc-ipa.c: Add <elf.h> include.
660 * linux-s390-ipa.c: Add <elf.h> include.
661
252db07e
MK
6622016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
663
664 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
665 (get_raw_reg_ptr): Likewise.
666 (get_trace_state_variable_value_ptr): Likewise.
667 (set_trace_state_variable_value_ptr): Likewise.
668 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
669 char *.
670
14e2b6d9
MK
6712016-03-31 Wei-cheng Wang <cole945@gmail.com>
672 Marcin Kościelnicki <koriakin@0x04.net>
673
674 PR/17221
675 * linux-ppc-low.c (emit_insns): New function.
676 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
677 (ppc_emit_prologue): New function.
678 (ppc_emit_epilogue): New function.
679 (ppc_emit_add): New function.
680 (ppc_emit_sub): New function.
681 (ppc_emit_mul): New function.
682 (ppc_emit_lsh): New function.
683 (ppc_emit_rsh_signed): New function.
684 (ppc_emit_rsh_unsigned): New function.
685 (ppc_emit_ext): New function.
686 (ppc_emit_zero_ext): New function.
687 (ppc_emit_log_not): New function.
688 (ppc_emit_bit_and): New function.
689 (ppc_emit_bit_or): New function.
690 (ppc_emit_bit_xor): New function.
691 (ppc_emit_bit_not): New function.
692 (ppc_emit_equal): New function.
693 (ppc_emit_less_signed): New function.
694 (ppc_emit_less_unsigned): New function.
695 (ppc_emit_ref): New function.
696 (ppc_emit_const): New function.
697 (ppc_emit_reg): New function.
698 (ppc_emit_pop): New function.
699 (ppc_emit_stack_flush): New function.
700 (ppc_emit_swap): New function.
701 (ppc_emit_stack_adjust): New function.
702 (ppc_emit_call): New function.
703 (ppc_emit_int_call_1): New function.
704 (ppc_emit_void_call_2): New function.
705 (ppc_emit_if_goto): New function.
706 (ppc_emit_goto): New function.
707 (ppc_emit_eq_goto): New function.
708 (ppc_emit_ne_goto): New function.
709 (ppc_emit_lt_goto): New function.
710 (ppc_emit_le_goto): New function.
711 (ppc_emit_gt_goto): New function.
712 (ppc_emit_ge_goto): New function.
713 (ppc_write_goto_address): New function.
714 (ppc_emit_ops_impl): New static variable.
715 (ppc64v1_emit_prologue): New function.
716 (ppc64v2_emit_prologue): New function.
717 (ppc64_emit_epilogue): New function.
718 (ppc64_emit_add): New function.
719 (ppc64_emit_sub): New function.
720 (ppc64_emit_mul): New function.
721 (ppc64_emit_lsh): New function.
722 (ppc64_emit_rsh_signed): New function.
723 (ppc64_emit_rsh_unsigned): New function.
724 (ppc64_emit_ext): New function.
725 (ppc64_emit_zero_ext): New function.
726 (ppc64_emit_log_not): New function.
727 (ppc64_emit_bit_and): New function.
728 (ppc64_emit_bit_or): New function.
729 (ppc64_emit_bit_xor): New function.
730 (ppc64_emit_bit_not): New function.
731 (ppc64_emit_equal): New function.
732 (ppc64_emit_less_signed): New function.
733 (ppc64_emit_less_unsigned): New function.
734 (ppc64_emit_ref): New function.
735 (ppc64_emit_const): New function.
736 (ppc64v1_emit_reg): New function.
737 (ppc64v2_emit_reg): New function.
738 (ppc64_emit_pop): New function.
739 (ppc64_emit_stack_flush): New function.
740 (ppc64_emit_swap): New function.
741 (ppc64v1_emit_call): New function.
742 (ppc64v2_emit_call): New function.
743 (ppc64v1_emit_int_call_1): New function.
744 (ppc64v2_emit_int_call_1): New function.
745 (ppc64v1_emit_void_call_2): New function.
746 (ppc64v2_emit_void_call_2): New function.
747 (ppc64_emit_if_goto): New function.
748 (ppc64_emit_eq_goto): New function.
749 (ppc64_emit_ne_goto): New function.
750 (ppc64_emit_lt_goto): New function.
751 (ppc64_emit_le_goto): New function.
752 (ppc64_emit_gt_goto): New function.
753 (ppc64_emit_ge_goto): New function.
754 (ppc64v1_emit_ops_impl): New static variable.
755 (ppc64v2_emit_ops_impl): New static variable.
756 (ppc_emit_ops): New function.
757 (linux_low_target): Wire in ppc_emit_ops.
758
a2174ba4
MK
7592016-03-31 Wei-cheng Wang <cole945@gmail.com>
760 Marcin Kościelnicki <koriakin@0x04.net>
761
762 PR/17221
763 * Makefile.in: Add powerpc-*-ipa.o
764 * configure.srv: Add ipa_obj for powerpc*-linux.
765 * linux-ppc-ipa.c: New file.
766 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
767 includes.
768 (PPC_FIELD): New macro.
769 (PPC_SEXT): New macro.
770 (PPC_OP6): New macro.
771 (PPC_BO): New macro.
772 (PPC_LI): New macro.
773 (PPC_BD): New macro.
774 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
775 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
776 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
777 (ppc_get_thread_area): New function.
778 (is_elfv2_inferior): New function.
779 (gen_ds_form): New function.
780 (GEN_STD): New macro.
781 (GEN_STDU): New macro.
782 (GEN_LD): New macro.
783 (GEN_LDU): New macro.
784 (gen_d_form): New function.
785 (GEN_ADDI): New macro.
786 (GEN_ADDIS): New macro.
787 (GEN_LI): New macro.
788 (GEN_LIS): New macro.
789 (GEN_ORI): New macro.
790 (GEN_ORIS): New macro.
791 (GEN_LWZ): New macro.
792 (GEN_STW): New macro.
793 (GEN_STWU): New macro.
794 (gen_xfx_form): New function.
795 (GEN_MFSPR): New macro.
796 (GEN_MTSPR): New macro.
797 (GEN_MFCR): New macro.
798 (GEN_MTCR): New macro.
799 (GEN_SYNC): New macro.
800 (GEN_LWSYNC): New macro.
801 (gen_x_form): New function.
802 (GEN_OR): New macro.
803 (GEN_MR): New macro.
804 (GEN_LWARX): New macro.
805 (GEN_STWCX): New macro.
806 (GEN_CMPW): New macro.
807 (gen_md_form): New function.
808 (GEN_RLDICL): New macro.
809 (GEN_RLDICR): New macro.
810 (gen_i_form): New function.
811 (GEN_B): New macro.
812 (GEN_BL): New macro.
813 (gen_b_form): New function.
814 (GEN_BNE): New macro.
815 (GEN_LOAD): New macro.
816 (GEN_STORE): New macro.
817 (gen_limm): New function.
818 (gen_atomic_xchg): New function.
819 (gen_call): New function.
820 (ppc_relocate_instruction): New function.
821 (ppc_install_fast_tracepoint_jump_pad): New function.
822 (ppc_get_min_fast_tracepoint_insn_len): New function.
823 (ppc_get_ipa_tdesc_idx): New function.
824 (the_low_target): Wire in the new functions.
825 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
826 tdescs.
827 * linux-ppc-tdesc.h: New file.
828
a13c4696
MK
8292016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
830
831 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
832 (alloc_jump_pad_buffer): New function.
833 * linux-amd64-ipa.c: Add <sys/mman.h> include.
834 (alloc_jump_pad_buffer): New function.
835 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
836 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
837 (alloc_jump_pad_buffer): New function.
838 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
839 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
840 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
841 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
842
1cda1512
MK
8432016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
844
845 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
846 * linux-amd64-ipa.c: Likewise.
847 * linux-i386-ipa.c: Likewise.
848 * linux-s390-ipa.c: Likewise.
849 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
850 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
851 set_trace_state_variable_value_ptr.
852 (struct ipa_sym_addresses): Likewise.
853 (symbol_list): Likewise.
854 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
855 accessing gdb_collect directly.
856 (gdb_collect_ptr_type): New typedef.
857 (get_raw_reg_ptr_type): New typedef.
858 (get_trace_state_variable_value_ptr_type): New typedef.
859 (set_trace_state_variable_value_ptr_type): New typedef.
860 (gdb_collect_ptr): New global.
861 (get_raw_reg_ptr): New global.
862 (get_trace_state_variable_value_ptr): New global.
863 (set_trace_state_variable_value_ptr): New global.
864 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
865 accessing get_raw_reg directly.
866 (get_get_tsv_func_addr): Likewise for
867 get_trace_state_variable_value_ptr.
868 (get_set_tsv_func_addr): Likewise for
869 set_trace_state_variable_value_ptr.
870 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
871
72fb5488
SM
8722016-03-30 Simon Marchi <simon.marchi@ericsson.com>
873
874 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
875
28170b88
MK
8762016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
877
878 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
879 packets.
880 (relocate_instruction): Remove own_buf.
881 * server.c (own_buf): Make global.
882 (handle_v_requests): Make global.
883 * server.h (own_buf): New declaration.
884 (handle_v_requests): New prototype.
885
f39e8743
MK
8862016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
887
888 PR 18377
889 * linux-s390-low.c (add_insns): New function.
890 (s390_emit_prologue): New function.
891 (s390_emit_epilogue): New function.
892 (s390_emit_add): New function.
893 (s390_emit_sub): New function.
894 (s390_emit_mul): New function.
895 (s390_emit_lsh): New function.
896 (s390_emit_rsh_signed): New function.
897 (s390_emit_rsh_unsigned): New function.
898 (s390_emit_ext): New function.
899 (s390_emit_log_not): New function.
900 (s390_emit_bit_and): New function.
901 (s390_emit_bit_or): New function.
902 (s390_emit_bit_xor): New function.
903 (s390_emit_bit_not): New function.
904 (s390_emit_equal): New function.
905 (s390_emit_less_signed): New function.
906 (s390_emit_less_unsigned): New function.
907 (s390_emit_ref): New function.
908 (s390_emit_if_goto): New function.
909 (s390_emit_goto): New function.
910 (s390_write_goto_address): New function.
911 (s390_emit_litpool): New function.
912 (s390_emit_const): New function.
913 (s390_emit_call): New function.
914 (s390_emit_reg): New function.
915 (s390_emit_pop): New function.
916 (s390_emit_stack_flush): New function.
917 (s390_emit_zero_ext): New function.
918 (s390_emit_swap): New function.
919 (s390_emit_stack_adjust): New function.
920 (s390_emit_set_r2): New function.
921 (s390_emit_int_call_1): New function.
922 (s390_emit_void_call_2): New function.
923 (s390_emit_eq_goto): New function.
924 (s390_emit_ne_goto): New function.
925 (s390_emit_lt_goto): New function.
926 (s390_emit_le_goto): New function.
927 (s390_emit_gt_goto): New function.
928 (s390_emit_ge_goto): New function.
929 (s390x_emit_prologue): New function.
930 (s390x_emit_epilogue): New function.
931 (s390x_emit_add): New function.
932 (s390x_emit_sub): New function.
933 (s390x_emit_mul): New function.
934 (s390x_emit_lsh): New function.
935 (s390x_emit_rsh_signed): New function.
936 (s390x_emit_rsh_unsigned): New function.
937 (s390x_emit_ext): New function.
938 (s390x_emit_log_not): New function.
939 (s390x_emit_bit_and): New function.
940 (s390x_emit_bit_or): New function.
941 (s390x_emit_bit_xor): New function.
942 (s390x_emit_bit_not): New function.
943 (s390x_emit_equal): New function.
944 (s390x_emit_less_signed): New function.
945 (s390x_emit_less_unsigned): New function.
946 (s390x_emit_ref): New function.
947 (s390x_emit_if_goto): New function.
948 (s390x_emit_const): New function.
949 (s390x_emit_call): New function.
950 (s390x_emit_reg): New function.
951 (s390x_emit_pop): New function.
952 (s390x_emit_stack_flush): New function.
953 (s390x_emit_zero_ext): New function.
954 (s390x_emit_swap): New function.
955 (s390x_emit_stack_adjust): New function.
956 (s390x_emit_int_call_1): New function.
957 (s390x_emit_void_call_2): New function.
958 (s390x_emit_eq_goto): New function.
959 (s390x_emit_ne_goto): New function.
960 (s390x_emit_lt_goto): New function.
961 (s390x_emit_le_goto): New function.
962 (s390x_emit_gt_goto): New function.
963 (s390x_emit_ge_goto): New function.
964 (s390_emit_ops): New function.
965 (struct linux_target_ops): Fill in emit_ops hook.
966
abd9baf9
MK
9672016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
968
969 PR 18377
970 * Makefile.in: Add s390 IPA files.
971 * configure.srv: Build IPA for s390.
972 * linux-s390-ipa.c: New file.
973 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
974 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
975 (tdesc_s390_linux32): Likewise.
976 (init_registers_s390_linux32v1): Likewise.
977 (tdesc_s390_linux32v1): Likewise.
978 (init_registers_s390_linux32v2): Likewise.
979 (tdesc_s390_linux32v2): Likewise.
980 (init_registers_s390_linux64): Likewise.
981 (tdesc_s390_linux64): Likewise.
982 (init_registers_s390_linux64v1): Likewise.
983 (tdesc_s390_linux64v1): Likewise.
984 (init_registers_s390_linux64v2): Likewise.
985 (tdesc_s390_linux64v2): Likewise.
986 (init_registers_s390_te_linux64): Likewise.
987 (tdesc_s390_te_linux64): Likewise.
988 (init_registers_s390_vx_linux64): Likewise.
989 (tdesc_s390_vx_linux64): Likewise.
990 (init_registers_s390_tevx_linux64): Likewise.
991 (tdesc_s390_tevx_linux64): Likewise.
992 (init_registers_s390x_linux64): Likewise.
993 (tdesc_s390x_linux64): Likewise.
994 (init_registers_s390x_linux64v1): Likewise.
995 (tdesc_s390x_linux64v1): Likewise.
996 (init_registers_s390x_linux64v2): Likewise.
997 (tdesc_s390x_linux64v2): Likewise.
998 (init_registers_s390x_te_linux64): Likewise.
999 (tdesc_s390x_te_linux64): Likewise.
1000 (init_registers_s390x_vx_linux64): Likewise.
1001 (tdesc_s390x_vx_linux64): Likewise.
1002 (init_registers_s390x_tevx_linux64): Likewise.
1003 (tdesc_s390x_tevx_linux64): Likewise.
1004 (have_hwcap_s390_vx): New static variable.
1005 (s390_arch_setup): Fill have_hwcap_s390_vx.
1006 (s390_get_thread_area): New function.
1007 (s390_ft_entry_gpr_esa): New const.
1008 (s390_ft_entry_gpr_zarch): New const.
1009 (s390_ft_entry_misc): New const.
1010 (s390_ft_entry_fr): New const.
1011 (s390_ft_entry_vr): New const.
1012 (s390_ft_main_31): New const.
1013 (s390_ft_main_64): New const.
1014 (s390_ft_exit_fr): New const.
1015 (s390_ft_exit_vr): New const.
1016 (s390_ft_exit_misc): New const.
1017 (s390_ft_exit_gpr_esa): New const.
1018 (s390_ft_exit_gpr_zarch): New const.
1019 (append_insns): New function.
1020 (s390_relocate_instruction): New function.
1021 (s390_install_fast_tracepoint_jump_pad): New function.
1022 (s390_get_min_fast_tracepoint_insn_len): New function.
1023 (s390_get_ipa_tdesc_idx): New function.
1024 (struct linux_target_ops): Wire in the above functions.
1025 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1026 * linux-s390-tdesc.h: New file.
1027
a4105d04
MK
10282016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1029
1030 * linux-s390-low.c (s390_supports_tracepoints): New function.
1031 (struct linux_target_ops): Fill supports_tracepoints hook.
1032
35ac8b3e
YQ
10332016-03-18 Yao Qi <yao.qi@linaro.org>
1034
1035 * linux-low.c (lwp_signal_can_be_delivered): New function.
1036 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1037
94610ec4
YQ
10382016-03-18 Yao Qi <yao.qi@linaro.org>
1039
1040 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1041 0 if signal is enqueued. Remove 'signal' from one debugging
1042 message. Move one debugging message to some lines below.
1043 Remove code setting 'signal' to 0.
1044
80aea927
YQ
10452016-03-18 Yao Qi <yao.qi@linaro.org>
1046
1047 * linux-low.c (linux_low_filter_event): Remove redundant
1048 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1049
b04fd3be
MK
10502016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1051
1052 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1053 (struct linux_target_ops): Wire in the above.
1054
c40c8d4b
YQ
10552016-03-03 Yao Qi <yao.qi@linaro.org>
1056
1057 * linux-low.c: Update comments to start_step_over.
1058
0f8288ae
YQ
10592016-03-03 Yao Qi <yao.qi@linaro.org>
1060
1061 PR server/19736
1062 * linux-low.c (handle_extended_wait): Set child suspended
1063 if event_lwp->bp_reinsert isn't zero.
1064
fdbd04a8
YQ
10652016-03-02 Yao Qi <yao.qi@linaro.org>
1066
1067 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1068 enqueue_pending_signal.
1069
6896a8fa
MK
10702016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1071
1072 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1073 is actually loaded.
1074
ab503087
MK
10752016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1076
1077 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1078 (s390_regmap_3264) [!__s390x__]: New global.
1079 (s390_collect_ptrace_register): Skip map entries containing -1.
1080 (s390_supply_ptrace_register): Ditto.
1081 (s390_fill_gprs_high): New function.
1082 (s390_store_gprs_high): New function.
1083 (s390_regsets): Add NT_S390_HIGH_GPRS.
1084 (s390_get_hwcap): Enable on 31-bit.
1085 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1086 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1087 Detect NT_S390_HIGH_GPRS.
1088 (s390_usrregs_info_3264): Enable on 31-bit.
1089 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1090 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1091
ae91f625
MK
10922016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1093
1094 PR gdb/13808
1095 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1096 * configure.srv: Ditto.
1097 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1098 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1099 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1100 (init_registers_amd64_linux): Remove prototype.
1101 (tdesc_amd64_linux): Remove declaration.
1102 (get_ipa_tdesc): New function.
1103 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1104 initialize remaining tdescs.
1105 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1106 (init_registers_i386_linux): Remove prototype.
1107 (tdesc_i386_linux): Remove declaration.
1108 (get_ipa_tdesc): New function.
1109 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1110 initialize remaining tdescs.
1111 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1112 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1113 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1114 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1115 (x86_get_ipa_tdesc_idx): New function.
1116 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1117 * linux-x86-tdesc.h: New file.
1118 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1119 (target_get_ipa_tdesc_idx): New macro.
1120 * tracepoint.c (ipa_tdesc_idx): New macro.
1121 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1122 (symbol_list): Add ipa_tdesc_idx.
1123 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1124 (ipa_tdesc): Remove.
1125 (ipa_tdesc_idx): New variable.
1126 (get_context_regcache): Use get_ipa_tdesc.
1127 (gdb_collect): Ditto.
1128 (gdb_probe): Ditto.
1129 * tracepoint.h (get_ipa_tdesc): New prototype.
1130 (ipa_tdesc): Remove.
1131
e7ad2f14
PA
11322016-02-24 Pedro Alves <palves@redhat.com>
1133
1134 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1135 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1136 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1137 Factor out common code between the USE_SIGTRAP_SIGINFO and
1138 !USE_SIGTRAP_SIGINFO blocks.
1139 (linux_low_filter_event): Call save_stop_reason instead of
1140 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1141 Update comments.
1142 (linux_wait_1): Update comments.
1143
657f9cde
WW
11442016-02-24 Wei-cheng Wang <cole945@gmail.com>
1145
1146 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1147 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1148 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1149 ppc_insert_point, ppc_remove_point.
1150
b00b61e1
MK
11512016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1152
1153 * linux-s390-low.c (s390_supports_z_point_type): New function.
1154 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1155
553cb527
YQ
11562016-02-16 Yao Qi <yao.qi@linaro.org>
1157
1158 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1159 PC. Get pc from regcache_read_pc.
1160
a5652c21
YQ
11612016-02-12 Yao Qi <yao.qi@linaro.org>
1162
1163 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1164 or linux_get_pc_32bit.
1165 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1166
ed443b61
YQ
11672016-02-12 Yao Qi <yao.qi@linaro.org>
1168
1169 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1170 arm_linux_get_next_pcs_fixup.
1171
020ecd38
MK
11722016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1173
1174 * tracepoint.c (x_tracepoint_action_download): Change
1175 write_inferior_data_ptr to write_inferior_data_pointer.
1176 (cmd_qtstart): Likewise.
1177 (write_inferior_data_ptr): Remove.
1178 (download_agent_expr): Change write_inferior_data_ptr to
1179 write_inferior_data_pointer.
1180 (download_tracepoint_1): Likewise.
1181 (download_tracepoint): Likewise.
1182 (download_trace_state_variables): Likewise.
1183
7cae9051
WW
11842016-02-11 Wei-cheng Wang <cole945@gmail.com>
1185 Marcin Kościelnicki <koriakin@0x04.net>
1186
1187 * tracepoint.c (struct tracepoint_action_ops): Remove.
1188 (struct tracepoint_action): Remove ops.
1189 (m_tracepoint_action_download, r_tracepoint_action_download)
1190 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1191 size and offset accordingly.
1192 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1193 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1194 (tracepoint_action_send, tracepoint_action_download): New functions.
1195 Helpers for trace action handlers.
1196 (add_tracepoint_action): Remove setup actions ops.
1197 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1198
9f6a71b4
YQ
11992016-02-10 Yao Qi <yao.qi@linaro.org>
1200
1201 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1202
1e94266c
SM
12032016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1204
1205 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1206 to AC_OUTPUT.
1207 * configure: Regenerate.
1208
8adce034
SM
12092016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1210
1211 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1212 void * to gdb_byte *.
1213 * linux-low.c (siginfo_fixup): Likewise.
1214 (linux_xfer_siginfo): Likewise.
1215 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1216 Likewise.
1217 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1218
93813b37
WT
12192016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1220
1221 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1222 to srv_tgtobj.
1223 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1224 to srv_tgtobj.
1225 * linux-x86-low.c [__x86_64__]: Include
1226 "nat/amd64-linux-siginfo.h".
1227 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1228 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1229 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1230 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1231 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1232 (cpt_si_fd, si_timerid, si_overrun): Move from
1233 nat/amd64-linux-siginfo.c.
1234 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1235
8424cc97
SM
12362016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1237
1238 * server.c (skip_to_semicolon): Remove.
1239 (process_point_options): Use strchrnul instead of
1240 skip_to_semicolon.
1241
4d18591b
YQ
12422016-01-26 Yao Qi <yao.qi@linaro.org>
1243
1244 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1245 * linux-low.c (install_software_single_step_breakpoints): Don't
1246 call regcache_read_pc.
1247 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1248 argument pc.
1249
d8020970
YQ
12502016-01-26 Yao Qi <yao.qi@linaro.org>
1251
1252 * linux-low.c (install_software_single_step_breakpoints): Call
1253 regcache_read_pc instead of get_pc.
1254
8b207339
YQ
12552016-01-26 Yao Qi <yao.qi@linaro.org>
1256
1257 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1258 (unblock_async_io): Rename to ...
1259 (block_unblock_async_io): ... it. New function.
1260 (enable_async_io): Don't install SIGIO handler. Unblock it
1261 instead.
1262 (disable_async_io): Don't ignore SIGIO. Block it instead.
1263 (initialize_async_io): Install SIGIO handler. Don't call
1264 unblock_async_io.
1265
18879fef
YQ
12662016-01-26 Yao Qi <yao.qi@linaro.org>
1267
1268 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1269 first character is '\003', call *the_target->request_interrupt.
1270
a0f8e08a
YQ
12712016-01-25 Yao Qi <yao.qi@linaro.org>
1272
1273 * remote-utils.c (new_thread_notify): Remove.
1274 (dead_thread_notify): Likewise.
1275 * remote-utils.h (new_thread_notify): Remove declaration.
1276 (dead_thread_notify): Likewise.
1277
cc5fd9ab
MK
12782016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1279
1280 * gdb.trace/pending.exp: Fix expected message on continue.
1281
99e8eb11
MK
12822016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1283
1284 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1285 it works properly on big-endian machines where sizeof (CORE_ADDR)
1286 != sizeof (void *).
1287
a994041d
PA
12882016-01-21 Pedro Alves <palves@redhat.com>
1289
1290 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1291 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1292 * configure: Regenerate.
1293
f7a6a40d
YQ
12942016-01-21 Yao Qi <yao.qi@linaro.org>
1295
1296 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1297 is_thumb and set it according to CPSR saved on the stack.
1298 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1299 arm_sigreturn_next_pc.
1300
6f69e520
YQ
13012016-01-18 Yao Qi <yao.qi@linaro.org>
1302
1303 * linux-low.c (linux_set_pc_64bit): New function.
1304 (linux_get_pc_64bit): New function.
1305 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1306 Declare.
1307 * linux-sparc-low.c (debug_threads): Remove declaration.
1308 (sparc_get_pc): Remove.
1309 (the_low_target): Use linux_get_pc_64bit instead of
1310 sparc_get_pc.
1311 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1312 (the_low_target): Use linux_get_pc_64bit and
1313 linux_set_pc_64bit.
1314
276d4552
YQ
13152016-01-18 Yao Qi <yao.qi@linaro.org>
1316
1317 * linux-arm-low.c (debug_threads): Remove declaration.
1318 (arm_get_pc, arm_set_pc): Remove.
1319 (the_low_target): Use linux_get_pc_32bit and
1320 linux_set_pc_32bit.
1321 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1322 (the_low_target): Use linux_get_pc_32bit and
1323 linux_set_pc_32bit.
1324 * linux-cris-low.c (debug_threads): Remove declaration.
1325 (cris_get_pc, cris_set_pc,): Remove.
1326 (the_low_target): Use linux_get_pc_32bit and
1327 linux_set_pc_32bit.
1328 * linux-crisv32-low.c (debug_threads): Remove declaration.
1329 (cris_get_pc, cris_set_pc): Remove.
1330 (the_low_target): Use linux_get_pc_32bit and
1331 linux_set_pc_32bit.
1332 * linux-low.c: Include inttypes.h.
1333 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1334 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1335 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1336 (the_low_target): Use linux_get_pc_32bit and
1337 linux_set_pc_32bit.
1338 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1339 (the_low_target): Use linux_get_pc_32bit and
1340 linux_set_pc_32bit.
1341 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1342 (the_low_target): Use linux_get_pc_32bit and
1343 linux_set_pc_32bit.
1344 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1345 (the_low_target): Use linux_get_pc_32bit and
1346 linux_set_pc_32bit.
1347 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1348 (the_low_target): Use linux_get_pc_32bit and
1349 linux_set_pc_32bit.
1350
eb0edac8
GB
13512016-01-18 Gary Benson <gbenson@redhat.com>
1352
1353 * configure.ac (AC_FUNC_FORK): New check.
1354 * config.in: Regenerate.
1355 * configure: Likewise.
1356
1b451dda
YQ
13572016-01-14 Yao Qi <yao.qi@linaro.org>
1358
1359 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1360 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1361 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1362 arm_get_next_pcs_ctor.
1363
82075af2
JS
13642016-01-12 Josh Stone <jistone@redhat.com>
1365 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1366
1367 * inferiors.h: Include "gdb_vecs.h".
1368 (struct process_info): Add syscalls_to_catch.
1369 * inferiors.c (remove_process): Free syscalls_to_catch.
1370 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1371 syscall_return stops.
1372 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1373 * server.c (handle_general_set): Handle QCatchSyscalls.
1374 (handle_query): Report support for QCatchSyscalls.
1375 * target.h (struct target_ops): Add supports_catch_syscall.
1376 (target_supports_catch_syscall): New macro.
1377 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1378 (struct lwp_info): Add syscall_state.
1379 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1380 Maintain syscall_state and syscalls_to_catch across exec.
1381 (get_syscall_trapinfo): New function, proxy to the_low_target.
1382 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1383 (linux_low_filter_event): Toggle syscall_state entry/return for
1384 syscall traps, and set it ignored for all others.
1385 (gdb_catching_syscalls_p): New function.
1386 (gdb_catch_this_syscall_p): New function.
1387 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1388 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1389 (linux_supports_catch_syscall): New function.
1390 (linux_target_ops): Install it.
1391 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1392 (the_low_target): Install it.
1393
8f13a3ce
MF
13942016-01-12 Mike Frysinger <vapier@gentoo.org>
1395
1396 * acinclude.m4: Include new ../warning.m4 file.
1397 * configure: Regenerated.
1398 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1399
5b3da067
MF
14002016-01-12 Mike Frysinger <vapier@gentoo.org>
1401
1402 * ax.c (is_goto_target): Mark static.
1403 * linux-low.c (register_addr): Likewise.
1404 (linux_fetch_registers, linux_store_registers): Likewise.
1405 * mem-break.c (any_persistent_commands): Fix old prototype.
1406 (add_commands_to_breakpoint): Mark static.
1407 * regcache.c (find_register_by_name): Delete unused func.
1408 * remote-utils.c (hex_or_minus_one): Mark static.
1409 * server.c (monitor_show_help): Mark static.
1410 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1411 handle_v_requests): Likewise.
1412
bc504a31
PA
14132016-01-12 Pedro Alves <palves@redhat.com>
1414
1415 Remove use of the registered trademark symbol throughout.
1416
5a0dd67a
YQ
14172016-01-08 Yao Qi <yao.qi@linaro.org>
1418
1419 * remote-utils.c (getpkt): If c is '\003', call target hook
1420 request_interrupt.
1421
b2ca446f
YQ
14222016-01-06 Yao Qi <yao.qi@linaro.org>
1423
1424 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1425 linux-aarch32-low.c.
1426 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1427 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1428 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1429 (thumb2_breakpoint): Declare.
1430 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1431 linux-aarch32-low.h.
1432 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1433 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1434 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1435
edd88788
JB
14362016-01-01 Joel Brobecker <brobecker@adacore.com>
1437
1438 * gdbreplay.c (gdbreplay_version): Change copyright year in
1439 version message.
1440 * server.c (gdbserver_version): Likewise.
1441
65da7f14
PP
14422015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1443
1444 * server.c (crc32_table): Delete.
1445 (crc32): Use libiberty's xcrc32 function.
1446
4abd5ed2
JB
14472015-12-22 Joel Brobecker <brobecker@adacore.com>
1448
1449 * lynx-low.c (lynx_delete_thread_callback): New function.
1450 (lynx_mourn): Properly delete our process and all of its
1451 threads. Remove call to clear_inferiors.
1452
0e50fe5c
JB
14532015-12-22 Joel Brobecker <brobecker@adacore.com>
1454
1455 * target.c (thread_search_callback): Add check that
1456 the thread_stopped target callback is not NULL before
1457 calling it.
1458
35adc03f
YQ
14592015-12-21 Yao Qi <yao.qi@linaro.org>
1460
1461 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1462 arm breakpoint.
1463
bd2b2909
AT
14642015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1465
1466 * server.c (handle_query): Call target_supports_software_single_step.
1467
7fe5e27e
AT
14682015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1469
1470 * linux-low.c (single_step): New function.
1471 (linux_resume_one_lwp_throw): Call single_step.
1472 (start_step_over): Likewise.
1473
d9311bfa
AT
14742015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1475
1476 * Makefile.in (SFILES): Append arch/arm-linux.c,
1477 arch/arm-get-next-pcs.c.
1478 (arm-linux.o): New rule.
1479 (arm-get-next-pcs.o): New rule.
1480 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1481 arm-linux.o.
1482 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1483 to linux-aarch32-low.c.
1484 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1485 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1486 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1487 (thumb2_breakpoint_len): Likewise.
1488 (arm_is_thumb_mode): Make non-static.
1489 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1490 from linux-aarch32-low.c.
1491 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1492 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1493 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1494 (thumb2_breakpoint_len): Likewise.
1495 (arm_is_thumb_mode): New declaration.
1496 * linux-arm-low.c: Include arch/arm-linux.h
1497 aarch/arm-get-next-pcs.h, sys/syscall.h.
1498 (get_next_pcs_ops): New struct.
1499 (get_next_pcs_addr_bits_remove): New function.
1500 (get_next_pcs_is_thumb): New function.
1501 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1502 (arm_sigreturn_next_pc): Likewise.
1503 (get_next_pcs_syscall_next_pc): Likewise.
1504 (arm_gdbserver_get_next_pcs): Likewise.
1505 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1506 Initialize.
1507 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1508 * server.h: Include gdb_vecs.h.
1509
68ce2059
AT
15102015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1511
1512 * Makefile.in (SFILES): Append common/common-regcache.c.
1513 (OBS): Append common-regcache.o.
1514 (common-regcache.o): New rule.
1515 * regcache.c (init_register_cache): Initialize cache to
1516 REG_UNAVAILABLE.
1517 (regcache_raw_read_unsigned): New function.
1518 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1519 register_status enum.
1520
fa5308bd
AT
15212015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1522
1523 * linux-aarch64-low.c (the_low_targets): Rename
1524 breakpoint_reinsert_addr to get_next_pcs.
1525 * linux-arm-low.c (the_low_targets): Likewise.
1526 * linux-bfin-low.c (the_low_targets): Likewise.
1527 * linux-cris-low.c (the_low_targets): Likewise.
1528 * linux-crisv32-low.c (the_low_targets): Likewise.
1529 * linux-low.c (can_software_single_step): Likewise.
1530 (install_software_single_step_breakpoints): New function.
1531 (start_step_over): Use install_software_single_step_breakpoints.
1532 * linux-low.h: New CORE_ADDR vector.
1533 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1534 get_next_pcs.
1535 * linux-mips-low.c (the_low_targets): Likewise.
1536 * linux-nios2-low.c (the_low_targets): Likewise.
1537 * linux-sparc-low.c (the_low_targets): Likewise.
1538
4a6ed09b
PA
15392015-12-17 Pedro Alves <palves@redhat.com>
1540
1541 * linux-low.c (linux_kill_one_lwp): Remove references to
1542 LinuxThreads.
1543 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1544 to 'kill'.
1545 (linux_init_signals): Delete.
1546 (initialize_low): Adjust.
1547 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1548
7544db95
PA
15492015-12-16 Pedro Alves <palves@redhat.com>
1550
1551 * configure.ac (compiler warning flags): When testing a
1552 -Wno-foo option, check whether -Wfoo works instead.
1553 * configure: Regenerate.
1554
8020350c
DB
15552015-12-11 Don Breazeal <donb@codesourcery.com>
1556
1557 * server.c (process_serial_event): Don't exit from gdbserver
1558 in remote mode if there are still active inferiors.
1559
db91f502
YQ
15602015-12-11 Yao Qi <yao.qi@linaro.org>
1561
1562 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1563 arm_breakpoint_at if the process is 32-bit.
1564
b37a6290
YQ
15652015-12-11 Yao Qi <yao.qi@linaro.org>
1566
1567 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1568 arm breakpoint.
1569
17b1509a
YQ
15702015-12-07 Yao Qi <yao.qi@linaro.org>
1571
1572 * configure.srv: Append arm.o to srv_tgtobj for
1573 aarch64*-*-linux* target.
1574 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1575 from linux-arm-low.c.
1576 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1577 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1578 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1579 (thumb2_breakpoint_len): Likewise.
1580 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1581 (arm_breakpoint_kinds): Likewise.
1582 (arm_breakpoint_kind_from_pc): Likewise.
1583 (arm_sw_breakpoint_from_kind): Likewise.
1584 (arm_breakpoint_kind_from_current_state): Likewise.
1585 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1586 (arm_sw_breakpoint_from_kind): Declare.
1587 (arm_breakpoint_kind_from_current_state): Declare.
1588 (arm_breakpoint_at): Declare.
1589 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1590 arm_sw_breakpoint_from_kind if process is 32-bit.
1591 (aarch64_breakpoint_kind_from_pc): New function.
1592 (aarch64_breakpoint_kind_from_current_state): New function.
1593 (the_low_target): Initialize fields breakpoint_kind_from_pc
1594 and breakpoint_kind_from_current_state.
1595 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1596 linux-aarch32-low.c.
1597 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1598 (arm_breakpoint, arm_breakpoint_len): Likewise.
1599 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1600 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1601 (arm_is_thumb_mode): Likewise.
1602 (arm_breakpoint_at): Likewise.
1603 (arm_breakpoint_kind_from_pc): Likewise.
1604 (arm_sw_breakpoint_from_kind): Likewise.
1605 (arm_breakpoint_kind_from_current_state): Likewise.
1606
1607 Revert:
1608 2015-08-04 Yao Qi <yao.qi@linaro.org>
1609
1610 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1611 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1612 * server.c (extended_protocol): Remove "static".
1613 * server.h (extended_protocol): Declare it.
1614
ece66d65
JS
16152015-12-04 Josh Stone <jistone@redhat.com>
1616
1617 * target.h (struct target_ops) <arch_setup>: Rename to ...
1618 (struct target_ops) <post_create_inferior>: ... this.
1619 (target_arch_setup): Rename to ...
1620 (target_post_create_inferior): ... this, calling post_create_inferior.
1621 * server.c (start_inferior): Update target_arch_setup calls to
1622 target_post_create_inferior.
1623 * linux-low.c (linux_low_ptrace_options): Forward declare.
1624 (linux_arch_setup): Update its comment for general use.
1625 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1626 (struct linux_target_ops): Use linux_post_create_inferior.
1627 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1628 to post_create_inferior.
1629 * nto-low.c (struct nto_target_ops): Likewise.
1630 * spu-low.c (struct spu_target_ops): Likewise.
1631 * win32-low.c (struct win32_target_ops): Likewise.
1632
e58c48b4
AT
16332015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1634
1635 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1636
fbec8956
AT
16372015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1638
1639 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1640 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1641 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1642 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1643 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1644 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1645 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1646 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1647 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1648 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1649 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1650 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1651
9b4c5f87
AT
16522015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1653
1654 * linux-low.c (linux_look_up_symbols): Don't call
1655 linux_supports_traceclone.
1656 * linux-low.h (thread_db_init): Remove use_events argument.
1657 * thread-db.c (thread_db_use_event): Remove global variable.
1658 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1659 (struct thread_db) <td_create_bp>: Remove field.
1660 (thread_db_create_event): Remove function.
1661 (thread_db_enable_reporting): Likewise.
1662 (find_one_thread): Don't check for thread_db_use_events.
1663 (attach_thread): Likewise.
1664 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1665 (try_thread_db_load_1): Don't check for thread_db_use_events.
1666 (thread_db_init): Remove use_events argument and thread events
1667 handling.
1668 (remove_thread_event_breakpoints): Remove function.
1669 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1670
7d00775e
AT
16712015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1672
1673 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1674 New function.
1675 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1676 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1677 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1678 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1679 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1680 Initialize.
1681 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1682 New function.
1683 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1684 * linux-low.c (can_hardware_single_step): Use
1685 supports_hardware_single_step.
1686 (can_software_single_step): New function.
1687 (start_step_over): Call can_software_single_step.
1688 (linux_supports_hardware_single_step): New function.
1689 (struct target_ops) <supports_software_single_step>: Initialize.
1690 * linux-low.h (struct linux_target_ops)
1691 <supports_hardware_single_step>: Initialize.
1692 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1693 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1694 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1695 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1696 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1697 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1698 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1699 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1700 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1701 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1702 Initialize.
1703 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1704 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1705 Initialize.
1706 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1707 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1708 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1709 New function.
1710 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1711 * target.h (struct target_ops): <supports_software_single_step>:
1712 New field.
1713 (target_supports_software_single_step): New macro.
1714
2d97cd35
AT
17152015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1716
1717 * linux-low.c (linux_wait_1): Fix pc advance condition.
1718 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1719 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1720
769ef81f
AT
17212015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1722
1723 * linux-arm-low.c (arm_is_thumb_mode): New function.
1724 (arm_breakpoint_at): Use arm_is_thumb_mode.
1725 (arm_breakpoint_kind_from_current_state): New function.
1726 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1727 Initialize.
1728 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1729 (linux_breakpoint_kind_from_current_state): New function.
1730 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1731 * linux-low.h (struct linux_target_ops)
1732 <breakpoint_kind_from_current_state>: New field.
1733 * target.h (struct target_ops): Likewise.
1734 (target_breakpoint_kind_from_current_state): New macro.
1735
1bebeeca
PA
17362015-11-30 Pedro Alves <palves@redhat.com>
1737
1738 * linux-low.c (linux_resume): Wake up the event loop before
1739 returning.
1740
a67a9fae
PA
17412015-11-30 Pedro Alves <palves@redhat.com>
1742
1743 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1744 check.
1745 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1746 to -1.
1747 * target.c (struct thread_search): New structure.
1748 (thread_search_callback): New function.
1749 (prev_general_thread): New global.
1750 (prepare_to_access_memory, done_accessing_memory): New functions.
1751 * target.h (prepare_to_access_memory, done_accessing_memory):
1752 Replace macros with function declarations.
1753
f2faf941
PA
17542015-11-30 Pedro Alves <palves@redhat.com>
1755
1756 PR 14618
1757 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1758 report TARGET_WAITKIND_NO_RESUMED.
1759 * remote-utils.c (prepare_resume_reply): Handle
1760 TARGET_WAITKIND_NO_RESUMED.
1761 * server.c (report_no_resumed): New global.
1762 (handle_query) <qSupported>: Handle "no-resumed+". Report
1763 "no-resumed+" support.
1764 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1765 return error if the client doesn't support no-resumed events.
1766 (push_stop_notification): New function.
1767 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1768 events if the client supports them.
1769
a681f9c9
PA
17702015-11-30 Pedro Alves <palves@redhat.com>
1771
1772 * linux-low.c (thread_still_has_status_pending_p): Don't check
1773 vCont;t here.
1774 (lwp_resumed): New function.
1775 (status_pending_p_callback): Return early if the LWP is not
1776 supposed to be resumed.
1777
65706a29
PA
17782015-11-30 Pedro Alves <palves@redhat.com>
1779
1780 * linux-low.c (handle_extended_wait): Assert that the LWP's
1781 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1782 thread create events, leave the new child's status pending.
1783 (linux_low_filter_event): If GDB wants to hear about thread exit
1784 events, leave the LWP marked dead and don't delete it.
1785 (linux_wait_for_event_filtered): Don't check for thread exit.
1786 (filter_exit_event): New function.
1787 (linux_wait_1): Use it, when returning an exit event.
1788 (linux_resume_one_lwp_throw): Assert that the LWP's
1789 waitstatus is TARGET_WAITKIND_IGNORE.
1790 * remote-utils.c (prepare_resume_reply): Handle
1791 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1792 * server.c (report_thread_events): New global.
1793 (handle_general_set): Handle QThreadEvents.
1794 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1795 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1796 TARGET_WAITKIND_THREAD_EXITED.
1797 * server.h (report_thread_events): Declare.
1798
56cf4bed
PA
17992015-11-30 Pedro Alves <palves@redhat.com>
1800
1801 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1802 the thread's last_resume_kind was resume_stop.
1803
500c1d85
PA
18042015-11-30 Pedro Alves <palves@redhat.com>
1805
1806 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1807 before returning.
1808
de979965
PA
18092015-11-30 Pedro Alves <palves@redhat.com>
1810
1811 * server.c (handle_v_requests): Handle vCtrlC.
1812
34c65914
PA
18132015-11-30 Pedro Alves <palves@redhat.com>
1814
1815 * gdbthread.h (find_any_thread_of_pid): Declare.
1816 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1817 functions.
1818 * server.c (handle_query): If current_thread is NULL, look for
1819 another thread of the selected process.
1820
79efa585 18212015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 1822 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
1823
1824 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1825 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1826 name in reply.
1827 * target.h (struct target_ops) <thread_name>: New field.
1828 (target_thread_name): New macro.
1829
80d82c19
JB
18302015-11-23 Joel Brobecker <brobecker@adacore.com>
1831
1832 * regcache.h (regcache_invalidate_pid): Add declaration.
1833 * regcache.c (regcache_invalidate_pid): New function, extracted
1834 from regcache_invalidate.
1835 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1836 Add trivial documentation comment.
1837 * lynx-low.c: Use regcache_invalidate_pid instead of
1838 regcache_invalidate.
1839
64da5dd5
JB
18402015-11-23 Joel Brobecker <brobecker@adacore.com>
1841
1842 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1843 and Elf64_auxv_t if the target is Android.
1844
37ce4055
DE
18452015-11-22 Doug Evans <xdje42@gmail.com>
1846
1847 * target.h: #include <sys/types.h>.
1848
06e03fff
PA
18492015-11-19 Pedro Alves <palves@redhat.com>
1850
1851 * linux-low.c (linux_process_qsupported): Change prototype.
1852 Adjust.
1853 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1854 Change prototype.
1855 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1856 and adjust to loop over all features.
1857 * server.c (handle_query) <qSupported>: Adjust to call
1858 target_process_qsupported once, passing it a vector of unprocessed
1859 features.
1860 * target.h (struct target_ops) <process_qsupported>: Change
1861 prototype.
1862 (target_process_qsupported): Adjust.
1863
9a084706
PA
18642015-11-19 Pedro Alves <palves@redhat.com>
1865
1866 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1867 mode.
1868 * configure: Regenerate.
1869
dad44a1f
PA
18702015-11-19 Pedro Alves <palves@redhat.com>
1871
1872 * configure: Regenerate.
1873
231c0592
YQ
18742015-11-19 Yao Qi <yao.qi@linaro.org>
1875
1876 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1877 type to uint32_t.
1878
6c1c9a8b
YQ
18792015-11-19 Yao Qi <yao.qi@linaro.org>
1880
1881 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1882 (struct aarch64_operand): Move enum out.
1883
9caa3311
YQ
18842015-11-19 Yao Qi <yao.qi@linaro.org>
1885
1886 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1887 struct user_fpsimd_state *.
1888 (aarch64_store_fpregset): Likewise.
1889
6a69a054
YQ
18902015-11-19 Yao Qi <yao.qi@linaro.org>
1891
1892 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1893 struct user_pt_regs *.
1894 (aarch64_store_gregset): Likewise.
1895
1798301e
PA
18962015-11-18 Pedro Alves <palves@redhat.com>
1897
1898 * Makefile.in (all_object_files): Add $IPA_OBJS.
1899
ce7715e2
PA
19002015-11-17 Pedro Alves <palves@redhat.com>
1901
1902 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1903 GDB_SIGNAL_0 and gdb_signal_to_string.
1904
c0879059
PA
19052015-11-17 Pedro Alves <palves@redhat.com>
1906
1907 * win32-low.c (handle_output_debug_string): Remove parameter.
1908 (win32_kill): Remove our_status local and adjust call to
1909 handle_output_debug_string.
1910 (get_child_debug_event): Adjust call to
1911 handle_output_debug_string.
1912
1996e237
SM
19132015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1914
1915 * linux-mips-low.c (mips_fill_gregset): Add cast.
1916 (mips_store_gregset): Likewise.
1917 (mips_fill_fpregset): Likewise.
1918 (mips_store_fpregset): Likewise.
1919
cbec665b
SM
19202015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1921
1922 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1923 priv.
1924
eb3e3c67
SM
19252015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1926
1927 * linux-mips-low.c (mips_linux_new_thread): Change type of
1928 watch_type to enum target_hw_bp_type.
1929
171de4b8
SM
19302015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1931
1932 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1933 Change return type to arm_hwbp_type.
1934
04248ead
SM
19352015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1936
1937 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1938 (arm_store_gregset): Likewise.
1939 * linux-arm-low.c (arm_get_hwcap): Likewise.
1940 (arm_read_description): Likewise.
1941
04b3479c
SM
19422015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1943
1944 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1945
2bc84e8a
SM
19462015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1947
1948 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1949 (ppc_fill_vsxregset): Likewise.
1950 (ppc_store_vsxregset): Likewise.
1951 (ppc_fill_vrregset): Likewise.
1952 (ppc_store_vrregset): Likewise.
1953 (ppc_fill_evrregset): Likewise.
1954 (ppc_store_evrregset): Likewise.
1955
e6c5bb05
SM
19562015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1957
1958 * linux-ppc-low.c (ppc_usrregs_info): Remove
1959 forward-declaration.
1960 (ppc_arch_setup): Move lower in file.
1961
7ea45d72
SM
19622015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1963
1964 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1965 (ps_pdwrite): Likewise.
1966
69291610
HW
19672015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1968
1969 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1970 to after assert checks.
1971
b42945fd
SM
19722015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1973
1974 * proc-service.c (ps_pdread): Add/adjust casts.
1975 (ps_pdwrite): Add/adjust casts.
1976
d6f85c84
SM
19772015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1978
1979 * server.c (handle_search_memory_1): Cast return value of
1980 memmem.
1981
f98cd059
SM
19822015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1983
1984 * server.c (write_qxfer_response): Change type of data to
1985 gdb_byte *.
1986
d2412fa5
PA
19872015-10-29 Pedro Alves <palves@redhat.com>
1988
1989 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1990
c17414a2
PA
19912015-10-29 Pedro Alves <palves@redhat.com>
1992
1993 * tracepoint.c (clear_installed_tracepoints): Add casts.
1994
e053fbc4
PA
19952015-10-29 Pedro Alves <palves@redhat.com>
1996
1997 * server.c (handle_v_cont, process_serial_event): Add enum
1998 gdb_signal casts to signal parsing code.
1999
add67df8
PA
20002015-10-29 Pedro Alves <palves@redhat.com>
2001
2002 * linux-low.h (NULL_REGSET): Define.
2003 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2004 * linux-arm-low.c (arm_regsets): Likewise.
2005 * linux-crisv32-low.c (cris_regsets): Likewise.
2006 * linux-m68k-low.c (m68k_regsets): Likewise.
2007 * linux-mips-low.c (mips_regsets): Likewise.
2008 * linux-nios2-low.c (nios2_regsets): Likewise.
2009 * linux-ppc-low.c (ppc_regsets): Likewise.
2010 * linux-s390-low.c (s390_regsets): Likewise.
2011 * linux-sh-low.c (sh_regsets): Likewise.
2012 * linux-sparc-low.c (sparc_regsets): Likewise.
2013 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2014 * linux-tile-low.c (tile_regsets): Likewise.
2015 * linux-x86-low.c (x86_regsets): Likewise.
2016 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2017
50bc912a
PA
20182015-10-29 Pedro Alves <palves@redhat.com>
2019
2020 * linux-low.h (NULL_REGSET): Define.
2021 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2022 * linux-arm-low.c (arm_regsets): Likewise.
2023 * linux-crisv32-low.c (cris_regsets): Likewise.
2024 * linux-m68k-low.c (m68k_regsets): Likewise.
2025 * linux-mips-low.c (mips_regsets): Likewise.
2026 * linux-nios2-low.c (nios2_regsets): Likewise.
2027 * linux-ppc-low.c (ppc_regsets): Likewise.
2028 * linux-s390-low.c (s390_regsets): Likewise.
2029 * linux-sh-low.c (sh_regsets): Likewise.
2030 * linux-sparc-low.c (sparc_regsets): Likewise.
2031 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2032 * linux-tile-low.c (tile_regsets): Likewise.
2033 * linux-x86-low.c (x86_regsets): Likewise.
2034 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2035
682b2546
DE
20362015-10-26 Doug Evans <dje@google.com>
2037
2038 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2039
963843d4
DE
20402015-10-26 Doug Evans <dje@google.com>
2041
2042 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2043
d41401ac
DE
20442015-10-26 Doug Evans <dje@google.com>
2045
2046 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2047 for debug_printf.
2048 (attach_thread, find_new_threads_callback): Ditto.
2049
3db28855
AT
20502015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2051
2052 * mem-break.h (set_breakpoint_data): Remove.
2053
fb78e89c
AT
20542015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2055
2056 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2057 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2058 (initialize_low): Remove set_breakpoint_data call.
2059 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2060 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2061 (initialize_low): Remove set_breakpoint_data call.
2062 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2063 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2064 (initialize_low): Remove set_breakpoint_data call.
2065
2e6ee069
AT
20662015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2067
2068 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2069 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2070 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2071 * target.h (target_breakpoint_kind_from_pc): New macro.
2072
1652a986
AT
20732015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2074
2075 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2076 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2077 the default breakpoint kind.
2078
abeead09
AT
20792015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2080
2081 * linux-arm-low.c (arm_supports_z_point_type): Add software
2082 breakpoint support.
2083
b0b4b501
AT
20842015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2085
2086 * linux-arm-low.c: Refactor breakpoint definitions.
2087 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2088 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2089
8689682c
AT
20902015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2091
2092 * Makefile.in: Add arm.c/o.
2093 * configure.srv: Likewise.
2094 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2095 (arm_breakpoint_kind_from_pc): New function.
2096 (arm_sw_breakpoint_from_kind): Return proper kind.
2097 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2098
27165294
AT
20992015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2100
2101 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2102 removal.
2103 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2104 (struct raw_breakpoint) <size>: Remove.
2105 (struct raw_breakpoint) <kind>: Add.
2106 (bp_size): New function.
2107 (bp_opcode): Likewise.
2108 (find_raw_breakpoint_at): Adjust for kind.
2109 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2110 (remove_memory_breakpoint): Adjust for kind call bp_size.
2111 (set_raw_breakpoint_at): Adjust for kind.
2112 (set_breakpoint): Likewise.
2113 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2114 (delete_raw_breakpoint): Adjust for kind.
2115 (delete_breakpoint): Likewise.
2116 (find_gdb_breakpoint): Likewise.
2117 (set_gdb_breakpoint_1): Likewise.
2118 (set_gdb_breakpoint): Likewise.
2119 (delete_gdb_breakpoint_1): Likewise.
2120 (delete_gdb_breakpoint): Likewise.
2121 (uninsert_raw_breakpoint): Likewise.
2122 (reinsert_raw_breakpoint): Likewise.
2123 (set_breakpoint_data): Remove.
2124 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2125 (check_mem_read): Adjust for kind call bp_size.
2126 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2127 (clone_one_breakpoint): Adjust for kind.
2128 * mem-break.h (set_gdb_breakpoint): Likewise.
2129 (delete_gdb_breakpoint): Likewise.
2130 * server.c (process_serial_event): Likewise.
2131
dd373349
AT
21322015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2133
2134 * linux-aarch64-low.c (aarch64_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-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2140 (arm_sw_breakpoint_from_kind): New function.
2141 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2142 (struct linux_target_ops) <breakpoint>: Remove.
2143 (struct linux_target_ops) <breakpoint_len>: Remove.
2144 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2145 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2146 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2147 (struct linux_target_ops) <breakpoint>: Remove.
2148 (struct linux_target_ops) <breakpoint_len>: Remove.
2149 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2150 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2151 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2152 (struct linux_target_ops) <breakpoint>: Remove.
2153 (struct linux_target_ops) <breakpoint_len>: Remove.
2154 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2155 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2156 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2157 and sw_breakpoint_from_kind to increment the pc.
2158 (linux_breakpoint_kind_from_pc): New function.
2159 (linux_sw_breakpoint_from_kind): New function.
2160 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2161 (initialize_low): Call breakpoint_kind_from_pc and
2162 sw_breakpoint_from_kind to replace breakpoint_data/len.
2163 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2164 New field.
2165 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2166 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2167 (struct linux_target_ops) <breakpoint>: Remove.
2168 (struct linux_target_ops) <breakpoint_len>: Remove.
2169 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2170 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2171 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2172 (struct linux_target_ops) <breakpoint>: Remove.
2173 (struct linux_target_ops) <breakpoint_len>: Remove.
2174 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2175 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2176 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2177 (struct linux_target_ops) <breakpoint>: Remove.
2178 (struct linux_target_ops) <breakpoint_len>: Remove.
2179 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2180 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2181 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2182 (struct linux_target_ops) <breakpoint>: Remove.
2183 (struct linux_target_ops) <breakpoint_len>: Remove.
2184 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2185 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2186 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2187 (struct linux_target_ops) <breakpoint>: Remove.
2188 (struct linux_target_ops) <breakpoint_len>: Remove.
2189 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2190 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2191 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2192 (struct linux_target_ops) <breakpoint>: Remove.
2193 (struct linux_target_ops) <breakpoint_len>: Remove.
2194 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2195 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2196 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2197 (struct linux_target_ops) <breakpoint>: Remove.
2198 (struct linux_target_ops) <breakpoint_len>: Remove.
2199 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2200 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2201 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2202 (struct linux_target_ops) <breakpoint>: Remove.
2203 (struct linux_target_ops) <breakpoint_len>: Remove.
2204 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2205 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2206 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2207 (struct linux_target_ops) <breakpoint>: Remove.
2208 (struct linux_target_ops) <breakpoint_len>: Remove.
2209 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2210 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2211 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2212 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2213 (struct linux_target_ops) <breakpoint>: Remove.
2214 (struct linux_target_ops) <breakpoint_len>: Remove.
2215 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2216 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2217 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2218 (struct linux_target_ops) <breakpoint>: Remove.
2219 (struct linux_target_ops) <breakpoint_len>: Remove.
2220 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2221 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2222
4cd98a19
AT
22232015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2224
2225 * linux-cris-low.c (cris_get_pc): Remove void arg.
2226
774ee6d2
AR
22272015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2228
2229 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2230 variable name.
2231
833dcd29
AR
22322015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2233
2234 * inferiors.c (thread_pid_matches_callback): New function.
2235 (find_thread_process): New function.
2236 (remove_thread): Reset current_thread.
2237 (remove_process): Assert threads have been removed first.
2238
8d689ee5
YQ
22392015-10-15 Yao Qi <yao.qi@linaro.org>
2240
2241 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2242 if it is 3.
2243 (aarch64_remove_point): Likewise.
2244 * regcache.c (regcache_register_size): New function.
2245
1c2e1515
YQ
22462015-10-12 Yao Qi <yao.qi@linaro.org>
2247
2248 * linux-aarch64-low.c: Update all callers as emit_load_store
2249 is renamed to aarch64_emit_load_store.
2250
e1c587c3
YQ
22512015-10-12 Yao Qi <yao.qi@linaro.org>
2252
2253 * linux-aarch64-low.c: Update all callers of function renaming
2254 from emit_insn to aarch64_emit_insn.
2255
b6542f81
YQ
22562015-10-12 Yao Qi <yao.qi@linaro.org>
2257
2258 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2259 arch/aarch64-insn.h.
2260 (struct aarch64_memory_operand): Likewise.
2261 (ENCODE): Likewise.
2262 (emit_insn): Move to arch/aarch64-insn.c.
2263 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2264 (emit_load_store): Move to arch/aarch64-insn.c.
2265 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2266 (can_encode_int32): Remove.
2267
246994ce
YQ
22682015-10-12 Yao Qi <yao.qi@linaro.org>
2269
2270 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2271 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2272 (aarch64_relocate_instruction): Likewise.
2273 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2274 (struct aarch64_insn_visitor): Likewise.
2275
0badd99f
YQ
22762015-10-12 Yao Qi <yao.qi@linaro.org>
2277
2278 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2279 (struct aarch64_insn_visitor): New.
2280 (struct aarch64_insn_relocation_data): New.
2281 (aarch64_ftrace_insn_reloc_b): New function.
2282 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2283 (aarch64_ftrace_insn_reloc_cb): Likewise.
2284 (aarch64_ftrace_insn_reloc_tb): Likewise.
2285 (aarch64_ftrace_insn_reloc_adr): Likewise.
2286 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2287 (aarch64_ftrace_insn_reloc_others): Likewise.
2288 (visitor): New.
2289 (aarch64_relocate_instruction): Use visitor.
2290
dfaffe9d
YQ
22912015-10-12 Yao Qi <yao.qi@linaro.org>
2292
2293 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2294 int. Add argument buf.
2295 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2296 aarch64_relocate_instruction.
2297
70b439f0
YQ
22982015-10-12 Yao Qi <yao.qi@linaro.org>
2299
2300 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2301 argument insn. Remove local variable insn. Don't call
2302 target_read_uint32.
2303 (aarch64_install_fast_tracepoint_jump_pad): Call
2304 target_read_uint32.
2305
7781c06f
YQ
23062015-09-30 Yao Qi <yao.qi@linaro.org>
2307
2308 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2309 (emit_load_store_pair): Likewise.
2310
9a3c8263
SM
23112015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2312
2313 * dll.c (match_dll): Add cast(s).
2314 (unloaded_dll): Likewise.
2315 * linux-low.c (second_thread_of_pid_p): Likewise.
2316 (delete_lwp_callback): Likewise.
2317 (count_events_callback): Likewise.
2318 (select_event_lwp_callback): Likewise.
2319 (linux_set_resume_request): Likewise.
2320 * server.c (accumulate_file_name_length): Likewise.
2321 (emit_dll_description): Likewise.
2322 (handle_qxfer_threads_worker): Likewise.
2323 (visit_actioned_threads): Likewise.
2324 * thread-db.c (any_thread_of): Likewise.
2325 * tracepoint.c (same_process_p): Likewise.
2326 (match_blocktype): Likewise.
2327 (build_traceframe_info_xml): Likewise.
2328
224c3ddb
SM
23292015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2330
2331 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2332 assignment.
2333 (gdb_unparse_agent_expr): Likewise.
2334 * hostio.c (require_data): Likewise.
2335 (handle_pread): Likewise.
2336 * linux-low.c (disable_regset): Likewise.
2337 (fetch_register): Likewise.
2338 (store_register): Likewise.
2339 (get_dynamic): Likewise.
2340 (linux_qxfer_libraries_svr4): Likewise.
2341 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2342 (set_fast_tracepoint_jump): Likewise.
2343 (uninsert_fast_tracepoint_jumps_at): Likewise.
2344 (reinsert_fast_tracepoint_jumps_at): Likewise.
2345 (validate_inserted_breakpoint): Likewise.
2346 (clone_agent_expr): Likewise.
2347 * regcache.c (init_register_cache): Likewise.
2348 * remote-utils.c (putpkt_binary_1): Likewise.
2349 (decode_M_packet): Likewise.
2350 (decode_X_packet): Likewise.
2351 (look_up_one_symbol): Likewise.
2352 (relocate_instruction): Likewise.
2353 (monitor_output): Likewise.
2354 * server.c (handle_search_memory): Likewise.
2355 (handle_qxfer_exec_file): Likewise.
2356 (handle_qxfer_libraries): Likewise.
2357 (handle_qxfer): Likewise.
2358 (handle_query): Likewise.
2359 (handle_v_cont): Likewise.
2360 (handle_v_run): Likewise.
2361 (captured_main): Likewise.
2362 * target.c (write_inferior_memory): Likewise.
2363 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2364 * tracepoint.c (init_trace_buffer): Likewise.
2365 (add_tracepoint_action): Likewise.
2366 (add_traceframe): Likewise.
2367 (add_traceframe_block): Likewise.
2368 (cmd_qtdpsrc): Likewise.
2369 (cmd_qtdv): Likewise.
2370 (cmd_qtstatus): Likewise.
2371 (response_source): Likewise.
2372 (response_tsv): Likewise.
2373 (cmd_qtnotes): Likewise.
2374 (gdb_collect): Likewise.
2375 (initialize_tracepoint): Likewise.
2376
afbe19f8
PL
23772015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2378
2379 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2380 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2381 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2382 <NOP>: New.
2383 (enum aarch64_condition_codes): New enum.
2384 (w0): New static global.
2385 (fp): Likewise.
2386 (lr): Likewise.
2387 (struct aarch64_memory_operand) <type>: New
2388 MEMORY_OPERAND_POSTINDEX type.
2389 (postindex_memory_operand): New helper function.
2390 (emit_ret): New function.
2391 (emit_load_store_pair): New function, factored out of emit_stp
2392 with support for MEMORY_OPERAND_POSTINDEX.
2393 (emit_stp): Rewrite using emit_load_store_pair.
2394 (emit_ldp): New function.
2395 (emit_load_store): Likewise.
2396 (emit_ldr): Mention post-index instruction in comment.
2397 (emit_ldrh): New function.
2398 (emit_ldrb): New function.
2399 (emit_ldrsw): Mention post-index instruction in comment.
2400 (emit_str): Likewise.
2401 (emit_subs): New function.
2402 (emit_cmp): Likewise.
2403 (emit_and): Likewise.
2404 (emit_orr): Likewise.
2405 (emit_orn): Likewise.
2406 (emit_eor): Likewise.
2407 (emit_mvn): Likewise.
2408 (emit_lslv): Likewise.
2409 (emit_lsrv): Likewise.
2410 (emit_asrv): Likewise.
2411 (emit_mul): Likewise.
2412 (emit_sbfm): Likewise.
2413 (emit_sbfx): Likewise.
2414 (emit_ubfm): Likewise.
2415 (emit_ubfx): Likewise.
2416 (emit_csinc): Likewise.
2417 (emit_cset): Likewise.
2418 (emit_nop): Likewise.
2419 (emit_ops_insns): New helper function.
2420 (emit_pop): Likewise.
2421 (emit_push): Likewise.
2422 (aarch64_emit_prologue): New function.
2423 (aarch64_emit_epilogue): Likewise.
2424 (aarch64_emit_add): Likewise.
2425 (aarch64_emit_sub): Likewise.
2426 (aarch64_emit_mul): Likewise.
2427 (aarch64_emit_lsh): Likewise.
2428 (aarch64_emit_rsh_signed): Likewise.
2429 (aarch64_emit_rsh_unsigned): Likewise.
2430 (aarch64_emit_ext): Likewise.
2431 (aarch64_emit_log_not): Likewise.
2432 (aarch64_emit_bit_and): Likewise.
2433 (aarch64_emit_bit_or): Likewise.
2434 (aarch64_emit_bit_xor): Likewise.
2435 (aarch64_emit_bit_not): Likewise.
2436 (aarch64_emit_equal): Likewise.
2437 (aarch64_emit_less_signed): Likewise.
2438 (aarch64_emit_less_unsigned): Likewise.
2439 (aarch64_emit_ref): Likewise.
2440 (aarch64_emit_if_goto): Likewise.
2441 (aarch64_emit_goto): Likewise.
2442 (aarch64_write_goto_address): Likewise.
2443 (aarch64_emit_const): Likewise.
2444 (aarch64_emit_call): Likewise.
2445 (aarch64_emit_reg): Likewise.
2446 (aarch64_emit_pop): Likewise.
2447 (aarch64_emit_stack_flush): Likewise.
2448 (aarch64_emit_zero_ext): Likewise.
2449 (aarch64_emit_swap): Likewise.
2450 (aarch64_emit_stack_adjust): Likewise.
2451 (aarch64_emit_int_call_1): Likewise.
2452 (aarch64_emit_void_call_2): Likewise.
2453 (aarch64_emit_eq_goto): Likewise.
2454 (aarch64_emit_ne_goto): Likewise.
2455 (aarch64_emit_lt_goto): Likewise.
2456 (aarch64_emit_le_goto): Likewise.
2457 (aarch64_emit_gt_goto): Likewise.
2458 (aarch64_emit_ge_got): Likewise.
2459 (aarch64_emit_ops_impl): New static global variable.
2460 (aarch64_emit_ops): New target function, return
2461 &aarch64_emit_ops_impl.
2462 (struct linux_target_ops): Install it.
2463
bb903df0
PL
24642015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2465
2466 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2467 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2468 aarch64-ipa.o.
2469 * linux-aarch64-ipa.c: New file.
2470 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2471 and endian.h.
2472 (aarch64_get_thread_area): New target method.
2473 (extract_signed_bitfield): New helper function.
2474 (aarch64_decode_ldr_literal): New function.
2475 (enum aarch64_opcodes): New enum.
2476 (struct aarch64_register): New struct.
2477 (struct aarch64_operand): New struct.
2478 (x0): New static global.
2479 (x1): Likewise.
2480 (x2): Likewise.
2481 (x3): Likewise.
2482 (x4): Likewise.
2483 (w2): Likewise.
2484 (ip0): Likewise.
2485 (sp): Likewise.
2486 (xzr): Likewise.
2487 (aarch64_register): New helper function.
2488 (register_operand): Likewise.
2489 (immediate_operand): Likewise.
2490 (struct aarch64_memory_operand): New struct.
2491 (offset_memory_operand): New helper function.
2492 (preindex_memory_operand): Likewise.
2493 (enum aarch64_system_control_registers): New enum.
2494 (ENCODE): New macro.
2495 (emit_insn): New helper function.
2496 (emit_b): New function.
2497 (emit_bcond): Likewise.
2498 (emit_cb): Likewise.
2499 (emit_tb): Likewise.
2500 (emit_blr): Likewise.
2501 (emit_stp): Likewise.
2502 (emit_ldp_q_offset): Likewise.
2503 (emit_stp_q_offset): Likewise.
2504 (emit_load_store): Likewise.
2505 (emit_ldr): Likewise.
2506 (emit_ldrsw): Likewise.
2507 (emit_str): Likewise.
2508 (emit_ldaxr): Likewise.
2509 (emit_stxr): Likewise.
2510 (emit_stlr): Likewise.
2511 (emit_data_processing_reg): Likewise.
2512 (emit_data_processing): Likewise.
2513 (emit_add): Likewise.
2514 (emit_sub): Likewise.
2515 (emit_mov): Likewise.
2516 (emit_movk): Likewise.
2517 (emit_mov_addr): Likewise.
2518 (emit_mrs): Likewise.
2519 (emit_msr): Likewise.
2520 (emit_sevl): Likewise.
2521 (emit_wfe): Likewise.
2522 (append_insns): Likewise.
2523 (can_encode_int32_in): New helper function.
2524 (aarch64_relocate_instruction): New function.
2525 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2526 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2527 (struct linux_target_ops): Install aarch64_get_thread_area,
2528 aarch64_install_fast_tracepoint_jump_pad and
2529 aarch64_get_min_fast_tracepoint_insn_len.
2530
787749ea
PL
25312015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2532
2533 * Makefile.in (aarch64-insn.o): New rule.
2534 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2535
9812b2e6
YQ
25362015-09-21 Yao Qi <yao.qi@linaro.org>
2537
2538 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2539
18fe412b
YQ
25402015-09-21 Yao Qi <yao.qi@linaro.org>
2541
2542 * tracepoint.c (max_jump_pad_size): Remove.
2543
a0cc84cd
YQ
25442015-09-18 Yao Qi <yao.qi@linaro.org>
2545
2546 * linux-aarch64-low.c: Don't include sys/uio.h.
2547 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2548
d78908cf
WW
25492015-09-16 Wei-cheng Wang <cole945@gmail.com>
2550
2551 * tracepoint.c (eval_result_type): Change prototype.
2552 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2553
d57e0d50
PA
25542015-09-15 Pedro Alves <palves@redhat.com>
2555
2556 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2557 Check whether to report exec events instead of checking whether
2558 multiprocess is enabled.
2559
5a676acc
PA
25602015-09-15 Pedro Alves <palves@redhat.com>
2561
2562 PR remote/18965
2563 * remote-utils.c (prepare_resume_reply): Merge
2564 TARGET_WAITKIND_VFORK_DONE switch case with the
2565 TARGET_WAITKIND_FORKED case.
2566
7c5d0fad
YQ
25672015-09-15 Yao Qi <yao.qi@linaro.org>
2568
2569 * server.c (handle_query): Check string comparison using
2570 "else if" instead of "if".
2571
750ce8d1
YQ
25722015-09-15 Yao Qi <yao.qi@linaro.org>
2573
2574 * server.c (vCont_supported): New global variable.
2575 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2576 matches. Append ";vContSupported+" to own_buf.
2577 (handle_v_requests): Append ";s;S" to own_buf if target supports
2578 hardware single step or vCont_supported is false.
2579 (capture_main): Set vCont_supported to zero.
2580
70b90b91
YQ
25812015-09-15 Yao Qi <yao.qi@linaro.org>
2582
2583 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2584 it to ...
2585 (linux_supports_hardware_single_step): ... New function.
2586 (linux_target_ops): Update.
2587 * lynx-low.c (lynx_target_ops): Set field
2588 supports_hardware_single_step to target_can_do_hardware_single_step.
2589 * nto-low.c (nto_target_ops): Likewise.
2590 * spu-low.c (spu_target_ops): Likewise.
2591 * win32-low.c (win32_target_ops): Likewise.
2592 * target.c (target_can_do_hardware_single_step): New function.
2593 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2594 Remove. <supports_hardware_single_step>: New field.
2595 (target_supports_conditional_breakpoints): Remove.
2596 (target_supports_hardware_single_step): New macro.
2597 (target_can_do_hardware_single_step): Declare.
2598 * server.c (handle_query): Use target_supports_hardware_single_step
2599 instead of target_supports_conditional_breakpoints.
2600
ade90bde
YQ
26012015-09-15 Yao Qi <yao.qi@linaro.org>
2602
2603 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2604 function.
2605 (struct linux_target_ops the_low_target): Install
2606 aarch64_linux_siginfo_fixup.
2607
94585166
DB
26082015-09-11 Don Breazeal <donb@codesourcery.com>
2609 Luis Machado <lgustavo@codesourcery.com>
2610
2611 * linux-low.c (linux_mourn): Static declaration.
2612 (linux_arch_setup): Move in front of
2613 handle_extended_wait.
2614 (linux_arch_setup_thread): New function.
2615 (handle_extended_wait): Handle exec events. Call
2616 linux_arch_setup_thread. Make event_lwp argument a
2617 pointer-to-a-pointer.
2618 (check_zombie_leaders): Do not check stopped threads.
2619 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2620 (linux_low_filter_event): Add lwp and thread for exec'ing
2621 non-leader thread if leader thread has been deleted.
2622 Refactor code into linux_arch_setup_thread and call it.
2623 Pass child lwp pointer by reference to handle_extended_wait.
2624 (linux_wait_for_event_filtered): Update comment.
2625 (linux_wait_1): Prevent clobbering exec event status.
2626 (linux_supports_exec_events): New function.
2627 (linux_target_ops) <supports_exec_events>: Initialize new member.
2628 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2629 new member.
2630 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2631 * server.c (report_exec_events): New global variable.
2632 (handle_query): Handle qSupported query for exec-events feature.
2633 (captured_main): Initialize report_exec_events.
2634 * server.h (report_exec_events): Declare new global variable.
2635 * target.h (struct target_ops) <supports_exec_events>: New
2636 member.
2637 (target_supports_exec_events): New macro.
2638 * win32-low.c (win32_target_ops) <supports_exec_events>:
2639 Initialize new member.
2640
0568462b
MM
26412015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2642
2643 * linux-low.c (linux_low_enable_btrace): Remove.
2644 (linux_target_ops): Replace linux_low_enable_btrace with
2645 linux_enable_btrace.
2646
39edd165
YQ
26472015-09-03 Yao Qi <yao.qi@linaro.org>
2648
2649 * linux-aarch64-low.c (aarch64_insert_point): Call
2650 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2651 returns true.
2652
1db33b5a
UW
26532015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2654
2655 * linux-low.c (check_stopped_by_breakpoint): Use
2656 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2657
ab290430
PA
26582015-08-27 Pedro Alves <palves@redhat.com>
2659
2660 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2661
8d749320
SM
26622015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2663
6711b7f8
SM
2664 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2665 the XNEW-family equivalent.
8d749320
SM
2666 (compile_bytecodes): Likewise.
2667 * dll.c (loaded_dll): Likewise.
2668 * event-loop.c (append_callback_event): Likewise.
2669 (create_file_handler): Likewise.
2670 (create_file_event): Likewise.
2671 * hostio.c (handle_open): Likewise.
2672 * inferiors.c (add_thread): Likewise.
2673 (add_process): Likewise.
2674 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2675 * linux-arm-low.c (arm_new_process): Likewise.
2676 (arm_new_thread): Likewise.
2677 * linux-low.c (add_to_pid_list): Likewise.
2678 (linux_add_process): Likewise.
2679 (handle_extended_wait): Likewise.
2680 (add_lwp): Likewise.
2681 (enqueue_one_deferred_signal): Likewise.
2682 (enqueue_pending_signal): Likewise.
2683 (linux_resume_one_lwp_throw): Likewise.
2684 (linux_resume_one_thread): Likewise.
2685 (linux_read_memory): Likewise.
2686 (linux_write_memory): Likewise.
2687 * linux-mips-low.c (mips_linux_new_process): Likewise.
2688 (mips_linux_new_thread): Likewise.
2689 (mips_add_watchpoint): Likewise.
2690 * linux-x86-low.c (initialize_low_arch): Likewise.
2691 * lynx-low.c (lynx_add_process): Likewise.
2692 * mem-break.c (set_raw_breakpoint_at): Likewise.
2693 (set_breakpoint): Likewise.
2694 (add_condition_to_breakpoint): Likewise.
2695 (add_commands_to_breakpoint): Likewise.
2696 (clone_agent_expr): Likewise.
2697 (clone_one_breakpoint): Likewise.
2698 * regcache.c (new_register_cache): Likewise.
2699 * remote-utils.c (look_up_one_symbol): Likewise.
2700 * server.c (queue_stop_reply): Likewise.
2701 (start_inferior): Likewise.
2702 (queue_stop_reply_callback): Likewise.
2703 (handle_target_event): Likewise.
2704 * spu-low.c (fetch_ppc_memory): Likewise.
2705 (store_ppc_memory): Likewise.
2706 * target.c (set_target_ops): Likewise.
2707 * thread-db.c (thread_db_load_search): Likewise.
2708 (try_thread_db_load_1): Likewise.
2709 * tracepoint.c (add_tracepoint): Likewise.
2710 (add_tracepoint_action): Likewise.
2711 (create_trace_state_variable): Likewise.
2712 (cmd_qtdpsrc): Likewise.
2713 (cmd_qtro): Likewise.
2714 (add_while_stepping_state): Likewise.
2715 * win32-low.c (child_add_thread): Likewise.
2716 (get_image_name): Likewise.
2717
ed8b7b42
YQ
27182015-08-25 Yao Qi <yao.qi@linaro.org>
2719
2720 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2721
db3cb7cb
YQ
27222015-08-25 Yao Qi <yao.qi@linaro.org>
2723
2724 * Makefile.in (aarch64-linux.o): New rule.
2725 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2726 srv_tgtobj.
2727 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2728 (aarch64_init_debug_reg_state): Make it extern.
2729 (aarch64_linux_prepare_to_resume): Remove.
2730
f6011a1c
YQ
27312015-08-25 Yao Qi <yao.qi@linaro.org>
2732
2733 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2734 lwp_arch_private_info and ptid_of_lwp.
2735
88e2cf7e
YQ
27362015-08-25 Yao Qi <yao.qi@linaro.org>
2737
2738 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2739 Find proc_info by find_process_pid. All callers updated.
2740
5e35436e
YQ
27412015-08-25 Yao Qi <yao.qi@linaro.org>
2742
2743 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2744 Remove.
2745 (debug_reg_change_callback): Remove.
2746 (aarch64_notify_debug_reg_change): Remove.
2747
4a8a7965
YQ
27482015-08-25 Yao Qi <yao.qi@linaro.org>
2749
2750 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2751 Call current_lwp_ptid.
2752
32a271ee
YQ
27532015-08-25 Yao Qi <yao.qi@linaro.org>
2754
2755 * linux-aarch64-low.c (debug_reg_change_callback): Use
2756 debug_printf.
2757
0d51c8d7
YQ
27582015-08-25 Yao Qi <yao.qi@linaro.org>
2759
2760 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2761
31a43dd5
YQ
27622015-08-25 Yao Qi <yao.qi@linaro.org>
2763
2764 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2765
8ee52567
YQ
27662015-08-25 Yao Qi <yao.qi@linaro.org>
2767
2768 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2769 the code.
2770
ff3f0f45
YQ
27712015-08-25 Yao Qi <yao.qi@linaro.org>
2772
2773 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2774 Remove.
2775 (debug_reg_change_callback): Remove argument entry and add argument
2776 lwp. Remove local variable thread. Don't print thread id in the
2777 debugging output. Don't check whether pid of thread equals to pid.
2778 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2779 iterate_over_lwps instead find_inferior.
2780
3d40fbb5
PA
27812015-08-24 Pedro Alves <palves@redhat.com>
2782
2783 * inferiors.c (get_first_process): New function.
2784 * inferiors.h (get_first_process): New declaration.
2785 * remote-utils.c (read_ptid): Default to the first process in the
2786 list, instead of to the current thread's process.
2787
438e1e42
PA
27882015-08-24 Pedro Alves <palves@redhat.com>
2789
2790 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2791 * event-loop.c: Likewise.
2792 * remote-utils.c: Likewise.
2793 * tracepoint.c: Likewise.
2794
a8c6d4fc
PA
27952015-08-24 Pedro Alves <palves@redhat.com>
2796
2797 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2798 ptid_get_lwp.
2799
99b0bb12
PA
28002015-08-21 Pedro Alves <palves@redhat.com>
2801
2802 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2803 instead of literal 1.
2804
f8904751
PA
28052015-08-21 Pedro Alves <palves@redhat.com>
2806
2807 * tdesc.c (default_description): Explicitly zero-initialize.
2808
465a859e
PA
28092015-08-21 Pedro Alves <palves@redhat.com>
2810
2811 PR gdb/18749
2812 * inferiors.c (remove_thread): Discard any pending stop reply for
2813 this thread.
2814 * server.c (remove_all_on_match_pid): Rename to ...
2815 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2816 instead of a pid.
2817 (discard_queued_stop_replies): Change parameter to a ptid. Now
2818 extern.
2819 (handle_v_kill, kill_inferior_callback, captured_main)
2820 (process_serial_event): Adjust.
2821 * server.h (discard_queued_stop_replies): Declare.
2822
f0db101d
PA
28232015-08-21 Pedro Alves <palves@redhat.com>
2824
2825 * linux-low.c (wait_for_sigstop): Always switch to no thread
2826 selected if the previously current thread dies.
2827 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2828 process instead of the current thread's.
2829 * remote-utils.c (input_interrupt): Don't check if there's no
2830 current thread.
2831 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2832 current thread to the general thread fails, error out.
2833 (handle_qxfer_auxv, handle_qxfer_libraries)
2834 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2835 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2836 (handle_query): Check if there's a thread selected instead of
2837 checking whether there's any thread in the thread list.
2838 (handle_qxfer_threads, handle_qxfer_btrace)
2839 (handle_qxfer_btrace_conf): Don't error out early if there's no
2840 thread in the thread list.
2841 (handle_v_cont, myresume): Don't set the current thread to the
2842 continue thread.
2843 (process_serial_event) <Hg handling>: Also set thread_id if the
2844 previous general thread is still alive.
2845 (process_serial_event) <g/G handling>: If setting the current
2846 thread to the general thread fails, error out.
2847 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2848 thread's lwp instead of the current thread's.
2849 * target.c (set_desired_thread): If the desired thread was not
2850 found, leave the current thread pointing to NULL. Return an int
2851 (boolean) indicating success.
2852 * target.h (set_desired_thread): Change return type to int.
2853
40045d91
MF
28542015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2855
2856 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2857 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2858 #includes.
2859 (ps_get_thread_area): New function.
2860
45face3b
GB
28612015-08-19 Gary Benson <gbenson@redhat.com>
2862
2863 * hostio.c (handle_pread): Do not attempt to read more data
2864 than hostio_reply_with_data can fit in a packet.
2865
16d5f642
JB
28662015-08-18 Joel Brobecker <brobecker@adacore.com>
2867
2868 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2869
a738da3a
MF
28702015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2871
2872 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2873
33ebda9d
PA
28742015-08-06 Pedro Alves <palves@redhat.com>
2875
2876 * tracepoint.c (expr_eval_result): Now an int.
2877
a44892be
PA
28782015-08-06 Pedro Alves <palves@redhat.com>
2879
2880 * gdbthread.h (struct regcache): Forward declare.
2881 (struct thread_info) <regcache_data>: Now a struct regcache
2882 pointer.
2883 * inferiors.c (inferior_regcache_data)
2884 (set_inferior_regcache_data): Now work with struct regcache
2885 pointers.
2886 * inferiors.h (struct regcache): Forward declare.
2887 (inferior_regcache_data, set_inferior_regcache_data): Now work
2888 with struct regcache pointers.
2889 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2890 (free_register_cache_thread): Remove struct regcache pointer
2891 casts.
2892
608a1e46
PA
28932015-08-06 Pedro Alves <palves@redhat.com>
2894
2895 * server.c (captured_main): On error, print the exception message
2896 to stderr, and if run_once is set, throw a quit.
2897
f0ce0d3a
PA
28982015-08-06 Pedro Alves <palves@redhat.com>
2899
2900 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2901 the current thread.
2902
bf47e248
PA
29032015-08-06 Pedro Alves <palves@redhat.com>
2904
2905 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2906 reading beyond the passed in buffer length.
2907
b6b9ffcc
PL
29082015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2909
2910 * tracepoint.c (symbol_list) <required>: Remove.
2911
863d01bd
PA
29122015-08-06 Pedro Alves <palves@redhat.com>
2913
2914 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2915 count if stopping and suspending threads.
2916 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2917 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2918 (linux_detach): Complete an ongoing step-over.
2919 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2920 throughout.
2921 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2922 (linux_wait_1): If passing a signal to the inferior after
2923 finishing a step-over, unsuspend and re-resume all lwps. If we
2924 see a single-step event but the thread should be continuing, don't
2925 pass the trap to gdb.
2926 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2927 internal_error instead of gdb_assert.
2928 (enqueue_pending_signal): New function.
2929 (check_ptrace_stopped_lwp_gone): Add debug output.
2930 (start_step_over): Use internal_error instead of gdb_assert.
2931 (complete_ongoing_step_over): New function.
2932 (linux_resume_one_thread): Don't resume a suspended thread.
2933 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2934 it stepping.
2935
00db26fa
PA
29362015-08-06 Pedro Alves <palves@redhat.com>
2937
2938 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2939 (linux_thread_alive): Use lwp_is_marked_dead.
2940 (extended_event_reported): Delete.
2941 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2942 instead of extended_event_reported.
2943 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2944 as well.
2945 (lwp_is_marked_dead): New function.
2946 (lwp_running): Use lwp_is_marked_dead.
2947 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2948 comment.
2949
ad071a30
PA
29502015-08-06 Pedro Alves <palves@redhat.com>
2951
2952 * linux-low.c (linux_wait_1): Move fork event output out of the
2953 !report_to_gdb check. Pass event_child->waitstatus to
2954 target_waitstatus_to_string instead of ourstatus.
2955
524b57e6
YQ
29562015-08-04 Yao Qi <yao.qi@linaro.org>
2957
2958 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2959 if current_thread is 32 bit.
2960
6085d6f6
YQ
29612015-08-04 Yao Qi <yao.qi@linaro.org>
2962
2963 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2964 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2965 * server.c (extended_protocol): Remove "static".
2966 * server.h (extended_protocol): Declare it.
2967
8a7e4587
YQ
29682015-08-04 Yao Qi <yao.qi@linaro.org>
2969
2970 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2971 both aarch64 and aarch32.
2972 (aarch64_set_pc): Likewise.
2973
3b53ae99
YQ
29742015-08-04 Yao Qi <yao.qi@linaro.org>
2975
2976 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2977 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2978 arm-with-neon.xml to srv_xmlfiles.
2979 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2980 (is_64bit_tdesc): New function.
2981 (aarch64_linux_read_description): New function.
2982 (aarch64_arch_setup): Call aarch64_linux_read_description.
2983 (regs_info): Rename to regs_info_aarch64.
2984 (aarch64_regs_info): Return right regs_info.
2985 (initialize_low_arch): Call initialize_low_arch_aarch32.
2986
bd9e6534
YQ
29872015-08-04 Yao Qi <yao.qi@linaro.org>
2988
2989 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2990 * linux-aarch32-low.c: New file.
2991 * linux-aarch32-low.h: New file.
2992 * linux-arm-low.c (arm_fill_gregset): Move it to
2993 linux-aarch32-low.c.
2994 (arm_store_gregset): Likewise.
2995 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2996 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2997 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2998 (regs_info): Rename to regs_info_arm.
2999 (arm_regs_info): Return regs_info_aarch32 if
3000 have_ptrace_getregset is 1 and target description is
3001 arm_with_neon or arm_with_vfpv3.
3002 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3003 Call initialize_low_arch_aarch32 instead.
3004
ded48a5e
YQ
30052015-08-04 Yao Qi <yao.qi@linaro.org>
3006
3007 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3008 * linux-low.c: ... here.
3009 * linux-low.h (have_ptrace_getregset): Declare it.
3010
96e9210f
PA
30112015-08-04 Pedro Alves <palves@redhat.com>
3012
3013 * thread-db.c (struct thread_db): Use new typedefs.
3014 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3015 CHK calls.
3016 (disable_thread_event_reporting): Cast result of dlsym to
3017 destination function pointer type.
3018 (thread_db_mourn): Use td_ta_delete_ftype.
3019
af60a1ef
SL
30202015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3021
3022 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3023 arch variant.
3024 (CDX_BREAKPOINT): Define for R2.
3025 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3026 (the_low_target): Add comments.
3027
e8b41681
YQ
30282015-07-30 Yao Qi <yao.qi@linaro.org>
3029
3030 * linux-arm-low.c (arm_hwcap): Remove it.
3031 (arm_read_description): New local variable arm_hwcap. Don't
3032 set arm_hwcap to zero.
3033
89abb039
YQ
30342015-07-30 Yao Qi <yao.qi@linaro.org>
3035
3036 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3037 Use regcache->tdesc instead.
3038 (arm_store_wmmxregset): Likewise.
3039 (arm_fill_vfpregset): Likewise.
3040 (arm_store_vfpregset): Likewise.
3041
deca266c
YQ
30422015-07-30 Yao Qi <yao.qi@linaro.org>
3043
3044 * linux-arm-low.c: Include arch/arm.h.
3045 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3046 (arm_store_gregset): Likewise.
3047
aa58a496
SM
30482015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3049
3050 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3051 ptrace's 4th parameter.
3052
50904b25
YQ
30532015-07-27 Yao Qi <yao.qi@linaro.org>
3054
3055 * configure.srv (case aarch64*-*-linux*): Don't set
3056 srv_linux_usrregs.
3057
5826e159
PA
30582015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3059
3060 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3061 sys/ptrace.h.
3062 * linux-arm-low.c: Likewise.
3063 * linux-cris-low.c: Likewise.
3064 * linux-crisv32-low.c: Likewise.
3065 * linux-low.c: Likewise.
3066 * linux-m68k-low.c: Likewise.
3067 * linux-mips-low.c: Likewise.
3068 * linux-nios2-low.c: Likewise.
3069 * linux-s390-low.c: Likewise.
3070 * linux-sparc-low.c: Likewise.
3071 * linux-tic6x-low.c: Likewise.
3072 * linux-tile-low.c: Likewise.
3073 * linux-x86-low.c: Likewise.
3074
54019719
PA
30752015-07-24 Pedro Alves <palves@redhat.com>
3076
3077 * config.in: Regenerate.
3078 * configure: Regenerate.
3079
eb7aa561
PA
30802015-07-24 Pedro Alves <palves@redhat.com>
3081
3082 * acinclude.m4: Include ../ptrace.m4.
3083 * configure.ac: Call GDB_AC_PTRACE.
3084 * config.in, configure: Regenerate.
3085
55d7b841
YQ
30862015-07-24 Yao Qi <yao.qi@linaro.org>
3087
3088 * linux-low.c (linux_create_inferior): Remove setting to
3089 proc->priv->new_inferior.
3090 (linux_attach): Likewise.
3091 (linux_low_filter_event): Likewise.
3092 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3093
c06cbd92
YQ
30942015-07-24 Yao Qi <yao.qi@linaro.org>
3095
3096 * linux-low.c (linux_arch_setup): New function.
3097 (linux_low_filter_event): If proc->tdesc is NULL and
3098 proc->attached is true, call the_low_target.arch_setup.
3099 Otherwise, keep status pending, and return.
3100 (linux_resume_one_lwp_throw): Don't call get_pc if
3101 thread->while_stepping isn't NULL. Don't call
3102 get_thread_regcache if proc->tdesc is NULL.
3103 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3104 (linux_target_ops): Install arch_setup.
3105 * server.c (start_inferior): Call the_target->arch_setup.
3106 * target.h (struct target_ops) <arch_setup>: New field.
3107 (target_arch_setup): New marco.
3108 * lynx-low.c (lynx_target_ops): Update.
3109 * nto-low.c (nto_target_ops): Update.
3110 * spu-low.c (spu_target_ops): Update.
3111 * win32-low.c (win32_target_ops): Update.
3112
5ae3ebba
YQ
31132015-07-24 Yao Qi <yao.qi@linaro.org>
3114
3115 * linux-low.c (linux_add_process): Don't set
3116 proc->priv->new_inferior.
3117 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3118 (linux_attach): Likewise.
3119
eb97750b
YQ
31202015-07-24 Yao Qi <yao.qi@linaro.org>
3121
3122 * server.c (start_inferior): Code refactor.
3123
51aee833
YQ
31242015-07-24 Yao Qi <yao.qi@linaro.org>
3125
3126 * server.c (process_serial_event): Set general_thread.
3127
af1b22f3
YQ
31282015-07-21 Yao Qi <yao.qi@linaro.org>
3129
3130 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3131 aarch64_linux_get_debug_reg_capacity.
3132
554717a3
YQ
31332015-07-17 Yao Qi <yao.qi@linaro.org>
3134
3135 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3136 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3137 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3138 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3139 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3140 (AARCH64_HWP_ALIGNMENT): Likewise.
3141 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3142 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3143 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3144 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3145 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3146 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3147 (struct aarch64_debug_reg_state): Likewise.
3148 (struct arch_lwp_info): Likewise.
3149 (aarch64_align_watchpoint): Likewise.
3150 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3151 (aarch64_watchpoint_length): Likewise.
3152 (aarch64_point_encode_ctrl_reg): Likewise
3153 (aarch64_point_is_aligned): Likewise.
3154 (aarch64_align_watchpoint): Likewise.
3155 (aarch64_linux_set_debug_regs):
3156 (aarch64_dr_state_insert_one_point): Likewise.
3157 (aarch64_dr_state_remove_one_point): Likewise.
3158 (aarch64_handle_breakpoint): Likewise.
3159 (aarch64_handle_aligned_watchpoint): Likewise.
3160 (aarch64_handle_unaligned_watchpoint): Likewise.
3161 (aarch64_handle_watchpoint): Likewise.
3162
c67ca4de
YQ
31632015-07-17 Yao Qi <yao.qi@linaro.org>
3164
3165 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3166 and don't aarch64_get_debug_reg_state. All callers update.
3167 (aarch64_handle_aligned_watchpoint): Likewise.
3168 (aarch64_handle_unaligned_watchpoint): Likewise.
3169 (aarch64_handle_watchpoint): Likewise.
3170 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3171 (aarch64_remove_point): Likewise.
3172
25abf979
YQ
31732015-07-17 Yao Qi <yao.qi@linaro.org>
3174
3175 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3176 debug_printf.
3177 (aarch64_handle_unaligned_watchpoint): Likewise.
3178
db1ff28b
JK
31792015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3180
3181 Revert the previous 3 commits:
3182 Move gdb_regex* to common/
3183 Move linux_find_memory_regions_full & co.
3184 gdbserver build-id attribute generator
3185
700ca40f
JK
31862015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3187 Jan Kratochvil <jan.kratochvil@redhat.com>
3188
3189 gdbserver build-id attribute generator.
3190 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3191 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3192 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3193 (find_phdr): New.
3194 (get_dynamic): Use find_pdhr to traverse program headers.
3195 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3196 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3197 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3198 (get_hex_build_id): New.
3199 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3200 to reply XML document.
3201
9904185c
JK
32022015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3203 Jan Kratochvil <jan.kratochvil@redhat.com>
3204
3205 * target.c: Include target/target-utils.h and fcntl.h.
3206 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3207 (target_fileio_read_stralloc): New functions.
3208
6e5b4429
JK
32092015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3210
3211 * Makefile.in (OBS): Add gdb_regex.o.
3212 (gdb_regex.o): New.
3213 * config.in: Rebuilt.
3214 * configure: Rebuilt.
3215
ddc98fbf
JK
32162015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3217 Jan Kratochvil <jan.kratochvil@redhat.com>
3218
3219 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3220 * Makefile.in (OBS): Add target-utils.o.
3221 (linux-maps.o, target-utils.o): New.
3222 * configure.srv (srv_linux_obj): Add linux-maps.o.
3223
e57bb7a0
PL
32242015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3225
3226 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3227 function, return 1.
3228 (the_low_target): Install it.
3229
586b02a9
PA
32302015-07-14 Pedro Alves <palves@redhat.com>
3231
3232 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3233 Instead, ignore ECHILD, and throw an error for other errnos.
3234
58c1b36c
PA
32352015-07-10 Pedro Alves <palves@redhat.com>
3236
3237 * event-loop.c (struct callback_event) <data>: Change type to
3238 gdb_client_data instance instead of gdb_client_data pointer.
3239 (append_callback_event): Adjust.
3240
421530db
PL
32412015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3242
3243 * linux-aarch64-low.c: Add comments for each linux_target_ops
3244 method. Remove comments already covered in target_ops and
3245 linux_target_ops definitions.
3246 (the_low_target): Add comments for each unimplemented method.
3247
c2d65f38
YQ
32482015-07-09 Yao Qi <yao.qi@linaro.org>
3249
3250 * linux-aarch64-low.c (aarch64_regmap): Remove.
3251 (aarch64_usrregs_info): Remove.
3252 (regs_info): Set field usrregs to NULL.
3253
b20a6524
MM
32542015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3255
3256 * linux-low.c: Include "rsp-low.h"
3257 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3258 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3259 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3260 (handle_btrace_enable_pt): New.
3261 (handle_btrace_general_set): Support "pt".
3262 (handle_btrace_conf_general_set): Support "pt:size".
3263
96c97461
PL
32642015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3265
3266 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3267 Z_PACKET_SW_BP.
3268
37d66942
PL
32692015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3270
3271 * linux-aarch64-low.c: Remove comment about endianness.
3272 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3273 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3274 memcmp.
3275
dc06243f
GB
32762015-06-24 Gary Benson <gbenson@redhat.com>
3277
3278 * linux-i386-ipa.c (stdint.h): Do not include.
3279 * lynx-i386-low.c (stdint.h): Likewise.
3280 * lynx-ppc-low.c (stdint.h): Likewise.
3281 * mem-break.c (stdint.h): Likewise.
3282 * thread-db.c (stdint.h): Likewise.
3283 * tracepoint.c (stdint.h): Likewise.
3284 * win32-low.c (stdint.h): Likewise.
3285
124e13d9
SM
32862015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3287
3288 * server.c (write_qxfer_response): Update call to
3289 remote_escape_output.
3290
909c2cda
JK
32912015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3292 Jan Kratochvil <jan.kratochvil@redhat.com>
3293
3294 Merge multiple hex conversions.
3295 * gdbreplay.c (tohex): Rename to 'fromhex'.
3296 (logchar): Use fromhex.
3297
24c05f46
JK
32982015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3299
3300 * server.c (handle_qxfer_libraries): Set `version' attribute for
3301 <library-list>.
3302
14d2069a
GB
33032015-06-10 Gary Benson <gbenson@redhat.com>
3304
3305 * target.h (struct target_ops) <multifs_open>: New field.
3306 <multifs_unlink>: Likewise.
3307 <multifs_readlink>: Likewise.
3308 * linux-low.c (nat/linux-namespaces.h): New include.
3309 (linux_target_ops): Initialize the_target->multifs_open,
3310 the_target->multifs_unlink and the_target->multifs_readlink.
3311 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3312 * hostio.c (hostio_fs_pid): New static variable.
3313 (hostio_handle_new_gdb_connection): New function.
3314 (handle_setfs): Likewise.
3315 (handle_open): Use the_target->multifs_open as appropriate.
3316 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3317 (handle_readlink): Use the_target->multifs_readlink as
3318 appropriate.
3319 (handle_vFile): Handle vFile:setfs packets.
3320 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3321 after target_handle_new_gdb_connection.
3322
4b8b5e72
GB
33232015-06-10 Gary Benson <gbenson@redhat.com>
3324
3325 * configure.ac (AC_CHECK_FUNCS): Add setns.
3326 * config.in: Regenerate.
3327 * configure: Likewise.
3328 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3329 (linux-namespaces.o): New rule.
3330 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3331
3ac2e371
GB
33322015-06-09 Gary Benson <gbenson@redhat.com>
3333
3334 * hostio.c (handle_open): Process mode argument with
3335 fileio_to_host_mode.
3336
ca9b78ce
YQ
33372015-06-01 Yao Qi <yao.qi@linaro.org>
3338
3339 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3340 * linux-x86-low.c: Likewise.
3341
bfacd19d
DB
33422015-05-28 Don Breazeal <donb@codesourcery.com>
3343
3344 * linux-low.c (handle_extended_wait): Initialize
3345 thread_info.last_resume_kind for new fork children.
3346
452003ef
PA
33472015-05-15 Pedro Alves <palves@redhat.com>
3348
3349 * target.h (target_handle_new_gdb_connection): Rewrite using if
3350 wrapped in do/while.
3351
1041a03c
JB
33522015-05-14 Joel Brobecker <brobecker@adacore.com>
3353
3354 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3355 * configure, config.in: Regenerate.
3356 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3357 Declare typedef.
3358
c269dbdb
DB
33592015-05-12 Don Breazeal <donb@codesourcery.com>
3360
3361 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3362 PTRACE_EVENT_VFORK_DONE.
3363 (linux_low_ptrace_options, extended_event_reported): Add vfork
3364 events.
3365 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3366 and "vforkdone" for RSP 'T' Stop Reply Packet.
3367 * server.h (report_vfork_events): Declare
3368 global variable.
3369
3a8a0396
DB
33702015-05-12 Don Breazeal <donb@codesourcery.com>
3371
3372 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3373 (the_low_target) <new_fork>: Initialize new member.
3374 * linux-arm-low.c (arm_new_fork): New function.
3375 (the_low_target) <new_fork>: Initialize new member.
3376 * linux-low.c (handle_extended_wait): Call new target function
3377 new_fork.
3378 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3379 * linux-mips-low.c (mips_add_watchpoint): New function
3380 extracted from mips_insert_point.
3381 (the_low_target) <new_fork>: Initialize new member.
3382 (mips_linux_new_fork): New function.
3383 (mips_insert_point): Call mips_add_watchpoint.
3384 * linux-x86-low.c (x86_linux_new_fork): New function.
3385 (the_low_target) <new_fork>: Initialize new member.
3386
de0d863e
DB
33872015-05-12 Don Breazeal <donb@codesourcery.com>
3388
3389 * linux-low.c (handle_extended_wait): Implement return value,
3390 rename argument 'event_child' to 'event_lwp', handle
3391 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3392 (linux_low_ptrace_options): New function.
3393 (linux_low_filter_event): Call linux_low_ptrace_options,
3394 use different argument fo linux_enable_event_reporting,
3395 use return value from handle_extended_wait.
3396 (extended_event_reported): New function.
3397 (linux_wait_1): Call extended_event_reported and set
3398 status to report fork events.
3399 (linux_write_memory): Add pid to debug message.
3400 (reset_lwp_ptrace_options_callback): New function.
3401 (linux_handle_new_gdb_connection): New function.
3402 (linux_target_ops): Initialize new structure member.
3403 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3404 * lynx-low.c: Initialize new structure member.
3405 * remote-utils.c (prepare_resume_reply): Implement stop reason
3406 "fork" for "T" stop message.
3407 * server.c (handle_query): Call handle_new_gdb_connection.
3408 * server.h (report_fork_events): Declare global flag.
3409 * target.h (struct target_ops) <handle_new_gdb_connection>:
3410 New member.
3411 (target_handle_new_gdb_connection): New macro.
3412 * win32-low.c: Initialize new structure member.
3413
ddcbc397
DB
34142015-05-12 Don Breazeal <donb@codesourcery.com>
3415
3416 * mem-break.c (APPEND_TO_LIST): Define macro.
3417 (clone_agent_expr): New function.
3418 (clone_one_breakpoint): New function.
3419 (clone_all_breakpoints): New function.
3420 * mem-break.h: Declare new functions.
3421
89245bc0
DB
34222015-05-12 Don Breazeal <donb@codesourcery.com>
3423
3424 * linux-low.c (linux_supports_fork_events): New function.
3425 (linux_supports_vfork_events): New function.
3426 (linux_target_ops): Initialize new structure members.
3427 (initialize_low): Call linux_check_ptrace_features.
3428 * lynx-low.c (lynx_target_ops): Initialize new structure
3429 members.
3430 * server.c (report_fork_events, report_vfork_events):
3431 New global flags.
3432 (handle_query): Add new features to qSupported packet and
3433 response.
3434 (captured_main): Initialize new global variables.
3435 * target.h (struct target_ops) <supports_fork_events>:
3436 New member.
3437 <supports_vfork_events>: New member.
3438 (target_supports_fork_events): New macro.
3439 (target_supports_vfork_events): New macro.
3440 * win32-low.c (win32_target_ops): Initialize new structure
3441 members.
3442
835205d0
GB
34432015-05-12 Gary Benson <gbenson@redhat.com>
3444
3445 * server.c (handle_qxfer_exec_file): Use current process
3446 if annex is empty.
3447
21e94bd9
SL
34482015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3449
3450 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3451 Remove HAVE_PTRACE_GETREGS conditionals.
3452 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3453 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3454
45614f15
YQ
34552015-05-08 Yao Qi <yao.qi@linaro.org>
3456
3457 * linux-low.c (linux_supports_conditional_breakpoints): New
3458 function.
3459 (linux_target_ops): Install new target method.
3460 * lynx-low.c (lynx_target_ops): Install NULL hook for
3461 supports_conditional_breakpoints.
3462 * nto-low.c (nto_target_ops): Likewise.
3463 * spu-low.c (spu_target_ops): Likewise.
3464 * win32-low.c (win32_target_ops): Likewise.
3465 * server.c (handle_query): Check
3466 target_supports_conditional_breakpoints.
3467 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3468 New field.
3469 (target_supports_conditional_breakpoints): New macro.
3470
80ad801e
PA
34712015-05-06 Pedro Alves <palves@redhat.com>
3472
3473 PR server/18081
3474 * server.c (start_inferior): If the process exits, mourn it.
3475
819843c7
GB
34762015-04-21 Gary Benson <gbenson@redhat.com>
3477
3478 * hostio.c (fileio_open_flags_to_host): Factored out to
3479 fileio_to_host_openflags in common/fileio.c. Single use
3480 updated.
3481
a2d5a9d7
MF
34822015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3483
3484 * linux-xtensa-low.c (xtensa_fill_gregset)
3485 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3486 XCHAL_HAVE_LOOP.
3487
deb44829
MF
34882015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3489
3490 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3491 (regs_info): Replace usrregs pointer with NULL.
3492
e57f1de3
GB
34932015-04-17 Gary Benson <gbenson@redhat.com>
3494
3495 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3496 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3497 * server.c (handle_qxfer_exec_file): New function.
3498 (qxfer_packets): Add exec-file entry.
3499 (handle_query): Report qXfer:exec-file:read as supported packet.
3500
62828379
RN
35012015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3502
3503 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3504
b88bb450
GB
35052015-04-09 Gary Benson <gbenson@redhat.com>
3506
3507 * hostio-errno.c (errno_to_fileio_error): Remove function.
3508 Update caller to use remote_fileio_to_fio_error.
3509
c8f4bfdd
YQ
35102015-04-09 Yao Qi <yao.qi@linaro.org>
3511
3512 * linux-low.c (linux_insert_point): Call
3513 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3514 (linux_remove_point): Call remove_memory_breakpoint if type is
3515 raw_bkpt_type_sw.
3516 * linux-x86-low.c (x86_insert_point): Don't call
3517 insert_memory_breakpoint.
3518 (x86_remove_point): Don't call remove_memory_breakpoint.
3519
41f98f02
PA
35202015-04-01 Pedro Alves <palves@redhat.com>
3521 Cleber Rosa <crosa@redhat.com>
3522
3523 * server.c (gdbserver_usage): Reorganize and extend the usage
3524 message.
3525
2bf6fb9d
PA
35262015-03-24 Pedro Alves <palves@redhat.com>
3527
3528 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3529 output. Also dump TRAP_TRACE.
3530 (linux_low_filter_event): In debug output, distinguish a
3531 resume_stop SIGSTOP from a delayed SIGSTOP.
3532
369f6daa
GB
35332015-03-24 Gary Benson <gbenson@redhat.com>
3534
3535 * linux-x86-low.c (x86_linux_new_thread): Moved to
3536 nat/x86-linux.c.
3537 (x86_linux_prepare_to_resume): Likewise.
3538
8e5d4070
GB
35392015-03-24 Gary Benson <gbenson@redhat.com>
3540
3541 * Makefile.in (x86-linux-dregs.o): New rule.
3542 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3543 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3544 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3545 (x86_linux_dr_get): Likewise.
3546 (x86_linux_dr_set): Likewise.
3547 (update_debug_registers_callback): Likewise.
3548 (x86_linux_dr_set_addr): Likewise.
3549 (x86_linux_dr_get_addr): Likewise.
3550 (x86_linux_dr_set_control): Likewise.
3551 (x86_linux_dr_get_control): Likewise.
3552 (x86_linux_dr_get_status): Likewise.
3553 (x86_linux_update_debug_registers): Likewise.
3554
2b95d440
GB
35552015-03-24 Gary Benson <gbenson@redhat.com>
3556
3557 * linux-x86-low.c (x86_linux_update_debug_registers):
3558 New function, factored out from...
3559 (x86_linux_prepare_to_resume): ...this.
3560
14b0bc68
GB
35612015-03-24 Gary Benson <gbenson@redhat.com>
3562
3563 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3564 (x86_linux_dr_set): Likewise.
3565 (update_debug_registers_callback): Likewise.
3566 (x86_linux_dr_set_addr): Likewise.
3567 (x86_linux_dr_get_addr): Likewise.
3568 (x86_linux_dr_set_control): Likewise.
3569 (x86_linux_dr_get_control): Likewise.
3570 (x86_linux_dr_get_status): Likewise.
3571 (x86_linux_prepare_to_resume): Likewise.
3572
5dfe6ca8
GB
35732015-03-24 Gary Benson <gbenson@redhat.com>
3574
3575 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3576 Use perror_with_name. Pass string through gettext.
3577 (x86_linux_dr_set): Likewise.
3578
d33472ad
GB
35792015-03-24 Gary Benson <gbenson@redhat.com>
3580
3581 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3582 (x86_linux_dr_set_addr): ...this.
3583 (x86_dr_low_get_addr): Rename to...
3584 (x86_linux_dr_get_addr): ...this.
3585 (x86_dr_low_set_control): Rename to...
3586 (x86_linux_dr_set_control): ...this.
3587 (x86_dr_low_get_control): Rename to...
3588 (x86_linux_dr_get_control): ...this.
3589 (x86_dr_low_get_status): Rename to...
3590 (x86_linux_dr_get_status): ...this.
3591 (x86_dr_low): Update with new function names.
3592
4b134ca1
GB
35932015-03-24 Gary Benson <gbenson@redhat.com>
3594
3595 * Makefile.in (x86-linux.o): New rule.
3596 * configure.srv: Add x86-linux.o to relevant targets.
3597 * linux-low.c (lwp_set_arch_private_info): New function.
3598 (lwp_arch_private_info): Likewise.
3599 * linux-x86-low.c: Include nat/x86-linux.h.
3600 (arch_lwp_info): Removed structure.
3601 (update_debug_registers_callback):
3602 Use lwp_set_debug_registers_changed.
3603 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3604 and lwp_set_debug_registers_changed.
3605 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3606
34c703da
GB
36072015-03-24 Gary Benson <gbenson@redhat.com>
3608
3609 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3610 * linux-arm-low.c (arm_new_thread): Likewise.
3611 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3612 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3613 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3614 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3615
cff068da
GB
36162015-03-24 Gary Benson <gbenson@redhat.com>
3617
3618 * linux-low.c (ptid_of_lwp): New function.
3619 (lwp_is_stopped): Likewise.
3620 (lwp_stop_reason): Likewise.
3621 * linux-x86-low.c (update_debug_registers_callback):
3622 Use lwp_is_stopped.
3623 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3624 lwp_stop_reason.
3625
b2f7c7e8
GB
36262015-03-24 Gary Benson <gbenson@redhat.com>
3627
3628 * linux-low.h (linux_stop_lwp): Remove declaration.
3629
6d4ee8c6
GB
36302015-03-24 Gary Benson <gbenson@redhat.com>
3631
3632 * linux-low.h: Include nat/linux-nat.h.
3633 * linux-low.c (iterate_over_lwps_args): New structure.
3634 (iterate_over_lwps_filter): New function.
3635 (iterate_over_lwps): Likewise.
3636 * linux-x86-low.c (update_debug_registers_callback):
3637 Update signature to what iterate_over_lwps expects.
3638 Remove PID check that iterate_over_lwps now performs.
3639 (x86_dr_low_set_addr): Use iterate_over_lwps.
3640 (x86_dr_low_set_control): Likewise.
3641
70a0bb6b
GB
36422015-03-24 Gary Benson <gbenson@redhat.com>
3643
3644 * linux-x86-low.c (x86_debug_reg_state): New function.
3645 (x86_linux_prepare_to_resume): Use the above.
3646
7b669087
GB
36472015-03-24 Gary Benson <gbenson@redhat.com>
3648
3649 * linux-low.c (current_lwp_ptid): New function.
3650 * linux-x86-low.c: Include nat/linux-nat.h.
3651 (x86_dr_low_get_addr): Use current_lwp_ptid.
3652 (x86_dr_low_get_control): Likewise.
3653 (x86_dr_low_get_status): Likewise.
3654
eef49a3d
PA
36552015-03-20 Pedro Alves <palves@redhat.com>
3656
3657 * tracepoint.c (cmd_qtstatus): Make "str" const.
3658
b2333d22
PA
36592015-03-20 Pedro Alves <palves@redhat.com>
3660
3661 * server.c (handle_general_set): Make "req_str" const.
3662
23f238d3
PA
36632015-03-19 Pedro Alves <palves@redhat.com>
3664
3665 * linux-low.c (linux_resume_one_lwp): Rename to ...
3666 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3667 instead call perror_with_name.
3668 (check_ptrace_stopped_lwp_gone): New function.
3669 (linux_resume_one_lwp): Reimplement as wrapper around
3670 linux_resume_one_lwp_throw that swallows errors if the LWP is
3671 gone.
3672
91baf43f
PA
36732015-03-19 Pedro Alves <palves@redhat.com>
3674
3675 * linux-low.c (count_events_callback, select_event_lwp_callback):
3676 No longer check whether the thread has resume_stop as last resume
3677 kind.
3678
8bf3b159
PA
36792015-03-19 Pedro Alves <palves@redhat.com>
3680
3681 * linux-low.c (count_events_callback, select_event_lwp_callback):
3682 Use the lwp's status_pending_p field, not the thread's.
3683
b90fc188
PA
36842015-03-19 Pedro Alves <palves@redhat.com>
3685
3686 * linux-low.c (select_event_lwp_callback): Update comments to
3687 no longer mention SIGTRAP.
3688
464b0089
GB
36892015-03-18 Gary Benson <gbenson@redhat.com>
3690
3691 * server.c (handle_query): Do not report vFile:fstat as supported.
3692
aa9e327f
GB
36932015-03-11 Gary Benson <gbenson@redhat.com>
3694
3695 * hostio.c (sys/types.h): New include.
3696 (sys/stat.h): Likewise.
3697 (common-remote-fileio.h): Likewise.
3698 (handle_fstat): New function.
3699 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 3700
791c0056
GB
37012015-03-11 Gary Benson <gbenson@redhat.com>
3702
3703 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3704 struct stat.st_blocks and struct stat.st_blksize.
3705 * configure: Regenerate.
3706 * config.in: Likewise.
3707 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3708 (OBS): Add common-remote-fileio.o.
3709 (common-remote-fileio.o): New rule.
3710
9a9df970
PA
37112015-03-09 Pedro Alves <palves@redhat.com>
3712
3713 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3714 'struct sockaddr' pointer in 'accept' call.
3715
9eb1356e
PA
37162015-03-09 Pedro Alves <palves@redhat.com>
3717
3718 Revert:
3719 2015-03-07 Pedro Alves <palves@redhat.com>
3720 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3721 or <winsock2.h> here. Instead include "gdb_socket.h".
3722 (remote_open): Use union gdb_sockaddr_u.
3723 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3724 or <winsock2.h> here. Instead include "gdb_socket.h".
3725 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3726 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3727 or <sys/un.h>.
3728 (init_named_socket, gdb_agent_helper_thread): Use union
3729 gdb_sockaddr_u.
3730
aac331e4
PA
37312015-03-07 Pedro Alves <palves@redhat.com>
3732
3733 * configure.ac (build_warnings): Move
3734 -Wdeclaration-after-statement to the C-specific set.
3735 * configure: Regenerate.
3736
366c75fc
PA
37372015-03-07 Pedro Alves <palves@redhat.com>
3738
3739 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3740 or <winsock2.h> here. Instead include "gdb_socket.h".
3741 (remote_open): Use union gdb_sockaddr_u.
3742 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3743 or <winsock2.h> here. Instead include "gdb_socket.h".
3744 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3745 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3746 or <sys/un.h>.
3747 (init_named_socket, gdb_agent_helper_thread): Use union
3748 gdb_sockaddr_u.
3749
492d29ea
PA
37502015-03-07 Pedro Alves <palves@redhat.com>
3751
3752 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3753 instead.
3754
60a191ed
YQ
37552015-03-06 Yao Qi <yao.qi@linaro.org>
3756
3757 * linux-aarch64-low.c (aarch64_insert_point): Use
3758 show_debug_regs as a boolean.
3759 (aarch64_remove_point): Likewise.
3760
f5771b1d
PA
37612015-03-05 Pedro Alves <palves@redhat.com>
3762
3763 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3764 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3765 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3766 * nto-low.c (nto_target_ops): Likewise.
3767 * spu-low.c (spu_target_ops): Likewise.
3768 * win32-low.c (win32_target_ops): Likewise.
3769
3e572f71
PA
37702015-03-04 Pedro Alves <palves@redhat.com>
3771
72f4393d 3772 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
3773 Decide whether a breakpoint triggered based on the SIGTRAP's
3774 siginfo.si_code.
72f4393d
L
3775 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3776 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
3777 (linux_low_filter_event): Check for breakpoints before checking
3778 watchpoints.
3779 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3780 siginfo.si_code.
72f4393d
L
3781 (linux_stopped_by_sw_breakpoint)
3782 (linux_supports_stopped_by_sw_breakpoint)
3783 (linux_stopped_by_hw_breakpoint)
3784 (linux_supports_stopped_by_hw_breakpoint): New functions.
3785 (linux_target_ops): Install new target methods.
3e572f71 3786
1ec68e26
PA
37872015-03-04 Pedro Alves <palves@redhat.com>
3788
3789 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3790 * server.c (swbreak_feature, hwbreak_feature): New globals.
3791 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3792 (captured_main): Clear swbreak_feature and hwbreak_feature.
3793 * server.h (swbreak_feature, hwbreak_feature): Declare.
3794 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3795 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3796 supports_stopped_by_hw_breakpoint>: New fields.
3797 (target_supports_stopped_by_sw_breakpoint)
3798 (target_stopped_by_sw_breakpoint)
3799 (target_supports_stopped_by_hw_breakpoint)
3800 (target_stopped_by_hw_breakpoint): Declare.
3801
15c66dd6
PA
38022015-03-04 Pedro Alves <palves@redhat.com>
3803
3804 enum lwp_stop_reason -> enum target_stop_reason
3805 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3806 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3807 (linux_wait_1, stuck_in_jump_pad_callback)
3808 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3809 (linux_stopped_by_watchpoint):
3810 * linux-low.h (enum lwp_stop_reason): Delete.
3811 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3812 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3813
98fc70d6
YQ
38142015-03-04 Yao Qi <yao.qi@linaro.org>
3815
3816 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3817
dd2ac174
GB
38182015-03-03 Gary Benson <gbenson@redhat.com>
3819
3820 * hostio.c (handle_vFile): Fix prefix lengths.
3821
d68e53f4
MM
38222015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3823
3824 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3825 ptr_bits.
3826
bf2d68ab
AA
38272015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3828
3829 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3830 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3831 (clean): Add "rm -f" for above C files.
3832 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3833 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3834 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3835 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3836 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3837 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3838 (init_registers_s390x_vx_linux64)
3839 (init_registers_s390x_tevx_linux64)
3840 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3841 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3842 declarations.
3843 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3844 (s390_store_vxrs_high): New functions.
3845 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3846 NT_S390_VXRS_HIGH.
3847 (s390_arch_setup): Add logic for selecting one of the new target
3848 descriptions. Activate the new vector regsets if applicable.
3849 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3850 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3851 and init_registers_s390x_tevx_linux64.
3852
c966a859
PA
38532015-03-01 Pedro Alves <palves@redhat.com>
3854
3855 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3856 parameter.
3857
4180215b
PA
38582015-02-27 Pedro Alves <palves@redhat.com>
3859
3860 * linux-x86-low.c (u_debugreg_offset): New function.
3861 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3862
749bab01
PA
38632015-02-27 Pedro Alves <palves@redhat.com>
3864
3865 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3866 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3867 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3868 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3869 (ps_lsetfpregs, ps_getpid)
3870 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3871 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3872 (ps_lsetxregs, ps_plog): Declare.
3873
3c14e5a3
PA
38742015-02-27 Pedro Alves <palves@redhat.com>
3875
3876 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3877 IP_AGENT_EXPORT_FUNC.
3878 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3879 IP_AGENT_EXPORT_FUNC.
3880 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3881 (IP_AGENT_EXPORT): Delete.
3882 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3883 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3884 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3885 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3886 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3887 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3888 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3889 (traceframe_read_count, traceframe_write_count)
3890 (traceframes_created, trace_state_variables, get_raw_reg)
3891 (get_trace_state_variable_value, set_trace_state_variable_value)
3892 (ust_loaded, helper_thread_id, cmd_buf): Use
3893 IPA_SYM_EXPORTED_NAME.
3894 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3895 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3896 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3897 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3898 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3899 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3900 EXTERN_C_PUSH/EXTERN_C_POP.
3901 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3902 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3903 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3904 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3905 (traceframe_write_count, traceframe_read_count)
3906 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3907 (about_to_request_buffer_space, get_trace_state_variable_value)
3908 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3909 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3910 EXTERN_C_PUSH/EXTERN_C_POP.
3911 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3912 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3913 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3914 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3915 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3916 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3917 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3918 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3919 Define.
3920 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3921 (IP_AGENT_EXPORT_VAR_DECL): Define.
3922 (tracing): Declare.
3923 (gdb_agent_get_raw_reg): Declare.
3924
fe978cb0
PA
39252015-02-27 Tom Tromey <tromey@redhat.com>
3926 Pedro Alves <palves@redhat.com>
3927
3928 Rename symbols whose names are reserved C++ keywords throughout.
3929
3bc3d82a
PA
39302015-02-27 Pedro Alves <palves@redhat.com>
3931
3932 * Makefile.in (COMPILER): New, get it from autoconf.
3933 (CXX): Get from autoconf instead.
3934 (COMPILE.pre): Use COMPILER.
3935 (CC-LD): Rename to ...
3936 (CC_LD): ... this. Use COMPILER.
3937 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3938 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3939 * acinclude.m4: Include build-with-cxx.m4.
3940 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3941 Disable -Werror by default if building in C++ mode.
3942 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3943 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3944 the C++ compiler. Save/restore CXXFLAGS too.
3945 * configure: Regenerate.
3946
07697489
PA
39472015-02-27 Pedro Alves <palves@redhat.com>
3948
3949 * acinclude.m4: Include libiberty.m4.
3950 * configure.ac: Call libiberty_INIT.
3951 * config.in, configure: Regenerate.
3952
9beb7c4e
PA
39532015-02-26 Pedro Alves <palves@redhat.com>
3954
3955 * linux-low.c (linux_wait_1): When incrementing the PC past a
3956 program breakpoint always use the_low_target.breakpoint_len as
3957 increment, rather than the maximum between that and
3958 the_low_target.decr_pc_after_break.
3959
8090aef2
PA
39602015-02-23 Pedro Alves <palves@redhat.com>
3961
3962 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3963 thread was doing a step-over; always adjust the PC if
3964 we stepped over a permanent breakpoint.
3965 (linux_wait_1): If we stepped over breakpoint that was on top of a
3966 permanent breakpoint, manually advance the PC past it.
3967
bc9540e8
PA
39682015-02-23 Pedro Alves <palves@redhat.com>
3969
3970 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3971 modes.
3972 (x86_fill_gregset, x86_store_gregset): Use it when handling
3973 $orig_eax.
3974
2db9a427
PA
39752015-02-20 Pedro Alves <palves@redhat.com>
3976
3977 * thread-db.c: Include "nat/linux-procfs.h".
3978 (thread_db_init): Skip listing new threads if the kernel supports
3979 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3980
afa8d396
PA
39812015-02-20 Pedro Alves <palves@redhat.com>
3982
3983 * linux-low.c (status_pending_p_callback): Use ptid_match.
3984
c9587f88
AT
39852015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3986
3987 PR breakpoints/16812
3988 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3989 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3990 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3991
b05ec7a5
AT
39922015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3993
3994 PR breakpoints/15956
3995 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3996
d33501a5
MM
39972015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3998
3999 * linux-low.c (linux_low_btrace_conf): Print size.
4000 * server.c (handle_btrace_conf_general_set): New.
4001 (hanle_general_set): Call handle_btrace_conf_general_set.
4002 (handle_query): Report Qbtrace-conf:bts:size as supported.
4003
f4abbc16
MM
40042015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4005
4006 * linux-low.c (linux_low_enable_btrace): Update parameters.
4007 (linux_low_btrace_conf): New.
4008 (linux_target_ops)<to_btrace_conf>: Initialize.
4009 * server.c (current_btrace_conf): New.
4010 (handle_btrace_enable): Rename to ...
4011 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4012 to target_enable_btrace. Update comment. Update users.
4013 (handle_qxfer_btrace_conf): New.
4014 (qxfer_packets): Add btrace-conf entry.
4015 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4016 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4017 (target_ops)<read_btrace_conf>: New.
4018 (target_enable_btrace): Update parameters.
4019 (target_read_btrace_conf): New.
4020
043c3577
MM
40212015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4022
4023 * server.c (handle_btrace_general_set): Remove call to
4024 target_supports_btrace.
4025 (supported_btrace_packets): New.
4026 (handle_query): Call supported_btrace_packets.
4027 * target.h: include btrace-common.h.
4028 (btrace_target_info): Removed.
4029 (supports_btrace, target_supports_btrace): Update parameters.
4030
734b0e4b
MM
40312015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4032
4033 * Makefile.in (SFILES): Add common/btrace-common.c.
4034 (OBS): Add common/btrace-common.o.
4035 (btrace-common.o): Add build rules.
4036 * linux-low: Include btrace-common.h.
4037 (linux_low_read_btrace): Use struct btrace_data. Call
4038 btrace_data_init and btrace_data_fini.
4039
d6c146e9
PA
40402015-02-06 Pedro Alves <palves@redhat.com>
4041
4042 * thread-db.c (find_new_threads_callback): Add debug output.
4043
20ba1ce6
PA
40442015-02-04 Pedro Alves <palves@redhat.com>
4045
4046 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4047 (resume_stopped_resumed_lwps): New function.
4048 (linux_wait_for_event_filtered): Use it.
4049
8cc73a39
SDJ
40502015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4051
4052 * Makefile.in (SFILES): Add linux-personality.c.
4053 (linux-personality.o): New rule.
4054 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4055 list of objects to be built.
4056 * linux-low.c: Include nat/linux-personality.h.
4057 (linux_create_inferior): Remove code to disable address space
4058 randomization (moved to ../nat/linux-personality.c). Create
4059 cleanup to disable address space randomization.
4060
fb23d554
SDJ
40612015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4062
4063 * Makefile.in (posix-strerror.o): New rule.
4064 (mingw-strerror.o): Likewise.
4065 * configure: Regenerated.
4066 * configure.ac: Source file ../common/common.host. Initialize new
4067 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4068
cdf43629
YQ
40692015-01-14 Yao Qi <yao@codesourcery.com>
4070
4071 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4072 (ppc-linux.o): New rule.
4073 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4074 * configure.ac: AC_CHECK_FUNCS(getauxval).
4075 * config.in: Re-generated.
4076 * configure: Re-generated.
4077 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4078 ppc64_64bit_inferior_p
4079
514c5338
YQ
40802015-01-14 Yao Qi <yao@codesourcery.com>
4081
4082 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4083 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4084 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4085 (PT_ORIG_R3, PT_TRAP): Likewise.
4086 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4087 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4088 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4089
3368c1e5
JB
40902015-01-10 Joel Brobecker <brobecker@adacore.com>
4091
4092 * i387-fp.c (i387_cache_to_xsave): In look over
4093 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4094 zmmh_low_space field by use of zmmh_high_space.
4095
582511be
PA
40962015-01-09 Pedro Alves <palves@redhat.com>
4097
4098 * linux-low.c (step_over_bkpt): Move higher up in the file.
4099 (handle_extended_wait): Don't store the stop_pc here.
4100 (get_stop_pc): Adjust comments and rename to ...
4101 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4102 stopped for a software breakpoint or hardware breakpoint.
4103 (thread_still_has_status_pending_p): New function.
4104 (status_pending_p_callback): Use
4105 thread_still_has_status_pending_p. If the event is no longer
4106 interesting, resume the LWP.
4107 (handle_tracepoints): Add assert.
4108 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4109 (wstatus_maybe_breakpoint): New function.
4110 (cancel_breakpoint): Delete function.
4111 (check_stopped_by_watchpoint): New function, factored out from
4112 linux_low_filter_event.
4113 (lp_status_maybe_breakpoint): Delete function.
4114 (linux_low_filter_event): Remove filter_ptid argument.
4115 Leave thread group exits pending here. Store the LWP's stop PC.
4116 Always leave events pending.
4117 (linux_wait_for_event_filtered): Pull all events out of the
4118 kernel, and leave them all pending.
4119 (count_events_callback, select_event_lwp_callback): Consider all
4120 events.
4121 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4122 (select_event_lwp): Only give preference to the stepping LWP in
4123 all-stop mode. Adjust comments.
4124 (ignore_event): New function.
4125 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4126 references to cancel_breakpoints. Adjust to renames. Also give
4127 equal priority to all LWPs that have had events in non-stop mode.
4128 If reporting a software breakpoint event, unadjust the LWP's PC.
4129 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4130 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4131 Adjust.
4132 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4133 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4134 (linux_stopped_by_watchpoint): Adjust.
4135 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4136 * linux-low.h (enum lwp_stop_reason): New.
4137 (struct lwp_info) <stop_pc>: Adjust comment.
4138 <stopped_by_watchpoint>: Delete field.
4139 <stop_reason>: New field.
4140 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4141 * mem-break.c (software_breakpoint_inserted_here)
4142 (hardware_breakpoint_inserted_here): New function.
4143 * mem-break.h (software_breakpoint_inserted_here)
4144 (hardware_breakpoint_inserted_here): Declare.
4145 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4146 (cancel_breakpoints): Delete.
4147 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4148 (upload_fast_traceframes): Remove references to
4149 cancel_breakpoints.
4150
a33e3959
PA
41512015-01-09 Pedro Alves <palves@redhat.com>
4152
4153 * thread-db.c (find_new_threads_callback): Ignore thread if the
4154 kernel thread ID is -1.
4155
8784d563
PA
41562015-01-09 Pedro Alves <palves@redhat.com>
4157
4158 * linux-low.c (linux_attach_fail_reason_string): Move to
4159 nat/linux-ptrace.c, and rename.
4160 (linux_attach_lwp): Update comment.
4161 (attach_proc_task_lwp_callback): New function.
4162 (linux_attach): Adjust to rename and use
4163 linux_proc_attach_tgid_threads.
4164 (linux_attach_fail_reason_string): Delete declaration.
4165
76f2b779
JB
41662015-01-01 Joel Brobecker <brobecker@adacore.com>
4167
4168 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4169 * server.c (gdbserver_version): Likewise.
4170
fafcc06a
SDJ
41712014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4172
4173 * remote-utils.c: Include ctype.h.
4174 (input_interrupt): Explicitly handle the case when the char
4175 received is the NUL byte. Improve the printing of non-ASCII
4176 characters.
4177
beed38b8
JB
41782014-12-16 Joel Brobecker <brobecker@adacore.com>
4179
4180 * linux-low.c (linux_low_filter_event): Update call to
4181 linux_enable_event_reporting following the addition of
4182 a new parameter to that function.
4183
bf330350
CU
41842014-12-16 Catalin Udma <catalin.udma@freescale.com>
4185
4186 PR server/17457
4187 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4188 (AARCH64_FPCR_REGNO): Likewise.
4189 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4190 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4191 (aarch64_store_fpregset): Likewise.
4192
5227d625
JB
41932014-12-15 Joel Brobecker <brobecker@adacore.com>
4194
4195 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4196 Remove FIXME comment about assumption about N.
4197
f93b65a0
JB
41982014-12-13 Joel Brobecker <brobecker@adacore.com>
4199
4200 * configure.ac: If large-file support is disabled in GDBserver,
4201 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4202 * configure: Regenerate.
4203
e5a9158d
AA
42042014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4205
4206 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4207 warning upon ENODATA from ptrace.
4208 * linux-s390-low.c (s390_store_tdb): New.
4209 (s390_regsets): Add regset for NT_S390_TDB.
4210
feea5f36
AA
42112014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4212
4213 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4214 without a fill_function.
4215 * linux-s390-low.c (s390_fill_last_break): Remove.
4216 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4217 (s390_arch_setup): Use regset's size instead of fill_function for
4218 loop end condition.
4219
098dbe61
AA
42202014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4221
4222 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4223 the regset's store function when ptrace returned an error.
4224 * regcache.c (get_thread_regcache): Invalidate register cache
4225 before fetching inferior's registers.
4226
28eef672
AA
42272014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4228
4229 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4230 while-loop as for-loop.
4231 (regsets_store_inferior_registers): Likewise.
4232
bdca27a2
YQ
42332014-11-28 Yao Qi <yao@codesourcery.com>
4234
4235 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4236 * config.in, configure: Re-generate.
4237 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4238 is defined.
4239
9c232dda
YQ
42402014-11-21 Yao Qi <yao@codesourcery.com>
4241
4242 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4243 (AC_CHECK_HEADERS): Remove malloc.h.
4244 * configure: Re-generated.
4245 * config.in: Re-generated.
4246 * server.h: Don't include alloca.h and malloc.h.
4247 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4248 Don't include malloc.h.
4249
43968415
JB
42502014-11-17 Joel Brobecker <brobecker@adacore.com>
4251
4252 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4253 corresponding ERRNO check in same block.
4254
40e91bc7
PA
42552014-11-12 Pedro Alves <palves@redhat.com>
4256
4257 * server.c (cont_thread): Update comment.
4258 (start_inferior, attach_inferior): No longer clear cont_thread.
4259 (handle_v_cont): No longer set cont_thread.
4260 (captured_main): Clear cont_thread each time a GDB connects.
4261
c2c118cf
PA
42622014-11-12 Pedro Alves <palves@redhat.com>
4263
4264 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4265 thread, and don't resume all threads if the Hc thread has exited.
4266
78708b7c
PA
42672014-11-12 Pedro Alves <palves@redhat.com>
4268
4269 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4270 the process group instead of to a specific LWP.
4271
a2abc7de
PA
42722014-10-15 Pedro Alves <palves@redhat.com>
4273
4274 PR server/17487
4275 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4276 parameter.
4277 (arm_set_thread_context): Delete.
4278 (the_low_target): Adjust.
4279 * win32-i386-low.c (debug_registers_changed)
4280 (debug_registers_used): Delete.
4281 (update_debug_registers_callback): New function.
4282 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4283 needing to update their debug registers.
4284 (win32_get_current_dr): New function.
4285 (x86_dr_low_get_addr, x86_dr_low_get_control)
4286 (x86_dr_low_get_status): Fetch the debug register from the thread
4287 record's context.
4288 (i386_initial_stuff): Adjust.
4289 (i386_get_thread_context): Remove current_event parameter. Don't
4290 clear debug_registers_changed nor copy DR values to
4291 debug_reg_state.
4292 (i386_set_thread_context): Delete.
4293 (i386_prepare_to_resume): New function.
4294 (i386_thread_added): Mark the thread as needing to update irs
4295 debug registers.
4296 (the_low_target): Remove i386_set_thread_context and install
4297 i386_prepare_to_resume.
4298 * win32-low.c (win32_get_thread_context): Adjust.
4299 (win32_set_thread_context): Use SetThreadContext
4300 directly.
4301 (win32_prepare_to_resume): New function.
4302 (win32_require_context): New function, factored out from ...
4303 (thread_rec): ... this.
4304 (continue_one_thread): Call win32_prepare_to_resume on each thread
4305 we're about to continue.
4306 (win32_resume): Call win32_prepare_to_resume on the event thread.
4307 * win32-low.h (struct win32_thread_info)
4308 <debug_registers_changed>: New field.
4309 (struct win32_target_ops): Change prototype of set_thread_context,
4310 delete set_thread_context and add prepare_to_resume.
4311 (win32_require_context): New declaration.
4312
a442d071
GB
43132014-10-08 Gary Benson <gbenson@redhat.com>
4314
4315 * server.h: Do not include common-exceptions.h.
4316
6f1947e8
GB
43172014-10-08 Gary Benson <gbenson@redhat.com>
4318
4319 * server.h: Do not include cleanups.h.
4320
63b434a4
JH
43212014-09-30 James Hogan <james.hogan@imgtec.com>
4322
4323 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4324 mips64-dsp-linux.c.
4325
c4d9ceb6
YQ
43262014-09-23 Yao Qi <yao@codesourcery.com>
4327
4328 * linux-low.c (lp_status_maybe_breakpoint): New function.
4329 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4330 (count_events_callback): Likewise.
4331 (select_event_lwp_callback): Likewise.
4332 (cancel_breakpoints_callback): Likewise.
4333
89a5711c
DB
43342014-09-19 Don Breazeal <donb@codesourcery.com>
4335
4336 * linux-low.c (handle_extended_wait): Call
4337 linux_ptrace_get_extended_event.
4338 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4339 linux_is_extended_waitstatus.
4340
bffc0964
JB
43412014-09-16 Joel Brobecker <brobecker@adacore.com>
4342
4343 * Makefile.in (CPPFLAGS): Define.
4344 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4345 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4346
0bfdf32f
GB
43472014-09-16 Gary Benson <gbenson@redhat.com>
4348
4349 * inferiors.h (current_inferior): Renamed as...
4350 (current_thread): New variable. All uses updated.
4351 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4352 (maybe_move_out_of_jump_pad): Likewise.
4353 (cancel_breakpoint): Likewise.
4354 (linux_low_filter_event): Likewise.
4355 (wait_for_sigstop): Likewise.
4356 (linux_resume_one_lwp): Likewise.
4357 (need_step_over_p): Likewise.
4358 (start_step_over): Likewise.
4359 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4360 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4361 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4362 and save_inferior as saved_thread.
4363 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4364 saved_thread.
4365 (regcache_invalidate_thread): Likewise.
4366 * remote-utils.c (prepare_resume_reply): Likewise.
4367 * thread-db.c (thread_db_get_tls_address): Likewise.
4368 (disable_thread_event_reporting): Likewise.
4369 (remove_thread_event_breakpoints): Likewise.
4370 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4371 as saved_thread.
4372 * target.h (set_desired_inferior): Renamed as...
4373 (set_desired_thread): New declaration. All uses updated.
4374 * server.c (myresume): Updated comment to reference thread instead
4375 of inferior.
4376 (handle_serial_event): Likewise.
4377 (handle_target_event): Likewise.
4378
361c8ade
GB
43792014-09-12 Tom Tromey <tromey@redhat.com>
4380 Gary Benson <gbenson@redhat.com>
4381
4382 * regcache.h: Include common-regcache.h.
4383 (regcache_read_pc): Don't declare.
4384 * regcache.c (get_thread_regcache_for_ptid): New function.
4385
bd9269f7
GB
43862014-09-11 Tom Tromey <tromey@redhat.com>
4387 Gary Benson <gbenson@redhat.com>
4388
4389 * symbol.c: New file.
4390 * Makefile.in (SFILES): Add symbol.c.
4391 (OBS): Add symbol.o.
4392
f8c1d06b
GB
43932014-09-11 Gary Benson <gbenson@redhat.com>
4394
4395 * target.c (target_stop_ptid, target_continue_ptid): New
4396 functions.
4397
721ec300
GB
43982014-09-11 Tom Tromey <tromey@redhat.com>
4399 Gary Benson <gbenson@redhat.com>
4400
4401 * target.h: Include target/target.h.
4402 * target.c (target_read_memory, target_read_uint32)
4403 (target_write_memory): New functions.
4404
c5e92cca
GB
44052014-09-11 Gary Benson <gbenson@redhat.com>
4406
4407 * server.h (debug_hw_points): Don't declare.
4408 * server.c (debug_hw_points): Don't define. Replace all uses
4409 with show_debug_regs.
4410 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4411 all uses with show_debug_regs.
4412
2e4bb98a
EBM
44132014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4414
4415 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4416 endianness into account.
4417 (ppc_supply_ptrace_register): Likewise.
4418
ac740bc7
JH
44192014-09-03 James Hogan <james.hogan@imgtec.com>
4420
4421 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4422 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4423
97ea6506
GB
44242014-09-03 Gary Benson <gbenson@redhat.com>
4425
4426 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4427 ALL_DEBUG_ADDRESS_REGISTERS.
4428
df7e5265
GB
44292014-09-02 Gary Benson <gbenson@redhat.com>
4430
4431 * i386-low.h: Renamed as...
4432 * x86-low.h: New file. All type, function and variable name
4433 prefixes changed from "i386_" to "x86_". All references updated.
4434 * i386-low.c: Renamed as...
4435 * x86-low.c: New file. All type, function and variable name
4436 prefixes changed from "i386_" to "x86_". All references updated.
4437
ed859da7
GB
44382014-09-02 Gary Benson <gbenson@redhat.com>
4439
4440 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4441 (x86_linux_new_thread): Likewise.
4442
860789c7
GB
44432014-08-29 Gary Benson <gbenson@redhat.com>
4444
4445 * server.h (setjmp.h): Do not include.
4446 (toplevel): Do not declare.
4447 (common-exceptions.h): Include.
4448 (cleanups.h): Likewise.
4449 * server.c (toplevel): Do not define.
4450 (exit_code): New static global.
4451 (detach_or_kill_for_exit_cleanup): New function.
4452 (main): New function. Original main renamed to...
4453 (captured_main): New function.
4454 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4455
ff55e1b5
GB
44562014-08-29 Gary Benson <gbenson@redhat.com>
4457
4458 * Makefile.in (SFILES): Add common/common-exceptions.c.
4459 (OBS): Add common-exceptions.o.
4460 (common-exceptions.o): New rule.
4461 * utils.c (prepare_to_throw_exception): New function.
4462
e9bcb658
GB
44632014-08-29 Gary Benson <gbenson@redhat.com>
4464
4465 * config.in: Regenerate.
4466 * configure: Likewise.
4467
e3180625
GB
44682014-08-29 Gary Benson <gbenson@redhat.com>
4469
4470 * Makefile.in (SFILES): Add common/cleanups.c.
4471 (OBS): cleanups.o.
4472 (cleanups.o): New rule.
4473
e3d6ba5d
GB
44742014-08-29 Gary Benson <gbenson@redhat.com>
4475
4476 * utils.c (internal_vwarning): New function.
4477
7096e886
GB
44782014-08-28 Gary Benson <gbenson@redhat.com>
4479
4480 * utils.h (fatal): Remove declaration.
4481 * utils.c (fatal): Remove function.
4482
14ce3192
GB
44832014-08-28 Gary Benson <gbenson@redhat.com>
4484
4485 * tracepoint.c (gdb_agent_init): Replace fatal with
4486 perror_with_name.
4487 (initialize_tracepoint): Likewise.
4488
50278d59
GB
44892014-08-28 Gary Benson <gbenson@redhat.com>
4490
4491 * remote-utils.c (remote_prepare): Replace fatal with error.
4492
aa96c426
GB
44932014-08-28 Gary Benson <gbenson@redhat.com>
4494
4495 * linux-low.c (linux_async): Replace fatal with warning.
4496 Tidy up and return.
4497 (linux_start_non_stop): Return -1 if linux_async failed.
4498
f7160e97
GB
44992014-08-28 Gary Benson <gbenson@redhat.com>
4500
4501 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4502 gdb_assert.
4503 (i386_dr_low_get_addr): Remove vague comment.
4504 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4505 gdb_assert.
4506
38e08fca
GB
45072014-08-28 Gary Benson <gbenson@redhat.com>
4508
4509 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4510 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4511 internal_error.
4512 (linux_resume_one_lwp): Likewise.
4513 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4514 gdb_assert.
4515 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4516 with internal_error.
4517 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4518 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4519 (find_register_by_name): Replace fatal with internal_error.
4520 (find_regno): Likewise.
4521 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4522 * thread-db.c (thread_db_create_event): Likewise.
4523 (thread_db_load_search): Likewise.
4524 (try_thread_db_load_1): Likewise.
4525 * tracepoint.c (get_jump_space_head): Replace fatal with
4526 internal_error.
4527 (claim_trampoline_space): Likewise.
4528 (have_fast_tracepoint_trampoline_buffer): Likewise.
4529 (cmd_qtstart): Likewise.
4530 (stop_tracing): Likewise.
4531 (fast_tracepoint_collecting): Likewise.
4532 (target_malloc): Likewise.
4533 (download_tracepoint): Likewise.
4534 (download_trace_state_variables): Replace check with gdb_assert.
4535 (upload_fast_traceframes): Replace fatal with internal_error.
4536
34abf635
GB
45372014-08-19 Tom Tromey <tromey@redhat.com>
4538 Gary Benson <gbenson@redhat.com>
4539
4540 * Makefile.in (SFILES): Add common/common-debug.c.
4541 (OBS): Add common-debug.o.
4542 (common-debug.o): New rule.
4543 * debug.h (debug_printf): Don't declare.
4544 * debug.c (debug_printf): Renamed and rewritten as...
4545 (debug_vprintf): New function.
4546
f6e94d78
GB
45472014-08-19 Gary Benson <gbenson@redhat.com>
4548
4549 * utils.h: Do not include print-utils.h.
4550
9239eeab
GB
45512014-08-19 Tom Tromey <tromey@redhat.com>
4552 Gary Benson <gbenson@redhat.com>
4553
4554 * server.h: Add static assertion.
4555 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4556
ef87c8bb
GB
45572014-08-19 Tom Tromey <tromey@redhat.com>
4558 Gary Benson <gbenson@redhat.com>
4559
4560 * Makefile.in (SFILES): Add common/errors.c.
4561 (OBS): Add errors.o.
4562 (IPA_OBS): Add errors-ipa.o.
4563 (errors.o): New rule.
4564 (errors-ipa.o): Likewise.
4565 * utils.h (perror_with_name, error, warning): Don't declare.
4566 * utils.c (warning): Renamed and rewritten as...
4567 (vwarning): New function.
4568 (error): Renamed and rewritten as...
4569 (verror): New function.
4570 (internal_error): Renamed and rewritten as...
4571 (internal_verror): New function.
4572
bb974a24
GB
45732014-08-07 Gary Benson <gbenson@redhat.com>
4574
4575 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4576 * configure: Regenerate.
4577 * config.in: Likewise.
4578 * server.h: Do not include errno.h.
4579 * event-loop.c: Likewise.
4580 * hostio-errno.c: Likewise.
4581 * linux-low.c: Likewise.
4582 * remote-utils.c: Likewise.
4583 * spu-low.c: Likewise.
4584 * utils.c: Likewise.
4585 * gdbreplay.c: Unconditionally include errno.h.
4586
6d3d12eb
GB
45872014-08-07 Gary Benson <gbenson@redhat.com>
4588
4589 * server.h: Do not include string.h.
4590 * event-loop.c: Likewise.
4591 * linux-low.c: Likewise.
4592 * regcache.c: Likewise.
4593 * remote-utils.c: Likewise.
4594 * spu-low.c: Likewise.
4595 * utils.c: Likewise.
4596
dccbb609
GB
45972014-08-07 Gary Benson <gbenson@redhat.com>
4598
4599 * server.h: Do not include gdb_assert.h.
4600
e76df0d0
GB
46012014-08-07 Gary Benson <gbenson@redhat.com>
4602
4603 * server.h: Do not include common-utils.h.
4604
4cb9c816
GB
46052014-08-07 Gary Benson <gbenson@redhat.com>
4606
4607 * server.h: Do not include ptid.h.
4608 * notif.h: Likewise.
4609
3995eeee
GB
46102014-08-07 Gary Benson <gbenson@redhat.com>
4611
4612 * server.h: Do not include gdb_locale.h.
4613
cb9f1a9b
GB
46142014-08-07 Gary Benson <gbenson@redhat.com>
4615
4616 * server.h: Do not include gdb/signals.h.
4617 * win32-low.c: Likewise.
4618
a5fceff8
GB
46192014-08-07 Gary Benson <gbenson@redhat.com>
4620
4621 * server.h: Do not include pathmax.h.
4622
b9391142
GB
46232014-08-07 Gary Benson <gbenson@redhat.com>
4624
4625 * server.h: Do not include libiberty.h.
4626 * linux-bfin-low.c: Likewise.
4627
0e443c87
GB
46282014-08-07 Gary Benson <gbenson@redhat.com>
4629
4630 * server.h: Do not include ansidecl.h.
4631
8ebb3f56
GB
46322014-08-07 Gary Benson <gbenson@redhat.com>
4633
4634 * linux-x86-low.c: Do not include stddef.h.
4635 * lynx-ppc-low.c: Likewise.
4636 * tracepoint.c: Likewise.
4637
8980bdf6
GB
46382014-08-07 Gary Benson <gbenson@redhat.com>
4639
4640 * server.h: Do not include stdarg.h.
4641 * nto-low.c: Likewise.
4642
d7096f71
GB
46432014-08-07 Gary Benson <gbenson@redhat.com>
4644
4645 * server.h: Do not include stdlib.h.
4646 * inferiors.c: Likewise.
4647 * linux-low.c: Likewise.
4648 * regcache.c: Likewise.
4649 * spu-low.c: Likewise.
4650 * tracepoint.c: Likewise.
4651 * utils.c: Likewise.
4652
d02f550d
GB
46532014-08-07 Gary Benson <gbenson@redhat.com>
4654
4655 * server.h: Do not include stdio.h.
4656 * linux-low.c: Likewise.
4657 * remote-utils.c: Likewise.
4658 * spu-low.c: Likewise.
4659 * utils.c: Likewise.
4660 * wincecompat.c: Likewise.
4661
87f6c4e3
GB
46622014-08-06 Gary Benson <gbenson@redhat.com>
4663
4664 * regcache.c (init_register_cache): Move conditionals inside if.
4665
7089dca4
GB
46662014-08-06 Gary Benson <gbenson@redhat.com>
4667
4668 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4669
462f517e
GB
46702014-07-31 Gary Benson <gbenson@redhat.com>
4671
4672 * ax.h: Do not include server.h.
4673 * gdbthread.h: Likewise.
4674 * lynx-low.h: Likewise.
4675 * notif.h: Likewise.
4676
976411d6
GB
46772014-07-30 Gary Benson <gbenson@redhat.com>
4678
4679 * server.h: Include common-defs.h.
4680 Do not include config.h or build-gnulib-gdbserver/config.h.
4681
d41f6d8e
GB
46822014-07-30 Gary Benson <gbenson@redhat.com>
4683
4684 * hostio-errno.c: Move server.h to top of includes list.
4685 * inferiors.c: Likewise.
4686 * linux-x86-low.c: Likewise.
4687 * notif.c: Include server.h.
4688
314c6a35
TT
46892014-07-24 Tom Tromey <tromey@redhat.com>
4690 Gary Benson <gbenson@redhat.com>
4691
4692 * server.h (CORE_ADDR): Now unsigned.
4693
69ff6be5
PA
46942014-07-16 Pedro Alves <palves@redhat.com>
4695
4696 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4697
ce9e3fe7
PA
46982014-07-15 Pedro Alves <palves@redhat.com>
4699
4700 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4701 copy.
4702
e76126e8
PA
47032014-07-11 Pedro Alves <palves@redhat.com>
4704
4705 * linux-low.c (kill_wait_lwp): New function, based on
4706 kill_one_lwp_callback, but use my_waitpid directly.
4707 (kill_one_lwp_callback, linux_kill): Use it.
4708
8e9db26e
PA
47092014-06-23 Pedro Alves <palves@redhat.com>
4710
4711 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4712 before setting DR0..DR3.
4713
698b3e08
GB
47142014-06-20 Gary Benson <gbenson@redhat.com>
4715
4716 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4717 * configure: Regenerated.
4718 * config.in: Likewise.
4719
125f8a3d
GB
47202014-06-20 Gary Benson <gbenson@redhat.com>
4721
4722 * Makefile.in (SFILES): Update locations for files moved
4723 from common to nat.
4724 (object file files): Reordered.
4725
42995dbd
GB
47262014-06-20 Gary Benson <gbenson@redhat.com>
4727
4728 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4729 (i386_dr_low_set_addr): Likewise.
4730 (i386_dr_low_get_addr): Likewise.
4731 (i386_dr_low_can_set_control): Likewise.
4732 (i386_dr_low_set_control): Likewise.
4733 (i386_dr_low_get_control): Likewise.
4734 (i386_dr_low_get_status): Likewise.
4735 (i386_get_debug_register_length): Likewise.
4736 * linux-x86-low.c (i386_dr_low_set_addr):
4737 Changed signature. Made static.
4738 (i386_dr_low_get_addr): Likewise.
4739 (i386_dr_low_set_control): Likewise.
4740 (i386_dr_low_get_control): Likewise.
4741 (i386_dr_low_get_status): Likewise.
4742 (i386_dr_low): New global variable.
4743 * win32-i386-low.c (i386_dr_low_set_addr):
4744 Changed signature. Made static.
4745 (i386_dr_low_get_addr): Likewise.
4746 (i386_dr_low_set_control): Likewise.
4747 (i386_dr_low_get_control): Likewise.
4748 (i386_dr_low_get_status): Likewise.
4749 (i386_dr_low): New global variable.
4750
e1d2394b
MS
47512014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4752
4753 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4754 * Makefile.in (AR, AR_FLAGS): Define.
4755 * configure: Regenerate.
4756
3a8ee006
GB
47572014-06-19 Gary Benson <gbenson@redhat.com>
4758
4759 * Makefile.in (i386-dregs.o): New rule.
4760 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4761 * i386-low.c (target.h): Remove include.
4762 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4763 (DR_CONTROL_SHIFT): Likewise.
4764 (DR_CONTROL_SIZE): Likewise.
4765 (DR_RW_EXECUTE): Likewise.
4766 (DR_RW_WRITE): Likewise.
4767 (DR_RW_READ): Likewise.
4768 (DR_RW_IORW): Likewise.
4769 (DR_LEN_1): Likewise.
4770 (DR_LEN_2): Likewise.
4771 (DR_LEN_4): Likewise.
4772 (DR_LEN_8): Likewise.
4773 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4774 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4775 (DR_ENABLE_SIZE): Likewise.
4776 (DR_LOCAL_SLOWDOWN): Likewise.
4777 (DR_GLOBAL_SLOWDOWN): Likewise.
4778 (DR_CONTROL_RESERVED): Likewise.
4779 (I386_DR_CONTROL_MASK): Likewise.
4780 (I386_DR_VACANT): Likewise.
4781 (I386_DR_LOCAL_ENABLE): Likewise.
4782 (I386_DR_GLOBAL_ENABLE): Likewise.
4783 (I386_DR_DISABLE): Likewise.
4784 (I386_DR_SET_RW_LEN): Likewise.
4785 (I386_DR_GET_RW_LEN): Likewise.
4786 (I386_DR_WATCH_HIT): Likewise.
4787 (i386_wp_op_t): Likewise.
4788 (i386_show_dr): Likewise.
4789 (i386_length_and_rw_bits): Likewise.
4790 (i386_insert_aligned_watchpoint): Likewise.
4791 (i386_remove_aligned_watchpoint): Likewise.
4792 (i386_handle_nonaligned_watchpoint): Likewise.
4793 i386_update_inferior_debug_regs(): Likewise.
4794 (i386_dr_insert_watchpoint): Likewise.
4795 (i386_dr_remove_watchpoint): Likewise.
4796 (i386_dr_region_ok_for_watchpoint): Likewise.
4797 (i386_dr_stopped_data_address): Likewise.
4798 (i386_dr_stopped_by_watchpoint): Likewise.
4799
8f26655c
GB
48002014-06-19 Gary Benson <gbenson@redhat.com>
4801
4802 * i386-low.c (i386_dr_show): Renamed to
4803 i386_show_dr and made static. All uses updated.
4804 (i386_dr_length_and_rw_bits): Renamed to
4805 i386_length_and_rw_bits and made static.
4806 All uses updated.
4807 (i386_dr_insert_aligned_watchpoint): Renamed to
4808 i386_insert_aligned_watchpoint and made static.
4809 All uses updated.
4810 (i386_dr_remove_aligned_watchpoint): Renamed to
4811 i386_remove_aligned_watchpoint and made static.
4812 All uses updated.
4813 (i386_dr_update_inferior_debug_regs): Renamed to
4814 i386_update_inferior_debug_regs and made static.
4815 All uses updated.
4816
b9228891
GB
48172014-06-18 Gary Benson <gbenson@redhat.com>
4818
5171def3
GB
4819 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4820 (i386_dr_low_can_set_control): Likewise.
4821 (i386_get_debug_register_length): Likewise.
4822 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4823 (i386_dr_low_can_set_control): Likewise.
4824 (i386_get_debug_register_length): Likewise.
4825
48262014-06-17 Gary Benson <gbenson@redhat.com>
4827
b9228891
GB
4828 * i386-low.h (i386-dregs.h): New include.
4829 (DR_FIRSTADDR): Now in i386-dregs.h.
4830 (DR_LASTADDR): Likewise.
4831 (DR_NADDR): Likewise.
4832 (DR_STATUS): Likewise.
4833 (DR_CONTROL): Likewise.
4834 (i386_debug_reg_state): Likewise.
4835 (i386_dr_insert_watchpoint): Likewise.
4836 (i386_dr_remove_watchpoint): Likewise.
4837 (i386_dr_region_ok_for_watchpoint): Likewise.
4838 (i386_dr_stopped_data_address): Likewise.
4839 (i386_dr_stopped_by_watchpoint): Likewise.
4840 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4841
4be83cc2
GB
48422014-06-18 Gary Benson <gbenson@redhat.com>
4843
4844 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4845 i386_dr_insert_watchpoint.
4846 (i386_low_remove_watchpoint): Renamed to
4847 i386_dr_remove_watchpoint.
4848 (i386_low_region_ok_for_watchpoint): Renamed to
4849 i386_dr_region_ok_for_watchpoint.
4850 (i386_low_stopped_data_address): Renamed to
4851 i386_dr_stopped_data_address.
4852 (i386_low_stopped_by_watchpoint): Renamed to
4853 i386_dr_stopped_by_watchpoint.
4854 * i386-low.c (i386_show_dr): Renamed to
4855 i386_dr_show and made nonstatic. All uses updated.
4856 (i386_length_and_rw_bits): Renamed to
4857 i386_dr_length_and_rw_bits and made nonstatic.
4858 All uses updated.
4859 (i386_insert_aligned_watchpoint): Renamed to
4860 i386_dr_insert_aligned_watchpoint and made nonstatic.
4861 All uses updated.
4862 (i386_remove_aligned_watchpoint): Renamed to
4863 i386_dr_remove_aligned_watchpoint and made nonstatic.
4864 All uses updated.
4865 (i386_update_inferior_debug_regs): Renamed to
4866 i386_dr_update_inferior_debug_regs and made nonstatic.
4867 All uses updated.
4868 (i386_low_insert_watchpoint): Renamed to
4869 i386_dr_insert_watchpoint. All uses updated.
4870 (i386_low_remove_watchpoint): Renamed to
4871 i386_dr_remove_watchpoint. All uses updated.
4872 (i386_low_region_ok_for_watchpoint): Renamed to
4873 i386_dr_region_ok_for_watchpoint. All uses updated.
4874 (i386_low_stopped_data_address): Renamed to
4875 i386_dr_stopped_data_address. All uses updated.
4876 (i386_low_stopped_by_watchpoint): Renamed to
4877 i386_dr_stopped_by_watchpoint. All uses updated.
4878
131aa0d4
GB
48792014-06-18 Gary Benson <gbenson@redhat.com>
4880
4881 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4882 (i386_dr_low_can_set_control): Likewise.
4883 (i386_insert_aligned_watchpoint): New check.
4884
d9305f7f
GB
48852014-06-18 Gary Benson <gbenson@redhat.com>
4886
4887 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4888 Renamed to state.
4889
e927c9fc
GB
48902014-06-18 Gary Benson <gbenson@redhat.com>
4891
4892 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4893 instead of fatal and error.
4894 (i386_handle_nonaligned_watchpoint): Likewise.
4895
1b6d4134
GB
48962014-06-18 Gary Benson <gbenson@redhat.com>
4897
4898 * i386-low.c (i386_get_debug_register_length): New macro.
4899 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4900 (i386_show_dr): Use debug_printf instead of fprintf. Use
4901 phex to format values.
4902
6e62758f
GB
49032014-06-18 Gary Benson <gbenson@redhat.com>
4904
4905 * i386-low.h: Comment changes.
4906 * i386-low.c: Likewise.
4907
fc6e2f03
GB
49082014-06-18 Gary Benson <gbenson@redhat.com>
4909
4910 * i386-low.c: Whitespace changes.
4911
f9d1eeed
TT
49122014-06-12 Tom Tromey <tromey@redhat.com>
4913
4914 * utils.c (freeargv): Remove.
4915
0b04e523
TT
49162014-06-12 Tom Tromey <tromey@redhat.com>
4917
4918 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4919 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4920 (parse_debug_format_options): Likewise.
4921 (gdbserver_usage): Likewise.
4922 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4923 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4924 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4925 against libiberty.
4926 ($(LIBGNU)): Depend on libiberty.
4927 (all-lib): Recurse into all subdirs.
4928 (install-only): Invoke "install" target in subdirs.
4929 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4930 targets.
4931 * configure: Rebuild.
4932 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4933 for vasprintf, vsnprintf, or gettimeofday.
4934 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4935 srv_tgtobj.
4936
270c9937
JB
49372014-06-05 Joel Brobecker <brobecker@adacore.com>
4938
4939 * development.sh: Delete.
4940 * Makefile.in (config.status): Adjust dependency on development.sh.
4941 * configure.ac: Adjust development.sh source call.
4942 * configure: Regenerate.
4943
0a261ed8
PA
49442014-06-02 Pedro Alves <palves@redhat.com>
4945
4946 * ax.c (gdb_free_agent_expr): New function.
4947 * ax.h (gdb_free_agent_expr): New declaration.
4948 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4949 list.
4950 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4951 static.
4952 (clear_breakpoint_conditions_and_commands): New function.
4953 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4954 (clear_breakpoint_conditions_and_commands): New declaration.
4955
e9dae05e
RR
49562014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4957
4958 * linux-aarch64-low.c (asm/ptrace.h): Include.
4959
5876f503
JK
49602014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4961
4962 Fix TLS access for -static -pthread.
4963 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4964 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4965 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4966
802e8e6d
PA
49672014-05-20 Pedro Alves <palves@redhat.com>
4968
4969 * linux-aarch64-low.c (aarch64_insert_point)
4970 (aarch64_remove_point): No longer check whether the type is
4971 supported here. Adjust to new interface.
4972 (the_low_target): Install aarch64_supports_z_point_type as
4973 supports_z_point_type method.
4974 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4975 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4976 instead of a Z packet char. Adjust.
4977 (arm_supports_z_point_type): New function.
4978 (arm_insert_point, arm_remove_point): Adjust to new interface.
4979 (the_low_target): Install arm_supports_z_point_type.
4980 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4981 (cris_insert_point, cris_remove_point): Adjust to new interface.
4982 Don't check whether the type is supported here.
4983 (the_low_target): Install cris_supports_z_point_type.
4984 * linux-low.c (linux_supports_z_point_type): New function.
4985 (linux_insert_point, linux_remove_point): Adjust to new interface.
4986 * linux-low.h (struct linux_target_ops) <insert_point,
4987 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4988 raw_breakpoint pointer parameter.
4989 <supports_z_point_type>: New method.
4990 * linux-mips-low.c (mips_supports_z_point_type): New function.
4991 (mips_insert_point, mips_remove_point): Adjust to new interface.
4992 Use mips_supports_z_point_type.
4993 (the_low_target): Install mips_supports_z_point_type.
4994 * linux-ppc-low.c (the_low_target): Install NULL as
4995 supports_z_point_type method.
4996 * linux-s390-low.c (the_low_target): Install NULL as
4997 supports_z_point_type method.
4998 * linux-sparc-low.c (the_low_target): Install NULL as
4999 supports_z_point_type method.
5000 * linux-x86-low.c (x86_supports_z_point_type): New function.
5001 (x86_insert_point): Adjust to new insert_point interface. Use
5002 insert_memory_breakpoint. Adjust to new
5003 i386_low_insert_watchpoint interface.
5004 (x86_remove_point): Adjust to remove_point interface. Use
5005 remove_memory_breakpoint. Adjust to new
5006 i386_low_remove_watchpoint interface.
5007 (the_low_target): Install x86_supports_z_point_type.
5008 * lynx-low.c (lynx_target_ops): Install NULL as
5009 supports_z_point_type callback.
5010 * nto-low.c (nto_supports_z_point_type): New.
5011 (nto_insert_point, nto_remove_point): Adjust to new interface.
5012 (nto_target_ops): Install nto_supports_z_point_type.
5013 * mem-break.c: Adjust intro comment.
5014 (struct raw_breakpoint) <raw_type, size>: New fields.
5015 <inserted>: Update comment.
5016 <shlib_disabled>: Delete field.
5017 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5018 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5019 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5020 (raw_bkpt_type_to_target_hw_bp_type): New function.
5021 (find_enabled_raw_code_breakpoint_at): New function.
5022 (find_raw_breakpoint_at): New type and size parameters. Use them.
5023 (insert_memory_breakpoint): New function, based off
5024 set_raw_breakpoint_at.
5025 (remove_memory_breakpoint): New function.
5026 (set_raw_breakpoint_at): Reimplement.
5027 (set_breakpoint): New, based on set_breakpoint_at.
5028 (set_breakpoint_at): Reimplement.
5029 (delete_raw_breakpoint): Go through the_target->remove_point
5030 instead of assuming memory breakpoints.
5031 (find_gdb_breakpoint_at): Delete.
5032 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5033 (find_gdb_breakpoint): New function.
5034 (set_gdb_breakpoint_at): Delete.
5035 (z_type_supported): New function.
5036 (set_gdb_breakpoint_1): New function, loosely based off
5037 set_gdb_breakpoint_at.
5038 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5039 (delete_gdb_breakpoint_at): Delete.
5040 (delete_gdb_breakpoint_1): New function, loosely based off
5041 delete_gdb_breakpoint_at.
5042 (delete_gdb_breakpoint): New function.
5043 (clear_gdb_breakpoint_conditions): Rename to ...
5044 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5045 breakpoint.
5046 (add_condition_to_breakpoint): Make static.
5047 (add_breakpoint_condition): Take a struct breakpoint pointer
5048 instead of an address. Adjust.
5049 (gdb_condition_true_at_breakpoint): Rename to ...
5050 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5051 z_type parameter.
5052 (gdb_condition_true_at_breakpoint): Reimplement.
5053 (add_breakpoint_commands): Take a struct breakpoint pointer
5054 instead of an address. Adjust.
5055 (gdb_no_commands_at_breakpoint): Rename to ...
5056 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5057 parameter. Return true if no breakpoint was found. Change debug
5058 output.
5059 (gdb_no_commands_at_breakpoint): Reimplement.
5060 (run_breakpoint_commands): Rename to ...
5061 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5062 and change return type to boolean.
5063 (run_breakpoint_commands): New function.
5064 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5065 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5066 breakpoint. Go through the_target->remove_point instead of
5067 assuming memory breakpoint.
5068 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5069 software and hardware breakpoints.
5070 (reinsert_raw_breakpoint): Go through the_target->insert_point
5071 instead of assuming memory breakpoint.
5072 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5073 software and hardware breakpoints.
5074 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5075 Check both software and hardware breakpoints.
5076 (validate_inserted_breakpoint): Assert the breakpoint is a
5077 software breakpoint. Set the inserted flag to -1 instead of
5078 setting shlib_disabled.
5079 (delete_disabled_breakpoints): Adjust.
5080 (validate_breakpoints): Only validate software breakpoints.
5081 Adjust to inserted flag change.
5082 (check_mem_read, check_mem_write): Skip breakpoint types other
5083 than software breakpoints. Adjust to inserted flag change.
5084 * mem-break.h (enum raw_bkpt_type): New enum.
5085 (raw_breakpoint, struct process_info): Forward declare.
5086 (Z_packet_to_target_hw_bp_type): Delete declaration.
5087 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5088 (set_gdb_breakpoint, delete_gdb_breakpoint)
5089 (clear_breakpoint_conditions): New declarations.
5090 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5091 (breakpoint_inserted_here): Update comment.
5092 (add_breakpoint_condition, add_breakpoint_commands): Replace
5093 address parameter with a breakpoint pointer parameter.
5094 (gdb_breakpoint_here): Update comment.
5095 (delete_gdb_breakpoint_at): Delete.
5096 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5097 * server.c (process_point_options): Take a struct breakpoint
5098 pointer instead of an address. Adjust.
5099 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5100 delete_gdb_breakpoint.
5101 * spu-low.c (spu_target_ops): Install NULL as
5102 supports_z_point_type method.
5103 * target.h: Include mem-break.h.
5104 (struct target_ops) <prepare_to_access_memory>: Update comment.
5105 <supports_z_point_type>: New field.
5106 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5107 instead of a char. Also take a raw breakpoint pointer.
5108 * win32-arm-low.c (the_low_target): Install NULL as
5109 supports_z_point_type.
5110 * win32-i386-low.c (i386_supports_z_point_type): New function.
5111 (i386_insert_point, i386_remove_point): Adjust to new interface.
5112 (the_low_target): Install i386_supports_z_point_type.
5113 * win32-low.c (win32_supports_z_point_type): New function.
5114 (win32_insert_point, win32_remove_point): Adjust to new interface.
5115 (win32_target_ops): Install win32_supports_z_point_type.
5116 * win32-low.h (struct win32_target_ops):
5117 <supports_z_point_type>: New method.
5118 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5119 instead of a char. Also take a raw breakpoint pointer.
5120
932539e3
PA
51212014-05-20 Pedro Alves <palves@redhat.com>
5122
5123 * mem-break.h: Include break-common.h.
5124 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5125 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5126 (Z_packet_to_target_hw_bp_type): New declaration.
5127 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5128 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5129 (Z_PACKET_ACCESS_WP): Delete macros.
5130 (Z_packet_to_hw_type): Delete function.
5131 * i386-low.h: Don't include break-common.h here.
5132 (Z_packet_to_hw_type): Delete declaration.
5133 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5134 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5135 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5136 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5137 * linux-aarch64-low.c: Don't include break-common.h here.
5138 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5139 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5140 (Z_packet_to_target_hw_bp_type): Delete function.
5141 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5142 function.
5143 (mips_insert_point, mips_remove_point): Use
5144 Z_packet_to_target_hw_bp_type.
5145
4ff0d3d8
PA
51462014-05-20 Pedro Alves <palves@redhat.com>
5147
5148 * linux-aarch64-low.c: Include break-common.h.
5149 (enum target_point_type): Delete.
5150 (Z_packet_to_point_type): Rename to ...
5151 (Z_packet_to_target_hw_bp_type): ... this, and return a
5152 target_hw_bp_type instead.
5153 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5154 instead of an enum target_point_type.
5155 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5156 breakpoint type.
5157 (aarch64_dr_state_insert_one_point)
5158 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5159 (aarch64_handle_aligned_watchpoint)
5160 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5161 Take an enum target_hw_bp_type instead of an enum
5162 target_point_type.
5163 (aarch64_supports_z_point_type): New function.
5164 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5165 use Z_packet_to_target_hw_bp_type.
5166
786dc519
JB
51672014-05-20 Joel Brobecker <brobecker@adacore.com>
5168
5169 * configure.ac: Only use -Werror by default when DEVELOPMENT
5170 is true.
5171 * configure: Regenerate.
5172
9e0aa64f
JK
51732014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5174
5175 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5176 * linux-x86-low.c (X86_64_USER_REGS): New.
5177 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5178
2b577b92
YQ
51792014-04-28 Yao Qi <yao@codesourcery.com>
5180
5181 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5182 name.
5183
94611da2
PA
51842014-04-25 Pedro Alves <palves@redhat.com>
5185
5186 PR server/16255
5187 * linux-low.c (linux_attach_fail_reason_string): New function.
5188 (linux_attach_lwp): Delete.
5189 (linux_attach_lwp_1): Rename to ...
5190 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5191 argument. Remove "initial" parameter. Return int instead of
5192 void. Don't error or warn here.
5193 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5194 failure to attach to the tgid. Call warning when failing to
5195 attach to an lwp.
5196 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5197 argument. Remove "initial" parameter. Return int instead of
5198 void. Don't error or warn here.
5199 (linux_attach_fail_reason_string): New declaration.
5200 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5201 interface change. Use linux_attach_fail_reason_string.
5202
01f9f808
MS
52032014-04-24 Michael Sturm <michael.sturm@mintel.com>
5204 Walfred Tedeschi <walfred.tedeschi@intel.com>
5205
5206 * Makefile.in: Added rules to handle new files
5207 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5208 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5209 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5210 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5211 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5212 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5213 x32-avx512-linux.o.
5214 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5215 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5216 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5217 i386/x32-avx512.xml.
5218 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5219 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5220 i386/x32-avx512-linux.xml.
5221 * i387-fp.c (num_avx512_k_registers): New constant for number
5222 of K registers.
5223 (num_avx512_zmmh_low_registers): New constant for number of
5224 lower ZMM registers (0-15).
5225 (num_avx512_zmmh_high_registers): New constant for number of
5226 higher ZMM registers (16-31).
5227 (num_avx512_ymmh_registers): New contant for number of higher
5228 YMM registers (ymm16-31 added by avx521 on x86_64).
5229 (num_avx512_xmm_registers): New constant for number of higher
5230 XMM registers (xmm16-31 added by AVX512 on x86_64).
5231 (struct i387_xsave): Add space for AVX512 registers.
5232 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5233 Add code to handle AVX512 registers.
5234 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5235 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5236 prototypei from generated file.
5237 (tdesc_amd64_avx512_linux): Likewise.
5238 (init_registers_x32_avx512_linux): Likewise.
5239 (tdesc_x32_avx512_linux): Likewise.
5240 (init_registers_i386_avx512_linux): Likewise.
5241 (tdesc_i386_avx512_linux): Likewise.
5242 (x86_64_regmap): Add AVX512 registers.
5243 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5244 mask.
5245 (initialize_low_arch): Add code to initialize AVX512 registers.
5246
51aa91f9
PA
52472014-04-23 Pedro Alves <palves@redhat.com>
5248
5249 * mem-break.c (find_gdb_breakpoint_at): Make static.
5250 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5251
a4165e94
PA
52522014-04-23 Pedro Alves <palves@redhat.com>
5253
5254 * i386-low.c: Don't include break-common.h here.
5255 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5256 prototype to take target_hw_bp_type as argument instead of a Z
5257 packet char.
5258 * i386-low.h: Include break-common.h here.
5259 (Z_packet_to_hw_type): Declare.
5260 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5261 prototypes.
5262 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5263 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5264 (x86_remove_point): Convert the packet number to a
5265 target_hw_bp_type before calling i386_low_remove_watchpoint.
5266 * win32-i386-low.c (i386_insert_point): Convert the packet number
5267 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5268 (i386_remove_point): Convert the packet number to a
5269 target_hw_bp_type before calling i386_low_remove_watchpoint.
5270
b8acf843
PA
52712014-04-23 Pedro Alves <palves@redhat.com>
5272
5273 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5274
d708bcd1
PA
52752014-04-10 Pedro Alves <palves@redhat.com>
5276
5277 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5278 Check if the condition or command is NULL before checking if the
5279 breakpoint is known. On success, return true.
5280 * mem-break.h (add_breakpoint_condition): Document return.
5281 (add_breakpoint_commands): Add describing comment.
5282 * server.c (skip_to_semicolon): New function.
5283 (process_point_options): Use it.
5284
2eec7d5b
PA
52852014-04-09 Pedro Alves <palves@redhat.com>
5286
5287 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5288 to lwpid_of.
5289
fa96cb38
PA
52902014-02-27 Pedro Alves <palves@redhat.com>
5291
5292 PR 12702
5293 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5294 macros.
5295 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5296 output.
5297 (last_thread_of_process_p): Take a PID argument instead of a
5298 thread pointer.
5299 (linux_wait_for_lwp): Delete.
5300 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5301 functions.
5302 (linux_low_filter_event): New function, party factored out from
5303 linux_wait_for_event.
5304 (linux_wait_for_event): Rename to ...
5305 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5306 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5307 sigsuspend. Check for zombie leaders.
5308 (linux_wait_for_event): Reimplement as wrapper around
5309 linux_wait_for_event_filtered.
5310 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5311 a normal or signal exit is seen, it's the whole process exiting.
5312 (wait_for_sigstop): No longer a for_each_inferior callback.
5313 Rewrite on top of linux_wait_for_event_filtered.
5314 (stop_all_lwps): Call wait_for_sigstop directly.
5315 * server.c (resume, handle_target_event): Handle
5316 TARGET_WAITKIND_NO_RESUMED.
5317
d763de10
JB
53182014-02-26 Joel Brobecker <brobecker@adacore.com>
5319
5320 * win32-low.c (psapi_get_dll_name,
5321 * win32_CreateToolhelp32Snapshot): Delete.
5322 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5323 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5324 Delete.
5325 (handle_load_dll): Add function description.
5326 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5327
850a0f76
JB
53282014-02-26 Joel Brobecker <brobecker@adacore.com>
5329
5330 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5331 Add comment.
5332 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5333 base address when calling win32_add_one_solib.
5334 (handle_load_dll): Delete local variable load_addr.
5335 Remove 0x1000 offset applied to DLL base address when calling
5336 win32_add_one_solib.
5337 (handle_unload_dll): Add comment.
5338
f25b3fc3
JB
53392014-02-26 Joel Brobecker <brobecker@adacore.com>
5340
5341 * win32-low.c (win32_add_all_dlls): Renames
5342 win32_ensure_ntdll_loaded. Rewrite function documentation.
5343 Adjust implementation to always load all DLLs.
5344 Add 0x1000 offset to DLL base address when calling
5345 win32_add_one_solib.
5346 (child_initialization_done): New static global.
5347 (do_initial_child_stuff): Set child_initialization_done to
5348 zero during child initialization, and 1 after. Replace call
5349 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5350 Add comment.
5351 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5352 (handle_unload_dll): Add function documentation.
5353 (get_child_debug_event): Ignore load and unload DLL events
5354 during child initialization.
5355
d86d4aaf
DE
53562014-02-20 Doug Evans <dje@google.com>
5357
3bc32da3 5358 Remove global all_lwps.
d86d4aaf
DE
5359 * inferiors.h (ptid_of): Move here from linux-low.h.
5360 (pid_of, lwpid_of): Ditto.
5361 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5362 parameter is a struct thread_info * now.
5363 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5364 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5365 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5366 directly.
5367 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5368 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5369 * linux-arm-low.c (update_registers_callback): Update, "entry"
5370 parameter is a struct thread_info * now.
5371 Fetch lwpid from current_inferior directly.
5372 (arm_insert_point): Pass &all_threads to find_inferior instead of
5373 &all_lwps.
5374 (arm_remove_point): Ditto.
5375 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5376 (arm_prepare_to_resume): Fetch pid from thread.
5377 (arm_read_description): Fetch lwpid from current_inferior directly.
5378 * linux-low.c (all_lwps): Delete.
5379 (delete_lwp): Delete call to remove_inferior.
5380 (handle_extended_wait): Fetch lwpid from thread.
5381 (add_lwp): Don't set lwp->entry.id. Remove call to
5382 add_inferior_to_list.
5383 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5384 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5385 (kill_one_lwp_callback): Ditto.
5386 (linux_kill): Don't dereference NULL pointer.
5387 Fetch ptid,lwpid from thread.
5388 (get_detach_signal): Fetch ptid from thread.
5389 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5390 Simplify call to regcache_invalidate_thread.
5391 (delete_lwp_callback): Update, "entry" parameter is a
5392 struct thread_info * now. Fetch pid from thread.
5393 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5394 (status_pending_p_callback): Update, "entry" parameter is a
5395 struct thread_info * now. Fetch ptid from thread.
5396 (find_lwp_pid): Update, "entry" parameter is a
5397 struct thread_info * now.
5398 (linux_wait_for_lwp): Fetch pid from thread.
5399 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5400 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5401 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5402 (dequeue_one_deferred_signal): Ditto.
5403 (cancel_breakpoint): Fetch ptid from current_inferior.
5404 (linux_wait_for_event): Pass &all_threads to find_inferior,
5405 not &all_lwps. Fetch ptid, lwpid from thread.
5406 (count_events_callback): Update, "entry" parameter is a
5407 struct thread_info * now.
5408 (select_singlestep_lwp_callback): Ditto.
5409 (select_event_lwp_callback): Ditto.
5410 (cancel_breakpoints_callback): Ditto.
5411 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5412 not &all_lwps.
5413 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5414 (unsuspend_one_lwp): Update, "entry" parameter is a
5415 struct thread_info * now.
5416 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5417 not &all_lwps.
5418 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5419 Fetch lwpid from thread, not lwp.
5420 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5421 Pass &all_threads to find_inferior, not &all_lwps.
5422 (send_sigstop): Fetch lwpid from thread, not lwp.
5423 (send_sigstop_callback): Update, "entry" parameter is a
5424 struct thread_info * now.
5425 (suspend_and_send_sigstop_callback): Ditto.
5426 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5427 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5428 struct thread_info * now.
5429 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5430 from thread, lwp.
5431 (lwp_running): Update, "entry" parameter is a
5432 struct thread_info * now.
5433 (stop_all_lwps): Fetch ptid from thread.
5434 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5435 (linux_resume_one_lwp): Fetch lwpid from thread.
5436 (linux_set_resume_request): Update, "entry" parameter is a
5437 struct thread_info * now. Fetch pid, lwpid from thread.
5438 (resume_status_pending_p): Update, "entry" parameter is a
5439 struct thread_info * now.
5440 (need_step_over_p): Ditto. Fetch lwpid from thread.
5441 (start_step_over): Fetch lwpid from thread.
5442 (linux_resume_one_thread): Update, "entry" parameter is a
5443 struct thread_info * now. Fetch lwpid from thread.
5444 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5445 (proceed_one_lwp): Update, "entry" parameter is a
5446 struct thread_info * now. Fetch lwpid from thread.
5447 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5448 struct thread_info * now.
5449 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5450 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5451 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5452 directly.
5453 (regsets_store_inferior_registers): Ditto.
5454 (fetch_register, store_register): Ditto.
5455 (linux_read_memory, linux_write_memory): Ditto.
5456 (linux_request_interrupt): Ditto.
5457 (linux_read_auxv): Ditto.
5458 (linux_xfer_siginfo): Ditto.
5459 (linux_qxfer_spu): Ditto.
5460 (linux_qxfer_libraries_svr4): Ditto.
5461 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5462 moved to inferiors.h.
5463 (get_lwp): Delete.
5464 (get_thread_lwp): Update.
5465 (struct lwp_info): Delete member "entry". Simplify comment for
5466 member "thread".
5467 (all_lwps): Delete.
5468 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5469 current_inferior directly.
5470 (update_watch_registers_callback): Update, "entry" parameter is a
5471 struct thread_info * now. Fetch pid from thread.
5472 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5473 (mips_insert_point): Fetch lwpid from current_inferior.
5474 Pass &all_threads to find_inferior, not &all_lwps.
5475 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5476 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5477 directly.
5478 (mips_stopped_data_address): Ditto.
5479 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5480 directly.
5481 * linux-tile-low.c (tile_arch_setup): Ditto.
5482 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5483 (update_debug_registers_callback): Update, "entry" parameter is a
5484 struct thread_info * now. Fetch pid from thread.
5485 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5486 Pass &all_threads to find_inferior, not &all_lwps.
5487 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5488 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5489 Pass &all_threads to find_inferior, not &all_lwps.
5490 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5491 (i386_dr_low_get_status): Ditto.
5492 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5493 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5494 (x86_linux_read_description): Ditto.
5495 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5496
3b8361aa
DE
54972014-02-20 Doug Evans <dje@google.com>
5498
5499 * inferiors.c (get_first_inferior): Fix buglet.
5500
f7667f0d
DE
55012014-02-19 Doug Evans <dje@google.com>
5502
5503 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5504 * inferiors.c (add_thread): Change result type to struct thread_info *.
5505 All callers updated.
5506 (add_lwp): Call add_thread here instead of in callers.
5507 All callers updated.
5508 * linux-low.h (get_lwp_thread): Rewrite.
5509 (struct lwp_info): New member "thread".
5510
b3312d80
DE
55112014-02-19 Doug Evans <dje@google.com>
5512
5513 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5514 All callers updated.
5515
ecc6f45c
DE
55162014-02-19 Doug Evans <dje@google.com>
5517
5518 * inferiors.c (add_thread): Fix whitespace.
5519
649ebbca
DE
55202014-02-19 Doug Evans <dje@google.com>
5521
5522 * dll.c (clear_dlls): Replace accessing list implemention details
5523 with API function.
5524 * gdbthread.h (get_first_thread): Declare.
5525 * inferiors.c (for_each_inferior_with_data): New function.
5526 (get_first_thread): New function.
5527 (find_thread_ptid): Simplify.
5528 (get_first_inferior): New function.
5529 (clear_list): Delete.
5530 (one_inferior_p): New function.
5531 (clear_inferior_list): New function.
5532 (clear_inferiors): Update.
5533 * inferiors.h (for_each_inferior_with_data): Declare.
5534 (clear_inferior_list): Declare.
5535 (one_inferior_p): Declare.
5536 (get_first_inferior): Declare.
5537 * linux-low.c (linux_wait_for_event): Replace accessing list
5538 implemention details with API function.
5539 * server.c (target_running): Ditto.
5540 (accumulate_file_name_length): New function.
5541 (emit_dll_description): New function.
5542 (handle_qxfer_libraries): Replace accessing list implemention
5543 details with API function.
5544 (handle_qxfer_threads_worker): New function.
5545 (handle_qxfer_threads_proper): Replace accessing list implemention
5546 details with API function.
5547 (handle_query): Ditto.
5548 (visit_actioned_threads_callback_ftype): New typedef.
5549 (visit_actioned_threads_data): New struct.
5550 (visit_actioned_threads): Rewrite to be find_inferior callback.
5551 (resume): Call find_inferior.
5552 (handle_status): Replace accessing list implemention
5553 details with API function.
5554 (process_serial_event): Replace accessing list implemention details
5555 with API function.
5556 * target.c (set_desired_inferior): Replace accessing list implemention
5557 details with API function.
5558 * tracepoint.c (same_process_p): New function.
5559 (gdb_agent_about_to_close): Replace accessing list implemention
5560 details with API function.
5561 * win32-low.c (child_delete_thread): Replace accessing list
5562 implemention details with API function.
5563 (match_dll_by_basename): New function.
5564 (dll_is_loaded_by_basename): New function.
5565 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5566 details call to dll_is_loaded_by_basename.
5567
80894984
DE
55682014-02-19 Doug Evans <dje@google.com>
5569
5570 * dll.h (struct dll_info): Add comment.
5571 * gdbthread.h (struct thread_info): Add comment.
5572 (current_ptid): Simplify.
5573 * inferiors.c (add_process): Update.
5574 (remove_process): Update.
5575 * inferiors.h (struct process_info): Rename member "head" to "entry".
5576 * linux-low.c (delete_lwp): Update.
5577 (add_lwp): Update.
5578 (last_thread_of_process_p): Update.
5579 (kill_one_lwp_callback, linux_kill): Update.
5580 (status_pending_p_callback): Update.
5581 (wait_for_sigstop): Update. Simplify read of ptid.
5582 (start_step_over): Update.
5583 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5584 (get_lwp_thread): Update.
5585 (struct lwp_info): Rename member "head" to "entry".
5586 * regcache.h (inferior_list_entry): Delete.
5587 * server.c (kill_inferior_callback): Update.
5588 (detach_or_kill_inferior_callback): Update.
5589 (print_started_pid): Update.
5590 (print_attached_pid): Update.
5591 (process_serial_event): Simplify read of ptid.
5592 * thread-db.c (thread_db_create_event): Update.
5593 (thread_db_get_tls_address): Update.
5594 * win32-low.c (current_inferior_ptid): Simplify.
5595
46917d26
TT
55962014-02-19 Tom Tromey <tromey@redhat.com>
5597
5598 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5599 argument.
5600 (target_supports_btrace): Update.
5601
0759a81e
YQ
56022014-02-14 Yao Qi <yao@codesourcery.com>
5603
5604 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5605 (rsp-low-ipa.o): New target.
5606
a7191e8b
TT
56072014-02-12 Tom Tromey <tromey@redhat.com>
5608
5609 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5610 convert_ascii_to_int.
5611 * regcache.c (registers_to_string): Likewise.
5612 * remote-utils.c (decode_M_packet): Likewise.
5613 * server.c (process_serial_event): Likewise.
5614
ff0e980e
TT
56152014-02-12 Tom Tromey <tromey@redhat.com>
5616
5617 * server.c (handle_query, handle_v_run): Use hex2bin, not
5618 unhexify.
5619 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5620
e9371aff
TT
56212014-02-12 Tom Tromey <tromey@redhat.com>
5622
5623 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5624 convert_int_to_ascii.
5625 * regcache.c (registers_to_string, collect_register_as_string):
5626 Likewise.
5627 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5628 Likewise.
5629 * server.c (process_serial_event): Likewise.
5630 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5631 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5632
971dc0b8
TT
56332014-02-12 Tom Tromey <tromey@redhat.com>
5634
5635 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5636 bin2hex, not hexify.
5637 * tracepoint.c (cmd_qtstatus): Likewise.
5638
0a822afb
TT
56392014-02-12 Tom Tromey <tromey@redhat.com>
5640
5641 * remote-utils.c (monitor_output): Pass explicit length to
5642 hexify.
5643
9c3d6531
TT
56442014-02-12 Tom Tromey <tromey@redhat.com>
5645
5646 * tracepoint.c: Include rsp-low.h.
5647 * server.c: Include rsp-low.h.
5648 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5649 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5650 declare.
5651 * remote-utils.c: Include rsp-low.h.
5652 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5653 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5654 (convert_int_to_ascii, convert_ascii_to_int): Move to
5655 common/rsp-low.c.
5656 * regcache.c: Include rsp-low.h.
5657 * ax.c: Include rsp-low.h.
5658 * Makefile.in (SFILES): Add common/rsp-low.c.
5659 (OBS): Add rsp-low.o.
5660 (rsp-low.o): New target.
5661
01fd3ea5
TT
56622014-02-12 Tom Tromey <tromey@redhat.com>
5663
5664 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5665 Include print-utils.h.
5666 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5667 (plongest, thirty_two, phex_nz): Remove.
5668 * Makefile.in (SFILES): Add common/print-utils.c.
5669 (OBS): Add print-utils.o.
5670 (print-utils-ipa.o): New target.
5671 (print-utils.o): New target.
5672 (IPA_OBJS): Add print-utils-ipa.o.
5673
e99dc820
TT
56742014-02-06 Tom Tromey <tromey@redhat.com>
5675
5676 * Makefile.in (SFILES): Fix indentation.
5677
ee1e2d4f
DE
56782014-02-05 Doug Evans <dje@google.com>
5679
5680 * linux-low.c (linux_wait_for_event): Improve comment.
5681 (linux_wait_1): Keep current_inferior in sync with event_child.
5682
f5a02773
DE
56832014-01-22 Doug Evans <dje@google.com>
5684
5685 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5686
87ce2a04
DE
56872014-01-22 Doug Evans <dje@google.com>
5688
5689 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5690 * configure: Regenerate.
5691 * config.in: Regenerate.
5692 * Makefile.in (SFILES): Add debug.c.
5693 (OBS): Add debug.o.
5694 * debug.c: New file.
5695 * debug.h: New file.
5696 * linux-aarch64-low.c (*): Update all debugging printfs to use
5697 debug_printf instead of fprintf.
5698 * linux-arm-low.c (*): Ditto.
5699 * linux-cris-low.c (*): Ditto.
5700 * linux-crisv32-low.c (*): Ditto.
5701 * linux-m32r-low.c (*): Ditto.
5702 * linux-sparc-low.c (*): Ditto.
5703 * linux-x86.c (*): Ditto.
5704 * linux-low.c (*): Ditto.
5705 (linux_wait_1): Add calls to debug_enter, debug_exit.
5706 (linux_wait): Remove redundant debugging printf.
5707 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5708 (linux_resume, unstop_all_lwps): Ditto.
5709 * mem-break.c (*): Update all debugging printfs to use
5710 debug_printf instead of fprintf.
5711 * remote-utils.c (*): Ditto.
5712 * thread-db.c (*): Ditto.
5713 * server.c #include <ctype.h>, "gdb_vecs.h".
5714 (debug_threads): Moved to debug.c.
5715 (*): Update all debugging printfs to use debug_printf instead of
5716 fprintf.
5717 (start_inferior): Replace call to fflush with call to debug_flush.
5718 (monitor_show_help): Mention set debug-format.
5719 (parse_debug_format_options): New function.
5720 (handle_monitor_command): Handle "monitor set debug-format".
5721 (gdbserver_usage): Mention --debug-format.
5722 (main): Parse --debug-format.
5723 * server.h (debug_threads): Declaration moved to debug.h.
5724 #include "debug.h".
5725 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5726 trace_debug_1 that uses debug_printf.
5727 (tracepoint_look_up_symbols): Update all debugging printfs to use
5728 debug_printf instead of fprintf.
5729
e671835b
BS
57302014-01-20 Baruch Siach <baruch@tkos.co.il>
5731
5732 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5733 sys/ptrace.h.
5734
b5737fa9
PA
57352014-01-17 Pedro Alves <palves@redhat.com>
5736
ea38d2a9 5737 PR build/16445
c7faa97a
PA
5738 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5739 defined after including gdb_proc_service.h.
b5737fa9 5740
40ed484e
DE
57412014-01-16 Doug Evans <dje@google.com>
5742
5743 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5744 (match_dll): Use it.
5745
969c39fb
MM
57462014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5747
5748 * target.h (target_ops) <read_btrace>: Change parameters and
5749 return type to allow error reporting.
5750 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5751 trace reading errors on.
5752 * linux-low.c (linux_low_read_btrace): Pass trace reading
5753 errors on.
5754 (linux_low_disable_btrace): New.
5755
ab7f45ba
DE
57562014-01-15 Doug Evans <dje@google.com>
5757
5758 * inferiors.c (thread_id_to_gdb_id): Delete.
5759 * inferiors.h (thread_id_to_gdb_id): Delete.
5760
66af0f44
EZ
57612014-01-13 Eli Zaretskii <eliz@gnu.org>
5762
5763 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5764 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5765 versions.
5766
9939e131
PA
57672014-01-08 Pedro Alves <palves@redhat.com>
5768
5769 * server.c (handle_status): Don't discard previous queued stop
5770 replies or thread's pending status here.
5771 (main) <disconnection>: Do it here instead.
5772
b7ea362b
PA
57732014-01-08 Pedro Alves <palves@redhat.com>
5774
5775 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5776 * server.c (visit_actioned_threads, handle_pending_status): New
5777 function.
5778 (handle_v_cont): Factor out parts to ...
5779 (resume): ... this new function. If in all-stop, and a thread
5780 being resumed has a pending status, report it without actually
5781 resuming.
5782 (myresume): Adjust to use the new 'resume' function.
5783 (clear_pending_status_callback, set_pending_status_callback)
5784 (find_status_pending_thread_callback): New functions.
5785 (handle_status): Handle the case of multiple threads having
5786 interesting statuses to report. Report threads' real last signal
5787 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5788 with an interesting thread to report the status for, instead of
5789 always reporting the status of the first thread.
5790
28498c42
JB
57912014-01-01 Joel Brobecker <brobecker@adacore.com>
5792
5793 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5794 * gdbreplay.c (gdbreplay_version): Likewise.
5795
f45c82da
YZ
57962013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5797
5798 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5799 iov.iov_len with the real length in use.
5800
379a5e2d
JB
58012013-12-13 Joel Brobecker <brobecker@adacore.com>
5802
5803 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5804 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5805 for all targets that use win32-low.c.
5806 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5807 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5808
4210d83e
PA
58092013-12-13 Pedro Alves <palves@redhat.com>
5810
5811 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5812 if equal to TARGET_WAITKIND_LOADED.
5813 * win32-low.c (cached_status): New static global.
5814 (win32_wait): Add declaration.
5815 (do_initial_child_stuff): Flush all initial pending debug events
5816 up to the initial breakpoint.
5817 (win32_wait): If CACHED_STATUS was set, return that instead
5818 of doing a real wait. Remove the code resuming the execution
5819 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5820 during the initial phase. Also remove the code changing
5821 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5822 TARGET_WAITKIND_STOPPED.
5823
e7f0d979
YQ
58242013-12-11 Yao Qi <yao@codesourcery.com>
5825
5826 * notif.c (handle_notif_ack): Return 0 if no notification
5827 matches.
5828
ebcf782c
DE
58292013-11-20 Doug Evans <dje@google.com>
5830
5831 * linux-low.c (linux_set_resume_request): Fix comment.
5832
20ad9378
DE
58332013-11-20 Doug Evans <dje@google.com>
5834
5835 * linux-low.c (resume_status_pending_p): Tweak comment.
5836
a196ebeb
WT
58372013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5838
5839 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5840 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5841 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5842 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5843 (srv_amd64_regobj): Add amd64-mpx.o.
5844 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5845 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5846 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5847 * i387-fp.c (num_pl_bnd_register) Added constant.
5848 (num_pl_bnd_cfg_registers) Added constant.
5849 (struct i387_xsave) Added reserved area and MPX fields.
5850 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5851 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5852 function.
5853 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5854 (init_registers_amd64_mpx_linux): Declare new function.
5855 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5856 (x86_64_regmap): Add MPX registers.
5857 (x86_linux_read_description): Add MPX case.
5858 (initialize_low_arch): Initialize MPX targets.
5859
0080a2f6
TT
58602013-11-18 Tom Tromey <tromey@redhat.com>
5861
5862 * configure: Rebuild.
5863 * configure.ac: Don't check for stdlib.h.
5864 * gdbreplay.c: Unconditionally include stdlib.h.
5865
2978b111
TT
58662013-11-18 Tom Tromey <tromey@redhat.com>
5867
5868 * config.in: Rebuild.
5869 * configure: Rebuild.
5870 * configure.ac: Don't use AC_HEADER_DIRENT.
5871
a3d08894
TT
58722013-11-18 Tom Tromey <tromey@redhat.com>
5873
5874 * server.h: Don't check HAVE_STRING_H.
5875 * gdbreplay.c: Don't check HAVE_STRING_H.
5876 * configure: Rebuild.
5877
0a5dd17d
TT
58782013-11-18 Tom Tromey <tromey@redhat.com>
5879
5880 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5881 LIBGNU.
5882
1bd2f0ba
TT
58832013-11-08 Tom Tromey <tromey@redhat.com>
5884
5885 * configure, config.in: Rebuild.
5886 * configure.ac: Remove unused configury.
5887
3266f10b
TT
58882013-11-08 Tom Tromey <tromey@redhat.com>
5889
5890 * acinclude.m4: Include common.m4, codeset.m4.
5891 * configure, config.in: Rebuild.
5892 * configure.ac: Use GDB_AC_COMMON.
5893
6682d959
AA
58942013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5895
5896 * linux-s390-low.c (HWCAP_S390_TE): New define.
5897 (s390_arch_setup): Consider the TE field in the HWCAP for
5898 determining 'have_regset_tdb'.
5899
fd0a4d76
SDJ
59002013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5901
5902 PR gdb/16014
5903 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5904 call to sizeof.
5905
1a3d890b
PA
59062013-10-02 Pedro Alves <palves@redhat.com>
5907
5908 * server.c (process_serial_event): Don't output "GDBserver
5909 exiting" if GDB is connected through stdio.
5910 * target.c (mywait): Likewise, be silent if GDB is connected
5911 through stdio.
5912
97ad4581
JB
59132013-10-01 Joel Brobecker <brobecker@adacore.com>
5914
5915 * lynx-low.c (lynx_add_threads_after_attach): New function.
5916 (lynx_attach): Remove call to add_thread. Add call to
5917 lynx_add_threads_after_attach instead.
5918
5b4e221c
MF
59192013-09-28 Mike Frysinger <vapier@gentoo.org>
5920
5921 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5922 * config.in, configure: Regenerated.
5923
ee47b2f8
YQ
59242013-09-18 Yao Qi <yao@codesourcery.com>
5925
5926 PR server/15959
5927 * server.c (start_inferior): Clear 'resume_info'.
5928
d6707650 59292013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5930
d6707650
JW
5931 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5932 for each register.
5933
9243dd0e 59342013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5935
9243dd0e
JW
5936 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5937 linux-tile-low.o to srv_tgtobj.
5938
c623a6ef
WN
59392013-09-16 Will Newton <will.newton@linaro.org>
5940
5941 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5942 out regs.
5943
fb71d39e
PA
59442013-09-06 Pedro Alves <palves@redhat.com>
5945
5946 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5947 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5948 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5949 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5950 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5951 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5952
8e7e9910
PA
59532013-09-06 Pedro Alves <palves@redhat.com>
5954
5955 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5956 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5957
7c3a12ca
PA
59582013-09-06 Pedro Alves <palves@redhat.com>
5959
5960 * linux-amd64-ipa.c: Include tracepoint.h.
5961 * linux-i386-ipa.c: Include tracepoint.h.
5962
8eb3d7b6
RW
59632013-09-06 Ricard Wanderlof <ricardw@axis.com>
5964
5965 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5966 (ps_get_thread_area): New function.
5967
eddddb9d
RW
59682013-09-06 Ricard Wanderlof <ricardw@axis.com>
5969
5970 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5971 (initialize_low_arch): Call init_registers_crisv32 rather than
5972 init_register_crisv32.
5973
533b0600
PA
59742013-09-05 Pedro Alves <palves@redhat.com>
5975
5976 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5977 to ...
5978 * hostio.h: ... this new file.
5979 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5980 win32-low.c: Include hostio.h.
5981
0ce3d3b5
PA
59822013-09-05 Pedro Alves <palves@redhat.com>
5983
5984 * server.h (gdb_client_data, handler_func, callback_handler_func)
5985 (delete_file_handler, add_file_handler, append_callback_event)
5986 (delete_callback_event, start_event_loop, initialize_event_loop):
5987 Move to event-loop.h and include it.
5988 * event-loop.h: New file.
5989
799cdc37
PA
59902013-09-05 Pedro Alves <palves@redhat.com>
5991
5992 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5993 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5994 (loaded_dll, unloaded_dll): Move to ...
5995 * dll.h: ... this new file.
5996 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5997
6a6bbd9d
PA
59982013-09-05 Pedro Alves <palves@redhat.com>
5999
6000 * server.h (current_process, get_thread_process, all_processes)
6001 (add_inferior_to_list, for_each_inferior, current_inferior)
6002 (remove_inferior, add_process, remove_process, find_process_pid)
6003 (have_started_inferiors_p, have_attached_inferiors_p)
6004 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6005 (clear_inferiors, find_inferior, find_inferior_id)
6006 (inferior_target_data, set_inferior_target_data)
6007 (inferior_regcache_data, set_inferior_regcache_data): Move to
6008 inferiors.h, and include it.
6009 * inferiors.h: New file.
6010
f699aaba
PA
60112013-09-05 Pedro Alves <palves@redhat.com>
6012
6013 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6014 Move ...
72f4393d 6015 * ax.h: ... here.
f699aaba 6016
c144c7a0
PA
60172013-09-05 Pedro Alves <palves@redhat.com>
6018
6019 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6020 tracepoint.h.
6021 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6022 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6023 (handle_tracepoint_general_set, handle_tracepoint_query)
6024 (tracepoint_finished_step, tracepoint_was_hit)
6025 (release_while_stepping_state_list, current_traceframe)
6026 (in_readonly_region, traceframe_read_mem)
6027 (fetch_traceframe_registers, traceframe_read_sdata)
6028 (traceframe_read_info, struct fast_tpoint_collect_status)
6029 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6030 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6031 (supply_fast_tracepoint_registers)
6032 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6033 (ipa_tdesc, claim_trampoline_space)
6034 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6035 (agent_mem_read, agent_get_trace_state_variable_value)
6036 (agent_set_trace_state_variable_value, agent_tsv_read)
6037 (agent_mem_read_string, get_raw_reg_func_addr)
6038 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6039 * tracepoint.h: ... this new file.
6040
ff42e6ab
PA
60412013-09-05 Pedro Alves <palves@redhat.com>
6042
6043 * server.h (perror_with_name, error, fatal, warning, paddress)
6044 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6045 include it.
6046 * utils.h: New file.
6047
541af0f4
PA
60482013-09-05 Pedro Alves <palves@redhat.com>
6049
6050 * server.h (remote_debug, noack_mode, transport_is_reliable)
6051 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6052 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6053 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6054 (write_enn, initialize_async_io, enable_async_io)
6055 (disable_async_io, check_remote_input_interrupt_request)
6056 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6057 (dead_thread_notify, prepare_resume_reply)
6058 (decode_address_to_semicolon, decode_address, decode_m_packet)
6059 (decode_M_packet, decode_X_packet, decode_xfer_write)
6060 (decode_search_memory_packet, unhexify, hexify)
6061 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6062 (look_up_one_symbol, relocate_instruction)
6063 (monitor_output): Move to remote-utils.h, and include it.
6064 * remote-utils.h: New file.
6065
eebdf26b
PA
60662013-09-05 Pedro Alves <palves@redhat.com>
6067
6068 * server.h (_): Delete.
6069
3aafd2ff
PA
60702013-09-02 Pedro Alves <palves@redhat.com>
6071
6072 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6073 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6074 allocated.
6075 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6076
cee83bcb
PM
60772013-09-02 Pierre Muller <muller@sourceware.org>
6078
6079 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6080 or WriteProcessMemory complete successfully and handle
6081 ERROR_PARTIAL_COPY error.
6082
9a13b2fa
PA
60832013-09-02 Pedro Alves <palves@redhat.com>
6084
6085 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6086 error instead of EIO.
6087
602e3198
JK
60882013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6089
6090 PR server/15604
6091 * linux-low.c: Include filestuff.h.
6092 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6093 * lynx-low.c: Include filestuff.h.
6094 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6095 * server.c: Include filestuff.h.
6096 (main): Call notice_open_fds.
6097 * spu-low.c: Include filestuff.h.
6098 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6099
96d7229d
LM
61002013-08-22 Luis Machado <lgustavo@codesourcery.com>
6101
6102 * Makefile.in: Explain why ../target and ../nat are not
6103 listed as include file search paths.
6104 (linux-waitpid.o): New object file rule.
6105 * configure.srv (srv_native_linux_obj): New variable.
6106 Replace all occurrences of linux native object files with
6107 $srv_native_linux_obj.
6108 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6109 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6110 (linux_enable_event_reporting): Remove declaration.
6111 (my_waitpid): Moved to common/linux-waitpid.c.
6112 (linux_wait_for_event): Pass ptid when calling
6113 linux_enable_event_reporting.
6114 (linux_supports_tracefork_flag): Remove.
6115 (linux_enable_event_reporting): Likewise.
6116 (linux_tracefork_grandchild): Remove.
6117 (STACK_SIZE): Moved to common/linux-ptrace.c.
6118 (linux_tracefork_child): Remove.
6119 (linux_test_for_tracefork): Remove.
6120 (linux_look_up_symbols): Call linux_supports_traceclone.
6121 (initialize_low): Remove call to linux_test_for_tracefork.
6122 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6123 common/linux-ptrace.h.
6124 (PTRACE_TYPE_ARG4): Likewise.
6125 Include linux-ptrace.h.
6126
32940073
PA
61272013-08-21 Pedro Alves <palves@redhat.com>
6128
6129 * config.in: Renegerate.
6130
33b60d58 61312013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6132
33b60d58
LM
6133 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6134 (SFILES): Remove $(srcdir)/common/target-common.c and
6135 add $(srcdir)/target/waitstatus.c.
6136 (OBS): Remove target-common.o and add waitstatus.o.
6137 (server_h): Remove $(srcdir)/../common/target-common.h and
6138 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6139 and $(srcdir)/../target/waitstatus.h.
6140 (target-common.o): Remove.
6141 (waitstatus.o): New target object file.
6142 * target.h: Do not include target-common.h and
6143 include target/resume.h, target/wait.h and
6144 target/waitstatus.h.
6145
b8e1b30e
LM
61462013-08-13 Luis Machado <lgustavo@codesourcery.com>
6147
6148 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6149 to PTRACE_TYPE_ARG3.
6150 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6151 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6152 PTRACE_TYPE_ARG4.
6153 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6154 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6155
7a60ad40
YQ
61562013-07-27 Jie Zhang <jie@codesourcery.com>
6157 Daniel Jacobowitz <dan@codesourcery.com>
6158 Yao Qi <yao@codesourcery.com>
6159
6160 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6161 (mips-linux-watch.o): New rule.
6162 (mips_linux_watch_h): New variable.
6163 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6164 srv_tgtobj.
6165 * linux-mips-low.c: Include mips-linux-watch.h.
6166 (struct arch_process_info, struct arch_lwp_info): New.
6167 (update_watch_registers_callback): New function.
6168 (mips_linux_new_process, mips_linux_new_thread) New functions.
6169 (mips_linux_prepare_to_resume, mips_insert_point): New
6170 functions.
6171 (mips_remove_point, mips_stopped_by_watchpoint): New
6172 functions.
6173 (rsp_bp_type_to_target_hw_bp_type): New function.
6174 (mips_stopped_data_address): New function.
6175 (the_low_target): Add watchpoint support functions.
6176
de6f69ad
YQ
61772013-07-27 Yao Qi <yao@codesourcery.com>
6178
6179 * i386-low.c: Include break-common.h.
6180 (enum target_hw_bp_type): Remove.
6181
3360c0bf
LM
61822013-07-24 Luis Machado <lgustavo@codesourcery.com>
6183
6184 * Makefile.in (SFILES): /common/target-common.c.
6185 (OBS): Add target-common.o.
6186 (server_h): Add $(srcdir)/../common/target-common.h.
6187 (target-common.o): New target.
6188 * server.c (queue_stop_reply_callback): Free
6189 status string after use.
6190 * target.c (target_waitstatus_to_string): Remove.
6191 * target.h: Include target-common.h.
6192 (resume_kind): Likewise.
6193 (target_waitkind): Likewise.
6194 (target_waitstatus): Likewise.
6195 (TARGET_WNOHANG): Likewise.
6196
bd885420
YQ
61972013-07-04 Yao Qi <yao@codesourcery.com>
6198
6199 * Makefile.in (host_alias): Use @host_noncanonical@.
6200 (target_alias): Use @target_noncanonical@.
6201 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6202 ACX_NONCANONICAL_HOST.
6203 * configure: Regenerated.
6204
6205 Revert:
6206 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6207
6208 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6209 * configure: Rebuild.
6210 * Makefile.in (version_host, version_target): Get from configure.
6211 (version.c): Use $(version_host) and $(version_target).
6212
17ef446e
PA
62132013-07-03 Pedro Alves <palves@redhat.com>
6214
6215 * Makefile.in (config.status): Depend on development.sh.
6216 * acinclude.m4: Include libmcheck.m4.
6217 * configure: Regenerate.
6218
7a9a7487
MG
62192013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6220
6221 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6222 attribute inside the parentheses.
6223 (winapi_DebugSetProcessKillOnExit): Ditto.
6224 (winapi_DebugBreakProcess): Ditto.
6225 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 6226
49b64de6
MG
62272013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6228
6229 * notif.h (notif_event): Add a dummy member to avoid compiler
6230 errors.
6231
d5749ee7
PA
62322013-07-01 Pedro Alves <palves@redhat.com>
6233
6234 * hostio.c (HOSTIO_PATH_MAX): Define.
6235 (require_filename, handle_open, handle_unlink, handle_readlink):
6236 Use it.
6237
d8d2a3ee
PA
62382013-07-01 Pedro Alves <palves@redhat.com>
6239
6240 * server.h: Include "pathmax.h".
6241 * linux-low.c: Don't include sys/param.h.
6242 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6243 MAXPATHLEN.
6244 * win32-low.c: Don't include sys/param.h.
6245 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6246
bc7dea8d
PA
62472013-07-01 Pedro Alves <palves@redhat.com>
6248
6249 * event-loop.c: Don't check HAVE_UNISTD_H before including
6250 <unistd.h>.
6251 * gdbreplay.c: Likewise.
6252 * remote-utils.c: Likewise.
6253 * server.c: Likewise.
6254 * configure.ac: Don't check for unistd.h.
6255 * configure: Regenerate.
6256
d6c2da54
TT
62572013-06-28 Tom Tromey <tromey@redhat.com>
6258
6259 * Makefile.in (version.c): Use version.in, not
6260 common/version.in.
6261
257b6bec
MG
62622013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6263
6264 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6265 * configure: Rebuild.
6266 * Makefile.in (version_host, version_target): Get from configure.
6267 (version.c): Use $(version_host) and $(version_target).
6268
86ebe149
DK
62692013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6270
6271 Fix trace-status to output user name without trailing colon.
6272 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6273
f30aa5af
DK
62742013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6275
6276 Fix trace-status to output proper start-time and stop-time.
6277 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6278 output start time and stop time in hex as gdb expects.
6279
28a93511
YQ
62802013-06-26 Pedro Alves <pedro@codesourcery.com>
6281
6282 * tracepoint.c (build_traceframe_info_xml): Output trace state
6283 variables present in the trace buffer.
6284
01208463
TT
62852013-06-24 Tom Tromey <tromey@redhat.com>
6286
6287 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6288 create-version.sh.
6289 (version.o): Remove.
6290 * gdbreplay.c: Include version.h.
6291 (version, host_name): Don't declare.
6292 * server.h: Include version.h.
6293 (version, host_name): Don't declare.
6294
760256f9
PA
62952013-06-12 Pedro Alves <palves@redhat.com>
6296
6297 * linux-x86-low.c (linux_is_elf64): Delete global.
6298 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6299 with local linux_pid_exe_is_elf_64_file use.
6300
030031ee
PA
63012013-06-11 Pedro Alves <palves@redhat.com>
6302
6303 * linux-low.c (regset_disabled, disable_regset): New functions.
6304 (regsets_fetch_inferior_registers)
6305 (regsets_store_inferior_registers): Use them.
6306 (initialize_regsets_info); Don't allocate the disabled_regsets
6307 array here.
6308 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6309 comment.
6310
5da6eb0a
PA
63112013-06-11 Pedro Alves <palves@redhat.com>
6312
6313 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6314 xmalloc.
6315
7e5aaa09
PA
63162013-06-11 Pedro Alves <palves@redhat.com>
6317
6318 * linux-x86-low.c (initialize_low_arch): Call
6319 init_registers_x32_avx_linux.
6320
d878444c
JK
63212013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6322
6323 Fix compatibility with Android Bionic.
6324 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6325 it is not empty.
6326
3aee8918
PA
63272013-06-07 Pedro Alves <palves@redhat.com>
6328
5f2b57b5 6329 PR server/14823
3aee8918
PA
6330 * Makefile.in (OBS): Add tdesc.o.
6331 (IPA_OBJS): Add tdesc-ipa.o.
6332 (tdesc-ipa.o): New rule.
6333 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6334 interface.
6335 * linux-low.c (new_inferior): Delete.
6336 (disabled_regsets, num_regsets): Delete.
6337 (linux_add_process): Adjust to set the new per-process
6338 new_inferior flag.
6339 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6340 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6341 was a stop. When calling arch_setup, switch the current inferior
6342 to the thread that got an event.
6343 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6344 (regsets_fetch_inferior_registers)
6345 (regsets_store_inferior_registers): New regsets_info parameter.
6346 Adjust to use it.
6347 (linux_register_in_regsets): New regs_info parameter. Adjust to
6348 use it.
6349 (register_addr, fetch_register, store_register): New usrregs_info
6350 parameter. Adjust to use it.
6351 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6352 parameter regs_info. Adjust to use it.
6353 (linux_fetch_registers): Get the current inferior's regs_info, and
6354 adjust to use it.
6355 (linux_store_registers): Ditto.
6356 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6357 (initialize_low): Don't initialize the target_regsets here. Call
6358 initialize_low_arch.
6359 * linux-low.h (target_regsets): Delete declaration.
6360 (struct regsets_info): New.
6361 (struct usrregs_info): New.
6362 (struct regs_info): New.
6363 (struct process_info_private) <new_inferior>: New field.
6364 (struct linux_target_ops): Delete the num_regs, regmap, and
6365 regset_bitmap fields. New field regs_info.
6366 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6367 * i387-fp.c (num_xmm_registers): Delete.
6368 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6369 calls to new interface.
6370 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6371 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6372 Infer the number of xmm registers from the regcache's target
6373 description.
6374 * i387-fp.h (num_xmm_registers): Delete.
6375 * inferiors.c (add_thread): Don't install the thread's regcache
6376 here.
6377 * proc-service.c (gregset_info): Fetch the current inferior's
6378 regs_info. Adjust to use it.
6379 * regcache.c: Include tdesc.h.
6380 (register_bytes, reg_defs, num_registers)
6381 (gdbserver_expedite_regs): Delete.
6382 (get_thread_regcache): If the thread doesn't have a regcache yet,
6383 create one, instead of aborting gdbserver.
6384 (regcache_invalidate_one): Rename to ...
6385 (regcache_invalidate_thread): ... this.
6386 (regcache_invalidate_one): New.
6387 (regcache_invalidate): Only invalidate registers of the current
6388 process.
6389 (init_register_cache): Add target_desc parameter, and use it.
6390 (new_register_cache): Ditto. Assert the target description has a
6391 non zero registers_size.
6392 (regcache_cpy): Add assertions. Adjust.
6393 (realloc_register_cache, set_register_cache): Delete.
6394 (registers_to_string, registers_from_string): Adjust.
6395 (find_register_by_name, find_regno, find_register_by_number)
6396 (register_cache_size): Add target_desc parameter, and use it.
6397 (free_register_cache_thread, free_register_cache_thread_one)
6398 (regcache_release, register_cache_size): New.
6399 (register_size): Add target_desc parameter, and use it.
6400 (register_data, supply_register, supply_register_zeroed)
6401 (supply_regblock, supply_register_by_name, collect_register)
6402 (collect_register_as_string, collect_register_by_name): Adjust.
6403 * regcache.h (struct target_desc): Forward declare.
6404 (struct regcache) <tdesc>: New field.
6405 (init_register_cache, new_register_cache): Add target_desc
6406 parameter.
6407 (regcache_invalidate_thread): Declare.
6408 (regcache_invalidate_one): Delete declaration.
6409 (regcache_release): Declare.
6410 (find_register_by_number, register_cache_size, register_size)
6411 (find_regno): Add target_desc parameter.
6412 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6413 declarations.
6414 * remote-utils.c: Include tdesc.h.
6415 (outreg, prepare_resume_reply): Adjust.
6416 * server.c: Include tdesc.h.
6417 (gdbserver_xmltarget): Delete declaration.
6418 (get_features_xml, process_serial_event): Adjust.
6419 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6420 declare.
6421 (struct process_info) <tdesc>: New field.
6422 (ipa_tdesc): Declare.
6423 * tdesc.c: New file.
6424 * tdesc.h: New file.
6425 * tracepoint.c: Include tdesc.h.
6426 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6427 (get_context_regcache): Adjust to pass ipa_tdesc down.
6428 (do_action_at_tracepoint): Adjust to get the register cache size
6429 from the context regcache's description.
6430 (traceframe_walk_blocks): Adjust to get the register cache size
6431 from the current trace frame's description.
6432 (traceframe_get_pc): Adjust to get current trace frame's
6433 description and pass it down.
6434 (gdb_collect): Adjust to get the register cache size from the
6435 IPA's description.
6436 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6437 (gdbserver_xmltarget): Delete.
6438 (initialize_low_tracepoint): Set the ipa's target description.
6439 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6440 (initialize_low_tracepoint): Set the ipa's target description.
6441 * linux-x86-low.c: Include tdesc.h.
6442 [__x86_64__] (is_64bit_tdesc): New.
6443 (ps_get_thread_area, x86_get_thread_area): Use it.
6444 (i386_cannot_store_register): Rename to ...
6445 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6446 (i386_cannot_fetch_register): Rename to ...
6447 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6448 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6449 to new interface.
6450 (target_regsets): Rename to ...
6451 (x86_regsets): ... this.
6452 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6453 interface.
6454 (x86_siginfo_fixup): Use is_64bit_tdesc.
6455 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6456 (tdesc_x32_avx_linux, tdesc_x32_linux)
6457 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6458 Declare.
6459 (x86_linux_update_xmltarget): Delete.
6460 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6461 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6462 (AMD64_LINUX_USER64_CS): New.
6463 (x86_linux_read_description): New, based on
6464 x86_linux_update_xmltarget.
6465 (same_process_callback): New.
6466 (x86_arch_setup_process_callback): New.
6467 (x86_linux_update_xmltarget): New.
6468 (x86_regsets_info): New.
6469 (amd64_linux_regs_info): New.
6470 (i386_linux_usrregs_info): New.
6471 (i386_linux_regs_info): New.
6472 (x86_linux_regs_info): New.
6473 (x86_arch_setup): Reimplement.
6474 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6475 (x86_emit_ops): Ditto.
6476 (the_low_target): Adjust. Install x86_linux_regs_info,
6477 x86_cannot_fetch_register, and x86_cannot_store_register.
6478 (initialize_low_arch): New.
6479 * linux-ia64-low.c (tdesc_ia64): Declare.
6480 (ia64_fetch_register): Adjust.
6481 (ia64_usrregs_info, regs_info): New globals.
6482 (ia64_regs_info): New function.
6483 (the_low_target): Adjust.
6484 (initialize_low_arch): New function.
6485 * linux-sparc-low.c (tdesc_sparc64): Declare.
6486 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6487 Adjust.
6488 (sparc_arch_setup): New function.
6489 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6490 (the_low_target): Adjust.
6491 (initialize_low_arch): New function.
6492 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6493 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6494 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6495 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6496 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6497 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6498 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6499 (tdesc_powerpc_isa205_vsx64l): Declare.
6500 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6501 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6502 (ppc_set_pc, ppc_get_hwcap): Adjust.
6503 (ppc_usrregs_info): Forward declare.
6504 (!__powerpc64__) ppc_regmap_adjusted: New global.
6505 (ppc_arch_setup): Adjust to the current process'es target
6506 description.
6507 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6508 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6509 (ppc_store_evrregset): Adjust.
6510 (target_regsets): Rename to ...
6511 (ppc_regsets): ... this, and make static.
6512 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6513 (ppc_regs_info): New function.
6514 (the_low_target): Adjust.
6515 (initialize_low_arch): New function.
6516 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6517 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6518 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6519 (tdesc_s390x_linux64v2): Declare.
6520 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6521 (s390_fill_gregset, s390_store_last_break): Adjust.
6522 (target_regsets): Rename to ...
6523 (s390_regsets): ... this, and make static.
6524 (s390_get_pc, s390_set_pc): Adjust.
6525 (s390_get_hwcap): New target_desc parameter, and use it.
6526 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6527 (s390_arch_setup): Adjust to set the current process'es target
6528 description. Don't adjust the regmap.
6529 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6530 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6531 (regs_info_3264): New globals.
6532 (s390_regs_info): New function.
6533 (the_low_target): Adjust.
6534 (initialize_low_arch): New function.
6535 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6536 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6537 [__mips64] (init_registers_mips_linux)
6538 (init_registers_mips_dsp_linux): Delete defines.
6539 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6540 (have_dsp): New global.
6541 (mips_read_description): New, based on mips_arch_setup.
6542 (mips_arch_setup): Reimplement.
6543 (get_usrregs_info): New function.
6544 (mips_cannot_fetch_register, mips_cannot_store_register)
6545 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6546 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6547 (target_regsets): Rename to ...
6548 (mips_regsets): ... this, and make static.
6549 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6550 (dsp_regs_info, regs_info): New globals.
6551 (mips_regs_info): New function.
6552 (the_low_target): Adjust.
6553 (initialize_low_arch): New function.
6554 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6555 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6556 Declare.
6557 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6558 (arm_read_description): New, with bits factored from
6559 arm_arch_setup.
6560 (arm_arch_setup): Reimplement.
6561 (target_regsets): Rename to ...
6562 (arm_regsets): ... this, and make static.
6563 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6564 (arm_regs_info): New function.
6565 (the_low_target): Adjust.
6566 (initialize_low_arch): New function.
6567 * linux-m68k-low.c (tdesc_m68k): Declare.
6568 (target_regsets): Rename to ...
6569 (m68k_regsets): ... this, and make static.
6570 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6571 (m68k_regs_info): New function.
6572 (m68k_arch_setup): New function.
6573 (the_low_target): Adjust.
6574 (initialize_low_arch): New function.
6575 * linux-sh-low.c (tdesc_sharch): Declare.
6576 (target_regsets): Rename to ...
6577 (sh_regsets): ... this, and make static.
6578 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6579 (sh_regs_info, sh_arch_setup): New functions.
6580 (the_low_target): Adjust.
6581 (initialize_low_arch): New function.
6582 * linux-bfin-low.c (tdesc_bfin): Declare.
6583 (bfin_arch_setup): New function.
6584 (bfin_usrregs_info, regs_info): New globals.
6585 (bfin_regs_info): New function.
6586 (the_low_target): Adjust.
6587 (initialize_low_arch): New function.
6588 * linux-cris-low.c (tdesc_cris): Declare.
6589 (cris_arch_setup): New function.
6590 (cris_usrregs_info, regs_info): New globals.
6591 (cris_regs_info): New function.
6592 (the_low_target): Adjust.
6593 (initialize_low_arch): New function.
6594 * linux-cris-low.c (tdesc_crisv32): Declare.
6595 (cris_arch_setup): New function.
6596 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6597 (cris_regs_info): New function.
6598 (the_low_target): Adjust.
6599 (initialize_low_arch): New function.
6600 * linux-m32r-low.c (tdesc_m32r): Declare.
6601 (m32r_arch_setup): New function.
6602 (m32r_usrregs_info, regs_info): New globals.
6603 (m32r_regs_info): Adjust.
6604 (initialize_low_arch): New function.
6605 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6606 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6607 (tic6x_usrregs_info): Forward declare.
6608 (tic6x_read_description): New function, based on ...
6609 (tic6x_arch_setup): ... this. Reimplement.
6610 (target_regsets): Rename to ...
6611 (tic6x_regsets): ... this, and make static.
6612 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6613 (tic6x_regs_info): New function.
6614 (the_low_target): Adjust.
6615 (initialize_low_arch): New function.
6616 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6617 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6618 (target_regsets): Rename to ...
6619 (xtensa_regsets): ... this, and make static.
6620 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6621 globals.
6622 (xtensa_arch_setup, xtensa_regs_info): New functions.
6623 (the_low_target): Adjust.
6624 (initialize_low_arch): New function.
6625 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6626 (nios2_arch_setup): Set the current process'es tdesc.
6627 (target_regsets): Rename to ...
6628 (nios2_regsets): ... this.
6629 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6630 (nios2_regs_info): New function.
6631 (the_low_target): Adjust.
6632 (initialize_low_arch): New function.
a261b8f5
PA
6633 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6634 (aarch64_arch_setup): Set the current process'es tdesc.
6635 (target_regsets): Rename to ...
6636 (aarch64_regsets): ... this.
6637 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6638 (aarch64_regs_info): New function.
6639 (the_low_target): Adjust.
6640 (initialize_low_arch): New function.
3aee8918
PA
6641 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6642 globals.
6643 (target_regsets): Rename to ...
6644 (tile_regsets): ... this.
6645 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6646 (tile_regs_info): New function.
6647 (tile_arch_setup): Set the current process'es tdesc.
6648 (the_low_target): Adjust.
6649 (initialize_low_arch): New function.
6650 * spu-low.c (tdesc_spu): Declare.
6651 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6652 * win32-arm-low.c (tdesc_arm): Declare.
6653 (arm_arch_setup): New function.
6654 (the_low_target): Install arm_arch_setup instead of
6655 init_registers_arm.
6656 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6657 (init_windows_x86): Rename to ...
6658 (i386_arch_setup): ... this. Set `win32_tdesc'.
6659 (the_low_target): Adjust.
6660 * win32-low.c (win32_tdesc): New global.
6661 (child_add_thread): Don't create the thread cache here.
6662 (do_initial_child_stuff): Set the new process'es tdesc.
6663 * win32-low.h (struct target_desc): Forward declare.
6664 (win32_tdesc): Declare.
6665 * lynx-i386-low.c (tdesc_i386): Declare global.
6666 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6667 * lynx-low.c (lynx_tdesc): New global.
6668 (lynx_add_process): Set the new process'es tdesc.
6669 * lynx-low.h (struct target_desc): Forward declare.
6670 (lynx_tdesc): Declare global.
6671 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6672 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6673 * nto-low.c (nto_tdesc): New global.
6674 (do_attach): Set the new process'es tdesc.
6675 * nto-low.h (struct target_desc): Forward declare.
6676 (nto_tdesc): Declare.
6677 * nto-x86-low.c (tdesc_i386): Declare.
6678 (nto_x86_arch_setup): Set `nto_tdesc'.
6679
b1fbec62
GB
66802013-06-04 Gary Benson <gbenson@redhat.com>
6681
6682 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6683 to qSupported response when appropriate.
6684 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6685 with nonzero-length annex.
6686 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6687 arguments supplied in annex.
6688
d1ec4ce7
DE
66892013-05-31 Doug Evans <dje@google.com>
6690
ac44adcb 6691 PR server/15594
d1ec4ce7
DE
6692 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6693 64 bits in 64-cross-32 environment.
6694
9b25f2d3
PA
66952013-05-28 Pedro Alves <palves@redhat.com>
6696
6697 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6698 (aarch64-without-fpu.c): Delete rule.
6699 * configure.srv (aarch64*-*-linux*): Remove references to
6700 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6701 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6702 declaration.
6703
6740dc9c
PA
67042013-05-24 Pedro Alves <palves@redhat.com>
6705
6706 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6707 instead of strchr/decode_address. Error if the range isn't split
6708 with a ','. Don't assume there's be a ':' in the action.
6709
c2d6af84
PA
67102013-05-23 Yao Qi <yao@codesourcery.com>
6711 Pedro Alves <palves@redhat.com>
6712
6713 * linux-low.c (lwp_in_step_range): New function.
6714 (linux_wait_1): If the thread was range stepping and stopped
6715 outside the stepping range, report the stop to GDB. Otherwise,
6716 continue stepping. Add range stepping debug output.
6717 (linux_set_resume_request): Copy the step range from the resume
6718 request to the lwp.
6719 (linux_supports_range_stepping): New.
6720 (linux_target_ops) <supports_range_stepping>: Set to
6721 linux_supports_range_stepping.
6722 * linux-low.h (struct linux_target_ops)
6723 <supports_range_stepping>: New field.
6724 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6725 * linux-x86-low.c (x86_supports_range_stepping): New.
6726 (the_low_target) <supports_range_stepping>: Set to
6727 x86_supports_range_stepping.
6728 * server.c (handle_v_cont): Handle 'r' action.
6729 (handle_v_requests): Append ";r" if the target supports range
6730 stepping.
6731 * target.h (struct thread_resume) <step_range_start,
6732 step_range_end>: New fields.
6733 (struct target_ops) <supports_range_stepping>:
6734 New field.
6735 (target_supports_range_stepping): New macro.
6736
58794e1a
JB
67372013-05-17 Joel Brobecker <brobecker@adacore.com>
6738
6739 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6740 confusion in comment.
6741
d631c5a7
JB
67422013-05-17 Joel Brobecker <brobecker@adacore.com>
6743
6744 * lynx-low.c (struct process_info_private): New type.
6745 (lynx_add_process): New function.
6746 (lynx_create_inferior, lynx_attach): Replace calls to
6747 add_process by calls to lynx_add_process.
6748 (lynx_resume): If PTID is null, then try using
6749 current_process()->private->last_wait_event_ptid.
6750 Add comments.
6751 (lynx_clear_inferiors): Delete. The contents of that function
6752 has been inlined in lynx_mourn;
6753 (lynx_wait_1): Save the ptid in the process's private data.
6754 (lynx_mourn): Free the process' private data. Replace call
6755 to lynx_clear_inferiors by call to clear_inferiors.
6756
96f7a20f
YQ
67572013-05-17 Yao Qi <yao@codesourcery.com>
6758
6759 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6760 the right place.
6761
db0dfaa0
LM
67622013-05-16 Luis Machado <lgustavo@codesourcery.com>
6763
6764 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6765 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6766 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6767 PT_TEXT_END_ADDR guards. Update comments.
6768 (linux_target_op) <read_offsets>: Conditionally define to
6769 linux_read_offsets if the target is UCLIBC and if it defines
6770 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6771
68f5f838
SL
67722013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6773 Andrew Jenner <andrew@codesourcery.com>
6774
6775 * Makefile.in (SFILES): Add linux-nios2-low.c.
6776 (clean): Add action to delete nios2-linux.c.
6777 (nios2-linux.c): New rule.
6778 * configure.srv: Add nios2*-*-linux*.
6779 * linux-nios2-low.c: New.
6780
1ebff1fd
HAQ
67812013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6782
6783 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6784
f6150862
HZ
67852013-04-25 Hui Zhu <hui@codesourcery.com>
6786
6787 PR gdb/15186
f6150862
HZ
6788 * ax.c (ax_printf): Add fflush.
6789
614c279d
TT
67902013-04-22 Tom Tromey <tromey@redhat.com>
6791
6792 * Makefile.in (SFILES): Add filestuff.c.
6793 (OBS): Add filestuff.o.
6794 (filestuff.o): New target.
6795 * config.in, configure: Rebuild.
6796 * configure.ac: Check for fdwalk, pipe2.
6797
7d4e5717
PA
67982013-04-17 Pedro Alves <palves@redhat.com>
6799
6800 * configure.ac (USE_THREAD_DB): Delete variable.
6801 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6802 Don't AC_SUBST USE_THREAD_DB.
6803 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6804 * config.in, configure: Regenerate.
6805
d5c93e41
PA
68062013-04-16 Pedro Alves <palves@redhat.com>
6807
6808 * linux-low.h (struct lwp_info) <thread_known>: Move under
6809 the USE_THREAD_DB #ifdef.
6810
04f5fe89
PA
68112013-04-16 Pedro Alves <palves@redhat.com>
6812
6813 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6814 (linux-low.o): Delete rule.
6815 * linux-low.h: Always include "gdb_thread_db.h" instead of
6816 conditionally including thread_db.h.
6817 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6818 HAVE_THREAD_DB_H.
6819
480b27bf
JK
68202013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6821
6822 * Makefile.in (install-only): Fix make install regression.
6823
43662968
JK
68242013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6825
6826 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6827 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6828 installation.
6829 * gdbserver.1: Remove.
6830
3e74e146
PA
68312013-03-22 Pedro Alves <palves@redhat.com>
6832
6833 * linux-low.c (handle_extended_wait): Don't call
6834 linux_enable_event_reporting.
6835
a8347a2a
TT
68362013-03-15 Tony Theodore <tonyt@logyst.com>
6837
6838 PR build/9098:
6839 * Makefile.in (SHELL): Use @SHELL@.
6840
eeb56fa7
SDJ
68412013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6842
6843 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6844 compiler warning.
6845
4fa7e2ff
JB
68462013-03-13 Joel Brobecker <brobecker@adacore.com>
6847
6848 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6849 Remove extraneous NULL element.
6850
8ddb1965
YQ
68512013-03-13 Yao Qi <yao@codesourcery.com>
6852
6853 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6854 'V' block in trace frame.
6855
9accd112
MM
68562013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6857
6858 * target.h (struct target_ops): Add btrace ops.
6859 (target_supports_btrace): New macro.
6860 (target_enable_btrace): New macro.
6861 (target_disable_btrace): New macro.
6862 (target_read_btrace): New macro.
6863 * gdbthread.h (struct thread_info): Add btrace field.
6864 * server.c: Include btrace-common.h.
6865 (handle_btrace_general_set): New function.
6866 (handle_btrace_enable): New function.
6867 (handle_btrace_disable): New function.
6868 (handle_general_set): Call handle_btrace_general_set.
6869 (handle_qxfer_btrace): New function.
6870 (struct qxfer qxfer_packets[]): Add btrace entry.
6871 * inferiors.c (remove_thread): Disable btrace.
6872 * linux-low: Include linux-btrace.h.
6873 (linux_low_enable_btrace): New function.
6874 (linux_low_read_btrace): New function.
6875 (linux_target_ops): Add btrace ops.
6876 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6877 Add srv_linux_btrace=yes.
6878 (x86_64-*-linux*): Add linux-btrace.o.
6879 Add srv_linux_btrace=yes.
6880 * configure.ac: Define HAVE_LINUX_BTRACE.
6881 * config.in: Regenerated.
6882 * configure: Regenerated.
6883
5cc22e4c
MM
68842013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6885
6886 * server.c (handle_qxfer): Preserve error message if -3 is
6887 returned.
6888 (qxfer): Document the -3 return value.
6889
7c97f91e
MM
68902013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6891
6892 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6893 (linux_btrace_h): New variable.
6894 (linux-btrace.o): New rule.
6895
be9a119c 68962013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
6897 Hafiz Abid Qadeer <abidh@codesourcery.com>
6898
6899 * tracepoint.c (trace_buffer_size): New global.
6900 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6901 (init_trace_buffer): Change to one-argument function. Allocate
6902 trace buffer memory.
6903 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6904 handle QTBuffer:size packet.
6905 (cmd_bigqtbuffer_size): New function.
6906 (initialize_tracepoint): Call init_trace_buffer with
6907 DEFAULT_TRACE_BUFFER_SIZE.
6908 * server.c (handle_query): Add QTBuffer:size in the
6909 supported packets.
6910
e64f7499
YQ
69112013-03-07 Yao Qi <yao@codesourcery.com>
6912
6913 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6914 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6915 of -1.
6916 (cmd_qtsp): Adjust condition. Do post increment.
6917 Set cur_action and cur_step_action back to 0.
6918
f0ae6fc3
PA
69192013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6920
6921 PR server/15236
6922 * linux-low.c (linux_write_memory): Return early success if LEN is
6923 zero.
6924
b5b0b0af
CV
69252013-03-05 Corinna Vinschen <vinschen@redhat.de>
6926
334ad4a8 6927 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 6928
589bc927
TT
69292013-02-28 Tom Tromey <tromey@redhat.com>
6930
6931 * configure.ac: Invoke AC_SYS_LARGEFILE.
6932 * configure, config.in: Rebuild.
6933
dfe07582
CV
69342013-02-28 Corinna Vinschen <vinschen@redhat.com>
6935
6936 * win32-low.c: Throughout, fix format strings and casts of
6937 printf-like functions to avoid type related warnings on all
6938 platforms.
6939 (get_child_debug_event): Print dwDebugEventCode as hex since
6940 that's how it's usually documented.
6941
736cd585
YQ
69422013-02-28 Yao Qi <yao@codesourcery.com>
6943
6944 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6945 pulongest.
6946
e1f58301
JW
69472013-02-27 Jiong Wang <jiwang@tilera.com>
6948
6949 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6950 (reg-tilegx32.c): New rule.
6951 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6952 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6953 different register info initializer according to elf class.
6954 (init_registers_tilgx32): New function. The tilegx32 register info
6955 initializer.
6956 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6957 (tile_store_gregset): Likewise.
6958
d171ca78
YQ
69592013-02-27 Yao Qi <yao@codesourcery.com>
6960
6961 * server.c (process_point_options): Print debug message when
6962 debug_threads is true.
6963
282bbdf3
YQ
69642013-02-26 Yao Qi <yao@codesourcery.com>
6965
6966 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6967
aca22551
PA
69682013-02-19 Pedro Alves <palves@redhat.com>
6969 Kai Tietz <ktietz@redhat.com>
6970
6971 PR gdb/15161
6972
6973 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6974 instead of strtoul to extract address from packet.
6975 (process_serial_event) <'z'>: Likewise.
6976
4f3cee1c
YQ
69772013-02-18 Yao Qi <yao@codesourcery.com>
6978
6979 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6980
8e1d55a3
PA
69812013-02-14 Pedro Alves <palves@redhat.com>
6982
6983 Plug memory leak.
6984
6985 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6986 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6987
458820da
PA
69882013-02-14 Pedro Alves <palves@redhat.com>
6989
6990 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6991
baea0dae
PA
69922013-02-14 Pedro Alves <palves@redhat.com>
6993
6994 * tracepoint.c (save_string): Delete.
6995 (add_tracepoint_action): Use savestring instead of save_string.
6996
0b1afbb3
PA
69972013-02-12 Pedro Alves <palves@redhat.com>
6998
6999 * linux-xtensa-low.c: Ditto.
7000 * xtensa-xtregs.c: Ditto.
7001
8a4ac37e
PA
70022013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7003
7004 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7005 thread_db.
7006
148de6bb
MS
70072013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7008
7009 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7010 aarch64_num_wp_regs and aarch64_num_bp_regs to
7011 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7012
55fac6e0
MS
70132013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7014
7015 * linux-aarch64-low.c (ps_get_thread_area): Replace
7016 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7017
176eb98c
MS
70182013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7019 Marcus Shawcroft <marcus.shawcroft@arm.com>
7020 Nigel Stephens <nigel.stephens@arm.com>
7021 Yufeng Zhang <yufeng.zhang@arm.com>
7022
7023 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7024 (aarch64.c, aarch64-without-fpu.c): New targets.
7025 * configure.srv (aarch64*-*-linux*): New.
7026 * linux-aarch64-low.c: New file.
7027
56f7af9c
MS
70282013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7029
43aaf8b6 7030 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7031 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7032 (dequeue_one_deferred_signal, linux_resume_one_thread)
7033 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7034 (linux_tracefork_grandchild, linux_test_for_tracefork)
7035 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7036 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7037 where the argument is 0.
7038
60f662b0
YQ
70392013-01-25 Yao Qi <yao@codesourcery.com>
7040
7041 * event-loop.c: Include "queue.h".
7042 (gdb_event_p): New typedef.
7043 (struct gdb_event) <next_event>: Remove.
7044 (event_queue): Change to QUEUE(gdb_event_p).
7045 (async_queue_event): Remove.
7046 (gdb_event_xfree): New.
7047 (initialize_event_loop): New.
7048 (process_event): Use API from QUEUE.
7049 (wait_for_event): Likewise.
7050 * server.c (main): Call initialize_event_loop.
7051 * server.h (initialize_event_loop): Declare.
7052
5ae4861a
YQ
70532013-01-18 Yao Qi <yao@codesourcery.com>
7054
7055 * ax.h (struct eval_agent_expr_context): New.
7056 (gdb_eval_agent_expr): Update declaration.
7057 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7058 TFRAME. Add new argument CTX.
7059 * server.h (struct eval_agent_expr_context): Declare.
7060 (agent_mem_read, agent_tsv_read): Update declaration.
7061 (agent_mem_read_string): Likewise.
7062 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7063 (add_traceframe_block): Add new argument TPOINT.
7064 Increase TPOINT->traceframe_usage.
7065 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7066 eval_tracepoint_agent_expr.
7067 (condition_true_at_tracepoint): Likewise.
7068 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7069 (agent_mem_read_string, agent_tsv_read): Likewise.
7070
85e00e85
YQ
70712013-01-16 Yao Qi <yao@codesourcery.com>
7072
7073 * linux-low.c (linux_resume_one_lwp): Don't check
7074 'lwp->bp_reinsert != 0'.
7075
4039cf45
JB
70762013-01-07 Joel Brobecker <brobecker@adacore.com>
7077 Pedro Alves <palves@redhat.com>
7078
7079 * lynx-low.c (ptrace_request_to_str): Define a temporary
7080 macro and use it to simplify this function's implementation.
7081
9044dee2
JB
70822013-01-07 Joel Brobecker <brobecker@adacore.com>
7083
7084 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7085 sets errno.
7086
e6352c8f
JB
70872013-01-07 Joel Brobecker <brobecker@adacore.com>
7088
7089 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7090
50681a27
JB
70912013-01-07 Joel Brobecker <brobecker@adacore.com>
7092
7093 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7094
3f6e77ef
JB
70952013-01-07 Joel Brobecker <brobecker@adacore.com>
7096
7097 * lynx-low.c (lynx_resume): Use the resume_info parameter
7098 to determine the ptid for the lynx_ptrace call, unless
7099 it is equal to minus_one_ptid, in which case we use the
7100 ptid of the current_inferior.
7101 (lynx_wait_1): After having received a thread create/exit
7102 event, resume the inferior's execution using the signaling
7103 thread's ptid, rather than the old ptid.
7104
7fda33ae
JB
71052013-01-07 Joel Brobecker <brobecker@adacore.com>
7106
7107 * lynx-low.c (lynx_resume): Delete variable ret.
7108
b9786c74
JB
71092013-01-01 Joel Brobecker <brobecker@adacore.com>
7110
7111 * gdbreplay.c (gdbreplay_version): Update copyright year.
7112 * server.c (gdbserver_version): Likewise.
7113
8b93d60f
JB
71142012-12-17 Joel Brobecker <brobecker@adacore.com>
7115
7116 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7117 new thread.
7118
037335a7
JB
71192012-12-17 Joel Brobecker <brobecker@adacore.com>
7120
7121 * lynx-low.c (ptrace_request_to_str): Add handling for
7122 PTRACE_GETTRACESIG.
7123
52d4cbd8
JB
71242012-12-17 Joel Brobecker <brobecker@adacore.com>
7125
7126 * lynx-low.c (lynx_attach): Delete variable new_process.
7127
ab8f6ca9
JB
71282012-12-17 Joel Brobecker <brobecker@adacore.com>
7129
7130 * lynx-low.c (lynx_create_inferior): Delete variable
7131 new_process.
7132
78cbc024
JB
71332012-12-17 Joel Brobecker <brobecker@adacore.com>
7134
7135 * lynx-low.c (ptrace_request_to_str): Do not handle
7136 PTRACE_GETTHREADLIST if this macro does not exist.
7137
14a00470
YQ
71382012-12-15 Yao Qi <yao@codesourcery.com>
7139
7140 * Makefile.in (OBS): Add notif.o.
7141 * notif.c, notif.h: New.
7142 * server.c: Include "notif.h".
7143 (struct vstop_notif) <next>: Remove.
7144 <base>: New field.
7145 (queue_stop_reply): Update.
7146 (push_event, send_next_stop_reply): Remove.
7147 (discard_queued_stop_replies): Update.
7148 (notif_stop): New variable.
7149 (handle_v_stopped): Remove.
7150 (handle_v_requests): Don't call handle_v_stopped. Call
7151 handle_ack_notif instead.
7152 (queue_stop_reply_callback): Call notif_event_enque instead
7153 of queue_stop_reply.
7154 (handle_status): Don't call send_next_stop_reply, call
7155 notif_write_event instead.
7156 (kill_inferior_callback): Likewise.
7157 (detach_or_kill_inferior_callback): Likewise.
7158 (main): Call initialize_notif.
7159 (process_serial_event): Call QUEUE_is_empty.
7160 (handle_target_event): Call notif_push instead of push event.
7161 * server.h (push_event): Remove declaration.
7162
61c125b9
TT
71632012-12-10 Tom Tromey <tromey@redhat.com>
7164
7165 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7166 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7167 macros.
7168 (.c.o): Rewrite.
7169 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7170 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7171 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7172 (amd64-linux-ipa.o, ax.o): Rewrite.
7173 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7174 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7175 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7176 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7177 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7178 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7179 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7180 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7181 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7182 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7183 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7184 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7185 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7186 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7187 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7188 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7189 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7190 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7191 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7192 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7193 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7194 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7195 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7196 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7197 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7198 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7199 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7200 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7201 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7202 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7203 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7204 (reg-tilegx.o): Remove.
7205 (all_object_files): New macro.
7206 Include .deps files.
7207 * aclocal.m4, configure: Rebuild.
7208 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7209 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7210 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7211
e90e9ad9
TT
72122012-12-05 Tom Tromey <tromey@redhat.com>
7213
7214 PR gdb/14917:
7215 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7216
02d403bf 72172012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
7218
7219 * configure.ac: Check for linux/perf_event.h.
7220 * config.in: Regenerated.
7221 * configure: Regenerated.
7222
0270a750
PA
72232012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7224
7225 * hostio.c (handle_readlink): Decrease buffer size
7226 parameter passed to readlink by one byte.
7227
8c29b58e
YQ
72282012-11-26 Yao Qi <yao@codesourcery.com>
7229
7230 * configure.ac (build_warnings): Append '-Wempty-body'.
7231 * configure: Regenerated.
7232 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7233 body.
7234
8bdce1ff
PM
72352012-11-15 Pierre Muller <muller@sourceware.org>
7236
7237 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7238 * config.in: Regenerate.
7239 * configure: Regenerate.
7240 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7241 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7242 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7243 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7244 header.
7245 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7246 instead of <sys/wait.h> header.
7247 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7248
02d403bf 72492012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
7250
7251 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7252 (various make rules): Remove -DGDBSERVER
7253
fbd5db48
YQ
72542012-11-09 Yao Qi <yao@codesourcery.com>
7255
7256 * spu-low.c (current_ptid): Move it to ..
7257 * gdbthread.h: ... here. New.
7258 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7259 * server.c (myresume, process_serial_event): Likewise.
7260 * thread-db.c (thread_db_find_new_threads): Likewise.
7261 * tracepoint.c (run_inferior_command): Likewise.
7262
b3dc46ff
AB
72632012-10-01 Andrew Burgess <aburgess@broadcom.com>
7264
7265 * server.c (handle_search_memory_1): Include access length in
7266 warning message.
7267
07c04788
HPN
72682012-09-05 Michael Brandt <michael.brandt@axis.com>
7269
7270 * linux-crisv32-low.c: Fix compile errors.
7271
918d227b
YQ
72722012-09-04 Yao Qi <yao@codesourcery.com>
7273
7274 * tracepoint.c (cmd_qtsv): Adjust debug message.
7275 Don't check CUR_TPOINT.
7276
18c1b81a
YQ
72772012-08-28 Yao Qi <yao@codesourcery.com>
7278
7279 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7280 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7281 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7282 Remove declarations of xmalloc, xreallloc, xstrdup and
7283 freeargv.
7284 * Makefile.in (libiberty_h): New.
7285 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7286 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7287
dc82f37b
YQ
72882012-08-23 Yao Qi <yao@codesourcery.com>
7289
7290 * server.h: Remove declaration of 'xsnprintf'.
7291
406b1477
KS
72922012-08-22 Keith Seitz <keiths@redhat.com>
7293
7294 * server.h: Include build-gnulib-gbserver/config.h.
7295 * gdbreplay.c: Likewise.
7296
e6712ff1
DE
72972012-08-08 Doug Evans <dje@google.com>
7298
7299 * Makefile.in (SFILES): Add gdb_vecs.c.
7300 (OBS): Add gdb_vecs.o.
7301 (gdb_vecs_h, host_defs_h): New variables.
7302 (thread-db.o): Add $(gdb_vecs_h) dependency.
7303 (gdb_vecs.o): New rule.
7304 * thread-db.c: #include "gdb_vecs.h".
7305 (thread_db_load_search): Use a vector to iterate over path elements.
7306 Handle text appearing after "$pdir".
7307
7308 * configure.ac: Add check for strstr.
7309 * config.in: Regenerate.
7310 * configure: Regenerate.
7311
7c3270ae
UW
73122012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7313
7314 * hostio.c (handle_pread): If pread fails, fall back to attempting
7315 lseek/read.
7316 (handle_pwrite): Likewise for pwrite.
7317
b62e2b27
UW
73182012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7319
7320 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7321 between unsupported TYPE and unimplementable ADDR/LEN combination.
7322 (arm_insert_point): Act on new return value.
7323
78a99e91
PA
73242012-07-31 Pedro Alves <palves@redhat.com>
7325
7326 * server.c (process_point_options): Only skip tokens if we find
7327 one that is unrecognized. Don't treat 'X' specially while
7328 skipping unrecognized tokens.
7329
fcf303ab
UW
73302012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7331
7332 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7333 to 4-byte-align HW breakpoint addresses for Thumb.
7334
7255706c
YQ
73352012-07-27 Yao Qi <yao@codesourcery.com>
7336
7337 PR remote/14161.
7338
7339 * server.h: Declare gdb_agent_about_to_close.
7340 * target.c (kill_inferior): Include "agent.h".
7341 New. Send command 'kill'.
7342 * target.h (kill_inferior): Removed macro.
7343 * tracepoint.c (gdb_agent_about_to_close): New.
7344 (gdb_agent_helper_thread): Handle command 'close'.
7345 Wait endlessly until the inferior stops.
7346 Install gdb_agent_remove_socket to atexit hook.
7347 (agent_socket_name): New static variable.
7348 (gdb_agent_socket_init): Replace local variable 'name' with
7349 'agent_socket_name'.
7350 (gdb_agent_remove_socket): New.
7351
5a3f286f
YQ
73522012-07-27 Yao Qi <yao@codesourcery.com>
7353
7354 * server.c (process_point_options): Stop at 'X' when parsing.
7355
961bd387
ME
73562012-07-19 Michael Eager <eager@eagercon.com>
7357
a261b8f5 7358 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
7359 to hw_execute.
7360 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7361 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7362 hardware breakpoint.
7363
aa7c7447
JK
73642012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7365
7366 * gdbserver/linux-low.c (initialize_low): Call
7367 linux_ptrace_init_warnings.
7368
7f216e7c
DE
73692012-07-02 Doug Evans <dje@google.com>
7370
7371 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7372 pointer to int.
7373
d3ce09f5
SS
73742012-07-02 Stan Shebs <stan@codesourcery.com>
7375
7376 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7377 (ax.o): Add it to build rule.
7378 (ax-ipa.o): Ditto.
7379 (OBS): Add format.o.
7380 (IPA_OBS): Add format.o.
7381 * server.c (handle_query): Claim support for breakpoint commands.
7382 (process_point_options): Add command case.
7383 (process_serial_event): Leave running if there are printfs in
7384 effect.
7385 * mem-break.h (any_persistent_commands): Declare.
7386 (add_breakpoint_commands): Declare.
7387 (gdb_no_commands_at_breakpoint): Declare.
7388 (run_breakpoint_commands): Declare.
7389 * mem-break.c (struct point_command_list): New struct.
7390 (struct breakpoint): New field command_list.
7391 (any_persistent_commands): New function.
7392 (add_commands_to_breakpoint): New function.
7393 (add_breakpoint_commands): New function.
7394 (gdb_no_commands_at_breakpoint): New function.
7395 (run_breakpoint_commands): New function.
7396 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7397 locally.
7398 * ax.c: Include format.h.
7399 (ax_printf): New function.
7400 (gdb_eval_agent_expr): Add printf opcode.
7401
2f8f6aed
YQ
74022012-06-13 Yao Qi <yao@codesourcery.com>
7403
7404 * server.c (start_inferior): Remove duplicated writes to fields
7405 'last_resume_kind' and 'last_status' of 'current_inferior'.
7406
0c9070b3
YQ
74072012-06-12 Yao Qi <yao@codesourcery.com>
7408 Pedro Alves <palves@redhat.com>
7409
7410 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7411 comment.
7412 * server.c (handle_v_cont): Extend comment.
7413
c52daf70
YQ
74142012-06-11 Yao Qi <yao@codesourcery.com>
7415
7416 * linux-low.c (linux_attach): Add 'static'.
7417
d38bbb0a
YQ
74182012-06-06 Yao Qi <yao@codesourcery.com>
7419
7420 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7421
89dc0afd
JK
74222012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7423
7424 Fix gcc -flto compilation warning.
7425 * server.c (main): Make variable multi_mode and attach volatile.
7426
75f62ce7
TJB
74272012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7428
7429 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7430 if the platform doesn't know about it.
7431
65f479b6
PA
74322012-05-30 Jeff Kenton <jkenton@tilera.com>
7433
7434 * Makefile.in (SFILES): Add linux-tile-low.c.
7435 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7436 * configure.srv: Handle tilegx-*-linux*.
7437 * linux-tile-low.c: New file.
7438
0c5bf5a9
JK
74392012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7440
7441 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7442
a493e3e2
PA
74432012-05-24 Pedro Alves <palves@redhat.com>
7444
7445 PR gdb/7205
7446
43aaf8b6 7447 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 7448
2ea28649
PA
74492012-05-24 Pedro Alves <palves@redhat.com>
7450
7451 PR gdb/7205
7452
7453 Replace target_signal with gdb_signal throughout.
7454
8d409d16
MR
74552012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7456
7457 * linux-low.c (linux_store_registers): Avoid the copying sequence
7458 when no data has been retrieved by ptrace.
7459
23512c01
MGD
74602012-05-22 Will Deacon <will.deacon@arm.com>
7461
7462 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7463 Include asm/ptrace.h.
7464 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7465 already defined.
7466
4934b29e
MR
74672012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7468
7469 * linux-low.c (linux_store_registers): Don't re-retrieve data
7470 with ptrace that has already been obtained from /proc. Always
7471 copy any data retrieved with ptrace to the buffer supplied.
7472
bde24c0a
PA
74732012-05-11 Yao Qi <yao@codesourcery.com>
7474 Pedro Alves <palves@redhat.com>
7475
7476 * linux-low.c (enum stopping_threads_kind): New.
7477 (stopping_threads): Change type to `enum stopping_threads_kind'.
7478 (handle_extended_wait): If stopping and suspending threads, leave
7479 the new_lwp suspended too.
7480 (linux_wait_for_event): Adjust.
7481 (stop_all_lwps): Set `stopping_threads' to
7482 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7483 whether we're suspending threads or just stopping them. Assert no
7484 recursion happens.
7485
623b6bdf
YQ
74862012-04-29 Yao Qi <yao@codesourcery.com>
7487
7488 * server.h: Move some code to ...
7489 * gdbthread.h: ... here. New.
7490 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7491 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7492 (nto-low.o, win32-low.o): Likewise.
7493 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7494 * regcache.c, remote-utils.c, server.c: Likewise.
7495 * target.c, tracepoint.c, win32-low.c: Likewise.
7496
f15f9948
TJB
74972012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7498
7499 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7500 (PTRACE_ARG4_TYPE): Likewise.
7501 (PTRACE_XFER_TYPE): Likewise.
7502 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7503 ptrace to PTRACE_ARG3_TYPE.
7504 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7505 (PTRACE_ARG4_TYPE): Likewise.
7506 (PTRACE_XFER_TYPE): Likewise.
7507 (linux_detach_one_lwp): Cast fourth argument of
7508 ptrace to long then PTRACE_ARG4_TYPE.
7509 (regsets_fetch_inferior_registers): Cast third argument of
7510 ptrace to long then PTRACE_ARG3_TYPE.
7511 (regsets_store_inferior_registers): Likewise.
7512
38ea300a
PA
75132012-04-20 Pedro Alves <palves@redhat.com>
7514
7515 * configure: Regenerate.
7516
c971b7fa
PA
75172012-04-19 Pedro Alves <palves@redhat.com>
7518
43aaf8b6 7519 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 7520 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
7521 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7522 (all, install-only, uninstall, clean-info, all-lib, clean): No
7523 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7524 (maintainer-clean realclean distclean): Use subdir_do.
7525 (subdir_do): New.
7526 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 7527 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
7528 * acinclude.m4: Include acx_configure_dir.m4.
7529 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7530 calls. Call AC_PROG_RANLIB. Configure gnulib using
7531 ACX_CONFIGURE_DIR.
7532 (GNULIB): New.
7533 (GNULIB_STDINT_H): Adjust.
7534 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7535 * gdbreplay.c: Include build-gnulib/config.h.
7536 * server.h: Likewise.
7537 * aclocal.m4: Regenerate.
7538 * config.in: Regenerate.
7539 * configure: Regenerate.
c971b7fa 7540
809277f8
PA
75412012-04-19 Pedro Alves <palves@redhat.com>
7542
7543 * Makefile.in (LIBGNU, INCGNU): Adjust.
7544 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7545 (all, install-only, uninstall, clean-info, all-lib, clean)
7546 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7547 * configure.ac: Adjust AC_OUTPUT output.
7548 * aclocal.m4: Regenerate.
7549 * configure: Regenerate.
7550
fd9bb8b8
PA
75512012-04-19 Pedro Alves <palves@redhat.com>
7552
7553 * Makefile.in (generated_files): New.
7554 (server_h): Remove the explicit dependency on config.h, and depend
7555 on $generated_files.
7556
1c298c66
PA
75572012-04-19 Pedro Alves <palves@redhat.com>
7558
7559 * Makefile.in (INCGNU): Add -Ignulib.
7560
57c4b50b
PA
75612012-04-19 Pedro Alves <palves@redhat.com>
7562
7563 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7564 (INCGNU): ... this, and spell out -I here.
7565 (GNULIB_LIB): Rename to ...
7566 (LIBGNU): ... this.
7567 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7568
1030e047
PA
75692012-04-19 Pedro Alves <palves@redhat.com>
7570
7571 * config.in: Regenerate.
7572
447d4319
PA
75732012-04-19 Pedro Alves <palves@redhat.com>
7574
7575 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7576 * server.h (memmem): Remove declaration.
7577 * config.in: Regenerate.
7578 * configure: Regenerate.
7579
aad9eab9
YQ
75802012-04-19 Yao Qi <yao@codesourcery.com>
7581
7582 * Makefile.in (SFILES): Add common/vec.c.
7583 (OBS): Add vec.o.
7584 (vec.o): New rule.
7585
3e10640f
YQ
75862012-04-19 Yao Qi <yao@codesourcery.com>
7587
7588 * remote-utils.c (prepare_resume_reply): Replace with macro
7589 target_core_of_thread.
7590 * server.c (handle_qxfer_threads_proper): Likewise.
7591 * target.h (traget_core_of_thread): New macro.
7592
71622373
PA
75932012-04-18 Pedro Alves <palves@redhat.com>
7594
7595 * aclocal.m4: Regenerate.
7596 * configure: Regenerate.
7597
80d26939
YQ
75982012-04-16 Yao Qi <yao@codesourcery.com>
7599
7600 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7601 duplicated on address.
7602
42476b70
YQ
76032012-04-16 Yao Qi <yao@codesourcery.com>
7604
7605 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7606 (struct tracepoint_action_ops) <send>: New field.
7607 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7608 (agent_expr_send, x_tracepoint_action_send): New.
7609 (l_tracepoint_action_send): New.
7610 (cmd_qtdp): Download and install tracepoint
7611 according to `use_agent'.
7612 (run_inferior_command): Add one more parameter `len'.
7613 Update callers.
7614 (tracepoint_send_agent): New.
7615 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7616
7bc83639
YQ
76172012-04-16 Yao Qi <yao@codesourcery.com>
7618
7619 * tracepoint.c (download_tracepoints): Moved to ...
7620 (cmd_qtstart): ... here.
7621
5f18041e
YQ
76222012-04-14 Yao Qi <yao@codesourcery.com>
7623
7624 * tracepoint.c: Include inttypes.h.
7625 (struct collect_memory_action): Use sized types.
7626 (struct tracepoint): Likewise.
7627 (cmd_qtdp, stop_tracing): Update print specifiers.
7628 (cmd_qtp, response_tracepoint): Likewise.
7629 (collect_data_at_tracepoint): Likewise.
7630 (collect_data_at_step): Likewise.
7631
55a8c076
YQ
76322012-04-14 Yao Qi <yao@codesourcery.com>
7633
7634 Import gnulib module inttypes.
7635 * aclocal.m4, config.in, configure: Regenerated.
7636
dc750257
YQ
76372012-04-14 Yao Qi <yao@codesourcery.com>
7638
7639 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7640 Makefile and config.status at last.
7641
0ab5faf9
YQ
76422012-04-13 Yao Qi <yao@codesourcery.com>
7643
7644 * tracepoint.c: Include stdint.h unconditionally.
7645
18f5fd81
TJB
76462012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7647
7648 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7649 on BFD_HAVE_SYS_PROCFS_TYPE.
7650 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7651 * configure: Regenerate.
7652 * config.in: Likewise.
7653
4d47af5c
L
76542012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7655
7656 * Makefile.in (clean): Also remove x32.c x32-linux.c
7657 x32-avx.c x32-avx-linux.c.
7658 (x32.o): New target.
7659 (x32.c): Likewise.
7660 (x32-linux.o): Likewise.
7661 (x32-linux.c): Likewise.
7662 (x32-avx.o): Likewise.
7663 (x32-avx.c): Likewise.
7664 (x32-avx-linux.o): Likewise.
7665 (x32-avx-linux.c): Likewise.
7666
7667 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7668 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7669 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7670 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7671 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7672 i386/x32-avx-linux.xml.
7673
7674 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7675 (init_registers_x32_avx_linux): Likwise.
7676 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7677 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7678
ecedbe58
PA
76792012-04-13 Pedro Alves <palves@redhat.com>
7680
7681 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7682 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7683 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7684 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7685 the sub-make.
7686
c92b5177
L
76872012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7688
7689 * linux-x86-low.c (compat_x32_clock_t): New.
7690 (compat_x32_siginfo_t): Likewise.
7691 (compat_x32_siginfo_from_siginfo): Likewise.
7692 (siginfo_from_compat_x32_siginfo): Likewise.
7693 (linux_is_elf64): Likewise.
7694 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7695 and siginfo_from_compat_x32_siginfo for x32.
7696 (x86_arch_setup): Set linux_is_elf64.
7697
214d508e
L
76982012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7699
7700 PR gdb/13969
7701 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7702 e_machine field.
7703 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7704 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7705 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7706 compatible with process.
7707
c9a1864a
YQ
77082012-04-12 Yao Qi <yao@codesourcery.com>
7709
7710 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7711 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7712 (install-only, install-info, clean): Handle sub dir gnulib.
7713 (all-lib, am--refresh): New targets.
7714 (memmem.o): Remove target.
7715 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7716 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7717 (AC_REPLACE_FUNCS): Remove memmem.
7718 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7719 (AC_OUTPUT): Generate Makefile in gnulib/.
7720 * aclocal.m4, config.in, configure: Regenerated.
7721
367ba2c2
MR
77222012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7723
7724 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7725
9d236627
PA
77262012-04-05 Pedro Alves <palves@redhat.com>
7727
7728 -Werror=strict-aliasing
7729
7730 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7731 pointer.
7732
111217b3
PA
77332012-04-04 Pedro Alves <palves@redhat.com>
7734
7735 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7736 (sparc_store_gregset_from_stack, sparc_store_gregset)
7737 (sparc_breakpoint_at): Fix formatting.
7738
8365dcf5
TJB
77392012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7740
7741 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7742 are available.
7743 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7744 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7745 * config.in: Regenerate.
7746 * configure: Likewise.
7747
689cc2ae
PA
77482012-03-29 Pedro Alves <palves@redhat.com>
7749
7750 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7751 Correct ptrace arguments.
7752
c14dfd32
PA
77532012-03-28 Pedro Alves <palves@redhat.com>
7754
7755 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7756 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7757 (IA64_FR1_REGNUM): New defines.
7758 (ia64_fetch_register): New.
7759 (the_low_target): Install it.
7760 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7761 field.
7762 * linux-low.c (linux_fetch_registers): Try the
7763 the_low_target.fetch_register hook first.
7764
7765 * linux-arm-low.c (the_low_target): Adjust.
7766 * linux-bfin-low.c (the_low_target): Adjust.
7767 * linux-cris-low.c (the_low_target): Adjust.
7768 * linux-crisv32-low.c (the_low_target): Adjust.
7769 * linux-m32r-low.c (the_low_target): Adjust.
7770 * linux-m68k-low.c (the_low_target): Adjust.
7771 * linux-mips-low.c (the_low_target): Adjust.
7772 * linux-ppc-low.c (the_low_target): Adjust.
7773 * linux-s390-low.c (the_low_target): Adjust.
7774 * linux-sh-low.c (the_low_target): Adjust.
7775 * linux-sparc-low.c (the_low_target): Adjust.
7776 * linux-tic6x-low.c (the_low_target): Adjust.
7777 * linux-x86-low.c (the_low_target): Adjust.
7778 * linux-xtensa-low.c (the_low_target): Adjust.
7779
63c88e13
PA
77802012-03-26 Pedro Alves <palves@redhat.com>
7781
7782 * server.c (handle_qxfer_libraries): Don't bail early if
7783 the_target->qxfer_libraries_svr4 is not NULL.
7784
fb723180
PA
77852012-03-26 Pedro Alves <palves@redhat.com>
7786
7787 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7788
0afae3cf
PA
77892012-03-23 Pedro Alves <palves@redhat.com>
7790
7791 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7792 "library-list-svr4" element's start tag when the the DSO list is
7793 empty.
7794
485f1ee4
PA
77952012-03-23 Pedro Alves <palves@redhat.com>
7796
7797 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7798 a variable whose type size is the same as the inferior's pointer
7799 size.
7800
a5362b9a
TS
78012012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7802
7803 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7804 struct siginfo.
7805 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7806 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7807 * linux-low.h: Include <signal.h>.
7808 (struct siginfo): Remove forward declaration.
7809 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7810 struct siginfo.
7811
d226c142
MF
78122012-03-21 Mike Frysinger <vapier@gentoo.org>
7813
7814 * .gitignore: Ignore more files.
7815
122f36ef
PA
78162012-03-19 Pedro Alves <palves@redhat.com>
7817 Jan Kratochvil <jan.kratochvil@redhat.com>
7818
7819 * server.c (cont_thread, general_thread): Add describing comments.
7820 (start_inferior): Clear `cont_thread'.
7821 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7822 of a process.
7823
fc3e5175
YQ
78242012-03-15 Yao Qi <yao@codesourcery.com>
7825
7826 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7827 handling to ...
7828 (cmd_qtdp): ... here.
7829
8d0d92cd
YQ
78302012-03-15 Yao Qi <yao@codesourcery.com>
7831
7832 * tracepoint.c (struct tracepoint_action_ops): New.
7833 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7834 (m_tracepoint_action_download): New.
7835 (r_tracepoint_action_download): New.
7836 (x_tracepoint_action_download): New.
7837 (l_tracepoint_action_download): New.
7838 (add_tracepoint_action): Install `action->ops' according type.
7839 (download_tracepoint_1): Move code `download' function pointer
7840 of various tracepoint_action_ops.
7841
87b0bb13
JK
78422012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7843
7844 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7845 linux_ptrace_attach_warnings.
7846
5f572dec
JK
78472012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7848
7849 * Makefile.in (linux-ptrace.o): New.
7850 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7851 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7852 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7853 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7854 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7855 of these targets.
7856 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7857
f4647387
YQ
78582012-03-08 Yao Qi <yao@codesourcery.com>
7859 Pedro Alves <palves@redhat.com>
7860
7861 Fix PR server/13392.
7862 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7863 offset of JMP insn.
7864 * tracepoint.c (remove_tracepoint): New.
7865 (cmd_qtdp): Call remove_tracepoint when failed to install.
7866
9b224c5e
PA
78672012-03-07 Pedro Alves <palves@redhat.com>
7868
7869 * linux-low.c (get_detach_signal): New.
7870 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7871 Pass on pending signals to PTRACE_DETACH. Check the result of the
7872 ptrace call.
7873 * server.c (program_signals, program_signals_p): New.
7874 (handle_general_set): Handle QProgramSignals.
7875 * server.h (program_signals, program_signals_p): Declare.
7876
e237a7e2
JK
78772012-03-05 Pedro Alves <palves@redhat.com>
7878 Jan Kratochvil <jan.kratochvil@redhat.com>
7879
7880 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7881 New comment why.
7882
5808517f
YQ
78832012-03-03 Yao Qi <yao@codesourcery.com>
7884
7885 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7886 agent_look_up_symbols.
7887
58b4daa5
YQ
78882012-03-03 Yao Qi <yao@codesourcery.com>
7889
7890 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7891 (linux-x86-low.o): Likewise.
7892 * server.h: Remove in_process_agent_loaded.
7893 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7894 common/agent.c.
7895 Update callers.
7896
8ffcbaaf
YQ
78972012-03-03 Yao Qi <yao@codesourcery.com>
7898
7899 * tracepoint.c (gdb_agent_capability): New global.
7900 (in_process_agent_loaded_ust): Renamed to
7901 `in_process_agent_supports_ust'.
7902 Update callers.
7903 (in_process_agent_supports_ust): Call agent_capability_check.
7904 (clear_installed_tracepoints): Assert that agent supports
7905 agent.
7906
d1feda86
YQ
79072012-03-03 Yao Qi <yao@codesourcery.com>
7908
7909 * linux-low.c (linux_supports_agent): New.
7910 (linux_target_ops): Initialize field `supports_agent' with
7911 linux_supports_agent.
7912 * target.h (struct target_ops) <supports_agent>: New.
7913 (target_supports_agent): New macro.
7914 * server.c (handle_general_set): Handle packet 'QAgent'.
7915 (handle_query): Send `QAgent+'.
7916 * Makefile.in (server.o): Depends on agent.h.
7917
2fa291ac
YQ
79182012-03-03 Yao Qi <yao@codesourcery.com>
7919
7920 * Makefile.in (OBS): Add agent.o.
7921 Add new rule for agent.o.
7922 Track dependence of tracepoint.c on agent.h.
7923 * tracepoint.c (run_inferior_command_1):
7924 (run_inferior_command): Call agent_run_command.
7925 (gdb_ust_connect_sync_socket): Deleted. Move it to
7926 common/agent.c.
7927 (resume_thread, stop_thread): Likewise.
7928 (gdb_ust_socket_init): Renamed to ...
7929 (gdb_agent_socket_init): ... New.
7930 (gdb_ust_thread): Renamed to ...
7931 (gdb_agent_helper_thread): ... New.
7932 (gdb_ust_init): Move some code to ...
7933 (gdb_agent_init): ... here. New.
7934 [HAVE_UST]: Call gdb_ust_init.
7935 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7936 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7937 * config.in, configure: Regenerated.
7938
05044653
PA
79392012-03-02 Pedro Alves <palves@redhat.com>
7940
7941 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7942 * linux-low.c (struct simple_pid_list): New.
7943 (stopped_pids): New a struct simple_pid_list pointer.
7944 (add_to_pid_list, pull_pid_from_list): New.
7945 (handle_extended_wait): Don't assume the first signal new children
7946 report is SIGSTOP. Adjust call to pull_pid_from_list.
7947 (linux_wait_for_lwp): Adjust.
7948
8d00225b
YQ
79492012-03-02 Yao Qi <yao@codesourcery.com>
7950
7951 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7952 debug log.
7953
19560ba5
YQ
79542012-03-02 Yao Qi <yao@codesourcery.com>
7955
7956 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7957 `stop_pc' and `tpoint'. Update caller.
7958
1faeff08
MR
79592012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7960
7961 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7962 * linux-low.c (use_linux_regsets): New macro.
7963 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7964 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7965 (linux_register_in_regsets): New function.
7966 (usr_fetch_inferior_registers): Skip registers covered by
7967 regsets.
7968 (usr_store_inferior_registers): Likewise.
7969 (usr_fetch_inferior_registers): New macro.
7970 (usr_store_inferior_registers): Likewise.
7971 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7972 (linux_store_registers): Likewise.
7973 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7974 prototype.
7975 (init_registers_mips64_dsp_linux): Likewise.
7976 (init_registers_mips_linux): New macro.
7977 (init_registers_mips_dsp_linux): Likewise.
7978 (mips_dsp_num_regs): Likewise.
7979 (DSP_BASE, DSP_CONTROL): New fallback macros.
7980 (mips_base_regs): New macro.
7981 (mips_regmap): Use it. Fix the size.
7982 (mips_dsp_regmap): New variable.
7983 (mips_dsp_regset_bitmap): Likewise.
7984 (mips_arch_setup): New function.
7985 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7986 than mips_regmap.
7987 (mips_cannot_store_register): Likewise.
7988 (the_low_target): Update .arch_setup, .num_regs and .regmap
7989 initializers. Add .regset_bitmap initializer.
7990 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7991 initializer.
7992 * linux-bfin-low.c (the_low_target): Likewise.
7993 * linux-cris-low.c (the_low_target): Likewise.
7994 * linux-crisv32-low.c (the_low_target): Likewise.
7995 * linux-ia64-low.c (the_low_target): Likewise.
7996 * linux-m32r-low.c (the_low_target): Likewise.
7997 * linux-m68k-low.c (the_low_target): Likewise.
7998 * linux-ppc-low.c (the_low_target): Likewise.
7999 * linux-s390-low.c (the_low_target): Likewise.
8000 * linux-sh-low.c (the_low_target): Likewise.
8001 * linux-sparc-low.c (the_low_target): Likewise.
8002 * linux-tic6x-low.c (the_low_target): Likewise.
8003 * linux-x86-low.c (the_low_target): Likewise.
8004 * linux-xtensa-low.c (the_low_target): Likewise.
8005 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8006 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8007 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8008 srv_xmlfiles.
8009 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8010 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8011
c03e6ccc
YQ
80122012-02-29 Yao Qi <yao@codesourcery.com>
8013 Pedro Alves <palves@redhat.com>
8014
8015 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8016 `step_over_finished' is true.
8017
644cebc9
PA
80182012-02-27 Pedro Alves <palves@redhat.com>
8019
8020 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8021 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8022
c14d7ab2
PA
80232012-02-27 Pedro Alves <palves@redhat.com>
8024
8025 PR server/9684
8026 * linux-low.c (pid_is_stopped): New.
8027 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8028
412c89dd
LM
80292012-02-25 Luis Machado <lgustavo@codesourcery.com>
8030
8031 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8032 of conditions.
8033
b745defe
MR
80342012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8035
8036 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8037
9f3a5c85
LM
80382012-02-24 Luis Machado <lgustavo@codesourcery>
8039
8040 * server.c (handle_query): Advertise support for target-side
8041 breakpoint condition evaluation.
8042 (process_point_options): New function.
8043 (process_serial_event): When inserting a breakpoint, check for
8044 a target-side condition that should be evaluated.
8045
8046 * mem-break.c: Include regcache.h and ax.h.
8047 (point_cond_list_t): New data structure.
8048 (breakpoint) <cond_list>: New field.
8049 (find_gdb_breakpoint_at): Make non-static.
8050 (delete_gdb_breakpoint_at): Clear any target-side
8051 conditions.
8052 (clear_gdb_breakpoint_conditions): New function.
8053 (add_condition_to_breakpoint): Likewise.
8054 (add_breakpoint_condition): Likewise.
8055 (gdb_condition_true_at_breakpoint): Likewise.
8056 (gdb_breakpoint_here): Return result directly instead
8057 of going through a local variable.
8058
8059 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8060 (clear_gdb_breakpoint_conditions): Likewise.
8061 (add_breakpoint_condition): Likewise.
8062 (gdb_condition_true_at_breakpoint): Likewise.
8063
8064 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8065 (need_step_over_p): Take target-side breakpoint condition into
8066 consideration.
8067
5e1dc496
LM
80682012-02-24 Luis Machado <lgustavo@codesourcery>
8069
8070 * server.h: Include tracepoint.h.
8071 (agent_mem_read, agent_get_trace_state_variable_value,
8072 agent_set_trace_state_variable_value,
8073 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8074 get_set_tsv_func_addr): New prototypes.
8075
8076 * ax.h: New include file.
8077 * ax.c: New source file.
8078
8079 * tracepoint.c: Include ax.h.
8080 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8081 agent_expr, eval_result_type): Move to ax.h.
8082 (parse_agent_expr): Rename to ...
8083 (gdb_parse_agent_expr): ... this, make it non-static and move
8084 to ax.h.
8085 (unparse_agent_expr) Rename to ...
8086 (gdb_unparse_agent_expr): ... this, make it non-static and move
8087 to ax.h.
8088 (eval_agent_expr): Rename to ...
8089 (eval_tracepoint_agent_expr): ... this.
8090 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8091 forward declarations.
8092 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8093 (agent_get_trace_state_variable_value): New function.
8094 (agent_set_trace_state_variable_value): New function.
8095 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8096 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8097 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8098 (condition_true_at_tracepoint): Likewise.
8099 (parse_agent_expr): Rename to ...
8100 (gdb_parse_agent_expr): ... this and move to ax.c.
8101 (unparse_agent_expr): Rename to ...
8102 (gdb_unparse_agent_expr): ... this and move to ax.c.
8103 (gdb_agent_op_name): Move to ax.c.
8104 (eval_agent_expr): Rename to ...
8105 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8106 and move to ax.c.
8107 (eval_tracepoint_agent_expr): New function.
8108 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8109 non-static.
5e1dc496
LM
8110 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8111 ax.c.
8112 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8113 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8114 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8115 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8116 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8117 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8118 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8119 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8120 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8121 (compile_bytecodes): Remove forward declaration.
8122 (is_goto_target): Move to ax.c.
8123 (compile_bytecodes): Move to ax.c and call
8124 agent_get_trace_state_variable_value (...) and
8125 agent_set_trace_state_variable_value (...).
8126
8127 * Makefile.in: Update ax.c and IPA dependencies.
8128
277e4e52
PA
81292012-02-24 Pedro Alves <palves@redhat.com>
8130
8131 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8132 (cmd_bigqtbuffer_circular): ... this. Only handle
8133 'QTBuffer:circular:'.
8134 (handle_tracepoint_general_set): Adjust.
8135
bf4c19f7
YQ
81362012-02-16 Yao Qi <yao@codesourcery.com>
8137
8138 * inferiors.c: Move code to ...
8139 * dll.c: .... here. New.
8140 * server.h: Declare clear_dlls.
8141 * Makefile.in (SFILES): Add dll.c.
8142 (OBS): Add dll.o
8143 (dll.o): New rule.
8144
d73f2619
YQ
81452012-02-11 Yao Qi <yao@codesourcery.com>
8146
8147 * server.c: (handle_monitor_command): Add a new parameter
8148 `own_buf'.
8149 (handle_query): Update caller.
8150
f8255c2a
JB
81512012-02-09 Joel Brobecker <brobecker@adacore.com>
8152
8153 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8154 * configure, config.in: Regenerate.
8155 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8156 is not defined.
8157
da84f473
PA
81582012-02-02 Pedro Alves <palves@redhat.com>
8159
8160 Try SIGKILL first, then PTRACE_KILL.
8161 * linux-low.c (linux_kill_one_lwp): New.
8162 (linux_kill_one_lwp): Rename to ...
8163 (kill_one_lwp_callback): ... this. Use the new
8164 linux_kill_one_lwp.
8165
e886a173
PA
81662012-02-02 Pedro Alves <palves@redhat.com>
8167
8168 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8169 inferior.
8170
be07f1a2
PA
81712012-01-27 Pedro Alves <palves@redhat.com>
8172
8173 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8174 (elf_64_file_p): Make static.
8175 (linux_pid_exe_is_elf_64_file): New.
8176 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8177 Delete declarations.
8178 (linux_pid_exe_is_elf_64_file): Declare.
8179 * linux-x86-low.c (x86_arch_setup): Use
8180 linux_pid_exe_is_elf_64_file.
8181
d8301ad1
JK
81822012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8183
8184 * linux-low.c (linux_wait_for_event_1): Rename to ...
8185 (linux_wait_for_event): ... here and merge it with former
8186 linux_wait_for_event - new variable wait_ptid, use it.
8187 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8188
01b17894
PA
81892012-01-23 Pedro Alves <palves@redhat.com>
8190
8191 * server.c (main): Avoid yet another case of infinite loop while
8192 detaching/killing after a longjmp.
8193
e825046f
JK
81942012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8195
8196 Code cleanup.
8197 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8198
b9e7b9c3
UW
81992012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8200
8201 * hostio.c (handle_readlink): New function.
8202 (handle_vFile): Call it to handle "vFile:readlink" packets.
8203
901f9912
UW
82042012-01-20 Pedro Alves <palves@redhat.com>
8205 Ulrich Weigand <ulrich.weigand@linaro.org>
8206
8207 * server.c (handle_v_requests): Only support vAttach and vRun to
8208 start multiple processes when in extended protocol mode.
8209
fc1ab1a0
PA
82102012-01-17 Pedro Alves <palves@redhat.com>
8211
8212 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8213 memalign plus mprotect to allocate the scratch buffer.
8214
7d5d4e98
PA
82152012-01-13 Pedro Alves <palves@redhat.com>
8216
8217 * server.c (attach_inferior): Clear `cont_thread'.
8218
f128d5e9
PA
82192012-01-13 Pedro Alves <palves@redhat.com>
8220
8221 * server.c (main): Avoid infinite loop while detaching/killing
8222 after a longjmp.
8223
06db92f0
DE
82242012-01-09 Doug Evans <dje@google.com>
8225
8226 * server.c (start_inferior): Set last_ptid in --wrapper case.
8227
32d92999
YQ
82282012-01-06 Yao Qi <yao@codesourcery.com>
8229
8230 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8231 defined.
8232 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8233
5e0a92a9
YQ
82342012-01-04 Yao Qi <yao@codesourcery.com>
8235
8236 * tracepoint.c (cmd_qtdp): Print debug message
8237 for static tracepoint.
8238
ae639e8c
YQ
82392012-01-04 Yao Qi <yao@codesourcery.com>
8240
8241 * tracepoint.c (trace_vdebug): Differentiate debug message
8242 between gdbserver and IPA.
8243
f72429c5
YQ
82442012-01-03 Yao Qi <yao@codesourcery.com>
8245
8246 * tracepoint.c (tracepoint_was_hit): Don't collect for
8247 static tracepoint.
8248
12c3e59c
JB
82492012-01-02 Joel Brobecker <brobecker@adacore.com>
8250
8251 * terminal.h: Reformat copyright header.
8252
67827812
JB
82532012-01-02 Joel Brobecker <brobecker@adacore.com>
8254
8255 * server.c (gdbserver_version): Update copyright year.
8256 * gdbreplay.c (gdbreplay_version): Likewise.
8257
3e52c33d
JK
82582011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8259
8260 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8261
8262 Revert:
8263 2011-12-18 Hui Zhu <teawater@gmail.com>
8264 * linux-low.c (linux_create_inferior): Save return value to ret.
8265
66f1260e
HZ
82662011-12-18 Hui Zhu <teawater@gmail.com>
8267
8268 * linux-low.c (linux_create_inferior): Save return value to ret.
8269
e77616d7
DE
82702011-12-16 Doug Evans <dje@google.com>
8271
e7b06c57
DE
8272 * linux-low.c (linux_create_inferior): If stdio connection,
8273 redirect stdin from /dev/null, stdout to stderr.
8274 * remote-utils.c (remote_is_stdio): New static global.
8275 (remote_connection_is_stdio): New function.
8276 (remote_prepare): Handle stdio connection.
8277 (remote_open): Ditto.
8278 (remote_close): Don't close stdin for stdio connections.
8279 (read_prim,write_prim): New functions. Replace all calls to
8280 read/write to these.
8281 * server.c (main): Watch for "-" argument. Move call to
8282 remote_prepare before start_inferior.
8283 * server.h (STDIO_CONNECTION_NAME): New macro.
8284 (remote_connection_is_stdio): Declare.
8285
e77616d7
DE
8286 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8287 in debugging output.
8288
82067193
YQ
82892011-12-15 Yao Qi <yao@codesourcery.com>
8290
8291 * tracepoint.c: Include sys/syscall.h.
8292 (gdb_ust_thread): Remove preprocessor conditional.
8293
82bfbe7e
PA
82942011-12-14 Pedro Alves <pedro@codesourcery.com>
8295
8296 * linux-low.c (linux_detach_one_lwp): Call
8297 the_low_target.prepare_to_resume before detaching.
8298
712c6575
YQ
82992011-12-14 Yao Qi <yao@codesourcery.com>
8300
8301 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8302 of write.
8303
d54d1edf
YQ
83042011-12-14 Yao Qi <yao@codesourcery.com>
8305
8306 * i386-low.c (i386_low_stopped_data_address): Initialize local
8307 variable `control'.
8308
6210a125
PA
83092011-12-13 Pedro Alves <pedro@codesourcery.com>
8310
8311 PR remote/13492
8312
8313 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8314 DR_CONTROL unless necessary. Extend comments.
8315 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8316 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8317
2ece8244
YQ
83182011-12-13 Yao Qi <yao@codesourcery.com>
8319
8320 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8321 macros.
8322 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8323
784867a5
JK
83242011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8325
8326 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8327 Print new debug message for such case.
8328
6bf36717
JK
83292011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8330
8331 Fix overlapping memcpy.
8332 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8333 the read_inferior_memory transfer.
8334 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8335 write_inferior_memory transfer.
8336 (set_fast_tracepoint_jump): New variable buf. Use it for the
8337 read_inferior_memory and write_inferior_memory transfers.
8338 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8339 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8340 Use it for the write_inferior_memory transfer.
8341 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8342 buffers.
8343
50275556
MR
83442011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8345
8346 * linux-low.c (fetch_register, store_register): Make code
8347 consistent, fix formatting.
8348
7325beb4
MR
83492011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8350
8351 * linux-low.c (usr_store_inferior_registers): Factor out code
8352 to handle individual registers into...
8353 (store_register): ... this new function.
8354
c642a434
UW
83552011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8356
8357 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8358 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8359 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8360 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8361 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8362 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8363 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8364 (srv_xmlfiles): Add new XML files.
8365
8366 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8367 and <sys/uio.h>.
8368 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8369 (init_registers_s390_linux32v1): Add prototype.
8370 (init_registers_s390_linux32v2): Likewise.
8371 (init_registers_s390_linux64v1): Likewise.
8372 (init_registers_s390_linux64v2): Likewise.
8373 (init_registers_s390x_linux64v1): Likewise.
8374 (init_registers_s390x_linux64v2): Likewise.
8375 (s390_num_regs): Increment to 52.
8376 (s390_regmap): Add orig_r2 register.
8377 (s390_num_regs_3264): Increment to 68.
8378 (s390_regmap_3264): Add orig_r2 register.
8379 (s390_collect_ptrace_register): Handle orig_r2 register.
8380 (s390_supply_ptrace_register): Likewise.
8381 (s390_fill_last_break): New function.
8382 (s390_store_last_break): Likewise.
8383 (s390_fill_system_call): New function.
8384 (s390_store_system_call): Likewise.
8385 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8386 register sets.
8387 (s390_check_regset): New function.
8388 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8389 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8390 Update target_regsets for available register sets.
8391
2268b414
JK
83922011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8393 Jan Kratochvil <jan.kratochvil@redhat.com>
8394
8395 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8396 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8397 New.
8398 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8399 * linux-low.h (struct process_info_private): New member r_debug.
8400 * server.c (handle_qxfer_libraries): Call
8401 the_target->qxfer_libraries_svr4.
8402 (handle_qxfer_libraries_svr4): New function.
8403 (qxfer_packets): New entry "libraries-svr4".
8404 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8405 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8406 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8407 PACKET_qXfer_libraries_svr4.
8408
d6db1fab
UW
84092011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8410
8411 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8412 PSW address/mask between 8-byte and 16-byte formats.
8413 (s390_supply_ptrace_register): Likewise.
8414 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8415 basic addressing mode bit.
8416
242f5f1c
SS
84172011-11-24 Stan Shebs <stan@codesourcery.com>
8418
8419 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8420
f196051f
SS
84212011-11-17 Stan Shebs <stan@codesourcery.com>
8422
8423 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8424 (tracing_start_time): New global.
8425 (tracing_stop_time): New global.
8426 (tracing_user_name): New global.
8427 (tracing_notes): New global.
8428 (tracing_stop_note): New global.
8429 (cmd_qtstart): Set traceframe_usage, start_time.
8430 (stop_tracing): Set stop_time.
8431 (cmd_qtstatus): Report additional status.
8432 (cmd_qtp): New function.
8433 (handle_tracepoint_query): Call it.
8434 (cmd_qtnotes): New function.
8435 (handle_tracepoint_general_set): Call it.
8436 (get_timestamp): Rename from tsv_get_timestamp.
8437
405f8e94
SS
84382011-11-14 Stan Shebs <stan@codesourcery.com>
8439 Kwok Cheung Yeung <kcy@codesourcery.com>
8440
8441 * linux-x86-low.c (small_jump_insn): New.
8442 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8443 trampoline and error message, build a trampoline and issue a small
8444 jump instruction to it.
8445 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8446 trampoline and error message.
8447 (x86_get_min_fast_tracepoint_insn_len): New.
8448 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8449 * linux-low.h (struct linux_target_ops): Add arguments to
8450 install_fast_tracepoint_jump_pad operation, add new operation.
8451 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8452 arguments.
8453 (linux_get_min_fast_tracepoint_insn_len): New function.
8454 (linux_target_op): Add new operation.
8455 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8456 (gdb_trampoline_buffer_end): Ditto.
8457 (gdb_trampoline_buffer_error): Ditto.
8458 (struct ipa_sym_addresses): Add fields for new IPA variables.
8459 (symbol_list): Add entries for new IPA variables.
8460 (struct tracepoint): Add fields to hold the address range of the
8461 trampoline used by the tracepoint.
8462 (trampoline_buffer_head): New static variable.
8463 (trampoline_buffer_tail): Ditto.
8464 (claim_trampoline_space): New function.
8465 (have_fast_tracepoint_trampoline_buffer): New function.
8466 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8467 structure.
8468 (install_fast_tracepoint): Ditto, also add error buffer argument.
8469 (cmd_qtminftpilen): New function.
8470 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8471 (fast_tracepoint_from_trampoline_address): New function.
8472 (fast_tracepoint_collecting): Handle trampoline as part of jump
8473 pad space.
8474 (set_trampoline_buffer_space): New function.
8475 (initialize_tracepoint): Initialize new IPA variables.
8476 * target.h (struct target_ops): Add arguments to
8477 install_fast_tracepoint_jump_pad operation, add new
8478 get_min_fast_tracepoint_insn_len operation.
8479 (target_get_min_fast_tracepoint_insn_len): New.
8480 (install_fast_tracepoint_jump_pad): Add arguments.
8481 * server.h (IPA_BUFSIZ): Define.
8482 * linux-i386-ipa.c: Include extra header files.
8483 (initialize_fast_tracepoint_trampoline_buffer): New function.
8484 (initialize_low_tracepoint): Call it.
8485 * server.h (set_trampoline_buffer_space): Declare.
8486 (claim_trampoline_space): Ditto.
8487 (have_fast_tracepoint_trampoline_buffer): Ditto.
8488
1e4d1764
YQ
84892011-11-14 Yao Qi <yao@codesourcery.com>
8490
8491 * server.c (handle_query): Handle InstallInTrace for qSupported.
8492 * tracepoint.c (add_tracepoint): Sort list.
8493 (install_tracepoint, download_tracepoint): New.
8494 (cmd_qtdp): Call them to install and download tracepoints.
8495 (sort_tracepoints): Removed.
8496 (cmd_qtstart): Update.
8497
5c73ff4e
YQ
84982011-11-14 Yao Qi <yao@codesourcery.com>
8499
8500 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8501 * mem-break.h: Declare.
8502 * tracepoint.c (cmd_qtstart): Move some code to ...
8503 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8504 New.
8505 (download_tracepoints): Move some code to ...
8506 (download_tracepoint_1): ... here. New.
8507
86a30030
YQ
85082011-11-08 Yao Qi <yao@codesourcery.com>
8509
8510 * remote-utils.c (relocate_instruction): A comment fix.
8511
8d26e50c
JB
85122011-11-07 Joel Brobecker <brobecker@adacore.com>
8513
8514 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8515 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8516 dr_status_mirror and dr_control_mirror from debug_reg_state.
8517 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8518 (i386_initial_stuff): Remove use of deleted globals.
8519 (i386_get_thread_context, i386_set_thread_context,
8520 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8521 from debug_reg_state.
8522
a59306a3
YQ
85232011-11-05 Yao Qi <yao@codesourcery.com>
8524
8525 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8526 address as TPOINT's.
8527
3065dfb6
SS
85282011-11-02 Stan Shebs <stan@codesourcery.com>
8529
8530 * tracepoint.c (agent_mem_read_string): New function.
8531 (eval_agent_expr): Call it for tracenz.
8532 * server.c (handle_query): Report support for tracenz.
8533
fd0d8c7c
YQ
85342011-11-02 Yao Qi <yao@codesourcery.com>
8535
8536 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8537
609086b1
YQ
85382011-11-02 Yao Qi <yao@codesourcery.com>
8539
8540 * target.h: Fix a typo in comment.
8541
b9fd1791
PA
85422011-10-31 Pedro Alves <pedro@codesourcery.com>
8543
8544 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8545 clobber the breakpoints' shadows with fast tracepoint jumps.
8546 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8547 * target.c (write_inferior_memory): Also pass MYADDR down to
8548 check_mem_write.
8549
03583c20
UW
85502011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8551
8552 * configure.ac: Check support for personality routine.
8553 * configure: Regenerate.
8554 * config.in: Likewise.
8555 * linux-low.c: Include <sys/personality.h>.
8556 Define ADDR_NO_RANDOMIZE if necessary.
8557 (linux_create_inferior): Disable address space randomization when
8558 forking inferior, if requested.
8559 (linux_supports_disable_randomization): New function.
8560 (linux_target_ops): Install it.
8561 * server.h (disable_randomization): Declare.
8562 * server.c (disable_randomization): New global variable.
8563 (handle_general_set): Handle QDisableRandomization.
8564 (handle_query): Likewise for qSupported.
8565 (main): Support --disable-randomization and --no-disable-randomization
8566 command line arguments.
8567 * target.h (struct target_ops): Add supports_disable_randomization.
8568 (target_supports_disable_randomization): New macro.
8569
723b724b
MF
85702011-09-29 Mike Frysinger <vapier@gentoo.org>
8571
8572 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8573 ifdef check.
8574 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8575 [!PT_GETDSBT] (target_loadmap): New definition.
8576 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8577 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8578 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8579 and PT_GETDSBT to LINUX_LOADMAP.
8580 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8581 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8582
55329a5c 85832011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
8584
8585 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8586 (arm_linux_hwbp_cap): New static variable.
8587 (arm_linux_get_hwbp_cap): Replace by ...
8588 (arm_linux_init_hwbp_cap): ... this new function.
8589 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8590 (arm_linux_get_hw_watchpoint_count): Likewise.
8591 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8592 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8593 (arm_prepare_to_resume): Use perror_with_name instead of error.
8594
55329a5c 85952011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
8596
8597 * linux-arm-low.c: Include <signal.h>.
8598 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8599 (struct arm_linux_hwbp_cap): New data type.
8600 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8601 (struct arm_linux_hw_breakpoint): New data type.
8602 (MAX_BPTS, MAX_WPTS): Define.
8603 (struct arch_process_info, struct arch_lwp_info): New data types.
8604 (arm_linux_get_hwbp_cap): New function.
8605 (arm_linux_get_hw_breakpoint_count): Likewise.
8606 (arm_linux_get_hw_watchpoint_count): Likewise.
8607 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8608 (arm_hwbp_control_initialize): Likewise.
8609 (arm_hwbp_control_is_enabled): Likewise.
8610 (arm_hwbp_control_is_initialized): Likewise.
8611 (arm_hwbp_control_disable): Likewise.
8612 (arm_linux_hw_breakpoint_equal): Likewise.
8613 (arm_linux_hw_point_initialize): Likewise.
8614 (struct update_registers_data): New data structure.
8615 (update_registers_callback: New function.
8616 (arm_insert_point): Likewise.
8617 (arm_remove_point): Likewise.
8618 (arm_stopped_by_watchpoint): Likewise.
8619 (arm_stopped_data_address): Likewise.
8620 (arm_new_process): Likewise.
8621 (arm_new_thread): Likewise.
8622 (arm_prepare_to_resume): Likewise.
8623 (the_low_target): Register arm_insert_point, arm_remove_point,
8624 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8625 arm_new_thread, and arm_prepare_to_resume.
8626
6b9801d4
SS
86272011-09-15 Stan Shebs <stan@codesourcery.com>
8628
8629 * server.h (struct emit_ops): Add compare-goto fields.
8630 * tracepoint.c (gdb_agent_op_sizes): New table.
8631 (emit_eq_goto): New function.
8632 (emit_ne_goto): New function.
8633 (emit_lt_goto): New function.
8634 (emit_le_goto): New function.
8635 (emit_gt_goto): New function.
8636 (emit_ge_goto): New function.
8637 (is_goto_target): New function.
8638 (compile_bytecodes): Recognize special cases of compare-goto
8639 combinations and call specialized emitters for them.
8640 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8641 (amd64_emit_ne_goto): New function.
8642 (amd64_emit_lt_goto): New function.
8643 (amd64_emit_le_goto): New function.
8644 (amd64_emit_gt_goto): New function.
8645 (amd64_emit_ge_goto): New function.
8646 (amd64_emit_ops): Add the new functions.
8647 (i386_emit_eq_goto): New function.
8648 (i386_emit_ne_goto): New function.
8649 (i386_emit_lt_goto): New function.
8650 (i386_emit_le_goto): New function.
8651 (i386_emit_gt_goto): New function.
8652 (i386_emit_ge_goto): New function.
8653 (i386_emit_ops): Add the new functions.
8654
bf15cbda
SS
86552011-09-08 Stan Shebs <stan@codesourcery.com>
8656
8657 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8658 (i386_emit_epilogue): Restore %ebx.
8659
943ca1dd
JZ
86602011-08-31 Jie Zhang <jzhang918@gmail.com>
8661
8662 * server.c (step_thread): Remove definition.
8663 (process_serial_event): Don't handle Hs.
8664 * server.h (step_thread): Remove declaration.
8665 * target.c (set_desired_inferior): Remove use of step_thread.
8666
e3deef73
LM
86672011-08-24 Luis Machado <lgustavo@codesourcery.com>
8668
8669 * linux-low.c: Include linux-procfs.h.
8670 (linux_attach_lwp_1): Update comments.
8671 (linux_attach): Scan for existing threads when attaching to a
8672 process that is the tgid.
8673 * Makefile.in: Update dependencies.
8674
13da1c97
LM
86752011-08-24 Luis Machado <lgustavo@codesourcery.com>
8676
8677 * configure.srv: Add linux-procfs.o dependencies.
8678
881127c9
YQ
86792011-08-14 Yao Qi <yao@codesourcery.com>
8680
8681 * target.h (struct target_ops): Fix indent.
8682 * win32-low.c (win32_target_ops): Fix comment.
8683
58dbd541
YQ
86842011-08-14 Andrew Jenner <andrew@codesourcery.com>
8685 Yao Qi <yao@codesourcery.com>
8686
8687 * Makefile.in (clean): Remove tic6x-*.c files.
8688 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8689 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8690 (tic6x-c64xp-linux.c): Likewise.
8691 * configure.srv: Add support for tic6x-*-uclinux.
8692 * linux-tic6x-low.c: New.
8693 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8694
78d85199
YQ
86952011-08-14 Andrew Stubbs <ams@codesourcery.com>
8696 Yao Qi <yao@codesourcery.com>
8697
8698 * target.h (struct target_ops): Add read_loadmap.
8699 * linux-low.c (struct target_loadseg): New type.
8700 (struct target_loadmap): New type.
8701 (linux_read_loadmap): New function.
8702 (linux_target_ops): Add linux_read_loadmap.
8703 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
8704 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8705 to NULL.
78d85199 8706
a959a88d
EZ
87072011-08-05 Eli Zaretskii <eliz@gnu.org>
8708
8709 * win32-low.c: Include <stdint.h>.
8710
1ced966e
PA
87112011-07-22 Pedro Alves <pedro@codesourcery.com>
8712
8713 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8714 to the inferior here.
8715 (i386_remove_aligned_watchpoint): Ditto.
8716 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8717 fit part of the watchpoint in the debug registers.
8718 (i386_update_inferior_debug_regs): New.
8719 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8720 registers, and only update the inferior on success.
8721 (i386_low_remove_watchpoint): Ditto.
8722
d26e3629
KY
87232011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8724
8725 * linux-low.c (compare_ints, unique, list_threads, show_process,
8726 linux_core_of_thread): Delete.
8727 (linux_target_ops): Change linux_core_of_thread to
8728 linux_common_core_of_thread.
8729 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8730 * utils.c (malloc_failure): Change type of argument.
8731 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8732 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8733 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8734 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8735 (IPA_OBJS): Add common-utils-ipa.o.
8736 (ptid_h, linux_osdata_h): New macros.
8737 (server_h): Add common/common-utils.h, common/xml-utils.h,
8738 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8739 common/ptid.h.
8740 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8741 ptid.o, buffer.o): New rules.
8742 (linux-low.o): Add common/linux-osdata.h as a dependency.
8743 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8744 * configure.ac: Add AC_HEADER_DIRENT check.
8745 * config.in: Regenerate.
8746 * configure: Regenerate.
8747 * remote-utils.c (xml_escape_text): Delete.
8748 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8749 buffer_xml_printf): Move to common/buffer.c.
8750 * server.c (main): Remove call to initialize_inferiors.
8751 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8752 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8753 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8754 internal_error, gdb_assert, gdb_assert_fail): Delete.
8755 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8756 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8757 common/buffer.h.
8758 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8759 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8760 initialize_inferiors): Delete.
8761
2275a1a7
PA
87622011-07-20 Pedro Alves <pedro@codesourcery.com>
8763
8764 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8765 symbol error.
8766
0a5b1e09
PA
87672011-05-31 Pedro Alves <pedro@codesourcery.com>
8768
8769 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8770 assertion.
8771 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8772
6938fd34
YQ
87732011-05-26 Yao Qi <yao@codesourcery.com>
8774
8775 * Makefile.in (thread-db.o): Track dependence to
8776 common/gdb_thread_db.h.
8777 * thread-db.c: include gdb_thread_db.h from right place.
8778
b481f9e0
TT
87792011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8780
8781 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8782 __FILE__ and __LINE__ to internal_error.
8783
98a5dd13
DE
87842011-05-13 Doug Evans <dje@google.com>
8785
8786 * thread-db.c (try_thread_db_load_from_sdir): New function.
8787 (try_thread_db_load_from_dir): New function.
8788 (thread_db_load_search): Handle $sdir, ignore $pdir.
8789 Remove trying of system directories if search of
8790 libthread-db-search-path fails, that is now done via $sdir.
8791
d248b706
KY
87922011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8793
8794 * server.c (handle_query): Add EnableDisableTracepoints to the list
8795 of supported features.
43aaf8b6 8796 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 8797 tracepoints.
43aaf8b6
PA
8798 (cmd_qtenable_disable): New.
8799 (cmd_qtstart): Install tracepoints even if disabled.
8800 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8801 receiving a QTEnable or QTDisable packet.
8802 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8803 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8804 tracepoints.
8805 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 8806
84e578fb
DE
88072011-05-10 Doug Evans <dje@google.com>
8808
8809 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8810
71f55dd8
DE
88112011-05-04 Doug Evans <dje@google.com>
8812
8813 * linux-low.c (linux_join): Skip process lookup.
8814 * spu-low.c (spu_join): Ditto.
8815 * server.c (join_inferiors_callback): Delete.
8816 (process_serial_event): For 'D' packet (detach) call join_inferior
8817 directly.
8818
4d393d60
JM
88192011-05-04 Joseph Myers <joseph@codesourcery.com>
8820
8821 * README: Don't mention xscale*-*-linux*.
8822 * configure.srv (xscale*-*-linux*): Don't handle target.
8823
b00ad6ff
NF
88242011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8825
8826 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8827 casting pointers.
8828 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8829 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8830 (i386_emit_void_call_2): Likewise.
8831
af96c192
YQ
88322011-04-26 Yao Qi <yao@codesourcery.com>
8833
43aaf8b6
PA
8834 * linux-low.c: Move common macros to linux-ptrace.h.
8835 Include linux-ptrace.h.
af96c192
YQ
8836 * Makefile.in (linux_ptrace_h): New.
8837 (linux-low.o): Depends on linux-ptrace.h.
8838
03f2bd59
JK
88392011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8840
8841 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8842 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8843 (remote_prepare): New function with most of the TCP code from ...
8844 (remote_open): ... here. Detect PORT here unconditionally. Move also
8845 setting transport_is_reliable.
8846 * server.c (run_once): New variable.
8847 (gdbserver_usage): Document it.
8848 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8849 the first run if RUN_ONCE.
8850 * server.h (run_once, remote_prepare): New declarations.
8851
7a9dd1b2
TT
88522011-04-19 Tom Tromey <tromey@redhat.com>
8853
8854 * win32-low.c (handle_load_dll): Remove duplicate "the".
8855
81239425
PM
88562011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8857
8858 Remove support for old Cygwin 1.5 versions.
8859 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8860 function to avoid warning.
8861 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8862 warning.
8863
9e0627f1
PM
88642011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8865
8866 * gdbserver/server.h (Macro _): Define it if not available.
8867
588eebee
MS
88682011-03-14 Michael Snyder <msnyder@vmware.com>
8869
348af9f7 8870 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 8871
43f70d4c
JB
88722011-03-10 Joel Brobecker <brobecker@adacore.com>
8873
8874 * Makefile.in (maintainer-clean realclean distclean): Remove
8875 "make ... subdir_do" command.
8876
348af9f7
MS
88772011-03-10 Michael Snyder <msnyder@vmware.com>
8878
8879 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8880
8881 * server.c (handle_v_run): Free alloced buffer on early return.
8882
e637a4f5
YQ
88832011-03-09 Yao Qi <yao@codesourcery.com>
8884
8885 Revert:
8886 2011-03-04 Yao Qi <yao@codesourcery.com>
8887
8888 * Makefile.in: Remove GNU make feature --directory.
8889
8890 2011-03-05 Yao Qi <yao@codesourcery.com>
8891
8892 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8893 (subdir_do): New make target. Copied from gdb/Makefile.
8894 (maintainer-clean, realclean, distclean, clean): Call corresponding
8895 make targets in common/Makefile.
8896
8897 2011-02-11 Yao Qi <yao@codesourcery.com>
8898
8899 * configure.ac: Call AC_PROG_RANLIB.
8900 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8901 * configure: Regenerate.
8902
e6edda56
JK
89032011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8904
8905 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8906
e5141119
JB
89072011-03-06 Yao Qi <yao@codesourcery.com>
8908
8909 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8910
64794aa4
JB
89112011-03-05 Yao Qi <yao@codesourcery.com>
8912
8913 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8914 (subdir_do): New make target. Copied from gdb/Makefile.
8915 (maintainer-clean, realclean, distclean, clean): Call corresponding
8916 make targets in common/Makefile.
8917
7a762829
YQ
89182011-03-04 Yao Qi <yao@codesourcery.com>
8919
8920 * Makefile.in: Remove GNU make feature --directory.
8921
348af9f7
MS
89222011-03-04 Michael Snyder <msnyder@vmware.com>
8923
8924 * server.c (queue_stop_reply): Call xmalloc not malloc.
8925
89262011-03-02 Michael Snyder <msnyder@vmware.com>
8927
8928 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8929
9f72fee2
MS
89302011-02-28 Michael Snyder <msnyder@vmware.com>
8931
588eebee
MS
8932 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8933 (cmd_qtframe): Ditto.
8934 (cmd_qtbuffer): Ditto.
8935 (cmd_bigqtbuffer): Ditto.
8936
9f72fee2
MS
8937 * utils.c (decimal2str): Initialize 'width' to nine, then
8938 don't mess with it.
8939
8040bd49
UW
89402011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8941
8942 * hostio.c (require_data): Free *data, not data.
8943
7e52cbd0
JK
89442011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8945
8946 * hostio.c (require_data): Use free, not xfree.
8947
9130f83e
MS
89482011-02-27 Michael Snyder <msnyder@vmware.com>
8949
4b812f4e
MS
8950 * server.c (handle_query): Discard unused value.
8951
9130f83e
MS
8952 * hostio.c (require_data): Free malloc memory before returning
8953 error.
8954
69d37113
MS
89552011-02-26 Michael Snyder <msnyder@vmware.com>
8956
8957 * linux-low.c (list_threads): Call closedir for dirent.
8958
35f5825a
MS
89592011-02-27 Michael Snyder <msnyder@vmware.com>
8960
2a589cef
MS
8961 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8962 a case statement falls through.
8963
0adea5f7
MS
8964 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8965
35f5825a
MS
8966 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8967 in comparison.
8968
238f1c74
MS
89692011-02-26 Michael Snyder <msnyder@vmware.com>
8970
8971 * utils.c (decimal2str): Eliminate dead code and dead param.
8972 (pulongest): Drop dead param from call to decimal2str.
8973 (plongest): Ditto.
8974
633ff500
JB
89752011-02-24 Joel Brobecker <brobecker@adacore.com>
8976
8977 Revert the following patch (not approved yet):
8978 2011-02-21 Hui Zhu <teawater@gmail.com>
8979 * tracepoint.c (tp_printf): New function.
8980 (eval_agent_expr): Handle gdb_agent_op_printf.
8981
f9c6ff72
HZ
89822011-02-21 Hui Zhu <teawater@gmail.com>
8983
8984 * tracepoint.c (tp_printf): New function.
8985 (eval_agent_expr): Handle gdb_agent_op_printf.
8986
94d5e490
TT
89872011-02-18 Tom Tromey <tromey@redhat.com>
8988
8989 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8990 (tracepoint.o): Likewise.
8991 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8992 (gdb_agent_op_names): Likewise.
8993
c7f96d2b
TT
89942011-02-18 Tom Tromey <tromey@redhat.com>
8995
8996 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8997 gdb_agent_op_rot>: New constants.
8998 (gdb_agent_op_names): Add pick and roll.
8999 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9000 cases.
9001
0feedb2c
JK
90022011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9003
9004 * aclocal.m4: Regenerated with aclocal-1.11.1.
9005
b3b9301e
PA
90062011-02-14 Pedro Alves <pedro@codesourcery.com>
9007
9008 * server.c (handle_qxfer_traceframe_info): New.
9009 (qxfer_packets): Register "traceframe-info".
9010 (handle_query): Report support for qXfer:traceframe-info:read+.
9011 * tracepoint.c (match_blocktype): New.
9012 (traceframe_find_block_type): Rename to ...
9013 (traceframe_walk_blocks): ... this. Add callback filter argument,
9014 and use it.
9015 (traceframe_find_block_type): New, reimplemented on top of
9016 traceframe_walk_blocks.
9017 (build_traceframe_info_xml): New.
9018 (traceframe_read_info): New.
9019 * server.h (traceframe_read_info): Declare.
9020
4f3e6fb7
YQ
90212011-02-11 Yao Qi <yao@codesourcery.com>
9022
9023 * configure.ac: Call AC_PROG_RANLIB.
9024 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9025 * configure: Regenerate.
9026
764880b7
PA
90272011-02-07 Pedro Alves <pedro@codesourcery.com>
9028
9029 * server.c (gdb_read_memory): Change return semantics to allow
9030 partial transfers.
9031 (handle_search_memory_1): Adjust.
9032 (process_serial_event) <'m' packet>: Handle partial transfers.
9033 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9034
1c79eb8a
PA
90352011-01-28 Pedro Alves <pedro@codesourcery.com>
9036
9037 * regcache.c (init_register_cache): Initialize
9038 regcache->register_status.
9039 (free_register_cache): Release regcache->register_status.
9040 (regcache_cpy): Copy register_status.
9041 (registers_to_string): Print 'x's for unavailable registers.
9042 (supply_register): Mark the register's status valid or
9043 unavailable, depending on whether a buffer was passed in or not.
9044 (supply_register_zeroed): New.
9045 (supply_regblock): Mark the registers' status valid or
9046 unavailable, depending on whether a buffer was passed in or not.
9047 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9048 (struct regcache): New `register_status' field.
9049 (supply_register_zeroed): Declare.
9050 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9051 supply_register_zeroed, rather than passing a NULL buffer to
9052 supply_register.
9053 * tracepoint.c (fetch_traceframe_registers): Update comment.
9054
85724a0e
PA
90552011-01-28 Pedro Alves <pedro@codesourcery.com>
9056
9057 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9058 buffer explicit.
9059
d08aafef
PA
90602011-01-25 Pedro Alves <pedro@codesourcery.com>
9061
9062 * server.h (decode_xfer_write): Change prototype.
9063 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9064 and don't extract the annex here.
9065 * server.c (decode_xfer_read): Remove `annex' parameter,
9066 and don't extract the annex here.
9067 (decode_xfer): New.
9068 (struct qxfer): New.
9069 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9070 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9071 (handle_qxfer_statictrace): New functions, abstracted out from
9072 handle_query, and made to use the struct qxfer interface.
9073 (handle_threads_qxfer_proper): Rename to ...
9074 (handle_qxfer_threads_proper): ... this.
9075 (handle_threads_qxfer): Rename to ...
9076 (handle_qxfer_threads): ... this. Adjust.
9077 (qxfer_packets): New array.
9078 (handle_qxfer): New function.
9079 (handle_query): Use handle_qxfer.
9080
493e2a69
MS
90812011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9082
9083 * gdbreplay.c: Shorten lines of >= 80 columns.
9084 * linux-low.c: Ditto.
9085 * linux-ppc-low.c: Ditto.
9086 * linux-s390-low.c: Ditto.
9087 * linux-sparc-low.c: Ditto.
9088 * linux-x86-low.c: Ditto.
9089 * linux-xtensa-low.c: Ditto.
9090 * mem-break.c: Ditto.
9091 * nto-low.c: Ditto.
9092 * regcache.h: Ditto.
9093 * remote-utils.c: Ditto.
9094 * server.c: Ditto.
9095 * server.h: Ditto.
9096 * thread-db.c: Ditto.
9097 * tracepoint.c: Ditto.
9098 * utils.c: Ditto.
9099 * win32-low.h: Ditto.
9100
44944448
JB
91012011-01-05 Joel Brobecker <brobecker@adacore.com>
9102
9103 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9104 update.
9105
71ce852c
JB
91062011-01-01 Joel Brobecker <brobecker@adacore.com>
9107
9108 * server.c (gdbserver_version): Update copyright year in version
9109 output.
9110 * gdbreplay.c (gdbreplay_version): Ditto.
9111
eb826dc6
MF
91122010-12-29 Jie Zhang <jie.zhang@analog.com>
9113
9114 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9115 * linux-bfin-low.c: New file.
9116 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9117 PT_DATA_ADDR for BFIN targets.
9118 * Makefile.in (SFILES): Add linux-bfin-low.c.
9119 (clean): Remove reg-bfin.c.
9120 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9121 * README: Mention supported Blackfin targets.
9122
39ab222a
MF
91232010-12-23 Mike Frysinger <vapier@gentoo.org>
9124
9125 * .gitignore: New file.
9126
a1f2ce7d
MF
91272010-11-16 Mike Frysinger <vapier@gentoo.org>
9128
9129 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9130
f474844c
JZ
91312010-10-22 Jie Zhang <jie@codesourcery.com>
9132
9133 * Makefile.in: Add FLAGS_TO_PASS variable.
9134 (install): Remove dependency of install-only and recursively
9135 invoke make for install-only.
9136
f1048712
DE
91372010-10-04 Doug Evans <dje@google.com>
9138
9139 * Makefile.in (uninstall): Use $(DESTDIR).
9140
b53a1623
PA
91412010-09-24 Pedro Alves <pedro@codesourcery.com>
9142
e6ee044d
PA
9143 PR gdb/11842
9144
b53a1623
PA
9145 * linux-x86-low.c (compat_siginfo_from_siginfo)
9146 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9147 si_code is < 0. Check for si_code == SI_TIMER before checking for
9148 si_code < 0.
9149
fa1bd1e4
JB
91502010-09-13 Joel Brobecker <brobecker@adacore.com>
9151
9152 * lynx-i386-low.c: New file.
9153 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9154
47fac8f8
JB
91552010-09-13 Joel Brobecker <brobecker@adacore.com>
9156
9157 * lynx-low.c (ptrace_request_to_str): Remove handling for
9158 request values that have been removed in LynxOS 5.x.
9159
1adfc54d
JB
91602010-09-13 Joel Brobecker <brobecker@adacore.com>
9161
9162 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9163 <ptrace.h>
9164
c2a66c29
NS
91652010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9166
9167 * configure.ac: Add --enable-inprocess-agent option.
9168 * configure: Rebuilt.
9169
32fcada3
YQ
91702010-09-06 Yao Qi <yao@codesourcery.com>
9171
9172 * linux-low.c (linux_kill): Remove unused variable.
9173 (linux_stabilize_threads): Likewise.
9174 * server.c (start_inferior): Likewise.
9175 (queue_stop_reply_callback): Likewise.
9176 * tracepoint.c (do_action_at_tracepoint): Likewise.
9177
0cccb683
YQ
91782010-09-06 Yao Qi <yao@codesourcery.com>
9179
9180 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9181 on return.
9182
423ec54c
JK
91832010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9184
9185 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9186
12ac6819
PA
91872010-09-06 Pedro Alves <pedro@codesourcery.com>
9188
9189 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9190 "$(IPA_DEPFILES)".
9191
8ed54b31
JB
91922010-09-01 Joel Brobecker <brobecker@adacore.com>
9193
9194 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9195 gdbserver/lynx-ppc-low.c: New files.
9196 * Makefile.in (lynx_low_h): New variable.
9197 (lynx-low.o, lynx-ppc-low.o): New rules.
9198 * configure.ac: On LynxOS, link with -lnetinet.
9199 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9200 * configure: regenerate.
9201
bb0116a4
JB
92022010-09-01 Joel Brobecker <brobecker@adacore.com>
9203
9204 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9205 * configure.ac: Add check for vasprintf and vsnprintf.
9206 * configure, config.in: Regenerate.
9207 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9208
a778ab81 92092010-09-01 Joel Brobecker <brobecker@adacore.com>
9210
9211 * gdbreplay.c: Move include of alloca.h up, next to include of
9212 malloc.h.
9213 * server.h: Add include of malloc.h.
9214 * mem-break.c: Remove include of malloc.h.
9215 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9216
8b034a19 92172010-09-01 Joel Brobecker <brobecker@adacore.com>
9218
9219 * Makefile.in (memmem.o): Build with -Wno-error.
9220
92212010-09-01 Joel Brobecker <brobecker@adacore.com>
9222
9223 * utils.c (xsnprintf): Make non-static.
9224 * server.h: Add xsnprintf declaration.
9225 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9226 replace calls to snprintf by calls to xsnprintf throughout.
9227
92282010-09-01 Joel Brobecker <brobecker@adacore.com>
9229
9230 * configure.ac: Add configure check for alloca.
9231 * configure, config.in: Regenerate.
9232 * server.h: Include alloca.h if it exists.
9233 * gdbreplay.c: Include alloca.h if it exists.
9234
1a981360
PA
92352010-08-28 Pedro Alves <pedro@codesourcery.com>
9236
9237 * linux-low.c (__SIGRTMIN): Define if not already defined.
9238 (linux_create_inferior): Check for __ANDROID__ rather than
9239 __SIGRTMIN.
9240 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9241 are already deferred.
9242 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9243 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9244 stopped and already has a pending signal to report.
9245 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9246 a pending signal to report or is moving out of a jump pad.
9247 (linux_init_signals): Check for __ANDROID__ rather than
9248 __SIGRTMIN.
9249
b4d51a55
PA
92502010-08-28 Pedro Alves <pedro@codesourcery.com>
9251
9252 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9253 debug_threads check. Avoid a linear search when not doing debug
9254 output.
9255
ec48365d
PA
92562010-08-27 Pedro Alves <pedro@codesourcery.com>
9257
9258 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9259 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9260 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9261 (process_event): Change local fd's type to gdb_fildes_t.
9262 (create_file_handler): Adjust prototype.
9263 (delete_file_handler): Adjust prototype.
9264 (handle_file_event): Adjust prototype. Use pfildes.
9265 (create_file_event): Adjsut prototype.
9266 * remote-utils.c (remote_desc, listen_desc): Change type to
9267 gdb_fildes_t.
9268 * server.h: New gdb_fildes_t typedef.
9269 [USE_WIN32API]: Include winsock2.h.
9270 (delete_file_handler, add_file_handler): Adjust prototypes.
9271 (pfildes): Declare.
9272 * utils.c (pfildes): New.
9273
854d88f0
PA
92742010-08-27 Pedro Alves <pedro@codesourcery.com>
9275
9276 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9277 * configure: Regenerate.
9278
0146f85b
PA
92792010-08-27 Pedro Alves <pedro@codesourcery.com>
9280
9281 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9282 (linux_done_accessing_memory): ... this.
9283 (linux_target_ops): Adjust.
9284 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9285 * nto-low.c (nto_target_ops): Adjust comment.
9286 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9287 * spu-low.c (spu_target_ops): Adjust comment.
9288 * target.h (target_ops): Rename unprepare_to_access_memory field
9289 to done_accessing_memory.
9290 (unprepare_to_access_memory): Rename to ...
9291 (done_accessing_memory): ... this.
9292
90d74c30
PA
92932010-08-26 Pedro Alves <pedro@codesourcery.com>
9294
9295 * linux-low.c (linux_prepare_to_access_memory): New.
9296 (linux_unprepare_to_access_memory): New.
9297 (linux_target_ops): Install them.
9298 * server.c (read_memory): Rename to ...
9299 (gdb_read_memory): ... this. Use
9300 prepare_to_access_memory/prepare_to_access_memory.
9301 (write_memory): Rename to ...
9302 (gdb_write_memory): ... this. Use
9303 prepare_to_access_memory/prepare_to_access_memory.
9304 (handle_search_memory_1): Adjust.
9305 (process_serial_event): Adjust.
9306 * target.h (struct target_ops): New fields
9307 prepare_to_access_memory and unprepare_to_access_memory.
9308 (prepare_to_access_memory, unprepare_to_access_memory): New.
9309 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9310 prepare_to_access_memory/prepare_to_access_memory.
9311 * nto-low.c (nto_target_ops): Adjust.
9312 * spu-low.c (spu_target_ops): Adjust.
9313 * win32-low.c (win32_target_ops): Adjust.
9314
fd467969
PA
93152010-08-26 Pedro Alves <pedro@codesourcery.com>
9316
9317 * Makefile.in (WARN_CFLAGS): Get it from configure.
9318 (WERROR_CFLAGS): New.
9319 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9320 * configure.ac: Introduce --enable-werror, which adds -Werror to
9321 the compiler command line. Enabled by default. Disable with
9322 --disable-werror. Add -Wdeclaration-after-statement
9323 Wpointer-arith and -Wformat-nonliteral to warning flags.
9324 * configure: Regenerate.
9325
331e2f5f
PA
93262010-08-26 Pedro Alves <pedro@codesourcery.com>
9327
9328 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9329
e581f2b4
PA
93302010-08-26 Pedro Alves <pedro@codesourcery.com>
9331
9332 * gdbreplay.c (remote_error): New.
9333 (gdbchar): New.
9334 (expect): Use gdbchar. Check for error reading from GDB.
9335 Clarify sync error output.
9336 (play): Check for errors writing to GDB.
9337 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9338 * remote-utils.c (getpkt): Check for errors writing to the remote
9339 descriptor.
9340
3c11dd79
PA
93412010-08-25 Pedro Alves <pedro@codesourcery.com>
9342
9343 * linux-low.c (linux_wait_1): Move non-debugging code out of
9344 `debug_threads' control.
9345
d20a8ad9
PA
93462010-08-25 Pedro Alves <pedro@codesourcery.com>
9347
9348 * linux-low.c (linux_wait_1): Don't set last_status here.
9349 * server.c (push_event, queue_stop_reply_callback): Assert we're
9350 not pushing a TARGET_WAITKIND_IGNORE event.
9351 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9352 (myresume, handle_target_event): Set the thread's last_resume_kind
9353 and last_status from the target returned status.
9354
964e4306
PA
93552010-08-25 Pedro Alves <pedro@codesourcery.com>
9356
9357 PR threads/10729
9358
9359 * linux-x86-low.c (update_debug_registers_callback): New.
9360 (i386_dr_low_set_addr): Use it.
9361 (i386_dr_low_get_addr): New.
9362 (i386_dr_low_set_control): Use update_debug_registers_callback.
9363 (i386_dr_low_get_control): New.
9364 (i386_dr_low_get_status): Adjust.
9365 * linux-low.c (linux_stop_lwp): New.
9366 * linux-low.h (linux_stop_lwp): Declare.
9367
9368 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9369 argument instead of a i386_debug_reg_state.
9370 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9371 a i386_debug_reg_state.
9372 (i386_insert_aligned_watchpoint): Adjust.
9373 (i386_remove_aligned_watchpoint): Adjust.
9374 (i386_low_stopped_data_address): Read the debug registers from the
9375 inferior instead of from the mirrors.
9376 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9377 (i386_dr_low_get_addr): Declare.
9378 (i386_dr_low_get_control): Declare.
9379 (i386_dr_low_get_status): Change prototype.
9380
9381 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9382 (i386_dr_low_get_addr): New.
9383 (i386_dr_low_get_control): New.
9384 (i386_dr_low_get_status): Adjust prototype. Return
9385 dr_status_mirror.
9386 (i386_initial_stuff): Clear dr_status_mirror and
9387 dr_control_mirror.
9388 (i386_get_thread_context): Adjust.
9389 (i386_set_thread_context): Adjust.
9390 (i386_thread_added): Adjust.
9391
5f21a75b
PA
93922010-08-24 Pedro Alves <pedro@codesourcery.com>
9393
9394 * linux-low.h (linux_thread_area): Delete declaration.
9395
3e4c1235
TS
93962010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9397
9398 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9399 after its termination.
9400
1971b033
PA
94012010-08-09 Pedro Alves <pedro@codesourcery.com>
9402
9403 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9404 (gdb_wants_all_stopped): Delete.
9405 (linux_wait_1): Don't call them.
9406 * server.c (handle_v_cont): Tag all threads as want-stopped.
9407 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9408 stopped as "client-wants-stopped".
9409
310444ac
PA
94102010-07-31 Pedro Alves <pedro@codesourcery.com>
9411
9412 * Makefile.in (signals_h): New.
9413 (server_h): Depend on it.
9414 (server.o): Don't depend on $(signals_def).
9415 (signals.o): Depend on $(signals_def).
9416
a19cae16
JK
94172010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9418
9419 * Makefile.in (signals_def): New.
9420 (server_h): Append include/gdb/signals.h and signals_def.
9421 (server.o): Append signals_def.
9422
30d50328
JK
94232010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9424
9425 * server.c (handle_target_event): Use target_signal_to_host for
9426 resume_info.sig initialization.
9427 * target.h (struct thread_resume) <sig>: New comment.
9428
5c3216e2
OS
94292010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9430
c6f46ca0
OS
9431 * server.c (handle_query): strcpy() the returned string from paddress()
9432 instead of sprintf().
5c3216e2
OS
9433 * utils.c (paddress): Return phex_nz().
9434
6bd31874
JB
94352010-07-07 Joel Brobecker <brobecker@adacore.com>
9436
9437 * server.c (handle_v_cont): Call mourn_inferior if process
9438 just exited.
9439 (myresume): Likewise.
9440
0fb4aa4b
PA
94412010-07-01 Pedro Alves <pedro@codesourcery.com>
9442
9443 Static tracepoints, and integration with UST.
9444
9445 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9446 * mem-break.c (uninsert_all_breakpoints)
9447 (reinsert_all_breakpoints): New.
9448 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9449 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9450 (gdb_agent_ust_loaded, helper_thread_id)
9451 (gdb_agent_helper_thread_id): New macros.
9452 (struct ipa_sym_addresses): Add addr_ust_loaded,
9453 addr_helper_thread_id, addr_cmd_buf.
9454 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9455 (in_process_agent_loaded_ust): New.
9456 (write_e_ust_not_loaded): New.
9457 (maybe_write_ipa_ust_not_loaded): New.
9458 (struct collect_static_trace_data_action): New.
9459 (enum tracepoint_type) <static_tracepoint>: New.
9460 (struct tracepoint) <handle>: Mention static tracepoints.
9461 (struct static_tracepoint_ctx): New.
9462 (CMD_BUF_SIZE): New.
9463 (add_tracepoint_action): Handle static tracepoint actions.
9464 (unprobe_marker_at): New.
9465 (clear_installed_tracepoints): Handle static tracepoints.
9466 (cmd_qtdp): Handle static tracepoints.
9467 (probe_marker_at): New.
9468 (cmd_qtstart): Handle static tracepoints.
9469 (response_tracepoint): Handle static tracepoints.
9470 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9471 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9472 (get_context_regcache): Handle static tracepoints.
9473 (do_action_at_tracepoint): Handle static tracepoint actions.
9474 (traceframe_find_block_type): Handle static trace data blocks.
9475 (traceframe_read_sdata): New.
9476 (download_tracepoints): Download static tracepoint actions.
9477 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9478 (GDB_PROBE_NAME): New.
9479 (ust_ops): New.
9480 (GET_UST_SYM): New.
9481 (USTF): New.
9482 (dlsym_ust): New.
9483 (ust_marker_to_static_tracepoint): New.
9484 (gdb_probe): New.
9485 (collect_ust_data_at_tracepoint): New.
9486 (gdb_ust_probe): New.
9487 (UNIX_PATH_MAX, SOCK_DIR): New.
9488 (gdb_ust_connect_sync_socket): New.
9489 (resume_thread, stop_thread): New.
9490 (run_inferior_command): New.
9491 (init_named_socket): New.
9492 (gdb_ust_socket_init): New.
9493 (cstr_to_hexstr): New.
9494 (next_st): New.
9495 (first_marker, next_marker): New.
9496 (response_ust_marker): New.
9497 (cmd_qtfstm, cmd_qtsstm): New.
9498 (unprobe_marker_at, probe_marker_at): New.
9499 (cmd_qtstmat, gdb_ust_thread): New.
9500 (gdb_ust_init): New.
9501 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9502 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9503 (ST_REGENTRY): New.
9504 (x86_64_st_collect_regmap): New.
9505 (X86_64_NUM_ST_COLLECT_GREGS): New.
9506 (AMD64_RIP_REGNUM): New.
9507 (supply_static_tracepoint_registers): New.
9508 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9509 (ST_REGENTRY): New.
9510 (i386_st_collect_regmap): New.
9511 (i386_NUM_ST_COLLECT_GREGS): New.
9512 (supply_static_tracepoint_registers): New.
9513 * server.c (handle_query): Handle qXfer:statictrace:read.
9514 <qSupported>: Report support for StaticTracepoints, and
9515 qXfer:statictrace:read features.
9516 * server.h (traceframe_read_sdata)
9517 (supply_static_tracepoint_registers): Declare.
9518 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9519 (unpack_varlen_hex): Include in IPA build.
9520 * Makefile.in (ustlibs, ustinc): New.
9521 (IPA_OBJS): Add remote-utils-ipa.o.
9522 ($(IPA_LIB)): Link -ldl and -lpthread.
9523 (UST_CFLAGS): New.
9524 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9525 * config.in, configure: Regenerate.
9526
9e4344e5
PA
95272010-06-20 Ian Lance Taylor <iant@google.com>
9528 Pedro Alves <pedro@codesourcery.com>
9529
9530 * linux-x86-low.c (always_true): Delete.
9531 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9532 trying to fool the compiler with always_true.
9533
c6beb2cb
PA
95342010-06-20 Pedro Alves <pedro@codesourcery.com>
9535
9536 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9537 conditions in gdbserver.
9538
d2ed6730
UW
95392010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9540
9541 * spu-low.c (spu_read_memory): Wrap around local store limit.
9542 (spu_write_memory): Likewise.
9543
4e29fb54
PA
95442010-06-15 Pedro Alves <pedro@codesourcery.com>
9545
9546 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9547 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9548 LONGEST uses.
9549 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9550 uses.
9551 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9552 uses with LONGEST uses.
9553
6a271cae
PA
95542010-06-14 Stan Shebs <stan@codesourcery.com>
9555 Pedro Alves <pedro@codesourcery.com>
9556
9557 Bytecode compiler.
9558
9559 * linux-x86-low.c: Include limits.h.
9560 (add_insns): New.
9561 (always_true): New.
9562 (EMIT_ASM): New.
9563 (EMIT_ASM32): New.
9564 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9565 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9566 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9567 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9568 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9569 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9570 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9571 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9572 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9573 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9574 (amd64_emit_void_call_2): New.
9575 (amd64_emit_ops): New.
9576 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9577 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9578 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9579 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9580 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9581 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9582 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9583 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9584 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9585 (i386_emit_stack_adjust, i386_emit_int_call_1)
9586 (i386_emit_void_call_2): New.
9587 (i386_emit_ops): New.
9588 (x86_emit_ops): New.
9589 (the_low_target): Install x86_emit_ops.
9590 * server.h (struct emit_ops): New.
9591 (get_raw_reg_func_addr): Declare.
9592 (current_insn_ptr, emit_error): Declare.
9593 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9594 (set_trace_state_variable_value): New defines.
9595 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9596 addr_get_trace_state_variable_value and
9597 addr_set_trace_state_variable_value.
9598 (symbol_list): New fields for get_raw_reg,
9599 get_trace_state_variable_value and set_trace_state_variable_value.
9600 (condfn): New typedef.
9601 (struct tracepoint): New field `compiled_cond'.
9602 (do_action_at_tracepoint): Clear compiled_cond.
9603 (get_trace_state_variable_value, set_trace_state_variable_value):
9604 Export in the IPA.
9605 (condition_true_at_tracepoint): If there's a compiled condition,
9606 run that.
9607 (current_insn_ptr, emit_error): New globals.
9608 (struct bytecode_address): New.
9609 (get_raw_reg_func_addr): New.
9610 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9611 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9612 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9613 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9614 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9615 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9616 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9617 (compile_tracepoint_condition, compile_bytecodes): New.
9618 * target.h (emit_ops): Forward declare.
9619 (struct target_ops): New field emit_ops.
9620 (target_emit_ops): New.
9621 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9622 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9623 * linux-low.c (linux_emit_ops): New.
9624 (linux_target_ops): Install it.
9625 * linux-low.h (struct linux_target_ops): New field emit_ops.
9626
92b72907
UW
96272010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9628
9629 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9630 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9631
fa593d66
PA
96322010-06-01 Pedro Alves <pedro@codesourcery.com>
9633 Stan Shebs <stan@codesourcery.com>
9634
9635 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9636 (all): Depend on $(extra_libraries).
9637 (install-only): Install the IPA.
9638 (IPA_OBJS, IPA_LIB): New.
9639 (clean): Remove the IPA lib.
9640 (IPAGENT_CFLAGS): New.
9641 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9642 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9643 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9644 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9645 * configure.ac: Check for atomic builtins support in the compiler.
9646 (IPA_DEPFILES, extra_libraries): Define.
9647 * configure.srv (ipa_obj): Add description.
9648 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9649 (i[34567]86-*-linux*): Set ipa_obj.
9650 (x86_64-*-linux*): Set ipa_obj.
9651 * linux-low.c (stabilizing_threads): New.
9652 (supports_fast_tracepoints): New.
9653 (linux_detach): Stabilize threads before detaching.
9654 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9655 the lwp is either not stabilizing, or is moving out of a jump pad.
9656 (linux_fast_tracepoint_collecting): New.
9657 (maybe_move_out_of_jump_pad): New.
9658 (enqueue_one_deferred_signal): New.
9659 (dequeue_one_deferred_signal): New.
9660 (linux_wait_for_event_1): If moving out of a jump pad, defer
9661 pending signals to later.
9662 (linux_stabilize_threads): New.
9663 (linux_wait_1): Check if threads need moving out of jump pads, and
9664 do it if so.
9665 (stuck_in_jump_pad_callback): New.
9666 (move_out_of_jump_pad_callback): New.
9667 (lwp_running): New.
9668 (linux_resume_one_lwp): Handle moving out of jump pads.
9669 (linux_set_resume_request): Dequeue deferred signals.
9670 (need_step_over_p): Also step over fast tracepoint jumps.
9671 (start_step_over): Also uninsert fast tracepoint jumps.
9672 (finish_step_over): Also reinsert fast tracepoint jumps.
9673 (linux_install_fast_tracepoint_jump): New.
9674 (linux_target_ops): Install linux_stabilize_threads and
9675 linux_install_fast_tracepoint_jump_pad.
9676 * linux-low.h (linux_target_ops) <get_thread_area,
9677 install_fast_tracepoint_jump_pad>: New fields.
9678 (struct lwp_info) <collecting_fast_tracepoint,
9679 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9680 (linux_get_thread_area): Declare.
9681 * linux-x86-low.c (jump_insn): New.
9682 (x86_get_thread_area): New.
9683 (append_insns): New.
9684 (push_opcode): New.
9685 (amd64_install_fast_tracepoint_jump_pad): New.
9686 (i386_install_fast_tracepoint_jump_pad): New.
9687 (x86_install_fast_tracepoint_jump_pad): New.
9688 (the_low_target): Install x86_get_thread_area and
9689 x86_install_fast_tracepoint_jump_pad.
9690 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9691 (struct fast_tracepoint_jump): New.
9692 (fast_tracepoint_jump_insn): New.
9693 (fast_tracepoint_jump_shadow): New.
9694 (find_fast_tracepoint_jump_at): New.
9695 (fast_tracepoint_jump_here): New.
9696 (delete_fast_tracepoint_jump): New.
9697 (set_fast_tracepoint_jump): New.
9698 (uninsert_fast_tracepoint_jumps_at): New.
9699 (reinsert_fast_tracepoint_jumps_at): New.
9700 (set_breakpoint_at): Use write_inferior_memory.
9701 (uninsert_raw_breakpoint): Use write_inferior_memory.
9702 (check_mem_read): Mask out fast tracepoint jumps.
9703 (check_mem_write): Mask out fast tracepoint jumps.
9704 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9705 (set_fast_tracepoint_jump): Declare.
9706 (delete_fast_tracepoint_jump)
9707 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9708 (reinsert_fast_tracepoint_jumps_at): Declare.
9709 * regcache.c: Don't compile many functions when building the
9710 in-process agent library.
9711 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9712 the register buffer in the heap.
9713 (free_register_cache): If the register buffer isn't owned by the
9714 regcache, don't free it.
9715 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9716 pre-existing register caches.
9717 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9718 type.
9719 (convert_ascii_to_int): : Constify `from' parameter type.
9720 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9721 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9722 the needed buffer in-place.
9723 (relocate_instruction): New.
9724 * server.c (handle_query) <qSymbols>: If the target supports
9725 tracepoints, give it a chance of looking up symbols. Report
9726 support for fast tracepoints.
9727 (handle_status): Stabilize threads.
9728 (process_serial_event): Adjust.
9729 * server.h (struct fast_tracepoint_jump): Forward declare.
9730 (struct process_info) <fast_tracepoint_jumps>: New field.
9731 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9732 (decode_X_packet, decode_M_packet): Adjust.
9733 (relocate_instruction): Declare.
9734 (in_process_agent_loaded): Declare.
9735 (tracepoint_look_up_symbols): Declare.
9736 (struct fast_tpoint_collect_status): Declare.
9737 (fast_tracepoint_collecting): Declare.
9738 (force_unlock_trace_buffer): Declare.
9739 (handle_tracepoint_bkpts): Declare.
9740 (initialize_low_tracepoint)
9741 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9742 * target.h (struct target_ops) <stabilize_threads,
9743 install_fast_tracepoint_jump_pad>: New fields.
9744 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9745 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9746 [HAVE_STDINT_H]: Include stdint.h.
9747 (trace_debug_1): Rename to ...
9748 (trace_vdebug): ... this.
9749 (trace_debug): Rename to ...
9750 (trace_debug_1): ... this. Add `level' parameter.
9751 (trace_debug): New.
9752 (ATTR_USED, ATTR_NOINLINE): New.
9753 (IP_AGENT_EXPORT): New.
9754 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9755 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9756 (about_to_request_buffer_space, trace_buffer_is_full)
9757 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9758 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9759 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9760 (traceframe_write_count, traceframes_created)
9761 (trace_state_variables)
9762 New renaming defines.
9763 (struct ipa_sym_addresses): New.
9764 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9765 (symbol_list): New.
9766 (ipa_sym_addrs): New.
9767 (all_tracepoint_symbols_looked_up): New.
9768 (in_process_agent_loaded): New.
9769 (write_e_ipa_not_loaded): New.
9770 (maybe_write_ipa_not_loaded): New.
9771 (tracepoint_look_up_symbols): New.
9772 (debug_threads) [IN_PROCESS_AGENT]: New.
9773 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9774 (UNKNOWN_SIDE_EFFECTS): New.
9775 (stop_tracing): New.
9776 (flush_trace_buffer): New.
9777 (stop_tracing_bkpt): New.
9778 (flush_trace_buffer_bkpt): New.
9779 (read_inferior_integer): New.
9780 (read_inferior_uinteger): New.
9781 (read_inferior_data_pointer): New.
9782 (write_inferior_data_pointer): New.
9783 (write_inferior_integer): New.
9784 (write_inferior_uinteger): New.
9785 (struct collect_static_trace_data_action): Delete.
9786 (enum tracepoint_type): New.
9787 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
9788 <actions_str, step_actions, step_actions_str>: Only include in
9789 GDBserver.
fa593d66
PA
9790 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9791 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9792 (tracepoints): Use IP_AGENT_EXPORT.
9793 (last_tracepoint): Don't include in the IPA.
9794 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9795 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9796 (alloced_trace_state_variables): New.
9797 (trace_state_variables): Use IP_AGENT_EXPORT.
9798 (traceframe_t): Delete unused variable.
9799 (circular_trace_buffer): Don't include in the IPA.
9800 (trace_buffer_start): Delete.
9801 (struct trace_buffer_control): New.
9802 (trace_buffer_free): Delete.
9803 (struct ipa_trace_buffer_control): New.
9804 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9805 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9806 New.
9807 (trace_buffer_ctrl): New.
9808 (TRACE_BUFFER_CTRL_CURR): New.
9809 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9810 Reimplement as macros.
9811 (trace_buffer_wrap): Delete.
9812 (traceframe_write_count, traceframe_read_count)
9813 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9814 (struct tracepoint_hit_ctx) <type>: New field.
9815 (struct fast_tracepoint_ctx): New.
9816 (memory_barrier): New.
9817 (cmpxchg): New.
9818 (record_tracepoint_error): Update atomically in the IPA.
9819 (clear_inferior_trace_buffer): New.
9820 (about_to_request_buffer_space): New.
9821 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9822 updating the same buffer.
9823 (add_tracepoint): Default the tracepoint's type to trap
9824 tracepoint, and orig_size to -1.
9825 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9826 internal variables.
9827 (create_trace_state_variable): New parameter `gdb'. Handle it.
9828 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9829 (cmd_qtdp): Handle fast tracepoints.
9830 (cmd_qtdv): Adjust.
9831 (max_jump_pad_size): New.
9832 (gdb_jump_pad_head): New.
9833 (get_jump_space_head): New.
9834 (claim_jump_space): New.
9835 (sort_tracepoints): New.
9836 (MAX_JUMP_SIZE): New.
9837 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9838 IPA.
9839 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9840 support. Upload fast traceframes, and delete internal IPA
9841 breakpoints.
9842 (stop_tracing_handler): New.
9843 (flush_trace_buffer_handler): New.
9844 (cmd_qtstop): Upload fast tracepoints.
9845 (response_tracepoint): Handle fast tracepoints.
9846 (tracepoint_finished_step): Upload fast traceframes. Set the
9847 tracepoint hit context's tracepoint type.
9848 (handle_tracepoint_bkpts): New.
9849 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9850 type. Add comment about fast tracepoints.
9851 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9852 non-existing action_str field.
9853 (get_context_regcache): Handle fast tracepoints.
9854 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9855 to the regcache.
9856 (fast_tracepoint_from_jump_pad_address): New.
9857 (fast_tracepoint_from_ipa_tpoint_address): New.
9858 (collecting_t): New.
9859 (force_unlock_trace_buffer): New.
9860 (fast_tracepoint_collecting): New.
9861 (collecting): New.
9862 (gdb_collect): New.
9863 (write_inferior_data_ptr): New.
9864 (target_tp_heap): New.
9865 (target_malloc): New.
9866 (download_agent_expr): New.
9867 (UALIGN): New.
9868 (download_tracepoints): New.
9869 (download_trace_state_variables): New.
9870 (upload_fast_traceframes): New.
9871 (IPA_FIRST_TRACEFRAME): New.
9872 (IPA_NEXT_TRACEFRAME_1): New.
9873 (IPA_NEXT_TRACEFRAME): New.
9874 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9875 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9876 (gdb_jump_pad_buffer_end): New.
9877 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9878 (initialize_tracepoint): Adjust.
9879 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9880 buffer. Initialize the low module.
9881 * utils.c (PREFIX, TOOLNAME): New.
9882 (malloc_failure): Use PREFIX.
9883 (error): In the IPA, an error causes an exit.
9884 (fatal, warning): Use PREFIX.
9885 (internal_error): Use TOOLNAME.
9886 (NUMCELLS): Increase to 10.
9887 * configure, config.in: Regenerate.
9888
d149dd1d
PA
98892010-06-01 Pedro Alves <pedro@codesourcery.com>
9890
9891 * server.c (handle_query) <qSupported>: Do two passes over the
9892 qSupported string to avoid nesting strtok.
9893
f6528abd
JK
98942010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9895
9896 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9897 (CDEPS): New.
9898 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9899 -Wl,--dynamic-list.
9900 * configure: Regenerate.
9901 * proc-service.list: New.
9902
ca2a87a0
JK
99032010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9904
9905 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9906 New comment.
9907
363a6e9f
OS
99082010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9909
9910 * gdbreplay.c (remote_open): Check error return from socket() call by
9911 its equality to -1 not by it being negative.
9912 * remote-utils.c (remote_open): Likewise.
9913
d23b6cb1
PA
99142010-05-23 Pedro Alves <pedro@codesourcery.com>
9915
9916 * config.h: Regenerate.
9917
28d3cf85
MK
99182010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9919
9920 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9921 doesn't provide PTRACE_GET_THREAD_AREA.
9922
fea36a59
MK
99232010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9924
9925 * linux-m68k-low.c: Include <asm/ptrace.h>
9926 (ps_get_thread_area): Implement.
9927
24b066ba
DE
99282010-05-03 Doug Evans <dje@google.com>
9929
9930 * event-loop.c (struct callback_event): New struct.
9931 (callback_list): New global.
9932 (append_callback_event, delete_callback_event): New functions.
9933 (process_callback): New function.
9934 (start_event_loop): Call it.
9935 * remote-utils.c (NOT_SCHEDULED): Define.
9936 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9937 moved out of readchar.
9938 (readchar): Rewrite. Call reschedule before returning.
9939 (reset_readchar): New function.
9940 (remote_close): Call it.
9941 (process_remaining, reschedule): New functions.
9942 * server.h (callback_handler_func): New typedef.
9943 (append_callback_event, delete_callback_event): Declare.
9944
9836d6ea
PA
99452010-05-03 Pedro Alves <pedro@codesourcery.com>
9946
9947 * proc-service.c (ps_pglobal_lookup): Use
9948 thread_db_look_up_one_symbol.
9949 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9950 parameter. Use it instead of all_symbols_looked_up.
9951 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9952 field.
9953 (all_symbols_looked_up): Don't declare.
9954 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9955 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9956 field.
9957 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9958 Set all_symbols_looked_up here.
9959 (thread_db_look_up_one_symbol): New.
9960 (thread_db_get_tls_address): Adjust.
9961 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9962 thread_db object on the heap, and tentatively set it in the
9963 process structure.
9964 (thread_db_init): Don't set all_symbols_looked_up here.
9965 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9966
7984d532
PA
99672010-05-03 Pedro Alves <pedro@codesourcery.com>
9968
9969 * linux-low.c (linux_kill, linux_detach): Adjust.
9970 (status_pending_p_callback): Remove redundant statement. Check
9971 for !TARGET_WAITIKIND_IGNORE, instead of
9972 TARGET_WAITKIND_STOPPED.
9973 (handle_tracepoints): Make sure LWP is locked. Adjust.
9974 (linux_wait_for_event_1): Adjust.
9975 (linux_cancel_breakpoints): New.
9976 (unsuspend_one_lwp): New.
9977 (unsuspend_all_lwps): New.
9978 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9979 (send_sigstop_callback): Change return type to int, add new
9980 `except' parameter and handle it.
9981 (suspend_and_send_sigstop_callback): New.
9982 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9983 pass them down. If SUSPEND, also increment the lwp's suspend
9984 count.
9985 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9986 (need_step_over_p): Don't consider suspended LWPs.
9987 (start_step_over): Adjust.
9988 (proceed_one_lwp): Change return type to int, add new `except'
9989 parameter and handle it.
9990 (unsuspend_and_proceed_one_lwp): New.
9991 (proceed_all_lwps): Use find_inferior instead of
9992 for_each_inferior.
9993 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9994 also decrement the suspend count of LWPs. Pass `except' down,
9995 instead of hacking its suspend count.
9996 (linux_pause_all): Add `freeze' parameter. Adjust.
9997 (linux_unpause_all): New.
9998 (linux_target_ops): Install linux_unpause_all.
9999 * server.c (handle_status): Adjust.
10000 * target.h (struct target_ops): New fields `unpause_all' and
10001 `cancel_breakpoints'. Add new parameter to `pause_all'.
10002 (pause_all): Add new `freeze' parameter.
10003 (unpause_all): New.
10004 (cancel_breakpoints): New.
10005 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10006 cancel breakpoints.
10007 (cmd_qtstart): Pause threads.
10008 (stop_tracing): Pause threads, and cancel breakpoints.
10009 * win32-low.c (win32_target_ops): Adjust.
10010
e471f25b
PA
100112010-05-03 Pedro Alves <pedro@codesourcery.com>
10012
10013 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10014 the inferior right away from here...
10015 (linux_wait_1): ... to here, and adjust to check the thread's
10016 last_resume_kind instead of the lwp's step or stop_expected flags.
10017
1915ef4f
PA
100182010-05-02 Pedro Alves <pedro@codesourcery.com>
10019
10020 * README: Use consistent `GDB' and `GDBserver' spellings.
10021
f9e39928
PA
100222010-05-02 Pedro Alves <pedro@codesourcery.com>
10023
10024 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10025 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10026 (linux_detach_one_lwp): Assume the lwp is stopped.
10027 (any_thread_of): Delete.
10028 (linux_detach): Stop all lwps here. Don't blindly delete all
10029 breakpoints.
10030 (delete_lwp_callback): New.
10031 (linux_mourn): Delete all lwps of the process that is gone.
10032 (linux_wait_1): Don't delete the last lwp of the process here.
10033 * mem-break.h (mark_breakpoints_out): Declare.
10034 * mem-break.c (mark_breakpoints_out): New.
10035 (free_all_breakpoints): Use it.
10036 * server.c (handle_target_event): If the process is gone, mark
10037 breakpoints out.
10038 * thread-db.c (struct thread_db) <create_bp>: New field.
10039 (thread_db_enable_reporting): Fix prototype. Store a thread event
10040 breakpoint reference in the thread_db struct.
10041 (thread_db_load_search): Clear the thread_db object.
10042 (try_thread_db_load_1): Ditto.
10043 (switch_to_process): New.
10044 (disable_thread_event_reporting): Use it.
10045 (remove_thread_event_breakpoints): New.
10046 (thread_db_detach, thread_db_mourn): Use it.
10047
1e7fc18c
PA
100482010-05-01 Pedro Alves <pedro@codesourcery.com>
10049
10050 * linux-low.c (linux_enable_event_reporting): New.
10051 (linux_wait_for_event_1, handle_extended_wait): Use it.
10052
02fc4de7
PA
100532010-04-30 Pedro Alves <pedro@codesourcery.com>
10054
10055 * linux-low.c (linux_kill_one_lwp, linux_kill)
10056 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10057 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10058 SIGSTOP even if the LWP is stopped.
10059 (send_sigstop_callback): New.
10060 (stop_all_lwps): Use send_sigstop_callback instead.
10061 (linux_resume_one_thread): Adjust.
10062 (proceed_one_lwp): Still proceed an LWP that the client has
10063 requested to stop, if we haven't reported it as stopped yet. Make
10064 sure that LWPs the client want stopped, have a pending SIGSTOP.
10065
bc3b5632
DE
100662010-04-26 Doug Evans <dje@google.com>
10067
ae1ada35
DE
10068 * server.c (handle_general_set): Make static.
10069
bc3b5632
DE
10070 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10071 Print received char after testing for error/eof instead of before.
10072 (input_interrupt): Tweak comment.
10073
65730243
DE
100742010-04-23 Doug Evans <dje@google.com>
10075
10076 * server.c (start_inferior): Print inferior argv if --debug.
10077
a8ae7dc0
AR
100782010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10079
10080 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10081 * nto-x86-low.c: Include server.h
10082
1c07cc19
PM
100832010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10084
10085 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10086 be consistent with other sources of this directory.
10087 (init_registers_amd64): Correct name of source file of this function
10088 in the comment.
10089
e0a61e09
PM
100902010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10091
10092 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10093 64-bit executables.
10094
54709339
PM
100952010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10096
10097 * win32-i386-low.c: Add 64-bit support.
10098 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10099 (init_registers_amd64): Declare.
10100 (mappings): Add 64-bit version of array.
10101 (init_windows_x86): New function.
10102 (the_low_target): Change init_arch field to init_windows_x86.
10103
e8f0053d
PM
101042010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10105
10106 * win32-low.c: Adapt to support also 64-bit architecture.
10107 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10108 (get_image_name): Use SIZE_T type for local variable `done'.
10109 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10110 (toolhelp_get_dll_name): Idem.
10111 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10112 Use uintptr_t typecast to avoid warning.
10113 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10114 (handle_exception): Use phex_nz to avoid warning.
10115 (win32_wait): Remove unused local variable `process'.
10116
c481e77e
PM
101172010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10118
10119 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10120 `amd64-avx.o'.
10121
12ea4b69
PM
101222010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10123
10124 * configure.ac: Use `ws2_32' library for srv_mingw.
10125 * configure: Regenerate.
10126 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10127 * remote-utils.c: Likewise.
10128
f6d1620c
L
101292010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10130
10131 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10132 if __x86_64__ is defined.
10133
8e642873
PM
101342010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10135
10136 * configure: Regenerate.
10137
711e434b
PM
101382010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10139
10140 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10141 * target.h (target_ops): New get_tib_address field.
10142 * win32-low.h (win32_thread_info): Add thread_local_base field.
10143 * win32-low.c (child_add_thread): Add tlb argument.
10144 Set thread_local_base field to TLB.
10145 (get_child_debug_event): Adapt to child_add_thread change.
10146 (win32_get_tib_address): New function.
10147 (win32_target_ops): Set get_tib_address field to
10148 win32_get_tib_address.
10149 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10150
505106cd
PA
101512010-04-12 Pedro Alves <pedro@codesourcery.com>
10152
505106cd
PA
10153 * linux-low.c (linux_mourn): Also remove the process.
10154 * server.c (handle_target_event): Don't remove the process here.
10155 * nto-low.c (nto_mourn): New.
10156 (nto_target_ops): Install it.
10157 * spu-low.c (spu_mourn): New.
10158 (spu_target_ops): Install it.
10159 * win32-low.c (win32_mourn): New.
10160 (win32_target_ops): Install it.
10161
e8470a06
PA
101622010-04-12 Pedro Alves <pedro@codesourcery.com>
10163
10164 * server.h (buffer_xml_printf): Remove redundant `;'.
10165
45ba0d02
PA
101662010-04-12 Pedro Alves <pedro@codesourcery.com>
10167
10168 * regcache.c (set_register_cache): Invalidate regcaches before
10169 changing the register cache layout.
10170 (regcache_invalidate_one): Allow a NULL regcache.
10171 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10172 regcaches before changing the register cache layout or the target
10173 regsets.
10174
59e04013
L
101752010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10176
10177 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10178 variable warning on Linux/x86-64.
10179
8336d594
PA
101802010-04-11 Pedro Alves <pedro@codesourcery.com>
10181
10182 GDBserver disconnected tracing support.
10183
10184 * linux-low.c (linux_remove_process): Delete.
10185 (add_lwp): Don't set last_resume_kind here.
10186 (linux_kill): Use `mourn'.
10187 (linux_detach): Use `thread_db_detach', and `mourn'.
10188 (linux_mourn): New.
10189 (linux_attach_lwp_1): Adjust comment.
10190 (linux_attach): last_resume_kind moved the thread_info; adjust.
10191 (status_pending_p_callback): Adjust.
10192 (linux_wait_for_event_1): Adjust.
10193 (count_events_callback, select_singlestep_lwp_callback)
10194 (select_event_lwp_callback, cancel_breakpoints_callback)
10195 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10196 (proceed_one_lwp): Adjust.
10197 (linux_async): Add debug output.
10198 (linux_thread_stopped): New.
10199 (linux_pause_all): New.
10200 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10201 linux_pause_all.
10202 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10203 (thread_db_free): Delete declaration.
10204 (thread_db_detach, thread_db_mourn): Declare.
10205 * thread-db.c (thread_db_init): Use thread_db_mourn.
10206 (thread_db_free): Delete, split in two.
10207 (disable_thread_event_reporting): New.
10208 (thread_db_detach): New.
10209 (thread_db_mourn): New.
10210
10211 * server.h (struct thread_info) <last_resume_kind>: New field.
10212 <attached>: Add comment.
10213 <gdb_detached>: New field.
10214 (handler_func): Change return type to int.
10215 (handle_serial_event, handle_target_event): Ditto.
10216 (gdb_connected): Declare.
10217 (tracing): Delete.
10218 (disconnected_tracing): Declare.
10219 (stop_tracing): Declare.
10220
10221 * server.c (handle_query) <qSupported>: Report support for
10222 disconnected tracing.
10223 (queue_stop_reply_callback): Account for running threads.
10224 (gdb_wants_thread_stopped): New.
10225 (gdb_wants_all_threads_stopped): New.
10226 (gdb_reattached_process): New.
10227 (handle_status): Clear the `gdb_detached' flag of all processes.
10228 In all-stop, stop all threads.
10229 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10230 (process_serial_event): If the remote connection breaks, or if an
10231 exit was forced with "monitor exit", force an event loop exit.
10232 Handle disconnected tracing on detach.
10233 (handle_serial_event): Adjust.
10234 (handle_target_event): If GDB isn't connected, forward events back
10235 to the inferior, unless the last process exited, in which case,
10236 exit gdbserver. Adjust interface.
10237
10238 * remote-utils.c (remote_open): Don't block in accept. Instead
10239 register an event loop source on the listen socket file
10240 descriptor. Refactor bits into ...
10241 (listen_desc): ... this new global.
10242 (gdb_connected): ... this new function.
10243 (enable_async_notification): ... this new function.
10244 (handle_accept_event): ... this new function.
10245 (remote_close): Clear remote_desc.
10246
10247 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10248
10249 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10250 New fields.
10251 (mourn_inferior): Define.
10252 (target_process_qsupported): Avoid the dangling else problem.
10253 (thread_stopped): Define.
10254 (pause_all): Define.
10255 (target_waitstatus_to_string): Declare.
10256 * target.c (target_waitstatus_to_string): New.
10257
10258 * tracepoint.c (tracing): Make extern.
10259 (disconnected_tracing): New.
10260 (stop_tracing): Make extern. Handle tracing stops due to GDB
10261 disconnecting.
10262 (cmd_qtdisconnected): New.
10263 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10264 (handle_tracepoint_general_set): Handle QTDisconnected.
10265
10266 * event-loop.c (event_handler_func): Change return type to int.
10267 (process_event): Bail out if the event handler wants the event
10268 loop to stop.
10269 (handle_file_event): Ditto.
10270 (start_event_loop): Bail out if the event handler wants the event
10271 loop to stop.
10272
10273 * nto-low.c (nto_target_ops): Adjust.
10274 * spu-low.c (spu_wait): Don't remove the process here.
10275 (spu_target_ops): Adjust.
10276 * win32-low.c (win32_wait): Don't remove the process here.
10277 (win32_target_ops): Adjust.
10278
5d267c4c
PA
102792010-04-11 Pedro Alves <pedro@codesourcery.com>
10280
10281 * regcache.c (realloc_register_cache): Invalidate inferior's
10282 regcache before recreating it.
10283
623ccd72
PA
102842010-04-09 Pedro Alves <pedro@codesourcery.com>
10285
10286 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10287
219f2f23
PA
102882010-04-09 Stan Shebs <stan@codesourcery.com>
10289 Pedro Alves <pedro@codesourcery.com>
10290
10291 * server.h (LONGEST): New.
10292 (struct thread_info) <while_stepping>: New field.
10293 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10294 Declare.
10295 (initialize_tracepoint, handle_tracepoint_general_set)
10296 (handle_tracepoint_query, tracepoint_finished_step)
10297 (tracepoint_was_hit, release_while_stepping_state_list):
10298 (current_traceframe): Declare.
10299 * server.c (handle_general_set): Handle tracepoint packets.
10300 (read_memory): New.
10301 (write_memory): New.
10302 (handle_search_memory_1): Use read_memory.
10303 (handle_query): Report support for conditional tracepoints, trace
10304 state variables, and tracepoint sources. Handle tracepoint
10305 queries.
10306 (main): Initialize the tracepoints module.
10307 (process_serial_event): Handle traceframe reads/writes.
10308
10309 * linux-low.c (handle_tracepoints): New.
10310 (linux_wait_1): Call it.
10311 (linux_resume_one_lwp): Handle while-stepping.
10312 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10313 (linux_target_ops): Install them.
10314 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10315 New field.
10316 * linux-x86-low.c (x86_supports_tracepoints): New.
10317 (the_low_target). Install it.
10318
10319 * mem-break.h (delete_breakpoint): Declare.
10320 * mem-break.c (delete_breakpoint): Make external.
10321
10322 * target.h (struct target_ops): Add `supports_tracepoints',
10323 `read_pc', and `write_pc' fields.
10324 (target_supports_tracepoints): Define.
10325 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10326 (phex_nz): New.
10327
10328 * regcache.h (struct regcache) <registers_owned>: New field.
10329 (init_register_cache, regcache_cpy): Declare.
10330 (regcache_read_pc, regcache_write_pc): Declare.
10331 (register_cache_size): Declare.
10332 (supply_regblock): Declare.
10333 * regcache.c (init_register_cache): New.
10334 (new_register_cache): Use it.
10335 (regcache_cpy): New.
10336 (register_cache_size): New.
10337 (supply_regblock): New.
10338 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 10339
219f2f23
PA
10340 * tracepoint.c: New.
10341
10342 * Makefile.in (OBS): Add tracepoint.o.
10343 (tracepoint.o): New rule.
10344
3a13a53b
L
103452010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10346
10347 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10348 (i386-mmx.o): New.
10349 (i386-mmx.c): Likewise.
10350 (i386-mmx-linux.o): Likewise.
10351 (i386-mmx-linux.c): Likewise.
10352
10353 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10354 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10355 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10356 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10357
10358 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10359 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10360 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10361
1570b33e
L
103622010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10363
10364 * Makefile.in (clean): Updated.
10365 (i386-avx.o): New.
10366 (i386-avx.c): Likewise.
10367 (i386-avx-linux.o): Likewise.
10368 (i386-avx-linux.c): Likewise.
10369 (amd64-avx.o): Likewise.
10370 (amd64-avx.c): Likewise.
10371 (amd64-avx-linux.o): Likewise.
10372 (amd64-avx-linux.c): Likewise.
10373
10374 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10375 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10376 (srv_amd64_regobj): Add amd64-avx.o.
10377 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10378 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10379 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10380 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10381 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10382 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10383 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10384
10385 * i387-fp.c: Include "i386-xstate.h".
10386 (i387_xsave): New.
10387 (i387_cache_to_xsave): Likewise.
10388 (i387_xsave_to_cache): Likewise.
10389 (x86_xcr0): Likewise.
10390
10391 * i387-fp.h (i387_cache_to_xsave): Likewise.
10392 (i387_xsave_to_cache): Likewise.
10393 (x86_xcr0): Likewise.
10394
10395 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10396 * linux-crisv32-low.c (target_regsets): Likewise.
10397 * linux-m68k-low.c (target_regsets): Likewise.
10398 * linux-mips-low.c (target_regsets): Likewise.
10399 * linux-ppc-low.c (target_regsets): Likewise.
10400 * linux-s390-low.c (target_regsets): Likewise.
10401 * linux-sh-low.c (target_regsets): Likewise.
10402 * linux-sparc-low.c (target_regsets): Likewise.
10403 * linux-xtensa-low.c (target_regsets): Likewise.
10404
10405 * linux-low.c: Include <sys/uio.h>.
10406 (regsets_fetch_inferior_registers): Support nt_type.
10407 (regsets_store_inferior_registers): Likewise.
10408 (linux_process_qsupported): New.
10409 (linux_target_ops): Add linux_process_qsupported.
10410
10411 * linux-low.h (regset_info): Add nt_type.
10412 (linux_target_ops): Add process_qsupported.
10413
10414 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10415 and <sys/uio.h>.
10416 (init_registers_i386_avx_linux): New.
10417 (init_registers_amd64_avx_linux): Likewise.
10418 (xmltarget_i386_linux_no_xml): Likewise.
10419 (xmltarget_amd64_linux_no_xml): Likewise.
10420 (PTRACE_GETREGSET): Likewise.
10421 (PTRACE_SETREGSET): Likewise.
10422 (x86_fill_xstateregset): Likewise.
10423 (x86_store_xstateregset): Likewise.
10424 (use_xml): Likewise.
10425 (x86_linux_update_xmltarget): Likewise.
10426 (x86_linux_process_qsupported): Likewise.
10427 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10428 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10429 init_registers_i386_linux here. Call
10430 x86_linux_update_xmltarget.
10431 (the_low_target): Add x86_linux_process_qsupported.
10432
10433 * server.c (handle_query): Call target_process_qsupported.
10434
10435 * target.h (target_ops): Add process_qsupported.
10436 (target_process_qsupported): New.
10437
fc7238bb
PA
104382010-04-03 Pedro Alves <pedro@codesourcery.com>
10439
10440 * inferiors.c (add_thread): Set last_status kind to
10441 TARGET_WAITKIND_IGNORE.
10442 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10443 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10444 (linux_wait_1): Move `thread' local definition to block that uses
10445 it. Don't NULL initialize `event_child'.
10446 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10447 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10448 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10449
bdabb078
PA
104502010-04-01 Pedro Alves <pedro@codesourcery.com>
10451
10452 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10453 an extended waitstatus, or by a watchpoint.
10454 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10455 thread was stepping or has been stopped by a watchpoint.
10456
d3bbe7a0
PA
104572010-04-01 Pedro Alves <pedro@codesourcery.com>
10458
10459 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10460 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10461 of another, then delete the previous, and validate all
10462 breakpoints.
10463 (validate_inserted_breakpoint): New.
10464 (delete_disabled_breakpoints): New.
10465 (validate_breakpoints): New.
10466 (check_mem_read): Validate breakpoints before trusting their
10467 shadow. Delete disabled breakpoints.
10468 (check_mem_write): Validate breakpoints before trusting they
10469 should be inserted. Delete disabled breakpoints.
10470 * mem-break.h (validate_breakpoints):
10471 * server.c (handle_query): Validate breakpoints when we see a
10472 qSymbol query.
10473
8b07ae33
PA
104742010-04-01 Pedro Alves <pedro@codesourcery.com>
10475
10476 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10477 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10478 if we could tell there's a GDB breakpoint at stop_pc.
10479 (need_step_over_p): Don't do a step over if we find a GDB
10480 breakpoint at the resume PC.
10481
10482 * mem-break.c (struct raw_breakpoint): New.
10483 (enum bkpt_type): New type `gdb_breakpoint'.
10484 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10485 fields. New field `raw'.
10486 (find_raw_breakpoint_at): New.
10487 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10488 breakpoint instead.
10489 (set_breakpoint_at): Adjust.
10490 (delete_raw_breakpoint): New.
10491 (release_breakpoint): New.
10492 (delete_breakpoint): Rename to...
10493 (delete_breakpoint_1): ... this. Add proc parameter. Use
10494 release_breakpoint. Return ENOENT.
10495 (delete_breakpoint): Reimplement.
10496 (find_breakpoint_at): Delete.
10497 (find_gdb_breakpoint_at): New.
10498 (delete_breakpoint_at): Delete.
10499 (set_gdb_breakpoint_at): New.
10500 (delete_gdb_breakpoint_at): New.
10501 (gdb_breakpoint_here): New.
10502 (set_reinsert_breakpoint): Use release_breakpoint.
10503 (uninsert_breakpoint): Rename to ...
10504 (uninsert_raw_breakpoint): ... this.
10505 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10506 (reinsert_raw_breakpoint): Change parameter type to
10507 raw_breakpoint.
10508 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10509 instead.
10510 (check_breakpoints): Adjust. Use release_breakpoint.
10511 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10512 (breakpoint_inserted_here): Ditto.
10513 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10514 Don't trust the breakpoint's shadow if it is not inserted.
10515 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10516 (delete_all_breakpoints): Adjust.
10517 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10518 use delete_breakpoint_1.
10519
10520 * mem-break.h (breakpoints_supported): Delete declaration.
10521 (set_gdb_breakpoint_at): Declare.
10522 (gdb_breakpoint_here): Declare.
10523 (delete_breakpoint_at): Delete.
10524 (delete_gdb_breakpoint_at): Declare.
10525
10526 * server.h (struct raw_breakpoint): Forward declare.
10527 (struct process_info): New field `raw_breakpoints'.
10528
10529 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10530 breakpoints.
10531
6bf5e0ba
PA
105322010-03-24 Pedro Alves <pedro@codesourcery.com>
10533
10534 * linux-low.c (status_pending_p_callback): Fix comment.
10535 (linux_wait_for_event_1): Move most of the internal breakpoint
10536 handling from here...
10537 (linux_wait_1): ... to here.
10538 (count_events_callback): New.
10539 (select_singlestep_lwp_callback): New.
10540 (select_event_lwp_callback): New.
10541 (cancel_breakpoints_callback): New.
10542 (select_event_lwp): New.
10543 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10544 priority to all LWPs that have had events that should be reported
10545 to the client. Cancel breakpoints when about to reporting the
10546 event to the client, not while stopping lwps. No longer cancel
10547 finished single-steps here.
10548 (cancel_finished_single_step): Delete.
10549 (cancel_finished_single_steps): Delete.
10550
414a389f
PA
105512010-03-24 Pedro Alves <pedro@codesourcery.com>
10552
10553 * mem-break.c (enum bkpt_type): New.
10554 (struct breakpoint): New field `type'.
10555 (set_breakpoint_at): Change return type to struct breakpoint
10556 pointer. Set type to `other_breakpoint' by default.
10557 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10558 in the breakpoint list.
10559 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10560 (reinsert_breakpoint): Rename to ...
10561 (reinsert_raw_breakpoint): ... this.
10562 (reinsert_breakpoints_at): Adjust.
10563 * mem-break.h (struct breakpoint): Declare.
10564 (set_breakpoint_at): Change return type to struct breakpoint
10565 pointer.
10566
2280c721
PA
105672010-03-24 Pedro Alves <pedro@codesourcery.com>
10568
10569 * server.c (handle_query): Assign, not compare.
10570
d50171e4
PA
105712010-03-24 Pedro Alves <pedro@codesourcery.com>
10572
10573 Teach linux gdbserver to step-over-breakpoints.
10574
10575 * linux-low.c (can_hardware_single_step): New.
10576 (supports_breakpoints): New.
10577 (handle_extended_wait): If stopping threads, read the stop pc of
10578 the new cloned LWP.
10579 (get_pc): New.
10580 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10581 low target doesn't support retrieving the PC.
10582 (add_lwp): Set last_resume_kind to resume_continue.
10583 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10584 (linux_attach): Don't clear stop_expected. Set the lwp's
10585 last_resume_kind to resume_stop.
10586 (linux_detach_one_lwp): Don't check for removed breakpoints.
10587 (check_removed_breakpoint): Delete.
10588 (status_pending_p): Rename to ...
10589 (status_pending_p_callback): ... this. Don't check for removed
10590 breakpoints. Don't consider threads that are stopped from GDB's
10591 perspective.
10592 (linux_wait_for_lwp): Always read the stop_pc here.
10593 (cancel_breakpoint): New.
10594 (step_over_bkpt): New global.
10595 (linux_wait_for_event_1): Implement stepping over breakpoints.
10596 (gdb_wants_lwp_stopped): New.
10597 (gdb_wants_all_stopped): New.
10598 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10599 single-step traps here. Store the thread's last reported target
10600 wait status.
10601 (send_sigstop): Don't clear stop_expected. Always set it,
10602 instead.
10603 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10604 (cancel_finished_single_step): New.
10605 (cancel_finished_single_steps): New.
10606 (wait_for_sigstop): Don't cancel finished single-step traps here.
10607 (linux_resume_one_lwp): Don't check for removed breakpoints.
10608 Don't set `step' on non-hardware step archs.
10609 (linux_set_resume_request): Ignore resume_stop requests if already
10610 stopping or stopped. Set the lwp's last_resume_kind.
10611 (resume_status_pending_p): Don't check for removed breakpoints.
10612 (need_step_over_p): New.
10613 (start_step_over): New.
10614 (finish_step_over): New.
10615 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10616 requests. Clear the thread's last reported target waitstatus.
10617 Don't use the `suspended' flag. Don't consider pending breakpoints.
10618 (linux_resume): Start a step-over if necessary.
10619 (proceed_one_lwp): New.
10620 (proceed_all_lwps): New.
10621 (unstop_all_lwps): New.
10622 * linux-low.h (struct lwp_info): Rewrite comment for the
10623 `suspended' flag. Add the `stop_pc' field. Delete the
10624 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10625 Add `'last_resume_kind' and `need_step_over' fields.
10626 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10627 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10628 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10629 (set_raw_breakpoint_at): New.
10630 (set_breakpoint_at): Rewrite to use it.
10631 (reinsert_breakpoint_handler): Delete.
10632 (set_reinsert_breakpoint): New.
10633 (reinsert_breakpoint_by_bp): Delete.
10634 (delete_reinsert_breakpoints): New.
10635 (uninsert_breakpoint): Rewrite.
10636 (uninsert_breakpoints_at): New.
10637 (reinsert_breakpoint): Rewrite.
10638 (reinsert_breakpoints_at): New.
10639 (check_breakpoints): Rewrite.
10640 (breakpoint_here): New.
10641 (breakpoint_inserted_here): New.
10642 (check_mem_read): Adjust.
10643 * mem-break.h (breakpoints_supported, breakpoint_here)
10644 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10645 (reinsert_breakpoint_by_bp): Delete declaration.
10646 (delete_reinsert_breakpoints): Declare.
10647 (reinsert_breakpoint): Delete declaration.
10648 (reinsert_breakpoints_at): Declare.
10649 (uninsert_breakpoint): Delete declaration.
10650 (uninsert_breakpoints_at): Declare.
10651 (check_breakpoints): Adjust prototype.
10652 * server.h: Adjust include order.
10653 (struct thread_info): Declare here. Add a `last_status' field.
10654
30ba68cb
MS
106552010-03-23 Michael Snyder <msnyder@vmware.com>
10656
10657 * server.c (crc32): New function.
10658 (handle_query): Add handling for 'qCRC:' request.
10659
b9a881c2
PA
106602010-03-23 Pedro Alves <pedro@codesourcery.com>
10661
10662 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10663 lwp had been stopped by a watchpoint.
10664
e92d13d5
PA
106652010-03-16 Pedro Alves <pedro@codesourcery.com>
10666
10667 * server.h (internal_error): Declare.
10668 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10669 * utils.c (internal_error): New function.
10670
64daa791
AS
106712010-03-15 Andreas Schwab <schwab@redhat.com>
10672
10673 * configure.srv: Fix typo setting srv_regobj.
10674
f52cd8cd
PA
106752010-03-15 Pedro Alves <pedro@codesourcery.com>
10676
10677 * linux-low.c (fetch_register): Avoid passing a non string literal
10678 format to `error'.
10679 (usr_store_inferior_registers): Ditto.
10680
93ae6fdc
PA
106812010-03-14 Pedro Alves <pedro@codesourcery.com>
10682
10683 * linux-low.c (linux_write_memory): Bail out early if peeking
10684 memory failed.
10685
c3adc08c
PA
106862010-03-14 Pedro Alves <pedro@codesourcery.com>
10687
10688 * linux-low.h (struct lwp_info): New fields
10689 `stopped_by_watchpoint' and `stopped_data_address'.
10690 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10691 here, and cache them in the lwp object.
10692 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10693 directly.
10694 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10695 field.
10696 (linux_stopped_by_watchpoint): Rewrite.
10697 (linux_stopped_data_address): Rewrite.
10698
bce522a2
PA
106992010-03-06 Simo Melenius <simo.melenius@iki.fi>
10700
10701 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10702 switching the current inferior, not before.
10703
90884b2b
L
107042010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10705
10706 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10707 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10708 i386-linux.c and amd64-linux.c.
10709 (reg-i386.o): Removed.
10710 (reg-i386.c): Likewise.
10711 (reg-i386-linux.o): Likewise.
10712 (reg-i386-linux.c): Likewise.
10713 (reg-x86-64.o): Likewise.
10714 (reg-x86-64.c): Likewise.
10715 (reg-x86-64-linux.o): Likewise.
10716 (reg-x86-64-linux.c): Likewise.
10717 (i386.o): New.
10718 (i386.c): Likewise.
10719 (i386-linux.o): Likewise.
10720 (i386-linux.c): Likewise.
10721 (amd64.o): Likewise.
10722 (amd64.c): Likewise.
10723 (amd64-linux.o): Likewise.
10724 (amd64-linux.c): Likewise.
10725
10726 * configure.srv (srv_i386_regobj): New.
10727 (srv_i386_linux_regobj): Likewise.
10728 (srv_amd64_regobj): Likewise.
10729 (srv_amd64_linux_regobj): Likewise.
10730 (srv_i386_32bit_xmlfiles): Likewise.
10731 (srv_i386_64bit_xmlfiles): Likewise.
10732 (srv_i386_xmlfiles): Likewise.
10733 (srv_amd64_xmlfiles): Likewise.
10734 (srv_i386_linux_xmlfiles): Likewise.
10735 (srv_amd64_linux_xmlfiles): Likewise.
10736 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10737 srv_xmlfiles to $srv_i386_xmlfiles.
10738 (i[34567]86-*-mingw32ce*): Likewise.
10739 (i[34567]86-*-mingw*): Likewise.
10740 (i[34567]86-*-nto*): Likewise.
10741 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10742 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10743 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10744 (x86_64-*-linux*): Likewise.
10745
10746 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10747 (init_registers_amd64_linux): New.
10748 (x86_arch_setup): Replace init_registers_x86_64_linux with
10749 init_registers_amd64_linux.
10750
193f13e6
MK
107512010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10752
10753 * configure.ac: Check for libdl. If it is not available link against
10754 static libthread_db.
10755 * configure: Regenerate.
10756
85d721b8
PA
107572010-02-22 Pedro Alves <pedro@codesourcery.com>
10758
10759 PR9605
10760
10761 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10762 handing a read watchpoint.
10763 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10764
6076632b
DE
107652010-02-12 Doug Evans <dje@google.com>
10766
10767 * linux-low.c (linux_supports_tracefork_flag): Document.
10768 (linux_look_up_symbols): Add comment.
10769
3327ccf7
L
107702010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10771
10772 * regcache.c (supply_register): Clear regcache if buf is NULL.
10773
0718675c 107742010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 10775 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
10776
10777 * inferiors.c (find_inferior): Add function documentation.
10778 (unloaded_dll): Handle the case where the unloaded dll has not
10779 been previously registered in the dll list.
10780
177321bd
DJ
107812010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10782
10783 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10784 (thumb2_breakpoint): New.
10785 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10786
2b009048
DJ
107872010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10788
10789 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10790 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10791 breakpoints.
10792
3be029c7
PA
107932010-01-21 Pedro Alves <pedro@codesourcery.com>
10794
10795 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10796
18f5de3b
JK
107972010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10798
10799 * linux-s390-low.c (s390_collect_ptrace_register)
10800 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10801
3743bb4f
DE
108022010-01-21 Doug Evans <dje@google.com>
10803
14ce3065
DE
10804 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10805 (PTRACE_ARG4_TYPE): New macro.
10806 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10807 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10808 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10809 (usr_store_inferior_registers): Ditto.
10810 (linux_read_memory, linux_write_memory): Ditto.
10811 (linux_test_for_tracefork): Ditto.
10812
3743bb4f
DE
10813 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10814 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10815
8b315be5
PA
108162010-01-21 Pedro Alves <pedro@codesourcery.com>
10817
10818 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10819 target.
10820
85492558
PA
108212010-01-21 Pedro Alves <pedro@codesourcery.com>
10822
10823 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10824 prototype to take a regcache. Adjust.
10825
442ea881
PA
108262010-01-20 Pedro Alves <pedro@codesourcery.com>
10827
10828 * regcache.h (struct thread_info): Forward declare.
10829 (struct regcache): New.
10830 (new_register_cache): Adjust prototype.
10831 (get_thread_regcache): Declare.
10832 (free_register_cache): Adjust prototype.
10833 (registers_to_string, registers_from_string): Ditto.
10834 (supply_register, supply_register_by_name, collect_register)
10835 (collect_register_as_string, collect_register_by_name): Ditto.
10836 * regcache.c (struct inferior_regcache_data): Delete.
10837 (get_regcache): Rename to ...
10838 (get_thread_regcache): ... this. Adjust. Switch inferior before
10839 fetching registers.
10840 (regcache_invalidate_one): Adjust.
10841 (regcache_invalidate): Fix prototype.
10842 (new_register_cache): Return the new register cache.
10843 (free_register_cache): Change prototype.
10844 (realloc_register_cache): Adjust.
10845 (registers_to_string): Change prototype to take a regcache. Adjust.
10846 (registers_from_string): Ditto.
10847 (register_data): Ditto.
10848 (supply_register): Ditto.
10849 (supply_register_by_name): Ditto.
10850 (collect_register): Ditto.
10851 (collect_register_as_string): Ditto.
10852 (collect_register_by_name): Ditto.
10853 * server.c (process_serial_event): Adjust.
10854 * linux-low.h (regset_fill_func, regset_store_func): Change
10855 prototype.
10856 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10857 Change prototype.
10858 * linux-low.c (get_stop_pc): Adjust.
10859 (check_removed_breakpoint): Adjust.
10860 (linux_wait_for_event): Adjust.
10861 (linux_resume_one_lwp): Adjust.
10862 (fetch_register): Add regcache parameter. Adjust.
10863 (usr_store_inferior_registers): Ditto.
10864 (regsets_fetch_inferior_registers): Ditto.
10865 (regsets_store_inferior_registers): Ditto.
10866 (linux_fetch_registers, linux_store_registers): Ditto.
10867 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10868 regcache. Adjust.
43aaf8b6
PA
10869 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10870 Ditto.
442ea881
PA
10871 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10872 prototype to take a regcache.
10873 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10874 * remote-utils.c (convert_ascii_to_int, outreg)
10875 (prepare_resume_reply): Change prototype to take a regcache.
10876 Adjust.
10877 * target.h (struct target_ops) <fetch_registers, store_registers>:
10878 Change prototype to take a regcache.
10879 (fetch_inferior_registers, store_inferior_registers): Change
10880 prototype to take a regcache. Adjust.
10881 * proc-service.c (ps_lgetregs): Adjust.
10882 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10883 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10884 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10885 take a regcache. Adjust.
10886 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10887 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10888 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10889 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10890 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10891 (cris_cannot_fetch_register):
10892 (cris_breakpoint_at): Change prototype to take a regcache.
10893 Adjust.
10894 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10895 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10896 to take a regcache. Adjust.
10897 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10898 Adjust.
10899 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10900 take a regcache. Adjust.
10901 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10902 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10903 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10904 * linux-mips-low.c (mips_get_pc):
10905 (mips_set_pc): Change prototype to take a regcache. Adjust.
10906 (mips_reinsert_addr): Adjust.
10907 (mips_collect_register): Change prototype to take a regcache.
10908 Adjust.
10909 (mips_supply_register):
10910 (mips_collect_register_32bit, mips_supply_register_32bit)
10911 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10912 (mips_store_fpregset): Ditto.
43aaf8b6
PA
10913 * linux-ppc-low.c (ppc_supply_ptrace_register)
10914 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
10915 (parse_spufs_run): Adjust.
10916 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10917 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10918 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10919 take a regcache. Adjust.
10920 * linux-s390-low.c (s390_collect_ptrace_register)
10921 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10922 (s390_set_pc): Change prototype to take a regcache. Adjust.
10923 (s390_arch_setup): Adjust.
10924 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10925 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10926 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10927 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10928 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10929 regcache. Adjust.
10930 (sparc_breakpoint_at): Adjust.
10931 * linux-xtensa-low.c (xtensa_fill_gregset):
10932 (xtensa_store_gregset):
10933 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10934 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10935 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10936 prototype to take a regcache. Adjust.
10937 * win32-arm-low.c (arm_fetch_inferior_register)
10938 (arm_store_inferior_register): Change prototype to take a
10939 regcache. Adjust.
10940 * win32-i386-low.c (i386_fetch_inferior_register)
10941 (i386_store_inferior_register): Change prototype to take a
10942 regcache. Adjust.
10943 * win32-low.c (child_fetch_inferior_registers)
10944 (child_store_inferior_registers): Change prototype to take a
10945 regcache. Adjust.
10946 (win32_wait): Adjust.
10947 (win32_fetch_inferior_registers): Change prototype to take a
10948 regcache. Adjust.
10949 (win32_store_inferior_registers): Adjust.
10950 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10951 store_inferior_register>: Change prototype to take a regcache.
10952
60c3d7b0
DE
109532010-01-20 Doug Evans <dje@google.com>
10954
10955 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10956 #ifdef.
10957 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 10958 (W_STOPCODE): Provide definition if missing.
60c3d7b0 10959
dc146f7c
VP
109602010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10961
10962 * linux-low.c (linux_core_of_thread): New.
10963 (compare_ints, show_process, list_threads): New.
10964 (linux_qxfer_osdata): Report threads and cores.
10965 (linux_target_op): Register linux_core_of_thread.
10966 * remote-utils.c (prepare_resume_reply): Report the core.
10967 (buffer_xml_printf): Support %d specifier.
10968 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10969 New.
10970 (handle_query): Handle qXfer:threads. Announce availability
10971 thereof.
10972 * target.h (struct target_ops): New field core_of_thread.
10973
7803799a
UW
109742010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10975
10976 * Makefile.in (clean): Remove new generated files.
10977 (reg-s390.o, reg-s390.c): Remove rules.
10978 (reg-s390x.o, reg-s390x.c): Likewise.
10979 (s390-linux32.o, s390-linux32.c): Add rules.
10980 (s390-linux64.o, s390-linux64.c): Likewise.
10981 (s390x-linux64.o, s390x-linux64.c): Likewise.
10982 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10983 * linux-s390-low.c: Include <elf.h>.
10984 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10985 (init_registers_s390): Remove prototype.
10986 (init_registers_s390x): Likewise.
10987 (init_registers_s390_linux32): Add prototype.
10988 (init_registers_s390_linux64): Likewise.
10989 (init_registers_s390x_linux64): Likewise.
10990 (s390_num_regs_3264): New define.
10991 (s390_regmap_3264): New global variable.
10992 (s390_cannot_fetch_register): Remove obsolete check.
10993 (s390_cannot_store_register): Likewise.
10994 (s390_collect_ptrace_register): Handle upper/lower register halves.
10995 (s390_supply_ptrace_register): Likewise.
10996 (s390_fill_gregset): Update to register number changes.
10997 (s390_get_hwcap): New routine.
10998 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10999 Install appropriate regmap and register set.
11000
6e7ffa39
JB
110012010-01-01 Joel Brobecker <brobecker@adacore.com>
11002
11003 * server.c (gdbserver_version): Update copyright year to 2010.
11004 * gdbreplay.c (gdbreplay_version): Likewise.
11005
957f3f49
DE
110062009-12-28 Doug Evans <dje@google.com>
11007
11008 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11009 elf/external.h. Include <elf.h> instead but only if necessary.
11010
ca5c370d
PA
110112009-12-28 Pedro Alves <pedro@codesourcery.com>
11012
11013 * linux-low.c (linux_remove_process): Remove `detaching'
11014 parameter. Don't release/detach from thread_db here.
11015 (linux_kill): Release/detach from thread_db here, ...
11016 (linux_detach): ... and here, before actually detaching.
11017 (linux_wait_1): ... and here, when a process exits.
11018 * thread-db.c (any_thread_of): New.
11019 (thread_db_free): Switch the current inferior to a thread of the
11020 passed in process.
11021
4ee62156
DE
110222009-12-21 Doug Evans <dje@google.com>
11023
d90e6a88
DE
11024 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11025
c5f62d5f
DE
11026 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11027 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11028 warning ifndef __NR_tkill. Move setting of errno there too.
11029 Delete unnecessary resetting of errno after syscall.
11030 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11031
10e86dd7
DE
11032 * configure.ac: Check for dladdr.
11033 * config.in: Regenerate.
11034 * configure: Regenerate.
11035 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11036 (try_thread_db_load): Update.
11037
4ee62156
DE
11038 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11039
00f515da
DE
110402009-12-18 Doug Evans <dje@google.com>
11041
e9464885
DE
11042 * event-loop.c: Include unistd.h if it exists.
11043
07d4f67e
DE
11044 * linux-low.c (my_waitpid): Move definition away from being in
11045 between linux_tracefork_child/linux_test_for_tracefork.
11046
00f515da
DE
11047 * gdb_proc_service.h (psaddr_t): Fix type.
11048 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11049 signature to match glibc.
11050
1de1badb
DE
110512009-12-16 Doug Evans <dje@google.com>
11052
11053 * linux-low.c (linux_read_memory): Fix argument to read.
11054
aeeb81d1
PA
110552009-11-26 Pedro Alves <pedro@codesourcery.com>
11056
11057 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11058 events, don't leave current_inferior pointing at null.
11059
10357975
PA
110602009-11-26 Pedro Alves <pedro@codesourcery.com>
11061
11062 * win32-low.c (LOG): Delete.
11063 (OUTMSG): Output to stderr.
11064 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11065 on compile time LOG macro.
11066 (win32_wait): Fix debug output.
11067
cf6e3471
PA
110682009-11-26 Pedro Alves <pedro@codesourcery.com>
11069
11070 * win32-low.c (win32_add_one_solib): If the dll name is
11071 "ntdll.dll", prepend the system directory to the dll path.
11072
0c85e18e
MK
110732009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11074
11075 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11076
9ac544ce 110772009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11078 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11079
11080 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11081 * configure.ac: Check for __mcoldfire__ and set
11082 gdb_cv_m68k_is_coldfire.
11083 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11084 reg-cf.o and reg-m68k.o.
11085 * configure: Regenerated.
11086
fd7dd3e6
PA
110872009-11-16 Pedro Alves <pedro@codesourcery.com>
11088
11089 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11090 Pass it to thread_db_free.
11091 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11092 proper `detaching' argument to linux_remove_process.
11093 * linux-low.h (thread_db_free): Add `detaching' parameter.
11094 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11095 to thread_db_free.
11096 (thread_db_free): Add `detaching' parameter. Only
11097 call td_ta_clear_event if detaching from process.
11098
75aa492e
MK
110992009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11100
11101 * thread-db.c (thread_db_free): Fix typo.
11102
21e1bee4
PP
111032009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11104
11105 PR gdb/10838
11106 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11107
8838b45e
NS
111082009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11109
11110 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11111 with an i686 compiler.
11112 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11113 needed.
11114 * configure: Rebuilt.
11115
8a35fb51
SL
111162009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11117
11118 PR gdb/10783
11119
11120 * server.c (handle_search_memory_1): Correct read_addr initialization
11121 in loop for searching subsequent chunks.
11122
96f15937
PP
111232009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11124
11125 * configure.ac: New --with-libthread-db option.
11126 * thread-db.c: Allow direct dependence on libthread_db.
11127 (thread_db_free): Adjust.
11128 * config.in: Regenerate.
11129 * configure: Likewise.
889bf7c5 11130
5f7d1694
PP
111312009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11132
11133 PR gdb/10757
11134 * thread-db.c (attach_thread): New function.
11135 (maybe_attach_thread): Return success/failure.
11136 (find_new_threads_callback): Adjust.
889bf7c5
PA
11137 (thread_db_find_new_threads): Loop until no new threads.
11138
88e3b899
PA
111392009-10-13 Pedro Alves <pedro@codesourcery.com>
11140
11141 * proc-service.c (ps_lgetregs): Formatting.
11142
cdbfd419
PP
111432009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11144
11145 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11146 * configure.ac: Adjust.
11147 * linux-low.h (struct process_info_private): Move members to struct
11148 thread_db.
11149 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11150 * linux-low.c (linux_remove_process): Adjust.
11151 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11152 * server.c (handle_query): Move code ...
11153 (handle_monitor_command): ... here. New function.
11154 * target.h (struct target_ops): New member.
11155 * thread-db.c (struct thread_db): New.
11156 (libthread_db_search_path): New variable.
11157 (thread_db_create_event, thread_db_enable_reporting)
11158 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11159 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11160 (try_thread_db_load_1, dladdr_to_soname): New functions.
11161 (try_thread_db_load, thread_db_load_search): New functions.
11162 (thread_db_init): Search for libthread_db.
11163 (thread_db_free): New function.
11164 (thread_db_handle_monitor_command): Likewise.
11165 * config.in: Regenerate.
11166 * configure: Regenerate.
889bf7c5 11167
4168d2d6
UW
111682009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11169
11170 * spu-low.c (spu_kill): Wait for inferior to terminate.
11171 Call clear_inferiors.
11172 (spu_detach): Call clear_inferiors.
11173
81ecdfbb
RW
111742009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11175
11176 * aclocal.m4: Regenerate.
11177 * config.in: Likewise.
11178 * configure: Likewise.
11179
0b9ff2c0
UW
111802009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11181
11182 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11183 (parse_spufs_run): New function.
11184 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11185 (ppc_breakpoint_at): Handle SPU breakpoints.
11186
efcbbd14
UW
111872009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11188
11189 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11190 (SPUFS_MAGIC): Define.
11191 (spu_enumerate_spu_ids): New function.
11192 (linux_qxfer_spu): New function.
11193 (linux_target_ops): Install linux_qxfer_spu.
11194
f4d9bade
UW
111952009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11196
11197 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11198 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11199 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11200 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11201 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11202 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11203 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11204 (init_registers_powerpc_cell32l): Add prototype.
11205 (init_registers_powerpc_cell64l): Likewise.
11206 (ppc_arch_setup): Detect Cell/B.E. architecture.
11207
96e946ca
RW
112082009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11209
11210 * Makefile.in (datarootdir): New variable.
11211
58d6951d
DJ
112122009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11213
11214 * linux-low.c (linux_write_memory): Update debugging output.
11215 * Makefile.in (clean): Add new descriptions.
11216 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11217 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11218 * configure.srv: Add new files for arm*-*-linux*.
11219 * linux-arm-low.c: Add new declarations.
11220 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11221 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11222 (HWCAP_VFPv3D16): New.
11223 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11224 instead of __IWMMXT__.
11225 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11226 (arm_arch_setup): New.
11227 (target_regsets): Remove #ifdef. Add VFP regset.
11228 (the_low_target): Use arm_arch_setup.
11229
12b42a12
DJ
112302009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11231
11232 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11233 the main thread again.
11234
ac8c974e
AR
112352009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11236
11237 Adding Neutrino gdbserver.
11238 * configure: Regenerated.
11239 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11240 * configure.srv (i[34567]86-*-nto*): New target.
11241 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11242 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11243 (nto_comctrl) [__QNX__]: New function.
11244 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11245
4424e0c3 112462009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
11247
11248 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11249 srv_tgtobj.
11250
912cf4ba
PA
112512009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11252 Pedro Alves <pedro@codesourcery.com>
11253
11254 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11255 don't support CONTEXT_EXTENDED_REGISTERS.
11256 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11257 (the_low_target): Install them.
11258 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11259 failing with ERROR_PIPE_NOT_CONNECTED.
11260
aa5ca48f
DE
112612009-06-30 Doug Evans <dje@google.com>
11262 Pierre Muller <muller@ics.u-strasbg.fr>
11263
11264 Add h/w watchpoint support to x86-linux, win32-i386.
11265 * Makefile.in (SFILES): Add i386-low.c
11266 (i386_low_h): Define.
11267 (i386-low.o): Add dependencies.
11268 (linux-x86-low.o): Add i386-low.h dependency.
11269 (win32-i386-low.o): Ditto.
11270 * i386-low.c: New file.
11271 * i386-low.h: New file.
11272 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11273 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11274 * linux-low.c (linux_add_process): Initialize arch_private.
11275 (linux_remove_process): Free arch_private.
11276 (add_lwp): Initialize arch_private.
11277 (delete_lwp): Free arch_private.
11278 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11279 provided.
11280 * linux-low.h (process_info_private): New member arch_private.
11281 (lwp_info): New member arch_private.
11282 (linux_target_ops): New members new_process, new_thread,
11283 prepare_to_resume.
11284 (ptid_of): New macro.
11285 * linux-x86-low.c: Include stddef.h, i386-low.h.
11286 (arch_process_info): New struct.
11287 (arch_lwp_info): New struct.
11288 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11289 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11290 (i386_dr_low_get_status): New function.
11291 (x86_insert_point, x86_remove_point): New functions.
11292 (x86_stopped_by_watchpoint): New function.
11293 (x86_stopped_data_address): New function.
11294 (x86_linux_new_process, x86_linux_new_thread): New functions.
11295 (x86_linux_prepare_to_resume): New function.
11296 (the_low_target): Add entries for insert_point, remove_point,
11297 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11298 prepare_to_resume.
11299 * server.c (debug_hw_points): New global.
11300 (monitor_show_help): Document set debug-hw-points.
11301 (handle_query): Process "set debug-hw-points".
11302 * server.h (debug_hw_points): Declare.
11303 (paddress): Declare.
11304 * utils.c (NUMCELLS, CELLSIZE): New macros.
11305 (get_sell, xsnprintf, paddress): New functions.
11306 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11307 remove_point, stopped_by_watchpoint, stopped_data_address.
11308 * win32-i386-low.c: Include i386-low.h.
11309 (debug_reg_state): Replaces dr.
11310 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11311 (i386_dr_low_get_status): New function.
11312 (i386_insert_point, i386_remove_point): New functions.
11313 (i386_stopped_by_watchpoint): New function.
11314 (i386_stopped_data_address): New function.
11315 (i386_initial_stuff): Update.
11316 (get_thread_context,set_thread_context,i386_thread_added): Update.
11317 (the_low_target): Add entries for insert_point,
11318 remove_point, stopped_by_watchpoint, stopped_data_address.
11319 * win32-low.c (win32_insert_watchpoint): New function.
11320 (win32_remove_watchpoint): New function.
11321 (win32_stopped_by_watchpoint): New function.
11322 (win32_stopped_data_address): New function.
11323 (win32_target_ops): Add entries for insert_watchpoint,
11324 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11325 * win32-low.h (win32_target_ops): New members insert_point,
11326 remove_point, stopped_by_watchpoint, stopped_data_address.
11327
d993e290
PA
113282009-06-25 Pedro Alves <pedro@codesourcery.com>
11329
11330 * server.c (process_serial_event): Re-return unsupported, not
11331 error, if the type isn't recognized. Re-allow supporting only
11332 insert or remove packets. Also call require_running for
11333 breakpoints. Add missing break statement to default case. Tidy.
11334 * target.h (struct target_ops): Rename insert_watchpoint to
11335 insert_point, and remove_watchpoint to remove_point.
11336
11337 * linux-low.h (struct linux_target_ops): Likewise.
11338 * linux-low.c (linux_insert_watchpoint): Rename to ...
11339 (linux_insert_point): ... this. Adjust.
11340 (linux_remove_watchpoint): Rename to ...
11341 (linux_remove_point): ... this. Adjust.
11342 (linux_target_ops): Adjust.
11343 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11344 (cris_insert_point): ... this.
11345 (cris_remove_watchpoint): Rename to ...
11346 (cris_remove_point): ... this.
11347 (the_low_target): Adjust.
11348
0f54c268
PM
113492009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11350
11351 * server.c (handle_v_kill): Pass signal_pid to
11352 kill_inferior if multi_process is zero.
11353
c6314022
AR
113542009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11355
11356 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11357 * target.h (target_ops): Comment for *_watchpoint to make it clear
11358 the functions can get types '0' and '1'.
11359
4463ce24
AR
113602009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11361
11362 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11363 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11364 * regcache.c (get_regcache): Likewise.
11365 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11366 * win32-low.c (child_fetch_inferior_registers): Remove check for
11367 regno 0.
11368
cf8fd78b
PA
113692009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11370 Pedro Alves <pedro@codesourcery.com>
11371
11372 * target.h (struct target_ops) <supports_multi_process>: New
11373 callback.
11374 (target_supports_multi_process): New.
11375 * server.c (handle_query): Even if GDB reports support, only
11376 enable multi-process if the target also supports it. Report
11377 multi-process support only if the target backend supports it.
11378 * linux-low.c (linux_supports_multi_process): New function.
11379 (linux_target_ops): Install it as target_supports_multi_process
11380 callback.
11381
47c0c975
DE
113822009-05-24 Doug Evans <dje@google.com>
11383
e09875d4
DE
11384 Global renaming of find_thread_pid to find_thread_ptid.
11385 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11386 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11387 All callers updated.
11388
e27d73f6
DE
11389 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11390 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11391 directly.
11392
47c0c975
DE
11393 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11394 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11395 (linux_resume_one_lwp): Ditto.
11396
2acc282a
DE
113972009-05-23 Doug Evans <dje@google.com>
11398
11399 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11400 from struct inferior_list_entry * to struct lwp_info *.
11401 All callers updated.
11402
9f1036c1
DE
114032009-05-13 Doug Evans <dje@google.com>
11404
11405 * linux-x86-low.c: Don't include assert.h.
11406 (x86_siginfo_fixup): Use fatal, not assert.
11407 (x86_arch_setup): Fix comment.
11408
d0722149
DE
114092009-05-12 Doug Evans <dje@google.com>
11410
11411 Biarch support for i386/amd64 gdbserver.
11412 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11413 Add linux-x86-low.c.
11414 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11415 (linux-x86-low.o): Add.
11416 * linux-x86-64-low.c: Delete.
11417 * linux-i386-low.c: Delete.
11418 * linux-x86-low.c: New file.
11419 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11420 linux-x86-low.o.
11421 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11422 linux-x86-low.o.
11423 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11424 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11425 (linux_child_pid_to_exec_file): New function.
11426 (elf_64_header_p, elf_64_file_p): New functions.
11427 (siginfo_fixup): New function.
11428 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11429 give target a chance to convert layout.
11430 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11431 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11432
fdeb2a12
DE
114332009-05-07 Doug Evans <dje@google.com>
11434
11435 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11436 (regsets_store_inferior_registers): Ditto.
11437
a6dbe5df
PA
114382009-05-06 Pedro Alves <pedro@codesourcery.com>
11439
11440 PR server/10048
11441
11442 * linux-low.c (must_set_ptrace_flags): Delete.
11443 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11444 of the global.
11445 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11446 `lwp->must_set_ptrace_flags' instead.
ba42693b 11447 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
11448 (linux_wait_1): ... not here.
11449
5091eb23
DE
114502009-04-30 Doug Evans <dje@google.com>
11451
9f767825
DE
11452 * inferiors.c (started_inferior_callback): New function.
11453 (attached_inferior_callback): New function.
11454 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11455 * server.c (print_started_pid, print_attached_pid): New functions.
11456 (detach_or_kill_for_exit): New function.
11457 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11458 * server.h (have_started_inferiors_p): Declare.
11459 (have_attached_inferiors_p): Declare.
11460
5091eb23
DE
11461 * inferiors.c (remove_process): Fix memory leak, free process.
11462 * linux-low.c (linux_remove_process): New function.
11463 (linux_kill): Call it instead of remove_process.
11464 (linux_detach, linux_wait_1): Ditto.
11465
155c8968
PA
114662009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11467
11468 * configure.srv: Add x86 Windows CE target.
11469
7fe519cb
UW
114702009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11471
11472 * inferiors.c (get_thread_process): Make global.
11473 * server.h (get_thread_process): Add prototype.
11474 * thread-db.c (find_one_thread): Use get_thread_process
11475 instead of current_process.
11476 (thread_db_get_tls_address): Do not crash if called when
11477 thread layer is not yet initialized.
11478
5472f405
UW
114792009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11480
11481 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11482 * spu-low.c (current_tid): Rename to ...
11483 (current_ptid): ... this.
11484 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11485 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11486 ptid_get_lwp (current_ptid) instead of current_tid.
11487 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11488 instead of current_tid. Use find_process_pid to verify pid
11489 argument is valid. Pass proper argument to remove_process.
11490 (spu_thread_alive): Compare current_ptid instead of current_tid.
11491 (spu_resume): Likewise.
11492
55ac2b99
PA
114932009-04-02 Pedro Alves <pedro@codesourcery.com>
11494
11495 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11496 variable.
11497
95954743
PA
114982009-04-01 Pedro Alves <pedro@codesourcery.com>
11499
11500 Implement the multiprocess extensions, and add linux multiprocess
11501 support.
11502
11503 * server.h (ULONGEST): Declare.
11504 (struct ptid, ptid_t): New.
11505 (minus_one_ptid, null_ptid): Declare.
11506 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11507 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11508 (struct inferior_list_entry): Change `id' type from unsigned from
11509 to ptid_t.
11510 (struct sym_cache, struct breakpoint, struct
11511 process_info_private): Forward declare.
11512 (struct process_info): Declare.
11513 (current_process): Declare.
11514 (all_processes): Declare.
11515 (initialize_inferiors): Declare.
11516 (add_thread): Adjust to use ptid_t.
11517 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11518 (add_process, remove_process, find_thread_pid): Declare.
11519 (find_inferior_id): Adjust to use ptid_t.
11520 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11521 (multi_process): Declare.
11522 (push_event): Adjust to use ptid_t.
11523 (read_ptid, write_ptid): Declare.
11524 (prepare_resume_reply): Adjust to use ptid_t.
11525 (clear_symbol_cache): Declare.
11526 * inferiors.c (all_processes): New.
11527 (null_ptid, minus_one_ptid): New.
11528 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11529 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11530 (add_thread): Change unsigned long to ptid. Remove gdb_id
11531 parameter. Adjust.
11532 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11533 (gdb_id_to_thread): Rename to ...
11534 (find_thread_pid): ... this. Change unsigned long to ptid.
11535 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11536 (loaded_dll, pull_pid_from_list): Adjust.
11537 (add_process, remove_process, find_process_pid)
11538 (get_thread_process, current_process, initialize_inferiors): New.
11539 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11540 (struct target_waitstatus) <related_pid>: Ditto.
11541 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11542 return type to int.
11543 (struct target_ops) <join>: Add `pid' argument.
11544 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11545 (struct target_ops) <wait>: Add `ptid' field. Change return type
11546 to ptid.
11547 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11548 (mywait): Add `ptid' argument. Change return type to ptid_t.
11549 (target_pid_to_str): Declare.
11550 * target.c (set_desired_inferior): Adjust to use ptids.
11551 (mywait): Add new `ptid' argument. Adjust.
11552 (target_pid_to_str): New.
11553 * mem-break.h (free_all_breakpoints): Declare.
11554 * mem-break.c (breakpoints): Delelete.
11555 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11556 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11557 to use per-process breakpoint list.
11558 (free_all_breakpoints): New.
11559 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11560 (symbol_cache, all_symbols_looked_up): Delete.
11561 (hexchars): New.
11562 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11563 read_ptid): New.
11564 (prepare_resume_reply): Change ptid argument's type from unsigned
11565 long to ptid_t. Adjust. Implement W;process and X;process.
11566 (free_sym_cache, clear_symbol_cache): New.
11567 (look_up_one_symbol): Adjust to per-process symbol cache. *
11568 * server.c (cont_thread, general_thread, step_thread): Change type
11569 to ptid_t.
11570 (attached): Delete.
11571 (multi_process): New.
11572 (last_ptid): Change type to ptid_t.
11573 (struct vstop_notif) <ptid>: Change type to ptid_t.
11574 (queue_stop_reply, push_event): Change `ptid' argument's type to
11575 ptid_t.
11576 (discard_queued_stop_replies): Add `pid' argument.
11577 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11578 changes. Don't reference the `attached' global.
11579 (attach_inferior): Adjust to mywait interface changes.
11580 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11581 features. Handle and report "multiprocess+". Handle
11582 "qAttached:PID".
11583 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11584 changes.
11585 (handle_v_kill): New.
11586 (handle_v_stopped): Adjust to use target_pid_to_str.
11587 (handle_v_requests): Allow multiple attaches and runs when
11588 multiprocess extensions are in effect. Handle "vKill".
11589 (myresume): Adjust to use ptids.
11590 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11591 (handle_status): Adjust to discard_queued_stop_replies interface
11592 change.
11593 (first_thread_of, kill_inferior_callback)
11594 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11595 (main): Call initialize_inferiors. Adjust to use ptids, killing
11596 and detaching from all inferiors. Handle multiprocess packet
11597 variants.
11598 * linux-low.h: Include gdb_proc_service.h.
11599 (struct process_info_private): New.
11600 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11601 <lwpid_of>: Use ptid_get_lwp.
11602 (get_lwp_thread): Adjust.
11603 (struct lwp_info): Add `dead' member.
11604 (find_lwp_pid): Declare.
11605 * linux-low.c (thread_db_active): Delete.
11606 (new_inferior): Adjust comment.
11607 (inferior_pid): Delete.
11608 (linux_add_process): New.
11609 (handle_extended_wait): Adjust.
11610 (add_lwp): Change unsigned long to ptid.
11611 (linux_create_inferior): Add process to processes table. Adjust
11612 to use ptids. Don't set new_inferior here.
11613 (linux_attach_lwp): Rename to ...
11614 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11615 it. Adjust to use ptids.
11616 (linux_attach_lwp): New.
11617 (linux_attach): Add process to processes table. Don't set
11618 new_inferior here.
11619 (struct counter): New.
11620 (second_thread_of_pid_p, last_thread_of_process_p): New.
11621 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11622 multiple processes.
11623 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11624 processes. Remove process from process table.
11625 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11626 to multiple processes.
11627 (any_thread_of): New.
11628 (linux_detach): Add `pid' argument, and handle it. Remove process
11629 from processes table.
11630 (linux_join): Add `pid' argument. Handle it.
11631 (linux_thread_alive): Change unsighed long argument to ptid_t.
11632 Consider dead lwps as not being alive.
11633 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11634 threads we're not interested in.
11635 (same_lwp, find_lwp_pid): New.
11636 (linux_wait_for_lwp): Change `pid' argument's type from int to
11637 ptid_t. Adjust.
11638 (linux_wait_for_event): Rename to ...
11639 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11640 from int to ptid_t. Adjust.
11641 (linux_wait_for_event): New.
11642 (linux_wait_1): Add `ptid' argument. Change return type to
11643 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11644 that exit from the process table.
11645 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11646 Adjust.
11647 (mark_lwp_dead): New.
11648 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11649 stopping all threads, mark its main lwp as dead.
11650 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11651 ptids.
11652 (fetch_register, usr_store_inferior_registers)
11653 (regsets_fetch_inferior_registers)
11654 (regsets_store_inferior_registers, linux_read_memory)
11655 (linux_write_memory): Inline `inferior_pid'.
11656 (linux_look_up_symbols): Adjust to use per-process
11657 `thread_db_active'.
11658 (linux_request_interrupt): Adjust to use ptids.
11659 (linux_read_auxv): Inline `inferior_pid'.
11660 (initialize_low): Don't reference thread_db_active.
11661 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11662 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11663 (ps_getpid): Return the pid of the current inferior.
11664 * thread-db.c (proc_handle, thread_agent): Delete.
11665 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11666 per-process data.
11667 (find_one_thread): Change argument type to ptid_t. Adjust to
11668 per-process data.
11669 (maybe_attach_thread): Adjust to per-process data and ptids.
11670 (thread_db_find_new_threads): Ditto.
11671 (thread_db_init): Ditto.
11672 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11673 processes table. Adjust to use ptids.
11674 (spu_kill, spu_detach): Adjust interface. Remove process from
11675 processes table.
11676 (spu_join, spu_thread_alive): Adjust interface.
11677 (spu_wait): Adjust interface. Remove process from processes
11678 table. Adjust to use ptids.
11679 * win32-low.c (current_inferior_tid): Delete.
11680 (current_inferior_ptid): New.
11681 (debug_event_ptid): New.
11682 (thread_rec): Take a ptid. Adjust.
11683 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11684 (child_delete_thread): Ditto.
11685 (do_initial_child_stuff): Add `attached' argument. Add process to
11686 processes table.
11687 (child_fetch_inferior_registers, child_store_inferior_registers):
11688 Adjust.
11689 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11690 (win32_attach): Pass 1 to do_initial_child_stuff.
11691 (win32_kill): Adjust interface. Remove process from processes
11692 table.
11693 (win32_detach): Ditto.
11694 (win32_join): Adjust interface.
11695 (win32_thread_alive): Take a ptid.
11696 (win32_resume): Adjust to use ptids.
11697 (get_child_debug_event): Ditto.
11698 (win32_wait): Adjust interface. Remove exiting process from
11699 processes table.
11700
bd99dc85
PA
117012009-04-01 Pedro Alves <pedro@codesourcery.com>
11702
11703 Non-stop mode support.
11704
11705 * server.h (non_stop): Declare.
11706 (gdb_client_data, handler_func): Declare.
11707 (delete_file_handler, add_file_handler, start_event_loop):
11708 Declare.
11709 (handle_serial_event, handle_target_event, push_event)
11710 (putpkt_notif): Declare.
11711 * target.h (enum resume_kind): New.
11712 (struct thread_resume): Replace `step' field by `kind' field.
11713 (TARGET_WNOHANG): Define.
11714 (struct target_ops) <wait>: Add `options' argument.
11715 <supports_non_stop, async, start_non_stop>: New fields.
11716 (target_supports_non_stop, target_async): New.
11717 (start_non_stop): Declare.
11718 (mywait): Add `options' argument.
11719 * target.c (mywait): Add `options' argument. Print child exit
11720 notifications here.
11721 (start_non_stop): New.
11722 * server.c (non_stop, own_buf, mem_buf): New globals.
11723 (struct vstop_notif): New.
11724 (notif_queue): New global.
11725 (queue_stop_reply, push_event, discard_queued_stop_replies)
11726 (send_next_stop_reply): New.
11727 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11728 interface changes.
11729 (attach_inferior): In non-stop mode, don't wait for the target
11730 here.
11731 (handle_general_set): Handle QNonStop.
11732 (handle_query): When handling qC, return the current general
11733 thread, instead of the first thread of the list.
11734 (handle_query): If the backend supports non-stop mode, include
11735 QNonStop+ in the qSupported query response.
11736 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11737 and non-stop mode.
11738 (handle_v_attach, handle_v_run): Handle non-stop mode.
11739 (handle_v_stopped): New.
11740 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11741 (myresume): Adjust to use resume_kind. Handle non-stop.
11742 (queue_stop_reply_callback): New.
11743 (handle_status): Handle non-stop mode.
11744 (main): Clear non_stop flag on reconnection. Use the event-loop.
11745 Refactor serial protocol handling from here ...
11746 (process_serial_event): ... to this new function. When GDB
11747 selects any thread, select one here. In non-stop mode, wait until
11748 GDB acks all pending events before exiting.
11749 (handle_serial_event, handle_target_event): New.
11750 * remote-utils.c (remote_open): Install remote_desc in the event
11751 loop.
11752 (remote_close): Remove remote_desc from the event loop.
11753 (putpkt_binary): Rename to...
11754 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11755 (putpkt_binary): New as wrapper around putpkt_binary_1.
11756 (putpkt_notif): New.
11757 (prepare_resume_reply): In non-stop mode, don't change the
11758 general_thread.
11759 * event-loop.c: New.
11760 * Makefile.in (OBJ): Add event-loop.o.
11761 (event-loop.o): New rule.
11762
11763 * linux-low.h (pid_of): Moved here.
11764 (lwpid_of): New.
11765 (get_lwp_thread): Use lwpid_of.
11766 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11767 * linux-low.c (pid_of): Delete.
11768 (inferior_pid): Use lwpid_of.
11769 (linux_event_pipe): New.
11770 (target_is_async_p): New.
11771 (delete_lwp): New.
11772 (handle_extended_wait): Use lwpid_of.
11773 (add_lwp): Don't set lwpid field.
11774 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11775 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11776 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11777 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11778 first. Adjust to linux_wait_for_event interface changes. Use
11779 lwpid_of.
11780 (linux_detach): Don't delete the main lwp here.
11781 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11782 (status_pending_p): Don't consider explicitly suspended lwps.
11783 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11784 pointer. Add OPTIONS argument. Change return type to int. Use
11785 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11786 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11787 pointer. Add status pointer argument. Return a pid instead of a
11788 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11789 changes. In non-stop mode, don't switch to a random thread.
11790 (linux_wait): Rename to...
11791 (linux_wait_1): ... this. Add target_options argument, and handle
11792 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11793 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11794 clean exit and signal exit code. Don't stop all threads in
11795 non-stop mode. In all-stop mode, only stop all threads when
11796 reporting a stop to GDB. Handle explicit thread stop requests.
11797 (async_file_flush, async_file_mark): New.
11798 (linux_wait): New.
11799 (send_sigstop): Use lwpid_of.
11800 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11801 interface changes. In non-stop mode, don't switch to a random
11802 thread.
11803 (linux_resume_one_lwp): Use lwpid_of.
11804 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11805 (linux_resume_one_thread): ... this. Handle resume_stop. In
11806 non-stop mode, don't look for pending flag in all threads.
11807 (resume_status_pending_p): Don't consider explicitly suspended
11808 threads.
11809 (my_waitpid): Reimplement. Emulate __WALL.
11810 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11811 Use lwpid_of.
11812 (sigchld_handler, linux_supports_non_stop, linux_async)
11813 (linux_start_non_stop): New.
11814 (linux_target_ops): Register linux_supports_non_stop, linux_async
11815 and linux_start_non_stop.
11816 (initialize_low): Install SIGCHLD handler.
11817 * thread-db.c (thread_db_create_event, find_one_thread)
11818 (thread_db_get_tls_address): Use lwpid_of.
11819 * win32-low.c (win32_detach): Adjust to use resume_kind.
11820 (win32_wait): Add `options' argument.
11821 * spu-low.c (spu_resume): Adjust to use resume_kind.
11822 (spu_wait): Add `options' argument.
11823
5b1c542e
PA
118242009-04-01 Pedro Alves <pedro@codesourcery.com>
11825
11826 Decouple target code from remote protocol.
11827
11828 * target.h (enum target_waitkind): New.
11829 (struct target_waitstatus): New.
11830 (struct target_ops) <wait>: Return an unsigned long. Take a
11831 target_waitstatus pointer instead of a char pointer.
11832 (mywait): Likewise.
11833 * target.c (mywait): Change prototype to return an unsigned long.
11834 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11835 * server.h (thread_from_wait, old_thread_from_wait): Delete
11836 declarations.
11837 (prepare_resume_reply): Change prototype to take a
11838 target_waitstatus.
11839 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11840 (last_status, last_ptid): New.
11841 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11842 pid instead of a signal.
11843 (attach_inferior): Remove "status" and "signal" parameters.
11844 Adjust.
11845 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11846 not as an address.
11847 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11848 (handle_v_requests, myresume): Remove "status" and "signal"
11849 parameters. Adjust.
11850 (handle_status): New.
11851 (main): Delete local `status'. Adjust.
11852 * remote-utils.c: Include target.h.
11853 (prepare_resume_reply): Change prototype to take a
11854 target_waitstatus. Adjust.
11855
11856 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11857 interface.
11858 * spu-low.c (spu_wait): Adjust.
11859 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11860 Delete.
11861 (win32_wait): Adjust.
11862
2bd7c093
PA
118632009-04-01 Pedro Alves <pedro@codesourcery.com>
11864
11865 * target.h (struct thread_resume): Delete leave_stopped member.
11866 (struct target_ops): Add a `n' argument to the `resume' callback.
11867 * server.c (start_inferior): Adjust.
11868 (handle_v_cont, myresume): Adjust.
11869 * linux-low.c (check_removed_breakpoint): Adjust to resume
11870 interface change, and to removed leave_stopped field.
11871 (resume_ptr): Delete.
11872 (struct thread_resume_array): New.
11873 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11874 resume interface change.
11875 (linux_continue_one_thread, linux_queue_one_thread)
11876 (resume_status_pending_p): Check if the resume field is NULL
11877 instead of checking the leave_stopped member.
11878 (linux_resume): Adjust to the target resume interface change.
11879 * spu-low.c (spu_resume): Adjust to the target resume interface
11880 change.
11881 * win32-low.c (win32_detach, win32_resume): Ditto.
11882
c35fafde
PA
118832009-04-01 Pedro Alves <pedro@codesourcery.com>
11884
11885 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11886 flag.
11887 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11888 pending.
11889 (linux_continue_one_thread): Only preserve the stepping flag if
11890 there's a pending breakpoint.
11891
0a59d50b
PA
118922009-03-31 Pedro Alves <pedro@codesourcery.com>
11893
11894 * server.c (main): After the inferior having exited, call
11895 remote_close before exiting gdbserver.
11896
f04c6d38
TJB
118972009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11898
11899 Fix size of FPSCR in Power 7 processors.
11900 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11901 (PPC_FEATURE_HAS_DFP): New #define.
11902 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11903 size of the FPSCR.
11904
78e5cee6
PA
119052009-03-23 Pedro Alves <pedro@codesourcery.com>
11906
11907 * server.c (handle_query) Whitespace and formatting.
11908
1b3f6016
PA
119092009-03-22 Pedro Alves <pedro@codesourcery.com>
11910
11911 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11912 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11913 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11914 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11915 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11916 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11917 Makefile.in, configure.ac: Fix whitespace throughout.
11918 * configure: Regenerate.
11919
a07b2135
PA
119202009-03-22 Pedro Alves <pedro@codesourcery.com>
11921
11922 * inferiors.c (find_inferior): Make it safe for the callback
11923 function to delete the currently iterated inferior.
11924
67cc2626
PA
119252009-03-22 Pedro Alves <pedro@codesourcery.com>
11926
11927 * Makefile.in (linuw_low_h): Move higher.
11928 (thread-db.o): Depend on $(linux_low_h).
11929
54a0b537
PA
119302009-03-17 Pedro Alves <pedro@codesourcery.com>
11931
11932 Rename "process" to "lwp" throughout.
11933
11934 * linux-low.c (all_processes): Rename to...
11935 (all_lwps): ... this.
11936 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11937 (add_process): Rename to ...
11938 (add_lwp): ... this. Adjust.
11939 (linux_create_inferior): Adjust.
11940 (linux_attach_lwp): Adjust.
11941 (linux_attach): Adjust.
11942 (linux_kill_one_process): Rename to ...
11943 (linux_kill_one_lwp): ... this. Adjust.
11944 (linux_kill): Adjust.
11945 (linux_detach_one_process): Rename to ...
11946 (linux_detach_one_lwp): ... this. Adjust.
11947 (linux_detach): Adjust.
11948 (check_removed_breakpoint): Adjust.
11949 (status_pending_p): Adjust.
11950 (linux_wait_for_process): Rename to ...
11951 (linux_wait_for_lwp): ... this. Adjust.
11952 (linux_wait_for_event): Adjust.
11953 (send_sigstop): Adjust.
11954 (wait_for_sigstop): Adjust.
11955 (stop_all_processes): Rename to ...
11956 (stop_all_lwps): ... this.
11957 (linux_resume_one_process): Rename to ...
11958 (linux_resume_one_lwp): ... this. Adjust.
11959 (linux_set_resume_request, linux_continue_one_thread)
11960 (linux_queue_one_thread, resume_status_pending_p)
11961 (usr_store_inferior_registers, regsets_store_inferior_registers)
11962 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11963 Adjust.
11964 * linux-low.h (get_process): Rename to ...
11965 (get_lwp): ... this. Adjust.
11966 (get_thread_process): Rename to ...
11967 (get_thread_lwp): ... this. Adjust.
11968 (get_process_thread): Rename to ...
11969 (get_lwp_thread): ... this. Adjust.
11970 (struct process_info): Rename to ...
11971 (struct lwp_info): ... this.
11972 (all_processes): Rename to ...
11973 (all_lwps): ... this.
11974 * proc-service.c (ps_lgetregs): Adjust.
11975 * thread-db.c (thread_db_create_event, find_one_thread)
11976 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11977
0b16c5cf
PA
119782009-03-14 Pedro Alves <pedro@codesourcery.com>
11979
11980 * server.c (handle_query): Handle "qAttached".
11981
32de4b9d
NS
119822009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11983
11984 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11985 GPLv3, update license URL.
11986
2aecd87f
DE
119872009-03-01 Doug Evans <dje@google.com>
11988
93efd302 11989 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
11990 (server_h): Add gdb_signals.h.
11991 (signals.o): Update.
11992 * server.h (target_signal_from_host,target_signal_to_host_p)
11993 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11994
86b1f9c5
PM
119952009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11996
11997 * remote-utils.c (getpkt): Also generate remote-debug
11998 information if noack_mode is set.
11999
4aa995e1
PA
120002009-02-06 Pedro Alves <pedro@codesourcery.com>
12001
12002 * server.c (handle_query): Report qXfer:siginfo:read and
12003 qXfer:siginfo:write as supported and handle them.
12004 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12005 * linux-low.c (linux_xfer_siginfo): New.
12006 (linux_target_ops): Set it.
12007
62709adf
PA
120082009-01-26 Pedro Alves <pedro@codesourcery.com>
12009
12010 * server.c (gdbserver_usage): Mention --remote-debug.
12011 (main): Accept '--remote-debug' switch.
12012
aef93bd7
DE
120132009-01-18 Doug Evans <dje@google.com>
12014
12015 * regcache.c (new_register_cache): No need to check result of xcalloc.
12016 * server.c (handle_search_memory): Back out calls to xmalloc,
12017 result is checked and error is returned to user upon failure.
12018 (handle_query): Ditto. Add more checks for result of malloc.
12019 (handle_v_cont): Check result of malloc, report error back to
12020 user upon failure.
12021 (handle_v_run): Ditto. Call freeargv.
12022 * server.h (freeargv): Declare.
12023 * utils.c (freeargv): New fn.
12024
54363045
DE
120252009-01-15 Doug Evans <dje@google.com>
12026
f626972c
DE
12027 * gdbreplay.c (perror_with_name): Make arg const char *.
12028 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12029 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12030 * utils.c (perror_with_name): Make arg const char *.
54363045 12031
18aae699
PA
120322009-01-14 Pedro Alves <pedro@codesourcery.com>
12033
12034 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12035 when handling a EXIT_PROCESS_DEBUG_EVENT.
12036
ff703abe
JB
120372009-01-06 Joel Brobecker <brobecker@adacore.com>
12038
12039 * gdbreplay.c (gdbreplay_version): Update copyright year.
12040 * server.c (gdbserver_version): Likewise.
12041
f21cc1a2 120422009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12043
12044 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12045 (handle_extended_wait): Improve comment.
0e21c1ec 12046
bca929d3
DE
120472008-12-13 Doug Evans <dje@google.com>
12048
12049 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12050 * server.h (ATTR_MALLOC): New macro.
12051 (xmalloc,xcalloc,xstrdup): Declare.
12052 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12053 * inferiors.c: Ditto.
12054 * linux-low.c: Ditto.
12055 * mem-break.c: Ditto.
12056 * regcache.c: Ditto.
12057 * remote-utils.c: Ditto.
12058 * server.c: Ditto.
12059 * target.c: Ditto.
12060 * win32-low.c: Ditto.
12061
97438e3f
DE
120622008-12-12 Doug Evans <dje@google.com>
12063
896c7fbb
DE
12064 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12065 in debugging printf.
12066
97438e3f
DE
12067 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12068
e3b886f8
DE
120692008-12-09 Doug Evans <dje@google.com>
12070
12071 * linux-low.h (struct process_info): Delete member tid, unused.
12072 * thread-db.c (find_one_thread): Update.
12073 (maybe_attach_thread): Update.
12074
07e059b5
VP
120752008-12-02 Pedro Alves <pedro@codesourcery.com>
12076
889bf7c5
PA
12077 * target.h (struct target_ops): Add qxfer_osdata member.
12078 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12079 and dirent.h.
12080 (linux_qxfer_osdata): New functions.
12081 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12082 callback.
12083 * server.c (handle_query): Handle "qXfer:osdata:read:".
12084 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12085 (buffer_xml_printf): New functions.
12086 * server.h (struct buffer): New.
12087 (buffer_grow_str, buffer_grow_str0): New macros.
12088 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12089 (buffer_xml_printf): Declare.
07e059b5 12090
4cab47ab
DE
120912008-11-24 Doug Evans <dje@google.com>
12092
12093 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12094
f142445f
DJ
120952008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12096
12097 * server.c (handle_v_run): Always use the supplied argument list.
12098
d0107bb6 120992008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12100
d0107bb6
BW
12101 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12102 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12103
2c4ad781
TJB
121042008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12105
12106 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12107 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12108 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12109 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12110 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12111 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12112 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12113 XML target descriptions.
12114 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12115 when inferior is running on an ISA 2.05 or later processor. Add
12116 special case to return offset for full 64-bit slot of FPSCR when
12117 in 32-bits.
12118
dfb64f85
DJ
121192008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12120
12121 * Makefile.in (SFILES, clean): Added sparc64 files.
12122 (reg-sparc64.o, reg-sparc64.c): New.
12123 * configure.srv (sparc*-*-linux*): New configuration.
12124 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12125 syscall arguments for SPARC.
12126 (regsets_store_inferior_registers): Likewise.
12127 * linux-sparc-low.c: New file.
12128
66b6e1dd
DE
121292008-10-21 Doug Evans <dje@google.com>
12130
12131 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12132 (READLINE_DIR,READLINE_DEP): Delete.
12133 (INTERNAL_CFLAGS): Update.
12134 (LINTFLAGS): Update.
12135
9b710a42
PA
121362008-10-10 Pedro Alves <pedro@codesourcery.com>
12137
12138 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12139 whole argv from the last run, not just argv[0].
12140
5822d809
PA
121412008-09-08 Pedro Alves <pedro@codesourcery.com>
12142
12143 * regcache.c (new_register_cache): Return NULL if the register
12144 cache size isn't known yet.
12145 (free_register_cache): Avoid dereferencing a NULL regcache.
12146
74aac56f
DJ
121472008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12148
12149 * configure.srv: Merge MIPS and MIPS64.
12150
400b20f5
MR
121512008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12152
12153 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12154
677c5bb1
LM
121552008-08-18 Luis Machado <luisgpm@br.ibm.com>
12156
12157 * Makefile.in: Add required vsx dependencies.
12158
12159 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12160 Declare init_registers_powerpc_vsx32l.
12161 Declare init_registers_powerpc_vsx64l.
12162 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12163 (ppc_arch_setup): Check for VSX in hwcap.
12164 (ppc_fill_vsxregset): New function.
12165 (ppc_store_vsxregset): New function.
12166 Add new VSX entry in regset_info target_regsets.
12167
12168 * configure.srv: Add new VSX dependencies.
12169
a6f3e723
SL
121702008-08-12 Pedro Alves <pedro@codesourcery.com>
12171
12172 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12173 (remote_open): Set or clear transport_is_reliable.
12174 (putpkt_binary): Don't expect acks in noack mode.
12175 (getpkt): Don't send ack/nac in noack mode.
12176 * server.c (handle_general_set): Handle QStartNoAckMode.
12177 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12178 qSupported.
12179 (main): Reset noack_mode on every connection.
12180 * server.h (noack_mode): Declare.
12181
a417dc56
RW
121822008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12183
12184 * Makefile.in (GDBREPLAY_OBS): New variable.
12185 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12186
3221518c
UW
121872008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12188 Daniel Jacobowitz <dan@codesourcery.com>
12189
12190 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12191 (usr_store_inferior_registers): Likewise.
12192 (regsets_store_inferior_registers): Likewise.
12193
ec56be1b
PA
121942008-07-31 Rolf Jansen <rj@surtec.com>
12195 Pedro Alves <pedro@codesourcery.com>
12196
12197 * configure.ac: Check for memmem declaration.
12198 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12199 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12200 (disable_packet_qfThreadInfo): Unconditionally compile.
12201 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12202 * configure, config.in: Regenerate.
12203
2fe5e3ff
DE
122042008-07-28 Doug Kwan <dougkwan@google.com>
12205
12206 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12207 (linux_write_memory): Remove declaration of errno.
12208
836acd6d
UW
122092008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12210
12211 * linux-low.c (handle_extended_wait): Do not use "status"
12212 variable uninitialized.
12213
aeba519e
PA
122142008-07-07 Pedro Alves <pedro@codesourcery.com>
12215
12216 * server.c (handle_v_attach): Inhibit reporting dll changes.
12217
db42f210
PA
122182008-06-27 Pedro Alves <pedro@codesourcery.com>
12219
12220 * remote-utils.c (prepare_resume_reply): If requested, don't
12221 output "thread:TID" in the T stop reply.
12222
12223 * server.c (disable_packet_vCont, disable_packet_Tthread)
12224 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12225 (handle_query): If requested, disable support for qC, qfThreadInfo
12226 and qsThreadInfo.
12227 (handle_v_requests): If requested, disable support for vCont.
12228 (gdbserver_show_disableable): New.
12229 (main): Handle --disable-packet and --disable-packet=LIST.
12230
12231 * server.h (disable_packet_vCont, disable_packet_Tthread)
12232 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12233
8e4c5421
CD
122342008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12235
12236 * server.c (gdbserver_usage): Mention --version.
12237
6e23a804
DJ
122382008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12239
12240 * Makefile.in (gdbreplay.o): New rule.
12241
90aa6a40
JM
122422008-06-06 Joseph Myers <joseph@codesourcery.com>
12243
12244 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12245 message, not gdbserver.
12246
c16158bc 122472008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
12248 Nathan Sidwell <nathan@codesourcery.com>
12249 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
12250
12251 * acinclude.m4: Include ../../config/acx.m4.
12252 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12253 * configure, config.in: Regenerate.
12254 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12255 * server.c (gdbserver_version): Print PKGVERSION.
12256 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12257 (main): Adjust gdbserver_usage calls.
12258 * gdbreplay.c (version, host_name): Add declarations.
12259 (gdbreplay_version, gdbreplay_usage): New.
12260 (main): Accept --version and --help options.
12261
aeb75bf5
DJ
122622008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12263
12264 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12265 (arm_breakpoint_at): Handle Thumb.
12266 (the_low_target): Add comment.
12267
76b233dd
UW
122682008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12269
12270 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12271
08388c79
DE
122722008-05-09 Doug Evans <dje@google.com>
12273
a3c83fae
DE
12274 * server.h (decode_search_memory_packet): Declare.
12275 * remote-utils.c (decode_search_memory_packet): New fn.
12276 * server.c (handle_search_memory_1): New fn.
08388c79
DE
12277 (handle_search_memory): New fn.
12278 (handle_query): Process qSearch:memory packets.
12279
bb9c3d36
UW
122802008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12281
12282 * regcache.c (registers_length): Remove.
12283 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12284 full register packet.
12285 * regcache.h (registers_length): Remove prototype.
12286 * server.h (PBUFSIZ): Define to 16384.
12287
7284e1be
UW
122882008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12289
12290 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12291 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12292 powerpc-64l.o, and powerpc-altivec64l.o.
12293 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12294 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12295 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12296 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12297 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12298 to srv_xmlfiles.
12299
12300 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12301 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12302 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12303 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12304 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12305 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12306 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12307 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12308 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12309 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12310 (clean): Update.
12311
12312 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12313 (init_registers_powerpc_32l): ... this new prototype.
12314 (init_registers_powerpc_32): Remove, replace by ...
12315 (init_registers_powerpc_altivec32l): ... this new prototype.
12316 (init_registers_powerpc_e500): Remove, replace by ...
12317 (init_registers_powerpc_e500l): ... this new prototype.
12318 (init_registers_ppc64): Remove, replace by ...
12319 (init_registers_powerpc_64l): ... this new prototype.
12320 (init_registers_powerpc_64): Remove, replace by ...
12321 (init_registers_powerpc_altivec64l): ... this new prototype.
12322 (ppc_num_regs): Set to 73.
12323 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12324 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12325 (ppc_cannot_store_register): Handle orig_r3 and trap.
12326 (ppc_arch_setup): Update init_registers_... calls.
12327 (ppc_fill_gregset): Handle orig_r3 and trap.
12328
12329 * inferiors.c (clear_inferiors): Reset current_inferior.
12330
fdc59709
PB
123312008-04-23 Paolo Bonzini <bonzini@gnu.org>
12332
889bf7c5
PA
12333 * acinclude.m4: Add override.m4.
12334 * configure: Regenerate.
fdc59709 12335
c9b2f845
UW
123362008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12337
12338 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12339 initial call to init_register_ppc64.
12340
550512b8
UW
123412008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12342
43aaf8b6
PA
12343 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12344 single powerpc*-*-linux* case.
550512b8
UW
12345 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12346
b6430ec3
UW
123472008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12348
12349 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 12350 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
12351 from reg_xmlfiles.
12352 * linux-ppc-low.c: Include <elf.h>.
12353 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12354 (ppc_hwcap): New global variable.
12355 (ppc_regmap): Remove __SPE__ #ifdef sections.
12356 (ppc_regmap_e500): New global variable.
12357 (ppc_cannot_store_register): Update __SPE__ special case.
12358 (ppc_get_hwcap): New function.
12359 (ppc_arch_setup): Use it to determine whether inferior supports
12360 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12361 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12362 Do not access registers if target does not support AltiVec.
12363 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12364 Do not access registers if target does not support SPE.
12365 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12366
52fa2412
UW
123672008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12368
12369 * linux-low.c (disabled_regsets, num_regsets): New.
12370 (use_regsets_p): Delete.
12371 (linux_wait_for_process): Clear disabled_regsets.
12372 (regsets_fetch_inferior_registers): Check and set it.
12373 (regsets_store_inferior_registers): Likewise.
12374 (linux_fetch_registers, linux_store_registers): Do not use
12375 use_regsets_p.
12376 (initialize_low): Allocate disabled_regsets.
12377
e28b3332
DJ
123782008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12379
12380 * Makefile.in (LIBOBJS): New.
12381 (OBS): Use LIBOBJS.
12382 (memmem.o): New rule.
12383 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12384 * configure: Regenerated.
12385
4536995d
UW
123862008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12387
12388 * server.c (handle_query): Never return "unsupported" for
12389 qXfer:features:read queries.
12390
221c031f
UW
123912008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12392
12393 * server.c (get_features_xml): Fix inverted condition.
12394 (handle_query): Always support qXfer:feature:read.
12395
ccd213ac
DJ
123962008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12397
12398 * server.c (wrapper_argv): New.
12399 (start_inferior): Handle wrapper_argv. If set, expect an extra
12400 trap.
12401 (gdbserver_usage): Document --wrapper.
12402 (main): Parse --wrapper.
12403
6fe305f7
UW
124042008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12405
12406 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12407 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12408 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12409 (ppc_set_pc): Likewise.
12410 (ppc_arch_setup): New function.
12411 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12412 of collect_register.
889bf7c5 12413 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 12414
5b0a002e
UW
124152008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12416
12417 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12418 instead of linux-ppc64-low.o.
12419 * linux-ppc64-low.c: Remove file.
12420 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12421 (linux-ppc64-low.o): Remove rule.
12422
12423 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12424 (init_registers_powerpc_64): Likewise.
12425 (ppc_regmap): Conditionally define depending on __powerpc64__.
12426 (ppc_cannot_store_register): Do not special-case "fpscr" when
12427 compiled on __powerpc64__.
12428 (ppc_collect_ptrace_register): New function.
12429 (ppc_supply_ptrace_register): New function.
12430 (ppc_breakpoint): Change type to "unsigned int".
12431 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12432 (the_low_target): Conditionally provide initializers for the
889bf7c5 12433 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
12434 collect_ptrace_register and supply_ptrace_register members.
12435
9b4b61c8
UW
124362008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12437
12438 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12439 * server.c (gdbserver_xmltarget): Define.
12440 (get_features_xml): Use it to replace "target.xml" and arch_string.
12441
12442 * configure.srv: Remove srv_xmltarget. Add XML files that were
12443 mentioned there to srv_xmlfiles instead. Remove conditional tests
12444 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12445 srv_xmlfiles and srv_regobj to include all possible choices.
12446 * configure.ac (srv_xmltarget): Remove.
12447 (srv_xmlfiles): Do not add "target.xml".
12448 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12449 checks for supplementary target information.
12450 * configure: Regenerate.
12451 * Makefile.in (XML_TARGET): Remove.
12452 (target.xml): Remove rule.
12453 (clean): Do not clean up target.xml.
12454 (.PRECIOUS): Do not mention target.xml.
12455
12456 * target.h (struct target_ops): Remove arch_string member.
12457 * linux-low.c (linux_arch_string): Remove.
12458 (linux_target_ops): Remove arch_string initializer.
12459 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12460 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12461 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12462 * spu-low.c (spu_arch_string): Remove.
12463 (spu_target_ops): Remove arch_string initializer.
12464 * win32-low.c (win32_arch_string): Remove.
12465 (win32_target_ops): Remove arch_string initializer.
12466 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12467 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12468 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12469
ee1a7ae4
UW
124702008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12471
12472 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12473 by collect_ptrace_register and supply_ptrace_register hooks.
12474 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12475 instead of checking for the_low_target.left_pad_xfer.
12476 (usr_store_inferior_registers): Use collect_ptrace_register callback
12477 instead of checking for the_low_target.left_pad_xfer.
12478
12479 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12480 (s390_supply_ptrace_register): Likewise.
12481 (s390_fill_gregset): Call s390_collect_ptrace_register.
12482 (the_low_target): Update.
12483
12484 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12485 (ppc_supply_ptrace_register): Likewise.
12486 (the_low_target): Update.
12487
12488 * linux-i386-low.c (the_low_target): Update.
12489 * linux-x86-64-low.c (the_low_target): Update.
12490
d61ddec4
UW
124912008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12492
12493 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12494 reg-s390.o and reg-s390x.o.
12495
12496 * linux-low.c (new_inferior): New global variable.
12497 (linux_create_inferior, linux_attach): Set it.
12498 (linux_wait_for_process): Call the_low_target.arch_setup after the
12499 target has stopped for the first time.
12500 (initialize_low): Do not call the_low_target.arch_setup.
12501
12502 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12503 (s390_set_pc): Likewise.
12504 (s390_arch_setup): New function.
12505 (the_low_target): Use s390_arch_setup as arch_setup routine.
12506
12507 * regcache.c (realloc_register_cache): New function.
12508 (set_register_cache): Call it for each existing regcache.
12509
d05b4ac3
UW
125102008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12511
12512 * server.h (init_registers): Remove prototype.
12513
12514 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12515 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12516 instead of init_registers ().
12517 * linux-arm-low.c (init_registers_arm): Add prototype.
12518 (init_registers_arm_with_iwmmxt): Likewise.
12519 (the_low_target): Add initializer for arch_setup field.
12520 * linux-cris-low.c (init_registers_cris): Add prototype.
12521 (the_low_target): Add initializer for arch_setup field.
12522 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12523 (the_low_target): Add initializer for arch_setup field.
12524 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12525 (the_low_target): Add initializer for arch_setup field.
12526 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12527 (the_low_target): Add initializer for arch_setup field.
12528 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12529 (the_low_target): Add initializer for arch_setup field.
12530 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12531 (the_low_target): Add initializer for arch_setup field.
12532 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12533 (init_registers_mips64_linux): Likewise.
12534 (the_low_target): Add initializer for arch_setup field.
12535 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12536 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12537 (the_low_target): Add initializer for arch_setup field.
12538 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12539 (init_registers_powerpc_64): Likewise.
12540 (the_low_target): Add initializer for arch_setup field.
12541 * linux-s390-low.c (init_registers_s390): Add prototype.
12542 (init_registers_s390x): Likewise.
12543 (the_low_target): Add initializer for arch_setup field.
12544 * linux-sh-low.c (init_registers_sh): Add prototype.
12545 (the_low_target): Add initializer for arch_setup field.
12546 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12547 (the_low_target): Add initializer for arch_setup field.
12548 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12549 (the_low_target): Add initializer for arch_setup field.
12550
12551 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12552 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12553 instead of init_registers ().
12554 * win32-arm-low.c (init_registers_arm): Add prototype.
12555 (the_low_target): Add initializer for arch_setup field.
12556 * win32-i386-low.c (init_registers_i386): Add prototype.
12557 (the_low_target): Add initializer for arch_setup field.
12558
12559 * spu-low.c (init_registers_spu): Add prototype.
12560 (initialize_low): Call initialie_registers_spu () instead of
12561 initialize_registers ().
12562
fd96d250
PA
125632008-02-19 Pedro Alves <pedro@codesourcery.com>
12564
12565 * server.c (handle_v_requests): When handling the vRun and vAttach
12566 packets, if already debugging a process, don't kill it. Return an
12567 error instead.
12568
d41b6bb4
DJ
125692008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12570
12571 * server.c (handle_query): Correct length check.
12572
5ac588cf
PA
125732008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12574
12575 * win32-low.c (do_initial_child_stuff): Add process handle
12576 parameter. Set current_process_handle and current_process_id from the
12577 parameters. Clear globals.
12578 (win32_create_inferior): Don't set current_process_handle and
12579 current_process_id here. Instead pass them on the call to
12580 do_initial_child_stuff.
12581 (win32_attach): Likewise.
12582 (win32_clear_inferiors): New.
12583 (win32_kill): Don't close the current process handle or the
12584 current thread handle here. Instead call win32_clear_inferiors.
12585 (win32_detach): Don't open a new handle to the process. Call
12586 win32_clear_inferiors.
12587 (win32_join): Don't rely on current_process_handle; open a new
12588 handle using the process id.
12589 (win32_wait): Call win32_clear_inferiors when the inferior process
12590 has exited.
12591
ecd7ecbc
DJ
125922008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12593
12594 * server.c (monitor_show_help): Add "exit".
12595
1525d545
MG
125962008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12597
ecd7ecbc 12598 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
12599 (clean): Add reg-xtensa.c.
12600 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
12601 * configure.srv (xtensa*-*-linux*) New target.
12602 * linux-xtensa-low.c: New.
12603 * xtensa-xtregs.c: New.
1525d545 12604
59a016f0
PA
126052008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12606
12607 * hostio.c: Don't include errno.h.
12608 (errno_to_fileio_errno): Move to hostio-errno.
12609 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12610 error number outputting to the target->hostio_last_error callback.
12611 (hostio_packet_error): Use FILEIO_EINVAL directly.
12612 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12613 calls to hostio_error.
12614 * hostio-errno.c: New.
12615 * server.h (hostio_last_error_from_errno): Declare.
12616 * target.h (target_ops): Add hostio_last_error member.
12617 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12618 as hostio_last_error handler.
889bf7c5 12619 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
12620 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12621 (wince_hostio_last_error): New functions.
12622 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12623 as hostio_last_error handler.
12624 (win32_target_ops) [!_WIN32_WCE]: Register
12625 hostio_last_error_from_errno as hostio_last_error handler.
12626 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12627 (hostio-errno.o): New rule.
12628 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12629 * configure.srv (srv_hostio_err_objs): New variable. Default to
12630 hostio-errno.o.
12631 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12632 * configure: Regenerate.
12633
2d717e4f
DJ
126342008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12635
12636 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12637 (linux_kill, linux_detach): Clean up the process list.
12638 * remote-utils.c (remote_open): Improve port number parsing.
12639 (putpkt_binary, input_interrupt): Only send interrupts if the target
12640 is running.
12641 * server.c (extended_protocol): Make static.
12642 (attached): Define earlier.
12643 (exit_requested, response_needed, program_argv): New variables.
12644 (target_running): New.
12645 (start_inferior): Clear attached here.
12646 (attach_inferior): Set attached here.
12647 (require_running): Define.
12648 (handle_query): Use require_running and target_running. Implement
12649 "monitor exit".
12650 (handle_v_attach, handle_v_run): New.
12651 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12652 (gdbserver_usage): Update.
12653 (main): Redo argument parsing. Handle --debug and --multi. Handle
12654 --attach along with other options or after the port. Save
12655 program_argv. Support no initial program. Resynchronize
12656 communication with GDB after an error. Handle "monitor exit".
12657 Use require_running and target_running. Always allow the extended
12658 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12659 restart in extended mode.
12660 * README: Refer to the GDB manual. Update --attach usage.
12661
7407e2de
AS
126622007-12-20 Andreas Schwab <schwab@suse.de>
12663
12664 * linux-low.c (STACK_SIZE): Define.
12665 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12666 (linux_test_for_tracefork): Likewise.
12667
b65d95c5
DJ
126682007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12669
12670 * linux-low.c (linux_wait_for_event): Update messages. Do not
12671 reinsert auto-delete breakpoints.
12672 * mem-break.c (struct breakpoint): Change return type of handler to
12673 int.
12674 (set_breakpoint_at): Update handler type.
12675 (reinsert_breakpoint_handler): Return 1 instead of calling
12676 delete_breakpoint.
12677 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12678 setting a new one.
12679 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12680 * mem-break.h (set_breakpoint_at): Update handler type.
12681 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12682 * win32-low.c (auto_delete_breakpoint): New.
12683 (get_child_debug_event): Use it.
12684
4e799345
DJ
126852007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12686
12687 * configure.ac: Check for pread and pwrite.
12688 * hostio.c (handle_pread): Fall back to lseek and read.
12689 (handle_pwrite): Fall back to lseek and write.
12690 * config.in, configure: Regenerated.
12691
27524b67
DJ
126922007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12693
12694 * server.c (myresume): Add own_buf argument.
12695 (main): Update calls.
12696
a20d5e98
DJ
126972007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12698
12699 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12700 * remote-utils.c (remote_open): Do not call disable_async_io.
12701 (block_async_io): Delete.
12702 (unblock_async_io): Make static.
12703 (initialize_async_io): New.
12704 * server.c (handle_v_cont): Handle async I/O here.
12705 (myresume): Likewise. Move other common resume tasks here...
12706 (main): ... from here. Call initialize_async_io. Disable async
12707 I/O before the main loop.
12708 * server.h (initialize_async_io): Declare.
12709 (block_async_io, unblock_async_io): Delete prototypes.
12710 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12711
b79d787e
DJ
127122007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12713
12714 * remote-utils.c (readchar): Allow binary data in received messages.
12715
d97903b2
PA
127162007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12717
12718 * win32-low.c (attaching): New global.
12719 (win32_create_inferior): Clear the `attaching' global.
12720 (win32_attach): Set the `attaching' global.
12721 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12722 attaching. Only set a breakpoint at the entry point if not
12723 attaching.
12724
311de423
PA
127252007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12726
12727 * server.c (main): Don't report dll events on the initial
12728 connection on attaches.
12729
6c2d16d2
PA
127302007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12731
12732 * server.c (main): Relax numerical bases supported for the pid of
12733 the --attach command line argument.
12734
5ca906e6
PA
127352007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12736
12737 * win32-low.c (win32_attach): Call OpenProcess before
12738 DebugActiveProcess, not after. Add last error output to error
12739 call.
12740
9c6c8194
PA
127412007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12742
12743 * win32-low.c (win32_get_thread_context)
12744 (win32_set_thread_context): New functions.
12745 (thread_rec): Use win32_get_thread_context.
12746 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12747 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12748 field.
12749
4d5d1aaa
PA
127502007-12-03 Leo Zayas
12751 Pedro Alves <pedro_alves@portugalmail.pt>
12752
12753 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12754 global variables.
12755 (child_add_thread): Minor cleanup.
12756 (child_continue): Resume artificially suspended threads before
12757 calling ContinueDebugEvent.
12758 (suspend_one_thread): New.
12759 (fake_breakpoint_event): New.
12760 (get_child_debug_event): Change return type to int. Check here if
12761 gdb sent an interrupt request. If a soft interrupt was requested,
12762 fake a breakpoint event. Return 0 if there is no event to handle,
12763 and 1 otherwise.
12764 (win32_wait): Don't check here if gdb sent an interrupt request.
12765 Ensure there is a valid event to handle.
12766 (win32_request_interrupt): Add soft interruption method as last
12767 resort.
12768
c436e841
PA
127692007-12-03 Leo Zayas
12770 Pedro Alves <pedro_alves@portugalmail.pt>
12771
12772 * win32-low.h (win32_thread_info): Add descriptions to the
12773 structure members. Replace `suspend_count' counter by a
12774 `suspended' flag.
12775 * win32-low.c (thread_rec): Update condition of when to get the
12776 context from the inferior. Rely on ContextFlags being set if it
12777 has already been retrieved. Only suspend the inferior thread if
12778 we haven't already. Warn if that fails.
12779 (continue_one_thread): s/suspend_count/suspended/. Only call
12780 ResumeThread once. Warn if that fails.
12781
e7b5fa67
PA
127822007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12783
12784 * win32-low.c (win32_wait): Don't read from the inferior when it
12785 has already exited.
12786
a385171d
PA
127872007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12788
12789 * Makefile.in (win32_low_h): New variable.
12790 (win32-low.o): Add dependency on $(win32_low_h).
12791 (win32-arm-low.o, win32-i386-low.o): New rules.
12792
f80c84b3
DJ
127932007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12794
12795 * hostio.c: Correct copyright year.
12796
a6b151f1
DJ
127972007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12798
12799 * Makefile.in (OBS): Add hostio.o.
12800 (hostio.o): New rule.
12801 * server.h (handle_vFile): Declare.
12802 * hostio.c: New file.
12803 * server.c (handle_v_requests): Take packet_len and new_packet_len
12804 for binary packets. Call handle_vFile.
12805 (main): Update call to handle_v_requests.
12806
f9387fc3
DJ
128072007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12808
12809 * linux-low.c: Include <sched.h>.
12810
51c2684e
DJ
128112007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12812
12813 * linux-low.c (linux_tracefork_grandchild): New.
12814 (linux_tracefork_child): Use clone.
12815 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12816
75f83163
JB
128172007-10-31 Joel Brobecker <brobecker@adacore.com>
12818
12819 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12820
da5898ce
DJ
128212007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12822
12823 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12824
24a09b5f
DJ
128252007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12826
12827 * inferiors.c (change_inferior_id): Delete.
12828 (add_pid_to_list, pull_pid_from_list): New.
12829 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12830 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12831 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12832 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12833 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12834 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12835 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12836 (using_threads): Always set to 1.
12837 (handle_extended_wait): New.
12838 (add_process): Do not set TID.
12839 (linux_create_inferior): Set must_set_ptrace_flags.
12840 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12841 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12842 (linux_thread_alive): Rename TID argument to LWPID.
12843 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12844 (linux_wait_for_event): Do not use TID or check using_threads. Update
12845 call to dead_thread_notify. Call handle_extended_wait.
12846 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12847 (send_sigstop): Delete sigstop_sent.
12848 (wait_for_sigstop): Avoid TID.
12849 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12850 (linux_test_for_tracefork): New.
12851 (linux_lookup_signals): Use thread_db_active and
12852 linux_supports_tracefork_flag.
12853 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12854 * linux-low.h (get_process_thread): Avoid TID.
12855 (struct process_ifo): Move thread_known and tid to the end. Remove
12856 sigstop_sent.
12857 (linux_attach_lwp, thread_db_init): Update prototypes.
12858 * server.h (change_inferior_id): Delete prototype.
12859 (add_pid_to_list, pull_pid_from_list): New prototypes.
12860 * thread-db.c (thread_db_use_events): New.
12861 (find_first_thread): Rename to...
12862 (find_one_thread): ...this. Update callers and messages. Do not
12863 call fatal. Check thread_db_use_events. Do not call
12864 change_inferior_id or new_thread_notify.
12865 (maybe_attach_thread): Update. Do not call new_thread_notify.
12866 (thread_db_init): Set thread_db_use_events. Check use_events.
12867 * utils.c (fatal, warning): Correct message prefix.
12868
30ed0a8f
DJ
128692007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12870
12871 * Makefile.in (clean): Remove new files.
12872 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12873 (powerpc-64.o, powerpc-64.c): New rules.
12874 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12875 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12876 with SPE.
12877 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12878 SPE targets.
12879 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12880 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12881 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12882 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12883 (target_regsets): Add AltiVec and SPE register sets.
12884 * configure.ac: Check for AltiVec and SPE.
12885 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12886 (ppc_fill_vrregset, ppc_store_vrregset): New.
12887 (target_regsets): Add AltiVec register set.
12888 * configure: Regenerated.
12889
fd462a61
DJ
128902007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12891
12892 * linux-low.c (O_LARGEFILE): Define.
12893 (linux_read_memory): Use /proc/PID/mem.
12894 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12895 * configure, config.in: Regenerated.
12896
69f223ed
DJ
128972007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12898
12899 * linux-low.c (linux_wait_for_event): Do not pass signals while
12900 single-stepping.
12901
aec18585
PA
129022007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12903
12904 * win32-low.c (create_process): New.
12905 (win32_create_inferior): Use create_process instead of
12906 CreateProcess. If create_process failed retry appending an ".exe"
12907 suffix. Store the GetLastError result immediatelly after
12908 create_process calls and use it on the call to error.
12909
34d86ddd
PA
129102007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12911
12912 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12913
5a0e3bd0
JB
129142007-08-23 Joel Brobecker <brobecker@adacore.com>
12915
12916 * configure.ac: Switch license to GPLv3.
12917
f88c79e6
MS
129182007-08-01 Michael Snyder <msnyder@access-company.com>
12919
12920 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12921
6b3d9b83
PA
129222007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12923
12924 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12925 typedef.
12926 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12927 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12928 CloseToolhelp32Snapshot.
12929 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12930 CloseToolhelp32Snapshot.
12931
c588c53c
MS
129322007-07-27 Michael Snyder <michael.snyder@access-company.com>
12933
12934 * server.c (main): Check for inferior exit before main loop.
12935
aa0403d9
PA
129362007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12937
12938 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12939 instead of on tmp_desc.
12940
255e7678
DJ
129412007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12942 Daniel Jacobowitz <dan@codesourcery.com>
12943
12944 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12945 (add_thread): Minor cleanups.
12946 (clear_inferiors): Move lower in the file. Clear the DLL
12947 list.
12948 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12949 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12950 (xml_escape_text): New.
12951 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12952 for qSupported.
12953 (handle_v_cont): Report errors.
12954 (gdbserver_version): Update.
12955 (main): Correct size of own_buf. Do not report initial DLL events.
12956 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12957 (unloaded_dll, xml_escape_text): New.
12958 * win32-low.c (enum target_waitkind): Update comments.
12959 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12960 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12961 (win32_EnumProcessModules, win32_GetModuleInformation)
12962 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12963 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12964 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12965 (win32_Module32First, win32_Module32Next, load_toolhelp)
12966 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12967 (get_child_debug_event): Handle DLL events.
12968 (win32_wait): Likewise.
12969
0d37add9
DJ
129702007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12971
12972 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12973 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12974
45e2715e
PA
129752007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12976
12977 * win32-low.c (handle_output_debug_string): Ignore event if not
12978 waiting.
12979
c5674cf1
PA
129802007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12981
12982 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12983
2bbe3cc1
DJ
129842007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12985
12986 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12987
ae13219e
DJ
129882007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12989
12990 * inferiors.c (change_inferior_id): Add comment.
12991 * linux-low.c (check_removed_breakpoint): Add an early
12992 prototype. Improve debug output.
12993 (linux_attach): Doc update.
12994 (linux_detach_one_process, linux_detach): Clean up before releasing
12995 each process.
12996 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12997 * linux-low.h (struct process_info): Doc improvement.
12998 * mem-break.c (delete_all_breakpoints): New.
12999 * mem-break.h (delete_all_breakpoints): New prototype.
13000 * thread-db.c (find_first_thread): New.
13001 (thread_db_create_event): Call it instead of
13002 thread_db_find_new_threads. Clean up unused variables.
13003 (maybe_attach_thread): Remove first thread handling.
13004 (thread_db_find_new_threads): Use find_first_thread.
13005 (thread_db_get_tls_address): Likewise.
13006
4105de34
DJ
130072007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13008
13009 * thread-db.c (thread_db_find_new_threads): Add prototype.
13010 (thread_db_create_event): Check for the main thread before adding
13011 a new thread.
13012 (maybe_attach_thread): Only enable event reporting if TID == 0.
13013 (thread_db_get_tls_address): Check for new threads.
13014
2b876972
DJ
130152007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13016
13017 * linux-low.c (linux_create_inferior): Try execv before execvp.
13018 * spu-low.c (spu_create_inferior): Likewise.
13019
7a245884
DJ
130202007-06-13 Mike Frysinger <vapier@gentoo.org>
13021
13022 * linux-low.c (linux_create_inferior): Change execv to execvp.
13023 * spu-low.c (spu_create_inferior): Likewies.
13024
117ce543
DJ
130252007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13026
13027 * Makefile.in (clean): Clean new files instead of deleted ones.
13028 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13029 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13030 rules.
13031 * configure.srv: Specify XML files and new regformats for MIPS and
13032 MIPS64 GNU/Linux.
13033 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13034 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13035 an entry for the restart register.
13036 (mips_cannot_fetch_register, mips_cannot_store_register)
13037 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13038 register names to match the XML descriptions.
13039 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13040 restart register instead of $0.
13041
0e7f50da
UW
130422007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13043 Markus Deuling <deuling@de.ibm.com>
13044
13045 * remote-utils.c (decode_xfer_write): New function.
13046 * server.h (decode_xfer_write): Add prototype.
13047 * server.c (handle_query): Add PACKET_LEN argument. Support
13048 qXfer:spu:read and qXfer:spu:write packets.
13049 (main): Pass packet_len to handle_query.
13050 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13051 * target.h (target_ops): Add qxfer_spu.
13052
374c1d38
UW
130532007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13054
13055 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13056 accessing non-seekable spufs files.
13057
bb63802a
UW
130582007-05-16 Markus Deuling <deuling@de.ibm.com>
13059
889bf7c5 13060 * server.c (handle_query): Add reply for qC packet.
bb63802a 13061
7390519e
PA
130622007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13063 Leo Zayas <lerele@champenstudios@com>
13064
13065 * server.h (check_remote_input_interrupt_request): New function.
13066 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13067 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13068 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13069 (check_remote_input_interrupt_request): New function.
13070 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13071 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13072 winapi_GenerateConsoleCtrlEvent): New typedefs.
13073 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13074 to 250 ms.
13075 (win32_wait): Check for remote interrupt request
13076 with check_remote_input_interrupt_request.
13077 (win32_request_interrupt): New function.
13078 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13079
34b34921
PA
130802007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13081
13082 * win32-low.c (debug_registers_changed,
13083 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13084 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13085 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13086 (thread_rec): Get context using the low target.
13087 (child_add_thread): Call thread_added on the low target,
13088 which does the same thing.
13089 (regptr): Delete.
13090 (do_initial_child_stuff): Remove debug registers references.
13091 Set context using the low target. Resume threads after
13092 setting the contexts.
13093 (child_continue): Remove dead variable. Remove debug
13094 registers references.
13095 (child_fetch_inferior_registers): Go through the low target.
13096 (do_child_store_inferior_registers): Remove.
13097 (child_store_inferior_registers): Go through the low target.
13098 (win32_resume): Remove debug registers references.
13099 Set context using the low target.
13100 (handle_exception): Change return type to void. Don't record
13101 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13102 first chance exception.
889bf7c5 13103 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13104 goto loop. Always return after waiting for debug event.
13105 (win32_wait): Convert to switch statement. Handle spurious
13106 events.
13107
13108 * win32-i386-low.c (debug_registers_changed,
13109 debug_registers_used): New.
13110 (initial_stuff): Rename to ...
13111 (i386_initial_stuff): ... this. Clear debug registers
13112 state variables.
13113 (store_debug_registers): Delete.
13114 (i386_get_thread_context): New.
13115 (load_debug_registers): Delete.
13116 (i386_set_thread_context): New.
13117 (i386_thread_added): New.
13118 (single_step): Rename to ...
13119 (i386_single_step): ... this.
13120 (do_fetch_inferior_registers): Rename to ...
13121 (i386_fetch_inferior_register): ... this.
13122 (i386_store_inferior_register): New.
13123 (the_low_target): Adapt to new interface.
13124
13125 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13126 (arm_get_thread_context): New.
13127 (arm_set_thread_context): New.
13128 (regptr): New.
13129 (do_fetch_inferior_registers): Rename to ...
13130 (arm_fetch_inferior_register): ... this.
13131 (arm_store_inferior_register): New.
13132 (arm_wince_breakpoint): Reimplement as unsigned long.
13133 (arm_wince_breakpoint_len): Define.
13134 (the_low_target): Adapt to new interface.
13135
13136 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13137 load_debug_registers. Add get_thread_context, set_thread_context,
13138 thread_added and store_inferior_register. Rename
13139 fetch_inferior_registers to fetch_inferior_register.
13140 (regptr): Remove declaration.
13141
dd6953e1
PA
131422007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13143
13144 * linux-low.c (linux_detach): Change return type to int. Return 0.
13145 * spu-low.c (spu_detach): Likewise.
13146
444d6139
PA
131472007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13148
13149 * target.h (target_ops): Change return type of detach to int.
13150 Add join.
13151 (join_inferior): New.
13152 * server.c (main): Don't skip detach support on mingw32.
13153 If the inferior doesn't support detaching return error.
13154 Call join_inferior instead of using waitpid.
13155 * linux-low.c (linux_join): New.
13156 (linux_target_op): Add linux_join.
13157 * spu-low.c (spu_join): New.
13158 (spu_target_ops): Add spu_join.
13159 * win32-low.c (win32_detach): Adapt to new interface.
13160 Reopen current_process_handle before detaching. Issue a child
13161 resume before detaching.
13162 (win32_join): New.
13163 (win32_target_op): Add win32_join.
13164
1d5315fe
PA
131652007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13166
13167 * win32-low.c (win32-attach): Fix return value.
13168 * target.h (target_ops): Describe ATTACH return values.
13169
bf914831
PA
131702007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13171
13172 * win32-low.c (GETPROCADDRESS): Define.
13173 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13174 (winapi_DebugSetProcessKillOnExit): Likewise.
13175 (win32_create_inferior): Force usage of ansi CreateProcessA.
13176 (win32_attach): Use GETPROCADDRESS.
13177 (win32_detach): Likewise.
13178
f72f3e60
PA
131792007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13180
13181 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13182
ed50f18f
PA
131832007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13184
13185 * win32-low.c: Commit leftover changes from 2007-03-29.
13186
0c2ead7e
DJ
131872007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13188
13189 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13190 fields short instead of int. Add explicit padding.
13191 (i387_cache_to_fsave): Remove unnecessary casts.
13192 (i387_fsave_to_cache): Doc fix.
13193 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13194
73725ff3
DJ
131952007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13196
13197 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13198 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13199
d99f33d8
PA
132002007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13201
13202 * configure.srv (arm*-*-mingw32ce*): Move near the other
13203 arm targets.
13204
68070c10
PA
132052007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13206
2482afc6 13207 * configure.ac: Add errno checking.
68070c10
PA
13208 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13209 sys/file.h and malloc.h.
13210 (AC_CHECK_DECLS): Add perror.
13211 (srv_mingwce): Handle.
2482afc6 13212 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
13213 win32-i386-low.o to srv_tgtobj.
13214 (i[34567]86-*-mingw*): Likewise.
13215 (arm*-*-mingw32ce*): Add case.
13216 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13217 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13218 [__MINGW32CE__] (strerror): New function.
13219 [__MINGW32CE__] (errno): Define to GetLastError.
13220 [__MINGW32CE__] (COUNTOF): New macro.
13221 (remote_open): Remove extra close call.
13222 * mem-break.c (delete_breakpoint_at): New function.
13223 * mem-break.h (delete_breakpoint_at): Declare.
13224 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13225 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13226 [USE_WIN32API] (read, write): Add char* casts.
13227 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13228 * server.h: Include wincecompat.h on Windows CE.
13229 [HAVE_ERRNO_H]: Check.
13230 (perror): Declare if not declared.
13231 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13232 (perror_with_name): Remove errno declaration.
13233 * wincecompat.h: New.
13234 * wincecompat.c: New.
13235 * win32-low.h: New.
13236 * win32-arm-low.c: New.
13237 * win32-i386-low.c: New.
13238 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13239 (OUTMSG2): Make it safe.
13240 (_T): New macro.
13241 (COUNTOF): New macro.
13242 (NUM_REGS): Get it from the low target.
13243 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13244 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13245 (thread_rec): Let low target handle debug registers.
13246 (child_add_thread): Likewise.
13247 (child_init_thread_list): Likewise.
13248 (continue_one_thread): Likewise.
13249 (regptr): New.
13250 (do_child_fetch_inferior_registers): Move to ...
13251 * win32-i386-low.c: ... here, and rename to ...
13252 (do_fetch_inferior_registers): ... this.
889bf7c5 13253 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
13254 Go through the low target.
13255 (do_child_store_inferior_registers): Use regptr.
13256 (strwinerror): New function.
13257 (win32_create_inferior): Handle Windows CE.
13258 Use strwinerror instead of strerror on Windows error
13259 codes. Add program to the error output.
13260 Don't close the main thread handle on Windows CE.
13261 (win32_attach): Use coredll.dll on Windows CE.
13262 (win32_kill): Close current process and current
13263 thread handles.
13264 (win32_detach): Use coredll.dll on Windows CE.
13265 (win32_resume): Let low target handle debug registers, and
13266 step request.
13267 (handle_exception): Add/Remove initial breakpoint. Avoid
13268 non-existant WSTOPSIG on Windows CE.
13269 (win32_read_inferior_memory): Cast to remove warning.
13270 (win32_arch_string): Go through the low target.
13271 (initialize_low): Call set_breakpoint_data with the low
13272 target's breakpoint.
13273 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13274 FOP_REGNUM, mappings): Move to ...
13275 * win32-i386-low.c: ... here.
13276 * win32-low.c (win32_thread_info): Move to ...
13277 * win32-low.h: ... here.
13278 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13279 win32-arm-low.c and wincecompat.c.
13280 (all:): Add $EXEEXT.
13281 (install-only:): Likewise.
13282 (gdbserver:): Likewise.
13283 (gdbreplay:): Likewise.
13284 * config.in: Regenerate.
13285 * configure: Regenerate.
13286
41093d81
PA
132872007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13288
13289 * win32-low.c: Rename typedef thread_info to
13290 win32_thread_info throughout.
13291
544afa54
PA
132922007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13293
13294 * win32-i386-low.c: Rename to ...
13295 * win32-low.c: ... this.
13296 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13297 * Makefile.in: Likewise.
13298
bce7165d
PA
132992007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13300
13301 * remote-utils.c (monitor_output): Constify msg parameter.
13302 * server.h (monitor_output): Likewise.
13303 * win32-i386-low.c (handle_output_debug_string): New.
13304 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13305 handle_output_debug_string.
13306 (get_child_debug_event): Likewise.
13307
506c7aa0
DJ
133082007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13309
13310 * server.c (main): Correct strtoul check.
13311
42c81e2a
DJ
133122007-03-27 Jon Ringle <jon@ringle.org>
13313
13314 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13315
9453113a
DJ
133162007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13317
13318 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13319
64a69107
DJ
133202007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13321
13322 * terminal.h: Check HAVE_SGTTY_H.
13323
133242007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
13325
13326 * remote-utils.c (remote_open): Print out the assigned port number.
13327
c74d0ad8
DJ
133282007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13329
13330 * remote-utils.c (monitor_output): New function.
13331 * server.c (debug_threads): Define here.
13332 (monitor_show_help): New function.
13333 (handle_query): Handle qRcmd.
13334 (main): Do not handle 'd' packet.
13335 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13336 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13337 of debug_threads.
13338
de7c3b4a
PA
133392007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13340
13341 * Makefile.in (EXEEXT): New.
13342 (clean): Use $(EXEEXT).
13343
ef57601b
PA
133442007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13345
13346 * target.h (target_ops): Rename send_signal to request_interrupt,
13347 and remove enum target_signal parameter.
13348 * linux-low.c (linux_request_interrupt): Rename from
13349 linux_send_signal, and always send SIGINT.
13350 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13351 and always send SIGINT.
13352 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13353 of send_signal.
13354 (input_interrupt): Likewise.
13355
820f2bda
PA
133562007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13357
13358 * server.c (get_features_xml): Check if target implemented
13359 arch_string.
13360 * win32-i386-low.c (win32_arch_string): New.
13361 (win32_target_ops): Add win32_arch_string as arch_string member.
13362
ab39bf24
UW
133632007-02-22 Markus Deuling <deuling@de.ibm.com>
13364
13365 * spu-low.c (spu_arch_string): New.
13366 (spu_target_ops): Add spu_arch_string.
13367
61ff6e04
DJ
133682007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13369
13370 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13371 * configure.ac: Do not check for terminal.h.
13372 * configure, config.in: Regenerated.
13373
fb1e4ffc
DJ
133742007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13375
13376 * Makefile.in (OBS): Add $(XML_BUILTIN).
13377 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13378 (clean): Update.
13379 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13380 (arm-with-iwmmxt.c): New.
13381 * config.in, configure: Regenerate.
13382 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13383 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13384 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13385 (arm*-*-linux*): Add iWMMXt and regset support.
13386 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13387 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13388 (arm_store_wmmxregset, target_regsets): New.
13389 * server.c (get_features_xml): Take annex argument. Check builtin
13390 XML documents.
13391 (handle_query): Handle multiple annexes.
13392
0f48aa01
DJ
133932007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13394
13395 * remote-utils.c [USE_WIN32API] (read, write): Define.
13396 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13397 write.
13398
23181151
DJ
133992007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13400
13401 * linux-i386-low.c (the_low_target): Set arch_string.
13402 * linux-x86-64-low.c (the_low_target): Likewise.
13403 * linux-low.c (linux_arch_string): New.
13404 (linux_target_ops): Add it.
13405 * linux-low.h (struct linux_target_ops): Add arch_string.
13406 * server.c (write_qxfer_response): Use const void * for DATA.
13407 (get_features_xml): New.
13408 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13409 * target.h (struct target_ops): Add arch_string method.
13410
9d606399
DJ
134112007-01-03 Denis Pilat <denis.pilat@st.com>
13412 Daniel Jacobowitz <dan@codesourcery.com>
13413
13414 * linux-low.c (linux_kill): Handle being called with no threads.
13415 * win32-i386-low.c (win32_kill): Likewise.
13416 (get_child_debug_event): Clear current_process_handle.
13417
134182006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
13419 Daniel Jacobowitz <dan@codesourcery.com>
13420
13421 * remote-utils.c (remote_open): Check the type of specified
13422 serial port devices before opening them.
13423 * server.c (main): Kill the inferior if an error occurs during
13424 the first remote_open.
13425
a5e13d24
DJ
134262006-12-05 Markus Deuling <deuling@de.ibm.com>
13427
13428 * README: Update supported targets.
13429
186947f7
DJ
134302006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13431
13432 * Makefile.in (clean): Remove reg-mips64.c.
13433 (reg-mips64.c, reg-mips64.o): New rules.
13434 * configure.srv: Handle mips64. Include regset support for mips.
13435 * linux-mips-low.c (union mips_register): New.
13436 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13437 (mips_breakpoint, mips_breakpoint_at): Use int.
13438 (mips_collect_register, mips_supply_register)
13439 (mips_collect_register_32bit, mips_supply_register_32bit)
13440 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13441 (mips_store_fpregset, target_regsets): New.
13442 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13443
a13e2c95
UW
134442006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13445
13446 * configure.srv: Add target "spu*-*-*".
13447 * Makefile.in (clean): Remove reg-spu.c.
13448 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13449 * spu-low.c: New file.
13450
cb7283db
DJ
134512006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13452
13453 * configure.ac: Correct td_thr_tls_get_addr test.
13454 * configure: Regenerated.
13455
89be2091
DJ
134562006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13457
13458 * linux-low.c (linux_wait_for_event): Reformat. Use the
13459 pass_signals array.
13460 * remote-utils.c (decode_address_to_semicolon): New.
13461 * server.c (pass_signals, handle_general_set): New.
13462 (handle_query): Mention QPassSignals for qSupported.
13463 (main): Call handle_general_set.
13464 * server.h (pass_signals, decode_address_to_semicolon): New.
13465
000ef4f0
DJ
134662006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13467
13468 * server.c (handle_query): Correct error handling for read_auxv.
13469
b7149293
UW
134702005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13471
13472 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13473 and srv_linux_thread_db to yes.
13474 * linux-s390-low.c (s390_fill_gregset): New function.
13475 (target_regsets): Define data structure.
13476
dae5f5cf
DJ
134772006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13478
13479 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13480 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13481 * config.in, configure: Regenerated.
13482 * inferiors.c (gdb_id_to_thread): New function.
13483 (gdb_id_to_thread_id): Use it.
13484 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13485 * linux-low.h (struct process_info): Add th member.
13486 (thread_db_get_tls_address): New prototype.
13487 * remote-utils.c (decode_address): Make non-static.
13488 * server.c (handle_query): Handle qGetTLSAddr.
13489 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13490 * target.h (struct target_ops): Add get_tls_address.
13491 * thread-db.c (maybe_attach_thread): Save the thread handle.
13492 (thread_db_get_tls_address): New.
13493
32ca6d61
DJ
134942006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13495
13496 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13497 (linux_resume_one_process): Take a siginfo_t *. Update all
13498 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13499 (struct pending_signals): Add a siginfo_t.
13500 (linux_wait_for_process): Always set last_status.
13501 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13502 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13503 * linux-low.h (struct process_info): Add last_status.
13504
5ffff7c1
DJ
135052006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13506
13507 * remote-utils.c (try_rle): New function.
13508 (putpkt_binary): Use it.
13509
8695c747
DJ
135102006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13511
13512 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13513 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13514 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13515 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13516 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13517 point registers.
13518
290fadea
RS
135192006-08-08 Richard Sandiford <richard@codesourcery.com>
13520
13521 * server.c (terminal_fd): New variable.
13522 (old_foreground_pgrp): Likewise.
13523 (restore_old_foreground_pgrp): New function.
13524 (start_inferior): Record the terminal file descriptor in terminal_fd
13525 and its original foreground group in old_foreground_pgrp. Register
13526 restore_old_foreground_pgrp with atexit().
13527
9f2e1e63
DJ
135282006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13529
13530 * server.c (handle_query): Correct qPart to qXfer.
13531
b80864fb
DJ
135322006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13533
13534 * configure.ac: Check for more headers which are missing on
13535 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13536 * configure.srv: Add Cygwin and mingw32.
13537 * remote-utils.c: Don't include headers unconditionally which
13538 are missing on mingw32. Include <winsock.h> for mingw32.
13539 (remote_open): Adjust for mingw32 support. Flush
13540 standard error after writing to it.
13541 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13542 (unblock_async_io, enable_async_io, disable_async_io)
13543 (readchar, getpkt): Update for Winsock support.
13544 (prepare_resume_reply): Expect a protocol signal number.
13545 * server.c: Disable <sys/wait.h> on mingw32.
13546 (start_inferior): Adjust for mingw32 support. Flush
13547 standard error after writing to it.
13548 (attach_inferior): Likewise. Use protocol signal
13549 numbers.
13550 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13551 and names.
13552 * win32-i386-low.c: New file.
13553 * Makefile.in (XM_CLIBS): Set.
13554 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13555 (win32-i386-low.o): New dependency rule.
13556 * linux-low.c (linux_wait): Use target signal numbers.
13557 * target.h (struct target_ops): Doc fix.
13558 * server.h (target_signal_to_name): New prototype.
13559 * gdbreplay.c: Don't include headers unconditionally which
13560 are missing on mingw32. Include <winsock.h> for mingw32.
13561 (remote_close, remote_open): Adjust for Winsock support.
13562 * configure, config.in: Regenerated.
13563
0876f84a
DJ
135642006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13565
13566 * server.c (decode_xfer_read, write_qxfer_response): New.
13567 (handle_query): Take a packet length argument. Handle
13568 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13569 the qSupported response.
13570 (main): Update call to handle_query.
13571
01f9e8fa
DJ
135722006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13573
13574 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13575 (putpkt_binary): Renamed from putpkt and adjusted for binary
13576 data.
13577 (putpkt): New wrapper for putpkt_binary.
13578 (readchar): Don't mask off the high bit.
13579 (decode_X_packet): New function.
13580 * server.c (main): Call putpkt_binary if a handler sets the packet
13581 length. Save the length of the incoming packet. Handle 'X'.
13582 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13583
be2a5f71
DJ
135842006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13585
13586 * server.c (handle_query): Handle qSupported.
13587
ea025f5f
DJ
135882006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13589
13590 * remote-utils.c (all_symbols_looked_up): New variable.
13591 (look_up_one_symbol): Check it.
13592 * server.h (look_up_one_symbol): New declaration.
13593 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13594
9308fc88
DJ
135952006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13596
13597 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 13598 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
13599 (PTRACE_GET_THREAD_AREA): Define.
13600 (ps_get_thread_area): New function.
13601
52fb6437
NS
136022006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13603
13604 * configure.srv (m68k*-*-uclinux*): New target.
13605 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13606 (linux_resume_one_process): Remove extraneous cast.
13607 (linux_read_offsets): New.
13608 (linux_target_op): Add linux_read_offsets on mmuless systems.
13609 * server.c (handle_query): Add qOffsets logic.
13610 * target.h (struct target_ops): Add read_offsets.
13611
21b0f40c
DJ
136122006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13613
13614 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13615 (PTRACE_GET_THREAD_AREA): Define.
13616 (ps_get_thread_area): New function.
13617 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13618 (linux-x86-64-low.o): Update.
13619
0050a760
DJ
136202006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13621
13622 * configure.ac: Remove checks for prfpregset_t.
13623 * gdb_proc_service.h: New file.
13624 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13625 new "gdb_proc_service.h".
13626 * proc-service.c: Likewise.
13627 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13628 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13629 * Makefile.in (gdb_proc_service_h): Updated.
13630 * configure, config.in: Regenerated.
13631
b92a518e
DJ
136322006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13633
13634 * remote-utils.c (prepare_resume_reply): Move declaration
13635 of gdb_id_from_wait to the top of the block.
13636
545587ee
DJ
136372006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13638
13639 * linux-low.c (regsets_store_inferior_registers): Read the regset
13640 from the target before filling it.
13641
9db87ebd
DJ
136422006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13643
13644 * server.c (attach_inferior): Return SIGTRAP for a successful
13645 attach.
13646
dd24457d
DJ
136472006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13648
13649 * Makefile.in (OBS): Add version.o.
13650 (STAGESTUFF): Delete.
13651 (version.o): Add dependencies.
13652 (version.c): Replace rule.
13653 (clean): Remove version.c.
13654 * server.c (gdbserver_version): New.
13655 (gdbserver_usage): Use printf.
13656 (main): Handle --version and --help.
13657 * server.h (version, host_name): Add declarations.
13658
6f0f660e
EZ
136592005-12-23 Eli Zaretskii <eliz@gnu.org>
13660
889bf7c5
PA
13661 * linux-arm-low.c:
13662 * linux-arm-low.c:
13663 * inferiors.c:
13664 * i387-fp.h:
13665 * i387-fp.c:
13666 * gdbreplay.c:
13667 * regcache.c:
13668 * proc-service.c:
13669 * mem-break.h:
13670 * mem-break.c:
13671 * linux-x86-64-low.c:
13672 * linux-sh-low.c:
13673 * linux-s390-low.c:
13674 * linux-ppc64-low.c:
13675 * linux-ppc-low.c:
13676 * linux-mips-low.c:
13677 * linux-m68k-low.c:
13678 * linux-m32r-low.c:
13679 * linux-low.h:
13680 * linux-low.c:
13681 * linux-ia64-low.c:
13682 * linux-i386-low.c:
13683 * linux-crisv32-low.c:
13684 * thread-db.c:
13685 * terminal.h:
13686 * target.h:
13687 * target.c:
13688 * server.h:
13689 * server.c:
13690 * remote-utils.c:
13691 * regcache.h:
13692 * utils.c:
13693 * Makefile.in:
13694 * configure.ac:
6f0f660e
EZ
13695 * gdbserver.1: Add (C) after Copyright. Update the FSF
13696 address.
13697
9d1fb177
DJ
136982005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13699
13700 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13701 (arm_breakpoint_at): Recognize both breakpoints.
13702 (the_low_target): Use the correct breakpoint instruction.
13703
011a70c2
DJ
137042005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13705
13706 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13707 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13708 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13709 (the_low_target): Update.
13710
7fb85e41
AS
137112005-10-25 Andreas Schwab <schwab@suse.de>
13712
13713 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13714
13715 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13716 (ia64_num_regs): Reduce to 462.
13717
3db0444b
DJ
137182005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13719
13720 * acinclude.m4: Correct quoting.
13721 * aclocal.m4: Regenerated.
13722
13723 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13724 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13725 (thread_db_init): Call thread_db_err_str.
13726 * configure.ac: Check for TD_VERSION.
13727 * config.in, configure: Regenerated.
13728
bee0189a
DJ
137292005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13730
13731 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13732
e9d25b98
DJ
137332005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13734
13735 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13736 is not available. Define HAVE_PTRACE_GETREGS if it is.
13737 * config.in, configure: Regenerated.
13738 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13739 * linux-i386-low.c, linux-m68k-low.c: Update to use
13740 HAVE_PTRACE_GETREGS.
13741 * linux-low.c (regsets_fetch_inferior_registers)
13742 (regsets_store_inferior_registers): Only return 0 if we processed
13743 GENERAL_REGS.
13744 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13745 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13746
a06660f7
DJ
137472005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13748
13749 * inferiors.c (struct thread_info): Add gdb_id.
13750 (add_thread): Add gdb_id argument.
13751 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13752 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13753 calls to add_thread.
13754 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13755 * server.c (handle_query): Use thread_to_gdb_id.
13756 (handle_v_cont, main): Use gdb_id_to_thread_id.
13757 * server.h (add_thread): Update prototype.
13758 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13759 prototypes.
13760
5a1f5858
DJ
137612005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13762
13763 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13764 left-padded registers.
13765 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13766 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13767
e122f1f5
SE
137682005-07-01 Steve Ellcey <sje@cup.hp.com>
13769
13770 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13771 * configure: Regenerate.
13772 * config.in: Regenerate.
13773 * server.h (NEED_DECLARATION_STRERROR):
13774 Replace with !HAVE_DECL_STRERROR.
13775
d592fa2f
DJ
137762005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13777
13778 * linux-low.c (linux_wait, linux_send_signal): Don't test
13779 an unsigned long variable for > 0 if it could be MAX_ULONG.
13780 * server.c (myresume): Likewise.
13781 * target.c (set_desired_inferior): Likewise.
13782
ccbd4912
MK
137832005-06-13 Mark Kettenis <kettenis@gnu.org>
13784
13785 * configure.ac: Simplify and improve check for socklen_t.
13786 * configure, config.in: Regenerate.
13787
f450004a
DJ
137882005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13789
13790 * acconfig.h: Remove.
13791 * configure.ac: Add a test for socklen_t. Use three-argument
13792 AC_DEFINE throughout.
13793 * config.in: Regenerated using autoheader 2.59.
13794 * configure: Regenerated.
13795
13796 * gdbreplay.c (socklen_t): Provide a default.
13797 (remote_open): Use socklen_t.
13798 * remote-utils.c (socklen_t): Provide a default.
13799 (remote_open): Use socklen_t.
13800 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13801 unsigned char.
13802
13803 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13804 char for buffers.
13805 * linux-low.c (linux_read_memory, linux_write_memory)
13806 (linux_read_auxv): Likewise.
13807 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13808 (check_mem_write): Likewise.
13809 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13810 Likewise.
13811 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13812 (registers_from_string, register_data): Likewise.
13813 * server.c (handle_query, main): Likewise.
13814 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13815 (decode_M_packet): Likewise.
13816 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13817 * target.h (struct target_ops): Update read_memory, write_memory,
13818 and read_auxv.
13819 (read_inferior_memory, write_inferior_memory): Update.
13820 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13821 to unsigned char *.
13822 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13823 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13824 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13825 linux-s390-low.c, linux-sh-low.c: Update for changes in
13826 read_inferior_memory and the_low_target->breakpoint.
13827
eee84df1
DJ
138282005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13829
13830 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13831 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13832 * configure.srv: Add powerpc64-*-linux*.
13833 * linux-ppc64-low.c: New file.
13834
45b134e5
OF
138352005-05-23 Orjan Friberg <orjanf@axis.com>
13836
13837 * linux-cris-low.c: New file with support for CRIS.
13838 * linux-crisv32-low.c: Ditto for CRISv32.
13839 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13840 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 13841 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
13842 reg-crisv32.o, and reg-crisv32.c to make rules.
13843 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13844 recognized targets.
13845
48d93c75
UW
138462005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13847
13848 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13849 of sizeof (PTRACE_XFER_TYPE).
13850 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13851
e013ee27
OF
138522005-05-12 Orjan Friberg <orjanf@axis.com>
13853
889bf7c5 13854 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
13855 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13856 pointers for hardware watchpoint support.
13857 * linux-low.h (struct linux_target_ops): Ditto.
13858 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13859 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13860 to linux_target_ops.
13861 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13862 reply packet.
13863 * server.c (main): Recognize 'Z' and 'z' packets.
13864
b0ded00b
UW
138652005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13866
13867 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13868 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13869 (the_low_target): Add new members.
13870
8643e2ad
DJ
138712005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13872
13873 * proc-service.c (ps_lgetregs): Search all_processes instead of
13874 all_threads.
13875
fc620387
DJ
138762005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13877
13878 * server.c (start_inferior): Change return type to int.
13879 (attach_inferior): Change sigptr to int *.
13880 (handle_v_cont, handle_v_requests): Change signal to int *.
13881 (main): Change signal to int.
13882
138832005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
13884
13885 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13886 * configure.srv: Add m32r*-*-linux*.
13887 * linux-m32r-low.c: New file.
13888
e0e76420
DJ
138892005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13890
13891 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13892
a1928bad
DJ
138932005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13894
13895 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13896 Take unsigned long arguments for PIDs.
13897 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13898 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13899 (wait_for_sigstop, linux_resume_one_process)
13900 (regsets_fetch_inferior_registers, linux_send_signal)
13901 (linux_read_auxv): Likewise. Update the types of variables holding
13902 PIDs. Update format string specifiers.
13903 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13904 * remote-utils.c (prepare_resume_reply): Likewise.
13905 * server.c (cont_thread, general_thread, step_thread)
13906 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13907 unsigned long.
13908 (handle_query): Update format specifiers.
13909 (handle_v_cont, main): Use strtoul for thread IDs.
13910 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13911 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13912 (general_thread, step_thread, thread_from_wait)
13913 (old_thread_from_wait): Update.
13914 * target.h (struct thread_resume): Use unsigned long for THREAD.
13915 (struct target_ops): Use unsigned long for arguments to attach and
13916 thread_alive.
13917
dcdb98d2
DJ
139182005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13919
13920 * acinclude.m4: Include bfd/bfd.m4 directly.
13921 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13922 <agriffis@toolchain.org>.
13923 * aclocal.m4, configure: Regenerated.
13924
bec39cab
AC
139252005-01-07 Andrew Cagney <cagney@gnu.org>
13926
13927 * configure.ac: Rename configure.in, require autoconf 2.59.
13928 * configure: Re-generate.
13929
434c4c77
DJ
139302004-12-08 Daniel Jacobowitz <dan@debian.org>
13931
13932 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13933 LIBS when finished.
13934 * aclocal.m4: Regenerated.
13935 * configure: Regenerated.
13936
db1d3e1b
AS
139372004-11-21 Andreas Schwab <schwab@suse.de>
13938
13939 * linux-m68k-low.c (m68k_num_gregs): Define.
13940 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13941 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13942 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13943 (m68k_breakpoint_at): New. Add to the_low_target.
13944
13945 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13946 srv_linux_thread_db to yes.
13947
43360365
JB
139482004-10-20 Joel Brobecker <brobecker@gnat.com>
13949
13950 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13951 (ARCH_SET_FS): Likewise.
13952 (ARCH_GET_FS): Likewise.
13953 (ARCH_GET_GS): Likewise.
13954
fd500816
DJ
139552004-10-16 Daniel Jacobowitz <dan@debian.org>
13956
13957 * linux-i386-low.c (ps_get_thread_area): New.
13958 * linux-x86-64-low.c (ps_get_thread_area): New.
13959 * linux-low.c: Include <sys/syscall.h>.
13960 (linux_kill_one_process): Don't kill the first thread here.
13961 (linux_kill): Kill the first thread here.
13962 (kill_lwp): New function.
13963 (send_sigstop, linux_send_signal): Use it.
13964 * proc-service.c: Clean up #ifdefs.
13965 (fpregset_info): Delete.
13966 (ps_lgetregs): Update and enable implementation.
13967 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13968 implementations.
13969 * remote-utils.c (struct sym_cache, symbol_cache): New.
13970 (input_interrupt): Print a clearer message.
13971 (async_io_enabled): New variable.
13972 (enable_async_io, disable_async_io): Use it. Update comments.
13973 (look_up_one_symbol): Use the symbol cache.
13974 * thread-db.c (thread_db_look_up_symbols): New function.
13975 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13976
f6de3c42
DJ
139772004-10-16 Daniel Jacobowitz <dan@debian.org>
13978
13979 * configure.in: Test for -rdynamic.
13980 * configure: Regenerated.
13981 * Makefile (INTERNAL_LDFLAGS): New.
13982 (gdbserver, gdbreplay): Use it.
13983
2c0fc042
AC
139842004-09-02 Andrew Cagney <cagney@gnu.org>
13985
13986 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13987
075b3282
DJ
139882004-03-23 Daniel Jacobowitz <drow@mvista.com>
13989
13990 * linux-low.c (linux_wait): Clear all_processes list also.
13991
fa6a77dc
DJ
139922004-03-12 Daniel Jacobowitz <drow@mvista.com>
13993
13994 * linux-low.c: Include <errno.h>. Remove extern declaration of
13995 errno.
13996
6d782a97
DJ
139972004-03-12 Daniel Jacobowitz <drow@mvista.com>
13998
13999 * gdbreplay.c, server.h, utils.c: Update copyright years.
14000
3a7fb99b
DJ
140012004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14002
14003 * server.c (main): Print child status or termination signal from
14004 variable 'signal', not 'sig'.
14005
c3e735a6
DJ
140062004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14007
14008 * linux-low.c (linux_read_memory): Change return type to
14009 int. Check for and return error from ptrace().
14010 * target.c (read_inferior_memory): Change return type to int. Pass
14011 back return status from the_target->read_memory().
14012 * target.h (struct target_ops): Adapt *read_memory() prototype.
14013 Update comment.
14014 (read_inferior_memory): Adapt prototype.
14015 * server.c (main): Return an error packet if
14016 read_inferior_memory() returns an error.
14017
a59d1c82
DJ
140182004-03-04 Daniel Jacobowitz <drow@mvista.com>
14019
14020 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14021 Unify with other clean targets.
14022
dc3f8883
DJ
140232004-02-29 Daniel Jacobowitz <drow@mvista.com>
14024
14025 * server.c (handle_v_cont): Call set_desired_inferior.
14026
89a208da
DJ
140272004-02-29 Daniel Jacobowitz <drow@mvista.com>
14028
14029 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14030
62ea82f5
DJ
140312004-02-29 Daniel Jacobowitz <drow@mvista.com>
14032
14033 * linux-low.c (linux_wait): Unblock async I/O.
14034 (linux_resume): Block and enable async I/O.
14035 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14036 * server.h (block_async_io, unblock_async_io): Add prototypes.
14037
6910d122
DJ
140382004-02-29 Daniel Jacobowitz <drow@mvista.com>
14039
14040 * remote-utils.c (remote_open): Print a status notice after
14041 opening a TCP port.
14042 * server.c (attach_inferior): Print a status notice after
14043 attaching.
14044
140452004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14046
14047 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14048
c89dc5d4
DJ
140492004-02-26 Daniel Jacobowitz <drow@mvista.com>
14050
14051 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14052 error packet.
14053 * server.c, target.h: Update copyright years.
14054
4b8dad4a
RM
140552004-02-25 Roland McGrath <roland@redhat.com>
14056
14057 * target.h (struct target_ops): New member `read_auxv'.
14058 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14059 * linux-low.c (linux_read_auxv): New function.
14060 (linux_target_ops): Initialize `read_auxv' member to that.
14061
d7446758
JB
140622004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14063
14064 Committed by Jim Blandy <jimb@redhat.com>.
14065
14066 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14067 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14068 instead of GPR_SIZE to distiguish s390 and s390x targets.
14069
5544ad89
DJ
140702004-01-31 Daniel Jacobowitz <drow@mvista.com>
14071
14072 * linux-low.c: Update copyright year.
14073 (check_removed_breakpoint): Clear pending_is_breakpoint.
14074 (linux_set_resume_request, linux_queue_one_thread)
14075 (resume_status_pending_p): New functions.
14076 (linux_continue_one_thread): Use process->resume.
14077 (linux_resume): Only resume threads if there are no pending events.
14078 * linux-low.h (struct process_info): Add resume request
14079 pointer.
14080
2a68b70e
DJ
140812004-01-30 Daniel Jacobowitz <drow@mvista.com>
14082
14083 * regcache.c (new_register_cache): Clear the allocated register
14084 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14085
64386c31
DJ
140862003-10-13 Daniel Jacobowitz <drow@mvista.com>
14087
14088 * linux-low.c (linux_resume): Take a struct thread_resume *
14089 argument.
14090 (linux_wait): Update call.
14091 (resume_ptr): New static variable.
14092 (linux_continue_one_thread): Renamed from
14093 linux_continue_one_process. Use resume_ptr.
14094 (linux_resume): Use linux_continue_one_thread.
14095 * server.c (handle_v_cont, handle_v_requests): New functions.
14096 (myresume): New function.
14097 (main): Handle 'v' case.
14098 * target.h (struct thread_resume): New type.
14099 (struct target_ops): Change argument of "resume" to struct
14100 thread_resume *.
14101 (myresume): Delete macro.
14102
c938e9b0
L
141032003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14104
14105 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14106 (uninstall): Support DESTDIR.
14107
7f313d07
BC
14108Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14109
14110 * configure.srv: Add xscale*linux copy of arm*linux entry.
14111
3b2fc2ea
DJ
141122003-07-24 Daniel Jacobowitz <drow@mvista.com>
14113
14114 * linux-arm-low.c (arm_reinsert_addr): New function.
14115 (the_low_target): Add arm_reinsert_addr.
14116
1c0a559e
MK
141172003-07-08 Mark Kettenis <kettenis@gnu.org>
14118
14119 * mem-break.c: Remove whitespace at end of file.
14120
43d5792c
DJ
141212003-06-28 Daniel Jacobowitz <drow@mvista.com>
14122
14123 * configure.in: Check whether we need to prototype strerror.
14124 * server.h: Optionally prototype strerror.
14125 * gdbreplay.c (perror_with_name): Use strerror.
14126 * linux-low.c (linux_attach_lwp): Use strerror.
14127 * utils.c (perror_with_name): Use strerror.
14128 * config.in, configure: Regenerated.
14129
c8a86edf
DJ
141302003-06-28 Daniel Jacobowitz <drow@mvista.com>
14131
14132 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14133 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14134
73d37363
DJ
141352003-06-20 Daniel Jacobowitz <drow@mvista.com>
14136
14137 * Makefile.in (SFILES): Update.
14138 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14139 low-sun3.c: Remove files.
14140
6ad8ae5c
DJ
141412003-06-17 Daniel Jacobowitz <drow@mvista.com>
14142
14143 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14144 (linux_detach_one_process, linux_detach): New functions.
14145 (linux_target_ops): Add linux_detach.
14146 * server.c (main): Handle 'D' packet.
14147 * target.h (struct target_ops): Add "detach" member.
14148 (detach_inferior): Define.
14149
1581182a
MK
141502003-06-13 Mark Kettenis <kettenis@gnu.org>
14151
14152 From Kelley Cook <kelleycook@wideopenwest.com>:
14153 * configure.srv: Accept i[34567]86 variants.
14154
e5379b03
DJ
141552003-06-05 Daniel Jacobowitz <drow@mvista.com>
14156
14157 * linux-low.c (linux_wait_for_event): Correct comment typos.
14158 (linux_resume_one_process): Call check_removed_breakpoint.
14159 (linux_send_signal): New function.
14160 (linux_target_ops): Add linux_send_signal.
14161 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14162 of kill.
14163 * target.h (struct target_ops): Add send_signal.
14164
2ff29de4
JB
141652003-05-29 Jim Blandy <jimb@redhat.com>
14166
14167 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14168 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14169 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14170 away part of the register's value.
14171
254787d4
DJ
141722003-03-26 Daniel Jacobowitz <drow@mvista.com>
14173
14174 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14175 (linux_wait_for_event, linux_init_signals): Likewise.
14176
94e10508
DJ
141772003-03-17 Daniel Jacobowitz <drow@mvista.com>
14178
14179 * configure.in: Check for stdlib.h.
14180 * configure: Regenerated.
14181 * config.in: Regenerated.
14182
4c0711e0
DJ
141832003-01-04 Andreas Schwab <schwab@suse.de>
14184
14185 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14186
ef66e766
AC
141872003-01-02 Andrew Cagney <ac131313@redhat.com>
14188
14189 * Makefile.in: Remove obsolete code.
14190
a1358604
DJ
141912002-11-20 Daniel Jacobowitz <drow@mvista.com>
14192
14193 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14194 defined(PT_FPR0_HI).
14195
23ce3b1c
DJ
141962002-11-17 Stuart Hughes <seh@zee2.com>
14197
14198 * linux-arm-low.c (arm_num_regs): Increase.
14199 (arm_regmap): Include status register.
14200
142012002-11-17 Daniel Jacobowitz <drow@mvista.com>
14202
14203 * linux-low.c (register_addr): Remove incorrect -1 check.
14204
a9fa9f7d
DJ
142052002-08-29 Daniel Jacobowitz <drow@mvista.com>
14206
14207 * linux-low.c (linux_create_inferior): Call setpgid. Return
14208 the new PID.
14209 (unstopped_p, linux_signal_pid): Remove.
14210 (linux_target_ops): Remove linux_signal_pid.
14211 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14212 global instead of target method.
14213 * target.h (struct target_ops): Remove signal_pid. Update comment
14214 for create_inferior.
14215 * server.c (signal_pid): New variable.
14216 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 14217 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
14218 (attach_inferior): Set signal_pid.
14219
17574093
DJ
142202002-08-23 Daniel Jacobowitz <drow@mvista.com>
14221
14222 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14223
142242002-08-20 Jim Blandy <jimb@redhat.com>
14225
14226 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14227 default for this.
14228
142292002-08-01 Andrew Cagney <cagney@redhat.com>
14230
14231 * Makefile.in: Make chill references obsolete.
14232
142332002-07-24 Kevin Buettner <kevinb@redhat.com>
14234
14235 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14236 * configure: Regenerate.
14237 * config.in: Regenerate.
14238
142392002-07-09 David O'Brien <obrien@FreeBSD.org>
14240
14241 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14242 (perror_with_name, remote_close, remote_open, expect, play): Static.
14243
142442002-07-04 Michal Ludvig <mludvig@suse.cz>
14245
4b8dad4a 14246 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
14247 byte offsets instead of an array of indexes.
14248 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14249
142502002-06-13 Daniel Jacobowitz <drow@mvista.com>
14251
14252 * regcache.c: Add comment.
14253
142542002-06-11 Daniel Jacobowitz <drow@mvista.com>
14255
14256 * thread-db.c: New file.
14257 * proc-service.c: New file.
14258 * acinclude.m4: New file.
14259 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14260 proc-service.o, and thread-db.o.
14261 (linux-low.o): Add USE_THREAD_DB.
14262 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14263 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14264 * aclocal.m4: Regenerated.
14265 * config.in: Regenerated.
14266 * configure: Regenerated.
14267 * configure.in: Check for proc_service.h, sys/procfs.h,
14268 thread_db.h, and linux/elf.h headrs.
14269 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14270 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14271 Check for -lthread_db and thread support.
14272 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14273 PowerPC, and SuperH.
14274 * i387-fp.c: Constify arguments.
14275 * i387-fp.h: Likewise.
14276 * inferiors.c: (struct thread_info): Renamed from
14277 `struct inferior_info'. Remove PID member. Use generic inferior
14278 list header. All uses updated.
14279 (inferiors, signal_pid): Removed.
14280 (all_threads): New variable.
14281 (get_thread): Define.
14282 (add_inferior_to_list): New function.
14283 (for_each_inferior): New function.
14284 (change_inferior_id): New function.
14285 (add_inferior): Removed.
14286 (remove_inferior): New function.
14287 (add_thread): New function.
14288 (free_one_thread): New function.
14289 (remove_thread): New function.
14290 (clear_inferiors): Use for_each_inferior and free_one_thread.
14291 (find_inferior): New function.
14292 (find_inferior_id): New function.
14293 (inferior_target_data): Update argument type.
14294 (set_inferior_target_data): Likewise.
14295 (inferior_regcache_data): Likewise.
14296 (set_inferior_regcache_data): Likewise.
14297 * linux-low.c (linux_bp_reinsert): Remove.
14298 (all_processes, stopping_threads, using_thrads)
14299 (struct pending_signals, debug_threads, pid_of): New.
14300 (inferior_pid): Replace with macro.
14301 (struct inferior_linux_data): Remove.
14302 (get_stop_pc, add_process): New functions.
14303 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14304 Use add_process and add_thread.
14305 (linux_attach_lwp): New function, based on old linux_attach. Use
14306 add_process and add_thread. Set stop_expected for new threads.
14307 (linux_attach): New function.
14308 (linux_kill_one_process): New function.
14309 (linux_kill): Kill all LWPs.
14310 (linux_thread_alive): Use find_inferior_id.
14311 (check_removed_breakpoints, status_pending_p): New functions.
14312 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14313 Update. Use WNOHANG. Wait for cloned processes also. Update process
14314 struct for the found process.
14315 (linux_wait_for_event): New function.
14316 (linux_wait): Use it. Support LWPs.
14317 (send_sigstop, wait_for_sigstop, stop_all_processes)
14318 (linux_resume_one_process, linux_continue_one_process): New functions.
14319 (linux_resume): Support LWPs.
14320 (REGISTER_RAW_SIZE): Remove.
14321 (fetch_register): Use register_size instead. Call supply_register.
14322 (usr_store_inferior_registers): Likewise. Call collect_register.
14323 Fix recursive case.
14324 (regsets_fetch_inferior_registers): Improve error message.
14325 (regsets_store_inferior_registers): Add debugging.
14326 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14327 (unstopped_p, linux_signal_pid): New functions.
14328 (linux_target_ops): Add linux_signal_pid.
14329 (linux_init_signals): New function.
14330 (initialize_low): Call it. Initialize using_threads.
14331 * regcache.c (inferior_regcache_data): Add valid
14332 flag.
14333 (get_regcache): Fetch registers lazily. Add fetch argument
14334 and update all callers.
14335 (regcache_invalidate_one, regcache_invalidate): New
14336 functions.
14337 (new_register_cache): Renamed from create_register_cache.
14338 Return the new regcache.
14339 (free_register_cache): Change argument to a void *.
14340 (registers_to_string, registers_from_string): Call get_regcache
14341 with fetch flag set.
14342 (register_data): Make static. Pass fetch flag to get_regcache.
14343 (supply_register): Call get_regcache with fetch flag clear.
14344 (collect_register): Call get_regcache with fetch flag set.
14345 (collect_register_as_string): New function.
14346 * regcache.h: Update.
14347 * remote-utils.c (putpkt): Flush after debug output and use
14348 stderr.
14349 Handle input interrupts while waiting for an ACK.
14350 (input_interrupt): Use signal_pid method.
14351 (getpkt): Flush after debug output and use stderr.
14352 (outreg): Use collect_register_as_string.
14353 (new_thread_notify, dead_thread_notify): New functions.
14354 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14355 and general_thread.
14356 (look_up_one_symbol): Flush after debug output.
14357 * server.c (step_thread, server_waiting): New variables.
14358 (start_inferior): Don't use signal_pid. Update call to mywait.
14359 (attach_inferior): Update call to mywait.
14360 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14361 (main): Don't fetch/store registers explicitly. Use
14362 set_desired_inferior. Support proposed ``Hs'' packet. Update
14363 calls to mywait.
14364 * server.h: Update.
14365 (struct inferior_list, struct_inferior_list_entry): New.
14366 * target.c (set_desired_inferior): New.
14367 (write_inferior_memory): Constify.
14368 (mywait): New function.
14369 * target.h: Update.
14370 (struct target_ops): New signal_pid method.
14371 (mywait): Removed macro, added prototype.
14372
14373 * linux-low.h (regset_func): Removed.
14374 (regset_fill_func, regset_store_func): New.
14375 (enum regset_type): New.
14376 (struct regset_info): Add type field. Use new operation types.
14377 (struct linux_target_ops): stop_pc renamed to get_pc.
14378 Add decr_pc_after_break and breakpoint_at.
14379 (get_process, get_thread_proess, get_process_thread)
14380 (strut process_info, all_processes, linux_attach_lwp)
14381 (thread_db_init): New.
14382
14383 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14384 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14385 (the_low_target): Add new members.
14386 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14387 (i386_store_fpxregset): Constify.
14388 (target_regsets): Add new kind identifier.
14389 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14390 (i386_set_pc): Add debugging.
14391 (i386_breakpoint_at): New function.
14392 (the_low_target): Add new members.
14393 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14394 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14395 (mips_breakpoint_at): New.
14396 (the_low_target): Add new members.
14397 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14398 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14399 (the_low_target): Add new members.
14400 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14401 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14402 (the_low_target): Add new members.
14403 * linux-x86-64-low.c (target_regsets): Add new kind
14404 identifier.
14405
144062002-05-15 Daniel Jacobowitz <drow@mvista.com>
14407
14408 From Martin Pool <mbp@samba.org>:
14409 * server.c (gdbserver_usage): New function.
14410 (main): Call it.
14411
144122002-05-14 Daniel Jacobowitz <drow@mvista.com>
14413
14414 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14415 stop_at -> stop_pc.
14416
144172002-05-04 Andrew Cagney <ac131313@redhat.com>
14418
14419 * Makefile.in: Remove obsolete code.
14420
144212002-04-24 Michal Ludvig <mludvig@suse.cz>
14422
14423 * linux-low.c (regsets_fetch_inferior_registers),
14424 (regsets_store_inferior_registers): Removed cast to int from
14425 ptrace() calls.
14426 * regcache.h: Added declaration of struct inferior_info.
14427
144282002-04-20 Daniel Jacobowitz <drow@mvista.com>
14429
14430 * inferiors.c (struct inferior_info): Add regcache_data.
14431 (add_inferior): Call create_register_cache.
14432 (clear_inferiors): Call free_register_cache.
14433 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14434 * regcache.c (struct inferior_regcache_data): New.
14435 (registers): Remove.
14436 (get_regcache): New function.
14437 (create_register_cache, free_register_cache): New functions.
14438 (set_register_cache): Don't initialize the register cache here.
14439 (registers_to_string, registers_from_string, register_data): Call
14440 get_regcache.
14441 * regcache.h: Add prototypes.
14442 * server.h: Likewise.
14443
144442002-04-20 Daniel Jacobowitz <drow@mvista.com>
14445
14446 * mem-break.c: New file.
14447 * mem-break.h: New file.
14448 * Makefile.in: Add mem-break.o rule; update server.h
14449 dependencies.
14450 * inferiors.c (struct inferior_info): Add target_data
14451 member.
14452 (clear_inferiors): Free target_data member if set.
14453 (inferior_target_data, set_inferior_target_data): New functions.
14454 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14455 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14456 * linux-low.c (linux_bp_reinsert): New variable.
14457 (struct inferior_linux_data): New.
14458 (linux_create_inferior): Use set_inferior_target_data.
14459 (linux_attach): Likewise. Call add_inferior.
14460 (linux_wait_for_one_inferior): New function.
14461 (linux_wait): Call it.
14462 (linux_write_memory): Add const.
14463 (initialize_low): Call set_breakpoint_data.
14464 * linux-low.h (struct linux_target_ops): Add breakpoint
14465 handling members.
14466 * server.c (attach_inferior): Remove extra add_inferior
14467 call.
14468 * server.h: Include mem-break.h. Update inferior.c
14469 prototypes.
14470 * target.c (read_inferior_memory)
14471 (write_inferior_memory): New functions.
14472 * target.h (read_inferior_memory)
14473 (write_inferior_memory): Change macros to prototypes.
14474 (struct target_ops): Update comments. Add const to write_memory
14475 definition.
14476
144772002-04-11 Daniel Jacobowitz <drow@mvista.com>
14478
14479 * linux-low.c (usr_store_inferior_registers): Support
14480 registers which are allowed to fail to store.
14481 * linux-low.h (linux_target_ops): Likewise.
14482 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14483 (ppc_cannot_store_register): FPSCR may not be storable.
14484
144852002-04-09 Daniel Jacobowitz <drow@mvista.com>
14486
14487 * server.h: Include <string.h> if HAVE_STRING_H.
14488 * ChangeLog: Correct paths in last ChangeLog entry.
14489
144902002-04-09 Daniel Jacobowitz <drow@mvista.com>
14491
14492 * linux-low.h: Remove obsolete prototypes.
14493 (struct linux_target_ops): New.
14494 (extern the_low_target): New.
14495 * linux-low.c (num_regs, regmap): Remove declarations.
14496 (register_addr): Use the_low_target explicitly.
14497 (fetch_register): Likewise.
14498 (usr_fetch_inferior_registers): Likewise.
14499 (usr_store_inferior_registers): Likewise.
14500 * linux-arm-low.c (num_regs): Remove.
14501 (arm_num_regs): Define.
14502 (arm_regmap): Renamed from regmap, made static.
14503 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14504 made static.
14505 (arm_cannot_store_register): Renamed from cannot_store_register,
14506 made static.
14507 (the_low_target): New.
14508 * linux-i386-low.c (num_regs): Remove.
14509 (i386_num_regs): Define.
14510 (i386_regmap): Renamed from regmap, made static.
14511 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14512 made static.
14513 (i386_cannot_store_register): Renamed from cannot_store_register,
14514 made static.
14515 (the_low_target): New.
14516 * linux-ia64-low.c (num_regs): Remove.
14517 (ia64_num_regs): Define.
14518 (ia64_regmap): Renamed from regmap, made static.
14519 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14520 made static.
14521 (ia64_cannot_store_register): Renamed from cannot_store_register,
14522 made static.
14523 (the_low_target): New.
14524 * linux-m68k-low.c (num_regs): Remove.
14525 (m68k_num_regs): Define.
14526 (m68k_regmap): Renamed from regmap, made static.
14527 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14528 made static.
14529 (m68k_cannot_store_register): Renamed from cannot_store_register,
14530 made static.
14531 (the_low_target): New.
14532 * linux-mips-low.c (num_regs): Remove.
14533 (mips_num_regs): Define.
14534 (mips_regmap): Renamed from regmap, made static.
14535 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14536 made static.
14537 (mips_cannot_store_register): Renamed from cannot_store_register,
14538 made static.
14539 (the_low_target): New.
14540 * linux-ppc-low.c (num_regs): Remove.
14541 (ppc_num_regs): Define.
14542 (ppc_regmap): Renamed from regmap, made static.
14543 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14544 made static.
14545 (ppc_cannot_store_register): Renamed from cannot_store_register,
14546 made static.
14547 (the_low_target): New.
14548 * linux-s390-low.c (num_regs): Remove.
14549 (s390_num_regs): Define.
14550 (s390_regmap): Renamed from regmap, made static.
14551 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14552 made static.
14553 (s390_cannot_store_register): Renamed from cannot_store_register,
14554 made static.
14555 (the_low_target): New.
14556 * linux-sh-low.c (num_regs): Remove.
14557 (sh_num_regs): Define.
14558 (sh_regmap): Renamed from regmap, made static.
14559 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14560 made static.
14561 (sh_cannot_store_register): Renamed from cannot_store_register,
14562 made static.
14563 (the_low_target): New.
14564 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14565 (the_low_target): New.
14566
145672002-04-09 Daniel Jacobowitz <drow@mvista.com>
14568
14569 * Makefile.in: Add stamp-h target.
14570 * configure.in: Create stamp-h.
14571 * configure: Regenerated.
14572
145732002-04-09 Daniel Jacobowitz <drow@mvista.com>
14574
14575 * inferiors.c: New file.
14576 * target.c: New file.
14577 * target.h: New file.
14578 * Makefile.in: Add target.o and inferiors.o. Update
14579 dependencies.
14580 * linux-low.c (inferior_pid): New static variable,
14581 moved from server.c.
14582 (linux_create_inferior): Renamed from create_inferior.
14583 Call add_inferior. Return 0 on success instead of a PID.
14584 (linux_attach): Renamed from myattach.
14585 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14586 (linux_thread_alive): Renamed from mythread_alive.
14587 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14588 child dies.
14589 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14590 (regsets_store_inferior_registers): Correct error message.
14591 Add missing ``return 0''.
14592 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14593 (linux_store_registers): Renamed from store_inferior_registers.
14594 (linux_read_memory): Renamed from read_inferior_memory.
14595 (linux_write_memory): Renamed from write_inferior_memory.
14596 (linux_target_ops): New structure.
14597 (initialize_low): Call set_target_ops ().
14598 * remote-utils.c (unhexify): New function.
14599 (hexify): New function.
14600 (input_interrupt): Send signals to ``signal_pid''.
14601 * server.c (inferior_pid): Remove.
14602 (start_inferior): Update create_inferior call.
14603 (attach_inferior): Call add_inferior.
14604 (handle_query): New function.
14605 (main): Call handle_query for `q' packets.
14606 * server.h: Include "target.h". Remove obsolete prototypes.
14607 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14608
146092002-04-09 Daniel Jacobowitz <drow@mvista.com>
14610
14611 * Makefile.in: Add WARN_CFLAGS. Update configury
14612 dependencies.
14613 * configure.in: Check for <string.h>
14614 * configure: Regenerate.
14615 * config.in: Regenerate.
14616 * gdbreplay.c: Include needed system headers.
14617 (remote_open): Remove strchr prototype.
14618 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14619 * regcache.c (supply_register): Change buf argument to const void *.
14620 (supply_register_by_name): Likewise.
14621 (collect_register): Change buf argument to void *.
14622 (collect_register_by_name): Likewise.
14623 * regcache.h: Add missing prototypes.
14624 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14625 * server.c (handle_query): New function.
14626 (attached): New static variable, moved out of main.
14627 (main): Quiet longjmp clobber warnings.
14628 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14629 * utils.c (error): Remove NORETURN.
14630 (fatal): Likewise.
This page took 2.545324 seconds and 4 git commands to generate.