Bump gold version number to 1.14.
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
ad02e4fe
SM
12016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * Makefile.in: Include disable-implicit-rules.mk.
4
dcb07cfa
PA
52016-11-23 Pedro Alves <palves@redhat.com>
6
7 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
8 (debug_vprintf): Use std::chrono::steady_clock instead of
9 gettimeofday. Use '.' instead of ':'.
10 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
11 (get_timestamp): Use std::chrono::steady_clock instead of
12 gettimeofday.
13
8629c02c
SM
142016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
15
16 * Makefile.in: Fix whitespace formatting.
17
b593ecca
SM
182016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
19
20 * Makefile.in (SFILES, OBS): Flatten list and order
21 alphabetically.
22
9986ba08
PA
232016-11-23 Pedro Alves <palves@redhat.com>
24
25 * event-loop.c (handle_file_event): Use warning.
26 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
27 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
28 Use warning.
29
4eefa7bc
PA
302016-11-23 Pedro Alves <palves@redhat.com>
31
32 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
33 output.
34 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
35 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
36 debug_printf and debug_flush for debug output.
37 * server.c (handle_general_set): Likewise.
38 * thread-db.c (try_thread_db_load): Use debug_printf for debug
39 output.
40
5443506e
SM
412016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
42
43 * Makefile.in (.c.o): Replace rule with ...
44 (%.o: %.c): ... this one.
45
3b165252
SM
462016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
47
48 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
49 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
50 make.
51 * configure.ac: Remove checks for the make program.
52 * configure: Re-generate.
53
0bcda685
PA
542016-10-28 Pedro Alves <palves@redhat.com>
55
56 * Makefile.in (CXX_DIALECT): Get from configure.
57 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
58 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
59 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
60 * config.in: Regenerate.
61 * configure: Regenerate.
62
c3805894
YQ
632016-10-27 Yao Qi <yao.qi@linaro.org>
64
65 * linux-low.c (linux_supports_range_stepping): Return true if
66 can_software_single_step return true.
67
89342618
YQ
682016-10-27 Yao Qi <yao.qi@linaro.org>
69
70 * inferiors.c (find_inferior_in_random): New function.
71 * inferiors.h (find_inferior_in_random): Declare.
72 * linux-low.c (linux_wait_for_event_filtered): Call
73 find_inferior_in_random instead of find_inferior.
74
e3652c84
YQ
752016-10-27 Yao Qi <yao.qi@linaro.org>
76
77 * linux-low.c (linux_wait_1): If single-step breakpoints are
78 inserted, remove them.
79
5a04c4cf
PA
802016-10-26 Pedro Alves <palves@redhat.com>
81
82 * linux-low.c (handle_extended_wait): Link parent/child fork
83 threads.
84 (linux_wait_1): Unlink them.
85 (linux_set_resume_request): Ignore resume requests for
86 already-resumed and unhandled fork child threads.
87 * linux-low.h (struct lwp_info) <fork_relative>: New field.
88 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
89 New functions.
90 (handle_v_requests) <vCont>: Don't call require_running.
91 * server.h (in_queued_stop_replies): New declaration.
92
cb93dc7f
YQ
932016-10-24 Yao Qi <yao.qi@linaro.org>
94
95 PR server/20733
96 * linux-aarch64-low.c (append_insns): Cast the return value to
97 'uint32_t *'.
98
a1078bea
YQ
992016-10-10 Yao Qi <yao.qi@linaro.org>
100
101 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
102
1fb77080
SDJ
1032016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
104
105 * target.c (target_supports_multi_process): New function, moved
106 from...
107 * target.h (target_supports_multi_process): ... here. Remove
108 macro.
109
39b5a3b9
TT
1102016-10-05 Tom Tromey <tom@tromey.com>
111
112 PR remote/20655:
113 * tracepoint.c (handle_tracepoint_bkpts): Check
114 ipa_error_tracepoint, not ipa_stopping_tracepoint.
115
c1d0b70a
YQ
1162016-10-05 Yao Qi <yao.qi@linaro.org>
117
118 * configure.srv: Update the path of arm-*.xml files.
119
0a69eedb
YQ
1202016-10-05 Terry Guo <terry.guo@arm.com>
121 Yao Qi <yao.qi@linaro.org>
122
123 * Makefile.in: Adjust the path of rules.
124 * configure.srv: Update the path of xml files.
125 * regformats/arm-with-iwmmxt.dat: Regenerated.
126 * regformats/arm-with-neon.dat: Likewise.
127 * regformats/arm-with-vfpv2.dat: Likewise.
128 * regformats/arm-with-vfpv3.dat Likewise.
129
17e16485
YQ
1302016-09-30 Yao Qi <yao.qi@linaro.org>
131
132 PR gdbserver/20627
133 * target.c (target_stop_and_wait): Don't call
134 target_continue_no_signal, use resume_stop instead.
135
edeeb602
YQ
1362016-09-26 Yao Qi <yao.qi@linaro.org>
137
138 * linux-low.c (linux_wait_1): Call debug_exit.
139
503b1c39
PA
1402016-09-23 Pedro Alves <palves@redhat.com>
141
142 * Makefile.in (SFILES): Add common/new-op.c.
143 (OBS): Add common/new-op.o.
144 (new-op.o): New rule.
145
74172ecf
SM
1462016-09-21 Simon Marchi <simon.marchi@ericsson.com>
147
148 * .gitinore: Ignore more files.
149
fc6cda2e
YQ
1502016-09-21 Yao Qi <yao.qi@linaro.org>
151
152 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
153 23.
154
bc1e6c81
SDJ
1552016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
156
157 * server.c (start_inferior): Call target_mourn_inferior instead of
158 mourn_inferior; pass ptid_t argument to it.
159 (resume): Likewise.
160 (handle_target_event): Likewise.
161 * target.c (target_mourn_inferior): New function.
162 * target.h (mourn_inferior): Delete macro.
163
0e00e962
AA
1642016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
165
166 * linux-low.c (lwp_is_stepping): New function.
167
1d8cb77d
CL
1682016-09-06 Carl Love <cel@us.ibm.com>
169
170 * server.c (start_inferior): Fixed comment, requested comment change
171 didn't get updated correctly. Removed reference to ptrace () call as
172 it is only true on Linux systems.
173
7313bced
CL
1742016-09-06 Carl Love <cel@us.ibm.com>
175
176 * server.c (start_inferior): Do not call
177 function target_post_create_inferior () if the
178 inferior process has already exited.
179
cf6de44d
PA
1802016-09-05 Pedro Alves <palves@redhat.com>
181
182 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
183 (COMPILE.pre, CC_LD): Use CXX directly.
184 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
185 * acinclude.m4: Don't include build-with-cxx.m4.
186 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
187 * configure: Regenerate.
188
c1da6748
AT
1892016-09-02 Akash Trehan <akash.trehan123@gmail.com>
190
191 PR gdb/19495
192 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
193 call writing data to own_buf.
194
f2b9e3df
SDJ
1952016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
196
197 * target.c (mywait): Call target_wait instead of
198 the_target->wait.
199 (target_wait): New function.
200
049a8570
SDJ
2012016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
202
203 * server.c (start_inferior): New variable 'ptid'. Replace calls
204 to the_target->resume by target_continue{,_no_signal}, depending
205 on the case.
206 * target.c (target_stop_and_wait): Call target_continue_no_signal
207 instead of the_target->resume.
208 (target_continue): New function.
209
3aa5cfa0
AT
2102016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
211
212 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
213
754653a7
AZ
2142016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
215
216 PR server/20491
217 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
218 ps_prochandle.
219 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
220 * linux-arm-low.c (ps_get_thread_area): Likewise.
221 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
222 * linux-m68k-low.c (ps_get_thread_area): Likewise.
223 * linux-mips-low.c (ps_get_thread_area): Likewise.
224 * linux-nios2-low.c (ps_get_thread_area): Likewise.
225 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
226 * linux-x86-low.c (ps_get_thread_area): Likewise.
227 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
228
ed036b40
PA
2292016-08-19 Pedro Alves <palves@redhat.com>
230
231 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
232
c8ef42ee
PA
2332016-08-19 Pedro Alves <palves@redhat.com>
234
235 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
236 comment. Use memcpy instead of casting through unsigned long.
237
9c235a72
PA
2382016-08-19 Pedro Alves <palves@redhat.com>
239
240 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
241 allocating around 0x80000000.
242
201506da
PA
2432016-08-19 Pedro Alves <palves@redhat.com>
244
245 PR gdb/20415
246 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
247 (x32-avx512-linux-ipa.o): New rules.
248 * configure.ac (x86_64-*-linux*): New x32 check.
249 * configure.srv (ipa_x32_linux_regobj): New.
250 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
251 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
252 descriptions.
253 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
254 descriptions.
255 * configure: Regenerate.
256
f348d89a
PA
2572016-08-09 Pedro Alves <palves@redhat.com>
258
259 PR gdb/18653
260 * Makefile.in (OBS): Add signals-state-save-restore.o.
261 (signals-state-save-restore.o): New rule.
262 * config.in: Regenerate.
263 * configure: Regenerate.
264 * linux-low.c: Include "signals-state-save-restore.h".
265 (linux_create_inferior): Call
266 restore_original_signals_state.
267 * server.c: Include "dispositions-save-restore.h".
268 (captured_main): Call save_original_signals_state.
269
1baf5149
PA
2702016-08-05 Pedro Alves <palves@redhat.com>
271
272 * configure: Regenerate.
273
fcd4a73d
YQ
2742016-08-04 Yao Qi <yao.qi@linaro.org>
275
276 * linux-low.c (regsets_fetch_inferior_registers): Check
277 errno is ESRCH or not.
278
979659d0
YQ
2792016-08-02 Yao Qi <yao.qi@linaro.org>
280
281 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
282 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
283 (thread_db_load_search): Update.
284 (try_thread_db_load_1): Don't look for td_ta_event_addr,
285 td_ta_set_event and td_ta_event_getmsg.
286
6598661d
PA
2872016-07-26 Pedro Alves <palves@redhat.com>
288
289 PR server/20414
290 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
291 of unsigned long for 64-bit registers and use uint32_t instead of
292 unsigned int for 32-bit registers.
293
9cf12d57
PA
2942016-07-26 Pedro Alves <palves@redhat.com>
295
296 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
297 to 'ptrace'.
298
305450ed
TT
2992016-07-21 Tom Tromey <tom@tromey.com>
300
301 * configure: Rebuild.
302
2583da7c
YQ
3032016-07-21 Yao Qi <yao.qi@linaro.org>
304
305 * mem-break.c (find_gdb_breakpoint): Cast bp to
306 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
307
21536b36
YQ
3082016-07-21 Yao Qi <yao.qi@linaro.org>
309
310 * server.c (handle_v_requests): Support s and S actions
311 if target_supports_software_single_step return true.
312
8901d193
YQ
3132016-07-21 Yao Qi <yao.qi@linaro.org>
314
315 * linux-low.c (resume_stopped_resumed_lwps): If resume request
316 is resume_step, call maybe_hw_step.
317 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
318 and unstop them.
319 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
320 breakpoints or not.
321 (proceed_one_lwp): If resume request is resume_step, install
322 reinsert breakpoints and call maybe_hw_step.
323
0e9a339e
YQ
3242016-07-21 Yao Qi <yao.qi@linaro.org>
325
326 * linux-low.c (proceed_one_lwp): Declare.
327 (linux_resume_one_thread): Remove local variable 'step'.
328 Lift code enqueue signal. Call proceed_one_lwp instead of
329 linux_resume_one_lwp.
330
4281b351
YQ
3312016-07-21 Yao Qi <yao.qi@linaro.org>
332
333 * linux-low.c (linux_resume_one_thread): Call
334 enqueue_pending_signal.
335
984a2c04
YQ
3362016-07-21 Yao Qi <yao.qi@linaro.org>
337
338 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
339 * inferiors.c (do_restore_current_thread_cleanup): New function.
340 (make_cleanup_restore_current_thread): Likewise.
341 * linux-low.c (install_software_single_step_breakpoints): Call
342 make_cleanup_restore_current_thread. Switch current_thread to
343 thread.
344
bec903c9
YQ
3452016-07-21 Yao Qi <yao.qi@linaro.org>
346
347 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
348 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
349 (clone_one_breakpoint): Likewise.
350 (delete_reinsert_breakpoints): Change parameter to thread.
351 Callers updated.
352 (has_reinsert_breakpoints): Likewise.
353 (uninsert_reinsert_breakpoints): Likewise.
354 (reinsert_reinsert_breakpoints): Likewise.
355 * mem-break.h (set_reinsert_breakpoint): Update declaration.
356 (delete_reinsert_breakpoints): Likewise.
357 (reinsert_reinsert_breakpoints): Likewise.
358 (uninsert_reinsert_breakpoints): Likewise.
359 (has_reinsert_breakpoints): Likewise.
360
63c40ec7
YQ
3612016-07-21 Yao Qi <yao.qi@linaro.org>
362
363 * inferiors.c (get_thread_process): Make parameter const.
364 * inferiors.h (get_thread_process): Update declaration.
365 * mem-break.c (clone_all_breakpoints): Remove all parameters.
366 Add new parameters child_thread and parent_thread. Callers
367 updated.
368 * mem-break.h (clone_all_breakpoints): Update declaration.
369
9aa76cd0
YQ
3702016-07-21 Yao Qi <yao.qi@linaro.org>
371
372 * mem-break.c (struct breakpoint) <cond_list>: Remove.
373 <command_list, handler>: Remove.
374 (struct gdb_breakpoint): New.
375 (struct other_breakpoint): New.
376 (struct reinsert_breakpoint): New.
377 (is_gdb_breakpoint): New function.
378 (any_persistent_commands): Update command_list if
379 is_gdb_breakpoint returns true.
380 (set_breakpoint): Create breakpoints according to their types.
381 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
382 (set_gdb_breakpoint_1): Likewise.
383 (set_gdb_breakpoint): Likewise.
384 (clear_breakpoint_conditions): Change parameter type to
385 'struct gdb_breakpoint *'.
386 (clear_breakpoint_commands): Likewise.
387 (clear_breakpoint_conditions_and_commands): Likewise.
388 (add_condition_to_breakpoint): Likewise.
389 (add_breakpoint_condition): Likewise.
390 (add_commands_to_breakpoint): Likewise.
391 (check_breakpoints): Check other_breakpoint.
392 (clone_one_breakpoint): Clone breakpopint according to its type.
393 * mem-break.h (struct gdb_breakpoint): Declare.
394 (set_gdb_breakpoint): Update declaration.
395 (clear_breakpoint_conditions_and_commands): Likewise.
396 (add_breakpoint_condition): Likewise.
397 (add_breakpoint_commands): Likewise.
398 * server.c (process_point_options): Change parameter type to
399 'struct gdb_breakpoint *'.
400
811f8301
YQ
4012016-07-21 Yao Qi <yao.qi@linaro.org>
402
403 * mem-break.c (set_breakpoint_at): Rename it to ...
404 (set_breakpoint_type_at): ... it.
405 (set_breakpoint_at): Call set_breakpoint_type_at.
406 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
407 * mem-break.h (set_breakpoint_at): Update comments.
408
b1c51e36
CLT
4092016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
410
411 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
412 to buf parameter.
413 (nios2_store_gregset): Likewise.
414
ced2dffb
PA
4152016-07-01 Pedro Alves <palves@redhat.com>
416 Antoine Tremblay <antoine.tremblay@ericsson.com>
417
418 * linux-low.c: Change interface to take the target lwp_info
419 pointer directly and return void. Handle detaching from a zombie
420 thread.
421 (linux_detach_lwp_callback): New function.
422 (linux_detach): Detach from the leader thread after detaching from
423 the clone threads.
424
2ac09a5b
YQ
4252016-06-28 Yao Qi <yao.qi@linaro.org>
426
427 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
428 for variable new_offset.
429 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
430 (aarch64_ftrace_insn_reloc_cb): Likewise.
431 (aarch64_ftrace_insn_reloc_tb): Likewise.
432 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
433 PRIx64 instead of PRIx32.
434
79e7fd4f
YQ
4352016-06-28 Yao Qi <yao.qi@linaro.org>
436
437 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
438 (the_low_target): Install arm_get_syscall_trapinfo.
439
061fc021
YQ
4402016-06-28 Yao Qi <yao.qi@linaro.org>
441
442 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
443 function.
444 (the_low_target): Install aarch64_get_syscall_trapinfo.
445
4cc32bec
YQ
4462016-06-28 Yao Qi <yao.qi@linaro.org>
447
448 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
449 Callers updated.
450 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
451 Remove parameter sysno.
452 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
453 sysret.
454
782c1122
AA
4552016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
456
457 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
458 (s390_emit_ne_goto): Likewise.
459 (s390_emit_lt_goto): Likewise.
460 (s390_emit_le_goto): Likewise.
461 (s390_emit_gt_goto): Likewise.
462 (s390_emit_ge_goto): Likewise.
463 (s390x_emit_eq_goto): Likewise.
464 (s390x_emit_ne_goto): Likewise.
465 (s390x_emit_lt_goto): Likewise.
466 (s390x_emit_le_goto): Likewise.
467 (s390x_emit_gt_goto): Likewise.
468 (s390x_emit_ge_goto): Likewise.
469 (s390_emit_ops_impl): Mark variable static.
470 (s390x_emit_ops): Likewise.
471
2e7b624b
YQ
4722016-06-17 Yao Qi <yao.qi@linaro.org>
473
474 * linux-low.c (handle_extended_wait): Call
475 uninsert_reinsert_breakpoints for the parent process. Remove
476 reinsert breakpoints from the child process. Reinsert them to
477 the parent process when vfork is done.
478 * mem-break.c (uninsert_reinsert_breakpoints): New function.
479 (reinsert_reinsert_breakpoints): New function.
480 * mem-break.h (uninsert_reinsert_breakpoints): Declare
481 (reinsert_reinsert_breakpoints): Declare.
482
8a81c5d7
YQ
4832016-06-17 Yao Qi <yao.qi@linaro.org>
484
485 * linux-low.c (handle_extended_wait): If the parent is doing
486 step-over, remove the reinsert breakpoints from the forked child.
487
f50bf8e5
YQ
4882016-06-17 Yao Qi <yao.qi@linaro.org>
489
490 * linux-low.c (unsuspend_all_lwps): Declare.
491 (linux_low_filter_event): If thread exited, call finish_step_over.
492 If step-over is finished, unsuspend other threads.
493
8376a3cb
YQ
4942016-06-17 Yao Qi <yao.qi@linaro.org>
495
496 * linux-low.c (linux_resume_one_lwp_throw): Assert
497 has_reinsert_breakpoints returns false.
498 * mem-break.c (delete_disabled_breakpoints): Assert
499 bp type isn't reinsert_breakpoint.
500
f79b145d
YQ
5012016-06-17 Yao Qi <yao.qi@linaro.org>
502
503 * linux-low.c (maybe_hw_step): New function.
504 (linux_resume_one_lwp_throw): Call maybe_hw_step.
505 (finish_step_over): Switch current_thread to lwp temporarily,
506 and assert has_reinsert_breakpoints returns true.
507 (proceed_one_lwp): Call maybe_hw_step.
508 * mem-break.c (has_reinsert_breakpoints): New function.
509 * mem-break.h (has_reinsert_breakpoints): Declare.
510
0ae534d2
JT
5112016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
512
513 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
514
fcdad592
YQ
5152016-05-17 Yao Qi <yao.qi@linaro.org>
516
517 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
518 instead of find_inferior.
519
9e784964
YQ
5202016-05-05 Yao Qi <yao.qi@linaro.org>
521
522 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
523 Initialize res to zero.
524
cf2ebb6e
YQ
5252016-05-05 Yao Qi <yao.qi@linaro.org>
526
527 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
528 to uint32_t.
529
c1aebf87
UW
5302016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
531
532 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
533 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
534 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
535
35fd2deb 5362016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 537 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
538
539 * tracepoint.c (write_inferior_int8): New function.
540 (cmd_qtenable_disable): Write enable flag using
541 write_inferior_int8.
542
484b3c32
YQ
5432016-04-25 Yao Qi <yao.qi@linaro.org>
544
545 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
546 (need_step_over_p): Return zero if the LWP has pending signals
547 can be delivered on software single step target.
548
85ba7d86
YQ
5492016-04-25 Yao Qi <yao.qi@linaro.org>
550
551 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
552 return instead of error.
553
3539aa13
YQ
5542016-04-22 Yao Qi <yao.qi@linaro.org>
555
556 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
557 to 23.
558
5b061e98
YQ
5592016-04-22 Yao Qi <yao.qi@linaro.org>
560
561 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
562 signal when stepping over breakpoint with software single
563 step.
564
3451269c
PA
5652016-04-21 Pedro Alves <palves@redhat.com>
566
567 * linux-s390-low.c (s390_collect_ptrace_register)
568 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
569 add casts.
570 (s390_check_regset): Use void * instead of gdb_byte *.
571
a2358508
PA
5722016-04-20 Pedro Alves <palves@redhat.com>
573
574 * configure: Renegerate.
575
6885166d
YQ
5762016-04-20 Yao Qi <yao.qi@linaro.org>
577
578 * linux-aarch32-low.c: Include "arch/arm-linux.h".
579 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
580 number 16.
581 (arm_store_gregset): Likewise.
582
2b863f51
WT
5832016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
584
585 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
586 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
587 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
588 (amd64-avx-mpx-linux.c): New rules.
589 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
590 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
591 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
592 (srv_amd64_regobj): Add amd64-avx-mpx.o.
593 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
594 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
595 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
596 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
597 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
598 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
599 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
600 * linux-x86-low.c (x86_linux_read_description): Add case for
601 X86_XSTATE_AVX_MPX_MASK.
602 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
603 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
604 init_registers_i386_avx_mpx_linux.
605 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
606 (initialize_low_tracepoint): Call
607 init_registers_i386_avx_mpx_linux.
608 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
609 (initialize_low_tracepoint): Call
610 init_registers_amd64_avx_mpx_linux.
611 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
612 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
613 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
614 declarations.
615
9b30624b
PA
6162016-04-18 Pedro Alves <palves@redhat.com>
617
618 * configure: Regenerate.
619
45e3745e
AT
6202016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
621
622 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
623 (aarch64_emit_sub): Likewise.
624
2afc13ff
PA
6252016-04-12 Pedro Alves <palves@redhat.com>
626
627 * utils.c (prepare_to_throw_exception): Delete.
628
6e774b13
SM
6292016-04-05 Simon Marchi <simon.marchi@ericsson.com>
630
631 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
632
4dca19f8
MK
6332016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
634
635 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
636
d0a9981f
MK
6372016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
638
639 * linux-aarch64-ipa.c: Add <elf.h> include.
640 * linux-ppc-ipa.c: Add <elf.h> include.
641 * linux-s390-ipa.c: Add <elf.h> include.
642
252db07e
MK
6432016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
644
645 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
646 (get_raw_reg_ptr): Likewise.
647 (get_trace_state_variable_value_ptr): Likewise.
648 (set_trace_state_variable_value_ptr): Likewise.
649 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
650 char *.
651
14e2b6d9
MK
6522016-03-31 Wei-cheng Wang <cole945@gmail.com>
653 Marcin Kościelnicki <koriakin@0x04.net>
654
655 PR/17221
656 * linux-ppc-low.c (emit_insns): New function.
657 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
658 (ppc_emit_prologue): New function.
659 (ppc_emit_epilogue): New function.
660 (ppc_emit_add): New function.
661 (ppc_emit_sub): New function.
662 (ppc_emit_mul): New function.
663 (ppc_emit_lsh): New function.
664 (ppc_emit_rsh_signed): New function.
665 (ppc_emit_rsh_unsigned): New function.
666 (ppc_emit_ext): New function.
667 (ppc_emit_zero_ext): New function.
668 (ppc_emit_log_not): New function.
669 (ppc_emit_bit_and): New function.
670 (ppc_emit_bit_or): New function.
671 (ppc_emit_bit_xor): New function.
672 (ppc_emit_bit_not): New function.
673 (ppc_emit_equal): New function.
674 (ppc_emit_less_signed): New function.
675 (ppc_emit_less_unsigned): New function.
676 (ppc_emit_ref): New function.
677 (ppc_emit_const): New function.
678 (ppc_emit_reg): New function.
679 (ppc_emit_pop): New function.
680 (ppc_emit_stack_flush): New function.
681 (ppc_emit_swap): New function.
682 (ppc_emit_stack_adjust): New function.
683 (ppc_emit_call): New function.
684 (ppc_emit_int_call_1): New function.
685 (ppc_emit_void_call_2): New function.
686 (ppc_emit_if_goto): New function.
687 (ppc_emit_goto): New function.
688 (ppc_emit_eq_goto): New function.
689 (ppc_emit_ne_goto): New function.
690 (ppc_emit_lt_goto): New function.
691 (ppc_emit_le_goto): New function.
692 (ppc_emit_gt_goto): New function.
693 (ppc_emit_ge_goto): New function.
694 (ppc_write_goto_address): New function.
695 (ppc_emit_ops_impl): New static variable.
696 (ppc64v1_emit_prologue): New function.
697 (ppc64v2_emit_prologue): New function.
698 (ppc64_emit_epilogue): New function.
699 (ppc64_emit_add): New function.
700 (ppc64_emit_sub): New function.
701 (ppc64_emit_mul): New function.
702 (ppc64_emit_lsh): New function.
703 (ppc64_emit_rsh_signed): New function.
704 (ppc64_emit_rsh_unsigned): New function.
705 (ppc64_emit_ext): New function.
706 (ppc64_emit_zero_ext): New function.
707 (ppc64_emit_log_not): New function.
708 (ppc64_emit_bit_and): New function.
709 (ppc64_emit_bit_or): New function.
710 (ppc64_emit_bit_xor): New function.
711 (ppc64_emit_bit_not): New function.
712 (ppc64_emit_equal): New function.
713 (ppc64_emit_less_signed): New function.
714 (ppc64_emit_less_unsigned): New function.
715 (ppc64_emit_ref): New function.
716 (ppc64_emit_const): New function.
717 (ppc64v1_emit_reg): New function.
718 (ppc64v2_emit_reg): New function.
719 (ppc64_emit_pop): New function.
720 (ppc64_emit_stack_flush): New function.
721 (ppc64_emit_swap): New function.
722 (ppc64v1_emit_call): New function.
723 (ppc64v2_emit_call): New function.
724 (ppc64v1_emit_int_call_1): New function.
725 (ppc64v2_emit_int_call_1): New function.
726 (ppc64v1_emit_void_call_2): New function.
727 (ppc64v2_emit_void_call_2): New function.
728 (ppc64_emit_if_goto): New function.
729 (ppc64_emit_eq_goto): New function.
730 (ppc64_emit_ne_goto): New function.
731 (ppc64_emit_lt_goto): New function.
732 (ppc64_emit_le_goto): New function.
733 (ppc64_emit_gt_goto): New function.
734 (ppc64_emit_ge_goto): New function.
735 (ppc64v1_emit_ops_impl): New static variable.
736 (ppc64v2_emit_ops_impl): New static variable.
737 (ppc_emit_ops): New function.
738 (linux_low_target): Wire in ppc_emit_ops.
739
a2174ba4
MK
7402016-03-31 Wei-cheng Wang <cole945@gmail.com>
741 Marcin Kościelnicki <koriakin@0x04.net>
742
743 PR/17221
744 * Makefile.in: Add powerpc-*-ipa.o
745 * configure.srv: Add ipa_obj for powerpc*-linux.
746 * linux-ppc-ipa.c: New file.
747 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
748 includes.
749 (PPC_FIELD): New macro.
750 (PPC_SEXT): New macro.
751 (PPC_OP6): New macro.
752 (PPC_BO): New macro.
753 (PPC_LI): New macro.
754 (PPC_BD): New macro.
755 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
756 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
757 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
758 (ppc_get_thread_area): New function.
759 (is_elfv2_inferior): New function.
760 (gen_ds_form): New function.
761 (GEN_STD): New macro.
762 (GEN_STDU): New macro.
763 (GEN_LD): New macro.
764 (GEN_LDU): New macro.
765 (gen_d_form): New function.
766 (GEN_ADDI): New macro.
767 (GEN_ADDIS): New macro.
768 (GEN_LI): New macro.
769 (GEN_LIS): New macro.
770 (GEN_ORI): New macro.
771 (GEN_ORIS): New macro.
772 (GEN_LWZ): New macro.
773 (GEN_STW): New macro.
774 (GEN_STWU): New macro.
775 (gen_xfx_form): New function.
776 (GEN_MFSPR): New macro.
777 (GEN_MTSPR): New macro.
778 (GEN_MFCR): New macro.
779 (GEN_MTCR): New macro.
780 (GEN_SYNC): New macro.
781 (GEN_LWSYNC): New macro.
782 (gen_x_form): New function.
783 (GEN_OR): New macro.
784 (GEN_MR): New macro.
785 (GEN_LWARX): New macro.
786 (GEN_STWCX): New macro.
787 (GEN_CMPW): New macro.
788 (gen_md_form): New function.
789 (GEN_RLDICL): New macro.
790 (GEN_RLDICR): New macro.
791 (gen_i_form): New function.
792 (GEN_B): New macro.
793 (GEN_BL): New macro.
794 (gen_b_form): New function.
795 (GEN_BNE): New macro.
796 (GEN_LOAD): New macro.
797 (GEN_STORE): New macro.
798 (gen_limm): New function.
799 (gen_atomic_xchg): New function.
800 (gen_call): New function.
801 (ppc_relocate_instruction): New function.
802 (ppc_install_fast_tracepoint_jump_pad): New function.
803 (ppc_get_min_fast_tracepoint_insn_len): New function.
804 (ppc_get_ipa_tdesc_idx): New function.
805 (the_low_target): Wire in the new functions.
806 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
807 tdescs.
808 * linux-ppc-tdesc.h: New file.
809
a13c4696
MK
8102016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
811
812 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
813 (alloc_jump_pad_buffer): New function.
814 * linux-amd64-ipa.c: Add <sys/mman.h> include.
815 (alloc_jump_pad_buffer): New function.
816 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
817 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
818 (alloc_jump_pad_buffer): New function.
819 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
820 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
821 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
822 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
823
1cda1512
MK
8242016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
825
826 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
827 * linux-amd64-ipa.c: Likewise.
828 * linux-i386-ipa.c: Likewise.
829 * linux-s390-ipa.c: Likewise.
830 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
831 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
832 set_trace_state_variable_value_ptr.
833 (struct ipa_sym_addresses): Likewise.
834 (symbol_list): Likewise.
835 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
836 accessing gdb_collect directly.
837 (gdb_collect_ptr_type): New typedef.
838 (get_raw_reg_ptr_type): New typedef.
839 (get_trace_state_variable_value_ptr_type): New typedef.
840 (set_trace_state_variable_value_ptr_type): New typedef.
841 (gdb_collect_ptr): New global.
842 (get_raw_reg_ptr): New global.
843 (get_trace_state_variable_value_ptr): New global.
844 (set_trace_state_variable_value_ptr): New global.
845 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
846 accessing get_raw_reg directly.
847 (get_get_tsv_func_addr): Likewise for
848 get_trace_state_variable_value_ptr.
849 (get_set_tsv_func_addr): Likewise for
850 set_trace_state_variable_value_ptr.
851 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
852
72fb5488
SM
8532016-03-30 Simon Marchi <simon.marchi@ericsson.com>
854
855 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
856
28170b88
MK
8572016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
858
859 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
860 packets.
861 (relocate_instruction): Remove own_buf.
862 * server.c (own_buf): Make global.
863 (handle_v_requests): Make global.
864 * server.h (own_buf): New declaration.
865 (handle_v_requests): New prototype.
866
f39e8743
MK
8672016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
868
869 PR 18377
870 * linux-s390-low.c (add_insns): New function.
871 (s390_emit_prologue): New function.
872 (s390_emit_epilogue): New function.
873 (s390_emit_add): New function.
874 (s390_emit_sub): New function.
875 (s390_emit_mul): New function.
876 (s390_emit_lsh): New function.
877 (s390_emit_rsh_signed): New function.
878 (s390_emit_rsh_unsigned): New function.
879 (s390_emit_ext): New function.
880 (s390_emit_log_not): New function.
881 (s390_emit_bit_and): New function.
882 (s390_emit_bit_or): New function.
883 (s390_emit_bit_xor): New function.
884 (s390_emit_bit_not): New function.
885 (s390_emit_equal): New function.
886 (s390_emit_less_signed): New function.
887 (s390_emit_less_unsigned): New function.
888 (s390_emit_ref): New function.
889 (s390_emit_if_goto): New function.
890 (s390_emit_goto): New function.
891 (s390_write_goto_address): New function.
892 (s390_emit_litpool): New function.
893 (s390_emit_const): New function.
894 (s390_emit_call): New function.
895 (s390_emit_reg): New function.
896 (s390_emit_pop): New function.
897 (s390_emit_stack_flush): New function.
898 (s390_emit_zero_ext): New function.
899 (s390_emit_swap): New function.
900 (s390_emit_stack_adjust): New function.
901 (s390_emit_set_r2): New function.
902 (s390_emit_int_call_1): New function.
903 (s390_emit_void_call_2): New function.
904 (s390_emit_eq_goto): New function.
905 (s390_emit_ne_goto): New function.
906 (s390_emit_lt_goto): New function.
907 (s390_emit_le_goto): New function.
908 (s390_emit_gt_goto): New function.
909 (s390_emit_ge_goto): New function.
910 (s390x_emit_prologue): New function.
911 (s390x_emit_epilogue): New function.
912 (s390x_emit_add): New function.
913 (s390x_emit_sub): New function.
914 (s390x_emit_mul): New function.
915 (s390x_emit_lsh): New function.
916 (s390x_emit_rsh_signed): New function.
917 (s390x_emit_rsh_unsigned): New function.
918 (s390x_emit_ext): New function.
919 (s390x_emit_log_not): New function.
920 (s390x_emit_bit_and): New function.
921 (s390x_emit_bit_or): New function.
922 (s390x_emit_bit_xor): New function.
923 (s390x_emit_bit_not): New function.
924 (s390x_emit_equal): New function.
925 (s390x_emit_less_signed): New function.
926 (s390x_emit_less_unsigned): New function.
927 (s390x_emit_ref): New function.
928 (s390x_emit_if_goto): New function.
929 (s390x_emit_const): New function.
930 (s390x_emit_call): New function.
931 (s390x_emit_reg): New function.
932 (s390x_emit_pop): New function.
933 (s390x_emit_stack_flush): New function.
934 (s390x_emit_zero_ext): New function.
935 (s390x_emit_swap): New function.
936 (s390x_emit_stack_adjust): New function.
937 (s390x_emit_int_call_1): New function.
938 (s390x_emit_void_call_2): New function.
939 (s390x_emit_eq_goto): New function.
940 (s390x_emit_ne_goto): New function.
941 (s390x_emit_lt_goto): New function.
942 (s390x_emit_le_goto): New function.
943 (s390x_emit_gt_goto): New function.
944 (s390x_emit_ge_goto): New function.
945 (s390_emit_ops): New function.
946 (struct linux_target_ops): Fill in emit_ops hook.
947
abd9baf9
MK
9482016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
949
950 PR 18377
951 * Makefile.in: Add s390 IPA files.
952 * configure.srv: Build IPA for s390.
953 * linux-s390-ipa.c: New file.
954 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
955 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
956 (tdesc_s390_linux32): Likewise.
957 (init_registers_s390_linux32v1): Likewise.
958 (tdesc_s390_linux32v1): Likewise.
959 (init_registers_s390_linux32v2): Likewise.
960 (tdesc_s390_linux32v2): Likewise.
961 (init_registers_s390_linux64): Likewise.
962 (tdesc_s390_linux64): Likewise.
963 (init_registers_s390_linux64v1): Likewise.
964 (tdesc_s390_linux64v1): Likewise.
965 (init_registers_s390_linux64v2): Likewise.
966 (tdesc_s390_linux64v2): Likewise.
967 (init_registers_s390_te_linux64): Likewise.
968 (tdesc_s390_te_linux64): Likewise.
969 (init_registers_s390_vx_linux64): Likewise.
970 (tdesc_s390_vx_linux64): Likewise.
971 (init_registers_s390_tevx_linux64): Likewise.
972 (tdesc_s390_tevx_linux64): Likewise.
973 (init_registers_s390x_linux64): Likewise.
974 (tdesc_s390x_linux64): Likewise.
975 (init_registers_s390x_linux64v1): Likewise.
976 (tdesc_s390x_linux64v1): Likewise.
977 (init_registers_s390x_linux64v2): Likewise.
978 (tdesc_s390x_linux64v2): Likewise.
979 (init_registers_s390x_te_linux64): Likewise.
980 (tdesc_s390x_te_linux64): Likewise.
981 (init_registers_s390x_vx_linux64): Likewise.
982 (tdesc_s390x_vx_linux64): Likewise.
983 (init_registers_s390x_tevx_linux64): Likewise.
984 (tdesc_s390x_tevx_linux64): Likewise.
985 (have_hwcap_s390_vx): New static variable.
986 (s390_arch_setup): Fill have_hwcap_s390_vx.
987 (s390_get_thread_area): New function.
988 (s390_ft_entry_gpr_esa): New const.
989 (s390_ft_entry_gpr_zarch): New const.
990 (s390_ft_entry_misc): New const.
991 (s390_ft_entry_fr): New const.
992 (s390_ft_entry_vr): New const.
993 (s390_ft_main_31): New const.
994 (s390_ft_main_64): New const.
995 (s390_ft_exit_fr): New const.
996 (s390_ft_exit_vr): New const.
997 (s390_ft_exit_misc): New const.
998 (s390_ft_exit_gpr_esa): New const.
999 (s390_ft_exit_gpr_zarch): New const.
1000 (append_insns): New function.
1001 (s390_relocate_instruction): New function.
1002 (s390_install_fast_tracepoint_jump_pad): New function.
1003 (s390_get_min_fast_tracepoint_insn_len): New function.
1004 (s390_get_ipa_tdesc_idx): New function.
1005 (struct linux_target_ops): Wire in the above functions.
1006 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1007 * linux-s390-tdesc.h: New file.
1008
a4105d04
MK
10092016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1010
1011 * linux-s390-low.c (s390_supports_tracepoints): New function.
1012 (struct linux_target_ops): Fill supports_tracepoints hook.
1013
35ac8b3e
YQ
10142016-03-18 Yao Qi <yao.qi@linaro.org>
1015
1016 * linux-low.c (lwp_signal_can_be_delivered): New function.
1017 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1018
94610ec4
YQ
10192016-03-18 Yao Qi <yao.qi@linaro.org>
1020
1021 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1022 0 if signal is enqueued. Remove 'signal' from one debugging
1023 message. Move one debugging message to some lines below.
1024 Remove code setting 'signal' to 0.
1025
80aea927
YQ
10262016-03-18 Yao Qi <yao.qi@linaro.org>
1027
1028 * linux-low.c (linux_low_filter_event): Remove redundant
1029 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1030
b04fd3be
MK
10312016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1032
1033 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1034 (struct linux_target_ops): Wire in the above.
1035
c40c8d4b
YQ
10362016-03-03 Yao Qi <yao.qi@linaro.org>
1037
1038 * linux-low.c: Update comments to start_step_over.
1039
0f8288ae
YQ
10402016-03-03 Yao Qi <yao.qi@linaro.org>
1041
1042 PR server/19736
1043 * linux-low.c (handle_extended_wait): Set child suspended
1044 if event_lwp->bp_reinsert isn't zero.
1045
fdbd04a8
YQ
10462016-03-02 Yao Qi <yao.qi@linaro.org>
1047
1048 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1049 enqueue_pending_signal.
1050
6896a8fa
MK
10512016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1052
1053 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1054 is actually loaded.
1055
ab503087
MK
10562016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1057
1058 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1059 (s390_regmap_3264) [!__s390x__]: New global.
1060 (s390_collect_ptrace_register): Skip map entries containing -1.
1061 (s390_supply_ptrace_register): Ditto.
1062 (s390_fill_gprs_high): New function.
1063 (s390_store_gprs_high): New function.
1064 (s390_regsets): Add NT_S390_HIGH_GPRS.
1065 (s390_get_hwcap): Enable on 31-bit.
1066 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1067 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1068 Detect NT_S390_HIGH_GPRS.
1069 (s390_usrregs_info_3264): Enable on 31-bit.
1070 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1071 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1072
ae91f625
MK
10732016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1074
1075 PR gdb/13808
1076 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1077 * configure.srv: Ditto.
1078 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1079 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1080 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1081 (init_registers_amd64_linux): Remove prototype.
1082 (tdesc_amd64_linux): Remove declaration.
1083 (get_ipa_tdesc): New function.
1084 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1085 initialize remaining tdescs.
1086 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1087 (init_registers_i386_linux): Remove prototype.
1088 (tdesc_i386_linux): Remove declaration.
1089 (get_ipa_tdesc): New function.
1090 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1091 initialize remaining tdescs.
1092 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1093 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1094 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1095 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1096 (x86_get_ipa_tdesc_idx): New function.
1097 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1098 * linux-x86-tdesc.h: New file.
1099 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1100 (target_get_ipa_tdesc_idx): New macro.
1101 * tracepoint.c (ipa_tdesc_idx): New macro.
1102 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1103 (symbol_list): Add ipa_tdesc_idx.
1104 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1105 (ipa_tdesc): Remove.
1106 (ipa_tdesc_idx): New variable.
1107 (get_context_regcache): Use get_ipa_tdesc.
1108 (gdb_collect): Ditto.
1109 (gdb_probe): Ditto.
1110 * tracepoint.h (get_ipa_tdesc): New prototype.
1111 (ipa_tdesc): Remove.
1112
e7ad2f14
PA
11132016-02-24 Pedro Alves <palves@redhat.com>
1114
1115 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1116 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1117 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1118 Factor out common code between the USE_SIGTRAP_SIGINFO and
1119 !USE_SIGTRAP_SIGINFO blocks.
1120 (linux_low_filter_event): Call save_stop_reason instead of
1121 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1122 Update comments.
1123 (linux_wait_1): Update comments.
1124
657f9cde
WW
11252016-02-24 Wei-cheng Wang <cole945@gmail.com>
1126
1127 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1128 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1129 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1130 ppc_insert_point, ppc_remove_point.
1131
b00b61e1
MK
11322016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1133
1134 * linux-s390-low.c (s390_supports_z_point_type): New function.
1135 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1136
553cb527
YQ
11372016-02-16 Yao Qi <yao.qi@linaro.org>
1138
1139 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1140 PC. Get pc from regcache_read_pc.
1141
a5652c21
YQ
11422016-02-12 Yao Qi <yao.qi@linaro.org>
1143
1144 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1145 or linux_get_pc_32bit.
1146 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1147
ed443b61
YQ
11482016-02-12 Yao Qi <yao.qi@linaro.org>
1149
1150 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1151 arm_linux_get_next_pcs_fixup.
1152
020ecd38
MK
11532016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1154
1155 * tracepoint.c (x_tracepoint_action_download): Change
1156 write_inferior_data_ptr to write_inferior_data_pointer.
1157 (cmd_qtstart): Likewise.
1158 (write_inferior_data_ptr): Remove.
1159 (download_agent_expr): Change write_inferior_data_ptr to
1160 write_inferior_data_pointer.
1161 (download_tracepoint_1): Likewise.
1162 (download_tracepoint): Likewise.
1163 (download_trace_state_variables): Likewise.
1164
7cae9051
WW
11652016-02-11 Wei-cheng Wang <cole945@gmail.com>
1166 Marcin Kościelnicki <koriakin@0x04.net>
1167
1168 * tracepoint.c (struct tracepoint_action_ops): Remove.
1169 (struct tracepoint_action): Remove ops.
1170 (m_tracepoint_action_download, r_tracepoint_action_download)
1171 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1172 size and offset accordingly.
1173 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1174 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1175 (tracepoint_action_send, tracepoint_action_download): New functions.
1176 Helpers for trace action handlers.
1177 (add_tracepoint_action): Remove setup actions ops.
1178 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1179
9f6a71b4
YQ
11802016-02-10 Yao Qi <yao.qi@linaro.org>
1181
1182 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1183
1e94266c
SM
11842016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1185
1186 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1187 to AC_OUTPUT.
1188 * configure: Regenerate.
1189
8adce034
SM
11902016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1191
1192 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1193 void * to gdb_byte *.
1194 * linux-low.c (siginfo_fixup): Likewise.
1195 (linux_xfer_siginfo): Likewise.
1196 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1197 Likewise.
1198 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1199
93813b37
WT
12002016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1201
1202 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1203 to srv_tgtobj.
1204 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1205 to srv_tgtobj.
1206 * linux-x86-low.c [__x86_64__]: Include
1207 "nat/amd64-linux-siginfo.h".
1208 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1209 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1210 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1211 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1212 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1213 (cpt_si_fd, si_timerid, si_overrun): Move from
1214 nat/amd64-linux-siginfo.c.
1215 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1216
8424cc97
SM
12172016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1218
1219 * server.c (skip_to_semicolon): Remove.
1220 (process_point_options): Use strchrnul instead of
1221 skip_to_semicolon.
1222
4d18591b
YQ
12232016-01-26 Yao Qi <yao.qi@linaro.org>
1224
1225 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1226 * linux-low.c (install_software_single_step_breakpoints): Don't
1227 call regcache_read_pc.
1228 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1229 argument pc.
1230
d8020970
YQ
12312016-01-26 Yao Qi <yao.qi@linaro.org>
1232
1233 * linux-low.c (install_software_single_step_breakpoints): Call
1234 regcache_read_pc instead of get_pc.
1235
8b207339
YQ
12362016-01-26 Yao Qi <yao.qi@linaro.org>
1237
1238 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1239 (unblock_async_io): Rename to ...
1240 (block_unblock_async_io): ... it. New function.
1241 (enable_async_io): Don't install SIGIO handler. Unblock it
1242 instead.
1243 (disable_async_io): Don't ignore SIGIO. Block it instead.
1244 (initialize_async_io): Install SIGIO handler. Don't call
1245 unblock_async_io.
1246
18879fef
YQ
12472016-01-26 Yao Qi <yao.qi@linaro.org>
1248
1249 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1250 first character is '\003', call *the_target->request_interrupt.
1251
a0f8e08a
YQ
12522016-01-25 Yao Qi <yao.qi@linaro.org>
1253
1254 * remote-utils.c (new_thread_notify): Remove.
1255 (dead_thread_notify): Likewise.
1256 * remote-utils.h (new_thread_notify): Remove declaration.
1257 (dead_thread_notify): Likewise.
1258
cc5fd9ab
MK
12592016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1260
1261 * gdb.trace/pending.exp: Fix expected message on continue.
1262
99e8eb11
MK
12632016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1264
1265 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1266 it works properly on big-endian machines where sizeof (CORE_ADDR)
1267 != sizeof (void *).
1268
a994041d
PA
12692016-01-21 Pedro Alves <palves@redhat.com>
1270
1271 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1272 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1273 * configure: Regenerate.
1274
f7a6a40d
YQ
12752016-01-21 Yao Qi <yao.qi@linaro.org>
1276
1277 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1278 is_thumb and set it according to CPSR saved on the stack.
1279 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1280 arm_sigreturn_next_pc.
1281
6f69e520
YQ
12822016-01-18 Yao Qi <yao.qi@linaro.org>
1283
1284 * linux-low.c (linux_set_pc_64bit): New function.
1285 (linux_get_pc_64bit): New function.
1286 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1287 Declare.
1288 * linux-sparc-low.c (debug_threads): Remove declaration.
1289 (sparc_get_pc): Remove.
1290 (the_low_target): Use linux_get_pc_64bit instead of
1291 sparc_get_pc.
1292 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1293 (the_low_target): Use linux_get_pc_64bit and
1294 linux_set_pc_64bit.
1295
276d4552
YQ
12962016-01-18 Yao Qi <yao.qi@linaro.org>
1297
1298 * linux-arm-low.c (debug_threads): Remove declaration.
1299 (arm_get_pc, arm_set_pc): Remove.
1300 (the_low_target): Use linux_get_pc_32bit and
1301 linux_set_pc_32bit.
1302 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1303 (the_low_target): Use linux_get_pc_32bit and
1304 linux_set_pc_32bit.
1305 * linux-cris-low.c (debug_threads): Remove declaration.
1306 (cris_get_pc, cris_set_pc,): Remove.
1307 (the_low_target): Use linux_get_pc_32bit and
1308 linux_set_pc_32bit.
1309 * linux-crisv32-low.c (debug_threads): Remove declaration.
1310 (cris_get_pc, cris_set_pc): Remove.
1311 (the_low_target): Use linux_get_pc_32bit and
1312 linux_set_pc_32bit.
1313 * linux-low.c: Include inttypes.h.
1314 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1315 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1316 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1317 (the_low_target): Use linux_get_pc_32bit and
1318 linux_set_pc_32bit.
1319 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1320 (the_low_target): Use linux_get_pc_32bit and
1321 linux_set_pc_32bit.
1322 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1323 (the_low_target): Use linux_get_pc_32bit and
1324 linux_set_pc_32bit.
1325 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1326 (the_low_target): Use linux_get_pc_32bit and
1327 linux_set_pc_32bit.
1328 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1329 (the_low_target): Use linux_get_pc_32bit and
1330 linux_set_pc_32bit.
1331
eb0edac8
GB
13322016-01-18 Gary Benson <gbenson@redhat.com>
1333
1334 * configure.ac (AC_FUNC_FORK): New check.
1335 * config.in: Regenerate.
1336 * configure: Likewise.
1337
1b451dda
YQ
13382016-01-14 Yao Qi <yao.qi@linaro.org>
1339
1340 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1341 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1342 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1343 arm_get_next_pcs_ctor.
1344
82075af2
JS
13452016-01-12 Josh Stone <jistone@redhat.com>
1346 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1347
1348 * inferiors.h: Include "gdb_vecs.h".
1349 (struct process_info): Add syscalls_to_catch.
1350 * inferiors.c (remove_process): Free syscalls_to_catch.
1351 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1352 syscall_return stops.
1353 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1354 * server.c (handle_general_set): Handle QCatchSyscalls.
1355 (handle_query): Report support for QCatchSyscalls.
1356 * target.h (struct target_ops): Add supports_catch_syscall.
1357 (target_supports_catch_syscall): New macro.
1358 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1359 (struct lwp_info): Add syscall_state.
1360 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1361 Maintain syscall_state and syscalls_to_catch across exec.
1362 (get_syscall_trapinfo): New function, proxy to the_low_target.
1363 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1364 (linux_low_filter_event): Toggle syscall_state entry/return for
1365 syscall traps, and set it ignored for all others.
1366 (gdb_catching_syscalls_p): New function.
1367 (gdb_catch_this_syscall_p): New function.
1368 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1369 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1370 (linux_supports_catch_syscall): New function.
1371 (linux_target_ops): Install it.
1372 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1373 (the_low_target): Install it.
1374
8f13a3ce
MF
13752016-01-12 Mike Frysinger <vapier@gentoo.org>
1376
1377 * acinclude.m4: Include new ../warning.m4 file.
1378 * configure: Regenerated.
1379 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1380
5b3da067
MF
13812016-01-12 Mike Frysinger <vapier@gentoo.org>
1382
1383 * ax.c (is_goto_target): Mark static.
1384 * linux-low.c (register_addr): Likewise.
1385 (linux_fetch_registers, linux_store_registers): Likewise.
1386 * mem-break.c (any_persistent_commands): Fix old prototype.
1387 (add_commands_to_breakpoint): Mark static.
1388 * regcache.c (find_register_by_name): Delete unused func.
1389 * remote-utils.c (hex_or_minus_one): Mark static.
1390 * server.c (monitor_show_help): Mark static.
1391 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1392 handle_v_requests): Likewise.
1393
bc504a31
PA
13942016-01-12 Pedro Alves <palves@redhat.com>
1395
1396 Remove use of the registered trademark symbol throughout.
1397
5a0dd67a
YQ
13982016-01-08 Yao Qi <yao.qi@linaro.org>
1399
1400 * remote-utils.c (getpkt): If c is '\003', call target hook
1401 request_interrupt.
1402
b2ca446f
YQ
14032016-01-06 Yao Qi <yao.qi@linaro.org>
1404
1405 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1406 linux-aarch32-low.c.
1407 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1408 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1409 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1410 (thumb2_breakpoint): Declare.
1411 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1412 linux-aarch32-low.h.
1413 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1414 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1415 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1416
edd88788
JB
14172016-01-01 Joel Brobecker <brobecker@adacore.com>
1418
1419 * gdbreplay.c (gdbreplay_version): Change copyright year in
1420 version message.
1421 * server.c (gdbserver_version): Likewise.
1422
65da7f14
PP
14232015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1424
1425 * server.c (crc32_table): Delete.
1426 (crc32): Use libiberty's xcrc32 function.
1427
4abd5ed2
JB
14282015-12-22 Joel Brobecker <brobecker@adacore.com>
1429
1430 * lynx-low.c (lynx_delete_thread_callback): New function.
1431 (lynx_mourn): Properly delete our process and all of its
1432 threads. Remove call to clear_inferiors.
1433
0e50fe5c
JB
14342015-12-22 Joel Brobecker <brobecker@adacore.com>
1435
1436 * target.c (thread_search_callback): Add check that
1437 the thread_stopped target callback is not NULL before
1438 calling it.
1439
35adc03f
YQ
14402015-12-21 Yao Qi <yao.qi@linaro.org>
1441
1442 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1443 arm breakpoint.
1444
bd2b2909
AT
14452015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1446
1447 * server.c (handle_query): Call target_supports_software_single_step.
1448
7fe5e27e
AT
14492015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1450
1451 * linux-low.c (single_step): New function.
1452 (linux_resume_one_lwp_throw): Call single_step.
1453 (start_step_over): Likewise.
1454
d9311bfa
AT
14552015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1456
1457 * Makefile.in (SFILES): Append arch/arm-linux.c,
1458 arch/arm-get-next-pcs.c.
1459 (arm-linux.o): New rule.
1460 (arm-get-next-pcs.o): New rule.
1461 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1462 arm-linux.o.
1463 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1464 to linux-aarch32-low.c.
1465 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1466 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1467 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1468 (thumb2_breakpoint_len): Likewise.
1469 (arm_is_thumb_mode): Make non-static.
1470 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1471 from linux-aarch32-low.c.
1472 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1473 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1474 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1475 (thumb2_breakpoint_len): Likewise.
1476 (arm_is_thumb_mode): New declaration.
1477 * linux-arm-low.c: Include arch/arm-linux.h
1478 aarch/arm-get-next-pcs.h, sys/syscall.h.
1479 (get_next_pcs_ops): New struct.
1480 (get_next_pcs_addr_bits_remove): New function.
1481 (get_next_pcs_is_thumb): New function.
1482 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1483 (arm_sigreturn_next_pc): Likewise.
1484 (get_next_pcs_syscall_next_pc): Likewise.
1485 (arm_gdbserver_get_next_pcs): Likewise.
1486 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1487 Initialize.
1488 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1489 * server.h: Include gdb_vecs.h.
1490
68ce2059
AT
14912015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1492
1493 * Makefile.in (SFILES): Append common/common-regcache.c.
1494 (OBS): Append common-regcache.o.
1495 (common-regcache.o): New rule.
1496 * regcache.c (init_register_cache): Initialize cache to
1497 REG_UNAVAILABLE.
1498 (regcache_raw_read_unsigned): New function.
1499 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1500 register_status enum.
1501
fa5308bd
AT
15022015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1503
1504 * linux-aarch64-low.c (the_low_targets): Rename
1505 breakpoint_reinsert_addr to get_next_pcs.
1506 * linux-arm-low.c (the_low_targets): Likewise.
1507 * linux-bfin-low.c (the_low_targets): Likewise.
1508 * linux-cris-low.c (the_low_targets): Likewise.
1509 * linux-crisv32-low.c (the_low_targets): Likewise.
1510 * linux-low.c (can_software_single_step): Likewise.
1511 (install_software_single_step_breakpoints): New function.
1512 (start_step_over): Use install_software_single_step_breakpoints.
1513 * linux-low.h: New CORE_ADDR vector.
1514 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1515 get_next_pcs.
1516 * linux-mips-low.c (the_low_targets): Likewise.
1517 * linux-nios2-low.c (the_low_targets): Likewise.
1518 * linux-sparc-low.c (the_low_targets): Likewise.
1519
4a6ed09b
PA
15202015-12-17 Pedro Alves <palves@redhat.com>
1521
1522 * linux-low.c (linux_kill_one_lwp): Remove references to
1523 LinuxThreads.
1524 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1525 to 'kill'.
1526 (linux_init_signals): Delete.
1527 (initialize_low): Adjust.
1528 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1529
7544db95
PA
15302015-12-16 Pedro Alves <palves@redhat.com>
1531
1532 * configure.ac (compiler warning flags): When testing a
1533 -Wno-foo option, check whether -Wfoo works instead.
1534 * configure: Regenerate.
1535
8020350c
DB
15362015-12-11 Don Breazeal <donb@codesourcery.com>
1537
1538 * server.c (process_serial_event): Don't exit from gdbserver
1539 in remote mode if there are still active inferiors.
1540
db91f502
YQ
15412015-12-11 Yao Qi <yao.qi@linaro.org>
1542
1543 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1544 arm_breakpoint_at if the process is 32-bit.
1545
b37a6290
YQ
15462015-12-11 Yao Qi <yao.qi@linaro.org>
1547
1548 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1549 arm breakpoint.
1550
17b1509a
YQ
15512015-12-07 Yao Qi <yao.qi@linaro.org>
1552
1553 * configure.srv: Append arm.o to srv_tgtobj for
1554 aarch64*-*-linux* target.
1555 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1556 from linux-arm-low.c.
1557 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1558 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1559 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1560 (thumb2_breakpoint_len): Likewise.
1561 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1562 (arm_breakpoint_kinds): Likewise.
1563 (arm_breakpoint_kind_from_pc): Likewise.
1564 (arm_sw_breakpoint_from_kind): Likewise.
1565 (arm_breakpoint_kind_from_current_state): Likewise.
1566 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1567 (arm_sw_breakpoint_from_kind): Declare.
1568 (arm_breakpoint_kind_from_current_state): Declare.
1569 (arm_breakpoint_at): Declare.
1570 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1571 arm_sw_breakpoint_from_kind if process is 32-bit.
1572 (aarch64_breakpoint_kind_from_pc): New function.
1573 (aarch64_breakpoint_kind_from_current_state): New function.
1574 (the_low_target): Initialize fields breakpoint_kind_from_pc
1575 and breakpoint_kind_from_current_state.
1576 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1577 linux-aarch32-low.c.
1578 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1579 (arm_breakpoint, arm_breakpoint_len): Likewise.
1580 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1581 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1582 (arm_is_thumb_mode): Likewise.
1583 (arm_breakpoint_at): Likewise.
1584 (arm_breakpoint_kind_from_pc): Likewise.
1585 (arm_sw_breakpoint_from_kind): Likewise.
1586 (arm_breakpoint_kind_from_current_state): Likewise.
1587
1588 Revert:
1589 2015-08-04 Yao Qi <yao.qi@linaro.org>
1590
1591 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1592 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1593 * server.c (extended_protocol): Remove "static".
1594 * server.h (extended_protocol): Declare it.
1595
ece66d65
JS
15962015-12-04 Josh Stone <jistone@redhat.com>
1597
1598 * target.h (struct target_ops) <arch_setup>: Rename to ...
1599 (struct target_ops) <post_create_inferior>: ... this.
1600 (target_arch_setup): Rename to ...
1601 (target_post_create_inferior): ... this, calling post_create_inferior.
1602 * server.c (start_inferior): Update target_arch_setup calls to
1603 target_post_create_inferior.
1604 * linux-low.c (linux_low_ptrace_options): Forward declare.
1605 (linux_arch_setup): Update its comment for general use.
1606 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1607 (struct linux_target_ops): Use linux_post_create_inferior.
1608 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1609 to post_create_inferior.
1610 * nto-low.c (struct nto_target_ops): Likewise.
1611 * spu-low.c (struct spu_target_ops): Likewise.
1612 * win32-low.c (struct win32_target_ops): Likewise.
1613
e58c48b4
AT
16142015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1615
1616 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1617
fbec8956
AT
16182015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1619
1620 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1621 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1622 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1623 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1624 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1625 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1626 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1627 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1628 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1629 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1630 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1631 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1632
9b4c5f87
AT
16332015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1634
1635 * linux-low.c (linux_look_up_symbols): Don't call
1636 linux_supports_traceclone.
1637 * linux-low.h (thread_db_init): Remove use_events argument.
1638 * thread-db.c (thread_db_use_event): Remove global variable.
1639 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1640 (struct thread_db) <td_create_bp>: Remove field.
1641 (thread_db_create_event): Remove function.
1642 (thread_db_enable_reporting): Likewise.
1643 (find_one_thread): Don't check for thread_db_use_events.
1644 (attach_thread): Likewise.
1645 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1646 (try_thread_db_load_1): Don't check for thread_db_use_events.
1647 (thread_db_init): Remove use_events argument and thread events
1648 handling.
1649 (remove_thread_event_breakpoints): Remove function.
1650 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1651
7d00775e
AT
16522015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1653
1654 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1655 New function.
1656 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1657 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1658 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1659 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1660 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1661 Initialize.
1662 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1663 New function.
1664 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1665 * linux-low.c (can_hardware_single_step): Use
1666 supports_hardware_single_step.
1667 (can_software_single_step): New function.
1668 (start_step_over): Call can_software_single_step.
1669 (linux_supports_hardware_single_step): New function.
1670 (struct target_ops) <supports_software_single_step>: Initialize.
1671 * linux-low.h (struct linux_target_ops)
1672 <supports_hardware_single_step>: Initialize.
1673 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1674 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1675 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1676 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1677 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1678 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1679 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1680 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1681 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1682 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1683 Initialize.
1684 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1685 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1686 Initialize.
1687 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1688 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1689 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1690 New function.
1691 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1692 * target.h (struct target_ops): <supports_software_single_step>:
1693 New field.
1694 (target_supports_software_single_step): New macro.
1695
2d97cd35
AT
16962015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1697
1698 * linux-low.c (linux_wait_1): Fix pc advance condition.
1699 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1700 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1701
769ef81f
AT
17022015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1703
1704 * linux-arm-low.c (arm_is_thumb_mode): New function.
1705 (arm_breakpoint_at): Use arm_is_thumb_mode.
1706 (arm_breakpoint_kind_from_current_state): New function.
1707 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1708 Initialize.
1709 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1710 (linux_breakpoint_kind_from_current_state): New function.
1711 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1712 * linux-low.h (struct linux_target_ops)
1713 <breakpoint_kind_from_current_state>: New field.
1714 * target.h (struct target_ops): Likewise.
1715 (target_breakpoint_kind_from_current_state): New macro.
1716
1bebeeca
PA
17172015-11-30 Pedro Alves <palves@redhat.com>
1718
1719 * linux-low.c (linux_resume): Wake up the event loop before
1720 returning.
1721
a67a9fae
PA
17222015-11-30 Pedro Alves <palves@redhat.com>
1723
1724 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1725 check.
1726 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1727 to -1.
1728 * target.c (struct thread_search): New structure.
1729 (thread_search_callback): New function.
1730 (prev_general_thread): New global.
1731 (prepare_to_access_memory, done_accessing_memory): New functions.
1732 * target.h (prepare_to_access_memory, done_accessing_memory):
1733 Replace macros with function declarations.
1734
f2faf941
PA
17352015-11-30 Pedro Alves <palves@redhat.com>
1736
1737 PR 14618
1738 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1739 report TARGET_WAITKIND_NO_RESUMED.
1740 * remote-utils.c (prepare_resume_reply): Handle
1741 TARGET_WAITKIND_NO_RESUMED.
1742 * server.c (report_no_resumed): New global.
1743 (handle_query) <qSupported>: Handle "no-resumed+". Report
1744 "no-resumed+" support.
1745 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1746 return error if the client doesn't support no-resumed events.
1747 (push_stop_notification): New function.
1748 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1749 events if the client supports them.
1750
a681f9c9
PA
17512015-11-30 Pedro Alves <palves@redhat.com>
1752
1753 * linux-low.c (thread_still_has_status_pending_p): Don't check
1754 vCont;t here.
1755 (lwp_resumed): New function.
1756 (status_pending_p_callback): Return early if the LWP is not
1757 supposed to be resumed.
1758
65706a29
PA
17592015-11-30 Pedro Alves <palves@redhat.com>
1760
1761 * linux-low.c (handle_extended_wait): Assert that the LWP's
1762 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1763 thread create events, leave the new child's status pending.
1764 (linux_low_filter_event): If GDB wants to hear about thread exit
1765 events, leave the LWP marked dead and don't delete it.
1766 (linux_wait_for_event_filtered): Don't check for thread exit.
1767 (filter_exit_event): New function.
1768 (linux_wait_1): Use it, when returning an exit event.
1769 (linux_resume_one_lwp_throw): Assert that the LWP's
1770 waitstatus is TARGET_WAITKIND_IGNORE.
1771 * remote-utils.c (prepare_resume_reply): Handle
1772 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1773 * server.c (report_thread_events): New global.
1774 (handle_general_set): Handle QThreadEvents.
1775 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1776 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1777 TARGET_WAITKIND_THREAD_EXITED.
1778 * server.h (report_thread_events): Declare.
1779
56cf4bed
PA
17802015-11-30 Pedro Alves <palves@redhat.com>
1781
1782 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1783 the thread's last_resume_kind was resume_stop.
1784
500c1d85
PA
17852015-11-30 Pedro Alves <palves@redhat.com>
1786
1787 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1788 before returning.
1789
de979965
PA
17902015-11-30 Pedro Alves <palves@redhat.com>
1791
1792 * server.c (handle_v_requests): Handle vCtrlC.
1793
34c65914
PA
17942015-11-30 Pedro Alves <palves@redhat.com>
1795
1796 * gdbthread.h (find_any_thread_of_pid): Declare.
1797 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1798 functions.
1799 * server.c (handle_query): If current_thread is NULL, look for
1800 another thread of the selected process.
1801
79efa585 18022015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 1803 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
1804
1805 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1806 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1807 name in reply.
1808 * target.h (struct target_ops) <thread_name>: New field.
1809 (target_thread_name): New macro.
1810
80d82c19
JB
18112015-11-23 Joel Brobecker <brobecker@adacore.com>
1812
1813 * regcache.h (regcache_invalidate_pid): Add declaration.
1814 * regcache.c (regcache_invalidate_pid): New function, extracted
1815 from regcache_invalidate.
1816 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1817 Add trivial documentation comment.
1818 * lynx-low.c: Use regcache_invalidate_pid instead of
1819 regcache_invalidate.
1820
64da5dd5
JB
18212015-11-23 Joel Brobecker <brobecker@adacore.com>
1822
1823 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1824 and Elf64_auxv_t if the target is Android.
1825
37ce4055
DE
18262015-11-22 Doug Evans <xdje42@gmail.com>
1827
1828 * target.h: #include <sys/types.h>.
1829
06e03fff
PA
18302015-11-19 Pedro Alves <palves@redhat.com>
1831
1832 * linux-low.c (linux_process_qsupported): Change prototype.
1833 Adjust.
1834 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1835 Change prototype.
1836 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1837 and adjust to loop over all features.
1838 * server.c (handle_query) <qSupported>: Adjust to call
1839 target_process_qsupported once, passing it a vector of unprocessed
1840 features.
1841 * target.h (struct target_ops) <process_qsupported>: Change
1842 prototype.
1843 (target_process_qsupported): Adjust.
1844
9a084706
PA
18452015-11-19 Pedro Alves <palves@redhat.com>
1846
1847 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1848 mode.
1849 * configure: Regenerate.
1850
dad44a1f
PA
18512015-11-19 Pedro Alves <palves@redhat.com>
1852
1853 * configure: Regenerate.
1854
231c0592
YQ
18552015-11-19 Yao Qi <yao.qi@linaro.org>
1856
1857 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1858 type to uint32_t.
1859
6c1c9a8b
YQ
18602015-11-19 Yao Qi <yao.qi@linaro.org>
1861
1862 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1863 (struct aarch64_operand): Move enum out.
1864
9caa3311
YQ
18652015-11-19 Yao Qi <yao.qi@linaro.org>
1866
1867 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1868 struct user_fpsimd_state *.
1869 (aarch64_store_fpregset): Likewise.
1870
6a69a054
YQ
18712015-11-19 Yao Qi <yao.qi@linaro.org>
1872
1873 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1874 struct user_pt_regs *.
1875 (aarch64_store_gregset): Likewise.
1876
1798301e
PA
18772015-11-18 Pedro Alves <palves@redhat.com>
1878
1879 * Makefile.in (all_object_files): Add $IPA_OBJS.
1880
ce7715e2
PA
18812015-11-17 Pedro Alves <palves@redhat.com>
1882
1883 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1884 GDB_SIGNAL_0 and gdb_signal_to_string.
1885
c0879059
PA
18862015-11-17 Pedro Alves <palves@redhat.com>
1887
1888 * win32-low.c (handle_output_debug_string): Remove parameter.
1889 (win32_kill): Remove our_status local and adjust call to
1890 handle_output_debug_string.
1891 (get_child_debug_event): Adjust call to
1892 handle_output_debug_string.
1893
1996e237
SM
18942015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1895
1896 * linux-mips-low.c (mips_fill_gregset): Add cast.
1897 (mips_store_gregset): Likewise.
1898 (mips_fill_fpregset): Likewise.
1899 (mips_store_fpregset): Likewise.
1900
cbec665b
SM
19012015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1902
1903 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1904 priv.
1905
eb3e3c67
SM
19062015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1907
1908 * linux-mips-low.c (mips_linux_new_thread): Change type of
1909 watch_type to enum target_hw_bp_type.
1910
171de4b8
SM
19112015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1912
1913 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1914 Change return type to arm_hwbp_type.
1915
04248ead
SM
19162015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1917
1918 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1919 (arm_store_gregset): Likewise.
1920 * linux-arm-low.c (arm_get_hwcap): Likewise.
1921 (arm_read_description): Likewise.
1922
04b3479c
SM
19232015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1924
1925 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1926
2bc84e8a
SM
19272015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1928
1929 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1930 (ppc_fill_vsxregset): Likewise.
1931 (ppc_store_vsxregset): Likewise.
1932 (ppc_fill_vrregset): Likewise.
1933 (ppc_store_vrregset): Likewise.
1934 (ppc_fill_evrregset): Likewise.
1935 (ppc_store_evrregset): Likewise.
1936
e6c5bb05
SM
19372015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1938
1939 * linux-ppc-low.c (ppc_usrregs_info): Remove
1940 forward-declaration.
1941 (ppc_arch_setup): Move lower in file.
1942
7ea45d72
SM
19432015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1944
1945 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1946 (ps_pdwrite): Likewise.
1947
69291610
HW
19482015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1949
1950 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1951 to after assert checks.
1952
b42945fd
SM
19532015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1954
1955 * proc-service.c (ps_pdread): Add/adjust casts.
1956 (ps_pdwrite): Add/adjust casts.
1957
d6f85c84
SM
19582015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1959
1960 * server.c (handle_search_memory_1): Cast return value of
1961 memmem.
1962
f98cd059
SM
19632015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1964
1965 * server.c (write_qxfer_response): Change type of data to
1966 gdb_byte *.
1967
d2412fa5
PA
19682015-10-29 Pedro Alves <palves@redhat.com>
1969
1970 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1971
c17414a2
PA
19722015-10-29 Pedro Alves <palves@redhat.com>
1973
1974 * tracepoint.c (clear_installed_tracepoints): Add casts.
1975
e053fbc4
PA
19762015-10-29 Pedro Alves <palves@redhat.com>
1977
1978 * server.c (handle_v_cont, process_serial_event): Add enum
1979 gdb_signal casts to signal parsing code.
1980
add67df8
PA
19812015-10-29 Pedro Alves <palves@redhat.com>
1982
1983 * linux-low.h (NULL_REGSET): Define.
1984 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1985 * linux-arm-low.c (arm_regsets): Likewise.
1986 * linux-crisv32-low.c (cris_regsets): Likewise.
1987 * linux-m68k-low.c (m68k_regsets): Likewise.
1988 * linux-mips-low.c (mips_regsets): Likewise.
1989 * linux-nios2-low.c (nios2_regsets): Likewise.
1990 * linux-ppc-low.c (ppc_regsets): Likewise.
1991 * linux-s390-low.c (s390_regsets): Likewise.
1992 * linux-sh-low.c (sh_regsets): Likewise.
1993 * linux-sparc-low.c (sparc_regsets): Likewise.
1994 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1995 * linux-tile-low.c (tile_regsets): Likewise.
1996 * linux-x86-low.c (x86_regsets): Likewise.
1997 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1998
50bc912a
PA
19992015-10-29 Pedro Alves <palves@redhat.com>
2000
2001 * linux-low.h (NULL_REGSET): Define.
2002 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2003 * linux-arm-low.c (arm_regsets): Likewise.
2004 * linux-crisv32-low.c (cris_regsets): Likewise.
2005 * linux-m68k-low.c (m68k_regsets): Likewise.
2006 * linux-mips-low.c (mips_regsets): Likewise.
2007 * linux-nios2-low.c (nios2_regsets): Likewise.
2008 * linux-ppc-low.c (ppc_regsets): Likewise.
2009 * linux-s390-low.c (s390_regsets): Likewise.
2010 * linux-sh-low.c (sh_regsets): Likewise.
2011 * linux-sparc-low.c (sparc_regsets): Likewise.
2012 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2013 * linux-tile-low.c (tile_regsets): Likewise.
2014 * linux-x86-low.c (x86_regsets): Likewise.
2015 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2016
682b2546
DE
20172015-10-26 Doug Evans <dje@google.com>
2018
2019 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2020
963843d4
DE
20212015-10-26 Doug Evans <dje@google.com>
2022
2023 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2024
d41401ac
DE
20252015-10-26 Doug Evans <dje@google.com>
2026
2027 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2028 for debug_printf.
2029 (attach_thread, find_new_threads_callback): Ditto.
2030
3db28855
AT
20312015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2032
2033 * mem-break.h (set_breakpoint_data): Remove.
2034
fb78e89c
AT
20352015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2036
2037 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2038 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2039 (initialize_low): Remove set_breakpoint_data call.
2040 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2041 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2042 (initialize_low): Remove set_breakpoint_data call.
2043 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2044 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2045 (initialize_low): Remove set_breakpoint_data call.
2046
2e6ee069
AT
20472015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2048
2049 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2050 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2051 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2052 * target.h (target_breakpoint_kind_from_pc): New macro.
2053
1652a986
AT
20542015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2055
2056 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2057 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2058 the default breakpoint kind.
2059
abeead09
AT
20602015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2061
2062 * linux-arm-low.c (arm_supports_z_point_type): Add software
2063 breakpoint support.
2064
b0b4b501
AT
20652015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2066
2067 * linux-arm-low.c: Refactor breakpoint definitions.
2068 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2069 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2070
8689682c
AT
20712015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2072
2073 * Makefile.in: Add arm.c/o.
2074 * configure.srv: Likewise.
2075 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2076 (arm_breakpoint_kind_from_pc): New function.
2077 (arm_sw_breakpoint_from_kind): Return proper kind.
2078 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2079
27165294
AT
20802015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2081
2082 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2083 removal.
2084 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2085 (struct raw_breakpoint) <size>: Remove.
2086 (struct raw_breakpoint) <kind>: Add.
2087 (bp_size): New function.
2088 (bp_opcode): Likewise.
2089 (find_raw_breakpoint_at): Adjust for kind.
2090 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2091 (remove_memory_breakpoint): Adjust for kind call bp_size.
2092 (set_raw_breakpoint_at): Adjust for kind.
2093 (set_breakpoint): Likewise.
2094 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2095 (delete_raw_breakpoint): Adjust for kind.
2096 (delete_breakpoint): Likewise.
2097 (find_gdb_breakpoint): Likewise.
2098 (set_gdb_breakpoint_1): Likewise.
2099 (set_gdb_breakpoint): Likewise.
2100 (delete_gdb_breakpoint_1): Likewise.
2101 (delete_gdb_breakpoint): Likewise.
2102 (uninsert_raw_breakpoint): Likewise.
2103 (reinsert_raw_breakpoint): Likewise.
2104 (set_breakpoint_data): Remove.
2105 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2106 (check_mem_read): Adjust for kind call bp_size.
2107 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2108 (clone_one_breakpoint): Adjust for kind.
2109 * mem-break.h (set_gdb_breakpoint): Likewise.
2110 (delete_gdb_breakpoint): Likewise.
2111 * server.c (process_serial_event): Likewise.
2112
dd373349
AT
21132015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2114
2115 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2116 (struct linux_target_ops) <breakpoint>: Remove.
2117 (struct linux_target_ops) <breakpoint_len>: Remove.
2118 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2119 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2120 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2121 (arm_sw_breakpoint_from_kind): New function.
2122 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2123 (struct linux_target_ops) <breakpoint>: Remove.
2124 (struct linux_target_ops) <breakpoint_len>: Remove.
2125 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2126 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2127 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2128 (struct linux_target_ops) <breakpoint>: Remove.
2129 (struct linux_target_ops) <breakpoint_len>: Remove.
2130 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2131 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2132 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2133 (struct linux_target_ops) <breakpoint>: Remove.
2134 (struct linux_target_ops) <breakpoint_len>: Remove.
2135 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2136 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2137 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2138 and sw_breakpoint_from_kind to increment the pc.
2139 (linux_breakpoint_kind_from_pc): New function.
2140 (linux_sw_breakpoint_from_kind): New function.
2141 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2142 (initialize_low): Call breakpoint_kind_from_pc and
2143 sw_breakpoint_from_kind to replace breakpoint_data/len.
2144 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2145 New field.
2146 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2147 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2148 (struct linux_target_ops) <breakpoint>: Remove.
2149 (struct linux_target_ops) <breakpoint_len>: Remove.
2150 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2151 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2152 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2153 (struct linux_target_ops) <breakpoint>: Remove.
2154 (struct linux_target_ops) <breakpoint_len>: Remove.
2155 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2156 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2157 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2158 (struct linux_target_ops) <breakpoint>: Remove.
2159 (struct linux_target_ops) <breakpoint_len>: Remove.
2160 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2161 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2162 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2163 (struct linux_target_ops) <breakpoint>: Remove.
2164 (struct linux_target_ops) <breakpoint_len>: Remove.
2165 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2166 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2167 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2168 (struct linux_target_ops) <breakpoint>: Remove.
2169 (struct linux_target_ops) <breakpoint_len>: Remove.
2170 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2171 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2172 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2173 (struct linux_target_ops) <breakpoint>: Remove.
2174 (struct linux_target_ops) <breakpoint_len>: Remove.
2175 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2176 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2177 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2178 (struct linux_target_ops) <breakpoint>: Remove.
2179 (struct linux_target_ops) <breakpoint_len>: Remove.
2180 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2181 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2182 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2183 (struct linux_target_ops) <breakpoint>: Remove.
2184 (struct linux_target_ops) <breakpoint_len>: Remove.
2185 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2186 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2187 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2188 (struct linux_target_ops) <breakpoint>: Remove.
2189 (struct linux_target_ops) <breakpoint_len>: Remove.
2190 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2191 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2192 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2193 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2194 (struct linux_target_ops) <breakpoint>: Remove.
2195 (struct linux_target_ops) <breakpoint_len>: Remove.
2196 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2197 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2198 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2199 (struct linux_target_ops) <breakpoint>: Remove.
2200 (struct linux_target_ops) <breakpoint_len>: Remove.
2201 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2202 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2203
4cd98a19
AT
22042015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2205
2206 * linux-cris-low.c (cris_get_pc): Remove void arg.
2207
774ee6d2
AR
22082015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2209
2210 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2211 variable name.
2212
833dcd29
AR
22132015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2214
2215 * inferiors.c (thread_pid_matches_callback): New function.
2216 (find_thread_process): New function.
2217 (remove_thread): Reset current_thread.
2218 (remove_process): Assert threads have been removed first.
2219
8d689ee5
YQ
22202015-10-15 Yao Qi <yao.qi@linaro.org>
2221
2222 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2223 if it is 3.
2224 (aarch64_remove_point): Likewise.
2225 * regcache.c (regcache_register_size): New function.
2226
1c2e1515
YQ
22272015-10-12 Yao Qi <yao.qi@linaro.org>
2228
2229 * linux-aarch64-low.c: Update all callers as emit_load_store
2230 is renamed to aarch64_emit_load_store.
2231
e1c587c3
YQ
22322015-10-12 Yao Qi <yao.qi@linaro.org>
2233
2234 * linux-aarch64-low.c: Update all callers of function renaming
2235 from emit_insn to aarch64_emit_insn.
2236
b6542f81
YQ
22372015-10-12 Yao Qi <yao.qi@linaro.org>
2238
2239 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2240 arch/aarch64-insn.h.
2241 (struct aarch64_memory_operand): Likewise.
2242 (ENCODE): Likewise.
2243 (emit_insn): Move to arch/aarch64-insn.c.
2244 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2245 (emit_load_store): Move to arch/aarch64-insn.c.
2246 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2247 (can_encode_int32): Remove.
2248
246994ce
YQ
22492015-10-12 Yao Qi <yao.qi@linaro.org>
2250
2251 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2252 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2253 (aarch64_relocate_instruction): Likewise.
2254 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2255 (struct aarch64_insn_visitor): Likewise.
2256
0badd99f
YQ
22572015-10-12 Yao Qi <yao.qi@linaro.org>
2258
2259 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2260 (struct aarch64_insn_visitor): New.
2261 (struct aarch64_insn_relocation_data): New.
2262 (aarch64_ftrace_insn_reloc_b): New function.
2263 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2264 (aarch64_ftrace_insn_reloc_cb): Likewise.
2265 (aarch64_ftrace_insn_reloc_tb): Likewise.
2266 (aarch64_ftrace_insn_reloc_adr): Likewise.
2267 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2268 (aarch64_ftrace_insn_reloc_others): Likewise.
2269 (visitor): New.
2270 (aarch64_relocate_instruction): Use visitor.
2271
dfaffe9d
YQ
22722015-10-12 Yao Qi <yao.qi@linaro.org>
2273
2274 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2275 int. Add argument buf.
2276 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2277 aarch64_relocate_instruction.
2278
70b439f0
YQ
22792015-10-12 Yao Qi <yao.qi@linaro.org>
2280
2281 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2282 argument insn. Remove local variable insn. Don't call
2283 target_read_uint32.
2284 (aarch64_install_fast_tracepoint_jump_pad): Call
2285 target_read_uint32.
2286
7781c06f
YQ
22872015-09-30 Yao Qi <yao.qi@linaro.org>
2288
2289 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2290 (emit_load_store_pair): Likewise.
2291
9a3c8263
SM
22922015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2293
2294 * dll.c (match_dll): Add cast(s).
2295 (unloaded_dll): Likewise.
2296 * linux-low.c (second_thread_of_pid_p): Likewise.
2297 (delete_lwp_callback): Likewise.
2298 (count_events_callback): Likewise.
2299 (select_event_lwp_callback): Likewise.
2300 (linux_set_resume_request): Likewise.
2301 * server.c (accumulate_file_name_length): Likewise.
2302 (emit_dll_description): Likewise.
2303 (handle_qxfer_threads_worker): Likewise.
2304 (visit_actioned_threads): Likewise.
2305 * thread-db.c (any_thread_of): Likewise.
2306 * tracepoint.c (same_process_p): Likewise.
2307 (match_blocktype): Likewise.
2308 (build_traceframe_info_xml): Likewise.
2309
224c3ddb
SM
23102015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2311
2312 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2313 assignment.
2314 (gdb_unparse_agent_expr): Likewise.
2315 * hostio.c (require_data): Likewise.
2316 (handle_pread): Likewise.
2317 * linux-low.c (disable_regset): Likewise.
2318 (fetch_register): Likewise.
2319 (store_register): Likewise.
2320 (get_dynamic): Likewise.
2321 (linux_qxfer_libraries_svr4): Likewise.
2322 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2323 (set_fast_tracepoint_jump): Likewise.
2324 (uninsert_fast_tracepoint_jumps_at): Likewise.
2325 (reinsert_fast_tracepoint_jumps_at): Likewise.
2326 (validate_inserted_breakpoint): Likewise.
2327 (clone_agent_expr): Likewise.
2328 * regcache.c (init_register_cache): Likewise.
2329 * remote-utils.c (putpkt_binary_1): Likewise.
2330 (decode_M_packet): Likewise.
2331 (decode_X_packet): Likewise.
2332 (look_up_one_symbol): Likewise.
2333 (relocate_instruction): Likewise.
2334 (monitor_output): Likewise.
2335 * server.c (handle_search_memory): Likewise.
2336 (handle_qxfer_exec_file): Likewise.
2337 (handle_qxfer_libraries): Likewise.
2338 (handle_qxfer): Likewise.
2339 (handle_query): Likewise.
2340 (handle_v_cont): Likewise.
2341 (handle_v_run): Likewise.
2342 (captured_main): Likewise.
2343 * target.c (write_inferior_memory): Likewise.
2344 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2345 * tracepoint.c (init_trace_buffer): Likewise.
2346 (add_tracepoint_action): Likewise.
2347 (add_traceframe): Likewise.
2348 (add_traceframe_block): Likewise.
2349 (cmd_qtdpsrc): Likewise.
2350 (cmd_qtdv): Likewise.
2351 (cmd_qtstatus): Likewise.
2352 (response_source): Likewise.
2353 (response_tsv): Likewise.
2354 (cmd_qtnotes): Likewise.
2355 (gdb_collect): Likewise.
2356 (initialize_tracepoint): Likewise.
2357
afbe19f8
PL
23582015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2359
2360 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2361 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2362 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2363 <NOP>: New.
2364 (enum aarch64_condition_codes): New enum.
2365 (w0): New static global.
2366 (fp): Likewise.
2367 (lr): Likewise.
2368 (struct aarch64_memory_operand) <type>: New
2369 MEMORY_OPERAND_POSTINDEX type.
2370 (postindex_memory_operand): New helper function.
2371 (emit_ret): New function.
2372 (emit_load_store_pair): New function, factored out of emit_stp
2373 with support for MEMORY_OPERAND_POSTINDEX.
2374 (emit_stp): Rewrite using emit_load_store_pair.
2375 (emit_ldp): New function.
2376 (emit_load_store): Likewise.
2377 (emit_ldr): Mention post-index instruction in comment.
2378 (emit_ldrh): New function.
2379 (emit_ldrb): New function.
2380 (emit_ldrsw): Mention post-index instruction in comment.
2381 (emit_str): Likewise.
2382 (emit_subs): New function.
2383 (emit_cmp): Likewise.
2384 (emit_and): Likewise.
2385 (emit_orr): Likewise.
2386 (emit_orn): Likewise.
2387 (emit_eor): Likewise.
2388 (emit_mvn): Likewise.
2389 (emit_lslv): Likewise.
2390 (emit_lsrv): Likewise.
2391 (emit_asrv): Likewise.
2392 (emit_mul): Likewise.
2393 (emit_sbfm): Likewise.
2394 (emit_sbfx): Likewise.
2395 (emit_ubfm): Likewise.
2396 (emit_ubfx): Likewise.
2397 (emit_csinc): Likewise.
2398 (emit_cset): Likewise.
2399 (emit_nop): Likewise.
2400 (emit_ops_insns): New helper function.
2401 (emit_pop): Likewise.
2402 (emit_push): Likewise.
2403 (aarch64_emit_prologue): New function.
2404 (aarch64_emit_epilogue): Likewise.
2405 (aarch64_emit_add): Likewise.
2406 (aarch64_emit_sub): Likewise.
2407 (aarch64_emit_mul): Likewise.
2408 (aarch64_emit_lsh): Likewise.
2409 (aarch64_emit_rsh_signed): Likewise.
2410 (aarch64_emit_rsh_unsigned): Likewise.
2411 (aarch64_emit_ext): Likewise.
2412 (aarch64_emit_log_not): Likewise.
2413 (aarch64_emit_bit_and): Likewise.
2414 (aarch64_emit_bit_or): Likewise.
2415 (aarch64_emit_bit_xor): Likewise.
2416 (aarch64_emit_bit_not): Likewise.
2417 (aarch64_emit_equal): Likewise.
2418 (aarch64_emit_less_signed): Likewise.
2419 (aarch64_emit_less_unsigned): Likewise.
2420 (aarch64_emit_ref): Likewise.
2421 (aarch64_emit_if_goto): Likewise.
2422 (aarch64_emit_goto): Likewise.
2423 (aarch64_write_goto_address): Likewise.
2424 (aarch64_emit_const): Likewise.
2425 (aarch64_emit_call): Likewise.
2426 (aarch64_emit_reg): Likewise.
2427 (aarch64_emit_pop): Likewise.
2428 (aarch64_emit_stack_flush): Likewise.
2429 (aarch64_emit_zero_ext): Likewise.
2430 (aarch64_emit_swap): Likewise.
2431 (aarch64_emit_stack_adjust): Likewise.
2432 (aarch64_emit_int_call_1): Likewise.
2433 (aarch64_emit_void_call_2): Likewise.
2434 (aarch64_emit_eq_goto): Likewise.
2435 (aarch64_emit_ne_goto): Likewise.
2436 (aarch64_emit_lt_goto): Likewise.
2437 (aarch64_emit_le_goto): Likewise.
2438 (aarch64_emit_gt_goto): Likewise.
2439 (aarch64_emit_ge_got): Likewise.
2440 (aarch64_emit_ops_impl): New static global variable.
2441 (aarch64_emit_ops): New target function, return
2442 &aarch64_emit_ops_impl.
2443 (struct linux_target_ops): Install it.
2444
bb903df0
PL
24452015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2446
2447 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2448 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2449 aarch64-ipa.o.
2450 * linux-aarch64-ipa.c: New file.
2451 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2452 and endian.h.
2453 (aarch64_get_thread_area): New target method.
2454 (extract_signed_bitfield): New helper function.
2455 (aarch64_decode_ldr_literal): New function.
2456 (enum aarch64_opcodes): New enum.
2457 (struct aarch64_register): New struct.
2458 (struct aarch64_operand): New struct.
2459 (x0): New static global.
2460 (x1): Likewise.
2461 (x2): Likewise.
2462 (x3): Likewise.
2463 (x4): Likewise.
2464 (w2): Likewise.
2465 (ip0): Likewise.
2466 (sp): Likewise.
2467 (xzr): Likewise.
2468 (aarch64_register): New helper function.
2469 (register_operand): Likewise.
2470 (immediate_operand): Likewise.
2471 (struct aarch64_memory_operand): New struct.
2472 (offset_memory_operand): New helper function.
2473 (preindex_memory_operand): Likewise.
2474 (enum aarch64_system_control_registers): New enum.
2475 (ENCODE): New macro.
2476 (emit_insn): New helper function.
2477 (emit_b): New function.
2478 (emit_bcond): Likewise.
2479 (emit_cb): Likewise.
2480 (emit_tb): Likewise.
2481 (emit_blr): Likewise.
2482 (emit_stp): Likewise.
2483 (emit_ldp_q_offset): Likewise.
2484 (emit_stp_q_offset): Likewise.
2485 (emit_load_store): Likewise.
2486 (emit_ldr): Likewise.
2487 (emit_ldrsw): Likewise.
2488 (emit_str): Likewise.
2489 (emit_ldaxr): Likewise.
2490 (emit_stxr): Likewise.
2491 (emit_stlr): Likewise.
2492 (emit_data_processing_reg): Likewise.
2493 (emit_data_processing): Likewise.
2494 (emit_add): Likewise.
2495 (emit_sub): Likewise.
2496 (emit_mov): Likewise.
2497 (emit_movk): Likewise.
2498 (emit_mov_addr): Likewise.
2499 (emit_mrs): Likewise.
2500 (emit_msr): Likewise.
2501 (emit_sevl): Likewise.
2502 (emit_wfe): Likewise.
2503 (append_insns): Likewise.
2504 (can_encode_int32_in): New helper function.
2505 (aarch64_relocate_instruction): New function.
2506 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2507 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2508 (struct linux_target_ops): Install aarch64_get_thread_area,
2509 aarch64_install_fast_tracepoint_jump_pad and
2510 aarch64_get_min_fast_tracepoint_insn_len.
2511
787749ea
PL
25122015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2513
2514 * Makefile.in (aarch64-insn.o): New rule.
2515 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2516
9812b2e6
YQ
25172015-09-21 Yao Qi <yao.qi@linaro.org>
2518
2519 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2520
18fe412b
YQ
25212015-09-21 Yao Qi <yao.qi@linaro.org>
2522
2523 * tracepoint.c (max_jump_pad_size): Remove.
2524
a0cc84cd
YQ
25252015-09-18 Yao Qi <yao.qi@linaro.org>
2526
2527 * linux-aarch64-low.c: Don't include sys/uio.h.
2528 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2529
d78908cf
WW
25302015-09-16 Wei-cheng Wang <cole945@gmail.com>
2531
2532 * tracepoint.c (eval_result_type): Change prototype.
2533 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2534
d57e0d50
PA
25352015-09-15 Pedro Alves <palves@redhat.com>
2536
2537 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2538 Check whether to report exec events instead of checking whether
2539 multiprocess is enabled.
2540
5a676acc
PA
25412015-09-15 Pedro Alves <palves@redhat.com>
2542
2543 PR remote/18965
2544 * remote-utils.c (prepare_resume_reply): Merge
2545 TARGET_WAITKIND_VFORK_DONE switch case with the
2546 TARGET_WAITKIND_FORKED case.
2547
7c5d0fad
YQ
25482015-09-15 Yao Qi <yao.qi@linaro.org>
2549
2550 * server.c (handle_query): Check string comparison using
2551 "else if" instead of "if".
2552
750ce8d1
YQ
25532015-09-15 Yao Qi <yao.qi@linaro.org>
2554
2555 * server.c (vCont_supported): New global variable.
2556 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2557 matches. Append ";vContSupported+" to own_buf.
2558 (handle_v_requests): Append ";s;S" to own_buf if target supports
2559 hardware single step or vCont_supported is false.
2560 (capture_main): Set vCont_supported to zero.
2561
70b90b91
YQ
25622015-09-15 Yao Qi <yao.qi@linaro.org>
2563
2564 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2565 it to ...
2566 (linux_supports_hardware_single_step): ... New function.
2567 (linux_target_ops): Update.
2568 * lynx-low.c (lynx_target_ops): Set field
2569 supports_hardware_single_step to target_can_do_hardware_single_step.
2570 * nto-low.c (nto_target_ops): Likewise.
2571 * spu-low.c (spu_target_ops): Likewise.
2572 * win32-low.c (win32_target_ops): Likewise.
2573 * target.c (target_can_do_hardware_single_step): New function.
2574 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2575 Remove. <supports_hardware_single_step>: New field.
2576 (target_supports_conditional_breakpoints): Remove.
2577 (target_supports_hardware_single_step): New macro.
2578 (target_can_do_hardware_single_step): Declare.
2579 * server.c (handle_query): Use target_supports_hardware_single_step
2580 instead of target_supports_conditional_breakpoints.
2581
ade90bde
YQ
25822015-09-15 Yao Qi <yao.qi@linaro.org>
2583
2584 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2585 function.
2586 (struct linux_target_ops the_low_target): Install
2587 aarch64_linux_siginfo_fixup.
2588
94585166
DB
25892015-09-11 Don Breazeal <donb@codesourcery.com>
2590 Luis Machado <lgustavo@codesourcery.com>
2591
2592 * linux-low.c (linux_mourn): Static declaration.
2593 (linux_arch_setup): Move in front of
2594 handle_extended_wait.
2595 (linux_arch_setup_thread): New function.
2596 (handle_extended_wait): Handle exec events. Call
2597 linux_arch_setup_thread. Make event_lwp argument a
2598 pointer-to-a-pointer.
2599 (check_zombie_leaders): Do not check stopped threads.
2600 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2601 (linux_low_filter_event): Add lwp and thread for exec'ing
2602 non-leader thread if leader thread has been deleted.
2603 Refactor code into linux_arch_setup_thread and call it.
2604 Pass child lwp pointer by reference to handle_extended_wait.
2605 (linux_wait_for_event_filtered): Update comment.
2606 (linux_wait_1): Prevent clobbering exec event status.
2607 (linux_supports_exec_events): New function.
2608 (linux_target_ops) <supports_exec_events>: Initialize new member.
2609 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2610 new member.
2611 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2612 * server.c (report_exec_events): New global variable.
2613 (handle_query): Handle qSupported query for exec-events feature.
2614 (captured_main): Initialize report_exec_events.
2615 * server.h (report_exec_events): Declare new global variable.
2616 * target.h (struct target_ops) <supports_exec_events>: New
2617 member.
2618 (target_supports_exec_events): New macro.
2619 * win32-low.c (win32_target_ops) <supports_exec_events>:
2620 Initialize new member.
2621
0568462b
MM
26222015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2623
2624 * linux-low.c (linux_low_enable_btrace): Remove.
2625 (linux_target_ops): Replace linux_low_enable_btrace with
2626 linux_enable_btrace.
2627
39edd165
YQ
26282015-09-03 Yao Qi <yao.qi@linaro.org>
2629
2630 * linux-aarch64-low.c (aarch64_insert_point): Call
2631 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2632 returns true.
2633
1db33b5a
UW
26342015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2635
2636 * linux-low.c (check_stopped_by_breakpoint): Use
2637 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2638
ab290430
PA
26392015-08-27 Pedro Alves <palves@redhat.com>
2640
2641 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2642
8d749320
SM
26432015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2644
6711b7f8
SM
2645 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2646 the XNEW-family equivalent.
8d749320
SM
2647 (compile_bytecodes): Likewise.
2648 * dll.c (loaded_dll): Likewise.
2649 * event-loop.c (append_callback_event): Likewise.
2650 (create_file_handler): Likewise.
2651 (create_file_event): Likewise.
2652 * hostio.c (handle_open): Likewise.
2653 * inferiors.c (add_thread): Likewise.
2654 (add_process): Likewise.
2655 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2656 * linux-arm-low.c (arm_new_process): Likewise.
2657 (arm_new_thread): Likewise.
2658 * linux-low.c (add_to_pid_list): Likewise.
2659 (linux_add_process): Likewise.
2660 (handle_extended_wait): Likewise.
2661 (add_lwp): Likewise.
2662 (enqueue_one_deferred_signal): Likewise.
2663 (enqueue_pending_signal): Likewise.
2664 (linux_resume_one_lwp_throw): Likewise.
2665 (linux_resume_one_thread): Likewise.
2666 (linux_read_memory): Likewise.
2667 (linux_write_memory): Likewise.
2668 * linux-mips-low.c (mips_linux_new_process): Likewise.
2669 (mips_linux_new_thread): Likewise.
2670 (mips_add_watchpoint): Likewise.
2671 * linux-x86-low.c (initialize_low_arch): Likewise.
2672 * lynx-low.c (lynx_add_process): Likewise.
2673 * mem-break.c (set_raw_breakpoint_at): Likewise.
2674 (set_breakpoint): Likewise.
2675 (add_condition_to_breakpoint): Likewise.
2676 (add_commands_to_breakpoint): Likewise.
2677 (clone_agent_expr): Likewise.
2678 (clone_one_breakpoint): Likewise.
2679 * regcache.c (new_register_cache): Likewise.
2680 * remote-utils.c (look_up_one_symbol): Likewise.
2681 * server.c (queue_stop_reply): Likewise.
2682 (start_inferior): Likewise.
2683 (queue_stop_reply_callback): Likewise.
2684 (handle_target_event): Likewise.
2685 * spu-low.c (fetch_ppc_memory): Likewise.
2686 (store_ppc_memory): Likewise.
2687 * target.c (set_target_ops): Likewise.
2688 * thread-db.c (thread_db_load_search): Likewise.
2689 (try_thread_db_load_1): Likewise.
2690 * tracepoint.c (add_tracepoint): Likewise.
2691 (add_tracepoint_action): Likewise.
2692 (create_trace_state_variable): Likewise.
2693 (cmd_qtdpsrc): Likewise.
2694 (cmd_qtro): Likewise.
2695 (add_while_stepping_state): Likewise.
2696 * win32-low.c (child_add_thread): Likewise.
2697 (get_image_name): Likewise.
2698
ed8b7b42
YQ
26992015-08-25 Yao Qi <yao.qi@linaro.org>
2700
2701 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2702
db3cb7cb
YQ
27032015-08-25 Yao Qi <yao.qi@linaro.org>
2704
2705 * Makefile.in (aarch64-linux.o): New rule.
2706 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2707 srv_tgtobj.
2708 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2709 (aarch64_init_debug_reg_state): Make it extern.
2710 (aarch64_linux_prepare_to_resume): Remove.
2711
f6011a1c
YQ
27122015-08-25 Yao Qi <yao.qi@linaro.org>
2713
2714 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2715 lwp_arch_private_info and ptid_of_lwp.
2716
88e2cf7e
YQ
27172015-08-25 Yao Qi <yao.qi@linaro.org>
2718
2719 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2720 Find proc_info by find_process_pid. All callers updated.
2721
5e35436e
YQ
27222015-08-25 Yao Qi <yao.qi@linaro.org>
2723
2724 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2725 Remove.
2726 (debug_reg_change_callback): Remove.
2727 (aarch64_notify_debug_reg_change): Remove.
2728
4a8a7965
YQ
27292015-08-25 Yao Qi <yao.qi@linaro.org>
2730
2731 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2732 Call current_lwp_ptid.
2733
32a271ee
YQ
27342015-08-25 Yao Qi <yao.qi@linaro.org>
2735
2736 * linux-aarch64-low.c (debug_reg_change_callback): Use
2737 debug_printf.
2738
0d51c8d7
YQ
27392015-08-25 Yao Qi <yao.qi@linaro.org>
2740
2741 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2742
31a43dd5
YQ
27432015-08-25 Yao Qi <yao.qi@linaro.org>
2744
2745 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2746
8ee52567
YQ
27472015-08-25 Yao Qi <yao.qi@linaro.org>
2748
2749 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2750 the code.
2751
ff3f0f45
YQ
27522015-08-25 Yao Qi <yao.qi@linaro.org>
2753
2754 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2755 Remove.
2756 (debug_reg_change_callback): Remove argument entry and add argument
2757 lwp. Remove local variable thread. Don't print thread id in the
2758 debugging output. Don't check whether pid of thread equals to pid.
2759 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2760 iterate_over_lwps instead find_inferior.
2761
3d40fbb5
PA
27622015-08-24 Pedro Alves <palves@redhat.com>
2763
2764 * inferiors.c (get_first_process): New function.
2765 * inferiors.h (get_first_process): New declaration.
2766 * remote-utils.c (read_ptid): Default to the first process in the
2767 list, instead of to the current thread's process.
2768
438e1e42
PA
27692015-08-24 Pedro Alves <palves@redhat.com>
2770
2771 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2772 * event-loop.c: Likewise.
2773 * remote-utils.c: Likewise.
2774 * tracepoint.c: Likewise.
2775
a8c6d4fc
PA
27762015-08-24 Pedro Alves <palves@redhat.com>
2777
2778 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2779 ptid_get_lwp.
2780
99b0bb12
PA
27812015-08-21 Pedro Alves <palves@redhat.com>
2782
2783 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2784 instead of literal 1.
2785
f8904751
PA
27862015-08-21 Pedro Alves <palves@redhat.com>
2787
2788 * tdesc.c (default_description): Explicitly zero-initialize.
2789
465a859e
PA
27902015-08-21 Pedro Alves <palves@redhat.com>
2791
2792 PR gdb/18749
2793 * inferiors.c (remove_thread): Discard any pending stop reply for
2794 this thread.
2795 * server.c (remove_all_on_match_pid): Rename to ...
2796 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2797 instead of a pid.
2798 (discard_queued_stop_replies): Change parameter to a ptid. Now
2799 extern.
2800 (handle_v_kill, kill_inferior_callback, captured_main)
2801 (process_serial_event): Adjust.
2802 * server.h (discard_queued_stop_replies): Declare.
2803
f0db101d
PA
28042015-08-21 Pedro Alves <palves@redhat.com>
2805
2806 * linux-low.c (wait_for_sigstop): Always switch to no thread
2807 selected if the previously current thread dies.
2808 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2809 process instead of the current thread's.
2810 * remote-utils.c (input_interrupt): Don't check if there's no
2811 current thread.
2812 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2813 current thread to the general thread fails, error out.
2814 (handle_qxfer_auxv, handle_qxfer_libraries)
2815 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2816 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2817 (handle_query): Check if there's a thread selected instead of
2818 checking whether there's any thread in the thread list.
2819 (handle_qxfer_threads, handle_qxfer_btrace)
2820 (handle_qxfer_btrace_conf): Don't error out early if there's no
2821 thread in the thread list.
2822 (handle_v_cont, myresume): Don't set the current thread to the
2823 continue thread.
2824 (process_serial_event) <Hg handling>: Also set thread_id if the
2825 previous general thread is still alive.
2826 (process_serial_event) <g/G handling>: If setting the current
2827 thread to the general thread fails, error out.
2828 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2829 thread's lwp instead of the current thread's.
2830 * target.c (set_desired_thread): If the desired thread was not
2831 found, leave the current thread pointing to NULL. Return an int
2832 (boolean) indicating success.
2833 * target.h (set_desired_thread): Change return type to int.
2834
40045d91
MF
28352015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2836
2837 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2838 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2839 #includes.
2840 (ps_get_thread_area): New function.
2841
45face3b
GB
28422015-08-19 Gary Benson <gbenson@redhat.com>
2843
2844 * hostio.c (handle_pread): Do not attempt to read more data
2845 than hostio_reply_with_data can fit in a packet.
2846
16d5f642
JB
28472015-08-18 Joel Brobecker <brobecker@adacore.com>
2848
2849 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2850
a738da3a
MF
28512015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2852
2853 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2854
33ebda9d
PA
28552015-08-06 Pedro Alves <palves@redhat.com>
2856
2857 * tracepoint.c (expr_eval_result): Now an int.
2858
a44892be
PA
28592015-08-06 Pedro Alves <palves@redhat.com>
2860
2861 * gdbthread.h (struct regcache): Forward declare.
2862 (struct thread_info) <regcache_data>: Now a struct regcache
2863 pointer.
2864 * inferiors.c (inferior_regcache_data)
2865 (set_inferior_regcache_data): Now work with struct regcache
2866 pointers.
2867 * inferiors.h (struct regcache): Forward declare.
2868 (inferior_regcache_data, set_inferior_regcache_data): Now work
2869 with struct regcache pointers.
2870 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2871 (free_register_cache_thread): Remove struct regcache pointer
2872 casts.
2873
608a1e46
PA
28742015-08-06 Pedro Alves <palves@redhat.com>
2875
2876 * server.c (captured_main): On error, print the exception message
2877 to stderr, and if run_once is set, throw a quit.
2878
f0ce0d3a
PA
28792015-08-06 Pedro Alves <palves@redhat.com>
2880
2881 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2882 the current thread.
2883
bf47e248
PA
28842015-08-06 Pedro Alves <palves@redhat.com>
2885
2886 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2887 reading beyond the passed in buffer length.
2888
b6b9ffcc
PL
28892015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2890
2891 * tracepoint.c (symbol_list) <required>: Remove.
2892
863d01bd
PA
28932015-08-06 Pedro Alves <palves@redhat.com>
2894
2895 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2896 count if stopping and suspending threads.
2897 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2898 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2899 (linux_detach): Complete an ongoing step-over.
2900 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2901 throughout.
2902 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2903 (linux_wait_1): If passing a signal to the inferior after
2904 finishing a step-over, unsuspend and re-resume all lwps. If we
2905 see a single-step event but the thread should be continuing, don't
2906 pass the trap to gdb.
2907 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2908 internal_error instead of gdb_assert.
2909 (enqueue_pending_signal): New function.
2910 (check_ptrace_stopped_lwp_gone): Add debug output.
2911 (start_step_over): Use internal_error instead of gdb_assert.
2912 (complete_ongoing_step_over): New function.
2913 (linux_resume_one_thread): Don't resume a suspended thread.
2914 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2915 it stepping.
2916
00db26fa
PA
29172015-08-06 Pedro Alves <palves@redhat.com>
2918
2919 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2920 (linux_thread_alive): Use lwp_is_marked_dead.
2921 (extended_event_reported): Delete.
2922 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2923 instead of extended_event_reported.
2924 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2925 as well.
2926 (lwp_is_marked_dead): New function.
2927 (lwp_running): Use lwp_is_marked_dead.
2928 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2929 comment.
2930
ad071a30
PA
29312015-08-06 Pedro Alves <palves@redhat.com>
2932
2933 * linux-low.c (linux_wait_1): Move fork event output out of the
2934 !report_to_gdb check. Pass event_child->waitstatus to
2935 target_waitstatus_to_string instead of ourstatus.
2936
524b57e6
YQ
29372015-08-04 Yao Qi <yao.qi@linaro.org>
2938
2939 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2940 if current_thread is 32 bit.
2941
6085d6f6
YQ
29422015-08-04 Yao Qi <yao.qi@linaro.org>
2943
2944 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2945 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2946 * server.c (extended_protocol): Remove "static".
2947 * server.h (extended_protocol): Declare it.
2948
8a7e4587
YQ
29492015-08-04 Yao Qi <yao.qi@linaro.org>
2950
2951 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2952 both aarch64 and aarch32.
2953 (aarch64_set_pc): Likewise.
2954
3b53ae99
YQ
29552015-08-04 Yao Qi <yao.qi@linaro.org>
2956
2957 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2958 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2959 arm-with-neon.xml to srv_xmlfiles.
2960 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2961 (is_64bit_tdesc): New function.
2962 (aarch64_linux_read_description): New function.
2963 (aarch64_arch_setup): Call aarch64_linux_read_description.
2964 (regs_info): Rename to regs_info_aarch64.
2965 (aarch64_regs_info): Return right regs_info.
2966 (initialize_low_arch): Call initialize_low_arch_aarch32.
2967
bd9e6534
YQ
29682015-08-04 Yao Qi <yao.qi@linaro.org>
2969
2970 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2971 * linux-aarch32-low.c: New file.
2972 * linux-aarch32-low.h: New file.
2973 * linux-arm-low.c (arm_fill_gregset): Move it to
2974 linux-aarch32-low.c.
2975 (arm_store_gregset): Likewise.
2976 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2977 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2978 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2979 (regs_info): Rename to regs_info_arm.
2980 (arm_regs_info): Return regs_info_aarch32 if
2981 have_ptrace_getregset is 1 and target description is
2982 arm_with_neon or arm_with_vfpv3.
2983 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2984 Call initialize_low_arch_aarch32 instead.
2985
ded48a5e
YQ
29862015-08-04 Yao Qi <yao.qi@linaro.org>
2987
2988 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2989 * linux-low.c: ... here.
2990 * linux-low.h (have_ptrace_getregset): Declare it.
2991
96e9210f
PA
29922015-08-04 Pedro Alves <palves@redhat.com>
2993
2994 * thread-db.c (struct thread_db): Use new typedefs.
2995 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2996 CHK calls.
2997 (disable_thread_event_reporting): Cast result of dlsym to
2998 destination function pointer type.
2999 (thread_db_mourn): Use td_ta_delete_ftype.
3000
af60a1ef
SL
30012015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3002
3003 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3004 arch variant.
3005 (CDX_BREAKPOINT): Define for R2.
3006 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3007 (the_low_target): Add comments.
3008
e8b41681
YQ
30092015-07-30 Yao Qi <yao.qi@linaro.org>
3010
3011 * linux-arm-low.c (arm_hwcap): Remove it.
3012 (arm_read_description): New local variable arm_hwcap. Don't
3013 set arm_hwcap to zero.
3014
89abb039
YQ
30152015-07-30 Yao Qi <yao.qi@linaro.org>
3016
3017 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3018 Use regcache->tdesc instead.
3019 (arm_store_wmmxregset): Likewise.
3020 (arm_fill_vfpregset): Likewise.
3021 (arm_store_vfpregset): Likewise.
3022
deca266c
YQ
30232015-07-30 Yao Qi <yao.qi@linaro.org>
3024
3025 * linux-arm-low.c: Include arch/arm.h.
3026 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3027 (arm_store_gregset): Likewise.
3028
aa58a496
SM
30292015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3030
3031 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3032 ptrace's 4th parameter.
3033
50904b25
YQ
30342015-07-27 Yao Qi <yao.qi@linaro.org>
3035
3036 * configure.srv (case aarch64*-*-linux*): Don't set
3037 srv_linux_usrregs.
3038
5826e159
PA
30392015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3040
3041 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3042 sys/ptrace.h.
3043 * linux-arm-low.c: Likewise.
3044 * linux-cris-low.c: Likewise.
3045 * linux-crisv32-low.c: Likewise.
3046 * linux-low.c: Likewise.
3047 * linux-m68k-low.c: Likewise.
3048 * linux-mips-low.c: Likewise.
3049 * linux-nios2-low.c: Likewise.
3050 * linux-s390-low.c: Likewise.
3051 * linux-sparc-low.c: Likewise.
3052 * linux-tic6x-low.c: Likewise.
3053 * linux-tile-low.c: Likewise.
3054 * linux-x86-low.c: Likewise.
3055
54019719
PA
30562015-07-24 Pedro Alves <palves@redhat.com>
3057
3058 * config.in: Regenerate.
3059 * configure: Regenerate.
3060
eb7aa561
PA
30612015-07-24 Pedro Alves <palves@redhat.com>
3062
3063 * acinclude.m4: Include ../ptrace.m4.
3064 * configure.ac: Call GDB_AC_PTRACE.
3065 * config.in, configure: Regenerate.
3066
55d7b841
YQ
30672015-07-24 Yao Qi <yao.qi@linaro.org>
3068
3069 * linux-low.c (linux_create_inferior): Remove setting to
3070 proc->priv->new_inferior.
3071 (linux_attach): Likewise.
3072 (linux_low_filter_event): Likewise.
3073 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3074
c06cbd92
YQ
30752015-07-24 Yao Qi <yao.qi@linaro.org>
3076
3077 * linux-low.c (linux_arch_setup): New function.
3078 (linux_low_filter_event): If proc->tdesc is NULL and
3079 proc->attached is true, call the_low_target.arch_setup.
3080 Otherwise, keep status pending, and return.
3081 (linux_resume_one_lwp_throw): Don't call get_pc if
3082 thread->while_stepping isn't NULL. Don't call
3083 get_thread_regcache if proc->tdesc is NULL.
3084 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3085 (linux_target_ops): Install arch_setup.
3086 * server.c (start_inferior): Call the_target->arch_setup.
3087 * target.h (struct target_ops) <arch_setup>: New field.
3088 (target_arch_setup): New marco.
3089 * lynx-low.c (lynx_target_ops): Update.
3090 * nto-low.c (nto_target_ops): Update.
3091 * spu-low.c (spu_target_ops): Update.
3092 * win32-low.c (win32_target_ops): Update.
3093
5ae3ebba
YQ
30942015-07-24 Yao Qi <yao.qi@linaro.org>
3095
3096 * linux-low.c (linux_add_process): Don't set
3097 proc->priv->new_inferior.
3098 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3099 (linux_attach): Likewise.
3100
eb97750b
YQ
31012015-07-24 Yao Qi <yao.qi@linaro.org>
3102
3103 * server.c (start_inferior): Code refactor.
3104
51aee833
YQ
31052015-07-24 Yao Qi <yao.qi@linaro.org>
3106
3107 * server.c (process_serial_event): Set general_thread.
3108
af1b22f3
YQ
31092015-07-21 Yao Qi <yao.qi@linaro.org>
3110
3111 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3112 aarch64_linux_get_debug_reg_capacity.
3113
554717a3
YQ
31142015-07-17 Yao Qi <yao.qi@linaro.org>
3115
3116 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3117 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3118 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3119 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3120 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3121 (AARCH64_HWP_ALIGNMENT): Likewise.
3122 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3123 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3124 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3125 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3126 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3127 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3128 (struct aarch64_debug_reg_state): Likewise.
3129 (struct arch_lwp_info): Likewise.
3130 (aarch64_align_watchpoint): Likewise.
3131 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3132 (aarch64_watchpoint_length): Likewise.
3133 (aarch64_point_encode_ctrl_reg): Likewise
3134 (aarch64_point_is_aligned): Likewise.
3135 (aarch64_align_watchpoint): Likewise.
3136 (aarch64_linux_set_debug_regs):
3137 (aarch64_dr_state_insert_one_point): Likewise.
3138 (aarch64_dr_state_remove_one_point): Likewise.
3139 (aarch64_handle_breakpoint): Likewise.
3140 (aarch64_handle_aligned_watchpoint): Likewise.
3141 (aarch64_handle_unaligned_watchpoint): Likewise.
3142 (aarch64_handle_watchpoint): Likewise.
3143
c67ca4de
YQ
31442015-07-17 Yao Qi <yao.qi@linaro.org>
3145
3146 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3147 and don't aarch64_get_debug_reg_state. All callers update.
3148 (aarch64_handle_aligned_watchpoint): Likewise.
3149 (aarch64_handle_unaligned_watchpoint): Likewise.
3150 (aarch64_handle_watchpoint): Likewise.
3151 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3152 (aarch64_remove_point): Likewise.
3153
25abf979
YQ
31542015-07-17 Yao Qi <yao.qi@linaro.org>
3155
3156 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3157 debug_printf.
3158 (aarch64_handle_unaligned_watchpoint): Likewise.
3159
db1ff28b
JK
31602015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3161
3162 Revert the previous 3 commits:
3163 Move gdb_regex* to common/
3164 Move linux_find_memory_regions_full & co.
3165 gdbserver build-id attribute generator
3166
700ca40f
JK
31672015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3168 Jan Kratochvil <jan.kratochvil@redhat.com>
3169
3170 gdbserver build-id attribute generator.
3171 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3172 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3173 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3174 (find_phdr): New.
3175 (get_dynamic): Use find_pdhr to traverse program headers.
3176 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3177 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3178 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3179 (get_hex_build_id): New.
3180 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3181 to reply XML document.
3182
9904185c
JK
31832015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3184 Jan Kratochvil <jan.kratochvil@redhat.com>
3185
3186 * target.c: Include target/target-utils.h and fcntl.h.
3187 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3188 (target_fileio_read_stralloc): New functions.
3189
6e5b4429
JK
31902015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3191
3192 * Makefile.in (OBS): Add gdb_regex.o.
3193 (gdb_regex.o): New.
3194 * config.in: Rebuilt.
3195 * configure: Rebuilt.
3196
ddc98fbf
JK
31972015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3198 Jan Kratochvil <jan.kratochvil@redhat.com>
3199
3200 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3201 * Makefile.in (OBS): Add target-utils.o.
3202 (linux-maps.o, target-utils.o): New.
3203 * configure.srv (srv_linux_obj): Add linux-maps.o.
3204
e57bb7a0
PL
32052015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3206
3207 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3208 function, return 1.
3209 (the_low_target): Install it.
3210
586b02a9
PA
32112015-07-14 Pedro Alves <palves@redhat.com>
3212
3213 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3214 Instead, ignore ECHILD, and throw an error for other errnos.
3215
58c1b36c
PA
32162015-07-10 Pedro Alves <palves@redhat.com>
3217
3218 * event-loop.c (struct callback_event) <data>: Change type to
3219 gdb_client_data instance instead of gdb_client_data pointer.
3220 (append_callback_event): Adjust.
3221
421530db
PL
32222015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3223
3224 * linux-aarch64-low.c: Add comments for each linux_target_ops
3225 method. Remove comments already covered in target_ops and
3226 linux_target_ops definitions.
3227 (the_low_target): Add comments for each unimplemented method.
3228
c2d65f38
YQ
32292015-07-09 Yao Qi <yao.qi@linaro.org>
3230
3231 * linux-aarch64-low.c (aarch64_regmap): Remove.
3232 (aarch64_usrregs_info): Remove.
3233 (regs_info): Set field usrregs to NULL.
3234
b20a6524
MM
32352015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3236
3237 * linux-low.c: Include "rsp-low.h"
3238 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3239 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3240 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3241 (handle_btrace_enable_pt): New.
3242 (handle_btrace_general_set): Support "pt".
3243 (handle_btrace_conf_general_set): Support "pt:size".
3244
96c97461
PL
32452015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3246
3247 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3248 Z_PACKET_SW_BP.
3249
37d66942
PL
32502015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3251
3252 * linux-aarch64-low.c: Remove comment about endianness.
3253 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3254 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3255 memcmp.
3256
dc06243f
GB
32572015-06-24 Gary Benson <gbenson@redhat.com>
3258
3259 * linux-i386-ipa.c (stdint.h): Do not include.
3260 * lynx-i386-low.c (stdint.h): Likewise.
3261 * lynx-ppc-low.c (stdint.h): Likewise.
3262 * mem-break.c (stdint.h): Likewise.
3263 * thread-db.c (stdint.h): Likewise.
3264 * tracepoint.c (stdint.h): Likewise.
3265 * win32-low.c (stdint.h): Likewise.
3266
124e13d9
SM
32672015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3268
3269 * server.c (write_qxfer_response): Update call to
3270 remote_escape_output.
3271
909c2cda
JK
32722015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3273 Jan Kratochvil <jan.kratochvil@redhat.com>
3274
3275 Merge multiple hex conversions.
3276 * gdbreplay.c (tohex): Rename to 'fromhex'.
3277 (logchar): Use fromhex.
3278
24c05f46
JK
32792015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3280
3281 * server.c (handle_qxfer_libraries): Set `version' attribute for
3282 <library-list>.
3283
14d2069a
GB
32842015-06-10 Gary Benson <gbenson@redhat.com>
3285
3286 * target.h (struct target_ops) <multifs_open>: New field.
3287 <multifs_unlink>: Likewise.
3288 <multifs_readlink>: Likewise.
3289 * linux-low.c (nat/linux-namespaces.h): New include.
3290 (linux_target_ops): Initialize the_target->multifs_open,
3291 the_target->multifs_unlink and the_target->multifs_readlink.
3292 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3293 * hostio.c (hostio_fs_pid): New static variable.
3294 (hostio_handle_new_gdb_connection): New function.
3295 (handle_setfs): Likewise.
3296 (handle_open): Use the_target->multifs_open as appropriate.
3297 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3298 (handle_readlink): Use the_target->multifs_readlink as
3299 appropriate.
3300 (handle_vFile): Handle vFile:setfs packets.
3301 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3302 after target_handle_new_gdb_connection.
3303
4b8b5e72
GB
33042015-06-10 Gary Benson <gbenson@redhat.com>
3305
3306 * configure.ac (AC_CHECK_FUNCS): Add setns.
3307 * config.in: Regenerate.
3308 * configure: Likewise.
3309 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3310 (linux-namespaces.o): New rule.
3311 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3312
3ac2e371
GB
33132015-06-09 Gary Benson <gbenson@redhat.com>
3314
3315 * hostio.c (handle_open): Process mode argument with
3316 fileio_to_host_mode.
3317
ca9b78ce
YQ
33182015-06-01 Yao Qi <yao.qi@linaro.org>
3319
3320 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3321 * linux-x86-low.c: Likewise.
3322
bfacd19d
DB
33232015-05-28 Don Breazeal <donb@codesourcery.com>
3324
3325 * linux-low.c (handle_extended_wait): Initialize
3326 thread_info.last_resume_kind for new fork children.
3327
452003ef
PA
33282015-05-15 Pedro Alves <palves@redhat.com>
3329
3330 * target.h (target_handle_new_gdb_connection): Rewrite using if
3331 wrapped in do/while.
3332
1041a03c
JB
33332015-05-14 Joel Brobecker <brobecker@adacore.com>
3334
3335 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3336 * configure, config.in: Regenerate.
3337 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3338 Declare typedef.
3339
c269dbdb
DB
33402015-05-12 Don Breazeal <donb@codesourcery.com>
3341
3342 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3343 PTRACE_EVENT_VFORK_DONE.
3344 (linux_low_ptrace_options, extended_event_reported): Add vfork
3345 events.
3346 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3347 and "vforkdone" for RSP 'T' Stop Reply Packet.
3348 * server.h (report_vfork_events): Declare
3349 global variable.
3350
3a8a0396
DB
33512015-05-12 Don Breazeal <donb@codesourcery.com>
3352
3353 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3354 (the_low_target) <new_fork>: Initialize new member.
3355 * linux-arm-low.c (arm_new_fork): New function.
3356 (the_low_target) <new_fork>: Initialize new member.
3357 * linux-low.c (handle_extended_wait): Call new target function
3358 new_fork.
3359 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3360 * linux-mips-low.c (mips_add_watchpoint): New function
3361 extracted from mips_insert_point.
3362 (the_low_target) <new_fork>: Initialize new member.
3363 (mips_linux_new_fork): New function.
3364 (mips_insert_point): Call mips_add_watchpoint.
3365 * linux-x86-low.c (x86_linux_new_fork): New function.
3366 (the_low_target) <new_fork>: Initialize new member.
3367
de0d863e
DB
33682015-05-12 Don Breazeal <donb@codesourcery.com>
3369
3370 * linux-low.c (handle_extended_wait): Implement return value,
3371 rename argument 'event_child' to 'event_lwp', handle
3372 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3373 (linux_low_ptrace_options): New function.
3374 (linux_low_filter_event): Call linux_low_ptrace_options,
3375 use different argument fo linux_enable_event_reporting,
3376 use return value from handle_extended_wait.
3377 (extended_event_reported): New function.
3378 (linux_wait_1): Call extended_event_reported and set
3379 status to report fork events.
3380 (linux_write_memory): Add pid to debug message.
3381 (reset_lwp_ptrace_options_callback): New function.
3382 (linux_handle_new_gdb_connection): New function.
3383 (linux_target_ops): Initialize new structure member.
3384 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3385 * lynx-low.c: Initialize new structure member.
3386 * remote-utils.c (prepare_resume_reply): Implement stop reason
3387 "fork" for "T" stop message.
3388 * server.c (handle_query): Call handle_new_gdb_connection.
3389 * server.h (report_fork_events): Declare global flag.
3390 * target.h (struct target_ops) <handle_new_gdb_connection>:
3391 New member.
3392 (target_handle_new_gdb_connection): New macro.
3393 * win32-low.c: Initialize new structure member.
3394
ddcbc397
DB
33952015-05-12 Don Breazeal <donb@codesourcery.com>
3396
3397 * mem-break.c (APPEND_TO_LIST): Define macro.
3398 (clone_agent_expr): New function.
3399 (clone_one_breakpoint): New function.
3400 (clone_all_breakpoints): New function.
3401 * mem-break.h: Declare new functions.
3402
89245bc0
DB
34032015-05-12 Don Breazeal <donb@codesourcery.com>
3404
3405 * linux-low.c (linux_supports_fork_events): New function.
3406 (linux_supports_vfork_events): New function.
3407 (linux_target_ops): Initialize new structure members.
3408 (initialize_low): Call linux_check_ptrace_features.
3409 * lynx-low.c (lynx_target_ops): Initialize new structure
3410 members.
3411 * server.c (report_fork_events, report_vfork_events):
3412 New global flags.
3413 (handle_query): Add new features to qSupported packet and
3414 response.
3415 (captured_main): Initialize new global variables.
3416 * target.h (struct target_ops) <supports_fork_events>:
3417 New member.
3418 <supports_vfork_events>: New member.
3419 (target_supports_fork_events): New macro.
3420 (target_supports_vfork_events): New macro.
3421 * win32-low.c (win32_target_ops): Initialize new structure
3422 members.
3423
835205d0
GB
34242015-05-12 Gary Benson <gbenson@redhat.com>
3425
3426 * server.c (handle_qxfer_exec_file): Use current process
3427 if annex is empty.
3428
21e94bd9
SL
34292015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3430
3431 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3432 Remove HAVE_PTRACE_GETREGS conditionals.
3433 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3434 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3435
45614f15
YQ
34362015-05-08 Yao Qi <yao.qi@linaro.org>
3437
3438 * linux-low.c (linux_supports_conditional_breakpoints): New
3439 function.
3440 (linux_target_ops): Install new target method.
3441 * lynx-low.c (lynx_target_ops): Install NULL hook for
3442 supports_conditional_breakpoints.
3443 * nto-low.c (nto_target_ops): Likewise.
3444 * spu-low.c (spu_target_ops): Likewise.
3445 * win32-low.c (win32_target_ops): Likewise.
3446 * server.c (handle_query): Check
3447 target_supports_conditional_breakpoints.
3448 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3449 New field.
3450 (target_supports_conditional_breakpoints): New macro.
3451
80ad801e
PA
34522015-05-06 Pedro Alves <palves@redhat.com>
3453
3454 PR server/18081
3455 * server.c (start_inferior): If the process exits, mourn it.
3456
819843c7
GB
34572015-04-21 Gary Benson <gbenson@redhat.com>
3458
3459 * hostio.c (fileio_open_flags_to_host): Factored out to
3460 fileio_to_host_openflags in common/fileio.c. Single use
3461 updated.
3462
a2d5a9d7
MF
34632015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3464
3465 * linux-xtensa-low.c (xtensa_fill_gregset)
3466 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3467 XCHAL_HAVE_LOOP.
3468
deb44829
MF
34692015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3470
3471 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3472 (regs_info): Replace usrregs pointer with NULL.
3473
e57f1de3
GB
34742015-04-17 Gary Benson <gbenson@redhat.com>
3475
3476 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3477 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3478 * server.c (handle_qxfer_exec_file): New function.
3479 (qxfer_packets): Add exec-file entry.
3480 (handle_query): Report qXfer:exec-file:read as supported packet.
3481
62828379
RN
34822015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3483
3484 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3485
b88bb450
GB
34862015-04-09 Gary Benson <gbenson@redhat.com>
3487
3488 * hostio-errno.c (errno_to_fileio_error): Remove function.
3489 Update caller to use remote_fileio_to_fio_error.
3490
c8f4bfdd
YQ
34912015-04-09 Yao Qi <yao.qi@linaro.org>
3492
3493 * linux-low.c (linux_insert_point): Call
3494 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3495 (linux_remove_point): Call remove_memory_breakpoint if type is
3496 raw_bkpt_type_sw.
3497 * linux-x86-low.c (x86_insert_point): Don't call
3498 insert_memory_breakpoint.
3499 (x86_remove_point): Don't call remove_memory_breakpoint.
3500
41f98f02
PA
35012015-04-01 Pedro Alves <palves@redhat.com>
3502 Cleber Rosa <crosa@redhat.com>
3503
3504 * server.c (gdbserver_usage): Reorganize and extend the usage
3505 message.
3506
2bf6fb9d
PA
35072015-03-24 Pedro Alves <palves@redhat.com>
3508
3509 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3510 output. Also dump TRAP_TRACE.
3511 (linux_low_filter_event): In debug output, distinguish a
3512 resume_stop SIGSTOP from a delayed SIGSTOP.
3513
369f6daa
GB
35142015-03-24 Gary Benson <gbenson@redhat.com>
3515
3516 * linux-x86-low.c (x86_linux_new_thread): Moved to
3517 nat/x86-linux.c.
3518 (x86_linux_prepare_to_resume): Likewise.
3519
8e5d4070
GB
35202015-03-24 Gary Benson <gbenson@redhat.com>
3521
3522 * Makefile.in (x86-linux-dregs.o): New rule.
3523 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3524 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3525 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3526 (x86_linux_dr_get): Likewise.
3527 (x86_linux_dr_set): Likewise.
3528 (update_debug_registers_callback): Likewise.
3529 (x86_linux_dr_set_addr): Likewise.
3530 (x86_linux_dr_get_addr): Likewise.
3531 (x86_linux_dr_set_control): Likewise.
3532 (x86_linux_dr_get_control): Likewise.
3533 (x86_linux_dr_get_status): Likewise.
3534 (x86_linux_update_debug_registers): Likewise.
3535
2b95d440
GB
35362015-03-24 Gary Benson <gbenson@redhat.com>
3537
3538 * linux-x86-low.c (x86_linux_update_debug_registers):
3539 New function, factored out from...
3540 (x86_linux_prepare_to_resume): ...this.
3541
14b0bc68
GB
35422015-03-24 Gary Benson <gbenson@redhat.com>
3543
3544 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3545 (x86_linux_dr_set): Likewise.
3546 (update_debug_registers_callback): Likewise.
3547 (x86_linux_dr_set_addr): Likewise.
3548 (x86_linux_dr_get_addr): Likewise.
3549 (x86_linux_dr_set_control): Likewise.
3550 (x86_linux_dr_get_control): Likewise.
3551 (x86_linux_dr_get_status): Likewise.
3552 (x86_linux_prepare_to_resume): Likewise.
3553
5dfe6ca8
GB
35542015-03-24 Gary Benson <gbenson@redhat.com>
3555
3556 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3557 Use perror_with_name. Pass string through gettext.
3558 (x86_linux_dr_set): Likewise.
3559
d33472ad
GB
35602015-03-24 Gary Benson <gbenson@redhat.com>
3561
3562 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3563 (x86_linux_dr_set_addr): ...this.
3564 (x86_dr_low_get_addr): Rename to...
3565 (x86_linux_dr_get_addr): ...this.
3566 (x86_dr_low_set_control): Rename to...
3567 (x86_linux_dr_set_control): ...this.
3568 (x86_dr_low_get_control): Rename to...
3569 (x86_linux_dr_get_control): ...this.
3570 (x86_dr_low_get_status): Rename to...
3571 (x86_linux_dr_get_status): ...this.
3572 (x86_dr_low): Update with new function names.
3573
4b134ca1
GB
35742015-03-24 Gary Benson <gbenson@redhat.com>
3575
3576 * Makefile.in (x86-linux.o): New rule.
3577 * configure.srv: Add x86-linux.o to relevant targets.
3578 * linux-low.c (lwp_set_arch_private_info): New function.
3579 (lwp_arch_private_info): Likewise.
3580 * linux-x86-low.c: Include nat/x86-linux.h.
3581 (arch_lwp_info): Removed structure.
3582 (update_debug_registers_callback):
3583 Use lwp_set_debug_registers_changed.
3584 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3585 and lwp_set_debug_registers_changed.
3586 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3587
34c703da
GB
35882015-03-24 Gary Benson <gbenson@redhat.com>
3589
3590 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3591 * linux-arm-low.c (arm_new_thread): Likewise.
3592 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3593 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3594 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3595 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3596
cff068da
GB
35972015-03-24 Gary Benson <gbenson@redhat.com>
3598
3599 * linux-low.c (ptid_of_lwp): New function.
3600 (lwp_is_stopped): Likewise.
3601 (lwp_stop_reason): Likewise.
3602 * linux-x86-low.c (update_debug_registers_callback):
3603 Use lwp_is_stopped.
3604 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3605 lwp_stop_reason.
3606
b2f7c7e8
GB
36072015-03-24 Gary Benson <gbenson@redhat.com>
3608
3609 * linux-low.h (linux_stop_lwp): Remove declaration.
3610
6d4ee8c6
GB
36112015-03-24 Gary Benson <gbenson@redhat.com>
3612
3613 * linux-low.h: Include nat/linux-nat.h.
3614 * linux-low.c (iterate_over_lwps_args): New structure.
3615 (iterate_over_lwps_filter): New function.
3616 (iterate_over_lwps): Likewise.
3617 * linux-x86-low.c (update_debug_registers_callback):
3618 Update signature to what iterate_over_lwps expects.
3619 Remove PID check that iterate_over_lwps now performs.
3620 (x86_dr_low_set_addr): Use iterate_over_lwps.
3621 (x86_dr_low_set_control): Likewise.
3622
70a0bb6b
GB
36232015-03-24 Gary Benson <gbenson@redhat.com>
3624
3625 * linux-x86-low.c (x86_debug_reg_state): New function.
3626 (x86_linux_prepare_to_resume): Use the above.
3627
7b669087
GB
36282015-03-24 Gary Benson <gbenson@redhat.com>
3629
3630 * linux-low.c (current_lwp_ptid): New function.
3631 * linux-x86-low.c: Include nat/linux-nat.h.
3632 (x86_dr_low_get_addr): Use current_lwp_ptid.
3633 (x86_dr_low_get_control): Likewise.
3634 (x86_dr_low_get_status): Likewise.
3635
eef49a3d
PA
36362015-03-20 Pedro Alves <palves@redhat.com>
3637
3638 * tracepoint.c (cmd_qtstatus): Make "str" const.
3639
b2333d22
PA
36402015-03-20 Pedro Alves <palves@redhat.com>
3641
3642 * server.c (handle_general_set): Make "req_str" const.
3643
23f238d3
PA
36442015-03-19 Pedro Alves <palves@redhat.com>
3645
3646 * linux-low.c (linux_resume_one_lwp): Rename to ...
3647 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3648 instead call perror_with_name.
3649 (check_ptrace_stopped_lwp_gone): New function.
3650 (linux_resume_one_lwp): Reimplement as wrapper around
3651 linux_resume_one_lwp_throw that swallows errors if the LWP is
3652 gone.
3653
91baf43f
PA
36542015-03-19 Pedro Alves <palves@redhat.com>
3655
3656 * linux-low.c (count_events_callback, select_event_lwp_callback):
3657 No longer check whether the thread has resume_stop as last resume
3658 kind.
3659
8bf3b159
PA
36602015-03-19 Pedro Alves <palves@redhat.com>
3661
3662 * linux-low.c (count_events_callback, select_event_lwp_callback):
3663 Use the lwp's status_pending_p field, not the thread's.
3664
b90fc188
PA
36652015-03-19 Pedro Alves <palves@redhat.com>
3666
3667 * linux-low.c (select_event_lwp_callback): Update comments to
3668 no longer mention SIGTRAP.
3669
464b0089
GB
36702015-03-18 Gary Benson <gbenson@redhat.com>
3671
3672 * server.c (handle_query): Do not report vFile:fstat as supported.
3673
aa9e327f
GB
36742015-03-11 Gary Benson <gbenson@redhat.com>
3675
3676 * hostio.c (sys/types.h): New include.
3677 (sys/stat.h): Likewise.
3678 (common-remote-fileio.h): Likewise.
3679 (handle_fstat): New function.
3680 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 3681
791c0056
GB
36822015-03-11 Gary Benson <gbenson@redhat.com>
3683
3684 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3685 struct stat.st_blocks and struct stat.st_blksize.
3686 * configure: Regenerate.
3687 * config.in: Likewise.
3688 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3689 (OBS): Add common-remote-fileio.o.
3690 (common-remote-fileio.o): New rule.
3691
9a9df970
PA
36922015-03-09 Pedro Alves <palves@redhat.com>
3693
3694 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3695 'struct sockaddr' pointer in 'accept' call.
3696
9eb1356e
PA
36972015-03-09 Pedro Alves <palves@redhat.com>
3698
3699 Revert:
3700 2015-03-07 Pedro Alves <palves@redhat.com>
3701 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3702 or <winsock2.h> here. Instead include "gdb_socket.h".
3703 (remote_open): Use union gdb_sockaddr_u.
3704 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3705 or <winsock2.h> here. Instead include "gdb_socket.h".
3706 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3707 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3708 or <sys/un.h>.
3709 (init_named_socket, gdb_agent_helper_thread): Use union
3710 gdb_sockaddr_u.
3711
aac331e4
PA
37122015-03-07 Pedro Alves <palves@redhat.com>
3713
3714 * configure.ac (build_warnings): Move
3715 -Wdeclaration-after-statement to the C-specific set.
3716 * configure: Regenerate.
3717
366c75fc
PA
37182015-03-07 Pedro Alves <palves@redhat.com>
3719
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
492d29ea
PA
37312015-03-07 Pedro Alves <palves@redhat.com>
3732
3733 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3734 instead.
3735
60a191ed
YQ
37362015-03-06 Yao Qi <yao.qi@linaro.org>
3737
3738 * linux-aarch64-low.c (aarch64_insert_point): Use
3739 show_debug_regs as a boolean.
3740 (aarch64_remove_point): Likewise.
3741
f5771b1d
PA
37422015-03-05 Pedro Alves <palves@redhat.com>
3743
3744 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3745 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3746 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3747 * nto-low.c (nto_target_ops): Likewise.
3748 * spu-low.c (spu_target_ops): Likewise.
3749 * win32-low.c (win32_target_ops): Likewise.
3750
3e572f71
PA
37512015-03-04 Pedro Alves <palves@redhat.com>
3752
72f4393d 3753 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
3754 Decide whether a breakpoint triggered based on the SIGTRAP's
3755 siginfo.si_code.
72f4393d
L
3756 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3757 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
3758 (linux_low_filter_event): Check for breakpoints before checking
3759 watchpoints.
3760 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3761 siginfo.si_code.
72f4393d
L
3762 (linux_stopped_by_sw_breakpoint)
3763 (linux_supports_stopped_by_sw_breakpoint)
3764 (linux_stopped_by_hw_breakpoint)
3765 (linux_supports_stopped_by_hw_breakpoint): New functions.
3766 (linux_target_ops): Install new target methods.
3e572f71 3767
1ec68e26
PA
37682015-03-04 Pedro Alves <palves@redhat.com>
3769
3770 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3771 * server.c (swbreak_feature, hwbreak_feature): New globals.
3772 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3773 (captured_main): Clear swbreak_feature and hwbreak_feature.
3774 * server.h (swbreak_feature, hwbreak_feature): Declare.
3775 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3776 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3777 supports_stopped_by_hw_breakpoint>: New fields.
3778 (target_supports_stopped_by_sw_breakpoint)
3779 (target_stopped_by_sw_breakpoint)
3780 (target_supports_stopped_by_hw_breakpoint)
3781 (target_stopped_by_hw_breakpoint): Declare.
3782
15c66dd6
PA
37832015-03-04 Pedro Alves <palves@redhat.com>
3784
3785 enum lwp_stop_reason -> enum target_stop_reason
3786 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3787 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3788 (linux_wait_1, stuck_in_jump_pad_callback)
3789 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3790 (linux_stopped_by_watchpoint):
3791 * linux-low.h (enum lwp_stop_reason): Delete.
3792 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3793 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3794
98fc70d6
YQ
37952015-03-04 Yao Qi <yao.qi@linaro.org>
3796
3797 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3798
dd2ac174
GB
37992015-03-03 Gary Benson <gbenson@redhat.com>
3800
3801 * hostio.c (handle_vFile): Fix prefix lengths.
3802
d68e53f4
MM
38032015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3804
3805 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3806 ptr_bits.
3807
bf2d68ab
AA
38082015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3809
3810 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3811 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3812 (clean): Add "rm -f" for above C files.
3813 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3814 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3815 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3816 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3817 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3818 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3819 (init_registers_s390x_vx_linux64)
3820 (init_registers_s390x_tevx_linux64)
3821 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3822 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3823 declarations.
3824 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3825 (s390_store_vxrs_high): New functions.
3826 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3827 NT_S390_VXRS_HIGH.
3828 (s390_arch_setup): Add logic for selecting one of the new target
3829 descriptions. Activate the new vector regsets if applicable.
3830 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3831 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3832 and init_registers_s390x_tevx_linux64.
3833
c966a859
PA
38342015-03-01 Pedro Alves <palves@redhat.com>
3835
3836 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3837 parameter.
3838
4180215b
PA
38392015-02-27 Pedro Alves <palves@redhat.com>
3840
3841 * linux-x86-low.c (u_debugreg_offset): New function.
3842 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3843
749bab01
PA
38442015-02-27 Pedro Alves <palves@redhat.com>
3845
3846 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3847 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3848 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3849 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3850 (ps_lsetfpregs, ps_getpid)
3851 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3852 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3853 (ps_lsetxregs, ps_plog): Declare.
3854
3c14e5a3
PA
38552015-02-27 Pedro Alves <palves@redhat.com>
3856
3857 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3858 IP_AGENT_EXPORT_FUNC.
3859 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3860 IP_AGENT_EXPORT_FUNC.
3861 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3862 (IP_AGENT_EXPORT): Delete.
3863 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3864 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3865 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3866 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3867 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3868 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3869 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3870 (traceframe_read_count, traceframe_write_count)
3871 (traceframes_created, trace_state_variables, get_raw_reg)
3872 (get_trace_state_variable_value, set_trace_state_variable_value)
3873 (ust_loaded, helper_thread_id, cmd_buf): Use
3874 IPA_SYM_EXPORTED_NAME.
3875 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3876 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3877 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3878 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3879 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3880 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3881 EXTERN_C_PUSH/EXTERN_C_POP.
3882 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3883 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3884 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3885 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3886 (traceframe_write_count, traceframe_read_count)
3887 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3888 (about_to_request_buffer_space, get_trace_state_variable_value)
3889 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3890 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3891 EXTERN_C_PUSH/EXTERN_C_POP.
3892 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3893 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3894 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3895 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3896 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3897 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3898 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3899 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3900 Define.
3901 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3902 (IP_AGENT_EXPORT_VAR_DECL): Define.
3903 (tracing): Declare.
3904 (gdb_agent_get_raw_reg): Declare.
3905
fe978cb0
PA
39062015-02-27 Tom Tromey <tromey@redhat.com>
3907 Pedro Alves <palves@redhat.com>
3908
3909 Rename symbols whose names are reserved C++ keywords throughout.
3910
3bc3d82a
PA
39112015-02-27 Pedro Alves <palves@redhat.com>
3912
3913 * Makefile.in (COMPILER): New, get it from autoconf.
3914 (CXX): Get from autoconf instead.
3915 (COMPILE.pre): Use COMPILER.
3916 (CC-LD): Rename to ...
3917 (CC_LD): ... this. Use COMPILER.
3918 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3919 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3920 * acinclude.m4: Include build-with-cxx.m4.
3921 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3922 Disable -Werror by default if building in C++ mode.
3923 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3924 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3925 the C++ compiler. Save/restore CXXFLAGS too.
3926 * configure: Regenerate.
3927
07697489
PA
39282015-02-27 Pedro Alves <palves@redhat.com>
3929
3930 * acinclude.m4: Include libiberty.m4.
3931 * configure.ac: Call libiberty_INIT.
3932 * config.in, configure: Regenerate.
3933
9beb7c4e
PA
39342015-02-26 Pedro Alves <palves@redhat.com>
3935
3936 * linux-low.c (linux_wait_1): When incrementing the PC past a
3937 program breakpoint always use the_low_target.breakpoint_len as
3938 increment, rather than the maximum between that and
3939 the_low_target.decr_pc_after_break.
3940
8090aef2
PA
39412015-02-23 Pedro Alves <palves@redhat.com>
3942
3943 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3944 thread was doing a step-over; always adjust the PC if
3945 we stepped over a permanent breakpoint.
3946 (linux_wait_1): If we stepped over breakpoint that was on top of a
3947 permanent breakpoint, manually advance the PC past it.
3948
bc9540e8
PA
39492015-02-23 Pedro Alves <palves@redhat.com>
3950
3951 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3952 modes.
3953 (x86_fill_gregset, x86_store_gregset): Use it when handling
3954 $orig_eax.
3955
2db9a427
PA
39562015-02-20 Pedro Alves <palves@redhat.com>
3957
3958 * thread-db.c: Include "nat/linux-procfs.h".
3959 (thread_db_init): Skip listing new threads if the kernel supports
3960 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3961
afa8d396
PA
39622015-02-20 Pedro Alves <palves@redhat.com>
3963
3964 * linux-low.c (status_pending_p_callback): Use ptid_match.
3965
c9587f88
AT
39662015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3967
3968 PR breakpoints/16812
3969 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3970 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3971 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3972
b05ec7a5
AT
39732015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3974
3975 PR breakpoints/15956
3976 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3977
d33501a5
MM
39782015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3979
3980 * linux-low.c (linux_low_btrace_conf): Print size.
3981 * server.c (handle_btrace_conf_general_set): New.
3982 (hanle_general_set): Call handle_btrace_conf_general_set.
3983 (handle_query): Report Qbtrace-conf:bts:size as supported.
3984
f4abbc16
MM
39852015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3986
3987 * linux-low.c (linux_low_enable_btrace): Update parameters.
3988 (linux_low_btrace_conf): New.
3989 (linux_target_ops)<to_btrace_conf>: Initialize.
3990 * server.c (current_btrace_conf): New.
3991 (handle_btrace_enable): Rename to ...
3992 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
3993 to target_enable_btrace. Update comment. Update users.
3994 (handle_qxfer_btrace_conf): New.
3995 (qxfer_packets): Add btrace-conf entry.
3996 (handle_query): Report qXfer:btrace-conf:read as supported packet.
3997 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3998 (target_ops)<read_btrace_conf>: New.
3999 (target_enable_btrace): Update parameters.
4000 (target_read_btrace_conf): New.
4001
043c3577
MM
40022015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4003
4004 * server.c (handle_btrace_general_set): Remove call to
4005 target_supports_btrace.
4006 (supported_btrace_packets): New.
4007 (handle_query): Call supported_btrace_packets.
4008 * target.h: include btrace-common.h.
4009 (btrace_target_info): Removed.
4010 (supports_btrace, target_supports_btrace): Update parameters.
4011
734b0e4b
MM
40122015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4013
4014 * Makefile.in (SFILES): Add common/btrace-common.c.
4015 (OBS): Add common/btrace-common.o.
4016 (btrace-common.o): Add build rules.
4017 * linux-low: Include btrace-common.h.
4018 (linux_low_read_btrace): Use struct btrace_data. Call
4019 btrace_data_init and btrace_data_fini.
4020
d6c146e9
PA
40212015-02-06 Pedro Alves <palves@redhat.com>
4022
4023 * thread-db.c (find_new_threads_callback): Add debug output.
4024
20ba1ce6
PA
40252015-02-04 Pedro Alves <palves@redhat.com>
4026
4027 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4028 (resume_stopped_resumed_lwps): New function.
4029 (linux_wait_for_event_filtered): Use it.
4030
8cc73a39
SDJ
40312015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4032
4033 * Makefile.in (SFILES): Add linux-personality.c.
4034 (linux-personality.o): New rule.
4035 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4036 list of objects to be built.
4037 * linux-low.c: Include nat/linux-personality.h.
4038 (linux_create_inferior): Remove code to disable address space
4039 randomization (moved to ../nat/linux-personality.c). Create
4040 cleanup to disable address space randomization.
4041
fb23d554
SDJ
40422015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4043
4044 * Makefile.in (posix-strerror.o): New rule.
4045 (mingw-strerror.o): Likewise.
4046 * configure: Regenerated.
4047 * configure.ac: Source file ../common/common.host. Initialize new
4048 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4049
cdf43629
YQ
40502015-01-14 Yao Qi <yao@codesourcery.com>
4051
4052 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4053 (ppc-linux.o): New rule.
4054 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4055 * configure.ac: AC_CHECK_FUNCS(getauxval).
4056 * config.in: Re-generated.
4057 * configure: Re-generated.
4058 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4059 ppc64_64bit_inferior_p
4060
514c5338
YQ
40612015-01-14 Yao Qi <yao@codesourcery.com>
4062
4063 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4064 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4065 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4066 (PT_ORIG_R3, PT_TRAP): Likewise.
4067 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4068 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4069 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4070
3368c1e5
JB
40712015-01-10 Joel Brobecker <brobecker@adacore.com>
4072
4073 * i387-fp.c (i387_cache_to_xsave): In look over
4074 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4075 zmmh_low_space field by use of zmmh_high_space.
4076
582511be
PA
40772015-01-09 Pedro Alves <palves@redhat.com>
4078
4079 * linux-low.c (step_over_bkpt): Move higher up in the file.
4080 (handle_extended_wait): Don't store the stop_pc here.
4081 (get_stop_pc): Adjust comments and rename to ...
4082 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4083 stopped for a software breakpoint or hardware breakpoint.
4084 (thread_still_has_status_pending_p): New function.
4085 (status_pending_p_callback): Use
4086 thread_still_has_status_pending_p. If the event is no longer
4087 interesting, resume the LWP.
4088 (handle_tracepoints): Add assert.
4089 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4090 (wstatus_maybe_breakpoint): New function.
4091 (cancel_breakpoint): Delete function.
4092 (check_stopped_by_watchpoint): New function, factored out from
4093 linux_low_filter_event.
4094 (lp_status_maybe_breakpoint): Delete function.
4095 (linux_low_filter_event): Remove filter_ptid argument.
4096 Leave thread group exits pending here. Store the LWP's stop PC.
4097 Always leave events pending.
4098 (linux_wait_for_event_filtered): Pull all events out of the
4099 kernel, and leave them all pending.
4100 (count_events_callback, select_event_lwp_callback): Consider all
4101 events.
4102 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4103 (select_event_lwp): Only give preference to the stepping LWP in
4104 all-stop mode. Adjust comments.
4105 (ignore_event): New function.
4106 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4107 references to cancel_breakpoints. Adjust to renames. Also give
4108 equal priority to all LWPs that have had events in non-stop mode.
4109 If reporting a software breakpoint event, unadjust the LWP's PC.
4110 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4111 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4112 Adjust.
4113 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4114 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4115 (linux_stopped_by_watchpoint): Adjust.
4116 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4117 * linux-low.h (enum lwp_stop_reason): New.
4118 (struct lwp_info) <stop_pc>: Adjust comment.
4119 <stopped_by_watchpoint>: Delete field.
4120 <stop_reason>: New field.
4121 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4122 * mem-break.c (software_breakpoint_inserted_here)
4123 (hardware_breakpoint_inserted_here): New function.
4124 * mem-break.h (software_breakpoint_inserted_here)
4125 (hardware_breakpoint_inserted_here): Declare.
4126 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4127 (cancel_breakpoints): Delete.
4128 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4129 (upload_fast_traceframes): Remove references to
4130 cancel_breakpoints.
4131
a33e3959
PA
41322015-01-09 Pedro Alves <palves@redhat.com>
4133
4134 * thread-db.c (find_new_threads_callback): Ignore thread if the
4135 kernel thread ID is -1.
4136
8784d563
PA
41372015-01-09 Pedro Alves <palves@redhat.com>
4138
4139 * linux-low.c (linux_attach_fail_reason_string): Move to
4140 nat/linux-ptrace.c, and rename.
4141 (linux_attach_lwp): Update comment.
4142 (attach_proc_task_lwp_callback): New function.
4143 (linux_attach): Adjust to rename and use
4144 linux_proc_attach_tgid_threads.
4145 (linux_attach_fail_reason_string): Delete declaration.
4146
76f2b779
JB
41472015-01-01 Joel Brobecker <brobecker@adacore.com>
4148
4149 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4150 * server.c (gdbserver_version): Likewise.
4151
fafcc06a
SDJ
41522014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4153
4154 * remote-utils.c: Include ctype.h.
4155 (input_interrupt): Explicitly handle the case when the char
4156 received is the NUL byte. Improve the printing of non-ASCII
4157 characters.
4158
beed38b8
JB
41592014-12-16 Joel Brobecker <brobecker@adacore.com>
4160
4161 * linux-low.c (linux_low_filter_event): Update call to
4162 linux_enable_event_reporting following the addition of
4163 a new parameter to that function.
4164
bf330350
CU
41652014-12-16 Catalin Udma <catalin.udma@freescale.com>
4166
4167 PR server/17457
4168 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4169 (AARCH64_FPCR_REGNO): Likewise.
4170 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4171 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4172 (aarch64_store_fpregset): Likewise.
4173
5227d625
JB
41742014-12-15 Joel Brobecker <brobecker@adacore.com>
4175
4176 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4177 Remove FIXME comment about assumption about N.
4178
f93b65a0
JB
41792014-12-13 Joel Brobecker <brobecker@adacore.com>
4180
4181 * configure.ac: If large-file support is disabled in GDBserver,
4182 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4183 * configure: Regenerate.
4184
e5a9158d
AA
41852014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4186
4187 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4188 warning upon ENODATA from ptrace.
4189 * linux-s390-low.c (s390_store_tdb): New.
4190 (s390_regsets): Add regset for NT_S390_TDB.
4191
feea5f36
AA
41922014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4193
4194 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4195 without a fill_function.
4196 * linux-s390-low.c (s390_fill_last_break): Remove.
4197 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4198 (s390_arch_setup): Use regset's size instead of fill_function for
4199 loop end condition.
4200
098dbe61
AA
42012014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4202
4203 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4204 the regset's store function when ptrace returned an error.
4205 * regcache.c (get_thread_regcache): Invalidate register cache
4206 before fetching inferior's registers.
4207
28eef672
AA
42082014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4209
4210 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4211 while-loop as for-loop.
4212 (regsets_store_inferior_registers): Likewise.
4213
bdca27a2
YQ
42142014-11-28 Yao Qi <yao@codesourcery.com>
4215
4216 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4217 * config.in, configure: Re-generate.
4218 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4219 is defined.
4220
9c232dda
YQ
42212014-11-21 Yao Qi <yao@codesourcery.com>
4222
4223 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4224 (AC_CHECK_HEADERS): Remove malloc.h.
4225 * configure: Re-generated.
4226 * config.in: Re-generated.
4227 * server.h: Don't include alloca.h and malloc.h.
4228 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4229 Don't include malloc.h.
4230
43968415
JB
42312014-11-17 Joel Brobecker <brobecker@adacore.com>
4232
4233 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4234 corresponding ERRNO check in same block.
4235
40e91bc7
PA
42362014-11-12 Pedro Alves <palves@redhat.com>
4237
4238 * server.c (cont_thread): Update comment.
4239 (start_inferior, attach_inferior): No longer clear cont_thread.
4240 (handle_v_cont): No longer set cont_thread.
4241 (captured_main): Clear cont_thread each time a GDB connects.
4242
c2c118cf
PA
42432014-11-12 Pedro Alves <palves@redhat.com>
4244
4245 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4246 thread, and don't resume all threads if the Hc thread has exited.
4247
78708b7c
PA
42482014-11-12 Pedro Alves <palves@redhat.com>
4249
4250 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4251 the process group instead of to a specific LWP.
4252
a2abc7de
PA
42532014-10-15 Pedro Alves <palves@redhat.com>
4254
4255 PR server/17487
4256 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4257 parameter.
4258 (arm_set_thread_context): Delete.
4259 (the_low_target): Adjust.
4260 * win32-i386-low.c (debug_registers_changed)
4261 (debug_registers_used): Delete.
4262 (update_debug_registers_callback): New function.
4263 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4264 needing to update their debug registers.
4265 (win32_get_current_dr): New function.
4266 (x86_dr_low_get_addr, x86_dr_low_get_control)
4267 (x86_dr_low_get_status): Fetch the debug register from the thread
4268 record's context.
4269 (i386_initial_stuff): Adjust.
4270 (i386_get_thread_context): Remove current_event parameter. Don't
4271 clear debug_registers_changed nor copy DR values to
4272 debug_reg_state.
4273 (i386_set_thread_context): Delete.
4274 (i386_prepare_to_resume): New function.
4275 (i386_thread_added): Mark the thread as needing to update irs
4276 debug registers.
4277 (the_low_target): Remove i386_set_thread_context and install
4278 i386_prepare_to_resume.
4279 * win32-low.c (win32_get_thread_context): Adjust.
4280 (win32_set_thread_context): Use SetThreadContext
4281 directly.
4282 (win32_prepare_to_resume): New function.
4283 (win32_require_context): New function, factored out from ...
4284 (thread_rec): ... this.
4285 (continue_one_thread): Call win32_prepare_to_resume on each thread
4286 we're about to continue.
4287 (win32_resume): Call win32_prepare_to_resume on the event thread.
4288 * win32-low.h (struct win32_thread_info)
4289 <debug_registers_changed>: New field.
4290 (struct win32_target_ops): Change prototype of set_thread_context,
4291 delete set_thread_context and add prepare_to_resume.
4292 (win32_require_context): New declaration.
4293
a442d071
GB
42942014-10-08 Gary Benson <gbenson@redhat.com>
4295
4296 * server.h: Do not include common-exceptions.h.
4297
6f1947e8
GB
42982014-10-08 Gary Benson <gbenson@redhat.com>
4299
4300 * server.h: Do not include cleanups.h.
4301
63b434a4
JH
43022014-09-30 James Hogan <james.hogan@imgtec.com>
4303
4304 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4305 mips64-dsp-linux.c.
4306
c4d9ceb6
YQ
43072014-09-23 Yao Qi <yao@codesourcery.com>
4308
4309 * linux-low.c (lp_status_maybe_breakpoint): New function.
4310 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4311 (count_events_callback): Likewise.
4312 (select_event_lwp_callback): Likewise.
4313 (cancel_breakpoints_callback): Likewise.
4314
89a5711c
DB
43152014-09-19 Don Breazeal <donb@codesourcery.com>
4316
4317 * linux-low.c (handle_extended_wait): Call
4318 linux_ptrace_get_extended_event.
4319 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4320 linux_is_extended_waitstatus.
4321
bffc0964
JB
43222014-09-16 Joel Brobecker <brobecker@adacore.com>
4323
4324 * Makefile.in (CPPFLAGS): Define.
4325 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4326 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4327
0bfdf32f
GB
43282014-09-16 Gary Benson <gbenson@redhat.com>
4329
4330 * inferiors.h (current_inferior): Renamed as...
4331 (current_thread): New variable. All uses updated.
4332 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4333 (maybe_move_out_of_jump_pad): Likewise.
4334 (cancel_breakpoint): Likewise.
4335 (linux_low_filter_event): Likewise.
4336 (wait_for_sigstop): Likewise.
4337 (linux_resume_one_lwp): Likewise.
4338 (need_step_over_p): Likewise.
4339 (start_step_over): Likewise.
4340 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4341 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4342 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4343 and save_inferior as saved_thread.
4344 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4345 saved_thread.
4346 (regcache_invalidate_thread): Likewise.
4347 * remote-utils.c (prepare_resume_reply): Likewise.
4348 * thread-db.c (thread_db_get_tls_address): Likewise.
4349 (disable_thread_event_reporting): Likewise.
4350 (remove_thread_event_breakpoints): Likewise.
4351 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4352 as saved_thread.
4353 * target.h (set_desired_inferior): Renamed as...
4354 (set_desired_thread): New declaration. All uses updated.
4355 * server.c (myresume): Updated comment to reference thread instead
4356 of inferior.
4357 (handle_serial_event): Likewise.
4358 (handle_target_event): Likewise.
4359
361c8ade
GB
43602014-09-12 Tom Tromey <tromey@redhat.com>
4361 Gary Benson <gbenson@redhat.com>
4362
4363 * regcache.h: Include common-regcache.h.
4364 (regcache_read_pc): Don't declare.
4365 * regcache.c (get_thread_regcache_for_ptid): New function.
4366
bd9269f7
GB
43672014-09-11 Tom Tromey <tromey@redhat.com>
4368 Gary Benson <gbenson@redhat.com>
4369
4370 * symbol.c: New file.
4371 * Makefile.in (SFILES): Add symbol.c.
4372 (OBS): Add symbol.o.
4373
f8c1d06b
GB
43742014-09-11 Gary Benson <gbenson@redhat.com>
4375
4376 * target.c (target_stop_ptid, target_continue_ptid): New
4377 functions.
4378
721ec300
GB
43792014-09-11 Tom Tromey <tromey@redhat.com>
4380 Gary Benson <gbenson@redhat.com>
4381
4382 * target.h: Include target/target.h.
4383 * target.c (target_read_memory, target_read_uint32)
4384 (target_write_memory): New functions.
4385
c5e92cca
GB
43862014-09-11 Gary Benson <gbenson@redhat.com>
4387
4388 * server.h (debug_hw_points): Don't declare.
4389 * server.c (debug_hw_points): Don't define. Replace all uses
4390 with show_debug_regs.
4391 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4392 all uses with show_debug_regs.
4393
2e4bb98a
EBM
43942014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4395
4396 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4397 endianness into account.
4398 (ppc_supply_ptrace_register): Likewise.
4399
ac740bc7
JH
44002014-09-03 James Hogan <james.hogan@imgtec.com>
4401
4402 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4403 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4404
97ea6506
GB
44052014-09-03 Gary Benson <gbenson@redhat.com>
4406
4407 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4408 ALL_DEBUG_ADDRESS_REGISTERS.
4409
df7e5265
GB
44102014-09-02 Gary Benson <gbenson@redhat.com>
4411
4412 * i386-low.h: Renamed as...
4413 * x86-low.h: New file. All type, function and variable name
4414 prefixes changed from "i386_" to "x86_". All references updated.
4415 * i386-low.c: Renamed as...
4416 * x86-low.c: New file. All type, function and variable name
4417 prefixes changed from "i386_" to "x86_". All references updated.
4418
ed859da7
GB
44192014-09-02 Gary Benson <gbenson@redhat.com>
4420
4421 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4422 (x86_linux_new_thread): Likewise.
4423
860789c7
GB
44242014-08-29 Gary Benson <gbenson@redhat.com>
4425
4426 * server.h (setjmp.h): Do not include.
4427 (toplevel): Do not declare.
4428 (common-exceptions.h): Include.
4429 (cleanups.h): Likewise.
4430 * server.c (toplevel): Do not define.
4431 (exit_code): New static global.
4432 (detach_or_kill_for_exit_cleanup): New function.
4433 (main): New function. Original main renamed to...
4434 (captured_main): New function.
4435 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4436
ff55e1b5
GB
44372014-08-29 Gary Benson <gbenson@redhat.com>
4438
4439 * Makefile.in (SFILES): Add common/common-exceptions.c.
4440 (OBS): Add common-exceptions.o.
4441 (common-exceptions.o): New rule.
4442 * utils.c (prepare_to_throw_exception): New function.
4443
e9bcb658
GB
44442014-08-29 Gary Benson <gbenson@redhat.com>
4445
4446 * config.in: Regenerate.
4447 * configure: Likewise.
4448
e3180625
GB
44492014-08-29 Gary Benson <gbenson@redhat.com>
4450
4451 * Makefile.in (SFILES): Add common/cleanups.c.
4452 (OBS): cleanups.o.
4453 (cleanups.o): New rule.
4454
e3d6ba5d
GB
44552014-08-29 Gary Benson <gbenson@redhat.com>
4456
4457 * utils.c (internal_vwarning): New function.
4458
7096e886
GB
44592014-08-28 Gary Benson <gbenson@redhat.com>
4460
4461 * utils.h (fatal): Remove declaration.
4462 * utils.c (fatal): Remove function.
4463
14ce3192
GB
44642014-08-28 Gary Benson <gbenson@redhat.com>
4465
4466 * tracepoint.c (gdb_agent_init): Replace fatal with
4467 perror_with_name.
4468 (initialize_tracepoint): Likewise.
4469
50278d59
GB
44702014-08-28 Gary Benson <gbenson@redhat.com>
4471
4472 * remote-utils.c (remote_prepare): Replace fatal with error.
4473
aa96c426
GB
44742014-08-28 Gary Benson <gbenson@redhat.com>
4475
4476 * linux-low.c (linux_async): Replace fatal with warning.
4477 Tidy up and return.
4478 (linux_start_non_stop): Return -1 if linux_async failed.
4479
f7160e97
GB
44802014-08-28 Gary Benson <gbenson@redhat.com>
4481
4482 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4483 gdb_assert.
4484 (i386_dr_low_get_addr): Remove vague comment.
4485 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4486 gdb_assert.
4487
38e08fca
GB
44882014-08-28 Gary Benson <gbenson@redhat.com>
4489
4490 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4491 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4492 internal_error.
4493 (linux_resume_one_lwp): Likewise.
4494 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4495 gdb_assert.
4496 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4497 with internal_error.
4498 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4499 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4500 (find_register_by_name): Replace fatal with internal_error.
4501 (find_regno): Likewise.
4502 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4503 * thread-db.c (thread_db_create_event): Likewise.
4504 (thread_db_load_search): Likewise.
4505 (try_thread_db_load_1): Likewise.
4506 * tracepoint.c (get_jump_space_head): Replace fatal with
4507 internal_error.
4508 (claim_trampoline_space): Likewise.
4509 (have_fast_tracepoint_trampoline_buffer): Likewise.
4510 (cmd_qtstart): Likewise.
4511 (stop_tracing): Likewise.
4512 (fast_tracepoint_collecting): Likewise.
4513 (target_malloc): Likewise.
4514 (download_tracepoint): Likewise.
4515 (download_trace_state_variables): Replace check with gdb_assert.
4516 (upload_fast_traceframes): Replace fatal with internal_error.
4517
34abf635
GB
45182014-08-19 Tom Tromey <tromey@redhat.com>
4519 Gary Benson <gbenson@redhat.com>
4520
4521 * Makefile.in (SFILES): Add common/common-debug.c.
4522 (OBS): Add common-debug.o.
4523 (common-debug.o): New rule.
4524 * debug.h (debug_printf): Don't declare.
4525 * debug.c (debug_printf): Renamed and rewritten as...
4526 (debug_vprintf): New function.
4527
f6e94d78
GB
45282014-08-19 Gary Benson <gbenson@redhat.com>
4529
4530 * utils.h: Do not include print-utils.h.
4531
9239eeab
GB
45322014-08-19 Tom Tromey <tromey@redhat.com>
4533 Gary Benson <gbenson@redhat.com>
4534
4535 * server.h: Add static assertion.
4536 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4537
ef87c8bb
GB
45382014-08-19 Tom Tromey <tromey@redhat.com>
4539 Gary Benson <gbenson@redhat.com>
4540
4541 * Makefile.in (SFILES): Add common/errors.c.
4542 (OBS): Add errors.o.
4543 (IPA_OBS): Add errors-ipa.o.
4544 (errors.o): New rule.
4545 (errors-ipa.o): Likewise.
4546 * utils.h (perror_with_name, error, warning): Don't declare.
4547 * utils.c (warning): Renamed and rewritten as...
4548 (vwarning): New function.
4549 (error): Renamed and rewritten as...
4550 (verror): New function.
4551 (internal_error): Renamed and rewritten as...
4552 (internal_verror): New function.
4553
bb974a24
GB
45542014-08-07 Gary Benson <gbenson@redhat.com>
4555
4556 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4557 * configure: Regenerate.
4558 * config.in: Likewise.
4559 * server.h: Do not include errno.h.
4560 * event-loop.c: Likewise.
4561 * hostio-errno.c: Likewise.
4562 * linux-low.c: Likewise.
4563 * remote-utils.c: Likewise.
4564 * spu-low.c: Likewise.
4565 * utils.c: Likewise.
4566 * gdbreplay.c: Unconditionally include errno.h.
4567
6d3d12eb
GB
45682014-08-07 Gary Benson <gbenson@redhat.com>
4569
4570 * server.h: Do not include string.h.
4571 * event-loop.c: Likewise.
4572 * linux-low.c: Likewise.
4573 * regcache.c: Likewise.
4574 * remote-utils.c: Likewise.
4575 * spu-low.c: Likewise.
4576 * utils.c: Likewise.
4577
dccbb609
GB
45782014-08-07 Gary Benson <gbenson@redhat.com>
4579
4580 * server.h: Do not include gdb_assert.h.
4581
e76df0d0
GB
45822014-08-07 Gary Benson <gbenson@redhat.com>
4583
4584 * server.h: Do not include common-utils.h.
4585
4cb9c816
GB
45862014-08-07 Gary Benson <gbenson@redhat.com>
4587
4588 * server.h: Do not include ptid.h.
4589 * notif.h: Likewise.
4590
3995eeee
GB
45912014-08-07 Gary Benson <gbenson@redhat.com>
4592
4593 * server.h: Do not include gdb_locale.h.
4594
cb9f1a9b
GB
45952014-08-07 Gary Benson <gbenson@redhat.com>
4596
4597 * server.h: Do not include gdb/signals.h.
4598 * win32-low.c: Likewise.
4599
a5fceff8
GB
46002014-08-07 Gary Benson <gbenson@redhat.com>
4601
4602 * server.h: Do not include pathmax.h.
4603
b9391142
GB
46042014-08-07 Gary Benson <gbenson@redhat.com>
4605
4606 * server.h: Do not include libiberty.h.
4607 * linux-bfin-low.c: Likewise.
4608
0e443c87
GB
46092014-08-07 Gary Benson <gbenson@redhat.com>
4610
4611 * server.h: Do not include ansidecl.h.
4612
8ebb3f56
GB
46132014-08-07 Gary Benson <gbenson@redhat.com>
4614
4615 * linux-x86-low.c: Do not include stddef.h.
4616 * lynx-ppc-low.c: Likewise.
4617 * tracepoint.c: Likewise.
4618
8980bdf6
GB
46192014-08-07 Gary Benson <gbenson@redhat.com>
4620
4621 * server.h: Do not include stdarg.h.
4622 * nto-low.c: Likewise.
4623
d7096f71
GB
46242014-08-07 Gary Benson <gbenson@redhat.com>
4625
4626 * server.h: Do not include stdlib.h.
4627 * inferiors.c: Likewise.
4628 * linux-low.c: Likewise.
4629 * regcache.c: Likewise.
4630 * spu-low.c: Likewise.
4631 * tracepoint.c: Likewise.
4632 * utils.c: Likewise.
4633
d02f550d
GB
46342014-08-07 Gary Benson <gbenson@redhat.com>
4635
4636 * server.h: Do not include stdio.h.
4637 * linux-low.c: Likewise.
4638 * remote-utils.c: Likewise.
4639 * spu-low.c: Likewise.
4640 * utils.c: Likewise.
4641 * wincecompat.c: Likewise.
4642
87f6c4e3
GB
46432014-08-06 Gary Benson <gbenson@redhat.com>
4644
4645 * regcache.c (init_register_cache): Move conditionals inside if.
4646
7089dca4
GB
46472014-08-06 Gary Benson <gbenson@redhat.com>
4648
4649 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4650
462f517e
GB
46512014-07-31 Gary Benson <gbenson@redhat.com>
4652
4653 * ax.h: Do not include server.h.
4654 * gdbthread.h: Likewise.
4655 * lynx-low.h: Likewise.
4656 * notif.h: Likewise.
4657
976411d6
GB
46582014-07-30 Gary Benson <gbenson@redhat.com>
4659
4660 * server.h: Include common-defs.h.
4661 Do not include config.h or build-gnulib-gdbserver/config.h.
4662
d41f6d8e
GB
46632014-07-30 Gary Benson <gbenson@redhat.com>
4664
4665 * hostio-errno.c: Move server.h to top of includes list.
4666 * inferiors.c: Likewise.
4667 * linux-x86-low.c: Likewise.
4668 * notif.c: Include server.h.
4669
314c6a35
TT
46702014-07-24 Tom Tromey <tromey@redhat.com>
4671 Gary Benson <gbenson@redhat.com>
4672
4673 * server.h (CORE_ADDR): Now unsigned.
4674
69ff6be5
PA
46752014-07-16 Pedro Alves <palves@redhat.com>
4676
4677 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4678
ce9e3fe7
PA
46792014-07-15 Pedro Alves <palves@redhat.com>
4680
4681 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4682 copy.
4683
e76126e8
PA
46842014-07-11 Pedro Alves <palves@redhat.com>
4685
4686 * linux-low.c (kill_wait_lwp): New function, based on
4687 kill_one_lwp_callback, but use my_waitpid directly.
4688 (kill_one_lwp_callback, linux_kill): Use it.
4689
8e9db26e
PA
46902014-06-23 Pedro Alves <palves@redhat.com>
4691
4692 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4693 before setting DR0..DR3.
4694
698b3e08
GB
46952014-06-20 Gary Benson <gbenson@redhat.com>
4696
4697 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4698 * configure: Regenerated.
4699 * config.in: Likewise.
4700
125f8a3d
GB
47012014-06-20 Gary Benson <gbenson@redhat.com>
4702
4703 * Makefile.in (SFILES): Update locations for files moved
4704 from common to nat.
4705 (object file files): Reordered.
4706
42995dbd
GB
47072014-06-20 Gary Benson <gbenson@redhat.com>
4708
4709 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4710 (i386_dr_low_set_addr): Likewise.
4711 (i386_dr_low_get_addr): Likewise.
4712 (i386_dr_low_can_set_control): Likewise.
4713 (i386_dr_low_set_control): Likewise.
4714 (i386_dr_low_get_control): Likewise.
4715 (i386_dr_low_get_status): Likewise.
4716 (i386_get_debug_register_length): Likewise.
4717 * linux-x86-low.c (i386_dr_low_set_addr):
4718 Changed signature. Made static.
4719 (i386_dr_low_get_addr): Likewise.
4720 (i386_dr_low_set_control): Likewise.
4721 (i386_dr_low_get_control): Likewise.
4722 (i386_dr_low_get_status): Likewise.
4723 (i386_dr_low): New global variable.
4724 * win32-i386-low.c (i386_dr_low_set_addr):
4725 Changed signature. Made static.
4726 (i386_dr_low_get_addr): Likewise.
4727 (i386_dr_low_set_control): Likewise.
4728 (i386_dr_low_get_control): Likewise.
4729 (i386_dr_low_get_status): Likewise.
4730 (i386_dr_low): New global variable.
4731
e1d2394b
MS
47322014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4733
4734 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4735 * Makefile.in (AR, AR_FLAGS): Define.
4736 * configure: Regenerate.
4737
3a8ee006
GB
47382014-06-19 Gary Benson <gbenson@redhat.com>
4739
4740 * Makefile.in (i386-dregs.o): New rule.
4741 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4742 * i386-low.c (target.h): Remove include.
4743 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4744 (DR_CONTROL_SHIFT): Likewise.
4745 (DR_CONTROL_SIZE): Likewise.
4746 (DR_RW_EXECUTE): Likewise.
4747 (DR_RW_WRITE): Likewise.
4748 (DR_RW_READ): Likewise.
4749 (DR_RW_IORW): Likewise.
4750 (DR_LEN_1): Likewise.
4751 (DR_LEN_2): Likewise.
4752 (DR_LEN_4): Likewise.
4753 (DR_LEN_8): Likewise.
4754 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4755 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4756 (DR_ENABLE_SIZE): Likewise.
4757 (DR_LOCAL_SLOWDOWN): Likewise.
4758 (DR_GLOBAL_SLOWDOWN): Likewise.
4759 (DR_CONTROL_RESERVED): Likewise.
4760 (I386_DR_CONTROL_MASK): Likewise.
4761 (I386_DR_VACANT): Likewise.
4762 (I386_DR_LOCAL_ENABLE): Likewise.
4763 (I386_DR_GLOBAL_ENABLE): Likewise.
4764 (I386_DR_DISABLE): Likewise.
4765 (I386_DR_SET_RW_LEN): Likewise.
4766 (I386_DR_GET_RW_LEN): Likewise.
4767 (I386_DR_WATCH_HIT): Likewise.
4768 (i386_wp_op_t): Likewise.
4769 (i386_show_dr): Likewise.
4770 (i386_length_and_rw_bits): Likewise.
4771 (i386_insert_aligned_watchpoint): Likewise.
4772 (i386_remove_aligned_watchpoint): Likewise.
4773 (i386_handle_nonaligned_watchpoint): Likewise.
4774 i386_update_inferior_debug_regs(): Likewise.
4775 (i386_dr_insert_watchpoint): Likewise.
4776 (i386_dr_remove_watchpoint): Likewise.
4777 (i386_dr_region_ok_for_watchpoint): Likewise.
4778 (i386_dr_stopped_data_address): Likewise.
4779 (i386_dr_stopped_by_watchpoint): Likewise.
4780
8f26655c
GB
47812014-06-19 Gary Benson <gbenson@redhat.com>
4782
4783 * i386-low.c (i386_dr_show): Renamed to
4784 i386_show_dr and made static. All uses updated.
4785 (i386_dr_length_and_rw_bits): Renamed to
4786 i386_length_and_rw_bits and made static.
4787 All uses updated.
4788 (i386_dr_insert_aligned_watchpoint): Renamed to
4789 i386_insert_aligned_watchpoint and made static.
4790 All uses updated.
4791 (i386_dr_remove_aligned_watchpoint): Renamed to
4792 i386_remove_aligned_watchpoint and made static.
4793 All uses updated.
4794 (i386_dr_update_inferior_debug_regs): Renamed to
4795 i386_update_inferior_debug_regs and made static.
4796 All uses updated.
4797
b9228891
GB
47982014-06-18 Gary Benson <gbenson@redhat.com>
4799
5171def3
GB
4800 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4801 (i386_dr_low_can_set_control): Likewise.
4802 (i386_get_debug_register_length): Likewise.
4803 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4804 (i386_dr_low_can_set_control): Likewise.
4805 (i386_get_debug_register_length): Likewise.
4806
48072014-06-17 Gary Benson <gbenson@redhat.com>
4808
b9228891
GB
4809 * i386-low.h (i386-dregs.h): New include.
4810 (DR_FIRSTADDR): Now in i386-dregs.h.
4811 (DR_LASTADDR): Likewise.
4812 (DR_NADDR): Likewise.
4813 (DR_STATUS): Likewise.
4814 (DR_CONTROL): Likewise.
4815 (i386_debug_reg_state): Likewise.
4816 (i386_dr_insert_watchpoint): Likewise.
4817 (i386_dr_remove_watchpoint): Likewise.
4818 (i386_dr_region_ok_for_watchpoint): Likewise.
4819 (i386_dr_stopped_data_address): Likewise.
4820 (i386_dr_stopped_by_watchpoint): Likewise.
4821 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4822
4be83cc2
GB
48232014-06-18 Gary Benson <gbenson@redhat.com>
4824
4825 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4826 i386_dr_insert_watchpoint.
4827 (i386_low_remove_watchpoint): Renamed to
4828 i386_dr_remove_watchpoint.
4829 (i386_low_region_ok_for_watchpoint): Renamed to
4830 i386_dr_region_ok_for_watchpoint.
4831 (i386_low_stopped_data_address): Renamed to
4832 i386_dr_stopped_data_address.
4833 (i386_low_stopped_by_watchpoint): Renamed to
4834 i386_dr_stopped_by_watchpoint.
4835 * i386-low.c (i386_show_dr): Renamed to
4836 i386_dr_show and made nonstatic. All uses updated.
4837 (i386_length_and_rw_bits): Renamed to
4838 i386_dr_length_and_rw_bits and made nonstatic.
4839 All uses updated.
4840 (i386_insert_aligned_watchpoint): Renamed to
4841 i386_dr_insert_aligned_watchpoint and made nonstatic.
4842 All uses updated.
4843 (i386_remove_aligned_watchpoint): Renamed to
4844 i386_dr_remove_aligned_watchpoint and made nonstatic.
4845 All uses updated.
4846 (i386_update_inferior_debug_regs): Renamed to
4847 i386_dr_update_inferior_debug_regs and made nonstatic.
4848 All uses updated.
4849 (i386_low_insert_watchpoint): Renamed to
4850 i386_dr_insert_watchpoint. All uses updated.
4851 (i386_low_remove_watchpoint): Renamed to
4852 i386_dr_remove_watchpoint. All uses updated.
4853 (i386_low_region_ok_for_watchpoint): Renamed to
4854 i386_dr_region_ok_for_watchpoint. All uses updated.
4855 (i386_low_stopped_data_address): Renamed to
4856 i386_dr_stopped_data_address. All uses updated.
4857 (i386_low_stopped_by_watchpoint): Renamed to
4858 i386_dr_stopped_by_watchpoint. All uses updated.
4859
131aa0d4
GB
48602014-06-18 Gary Benson <gbenson@redhat.com>
4861
4862 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4863 (i386_dr_low_can_set_control): Likewise.
4864 (i386_insert_aligned_watchpoint): New check.
4865
d9305f7f
GB
48662014-06-18 Gary Benson <gbenson@redhat.com>
4867
4868 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4869 Renamed to state.
4870
e927c9fc
GB
48712014-06-18 Gary Benson <gbenson@redhat.com>
4872
4873 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4874 instead of fatal and error.
4875 (i386_handle_nonaligned_watchpoint): Likewise.
4876
1b6d4134
GB
48772014-06-18 Gary Benson <gbenson@redhat.com>
4878
4879 * i386-low.c (i386_get_debug_register_length): New macro.
4880 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4881 (i386_show_dr): Use debug_printf instead of fprintf. Use
4882 phex to format values.
4883
6e62758f
GB
48842014-06-18 Gary Benson <gbenson@redhat.com>
4885
4886 * i386-low.h: Comment changes.
4887 * i386-low.c: Likewise.
4888
fc6e2f03
GB
48892014-06-18 Gary Benson <gbenson@redhat.com>
4890
4891 * i386-low.c: Whitespace changes.
4892
f9d1eeed
TT
48932014-06-12 Tom Tromey <tromey@redhat.com>
4894
4895 * utils.c (freeargv): Remove.
4896
0b04e523
TT
48972014-06-12 Tom Tromey <tromey@redhat.com>
4898
4899 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4900 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4901 (parse_debug_format_options): Likewise.
4902 (gdbserver_usage): Likewise.
4903 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4904 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4905 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4906 against libiberty.
4907 ($(LIBGNU)): Depend on libiberty.
4908 (all-lib): Recurse into all subdirs.
4909 (install-only): Invoke "install" target in subdirs.
4910 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4911 targets.
4912 * configure: Rebuild.
4913 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4914 for vasprintf, vsnprintf, or gettimeofday.
4915 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4916 srv_tgtobj.
4917
270c9937
JB
49182014-06-05 Joel Brobecker <brobecker@adacore.com>
4919
4920 * development.sh: Delete.
4921 * Makefile.in (config.status): Adjust dependency on development.sh.
4922 * configure.ac: Adjust development.sh source call.
4923 * configure: Regenerate.
4924
0a261ed8
PA
49252014-06-02 Pedro Alves <palves@redhat.com>
4926
4927 * ax.c (gdb_free_agent_expr): New function.
4928 * ax.h (gdb_free_agent_expr): New declaration.
4929 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4930 list.
4931 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4932 static.
4933 (clear_breakpoint_conditions_and_commands): New function.
4934 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4935 (clear_breakpoint_conditions_and_commands): New declaration.
4936
e9dae05e
RR
49372014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4938
4939 * linux-aarch64-low.c (asm/ptrace.h): Include.
4940
5876f503
JK
49412014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4942
4943 Fix TLS access for -static -pthread.
4944 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4945 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4946 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4947
802e8e6d
PA
49482014-05-20 Pedro Alves <palves@redhat.com>
4949
4950 * linux-aarch64-low.c (aarch64_insert_point)
4951 (aarch64_remove_point): No longer check whether the type is
4952 supported here. Adjust to new interface.
4953 (the_low_target): Install aarch64_supports_z_point_type as
4954 supports_z_point_type method.
4955 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4956 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4957 instead of a Z packet char. Adjust.
4958 (arm_supports_z_point_type): New function.
4959 (arm_insert_point, arm_remove_point): Adjust to new interface.
4960 (the_low_target): Install arm_supports_z_point_type.
4961 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4962 (cris_insert_point, cris_remove_point): Adjust to new interface.
4963 Don't check whether the type is supported here.
4964 (the_low_target): Install cris_supports_z_point_type.
4965 * linux-low.c (linux_supports_z_point_type): New function.
4966 (linux_insert_point, linux_remove_point): Adjust to new interface.
4967 * linux-low.h (struct linux_target_ops) <insert_point,
4968 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4969 raw_breakpoint pointer parameter.
4970 <supports_z_point_type>: New method.
4971 * linux-mips-low.c (mips_supports_z_point_type): New function.
4972 (mips_insert_point, mips_remove_point): Adjust to new interface.
4973 Use mips_supports_z_point_type.
4974 (the_low_target): Install mips_supports_z_point_type.
4975 * linux-ppc-low.c (the_low_target): Install NULL as
4976 supports_z_point_type method.
4977 * linux-s390-low.c (the_low_target): Install NULL as
4978 supports_z_point_type method.
4979 * linux-sparc-low.c (the_low_target): Install NULL as
4980 supports_z_point_type method.
4981 * linux-x86-low.c (x86_supports_z_point_type): New function.
4982 (x86_insert_point): Adjust to new insert_point interface. Use
4983 insert_memory_breakpoint. Adjust to new
4984 i386_low_insert_watchpoint interface.
4985 (x86_remove_point): Adjust to remove_point interface. Use
4986 remove_memory_breakpoint. Adjust to new
4987 i386_low_remove_watchpoint interface.
4988 (the_low_target): Install x86_supports_z_point_type.
4989 * lynx-low.c (lynx_target_ops): Install NULL as
4990 supports_z_point_type callback.
4991 * nto-low.c (nto_supports_z_point_type): New.
4992 (nto_insert_point, nto_remove_point): Adjust to new interface.
4993 (nto_target_ops): Install nto_supports_z_point_type.
4994 * mem-break.c: Adjust intro comment.
4995 (struct raw_breakpoint) <raw_type, size>: New fields.
4996 <inserted>: Update comment.
4997 <shlib_disabled>: Delete field.
4998 (enum bkpt_type) <gdb_breakpoint>: Delete value.
4999 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5000 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5001 (raw_bkpt_type_to_target_hw_bp_type): New function.
5002 (find_enabled_raw_code_breakpoint_at): New function.
5003 (find_raw_breakpoint_at): New type and size parameters. Use them.
5004 (insert_memory_breakpoint): New function, based off
5005 set_raw_breakpoint_at.
5006 (remove_memory_breakpoint): New function.
5007 (set_raw_breakpoint_at): Reimplement.
5008 (set_breakpoint): New, based on set_breakpoint_at.
5009 (set_breakpoint_at): Reimplement.
5010 (delete_raw_breakpoint): Go through the_target->remove_point
5011 instead of assuming memory breakpoints.
5012 (find_gdb_breakpoint_at): Delete.
5013 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5014 (find_gdb_breakpoint): New function.
5015 (set_gdb_breakpoint_at): Delete.
5016 (z_type_supported): New function.
5017 (set_gdb_breakpoint_1): New function, loosely based off
5018 set_gdb_breakpoint_at.
5019 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5020 (delete_gdb_breakpoint_at): Delete.
5021 (delete_gdb_breakpoint_1): New function, loosely based off
5022 delete_gdb_breakpoint_at.
5023 (delete_gdb_breakpoint): New function.
5024 (clear_gdb_breakpoint_conditions): Rename to ...
5025 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5026 breakpoint.
5027 (add_condition_to_breakpoint): Make static.
5028 (add_breakpoint_condition): Take a struct breakpoint pointer
5029 instead of an address. Adjust.
5030 (gdb_condition_true_at_breakpoint): Rename to ...
5031 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5032 z_type parameter.
5033 (gdb_condition_true_at_breakpoint): Reimplement.
5034 (add_breakpoint_commands): Take a struct breakpoint pointer
5035 instead of an address. Adjust.
5036 (gdb_no_commands_at_breakpoint): Rename to ...
5037 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5038 parameter. Return true if no breakpoint was found. Change debug
5039 output.
5040 (gdb_no_commands_at_breakpoint): Reimplement.
5041 (run_breakpoint_commands): Rename to ...
5042 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5043 and change return type to boolean.
5044 (run_breakpoint_commands): New function.
5045 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5046 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5047 breakpoint. Go through the_target->remove_point instead of
5048 assuming memory breakpoint.
5049 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5050 software and hardware breakpoints.
5051 (reinsert_raw_breakpoint): Go through the_target->insert_point
5052 instead of assuming memory breakpoint.
5053 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5054 software and hardware breakpoints.
5055 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5056 Check both software and hardware breakpoints.
5057 (validate_inserted_breakpoint): Assert the breakpoint is a
5058 software breakpoint. Set the inserted flag to -1 instead of
5059 setting shlib_disabled.
5060 (delete_disabled_breakpoints): Adjust.
5061 (validate_breakpoints): Only validate software breakpoints.
5062 Adjust to inserted flag change.
5063 (check_mem_read, check_mem_write): Skip breakpoint types other
5064 than software breakpoints. Adjust to inserted flag change.
5065 * mem-break.h (enum raw_bkpt_type): New enum.
5066 (raw_breakpoint, struct process_info): Forward declare.
5067 (Z_packet_to_target_hw_bp_type): Delete declaration.
5068 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5069 (set_gdb_breakpoint, delete_gdb_breakpoint)
5070 (clear_breakpoint_conditions): New declarations.
5071 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5072 (breakpoint_inserted_here): Update comment.
5073 (add_breakpoint_condition, add_breakpoint_commands): Replace
5074 address parameter with a breakpoint pointer parameter.
5075 (gdb_breakpoint_here): Update comment.
5076 (delete_gdb_breakpoint_at): Delete.
5077 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5078 * server.c (process_point_options): Take a struct breakpoint
5079 pointer instead of an address. Adjust.
5080 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5081 delete_gdb_breakpoint.
5082 * spu-low.c (spu_target_ops): Install NULL as
5083 supports_z_point_type method.
5084 * target.h: Include mem-break.h.
5085 (struct target_ops) <prepare_to_access_memory>: Update comment.
5086 <supports_z_point_type>: New field.
5087 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5088 instead of a char. Also take a raw breakpoint pointer.
5089 * win32-arm-low.c (the_low_target): Install NULL as
5090 supports_z_point_type.
5091 * win32-i386-low.c (i386_supports_z_point_type): New function.
5092 (i386_insert_point, i386_remove_point): Adjust to new interface.
5093 (the_low_target): Install i386_supports_z_point_type.
5094 * win32-low.c (win32_supports_z_point_type): New function.
5095 (win32_insert_point, win32_remove_point): Adjust to new interface.
5096 (win32_target_ops): Install win32_supports_z_point_type.
5097 * win32-low.h (struct win32_target_ops):
5098 <supports_z_point_type>: New method.
5099 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5100 instead of a char. Also take a raw breakpoint pointer.
5101
932539e3
PA
51022014-05-20 Pedro Alves <palves@redhat.com>
5103
5104 * mem-break.h: Include break-common.h.
5105 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5106 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5107 (Z_packet_to_target_hw_bp_type): New declaration.
5108 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5109 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5110 (Z_PACKET_ACCESS_WP): Delete macros.
5111 (Z_packet_to_hw_type): Delete function.
5112 * i386-low.h: Don't include break-common.h here.
5113 (Z_packet_to_hw_type): Delete declaration.
5114 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5115 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5116 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5117 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5118 * linux-aarch64-low.c: Don't include break-common.h here.
5119 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5120 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5121 (Z_packet_to_target_hw_bp_type): Delete function.
5122 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5123 function.
5124 (mips_insert_point, mips_remove_point): Use
5125 Z_packet_to_target_hw_bp_type.
5126
4ff0d3d8
PA
51272014-05-20 Pedro Alves <palves@redhat.com>
5128
5129 * linux-aarch64-low.c: Include break-common.h.
5130 (enum target_point_type): Delete.
5131 (Z_packet_to_point_type): Rename to ...
5132 (Z_packet_to_target_hw_bp_type): ... this, and return a
5133 target_hw_bp_type instead.
5134 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5135 instead of an enum target_point_type.
5136 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5137 breakpoint type.
5138 (aarch64_dr_state_insert_one_point)
5139 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5140 (aarch64_handle_aligned_watchpoint)
5141 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5142 Take an enum target_hw_bp_type instead of an enum
5143 target_point_type.
5144 (aarch64_supports_z_point_type): New function.
5145 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5146 use Z_packet_to_target_hw_bp_type.
5147
786dc519
JB
51482014-05-20 Joel Brobecker <brobecker@adacore.com>
5149
5150 * configure.ac: Only use -Werror by default when DEVELOPMENT
5151 is true.
5152 * configure: Regenerate.
5153
9e0aa64f
JK
51542014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5155
5156 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5157 * linux-x86-low.c (X86_64_USER_REGS): New.
5158 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5159
2b577b92
YQ
51602014-04-28 Yao Qi <yao@codesourcery.com>
5161
5162 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5163 name.
5164
94611da2
PA
51652014-04-25 Pedro Alves <palves@redhat.com>
5166
5167 PR server/16255
5168 * linux-low.c (linux_attach_fail_reason_string): New function.
5169 (linux_attach_lwp): Delete.
5170 (linux_attach_lwp_1): Rename to ...
5171 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5172 argument. Remove "initial" parameter. Return int instead of
5173 void. Don't error or warn here.
5174 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5175 failure to attach to the tgid. Call warning when failing to
5176 attach to an lwp.
5177 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5178 argument. Remove "initial" parameter. Return int instead of
5179 void. Don't error or warn here.
5180 (linux_attach_fail_reason_string): New declaration.
5181 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5182 interface change. Use linux_attach_fail_reason_string.
5183
01f9f808
MS
51842014-04-24 Michael Sturm <michael.sturm@mintel.com>
5185 Walfred Tedeschi <walfred.tedeschi@intel.com>
5186
5187 * Makefile.in: Added rules to handle new files
5188 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5189 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5190 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5191 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5192 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5193 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5194 x32-avx512-linux.o.
5195 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5196 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5197 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5198 i386/x32-avx512.xml.
5199 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5200 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5201 i386/x32-avx512-linux.xml.
5202 * i387-fp.c (num_avx512_k_registers): New constant for number
5203 of K registers.
5204 (num_avx512_zmmh_low_registers): New constant for number of
5205 lower ZMM registers (0-15).
5206 (num_avx512_zmmh_high_registers): New constant for number of
5207 higher ZMM registers (16-31).
5208 (num_avx512_ymmh_registers): New contant for number of higher
5209 YMM registers (ymm16-31 added by avx521 on x86_64).
5210 (num_avx512_xmm_registers): New constant for number of higher
5211 XMM registers (xmm16-31 added by AVX512 on x86_64).
5212 (struct i387_xsave): Add space for AVX512 registers.
5213 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5214 Add code to handle AVX512 registers.
5215 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5216 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5217 prototypei from generated file.
5218 (tdesc_amd64_avx512_linux): Likewise.
5219 (init_registers_x32_avx512_linux): Likewise.
5220 (tdesc_x32_avx512_linux): Likewise.
5221 (init_registers_i386_avx512_linux): Likewise.
5222 (tdesc_i386_avx512_linux): Likewise.
5223 (x86_64_regmap): Add AVX512 registers.
5224 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5225 mask.
5226 (initialize_low_arch): Add code to initialize AVX512 registers.
5227
51aa91f9
PA
52282014-04-23 Pedro Alves <palves@redhat.com>
5229
5230 * mem-break.c (find_gdb_breakpoint_at): Make static.
5231 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5232
a4165e94
PA
52332014-04-23 Pedro Alves <palves@redhat.com>
5234
5235 * i386-low.c: Don't include break-common.h here.
5236 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5237 prototype to take target_hw_bp_type as argument instead of a Z
5238 packet char.
5239 * i386-low.h: Include break-common.h here.
5240 (Z_packet_to_hw_type): Declare.
5241 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5242 prototypes.
5243 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5244 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5245 (x86_remove_point): Convert the packet number to a
5246 target_hw_bp_type before calling i386_low_remove_watchpoint.
5247 * win32-i386-low.c (i386_insert_point): Convert the packet number
5248 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5249 (i386_remove_point): Convert the packet number to a
5250 target_hw_bp_type before calling i386_low_remove_watchpoint.
5251
b8acf843
PA
52522014-04-23 Pedro Alves <palves@redhat.com>
5253
5254 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5255
d708bcd1
PA
52562014-04-10 Pedro Alves <palves@redhat.com>
5257
5258 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5259 Check if the condition or command is NULL before checking if the
5260 breakpoint is known. On success, return true.
5261 * mem-break.h (add_breakpoint_condition): Document return.
5262 (add_breakpoint_commands): Add describing comment.
5263 * server.c (skip_to_semicolon): New function.
5264 (process_point_options): Use it.
5265
2eec7d5b
PA
52662014-04-09 Pedro Alves <palves@redhat.com>
5267
5268 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5269 to lwpid_of.
5270
fa96cb38
PA
52712014-02-27 Pedro Alves <palves@redhat.com>
5272
5273 PR 12702
5274 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5275 macros.
5276 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5277 output.
5278 (last_thread_of_process_p): Take a PID argument instead of a
5279 thread pointer.
5280 (linux_wait_for_lwp): Delete.
5281 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5282 functions.
5283 (linux_low_filter_event): New function, party factored out from
5284 linux_wait_for_event.
5285 (linux_wait_for_event): Rename to ...
5286 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5287 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5288 sigsuspend. Check for zombie leaders.
5289 (linux_wait_for_event): Reimplement as wrapper around
5290 linux_wait_for_event_filtered.
5291 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5292 a normal or signal exit is seen, it's the whole process exiting.
5293 (wait_for_sigstop): No longer a for_each_inferior callback.
5294 Rewrite on top of linux_wait_for_event_filtered.
5295 (stop_all_lwps): Call wait_for_sigstop directly.
5296 * server.c (resume, handle_target_event): Handle
5297 TARGET_WAITKIND_NO_RESUMED.
5298
d763de10
JB
52992014-02-26 Joel Brobecker <brobecker@adacore.com>
5300
5301 * win32-low.c (psapi_get_dll_name,
5302 * win32_CreateToolhelp32Snapshot): Delete.
5303 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5304 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5305 Delete.
5306 (handle_load_dll): Add function description.
5307 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5308
850a0f76
JB
53092014-02-26 Joel Brobecker <brobecker@adacore.com>
5310
5311 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5312 Add comment.
5313 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5314 base address when calling win32_add_one_solib.
5315 (handle_load_dll): Delete local variable load_addr.
5316 Remove 0x1000 offset applied to DLL base address when calling
5317 win32_add_one_solib.
5318 (handle_unload_dll): Add comment.
5319
f25b3fc3
JB
53202014-02-26 Joel Brobecker <brobecker@adacore.com>
5321
5322 * win32-low.c (win32_add_all_dlls): Renames
5323 win32_ensure_ntdll_loaded. Rewrite function documentation.
5324 Adjust implementation to always load all DLLs.
5325 Add 0x1000 offset to DLL base address when calling
5326 win32_add_one_solib.
5327 (child_initialization_done): New static global.
5328 (do_initial_child_stuff): Set child_initialization_done to
5329 zero during child initialization, and 1 after. Replace call
5330 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5331 Add comment.
5332 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5333 (handle_unload_dll): Add function documentation.
5334 (get_child_debug_event): Ignore load and unload DLL events
5335 during child initialization.
5336
d86d4aaf
DE
53372014-02-20 Doug Evans <dje@google.com>
5338
3bc32da3 5339 Remove global all_lwps.
d86d4aaf
DE
5340 * inferiors.h (ptid_of): Move here from linux-low.h.
5341 (pid_of, lwpid_of): Ditto.
5342 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5343 parameter is a struct thread_info * now.
5344 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5345 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5346 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5347 directly.
5348 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5349 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5350 * linux-arm-low.c (update_registers_callback): Update, "entry"
5351 parameter is a struct thread_info * now.
5352 Fetch lwpid from current_inferior directly.
5353 (arm_insert_point): Pass &all_threads to find_inferior instead of
5354 &all_lwps.
5355 (arm_remove_point): Ditto.
5356 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5357 (arm_prepare_to_resume): Fetch pid from thread.
5358 (arm_read_description): Fetch lwpid from current_inferior directly.
5359 * linux-low.c (all_lwps): Delete.
5360 (delete_lwp): Delete call to remove_inferior.
5361 (handle_extended_wait): Fetch lwpid from thread.
5362 (add_lwp): Don't set lwp->entry.id. Remove call to
5363 add_inferior_to_list.
5364 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5365 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5366 (kill_one_lwp_callback): Ditto.
5367 (linux_kill): Don't dereference NULL pointer.
5368 Fetch ptid,lwpid from thread.
5369 (get_detach_signal): Fetch ptid from thread.
5370 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5371 Simplify call to regcache_invalidate_thread.
5372 (delete_lwp_callback): Update, "entry" parameter is a
5373 struct thread_info * now. Fetch pid from thread.
5374 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5375 (status_pending_p_callback): Update, "entry" parameter is a
5376 struct thread_info * now. Fetch ptid from thread.
5377 (find_lwp_pid): Update, "entry" parameter is a
5378 struct thread_info * now.
5379 (linux_wait_for_lwp): Fetch pid from thread.
5380 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5381 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5382 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5383 (dequeue_one_deferred_signal): Ditto.
5384 (cancel_breakpoint): Fetch ptid from current_inferior.
5385 (linux_wait_for_event): Pass &all_threads to find_inferior,
5386 not &all_lwps. Fetch ptid, lwpid from thread.
5387 (count_events_callback): Update, "entry" parameter is a
5388 struct thread_info * now.
5389 (select_singlestep_lwp_callback): Ditto.
5390 (select_event_lwp_callback): Ditto.
5391 (cancel_breakpoints_callback): Ditto.
5392 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5393 not &all_lwps.
5394 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5395 (unsuspend_one_lwp): Update, "entry" parameter is a
5396 struct thread_info * now.
5397 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5398 not &all_lwps.
5399 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5400 Fetch lwpid from thread, not lwp.
5401 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5402 Pass &all_threads to find_inferior, not &all_lwps.
5403 (send_sigstop): Fetch lwpid from thread, not lwp.
5404 (send_sigstop_callback): Update, "entry" parameter is a
5405 struct thread_info * now.
5406 (suspend_and_send_sigstop_callback): Ditto.
5407 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5408 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5409 struct thread_info * now.
5410 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5411 from thread, lwp.
5412 (lwp_running): Update, "entry" parameter is a
5413 struct thread_info * now.
5414 (stop_all_lwps): Fetch ptid from thread.
5415 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5416 (linux_resume_one_lwp): Fetch lwpid from thread.
5417 (linux_set_resume_request): Update, "entry" parameter is a
5418 struct thread_info * now. Fetch pid, lwpid from thread.
5419 (resume_status_pending_p): Update, "entry" parameter is a
5420 struct thread_info * now.
5421 (need_step_over_p): Ditto. Fetch lwpid from thread.
5422 (start_step_over): Fetch lwpid from thread.
5423 (linux_resume_one_thread): Update, "entry" parameter is a
5424 struct thread_info * now. Fetch lwpid from thread.
5425 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5426 (proceed_one_lwp): Update, "entry" parameter is a
5427 struct thread_info * now. Fetch lwpid from thread.
5428 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5429 struct thread_info * now.
5430 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5431 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5432 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5433 directly.
5434 (regsets_store_inferior_registers): Ditto.
5435 (fetch_register, store_register): Ditto.
5436 (linux_read_memory, linux_write_memory): Ditto.
5437 (linux_request_interrupt): Ditto.
5438 (linux_read_auxv): Ditto.
5439 (linux_xfer_siginfo): Ditto.
5440 (linux_qxfer_spu): Ditto.
5441 (linux_qxfer_libraries_svr4): Ditto.
5442 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5443 moved to inferiors.h.
5444 (get_lwp): Delete.
5445 (get_thread_lwp): Update.
5446 (struct lwp_info): Delete member "entry". Simplify comment for
5447 member "thread".
5448 (all_lwps): Delete.
5449 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5450 current_inferior directly.
5451 (update_watch_registers_callback): Update, "entry" parameter is a
5452 struct thread_info * now. Fetch pid from thread.
5453 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5454 (mips_insert_point): Fetch lwpid from current_inferior.
5455 Pass &all_threads to find_inferior, not &all_lwps.
5456 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5457 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5458 directly.
5459 (mips_stopped_data_address): Ditto.
5460 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5461 directly.
5462 * linux-tile-low.c (tile_arch_setup): Ditto.
5463 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5464 (update_debug_registers_callback): Update, "entry" parameter is a
5465 struct thread_info * now. Fetch pid from thread.
5466 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5467 Pass &all_threads to find_inferior, not &all_lwps.
5468 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5469 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5470 Pass &all_threads to find_inferior, not &all_lwps.
5471 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5472 (i386_dr_low_get_status): Ditto.
5473 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5474 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5475 (x86_linux_read_description): Ditto.
5476 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5477
3b8361aa
DE
54782014-02-20 Doug Evans <dje@google.com>
5479
5480 * inferiors.c (get_first_inferior): Fix buglet.
5481
f7667f0d
DE
54822014-02-19 Doug Evans <dje@google.com>
5483
5484 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5485 * inferiors.c (add_thread): Change result type to struct thread_info *.
5486 All callers updated.
5487 (add_lwp): Call add_thread here instead of in callers.
5488 All callers updated.
5489 * linux-low.h (get_lwp_thread): Rewrite.
5490 (struct lwp_info): New member "thread".
5491
b3312d80
DE
54922014-02-19 Doug Evans <dje@google.com>
5493
5494 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5495 All callers updated.
5496
ecc6f45c
DE
54972014-02-19 Doug Evans <dje@google.com>
5498
5499 * inferiors.c (add_thread): Fix whitespace.
5500
649ebbca
DE
55012014-02-19 Doug Evans <dje@google.com>
5502
5503 * dll.c (clear_dlls): Replace accessing list implemention details
5504 with API function.
5505 * gdbthread.h (get_first_thread): Declare.
5506 * inferiors.c (for_each_inferior_with_data): New function.
5507 (get_first_thread): New function.
5508 (find_thread_ptid): Simplify.
5509 (get_first_inferior): New function.
5510 (clear_list): Delete.
5511 (one_inferior_p): New function.
5512 (clear_inferior_list): New function.
5513 (clear_inferiors): Update.
5514 * inferiors.h (for_each_inferior_with_data): Declare.
5515 (clear_inferior_list): Declare.
5516 (one_inferior_p): Declare.
5517 (get_first_inferior): Declare.
5518 * linux-low.c (linux_wait_for_event): Replace accessing list
5519 implemention details with API function.
5520 * server.c (target_running): Ditto.
5521 (accumulate_file_name_length): New function.
5522 (emit_dll_description): New function.
5523 (handle_qxfer_libraries): Replace accessing list implemention
5524 details with API function.
5525 (handle_qxfer_threads_worker): New function.
5526 (handle_qxfer_threads_proper): Replace accessing list implemention
5527 details with API function.
5528 (handle_query): Ditto.
5529 (visit_actioned_threads_callback_ftype): New typedef.
5530 (visit_actioned_threads_data): New struct.
5531 (visit_actioned_threads): Rewrite to be find_inferior callback.
5532 (resume): Call find_inferior.
5533 (handle_status): Replace accessing list implemention
5534 details with API function.
5535 (process_serial_event): Replace accessing list implemention details
5536 with API function.
5537 * target.c (set_desired_inferior): Replace accessing list implemention
5538 details with API function.
5539 * tracepoint.c (same_process_p): New function.
5540 (gdb_agent_about_to_close): Replace accessing list implemention
5541 details with API function.
5542 * win32-low.c (child_delete_thread): Replace accessing list
5543 implemention details with API function.
5544 (match_dll_by_basename): New function.
5545 (dll_is_loaded_by_basename): New function.
5546 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5547 details call to dll_is_loaded_by_basename.
5548
80894984
DE
55492014-02-19 Doug Evans <dje@google.com>
5550
5551 * dll.h (struct dll_info): Add comment.
5552 * gdbthread.h (struct thread_info): Add comment.
5553 (current_ptid): Simplify.
5554 * inferiors.c (add_process): Update.
5555 (remove_process): Update.
5556 * inferiors.h (struct process_info): Rename member "head" to "entry".
5557 * linux-low.c (delete_lwp): Update.
5558 (add_lwp): Update.
5559 (last_thread_of_process_p): Update.
5560 (kill_one_lwp_callback, linux_kill): Update.
5561 (status_pending_p_callback): Update.
5562 (wait_for_sigstop): Update. Simplify read of ptid.
5563 (start_step_over): Update.
5564 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5565 (get_lwp_thread): Update.
5566 (struct lwp_info): Rename member "head" to "entry".
5567 * regcache.h (inferior_list_entry): Delete.
5568 * server.c (kill_inferior_callback): Update.
5569 (detach_or_kill_inferior_callback): Update.
5570 (print_started_pid): Update.
5571 (print_attached_pid): Update.
5572 (process_serial_event): Simplify read of ptid.
5573 * thread-db.c (thread_db_create_event): Update.
5574 (thread_db_get_tls_address): Update.
5575 * win32-low.c (current_inferior_ptid): Simplify.
5576
46917d26
TT
55772014-02-19 Tom Tromey <tromey@redhat.com>
5578
5579 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5580 argument.
5581 (target_supports_btrace): Update.
5582
0759a81e
YQ
55832014-02-14 Yao Qi <yao@codesourcery.com>
5584
5585 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5586 (rsp-low-ipa.o): New target.
5587
a7191e8b
TT
55882014-02-12 Tom Tromey <tromey@redhat.com>
5589
5590 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5591 convert_ascii_to_int.
5592 * regcache.c (registers_to_string): Likewise.
5593 * remote-utils.c (decode_M_packet): Likewise.
5594 * server.c (process_serial_event): Likewise.
5595
ff0e980e
TT
55962014-02-12 Tom Tromey <tromey@redhat.com>
5597
5598 * server.c (handle_query, handle_v_run): Use hex2bin, not
5599 unhexify.
5600 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5601
e9371aff
TT
56022014-02-12 Tom Tromey <tromey@redhat.com>
5603
5604 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5605 convert_int_to_ascii.
5606 * regcache.c (registers_to_string, collect_register_as_string):
5607 Likewise.
5608 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5609 Likewise.
5610 * server.c (process_serial_event): Likewise.
5611 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5612 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5613
971dc0b8
TT
56142014-02-12 Tom Tromey <tromey@redhat.com>
5615
5616 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5617 bin2hex, not hexify.
5618 * tracepoint.c (cmd_qtstatus): Likewise.
5619
0a822afb
TT
56202014-02-12 Tom Tromey <tromey@redhat.com>
5621
5622 * remote-utils.c (monitor_output): Pass explicit length to
5623 hexify.
5624
9c3d6531
TT
56252014-02-12 Tom Tromey <tromey@redhat.com>
5626
5627 * tracepoint.c: Include rsp-low.h.
5628 * server.c: Include rsp-low.h.
5629 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5630 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5631 declare.
5632 * remote-utils.c: Include rsp-low.h.
5633 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5634 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5635 (convert_int_to_ascii, convert_ascii_to_int): Move to
5636 common/rsp-low.c.
5637 * regcache.c: Include rsp-low.h.
5638 * ax.c: Include rsp-low.h.
5639 * Makefile.in (SFILES): Add common/rsp-low.c.
5640 (OBS): Add rsp-low.o.
5641 (rsp-low.o): New target.
5642
01fd3ea5
TT
56432014-02-12 Tom Tromey <tromey@redhat.com>
5644
5645 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5646 Include print-utils.h.
5647 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5648 (plongest, thirty_two, phex_nz): Remove.
5649 * Makefile.in (SFILES): Add common/print-utils.c.
5650 (OBS): Add print-utils.o.
5651 (print-utils-ipa.o): New target.
5652 (print-utils.o): New target.
5653 (IPA_OBJS): Add print-utils-ipa.o.
5654
e99dc820
TT
56552014-02-06 Tom Tromey <tromey@redhat.com>
5656
5657 * Makefile.in (SFILES): Fix indentation.
5658
ee1e2d4f
DE
56592014-02-05 Doug Evans <dje@google.com>
5660
5661 * linux-low.c (linux_wait_for_event): Improve comment.
5662 (linux_wait_1): Keep current_inferior in sync with event_child.
5663
f5a02773
DE
56642014-01-22 Doug Evans <dje@google.com>
5665
5666 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5667
87ce2a04
DE
56682014-01-22 Doug Evans <dje@google.com>
5669
5670 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5671 * configure: Regenerate.
5672 * config.in: Regenerate.
5673 * Makefile.in (SFILES): Add debug.c.
5674 (OBS): Add debug.o.
5675 * debug.c: New file.
5676 * debug.h: New file.
5677 * linux-aarch64-low.c (*): Update all debugging printfs to use
5678 debug_printf instead of fprintf.
5679 * linux-arm-low.c (*): Ditto.
5680 * linux-cris-low.c (*): Ditto.
5681 * linux-crisv32-low.c (*): Ditto.
5682 * linux-m32r-low.c (*): Ditto.
5683 * linux-sparc-low.c (*): Ditto.
5684 * linux-x86.c (*): Ditto.
5685 * linux-low.c (*): Ditto.
5686 (linux_wait_1): Add calls to debug_enter, debug_exit.
5687 (linux_wait): Remove redundant debugging printf.
5688 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5689 (linux_resume, unstop_all_lwps): Ditto.
5690 * mem-break.c (*): Update all debugging printfs to use
5691 debug_printf instead of fprintf.
5692 * remote-utils.c (*): Ditto.
5693 * thread-db.c (*): Ditto.
5694 * server.c #include <ctype.h>, "gdb_vecs.h".
5695 (debug_threads): Moved to debug.c.
5696 (*): Update all debugging printfs to use debug_printf instead of
5697 fprintf.
5698 (start_inferior): Replace call to fflush with call to debug_flush.
5699 (monitor_show_help): Mention set debug-format.
5700 (parse_debug_format_options): New function.
5701 (handle_monitor_command): Handle "monitor set debug-format".
5702 (gdbserver_usage): Mention --debug-format.
5703 (main): Parse --debug-format.
5704 * server.h (debug_threads): Declaration moved to debug.h.
5705 #include "debug.h".
5706 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5707 trace_debug_1 that uses debug_printf.
5708 (tracepoint_look_up_symbols): Update all debugging printfs to use
5709 debug_printf instead of fprintf.
5710
e671835b
BS
57112014-01-20 Baruch Siach <baruch@tkos.co.il>
5712
5713 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5714 sys/ptrace.h.
5715
b5737fa9
PA
57162014-01-17 Pedro Alves <palves@redhat.com>
5717
ea38d2a9 5718 PR build/16445
c7faa97a
PA
5719 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5720 defined after including gdb_proc_service.h.
b5737fa9 5721
40ed484e
DE
57222014-01-16 Doug Evans <dje@google.com>
5723
5724 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5725 (match_dll): Use it.
5726
969c39fb
MM
57272014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5728
5729 * target.h (target_ops) <read_btrace>: Change parameters and
5730 return type to allow error reporting.
5731 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5732 trace reading errors on.
5733 * linux-low.c (linux_low_read_btrace): Pass trace reading
5734 errors on.
5735 (linux_low_disable_btrace): New.
5736
ab7f45ba
DE
57372014-01-15 Doug Evans <dje@google.com>
5738
5739 * inferiors.c (thread_id_to_gdb_id): Delete.
5740 * inferiors.h (thread_id_to_gdb_id): Delete.
5741
66af0f44
EZ
57422014-01-13 Eli Zaretskii <eliz@gnu.org>
5743
5744 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5745 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5746 versions.
5747
9939e131
PA
57482014-01-08 Pedro Alves <palves@redhat.com>
5749
5750 * server.c (handle_status): Don't discard previous queued stop
5751 replies or thread's pending status here.
5752 (main) <disconnection>: Do it here instead.
5753
b7ea362b
PA
57542014-01-08 Pedro Alves <palves@redhat.com>
5755
5756 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5757 * server.c (visit_actioned_threads, handle_pending_status): New
5758 function.
5759 (handle_v_cont): Factor out parts to ...
5760 (resume): ... this new function. If in all-stop, and a thread
5761 being resumed has a pending status, report it without actually
5762 resuming.
5763 (myresume): Adjust to use the new 'resume' function.
5764 (clear_pending_status_callback, set_pending_status_callback)
5765 (find_status_pending_thread_callback): New functions.
5766 (handle_status): Handle the case of multiple threads having
5767 interesting statuses to report. Report threads' real last signal
5768 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5769 with an interesting thread to report the status for, instead of
5770 always reporting the status of the first thread.
5771
28498c42
JB
57722014-01-01 Joel Brobecker <brobecker@adacore.com>
5773
5774 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5775 * gdbreplay.c (gdbreplay_version): Likewise.
5776
f45c82da
YZ
57772013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5778
5779 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5780 iov.iov_len with the real length in use.
5781
379a5e2d
JB
57822013-12-13 Joel Brobecker <brobecker@adacore.com>
5783
5784 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5785 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5786 for all targets that use win32-low.c.
5787 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5788 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5789
4210d83e
PA
57902013-12-13 Pedro Alves <palves@redhat.com>
5791
5792 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5793 if equal to TARGET_WAITKIND_LOADED.
5794 * win32-low.c (cached_status): New static global.
5795 (win32_wait): Add declaration.
5796 (do_initial_child_stuff): Flush all initial pending debug events
5797 up to the initial breakpoint.
5798 (win32_wait): If CACHED_STATUS was set, return that instead
5799 of doing a real wait. Remove the code resuming the execution
5800 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5801 during the initial phase. Also remove the code changing
5802 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5803 TARGET_WAITKIND_STOPPED.
5804
e7f0d979
YQ
58052013-12-11 Yao Qi <yao@codesourcery.com>
5806
5807 * notif.c (handle_notif_ack): Return 0 if no notification
5808 matches.
5809
ebcf782c
DE
58102013-11-20 Doug Evans <dje@google.com>
5811
5812 * linux-low.c (linux_set_resume_request): Fix comment.
5813
20ad9378
DE
58142013-11-20 Doug Evans <dje@google.com>
5815
5816 * linux-low.c (resume_status_pending_p): Tweak comment.
5817
a196ebeb
WT
58182013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5819
5820 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5821 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5822 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5823 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5824 (srv_amd64_regobj): Add amd64-mpx.o.
5825 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5826 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5827 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5828 * i387-fp.c (num_pl_bnd_register) Added constant.
5829 (num_pl_bnd_cfg_registers) Added constant.
5830 (struct i387_xsave) Added reserved area and MPX fields.
5831 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5832 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5833 function.
5834 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5835 (init_registers_amd64_mpx_linux): Declare new function.
5836 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5837 (x86_64_regmap): Add MPX registers.
5838 (x86_linux_read_description): Add MPX case.
5839 (initialize_low_arch): Initialize MPX targets.
5840
0080a2f6
TT
58412013-11-18 Tom Tromey <tromey@redhat.com>
5842
5843 * configure: Rebuild.
5844 * configure.ac: Don't check for stdlib.h.
5845 * gdbreplay.c: Unconditionally include stdlib.h.
5846
2978b111
TT
58472013-11-18 Tom Tromey <tromey@redhat.com>
5848
5849 * config.in: Rebuild.
5850 * configure: Rebuild.
5851 * configure.ac: Don't use AC_HEADER_DIRENT.
5852
a3d08894
TT
58532013-11-18 Tom Tromey <tromey@redhat.com>
5854
5855 * server.h: Don't check HAVE_STRING_H.
5856 * gdbreplay.c: Don't check HAVE_STRING_H.
5857 * configure: Rebuild.
5858
0a5dd17d
TT
58592013-11-18 Tom Tromey <tromey@redhat.com>
5860
5861 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5862 LIBGNU.
5863
1bd2f0ba
TT
58642013-11-08 Tom Tromey <tromey@redhat.com>
5865
5866 * configure, config.in: Rebuild.
5867 * configure.ac: Remove unused configury.
5868
3266f10b
TT
58692013-11-08 Tom Tromey <tromey@redhat.com>
5870
5871 * acinclude.m4: Include common.m4, codeset.m4.
5872 * configure, config.in: Rebuild.
5873 * configure.ac: Use GDB_AC_COMMON.
5874
6682d959
AA
58752013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5876
5877 * linux-s390-low.c (HWCAP_S390_TE): New define.
5878 (s390_arch_setup): Consider the TE field in the HWCAP for
5879 determining 'have_regset_tdb'.
5880
fd0a4d76
SDJ
58812013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5882
5883 PR gdb/16014
5884 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5885 call to sizeof.
5886
1a3d890b
PA
58872013-10-02 Pedro Alves <palves@redhat.com>
5888
5889 * server.c (process_serial_event): Don't output "GDBserver
5890 exiting" if GDB is connected through stdio.
5891 * target.c (mywait): Likewise, be silent if GDB is connected
5892 through stdio.
5893
97ad4581
JB
58942013-10-01 Joel Brobecker <brobecker@adacore.com>
5895
5896 * lynx-low.c (lynx_add_threads_after_attach): New function.
5897 (lynx_attach): Remove call to add_thread. Add call to
5898 lynx_add_threads_after_attach instead.
5899
5b4e221c
MF
59002013-09-28 Mike Frysinger <vapier@gentoo.org>
5901
5902 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5903 * config.in, configure: Regenerated.
5904
ee47b2f8
YQ
59052013-09-18 Yao Qi <yao@codesourcery.com>
5906
5907 PR server/15959
5908 * server.c (start_inferior): Clear 'resume_info'.
5909
d6707650 59102013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5911
d6707650
JW
5912 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5913 for each register.
5914
9243dd0e 59152013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5916
9243dd0e
JW
5917 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5918 linux-tile-low.o to srv_tgtobj.
5919
c623a6ef
WN
59202013-09-16 Will Newton <will.newton@linaro.org>
5921
5922 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5923 out regs.
5924
fb71d39e
PA
59252013-09-06 Pedro Alves <palves@redhat.com>
5926
5927 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5928 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5929 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5930 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5931 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5932 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5933
8e7e9910
PA
59342013-09-06 Pedro Alves <palves@redhat.com>
5935
5936 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5937 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5938
7c3a12ca
PA
59392013-09-06 Pedro Alves <palves@redhat.com>
5940
5941 * linux-amd64-ipa.c: Include tracepoint.h.
5942 * linux-i386-ipa.c: Include tracepoint.h.
5943
8eb3d7b6
RW
59442013-09-06 Ricard Wanderlof <ricardw@axis.com>
5945
5946 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5947 (ps_get_thread_area): New function.
5948
eddddb9d
RW
59492013-09-06 Ricard Wanderlof <ricardw@axis.com>
5950
5951 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5952 (initialize_low_arch): Call init_registers_crisv32 rather than
5953 init_register_crisv32.
5954
533b0600
PA
59552013-09-05 Pedro Alves <palves@redhat.com>
5956
5957 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5958 to ...
5959 * hostio.h: ... this new file.
5960 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5961 win32-low.c: Include hostio.h.
5962
0ce3d3b5
PA
59632013-09-05 Pedro Alves <palves@redhat.com>
5964
5965 * server.h (gdb_client_data, handler_func, callback_handler_func)
5966 (delete_file_handler, add_file_handler, append_callback_event)
5967 (delete_callback_event, start_event_loop, initialize_event_loop):
5968 Move to event-loop.h and include it.
5969 * event-loop.h: New file.
5970
799cdc37
PA
59712013-09-05 Pedro Alves <palves@redhat.com>
5972
5973 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5974 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5975 (loaded_dll, unloaded_dll): Move to ...
5976 * dll.h: ... this new file.
5977 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5978
6a6bbd9d
PA
59792013-09-05 Pedro Alves <palves@redhat.com>
5980
5981 * server.h (current_process, get_thread_process, all_processes)
5982 (add_inferior_to_list, for_each_inferior, current_inferior)
5983 (remove_inferior, add_process, remove_process, find_process_pid)
5984 (have_started_inferiors_p, have_attached_inferiors_p)
5985 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5986 (clear_inferiors, find_inferior, find_inferior_id)
5987 (inferior_target_data, set_inferior_target_data)
5988 (inferior_regcache_data, set_inferior_regcache_data): Move to
5989 inferiors.h, and include it.
5990 * inferiors.h: New file.
5991
f699aaba
PA
59922013-09-05 Pedro Alves <palves@redhat.com>
5993
5994 * server.h (struct emit_ops, current_insn_ptr, emit_error):
5995 Move ...
72f4393d 5996 * ax.h: ... here.
f699aaba 5997
c144c7a0
PA
59982013-09-05 Pedro Alves <palves@redhat.com>
5999
6000 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6001 tracepoint.h.
6002 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6003 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6004 (handle_tracepoint_general_set, handle_tracepoint_query)
6005 (tracepoint_finished_step, tracepoint_was_hit)
6006 (release_while_stepping_state_list, current_traceframe)
6007 (in_readonly_region, traceframe_read_mem)
6008 (fetch_traceframe_registers, traceframe_read_sdata)
6009 (traceframe_read_info, struct fast_tpoint_collect_status)
6010 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6011 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6012 (supply_fast_tracepoint_registers)
6013 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6014 (ipa_tdesc, claim_trampoline_space)
6015 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6016 (agent_mem_read, agent_get_trace_state_variable_value)
6017 (agent_set_trace_state_variable_value, agent_tsv_read)
6018 (agent_mem_read_string, get_raw_reg_func_addr)
6019 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6020 * tracepoint.h: ... this new file.
6021
ff42e6ab
PA
60222013-09-05 Pedro Alves <palves@redhat.com>
6023
6024 * server.h (perror_with_name, error, fatal, warning, paddress)
6025 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6026 include it.
6027 * utils.h: New file.
6028
541af0f4
PA
60292013-09-05 Pedro Alves <palves@redhat.com>
6030
6031 * server.h (remote_debug, noack_mode, transport_is_reliable)
6032 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6033 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6034 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6035 (write_enn, initialize_async_io, enable_async_io)
6036 (disable_async_io, check_remote_input_interrupt_request)
6037 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6038 (dead_thread_notify, prepare_resume_reply)
6039 (decode_address_to_semicolon, decode_address, decode_m_packet)
6040 (decode_M_packet, decode_X_packet, decode_xfer_write)
6041 (decode_search_memory_packet, unhexify, hexify)
6042 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6043 (look_up_one_symbol, relocate_instruction)
6044 (monitor_output): Move to remote-utils.h, and include it.
6045 * remote-utils.h: New file.
6046
eebdf26b
PA
60472013-09-05 Pedro Alves <palves@redhat.com>
6048
6049 * server.h (_): Delete.
6050
3aafd2ff
PA
60512013-09-02 Pedro Alves <palves@redhat.com>
6052
6053 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6054 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6055 allocated.
6056 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6057
cee83bcb
PM
60582013-09-02 Pierre Muller <muller@sourceware.org>
6059
6060 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6061 or WriteProcessMemory complete successfully and handle
6062 ERROR_PARTIAL_COPY error.
6063
9a13b2fa
PA
60642013-09-02 Pedro Alves <palves@redhat.com>
6065
6066 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6067 error instead of EIO.
6068
602e3198
JK
60692013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6070
6071 PR server/15604
6072 * linux-low.c: Include filestuff.h.
6073 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6074 * lynx-low.c: Include filestuff.h.
6075 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6076 * server.c: Include filestuff.h.
6077 (main): Call notice_open_fds.
6078 * spu-low.c: Include filestuff.h.
6079 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6080
96d7229d
LM
60812013-08-22 Luis Machado <lgustavo@codesourcery.com>
6082
6083 * Makefile.in: Explain why ../target and ../nat are not
6084 listed as include file search paths.
6085 (linux-waitpid.o): New object file rule.
6086 * configure.srv (srv_native_linux_obj): New variable.
6087 Replace all occurrences of linux native object files with
6088 $srv_native_linux_obj.
6089 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6090 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6091 (linux_enable_event_reporting): Remove declaration.
6092 (my_waitpid): Moved to common/linux-waitpid.c.
6093 (linux_wait_for_event): Pass ptid when calling
6094 linux_enable_event_reporting.
6095 (linux_supports_tracefork_flag): Remove.
6096 (linux_enable_event_reporting): Likewise.
6097 (linux_tracefork_grandchild): Remove.
6098 (STACK_SIZE): Moved to common/linux-ptrace.c.
6099 (linux_tracefork_child): Remove.
6100 (linux_test_for_tracefork): Remove.
6101 (linux_look_up_symbols): Call linux_supports_traceclone.
6102 (initialize_low): Remove call to linux_test_for_tracefork.
6103 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6104 common/linux-ptrace.h.
6105 (PTRACE_TYPE_ARG4): Likewise.
6106 Include linux-ptrace.h.
6107
32940073
PA
61082013-08-21 Pedro Alves <palves@redhat.com>
6109
6110 * config.in: Renegerate.
6111
33b60d58 61122013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6113
33b60d58
LM
6114 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6115 (SFILES): Remove $(srcdir)/common/target-common.c and
6116 add $(srcdir)/target/waitstatus.c.
6117 (OBS): Remove target-common.o and add waitstatus.o.
6118 (server_h): Remove $(srcdir)/../common/target-common.h and
6119 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6120 and $(srcdir)/../target/waitstatus.h.
6121 (target-common.o): Remove.
6122 (waitstatus.o): New target object file.
6123 * target.h: Do not include target-common.h and
6124 include target/resume.h, target/wait.h and
6125 target/waitstatus.h.
6126
b8e1b30e
LM
61272013-08-13 Luis Machado <lgustavo@codesourcery.com>
6128
6129 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6130 to PTRACE_TYPE_ARG3.
6131 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6132 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6133 PTRACE_TYPE_ARG4.
6134 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6135 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6136
7a60ad40
YQ
61372013-07-27 Jie Zhang <jie@codesourcery.com>
6138 Daniel Jacobowitz <dan@codesourcery.com>
6139 Yao Qi <yao@codesourcery.com>
6140
6141 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6142 (mips-linux-watch.o): New rule.
6143 (mips_linux_watch_h): New variable.
6144 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6145 srv_tgtobj.
6146 * linux-mips-low.c: Include mips-linux-watch.h.
6147 (struct arch_process_info, struct arch_lwp_info): New.
6148 (update_watch_registers_callback): New function.
6149 (mips_linux_new_process, mips_linux_new_thread) New functions.
6150 (mips_linux_prepare_to_resume, mips_insert_point): New
6151 functions.
6152 (mips_remove_point, mips_stopped_by_watchpoint): New
6153 functions.
6154 (rsp_bp_type_to_target_hw_bp_type): New function.
6155 (mips_stopped_data_address): New function.
6156 (the_low_target): Add watchpoint support functions.
6157
de6f69ad
YQ
61582013-07-27 Yao Qi <yao@codesourcery.com>
6159
6160 * i386-low.c: Include break-common.h.
6161 (enum target_hw_bp_type): Remove.
6162
3360c0bf
LM
61632013-07-24 Luis Machado <lgustavo@codesourcery.com>
6164
6165 * Makefile.in (SFILES): /common/target-common.c.
6166 (OBS): Add target-common.o.
6167 (server_h): Add $(srcdir)/../common/target-common.h.
6168 (target-common.o): New target.
6169 * server.c (queue_stop_reply_callback): Free
6170 status string after use.
6171 * target.c (target_waitstatus_to_string): Remove.
6172 * target.h: Include target-common.h.
6173 (resume_kind): Likewise.
6174 (target_waitkind): Likewise.
6175 (target_waitstatus): Likewise.
6176 (TARGET_WNOHANG): Likewise.
6177
bd885420
YQ
61782013-07-04 Yao Qi <yao@codesourcery.com>
6179
6180 * Makefile.in (host_alias): Use @host_noncanonical@.
6181 (target_alias): Use @target_noncanonical@.
6182 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6183 ACX_NONCANONICAL_HOST.
6184 * configure: Regenerated.
6185
6186 Revert:
6187 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6188
6189 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6190 * configure: Rebuild.
6191 * Makefile.in (version_host, version_target): Get from configure.
6192 (version.c): Use $(version_host) and $(version_target).
6193
17ef446e
PA
61942013-07-03 Pedro Alves <palves@redhat.com>
6195
6196 * Makefile.in (config.status): Depend on development.sh.
6197 * acinclude.m4: Include libmcheck.m4.
6198 * configure: Regenerate.
6199
7a9a7487
MG
62002013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6201
6202 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6203 attribute inside the parentheses.
6204 (winapi_DebugSetProcessKillOnExit): Ditto.
6205 (winapi_DebugBreakProcess): Ditto.
6206 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 6207
49b64de6
MG
62082013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6209
6210 * notif.h (notif_event): Add a dummy member to avoid compiler
6211 errors.
6212
d5749ee7
PA
62132013-07-01 Pedro Alves <palves@redhat.com>
6214
6215 * hostio.c (HOSTIO_PATH_MAX): Define.
6216 (require_filename, handle_open, handle_unlink, handle_readlink):
6217 Use it.
6218
d8d2a3ee
PA
62192013-07-01 Pedro Alves <palves@redhat.com>
6220
6221 * server.h: Include "pathmax.h".
6222 * linux-low.c: Don't include sys/param.h.
6223 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6224 MAXPATHLEN.
6225 * win32-low.c: Don't include sys/param.h.
6226 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6227
bc7dea8d
PA
62282013-07-01 Pedro Alves <palves@redhat.com>
6229
6230 * event-loop.c: Don't check HAVE_UNISTD_H before including
6231 <unistd.h>.
6232 * gdbreplay.c: Likewise.
6233 * remote-utils.c: Likewise.
6234 * server.c: Likewise.
6235 * configure.ac: Don't check for unistd.h.
6236 * configure: Regenerate.
6237
d6c2da54
TT
62382013-06-28 Tom Tromey <tromey@redhat.com>
6239
6240 * Makefile.in (version.c): Use version.in, not
6241 common/version.in.
6242
257b6bec
MG
62432013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6244
6245 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6246 * configure: Rebuild.
6247 * Makefile.in (version_host, version_target): Get from configure.
6248 (version.c): Use $(version_host) and $(version_target).
6249
86ebe149
DK
62502013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6251
6252 Fix trace-status to output user name without trailing colon.
6253 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6254
f30aa5af
DK
62552013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6256
6257 Fix trace-status to output proper start-time and stop-time.
6258 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6259 output start time and stop time in hex as gdb expects.
6260
28a93511
YQ
62612013-06-26 Pedro Alves <pedro@codesourcery.com>
6262
6263 * tracepoint.c (build_traceframe_info_xml): Output trace state
6264 variables present in the trace buffer.
6265
01208463
TT
62662013-06-24 Tom Tromey <tromey@redhat.com>
6267
6268 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6269 create-version.sh.
6270 (version.o): Remove.
6271 * gdbreplay.c: Include version.h.
6272 (version, host_name): Don't declare.
6273 * server.h: Include version.h.
6274 (version, host_name): Don't declare.
6275
760256f9
PA
62762013-06-12 Pedro Alves <palves@redhat.com>
6277
6278 * linux-x86-low.c (linux_is_elf64): Delete global.
6279 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6280 with local linux_pid_exe_is_elf_64_file use.
6281
030031ee
PA
62822013-06-11 Pedro Alves <palves@redhat.com>
6283
6284 * linux-low.c (regset_disabled, disable_regset): New functions.
6285 (regsets_fetch_inferior_registers)
6286 (regsets_store_inferior_registers): Use them.
6287 (initialize_regsets_info); Don't allocate the disabled_regsets
6288 array here.
6289 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6290 comment.
6291
5da6eb0a
PA
62922013-06-11 Pedro Alves <palves@redhat.com>
6293
6294 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6295 xmalloc.
6296
7e5aaa09
PA
62972013-06-11 Pedro Alves <palves@redhat.com>
6298
6299 * linux-x86-low.c (initialize_low_arch): Call
6300 init_registers_x32_avx_linux.
6301
d878444c
JK
63022013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6303
6304 Fix compatibility with Android Bionic.
6305 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6306 it is not empty.
6307
3aee8918
PA
63082013-06-07 Pedro Alves <palves@redhat.com>
6309
5f2b57b5 6310 PR server/14823
3aee8918
PA
6311 * Makefile.in (OBS): Add tdesc.o.
6312 (IPA_OBJS): Add tdesc-ipa.o.
6313 (tdesc-ipa.o): New rule.
6314 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6315 interface.
6316 * linux-low.c (new_inferior): Delete.
6317 (disabled_regsets, num_regsets): Delete.
6318 (linux_add_process): Adjust to set the new per-process
6319 new_inferior flag.
6320 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6321 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6322 was a stop. When calling arch_setup, switch the current inferior
6323 to the thread that got an event.
6324 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6325 (regsets_fetch_inferior_registers)
6326 (regsets_store_inferior_registers): New regsets_info parameter.
6327 Adjust to use it.
6328 (linux_register_in_regsets): New regs_info parameter. Adjust to
6329 use it.
6330 (register_addr, fetch_register, store_register): New usrregs_info
6331 parameter. Adjust to use it.
6332 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6333 parameter regs_info. Adjust to use it.
6334 (linux_fetch_registers): Get the current inferior's regs_info, and
6335 adjust to use it.
6336 (linux_store_registers): Ditto.
6337 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6338 (initialize_low): Don't initialize the target_regsets here. Call
6339 initialize_low_arch.
6340 * linux-low.h (target_regsets): Delete declaration.
6341 (struct regsets_info): New.
6342 (struct usrregs_info): New.
6343 (struct regs_info): New.
6344 (struct process_info_private) <new_inferior>: New field.
6345 (struct linux_target_ops): Delete the num_regs, regmap, and
6346 regset_bitmap fields. New field regs_info.
6347 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6348 * i387-fp.c (num_xmm_registers): Delete.
6349 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6350 calls to new interface.
6351 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6352 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6353 Infer the number of xmm registers from the regcache's target
6354 description.
6355 * i387-fp.h (num_xmm_registers): Delete.
6356 * inferiors.c (add_thread): Don't install the thread's regcache
6357 here.
6358 * proc-service.c (gregset_info): Fetch the current inferior's
6359 regs_info. Adjust to use it.
6360 * regcache.c: Include tdesc.h.
6361 (register_bytes, reg_defs, num_registers)
6362 (gdbserver_expedite_regs): Delete.
6363 (get_thread_regcache): If the thread doesn't have a regcache yet,
6364 create one, instead of aborting gdbserver.
6365 (regcache_invalidate_one): Rename to ...
6366 (regcache_invalidate_thread): ... this.
6367 (regcache_invalidate_one): New.
6368 (regcache_invalidate): Only invalidate registers of the current
6369 process.
6370 (init_register_cache): Add target_desc parameter, and use it.
6371 (new_register_cache): Ditto. Assert the target description has a
6372 non zero registers_size.
6373 (regcache_cpy): Add assertions. Adjust.
6374 (realloc_register_cache, set_register_cache): Delete.
6375 (registers_to_string, registers_from_string): Adjust.
6376 (find_register_by_name, find_regno, find_register_by_number)
6377 (register_cache_size): Add target_desc parameter, and use it.
6378 (free_register_cache_thread, free_register_cache_thread_one)
6379 (regcache_release, register_cache_size): New.
6380 (register_size): Add target_desc parameter, and use it.
6381 (register_data, supply_register, supply_register_zeroed)
6382 (supply_regblock, supply_register_by_name, collect_register)
6383 (collect_register_as_string, collect_register_by_name): Adjust.
6384 * regcache.h (struct target_desc): Forward declare.
6385 (struct regcache) <tdesc>: New field.
6386 (init_register_cache, new_register_cache): Add target_desc
6387 parameter.
6388 (regcache_invalidate_thread): Declare.
6389 (regcache_invalidate_one): Delete declaration.
6390 (regcache_release): Declare.
6391 (find_register_by_number, register_cache_size, register_size)
6392 (find_regno): Add target_desc parameter.
6393 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6394 declarations.
6395 * remote-utils.c: Include tdesc.h.
6396 (outreg, prepare_resume_reply): Adjust.
6397 * server.c: Include tdesc.h.
6398 (gdbserver_xmltarget): Delete declaration.
6399 (get_features_xml, process_serial_event): Adjust.
6400 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6401 declare.
6402 (struct process_info) <tdesc>: New field.
6403 (ipa_tdesc): Declare.
6404 * tdesc.c: New file.
6405 * tdesc.h: New file.
6406 * tracepoint.c: Include tdesc.h.
6407 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6408 (get_context_regcache): Adjust to pass ipa_tdesc down.
6409 (do_action_at_tracepoint): Adjust to get the register cache size
6410 from the context regcache's description.
6411 (traceframe_walk_blocks): Adjust to get the register cache size
6412 from the current trace frame's description.
6413 (traceframe_get_pc): Adjust to get current trace frame's
6414 description and pass it down.
6415 (gdb_collect): Adjust to get the register cache size from the
6416 IPA's description.
6417 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6418 (gdbserver_xmltarget): Delete.
6419 (initialize_low_tracepoint): Set the ipa's target description.
6420 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6421 (initialize_low_tracepoint): Set the ipa's target description.
6422 * linux-x86-low.c: Include tdesc.h.
6423 [__x86_64__] (is_64bit_tdesc): New.
6424 (ps_get_thread_area, x86_get_thread_area): Use it.
6425 (i386_cannot_store_register): Rename to ...
6426 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6427 (i386_cannot_fetch_register): Rename to ...
6428 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6429 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6430 to new interface.
6431 (target_regsets): Rename to ...
6432 (x86_regsets): ... this.
6433 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6434 interface.
6435 (x86_siginfo_fixup): Use is_64bit_tdesc.
6436 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6437 (tdesc_x32_avx_linux, tdesc_x32_linux)
6438 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6439 Declare.
6440 (x86_linux_update_xmltarget): Delete.
6441 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6442 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6443 (AMD64_LINUX_USER64_CS): New.
6444 (x86_linux_read_description): New, based on
6445 x86_linux_update_xmltarget.
6446 (same_process_callback): New.
6447 (x86_arch_setup_process_callback): New.
6448 (x86_linux_update_xmltarget): New.
6449 (x86_regsets_info): New.
6450 (amd64_linux_regs_info): New.
6451 (i386_linux_usrregs_info): New.
6452 (i386_linux_regs_info): New.
6453 (x86_linux_regs_info): New.
6454 (x86_arch_setup): Reimplement.
6455 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6456 (x86_emit_ops): Ditto.
6457 (the_low_target): Adjust. Install x86_linux_regs_info,
6458 x86_cannot_fetch_register, and x86_cannot_store_register.
6459 (initialize_low_arch): New.
6460 * linux-ia64-low.c (tdesc_ia64): Declare.
6461 (ia64_fetch_register): Adjust.
6462 (ia64_usrregs_info, regs_info): New globals.
6463 (ia64_regs_info): New function.
6464 (the_low_target): Adjust.
6465 (initialize_low_arch): New function.
6466 * linux-sparc-low.c (tdesc_sparc64): Declare.
6467 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6468 Adjust.
6469 (sparc_arch_setup): New function.
6470 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6471 (the_low_target): Adjust.
6472 (initialize_low_arch): New function.
6473 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6474 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6475 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6476 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6477 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6478 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6479 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6480 (tdesc_powerpc_isa205_vsx64l): Declare.
6481 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6482 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6483 (ppc_set_pc, ppc_get_hwcap): Adjust.
6484 (ppc_usrregs_info): Forward declare.
6485 (!__powerpc64__) ppc_regmap_adjusted: New global.
6486 (ppc_arch_setup): Adjust to the current process'es target
6487 description.
6488 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6489 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6490 (ppc_store_evrregset): Adjust.
6491 (target_regsets): Rename to ...
6492 (ppc_regsets): ... this, and make static.
6493 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6494 (ppc_regs_info): New function.
6495 (the_low_target): Adjust.
6496 (initialize_low_arch): New function.
6497 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6498 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6499 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6500 (tdesc_s390x_linux64v2): Declare.
6501 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6502 (s390_fill_gregset, s390_store_last_break): Adjust.
6503 (target_regsets): Rename to ...
6504 (s390_regsets): ... this, and make static.
6505 (s390_get_pc, s390_set_pc): Adjust.
6506 (s390_get_hwcap): New target_desc parameter, and use it.
6507 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6508 (s390_arch_setup): Adjust to set the current process'es target
6509 description. Don't adjust the regmap.
6510 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6511 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6512 (regs_info_3264): New globals.
6513 (s390_regs_info): New function.
6514 (the_low_target): Adjust.
6515 (initialize_low_arch): New function.
6516 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6517 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6518 [__mips64] (init_registers_mips_linux)
6519 (init_registers_mips_dsp_linux): Delete defines.
6520 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6521 (have_dsp): New global.
6522 (mips_read_description): New, based on mips_arch_setup.
6523 (mips_arch_setup): Reimplement.
6524 (get_usrregs_info): New function.
6525 (mips_cannot_fetch_register, mips_cannot_store_register)
6526 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6527 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6528 (target_regsets): Rename to ...
6529 (mips_regsets): ... this, and make static.
6530 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6531 (dsp_regs_info, regs_info): New globals.
6532 (mips_regs_info): New function.
6533 (the_low_target): Adjust.
6534 (initialize_low_arch): New function.
6535 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6536 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6537 Declare.
6538 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6539 (arm_read_description): New, with bits factored from
6540 arm_arch_setup.
6541 (arm_arch_setup): Reimplement.
6542 (target_regsets): Rename to ...
6543 (arm_regsets): ... this, and make static.
6544 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6545 (arm_regs_info): New function.
6546 (the_low_target): Adjust.
6547 (initialize_low_arch): New function.
6548 * linux-m68k-low.c (tdesc_m68k): Declare.
6549 (target_regsets): Rename to ...
6550 (m68k_regsets): ... this, and make static.
6551 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6552 (m68k_regs_info): New function.
6553 (m68k_arch_setup): New function.
6554 (the_low_target): Adjust.
6555 (initialize_low_arch): New function.
6556 * linux-sh-low.c (tdesc_sharch): Declare.
6557 (target_regsets): Rename to ...
6558 (sh_regsets): ... this, and make static.
6559 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6560 (sh_regs_info, sh_arch_setup): New functions.
6561 (the_low_target): Adjust.
6562 (initialize_low_arch): New function.
6563 * linux-bfin-low.c (tdesc_bfin): Declare.
6564 (bfin_arch_setup): New function.
6565 (bfin_usrregs_info, regs_info): New globals.
6566 (bfin_regs_info): New function.
6567 (the_low_target): Adjust.
6568 (initialize_low_arch): New function.
6569 * linux-cris-low.c (tdesc_cris): Declare.
6570 (cris_arch_setup): New function.
6571 (cris_usrregs_info, regs_info): New globals.
6572 (cris_regs_info): New function.
6573 (the_low_target): Adjust.
6574 (initialize_low_arch): New function.
6575 * linux-cris-low.c (tdesc_crisv32): Declare.
6576 (cris_arch_setup): New function.
6577 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6578 (cris_regs_info): New function.
6579 (the_low_target): Adjust.
6580 (initialize_low_arch): New function.
6581 * linux-m32r-low.c (tdesc_m32r): Declare.
6582 (m32r_arch_setup): New function.
6583 (m32r_usrregs_info, regs_info): New globals.
6584 (m32r_regs_info): Adjust.
6585 (initialize_low_arch): New function.
6586 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6587 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6588 (tic6x_usrregs_info): Forward declare.
6589 (tic6x_read_description): New function, based on ...
6590 (tic6x_arch_setup): ... this. Reimplement.
6591 (target_regsets): Rename to ...
6592 (tic6x_regsets): ... this, and make static.
6593 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6594 (tic6x_regs_info): New function.
6595 (the_low_target): Adjust.
6596 (initialize_low_arch): New function.
6597 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6598 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6599 (target_regsets): Rename to ...
6600 (xtensa_regsets): ... this, and make static.
6601 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6602 globals.
6603 (xtensa_arch_setup, xtensa_regs_info): New functions.
6604 (the_low_target): Adjust.
6605 (initialize_low_arch): New function.
6606 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6607 (nios2_arch_setup): Set the current process'es tdesc.
6608 (target_regsets): Rename to ...
6609 (nios2_regsets): ... this.
6610 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6611 (nios2_regs_info): New function.
6612 (the_low_target): Adjust.
6613 (initialize_low_arch): New function.
a261b8f5
PA
6614 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6615 (aarch64_arch_setup): Set the current process'es tdesc.
6616 (target_regsets): Rename to ...
6617 (aarch64_regsets): ... this.
6618 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6619 (aarch64_regs_info): New function.
6620 (the_low_target): Adjust.
6621 (initialize_low_arch): New function.
3aee8918
PA
6622 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6623 globals.
6624 (target_regsets): Rename to ...
6625 (tile_regsets): ... this.
6626 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6627 (tile_regs_info): New function.
6628 (tile_arch_setup): Set the current process'es tdesc.
6629 (the_low_target): Adjust.
6630 (initialize_low_arch): New function.
6631 * spu-low.c (tdesc_spu): Declare.
6632 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6633 * win32-arm-low.c (tdesc_arm): Declare.
6634 (arm_arch_setup): New function.
6635 (the_low_target): Install arm_arch_setup instead of
6636 init_registers_arm.
6637 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6638 (init_windows_x86): Rename to ...
6639 (i386_arch_setup): ... this. Set `win32_tdesc'.
6640 (the_low_target): Adjust.
6641 * win32-low.c (win32_tdesc): New global.
6642 (child_add_thread): Don't create the thread cache here.
6643 (do_initial_child_stuff): Set the new process'es tdesc.
6644 * win32-low.h (struct target_desc): Forward declare.
6645 (win32_tdesc): Declare.
6646 * lynx-i386-low.c (tdesc_i386): Declare global.
6647 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6648 * lynx-low.c (lynx_tdesc): New global.
6649 (lynx_add_process): Set the new process'es tdesc.
6650 * lynx-low.h (struct target_desc): Forward declare.
6651 (lynx_tdesc): Declare global.
6652 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6653 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6654 * nto-low.c (nto_tdesc): New global.
6655 (do_attach): Set the new process'es tdesc.
6656 * nto-low.h (struct target_desc): Forward declare.
6657 (nto_tdesc): Declare.
6658 * nto-x86-low.c (tdesc_i386): Declare.
6659 (nto_x86_arch_setup): Set `nto_tdesc'.
6660
b1fbec62
GB
66612013-06-04 Gary Benson <gbenson@redhat.com>
6662
6663 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6664 to qSupported response when appropriate.
6665 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6666 with nonzero-length annex.
6667 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6668 arguments supplied in annex.
6669
d1ec4ce7
DE
66702013-05-31 Doug Evans <dje@google.com>
6671
ac44adcb 6672 PR server/15594
d1ec4ce7
DE
6673 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6674 64 bits in 64-cross-32 environment.
6675
9b25f2d3
PA
66762013-05-28 Pedro Alves <palves@redhat.com>
6677
6678 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6679 (aarch64-without-fpu.c): Delete rule.
6680 * configure.srv (aarch64*-*-linux*): Remove references to
6681 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6682 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6683 declaration.
6684
6740dc9c
PA
66852013-05-24 Pedro Alves <palves@redhat.com>
6686
6687 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6688 instead of strchr/decode_address. Error if the range isn't split
6689 with a ','. Don't assume there's be a ':' in the action.
6690
c2d6af84
PA
66912013-05-23 Yao Qi <yao@codesourcery.com>
6692 Pedro Alves <palves@redhat.com>
6693
6694 * linux-low.c (lwp_in_step_range): New function.
6695 (linux_wait_1): If the thread was range stepping and stopped
6696 outside the stepping range, report the stop to GDB. Otherwise,
6697 continue stepping. Add range stepping debug output.
6698 (linux_set_resume_request): Copy the step range from the resume
6699 request to the lwp.
6700 (linux_supports_range_stepping): New.
6701 (linux_target_ops) <supports_range_stepping>: Set to
6702 linux_supports_range_stepping.
6703 * linux-low.h (struct linux_target_ops)
6704 <supports_range_stepping>: New field.
6705 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6706 * linux-x86-low.c (x86_supports_range_stepping): New.
6707 (the_low_target) <supports_range_stepping>: Set to
6708 x86_supports_range_stepping.
6709 * server.c (handle_v_cont): Handle 'r' action.
6710 (handle_v_requests): Append ";r" if the target supports range
6711 stepping.
6712 * target.h (struct thread_resume) <step_range_start,
6713 step_range_end>: New fields.
6714 (struct target_ops) <supports_range_stepping>:
6715 New field.
6716 (target_supports_range_stepping): New macro.
6717
58794e1a
JB
67182013-05-17 Joel Brobecker <brobecker@adacore.com>
6719
6720 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6721 confusion in comment.
6722
d631c5a7
JB
67232013-05-17 Joel Brobecker <brobecker@adacore.com>
6724
6725 * lynx-low.c (struct process_info_private): New type.
6726 (lynx_add_process): New function.
6727 (lynx_create_inferior, lynx_attach): Replace calls to
6728 add_process by calls to lynx_add_process.
6729 (lynx_resume): If PTID is null, then try using
6730 current_process()->private->last_wait_event_ptid.
6731 Add comments.
6732 (lynx_clear_inferiors): Delete. The contents of that function
6733 has been inlined in lynx_mourn;
6734 (lynx_wait_1): Save the ptid in the process's private data.
6735 (lynx_mourn): Free the process' private data. Replace call
6736 to lynx_clear_inferiors by call to clear_inferiors.
6737
96f7a20f
YQ
67382013-05-17 Yao Qi <yao@codesourcery.com>
6739
6740 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6741 the right place.
6742
db0dfaa0
LM
67432013-05-16 Luis Machado <lgustavo@codesourcery.com>
6744
6745 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6746 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6747 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6748 PT_TEXT_END_ADDR guards. Update comments.
6749 (linux_target_op) <read_offsets>: Conditionally define to
6750 linux_read_offsets if the target is UCLIBC and if it defines
6751 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6752
68f5f838
SL
67532013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6754 Andrew Jenner <andrew@codesourcery.com>
6755
6756 * Makefile.in (SFILES): Add linux-nios2-low.c.
6757 (clean): Add action to delete nios2-linux.c.
6758 (nios2-linux.c): New rule.
6759 * configure.srv: Add nios2*-*-linux*.
6760 * linux-nios2-low.c: New.
6761
1ebff1fd
HAQ
67622013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6763
6764 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6765
f6150862
HZ
67662013-04-25 Hui Zhu <hui@codesourcery.com>
6767
6768 PR gdb/15186
f6150862
HZ
6769 * ax.c (ax_printf): Add fflush.
6770
614c279d
TT
67712013-04-22 Tom Tromey <tromey@redhat.com>
6772
6773 * Makefile.in (SFILES): Add filestuff.c.
6774 (OBS): Add filestuff.o.
6775 (filestuff.o): New target.
6776 * config.in, configure: Rebuild.
6777 * configure.ac: Check for fdwalk, pipe2.
6778
7d4e5717
PA
67792013-04-17 Pedro Alves <palves@redhat.com>
6780
6781 * configure.ac (USE_THREAD_DB): Delete variable.
6782 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6783 Don't AC_SUBST USE_THREAD_DB.
6784 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6785 * config.in, configure: Regenerate.
6786
d5c93e41
PA
67872013-04-16 Pedro Alves <palves@redhat.com>
6788
6789 * linux-low.h (struct lwp_info) <thread_known>: Move under
6790 the USE_THREAD_DB #ifdef.
6791
04f5fe89
PA
67922013-04-16 Pedro Alves <palves@redhat.com>
6793
6794 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6795 (linux-low.o): Delete rule.
6796 * linux-low.h: Always include "gdb_thread_db.h" instead of
6797 conditionally including thread_db.h.
6798 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6799 HAVE_THREAD_DB_H.
6800
480b27bf
JK
68012013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6802
6803 * Makefile.in (install-only): Fix make install regression.
6804
43662968
JK
68052013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6806
6807 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6808 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6809 installation.
6810 * gdbserver.1: Remove.
6811
3e74e146
PA
68122013-03-22 Pedro Alves <palves@redhat.com>
6813
6814 * linux-low.c (handle_extended_wait): Don't call
6815 linux_enable_event_reporting.
6816
a8347a2a
TT
68172013-03-15 Tony Theodore <tonyt@logyst.com>
6818
6819 PR build/9098:
6820 * Makefile.in (SHELL): Use @SHELL@.
6821
eeb56fa7
SDJ
68222013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6823
6824 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6825 compiler warning.
6826
4fa7e2ff
JB
68272013-03-13 Joel Brobecker <brobecker@adacore.com>
6828
6829 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6830 Remove extraneous NULL element.
6831
8ddb1965
YQ
68322013-03-13 Yao Qi <yao@codesourcery.com>
6833
6834 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6835 'V' block in trace frame.
6836
9accd112
MM
68372013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6838
6839 * target.h (struct target_ops): Add btrace ops.
6840 (target_supports_btrace): New macro.
6841 (target_enable_btrace): New macro.
6842 (target_disable_btrace): New macro.
6843 (target_read_btrace): New macro.
6844 * gdbthread.h (struct thread_info): Add btrace field.
6845 * server.c: Include btrace-common.h.
6846 (handle_btrace_general_set): New function.
6847 (handle_btrace_enable): New function.
6848 (handle_btrace_disable): New function.
6849 (handle_general_set): Call handle_btrace_general_set.
6850 (handle_qxfer_btrace): New function.
6851 (struct qxfer qxfer_packets[]): Add btrace entry.
6852 * inferiors.c (remove_thread): Disable btrace.
6853 * linux-low: Include linux-btrace.h.
6854 (linux_low_enable_btrace): New function.
6855 (linux_low_read_btrace): New function.
6856 (linux_target_ops): Add btrace ops.
6857 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6858 Add srv_linux_btrace=yes.
6859 (x86_64-*-linux*): Add linux-btrace.o.
6860 Add srv_linux_btrace=yes.
6861 * configure.ac: Define HAVE_LINUX_BTRACE.
6862 * config.in: Regenerated.
6863 * configure: Regenerated.
6864
5cc22e4c
MM
68652013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6866
6867 * server.c (handle_qxfer): Preserve error message if -3 is
6868 returned.
6869 (qxfer): Document the -3 return value.
6870
7c97f91e
MM
68712013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6872
6873 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6874 (linux_btrace_h): New variable.
6875 (linux-btrace.o): New rule.
6876
be9a119c 68772013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
6878 Hafiz Abid Qadeer <abidh@codesourcery.com>
6879
6880 * tracepoint.c (trace_buffer_size): New global.
6881 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6882 (init_trace_buffer): Change to one-argument function. Allocate
6883 trace buffer memory.
6884 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6885 handle QTBuffer:size packet.
6886 (cmd_bigqtbuffer_size): New function.
6887 (initialize_tracepoint): Call init_trace_buffer with
6888 DEFAULT_TRACE_BUFFER_SIZE.
6889 * server.c (handle_query): Add QTBuffer:size in the
6890 supported packets.
6891
e64f7499
YQ
68922013-03-07 Yao Qi <yao@codesourcery.com>
6893
6894 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6895 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6896 of -1.
6897 (cmd_qtsp): Adjust condition. Do post increment.
6898 Set cur_action and cur_step_action back to 0.
6899
f0ae6fc3
PA
69002013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6901
6902 PR server/15236
6903 * linux-low.c (linux_write_memory): Return early success if LEN is
6904 zero.
6905
b5b0b0af
CV
69062013-03-05 Corinna Vinschen <vinschen@redhat.de>
6907
334ad4a8 6908 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 6909
589bc927
TT
69102013-02-28 Tom Tromey <tromey@redhat.com>
6911
6912 * configure.ac: Invoke AC_SYS_LARGEFILE.
6913 * configure, config.in: Rebuild.
6914
dfe07582
CV
69152013-02-28 Corinna Vinschen <vinschen@redhat.com>
6916
6917 * win32-low.c: Throughout, fix format strings and casts of
6918 printf-like functions to avoid type related warnings on all
6919 platforms.
6920 (get_child_debug_event): Print dwDebugEventCode as hex since
6921 that's how it's usually documented.
6922
736cd585
YQ
69232013-02-28 Yao Qi <yao@codesourcery.com>
6924
6925 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6926 pulongest.
6927
e1f58301
JW
69282013-02-27 Jiong Wang <jiwang@tilera.com>
6929
6930 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6931 (reg-tilegx32.c): New rule.
6932 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6933 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6934 different register info initializer according to elf class.
6935 (init_registers_tilgx32): New function. The tilegx32 register info
6936 initializer.
6937 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6938 (tile_store_gregset): Likewise.
6939
d171ca78
YQ
69402013-02-27 Yao Qi <yao@codesourcery.com>
6941
6942 * server.c (process_point_options): Print debug message when
6943 debug_threads is true.
6944
282bbdf3
YQ
69452013-02-26 Yao Qi <yao@codesourcery.com>
6946
6947 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6948
aca22551
PA
69492013-02-19 Pedro Alves <palves@redhat.com>
6950 Kai Tietz <ktietz@redhat.com>
6951
6952 PR gdb/15161
6953
6954 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6955 instead of strtoul to extract address from packet.
6956 (process_serial_event) <'z'>: Likewise.
6957
4f3cee1c
YQ
69582013-02-18 Yao Qi <yao@codesourcery.com>
6959
6960 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6961
8e1d55a3
PA
69622013-02-14 Pedro Alves <palves@redhat.com>
6963
6964 Plug memory leak.
6965
6966 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6967 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6968
458820da
PA
69692013-02-14 Pedro Alves <palves@redhat.com>
6970
6971 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6972
baea0dae
PA
69732013-02-14 Pedro Alves <palves@redhat.com>
6974
6975 * tracepoint.c (save_string): Delete.
6976 (add_tracepoint_action): Use savestring instead of save_string.
6977
0b1afbb3
PA
69782013-02-12 Pedro Alves <palves@redhat.com>
6979
6980 * linux-xtensa-low.c: Ditto.
6981 * xtensa-xtregs.c: Ditto.
6982
8a4ac37e
PA
69832013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6984
6985 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6986 thread_db.
6987
148de6bb
MS
69882013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6989
6990 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6991 aarch64_num_wp_regs and aarch64_num_bp_regs to
6992 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6993
55fac6e0
MS
69942013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6995
6996 * linux-aarch64-low.c (ps_get_thread_area): Replace
6997 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6998
176eb98c
MS
69992013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7000 Marcus Shawcroft <marcus.shawcroft@arm.com>
7001 Nigel Stephens <nigel.stephens@arm.com>
7002 Yufeng Zhang <yufeng.zhang@arm.com>
7003
7004 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7005 (aarch64.c, aarch64-without-fpu.c): New targets.
7006 * configure.srv (aarch64*-*-linux*): New.
7007 * linux-aarch64-low.c: New file.
7008
56f7af9c
MS
70092013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7010
43aaf8b6 7011 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7012 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7013 (dequeue_one_deferred_signal, linux_resume_one_thread)
7014 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7015 (linux_tracefork_grandchild, linux_test_for_tracefork)
7016 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7017 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7018 where the argument is 0.
7019
60f662b0
YQ
70202013-01-25 Yao Qi <yao@codesourcery.com>
7021
7022 * event-loop.c: Include "queue.h".
7023 (gdb_event_p): New typedef.
7024 (struct gdb_event) <next_event>: Remove.
7025 (event_queue): Change to QUEUE(gdb_event_p).
7026 (async_queue_event): Remove.
7027 (gdb_event_xfree): New.
7028 (initialize_event_loop): New.
7029 (process_event): Use API from QUEUE.
7030 (wait_for_event): Likewise.
7031 * server.c (main): Call initialize_event_loop.
7032 * server.h (initialize_event_loop): Declare.
7033
5ae4861a
YQ
70342013-01-18 Yao Qi <yao@codesourcery.com>
7035
7036 * ax.h (struct eval_agent_expr_context): New.
7037 (gdb_eval_agent_expr): Update declaration.
7038 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7039 TFRAME. Add new argument CTX.
7040 * server.h (struct eval_agent_expr_context): Declare.
7041 (agent_mem_read, agent_tsv_read): Update declaration.
7042 (agent_mem_read_string): Likewise.
7043 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7044 (add_traceframe_block): Add new argument TPOINT.
7045 Increase TPOINT->traceframe_usage.
7046 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7047 eval_tracepoint_agent_expr.
7048 (condition_true_at_tracepoint): Likewise.
7049 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7050 (agent_mem_read_string, agent_tsv_read): Likewise.
7051
85e00e85
YQ
70522013-01-16 Yao Qi <yao@codesourcery.com>
7053
7054 * linux-low.c (linux_resume_one_lwp): Don't check
7055 'lwp->bp_reinsert != 0'.
7056
4039cf45
JB
70572013-01-07 Joel Brobecker <brobecker@adacore.com>
7058 Pedro Alves <palves@redhat.com>
7059
7060 * lynx-low.c (ptrace_request_to_str): Define a temporary
7061 macro and use it to simplify this function's implementation.
7062
9044dee2
JB
70632013-01-07 Joel Brobecker <brobecker@adacore.com>
7064
7065 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7066 sets errno.
7067
e6352c8f
JB
70682013-01-07 Joel Brobecker <brobecker@adacore.com>
7069
7070 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7071
50681a27
JB
70722013-01-07 Joel Brobecker <brobecker@adacore.com>
7073
7074 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7075
3f6e77ef
JB
70762013-01-07 Joel Brobecker <brobecker@adacore.com>
7077
7078 * lynx-low.c (lynx_resume): Use the resume_info parameter
7079 to determine the ptid for the lynx_ptrace call, unless
7080 it is equal to minus_one_ptid, in which case we use the
7081 ptid of the current_inferior.
7082 (lynx_wait_1): After having received a thread create/exit
7083 event, resume the inferior's execution using the signaling
7084 thread's ptid, rather than the old ptid.
7085
7fda33ae
JB
70862013-01-07 Joel Brobecker <brobecker@adacore.com>
7087
7088 * lynx-low.c (lynx_resume): Delete variable ret.
7089
b9786c74
JB
70902013-01-01 Joel Brobecker <brobecker@adacore.com>
7091
7092 * gdbreplay.c (gdbreplay_version): Update copyright year.
7093 * server.c (gdbserver_version): Likewise.
7094
8b93d60f
JB
70952012-12-17 Joel Brobecker <brobecker@adacore.com>
7096
7097 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7098 new thread.
7099
037335a7
JB
71002012-12-17 Joel Brobecker <brobecker@adacore.com>
7101
7102 * lynx-low.c (ptrace_request_to_str): Add handling for
7103 PTRACE_GETTRACESIG.
7104
52d4cbd8
JB
71052012-12-17 Joel Brobecker <brobecker@adacore.com>
7106
7107 * lynx-low.c (lynx_attach): Delete variable new_process.
7108
ab8f6ca9
JB
71092012-12-17 Joel Brobecker <brobecker@adacore.com>
7110
7111 * lynx-low.c (lynx_create_inferior): Delete variable
7112 new_process.
7113
78cbc024
JB
71142012-12-17 Joel Brobecker <brobecker@adacore.com>
7115
7116 * lynx-low.c (ptrace_request_to_str): Do not handle
7117 PTRACE_GETTHREADLIST if this macro does not exist.
7118
14a00470
YQ
71192012-12-15 Yao Qi <yao@codesourcery.com>
7120
7121 * Makefile.in (OBS): Add notif.o.
7122 * notif.c, notif.h: New.
7123 * server.c: Include "notif.h".
7124 (struct vstop_notif) <next>: Remove.
7125 <base>: New field.
7126 (queue_stop_reply): Update.
7127 (push_event, send_next_stop_reply): Remove.
7128 (discard_queued_stop_replies): Update.
7129 (notif_stop): New variable.
7130 (handle_v_stopped): Remove.
7131 (handle_v_requests): Don't call handle_v_stopped. Call
7132 handle_ack_notif instead.
7133 (queue_stop_reply_callback): Call notif_event_enque instead
7134 of queue_stop_reply.
7135 (handle_status): Don't call send_next_stop_reply, call
7136 notif_write_event instead.
7137 (kill_inferior_callback): Likewise.
7138 (detach_or_kill_inferior_callback): Likewise.
7139 (main): Call initialize_notif.
7140 (process_serial_event): Call QUEUE_is_empty.
7141 (handle_target_event): Call notif_push instead of push event.
7142 * server.h (push_event): Remove declaration.
7143
61c125b9
TT
71442012-12-10 Tom Tromey <tromey@redhat.com>
7145
7146 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7147 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7148 macros.
7149 (.c.o): Rewrite.
7150 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7151 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7152 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7153 (amd64-linux-ipa.o, ax.o): Rewrite.
7154 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7155 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7156 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7157 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7158 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7159 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7160 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7161 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7162 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7163 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7164 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7165 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7166 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7167 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7168 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7169 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7170 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7171 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7172 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7173 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7174 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7175 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7176 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7177 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7178 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7179 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7180 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7181 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7182 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7183 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7184 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7185 (reg-tilegx.o): Remove.
7186 (all_object_files): New macro.
7187 Include .deps files.
7188 * aclocal.m4, configure: Rebuild.
7189 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7190 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7191 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7192
e90e9ad9
TT
71932012-12-05 Tom Tromey <tromey@redhat.com>
7194
7195 PR gdb/14917:
7196 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7197
02d403bf 71982012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
7199
7200 * configure.ac: Check for linux/perf_event.h.
7201 * config.in: Regenerated.
7202 * configure: Regenerated.
7203
0270a750
PA
72042012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7205
7206 * hostio.c (handle_readlink): Decrease buffer size
7207 parameter passed to readlink by one byte.
7208
8c29b58e
YQ
72092012-11-26 Yao Qi <yao@codesourcery.com>
7210
7211 * configure.ac (build_warnings): Append '-Wempty-body'.
7212 * configure: Regenerated.
7213 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7214 body.
7215
8bdce1ff
PM
72162012-11-15 Pierre Muller <muller@sourceware.org>
7217
7218 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7219 * config.in: Regenerate.
7220 * configure: Regenerate.
7221 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7222 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7223 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7224 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7225 header.
7226 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7227 instead of <sys/wait.h> header.
7228 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7229
02d403bf 72302012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
7231
7232 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7233 (various make rules): Remove -DGDBSERVER
7234
fbd5db48
YQ
72352012-11-09 Yao Qi <yao@codesourcery.com>
7236
7237 * spu-low.c (current_ptid): Move it to ..
7238 * gdbthread.h: ... here. New.
7239 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7240 * server.c (myresume, process_serial_event): Likewise.
7241 * thread-db.c (thread_db_find_new_threads): Likewise.
7242 * tracepoint.c (run_inferior_command): Likewise.
7243
b3dc46ff
AB
72442012-10-01 Andrew Burgess <aburgess@broadcom.com>
7245
7246 * server.c (handle_search_memory_1): Include access length in
7247 warning message.
7248
07c04788
HPN
72492012-09-05 Michael Brandt <michael.brandt@axis.com>
7250
7251 * linux-crisv32-low.c: Fix compile errors.
7252
918d227b
YQ
72532012-09-04 Yao Qi <yao@codesourcery.com>
7254
7255 * tracepoint.c (cmd_qtsv): Adjust debug message.
7256 Don't check CUR_TPOINT.
7257
18c1b81a
YQ
72582012-08-28 Yao Qi <yao@codesourcery.com>
7259
7260 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7261 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7262 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7263 Remove declarations of xmalloc, xreallloc, xstrdup and
7264 freeargv.
7265 * Makefile.in (libiberty_h): New.
7266 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7267 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7268
dc82f37b
YQ
72692012-08-23 Yao Qi <yao@codesourcery.com>
7270
7271 * server.h: Remove declaration of 'xsnprintf'.
7272
406b1477
KS
72732012-08-22 Keith Seitz <keiths@redhat.com>
7274
7275 * server.h: Include build-gnulib-gbserver/config.h.
7276 * gdbreplay.c: Likewise.
7277
e6712ff1
DE
72782012-08-08 Doug Evans <dje@google.com>
7279
7280 * Makefile.in (SFILES): Add gdb_vecs.c.
7281 (OBS): Add gdb_vecs.o.
7282 (gdb_vecs_h, host_defs_h): New variables.
7283 (thread-db.o): Add $(gdb_vecs_h) dependency.
7284 (gdb_vecs.o): New rule.
7285 * thread-db.c: #include "gdb_vecs.h".
7286 (thread_db_load_search): Use a vector to iterate over path elements.
7287 Handle text appearing after "$pdir".
7288
7289 * configure.ac: Add check for strstr.
7290 * config.in: Regenerate.
7291 * configure: Regenerate.
7292
7c3270ae
UW
72932012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7294
7295 * hostio.c (handle_pread): If pread fails, fall back to attempting
7296 lseek/read.
7297 (handle_pwrite): Likewise for pwrite.
7298
b62e2b27
UW
72992012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7300
7301 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7302 between unsupported TYPE and unimplementable ADDR/LEN combination.
7303 (arm_insert_point): Act on new return value.
7304
78a99e91
PA
73052012-07-31 Pedro Alves <palves@redhat.com>
7306
7307 * server.c (process_point_options): Only skip tokens if we find
7308 one that is unrecognized. Don't treat 'X' specially while
7309 skipping unrecognized tokens.
7310
fcf303ab
UW
73112012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7312
7313 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7314 to 4-byte-align HW breakpoint addresses for Thumb.
7315
7255706c
YQ
73162012-07-27 Yao Qi <yao@codesourcery.com>
7317
7318 PR remote/14161.
7319
7320 * server.h: Declare gdb_agent_about_to_close.
7321 * target.c (kill_inferior): Include "agent.h".
7322 New. Send command 'kill'.
7323 * target.h (kill_inferior): Removed macro.
7324 * tracepoint.c (gdb_agent_about_to_close): New.
7325 (gdb_agent_helper_thread): Handle command 'close'.
7326 Wait endlessly until the inferior stops.
7327 Install gdb_agent_remove_socket to atexit hook.
7328 (agent_socket_name): New static variable.
7329 (gdb_agent_socket_init): Replace local variable 'name' with
7330 'agent_socket_name'.
7331 (gdb_agent_remove_socket): New.
7332
5a3f286f
YQ
73332012-07-27 Yao Qi <yao@codesourcery.com>
7334
7335 * server.c (process_point_options): Stop at 'X' when parsing.
7336
961bd387
ME
73372012-07-19 Michael Eager <eager@eagercon.com>
7338
a261b8f5 7339 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
7340 to hw_execute.
7341 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7342 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7343 hardware breakpoint.
7344
aa7c7447
JK
73452012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7346
7347 * gdbserver/linux-low.c (initialize_low): Call
7348 linux_ptrace_init_warnings.
7349
7f216e7c
DE
73502012-07-02 Doug Evans <dje@google.com>
7351
7352 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7353 pointer to int.
7354
d3ce09f5
SS
73552012-07-02 Stan Shebs <stan@codesourcery.com>
7356
7357 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7358 (ax.o): Add it to build rule.
7359 (ax-ipa.o): Ditto.
7360 (OBS): Add format.o.
7361 (IPA_OBS): Add format.o.
7362 * server.c (handle_query): Claim support for breakpoint commands.
7363 (process_point_options): Add command case.
7364 (process_serial_event): Leave running if there are printfs in
7365 effect.
7366 * mem-break.h (any_persistent_commands): Declare.
7367 (add_breakpoint_commands): Declare.
7368 (gdb_no_commands_at_breakpoint): Declare.
7369 (run_breakpoint_commands): Declare.
7370 * mem-break.c (struct point_command_list): New struct.
7371 (struct breakpoint): New field command_list.
7372 (any_persistent_commands): New function.
7373 (add_commands_to_breakpoint): New function.
7374 (add_breakpoint_commands): New function.
7375 (gdb_no_commands_at_breakpoint): New function.
7376 (run_breakpoint_commands): New function.
7377 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7378 locally.
7379 * ax.c: Include format.h.
7380 (ax_printf): New function.
7381 (gdb_eval_agent_expr): Add printf opcode.
7382
2f8f6aed
YQ
73832012-06-13 Yao Qi <yao@codesourcery.com>
7384
7385 * server.c (start_inferior): Remove duplicated writes to fields
7386 'last_resume_kind' and 'last_status' of 'current_inferior'.
7387
0c9070b3
YQ
73882012-06-12 Yao Qi <yao@codesourcery.com>
7389 Pedro Alves <palves@redhat.com>
7390
7391 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7392 comment.
7393 * server.c (handle_v_cont): Extend comment.
7394
c52daf70
YQ
73952012-06-11 Yao Qi <yao@codesourcery.com>
7396
7397 * linux-low.c (linux_attach): Add 'static'.
7398
d38bbb0a
YQ
73992012-06-06 Yao Qi <yao@codesourcery.com>
7400
7401 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7402
89dc0afd
JK
74032012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7404
7405 Fix gcc -flto compilation warning.
7406 * server.c (main): Make variable multi_mode and attach volatile.
7407
75f62ce7
TJB
74082012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7409
7410 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7411 if the platform doesn't know about it.
7412
65f479b6
PA
74132012-05-30 Jeff Kenton <jkenton@tilera.com>
7414
7415 * Makefile.in (SFILES): Add linux-tile-low.c.
7416 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7417 * configure.srv: Handle tilegx-*-linux*.
7418 * linux-tile-low.c: New file.
7419
0c5bf5a9
JK
74202012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7421
7422 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7423
a493e3e2
PA
74242012-05-24 Pedro Alves <palves@redhat.com>
7425
7426 PR gdb/7205
7427
43aaf8b6 7428 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 7429
2ea28649
PA
74302012-05-24 Pedro Alves <palves@redhat.com>
7431
7432 PR gdb/7205
7433
7434 Replace target_signal with gdb_signal throughout.
7435
8d409d16
MR
74362012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7437
7438 * linux-low.c (linux_store_registers): Avoid the copying sequence
7439 when no data has been retrieved by ptrace.
7440
23512c01
MGD
74412012-05-22 Will Deacon <will.deacon@arm.com>
7442
7443 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7444 Include asm/ptrace.h.
7445 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7446 already defined.
7447
4934b29e
MR
74482012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7449
7450 * linux-low.c (linux_store_registers): Don't re-retrieve data
7451 with ptrace that has already been obtained from /proc. Always
7452 copy any data retrieved with ptrace to the buffer supplied.
7453
bde24c0a
PA
74542012-05-11 Yao Qi <yao@codesourcery.com>
7455 Pedro Alves <palves@redhat.com>
7456
7457 * linux-low.c (enum stopping_threads_kind): New.
7458 (stopping_threads): Change type to `enum stopping_threads_kind'.
7459 (handle_extended_wait): If stopping and suspending threads, leave
7460 the new_lwp suspended too.
7461 (linux_wait_for_event): Adjust.
7462 (stop_all_lwps): Set `stopping_threads' to
7463 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7464 whether we're suspending threads or just stopping them. Assert no
7465 recursion happens.
7466
623b6bdf
YQ
74672012-04-29 Yao Qi <yao@codesourcery.com>
7468
7469 * server.h: Move some code to ...
7470 * gdbthread.h: ... here. New.
7471 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7472 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7473 (nto-low.o, win32-low.o): Likewise.
7474 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7475 * regcache.c, remote-utils.c, server.c: Likewise.
7476 * target.c, tracepoint.c, win32-low.c: Likewise.
7477
f15f9948
TJB
74782012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7479
7480 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7481 (PTRACE_ARG4_TYPE): Likewise.
7482 (PTRACE_XFER_TYPE): Likewise.
7483 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7484 ptrace to PTRACE_ARG3_TYPE.
7485 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7486 (PTRACE_ARG4_TYPE): Likewise.
7487 (PTRACE_XFER_TYPE): Likewise.
7488 (linux_detach_one_lwp): Cast fourth argument of
7489 ptrace to long then PTRACE_ARG4_TYPE.
7490 (regsets_fetch_inferior_registers): Cast third argument of
7491 ptrace to long then PTRACE_ARG3_TYPE.
7492 (regsets_store_inferior_registers): Likewise.
7493
38ea300a
PA
74942012-04-20 Pedro Alves <palves@redhat.com>
7495
7496 * configure: Regenerate.
7497
c971b7fa
PA
74982012-04-19 Pedro Alves <palves@redhat.com>
7499
43aaf8b6 7500 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 7501 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
7502 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7503 (all, install-only, uninstall, clean-info, all-lib, clean): No
7504 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7505 (maintainer-clean realclean distclean): Use subdir_do.
7506 (subdir_do): New.
7507 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 7508 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
7509 * acinclude.m4: Include acx_configure_dir.m4.
7510 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7511 calls. Call AC_PROG_RANLIB. Configure gnulib using
7512 ACX_CONFIGURE_DIR.
7513 (GNULIB): New.
7514 (GNULIB_STDINT_H): Adjust.
7515 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7516 * gdbreplay.c: Include build-gnulib/config.h.
7517 * server.h: Likewise.
7518 * aclocal.m4: Regenerate.
7519 * config.in: Regenerate.
7520 * configure: Regenerate.
c971b7fa 7521
809277f8
PA
75222012-04-19 Pedro Alves <palves@redhat.com>
7523
7524 * Makefile.in (LIBGNU, INCGNU): Adjust.
7525 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7526 (all, install-only, uninstall, clean-info, all-lib, clean)
7527 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7528 * configure.ac: Adjust AC_OUTPUT output.
7529 * aclocal.m4: Regenerate.
7530 * configure: Regenerate.
7531
fd9bb8b8
PA
75322012-04-19 Pedro Alves <palves@redhat.com>
7533
7534 * Makefile.in (generated_files): New.
7535 (server_h): Remove the explicit dependency on config.h, and depend
7536 on $generated_files.
7537
1c298c66
PA
75382012-04-19 Pedro Alves <palves@redhat.com>
7539
7540 * Makefile.in (INCGNU): Add -Ignulib.
7541
57c4b50b
PA
75422012-04-19 Pedro Alves <palves@redhat.com>
7543
7544 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7545 (INCGNU): ... this, and spell out -I here.
7546 (GNULIB_LIB): Rename to ...
7547 (LIBGNU): ... this.
7548 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7549
1030e047
PA
75502012-04-19 Pedro Alves <palves@redhat.com>
7551
7552 * config.in: Regenerate.
7553
447d4319
PA
75542012-04-19 Pedro Alves <palves@redhat.com>
7555
7556 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7557 * server.h (memmem): Remove declaration.
7558 * config.in: Regenerate.
7559 * configure: Regenerate.
7560
aad9eab9
YQ
75612012-04-19 Yao Qi <yao@codesourcery.com>
7562
7563 * Makefile.in (SFILES): Add common/vec.c.
7564 (OBS): Add vec.o.
7565 (vec.o): New rule.
7566
3e10640f
YQ
75672012-04-19 Yao Qi <yao@codesourcery.com>
7568
7569 * remote-utils.c (prepare_resume_reply): Replace with macro
7570 target_core_of_thread.
7571 * server.c (handle_qxfer_threads_proper): Likewise.
7572 * target.h (traget_core_of_thread): New macro.
7573
71622373
PA
75742012-04-18 Pedro Alves <palves@redhat.com>
7575
7576 * aclocal.m4: Regenerate.
7577 * configure: Regenerate.
7578
80d26939
YQ
75792012-04-16 Yao Qi <yao@codesourcery.com>
7580
7581 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7582 duplicated on address.
7583
42476b70
YQ
75842012-04-16 Yao Qi <yao@codesourcery.com>
7585
7586 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7587 (struct tracepoint_action_ops) <send>: New field.
7588 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7589 (agent_expr_send, x_tracepoint_action_send): New.
7590 (l_tracepoint_action_send): New.
7591 (cmd_qtdp): Download and install tracepoint
7592 according to `use_agent'.
7593 (run_inferior_command): Add one more parameter `len'.
7594 Update callers.
7595 (tracepoint_send_agent): New.
7596 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7597
7bc83639
YQ
75982012-04-16 Yao Qi <yao@codesourcery.com>
7599
7600 * tracepoint.c (download_tracepoints): Moved to ...
7601 (cmd_qtstart): ... here.
7602
5f18041e
YQ
76032012-04-14 Yao Qi <yao@codesourcery.com>
7604
7605 * tracepoint.c: Include inttypes.h.
7606 (struct collect_memory_action): Use sized types.
7607 (struct tracepoint): Likewise.
7608 (cmd_qtdp, stop_tracing): Update print specifiers.
7609 (cmd_qtp, response_tracepoint): Likewise.
7610 (collect_data_at_tracepoint): Likewise.
7611 (collect_data_at_step): Likewise.
7612
55a8c076
YQ
76132012-04-14 Yao Qi <yao@codesourcery.com>
7614
7615 Import gnulib module inttypes.
7616 * aclocal.m4, config.in, configure: Regenerated.
7617
dc750257
YQ
76182012-04-14 Yao Qi <yao@codesourcery.com>
7619
7620 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7621 Makefile and config.status at last.
7622
0ab5faf9
YQ
76232012-04-13 Yao Qi <yao@codesourcery.com>
7624
7625 * tracepoint.c: Include stdint.h unconditionally.
7626
18f5fd81
TJB
76272012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7628
7629 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7630 on BFD_HAVE_SYS_PROCFS_TYPE.
7631 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7632 * configure: Regenerate.
7633 * config.in: Likewise.
7634
4d47af5c
L
76352012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7636
7637 * Makefile.in (clean): Also remove x32.c x32-linux.c
7638 x32-avx.c x32-avx-linux.c.
7639 (x32.o): New target.
7640 (x32.c): Likewise.
7641 (x32-linux.o): Likewise.
7642 (x32-linux.c): Likewise.
7643 (x32-avx.o): Likewise.
7644 (x32-avx.c): Likewise.
7645 (x32-avx-linux.o): Likewise.
7646 (x32-avx-linux.c): Likewise.
7647
7648 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7649 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7650 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7651 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7652 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7653 i386/x32-avx-linux.xml.
7654
7655 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7656 (init_registers_x32_avx_linux): Likwise.
7657 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7658 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7659
ecedbe58
PA
76602012-04-13 Pedro Alves <palves@redhat.com>
7661
7662 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7663 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7664 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7665 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7666 the sub-make.
7667
c92b5177
L
76682012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7669
7670 * linux-x86-low.c (compat_x32_clock_t): New.
7671 (compat_x32_siginfo_t): Likewise.
7672 (compat_x32_siginfo_from_siginfo): Likewise.
7673 (siginfo_from_compat_x32_siginfo): Likewise.
7674 (linux_is_elf64): Likewise.
7675 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7676 and siginfo_from_compat_x32_siginfo for x32.
7677 (x86_arch_setup): Set linux_is_elf64.
7678
214d508e
L
76792012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7680
7681 PR gdb/13969
7682 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7683 e_machine field.
7684 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7685 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7686 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7687 compatible with process.
7688
c9a1864a
YQ
76892012-04-12 Yao Qi <yao@codesourcery.com>
7690
7691 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7692 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7693 (install-only, install-info, clean): Handle sub dir gnulib.
7694 (all-lib, am--refresh): New targets.
7695 (memmem.o): Remove target.
7696 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7697 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7698 (AC_REPLACE_FUNCS): Remove memmem.
7699 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7700 (AC_OUTPUT): Generate Makefile in gnulib/.
7701 * aclocal.m4, config.in, configure: Regenerated.
7702
367ba2c2
MR
77032012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7704
7705 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7706
9d236627
PA
77072012-04-05 Pedro Alves <palves@redhat.com>
7708
7709 -Werror=strict-aliasing
7710
7711 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7712 pointer.
7713
111217b3
PA
77142012-04-04 Pedro Alves <palves@redhat.com>
7715
7716 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7717 (sparc_store_gregset_from_stack, sparc_store_gregset)
7718 (sparc_breakpoint_at): Fix formatting.
7719
8365dcf5
TJB
77202012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7721
7722 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7723 are available.
7724 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7725 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7726 * config.in: Regenerate.
7727 * configure: Likewise.
7728
689cc2ae
PA
77292012-03-29 Pedro Alves <palves@redhat.com>
7730
7731 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7732 Correct ptrace arguments.
7733
c14dfd32
PA
77342012-03-28 Pedro Alves <palves@redhat.com>
7735
7736 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7737 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7738 (IA64_FR1_REGNUM): New defines.
7739 (ia64_fetch_register): New.
7740 (the_low_target): Install it.
7741 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7742 field.
7743 * linux-low.c (linux_fetch_registers): Try the
7744 the_low_target.fetch_register hook first.
7745
7746 * linux-arm-low.c (the_low_target): Adjust.
7747 * linux-bfin-low.c (the_low_target): Adjust.
7748 * linux-cris-low.c (the_low_target): Adjust.
7749 * linux-crisv32-low.c (the_low_target): Adjust.
7750 * linux-m32r-low.c (the_low_target): Adjust.
7751 * linux-m68k-low.c (the_low_target): Adjust.
7752 * linux-mips-low.c (the_low_target): Adjust.
7753 * linux-ppc-low.c (the_low_target): Adjust.
7754 * linux-s390-low.c (the_low_target): Adjust.
7755 * linux-sh-low.c (the_low_target): Adjust.
7756 * linux-sparc-low.c (the_low_target): Adjust.
7757 * linux-tic6x-low.c (the_low_target): Adjust.
7758 * linux-x86-low.c (the_low_target): Adjust.
7759 * linux-xtensa-low.c (the_low_target): Adjust.
7760
63c88e13
PA
77612012-03-26 Pedro Alves <palves@redhat.com>
7762
7763 * server.c (handle_qxfer_libraries): Don't bail early if
7764 the_target->qxfer_libraries_svr4 is not NULL.
7765
fb723180
PA
77662012-03-26 Pedro Alves <palves@redhat.com>
7767
7768 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7769
0afae3cf
PA
77702012-03-23 Pedro Alves <palves@redhat.com>
7771
7772 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7773 "library-list-svr4" element's start tag when the the DSO list is
7774 empty.
7775
485f1ee4
PA
77762012-03-23 Pedro Alves <palves@redhat.com>
7777
7778 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7779 a variable whose type size is the same as the inferior's pointer
7780 size.
7781
a5362b9a
TS
77822012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7783
7784 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7785 struct siginfo.
7786 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7787 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7788 * linux-low.h: Include <signal.h>.
7789 (struct siginfo): Remove forward declaration.
7790 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7791 struct siginfo.
7792
d226c142
MF
77932012-03-21 Mike Frysinger <vapier@gentoo.org>
7794
7795 * .gitignore: Ignore more files.
7796
122f36ef
PA
77972012-03-19 Pedro Alves <palves@redhat.com>
7798 Jan Kratochvil <jan.kratochvil@redhat.com>
7799
7800 * server.c (cont_thread, general_thread): Add describing comments.
7801 (start_inferior): Clear `cont_thread'.
7802 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7803 of a process.
7804
fc3e5175
YQ
78052012-03-15 Yao Qi <yao@codesourcery.com>
7806
7807 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7808 handling to ...
7809 (cmd_qtdp): ... here.
7810
8d0d92cd
YQ
78112012-03-15 Yao Qi <yao@codesourcery.com>
7812
7813 * tracepoint.c (struct tracepoint_action_ops): New.
7814 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7815 (m_tracepoint_action_download): New.
7816 (r_tracepoint_action_download): New.
7817 (x_tracepoint_action_download): New.
7818 (l_tracepoint_action_download): New.
7819 (add_tracepoint_action): Install `action->ops' according type.
7820 (download_tracepoint_1): Move code `download' function pointer
7821 of various tracepoint_action_ops.
7822
87b0bb13
JK
78232012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7824
7825 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7826 linux_ptrace_attach_warnings.
7827
5f572dec
JK
78282012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7829
7830 * Makefile.in (linux-ptrace.o): New.
7831 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7832 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7833 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7834 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7835 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7836 of these targets.
7837 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7838
f4647387
YQ
78392012-03-08 Yao Qi <yao@codesourcery.com>
7840 Pedro Alves <palves@redhat.com>
7841
7842 Fix PR server/13392.
7843 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7844 offset of JMP insn.
7845 * tracepoint.c (remove_tracepoint): New.
7846 (cmd_qtdp): Call remove_tracepoint when failed to install.
7847
9b224c5e
PA
78482012-03-07 Pedro Alves <palves@redhat.com>
7849
7850 * linux-low.c (get_detach_signal): New.
7851 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7852 Pass on pending signals to PTRACE_DETACH. Check the result of the
7853 ptrace call.
7854 * server.c (program_signals, program_signals_p): New.
7855 (handle_general_set): Handle QProgramSignals.
7856 * server.h (program_signals, program_signals_p): Declare.
7857
e237a7e2
JK
78582012-03-05 Pedro Alves <palves@redhat.com>
7859 Jan Kratochvil <jan.kratochvil@redhat.com>
7860
7861 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7862 New comment why.
7863
5808517f
YQ
78642012-03-03 Yao Qi <yao@codesourcery.com>
7865
7866 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7867 agent_look_up_symbols.
7868
58b4daa5
YQ
78692012-03-03 Yao Qi <yao@codesourcery.com>
7870
7871 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7872 (linux-x86-low.o): Likewise.
7873 * server.h: Remove in_process_agent_loaded.
7874 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7875 common/agent.c.
7876 Update callers.
7877
8ffcbaaf
YQ
78782012-03-03 Yao Qi <yao@codesourcery.com>
7879
7880 * tracepoint.c (gdb_agent_capability): New global.
7881 (in_process_agent_loaded_ust): Renamed to
7882 `in_process_agent_supports_ust'.
7883 Update callers.
7884 (in_process_agent_supports_ust): Call agent_capability_check.
7885 (clear_installed_tracepoints): Assert that agent supports
7886 agent.
7887
d1feda86
YQ
78882012-03-03 Yao Qi <yao@codesourcery.com>
7889
7890 * linux-low.c (linux_supports_agent): New.
7891 (linux_target_ops): Initialize field `supports_agent' with
7892 linux_supports_agent.
7893 * target.h (struct target_ops) <supports_agent>: New.
7894 (target_supports_agent): New macro.
7895 * server.c (handle_general_set): Handle packet 'QAgent'.
7896 (handle_query): Send `QAgent+'.
7897 * Makefile.in (server.o): Depends on agent.h.
7898
2fa291ac
YQ
78992012-03-03 Yao Qi <yao@codesourcery.com>
7900
7901 * Makefile.in (OBS): Add agent.o.
7902 Add new rule for agent.o.
7903 Track dependence of tracepoint.c on agent.h.
7904 * tracepoint.c (run_inferior_command_1):
7905 (run_inferior_command): Call agent_run_command.
7906 (gdb_ust_connect_sync_socket): Deleted. Move it to
7907 common/agent.c.
7908 (resume_thread, stop_thread): Likewise.
7909 (gdb_ust_socket_init): Renamed to ...
7910 (gdb_agent_socket_init): ... New.
7911 (gdb_ust_thread): Renamed to ...
7912 (gdb_agent_helper_thread): ... New.
7913 (gdb_ust_init): Move some code to ...
7914 (gdb_agent_init): ... here. New.
7915 [HAVE_UST]: Call gdb_ust_init.
7916 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7917 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7918 * config.in, configure: Regenerated.
7919
05044653
PA
79202012-03-02 Pedro Alves <palves@redhat.com>
7921
7922 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7923 * linux-low.c (struct simple_pid_list): New.
7924 (stopped_pids): New a struct simple_pid_list pointer.
7925 (add_to_pid_list, pull_pid_from_list): New.
7926 (handle_extended_wait): Don't assume the first signal new children
7927 report is SIGSTOP. Adjust call to pull_pid_from_list.
7928 (linux_wait_for_lwp): Adjust.
7929
8d00225b
YQ
79302012-03-02 Yao Qi <yao@codesourcery.com>
7931
7932 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7933 debug log.
7934
19560ba5
YQ
79352012-03-02 Yao Qi <yao@codesourcery.com>
7936
7937 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7938 `stop_pc' and `tpoint'. Update caller.
7939
1faeff08
MR
79402012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7941
7942 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7943 * linux-low.c (use_linux_regsets): New macro.
7944 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7945 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7946 (linux_register_in_regsets): New function.
7947 (usr_fetch_inferior_registers): Skip registers covered by
7948 regsets.
7949 (usr_store_inferior_registers): Likewise.
7950 (usr_fetch_inferior_registers): New macro.
7951 (usr_store_inferior_registers): Likewise.
7952 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7953 (linux_store_registers): Likewise.
7954 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7955 prototype.
7956 (init_registers_mips64_dsp_linux): Likewise.
7957 (init_registers_mips_linux): New macro.
7958 (init_registers_mips_dsp_linux): Likewise.
7959 (mips_dsp_num_regs): Likewise.
7960 (DSP_BASE, DSP_CONTROL): New fallback macros.
7961 (mips_base_regs): New macro.
7962 (mips_regmap): Use it. Fix the size.
7963 (mips_dsp_regmap): New variable.
7964 (mips_dsp_regset_bitmap): Likewise.
7965 (mips_arch_setup): New function.
7966 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7967 than mips_regmap.
7968 (mips_cannot_store_register): Likewise.
7969 (the_low_target): Update .arch_setup, .num_regs and .regmap
7970 initializers. Add .regset_bitmap initializer.
7971 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7972 initializer.
7973 * linux-bfin-low.c (the_low_target): Likewise.
7974 * linux-cris-low.c (the_low_target): Likewise.
7975 * linux-crisv32-low.c (the_low_target): Likewise.
7976 * linux-ia64-low.c (the_low_target): Likewise.
7977 * linux-m32r-low.c (the_low_target): Likewise.
7978 * linux-m68k-low.c (the_low_target): Likewise.
7979 * linux-ppc-low.c (the_low_target): Likewise.
7980 * linux-s390-low.c (the_low_target): Likewise.
7981 * linux-sh-low.c (the_low_target): Likewise.
7982 * linux-sparc-low.c (the_low_target): Likewise.
7983 * linux-tic6x-low.c (the_low_target): Likewise.
7984 * linux-x86-low.c (the_low_target): Likewise.
7985 * linux-xtensa-low.c (the_low_target): Likewise.
7986 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7987 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7988 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7989 srv_xmlfiles.
7990 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7991 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7992
c03e6ccc
YQ
79932012-02-29 Yao Qi <yao@codesourcery.com>
7994 Pedro Alves <palves@redhat.com>
7995
7996 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7997 `step_over_finished' is true.
7998
644cebc9
PA
79992012-02-27 Pedro Alves <palves@redhat.com>
8000
8001 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8002 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8003
c14d7ab2
PA
80042012-02-27 Pedro Alves <palves@redhat.com>
8005
8006 PR server/9684
8007 * linux-low.c (pid_is_stopped): New.
8008 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8009
412c89dd
LM
80102012-02-25 Luis Machado <lgustavo@codesourcery.com>
8011
8012 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8013 of conditions.
8014
b745defe
MR
80152012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8016
8017 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8018
9f3a5c85
LM
80192012-02-24 Luis Machado <lgustavo@codesourcery>
8020
8021 * server.c (handle_query): Advertise support for target-side
8022 breakpoint condition evaluation.
8023 (process_point_options): New function.
8024 (process_serial_event): When inserting a breakpoint, check for
8025 a target-side condition that should be evaluated.
8026
8027 * mem-break.c: Include regcache.h and ax.h.
8028 (point_cond_list_t): New data structure.
8029 (breakpoint) <cond_list>: New field.
8030 (find_gdb_breakpoint_at): Make non-static.
8031 (delete_gdb_breakpoint_at): Clear any target-side
8032 conditions.
8033 (clear_gdb_breakpoint_conditions): New function.
8034 (add_condition_to_breakpoint): Likewise.
8035 (add_breakpoint_condition): Likewise.
8036 (gdb_condition_true_at_breakpoint): Likewise.
8037 (gdb_breakpoint_here): Return result directly instead
8038 of going through a local variable.
8039
8040 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8041 (clear_gdb_breakpoint_conditions): Likewise.
8042 (add_breakpoint_condition): Likewise.
8043 (gdb_condition_true_at_breakpoint): Likewise.
8044
8045 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8046 (need_step_over_p): Take target-side breakpoint condition into
8047 consideration.
8048
5e1dc496
LM
80492012-02-24 Luis Machado <lgustavo@codesourcery>
8050
8051 * server.h: Include tracepoint.h.
8052 (agent_mem_read, agent_get_trace_state_variable_value,
8053 agent_set_trace_state_variable_value,
8054 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8055 get_set_tsv_func_addr): New prototypes.
8056
8057 * ax.h: New include file.
8058 * ax.c: New source file.
8059
8060 * tracepoint.c: Include ax.h.
8061 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8062 agent_expr, eval_result_type): Move to ax.h.
8063 (parse_agent_expr): Rename to ...
8064 (gdb_parse_agent_expr): ... this, make it non-static and move
8065 to ax.h.
8066 (unparse_agent_expr) Rename to ...
8067 (gdb_unparse_agent_expr): ... this, make it non-static and move
8068 to ax.h.
8069 (eval_agent_expr): Rename to ...
8070 (eval_tracepoint_agent_expr): ... this.
8071 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8072 forward declarations.
8073 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8074 (agent_get_trace_state_variable_value): New function.
8075 (agent_set_trace_state_variable_value): New function.
8076 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8077 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8078 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8079 (condition_true_at_tracepoint): Likewise.
8080 (parse_agent_expr): Rename to ...
8081 (gdb_parse_agent_expr): ... this and move to ax.c.
8082 (unparse_agent_expr): Rename to ...
8083 (gdb_unparse_agent_expr): ... this and move to ax.c.
8084 (gdb_agent_op_name): Move to ax.c.
8085 (eval_agent_expr): Rename to ...
8086 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8087 and move to ax.c.
8088 (eval_tracepoint_agent_expr): New function.
8089 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8090 non-static.
5e1dc496
LM
8091 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8092 ax.c.
8093 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8094 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8095 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8096 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8097 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8098 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8099 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8100 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8101 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8102 (compile_bytecodes): Remove forward declaration.
8103 (is_goto_target): Move to ax.c.
8104 (compile_bytecodes): Move to ax.c and call
8105 agent_get_trace_state_variable_value (...) and
8106 agent_set_trace_state_variable_value (...).
8107
8108 * Makefile.in: Update ax.c and IPA dependencies.
8109
277e4e52
PA
81102012-02-24 Pedro Alves <palves@redhat.com>
8111
8112 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8113 (cmd_bigqtbuffer_circular): ... this. Only handle
8114 'QTBuffer:circular:'.
8115 (handle_tracepoint_general_set): Adjust.
8116
bf4c19f7
YQ
81172012-02-16 Yao Qi <yao@codesourcery.com>
8118
8119 * inferiors.c: Move code to ...
8120 * dll.c: .... here. New.
8121 * server.h: Declare clear_dlls.
8122 * Makefile.in (SFILES): Add dll.c.
8123 (OBS): Add dll.o
8124 (dll.o): New rule.
8125
d73f2619
YQ
81262012-02-11 Yao Qi <yao@codesourcery.com>
8127
8128 * server.c: (handle_monitor_command): Add a new parameter
8129 `own_buf'.
8130 (handle_query): Update caller.
8131
f8255c2a
JB
81322012-02-09 Joel Brobecker <brobecker@adacore.com>
8133
8134 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8135 * configure, config.in: Regenerate.
8136 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8137 is not defined.
8138
da84f473
PA
81392012-02-02 Pedro Alves <palves@redhat.com>
8140
8141 Try SIGKILL first, then PTRACE_KILL.
8142 * linux-low.c (linux_kill_one_lwp): New.
8143 (linux_kill_one_lwp): Rename to ...
8144 (kill_one_lwp_callback): ... this. Use the new
8145 linux_kill_one_lwp.
8146
e886a173
PA
81472012-02-02 Pedro Alves <palves@redhat.com>
8148
8149 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8150 inferior.
8151
be07f1a2
PA
81522012-01-27 Pedro Alves <palves@redhat.com>
8153
8154 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8155 (elf_64_file_p): Make static.
8156 (linux_pid_exe_is_elf_64_file): New.
8157 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8158 Delete declarations.
8159 (linux_pid_exe_is_elf_64_file): Declare.
8160 * linux-x86-low.c (x86_arch_setup): Use
8161 linux_pid_exe_is_elf_64_file.
8162
d8301ad1
JK
81632012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8164
8165 * linux-low.c (linux_wait_for_event_1): Rename to ...
8166 (linux_wait_for_event): ... here and merge it with former
8167 linux_wait_for_event - new variable wait_ptid, use it.
8168 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8169
01b17894
PA
81702012-01-23 Pedro Alves <palves@redhat.com>
8171
8172 * server.c (main): Avoid yet another case of infinite loop while
8173 detaching/killing after a longjmp.
8174
e825046f
JK
81752012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8176
8177 Code cleanup.
8178 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8179
b9e7b9c3
UW
81802012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8181
8182 * hostio.c (handle_readlink): New function.
8183 (handle_vFile): Call it to handle "vFile:readlink" packets.
8184
901f9912
UW
81852012-01-20 Pedro Alves <palves@redhat.com>
8186 Ulrich Weigand <ulrich.weigand@linaro.org>
8187
8188 * server.c (handle_v_requests): Only support vAttach and vRun to
8189 start multiple processes when in extended protocol mode.
8190
fc1ab1a0
PA
81912012-01-17 Pedro Alves <palves@redhat.com>
8192
8193 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8194 memalign plus mprotect to allocate the scratch buffer.
8195
7d5d4e98
PA
81962012-01-13 Pedro Alves <palves@redhat.com>
8197
8198 * server.c (attach_inferior): Clear `cont_thread'.
8199
f128d5e9
PA
82002012-01-13 Pedro Alves <palves@redhat.com>
8201
8202 * server.c (main): Avoid infinite loop while detaching/killing
8203 after a longjmp.
8204
06db92f0
DE
82052012-01-09 Doug Evans <dje@google.com>
8206
8207 * server.c (start_inferior): Set last_ptid in --wrapper case.
8208
32d92999
YQ
82092012-01-06 Yao Qi <yao@codesourcery.com>
8210
8211 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8212 defined.
8213 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8214
5e0a92a9
YQ
82152012-01-04 Yao Qi <yao@codesourcery.com>
8216
8217 * tracepoint.c (cmd_qtdp): Print debug message
8218 for static tracepoint.
8219
ae639e8c
YQ
82202012-01-04 Yao Qi <yao@codesourcery.com>
8221
8222 * tracepoint.c (trace_vdebug): Differentiate debug message
8223 between gdbserver and IPA.
8224
f72429c5
YQ
82252012-01-03 Yao Qi <yao@codesourcery.com>
8226
8227 * tracepoint.c (tracepoint_was_hit): Don't collect for
8228 static tracepoint.
8229
12c3e59c
JB
82302012-01-02 Joel Brobecker <brobecker@adacore.com>
8231
8232 * terminal.h: Reformat copyright header.
8233
67827812
JB
82342012-01-02 Joel Brobecker <brobecker@adacore.com>
8235
8236 * server.c (gdbserver_version): Update copyright year.
8237 * gdbreplay.c (gdbreplay_version): Likewise.
8238
3e52c33d
JK
82392011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8240
8241 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8242
8243 Revert:
8244 2011-12-18 Hui Zhu <teawater@gmail.com>
8245 * linux-low.c (linux_create_inferior): Save return value to ret.
8246
66f1260e
HZ
82472011-12-18 Hui Zhu <teawater@gmail.com>
8248
8249 * linux-low.c (linux_create_inferior): Save return value to ret.
8250
e77616d7
DE
82512011-12-16 Doug Evans <dje@google.com>
8252
e7b06c57
DE
8253 * linux-low.c (linux_create_inferior): If stdio connection,
8254 redirect stdin from /dev/null, stdout to stderr.
8255 * remote-utils.c (remote_is_stdio): New static global.
8256 (remote_connection_is_stdio): New function.
8257 (remote_prepare): Handle stdio connection.
8258 (remote_open): Ditto.
8259 (remote_close): Don't close stdin for stdio connections.
8260 (read_prim,write_prim): New functions. Replace all calls to
8261 read/write to these.
8262 * server.c (main): Watch for "-" argument. Move call to
8263 remote_prepare before start_inferior.
8264 * server.h (STDIO_CONNECTION_NAME): New macro.
8265 (remote_connection_is_stdio): Declare.
8266
e77616d7
DE
8267 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8268 in debugging output.
8269
82067193
YQ
82702011-12-15 Yao Qi <yao@codesourcery.com>
8271
8272 * tracepoint.c: Include sys/syscall.h.
8273 (gdb_ust_thread): Remove preprocessor conditional.
8274
82bfbe7e
PA
82752011-12-14 Pedro Alves <pedro@codesourcery.com>
8276
8277 * linux-low.c (linux_detach_one_lwp): Call
8278 the_low_target.prepare_to_resume before detaching.
8279
712c6575
YQ
82802011-12-14 Yao Qi <yao@codesourcery.com>
8281
8282 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8283 of write.
8284
d54d1edf
YQ
82852011-12-14 Yao Qi <yao@codesourcery.com>
8286
8287 * i386-low.c (i386_low_stopped_data_address): Initialize local
8288 variable `control'.
8289
6210a125
PA
82902011-12-13 Pedro Alves <pedro@codesourcery.com>
8291
8292 PR remote/13492
8293
8294 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8295 DR_CONTROL unless necessary. Extend comments.
8296 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8297 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8298
2ece8244
YQ
82992011-12-13 Yao Qi <yao@codesourcery.com>
8300
8301 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8302 macros.
8303 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8304
784867a5
JK
83052011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8306
8307 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8308 Print new debug message for such case.
8309
6bf36717
JK
83102011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8311
8312 Fix overlapping memcpy.
8313 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8314 the read_inferior_memory transfer.
8315 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8316 write_inferior_memory transfer.
8317 (set_fast_tracepoint_jump): New variable buf. Use it for the
8318 read_inferior_memory and write_inferior_memory transfers.
8319 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8320 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8321 Use it for the write_inferior_memory transfer.
8322 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8323 buffers.
8324
50275556
MR
83252011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8326
8327 * linux-low.c (fetch_register, store_register): Make code
8328 consistent, fix formatting.
8329
7325beb4
MR
83302011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8331
8332 * linux-low.c (usr_store_inferior_registers): Factor out code
8333 to handle individual registers into...
8334 (store_register): ... this new function.
8335
c642a434
UW
83362011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8337
8338 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8339 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8340 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8341 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8342 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8343 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8344 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8345 (srv_xmlfiles): Add new XML files.
8346
8347 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8348 and <sys/uio.h>.
8349 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8350 (init_registers_s390_linux32v1): Add prototype.
8351 (init_registers_s390_linux32v2): Likewise.
8352 (init_registers_s390_linux64v1): Likewise.
8353 (init_registers_s390_linux64v2): Likewise.
8354 (init_registers_s390x_linux64v1): Likewise.
8355 (init_registers_s390x_linux64v2): Likewise.
8356 (s390_num_regs): Increment to 52.
8357 (s390_regmap): Add orig_r2 register.
8358 (s390_num_regs_3264): Increment to 68.
8359 (s390_regmap_3264): Add orig_r2 register.
8360 (s390_collect_ptrace_register): Handle orig_r2 register.
8361 (s390_supply_ptrace_register): Likewise.
8362 (s390_fill_last_break): New function.
8363 (s390_store_last_break): Likewise.
8364 (s390_fill_system_call): New function.
8365 (s390_store_system_call): Likewise.
8366 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8367 register sets.
8368 (s390_check_regset): New function.
8369 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8370 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8371 Update target_regsets for available register sets.
8372
2268b414
JK
83732011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8374 Jan Kratochvil <jan.kratochvil@redhat.com>
8375
8376 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8377 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8378 New.
8379 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8380 * linux-low.h (struct process_info_private): New member r_debug.
8381 * server.c (handle_qxfer_libraries): Call
8382 the_target->qxfer_libraries_svr4.
8383 (handle_qxfer_libraries_svr4): New function.
8384 (qxfer_packets): New entry "libraries-svr4".
8385 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8386 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8387 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8388 PACKET_qXfer_libraries_svr4.
8389
d6db1fab
UW
83902011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8391
8392 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8393 PSW address/mask between 8-byte and 16-byte formats.
8394 (s390_supply_ptrace_register): Likewise.
8395 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8396 basic addressing mode bit.
8397
242f5f1c
SS
83982011-11-24 Stan Shebs <stan@codesourcery.com>
8399
8400 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8401
f196051f
SS
84022011-11-17 Stan Shebs <stan@codesourcery.com>
8403
8404 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8405 (tracing_start_time): New global.
8406 (tracing_stop_time): New global.
8407 (tracing_user_name): New global.
8408 (tracing_notes): New global.
8409 (tracing_stop_note): New global.
8410 (cmd_qtstart): Set traceframe_usage, start_time.
8411 (stop_tracing): Set stop_time.
8412 (cmd_qtstatus): Report additional status.
8413 (cmd_qtp): New function.
8414 (handle_tracepoint_query): Call it.
8415 (cmd_qtnotes): New function.
8416 (handle_tracepoint_general_set): Call it.
8417 (get_timestamp): Rename from tsv_get_timestamp.
8418
405f8e94
SS
84192011-11-14 Stan Shebs <stan@codesourcery.com>
8420 Kwok Cheung Yeung <kcy@codesourcery.com>
8421
8422 * linux-x86-low.c (small_jump_insn): New.
8423 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8424 trampoline and error message, build a trampoline and issue a small
8425 jump instruction to it.
8426 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8427 trampoline and error message.
8428 (x86_get_min_fast_tracepoint_insn_len): New.
8429 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8430 * linux-low.h (struct linux_target_ops): Add arguments to
8431 install_fast_tracepoint_jump_pad operation, add new operation.
8432 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8433 arguments.
8434 (linux_get_min_fast_tracepoint_insn_len): New function.
8435 (linux_target_op): Add new operation.
8436 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8437 (gdb_trampoline_buffer_end): Ditto.
8438 (gdb_trampoline_buffer_error): Ditto.
8439 (struct ipa_sym_addresses): Add fields for new IPA variables.
8440 (symbol_list): Add entries for new IPA variables.
8441 (struct tracepoint): Add fields to hold the address range of the
8442 trampoline used by the tracepoint.
8443 (trampoline_buffer_head): New static variable.
8444 (trampoline_buffer_tail): Ditto.
8445 (claim_trampoline_space): New function.
8446 (have_fast_tracepoint_trampoline_buffer): New function.
8447 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8448 structure.
8449 (install_fast_tracepoint): Ditto, also add error buffer argument.
8450 (cmd_qtminftpilen): New function.
8451 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8452 (fast_tracepoint_from_trampoline_address): New function.
8453 (fast_tracepoint_collecting): Handle trampoline as part of jump
8454 pad space.
8455 (set_trampoline_buffer_space): New function.
8456 (initialize_tracepoint): Initialize new IPA variables.
8457 * target.h (struct target_ops): Add arguments to
8458 install_fast_tracepoint_jump_pad operation, add new
8459 get_min_fast_tracepoint_insn_len operation.
8460 (target_get_min_fast_tracepoint_insn_len): New.
8461 (install_fast_tracepoint_jump_pad): Add arguments.
8462 * server.h (IPA_BUFSIZ): Define.
8463 * linux-i386-ipa.c: Include extra header files.
8464 (initialize_fast_tracepoint_trampoline_buffer): New function.
8465 (initialize_low_tracepoint): Call it.
8466 * server.h (set_trampoline_buffer_space): Declare.
8467 (claim_trampoline_space): Ditto.
8468 (have_fast_tracepoint_trampoline_buffer): Ditto.
8469
1e4d1764
YQ
84702011-11-14 Yao Qi <yao@codesourcery.com>
8471
8472 * server.c (handle_query): Handle InstallInTrace for qSupported.
8473 * tracepoint.c (add_tracepoint): Sort list.
8474 (install_tracepoint, download_tracepoint): New.
8475 (cmd_qtdp): Call them to install and download tracepoints.
8476 (sort_tracepoints): Removed.
8477 (cmd_qtstart): Update.
8478
5c73ff4e
YQ
84792011-11-14 Yao Qi <yao@codesourcery.com>
8480
8481 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8482 * mem-break.h: Declare.
8483 * tracepoint.c (cmd_qtstart): Move some code to ...
8484 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8485 New.
8486 (download_tracepoints): Move some code to ...
8487 (download_tracepoint_1): ... here. New.
8488
86a30030
YQ
84892011-11-08 Yao Qi <yao@codesourcery.com>
8490
8491 * remote-utils.c (relocate_instruction): A comment fix.
8492
8d26e50c
JB
84932011-11-07 Joel Brobecker <brobecker@adacore.com>
8494
8495 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8496 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8497 dr_status_mirror and dr_control_mirror from debug_reg_state.
8498 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8499 (i386_initial_stuff): Remove use of deleted globals.
8500 (i386_get_thread_context, i386_set_thread_context,
8501 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8502 from debug_reg_state.
8503
a59306a3
YQ
85042011-11-05 Yao Qi <yao@codesourcery.com>
8505
8506 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8507 address as TPOINT's.
8508
3065dfb6
SS
85092011-11-02 Stan Shebs <stan@codesourcery.com>
8510
8511 * tracepoint.c (agent_mem_read_string): New function.
8512 (eval_agent_expr): Call it for tracenz.
8513 * server.c (handle_query): Report support for tracenz.
8514
fd0d8c7c
YQ
85152011-11-02 Yao Qi <yao@codesourcery.com>
8516
8517 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8518
609086b1
YQ
85192011-11-02 Yao Qi <yao@codesourcery.com>
8520
8521 * target.h: Fix a typo in comment.
8522
b9fd1791
PA
85232011-10-31 Pedro Alves <pedro@codesourcery.com>
8524
8525 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8526 clobber the breakpoints' shadows with fast tracepoint jumps.
8527 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8528 * target.c (write_inferior_memory): Also pass MYADDR down to
8529 check_mem_write.
8530
03583c20
UW
85312011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8532
8533 * configure.ac: Check support for personality routine.
8534 * configure: Regenerate.
8535 * config.in: Likewise.
8536 * linux-low.c: Include <sys/personality.h>.
8537 Define ADDR_NO_RANDOMIZE if necessary.
8538 (linux_create_inferior): Disable address space randomization when
8539 forking inferior, if requested.
8540 (linux_supports_disable_randomization): New function.
8541 (linux_target_ops): Install it.
8542 * server.h (disable_randomization): Declare.
8543 * server.c (disable_randomization): New global variable.
8544 (handle_general_set): Handle QDisableRandomization.
8545 (handle_query): Likewise for qSupported.
8546 (main): Support --disable-randomization and --no-disable-randomization
8547 command line arguments.
8548 * target.h (struct target_ops): Add supports_disable_randomization.
8549 (target_supports_disable_randomization): New macro.
8550
723b724b
MF
85512011-09-29 Mike Frysinger <vapier@gentoo.org>
8552
8553 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8554 ifdef check.
8555 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8556 [!PT_GETDSBT] (target_loadmap): New definition.
8557 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8558 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8559 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8560 and PT_GETDSBT to LINUX_LOADMAP.
8561 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8562 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8563
55329a5c 85642011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
8565
8566 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8567 (arm_linux_hwbp_cap): New static variable.
8568 (arm_linux_get_hwbp_cap): Replace by ...
8569 (arm_linux_init_hwbp_cap): ... this new function.
8570 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8571 (arm_linux_get_hw_watchpoint_count): Likewise.
8572 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8573 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8574 (arm_prepare_to_resume): Use perror_with_name instead of error.
8575
55329a5c 85762011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
8577
8578 * linux-arm-low.c: Include <signal.h>.
8579 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8580 (struct arm_linux_hwbp_cap): New data type.
8581 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8582 (struct arm_linux_hw_breakpoint): New data type.
8583 (MAX_BPTS, MAX_WPTS): Define.
8584 (struct arch_process_info, struct arch_lwp_info): New data types.
8585 (arm_linux_get_hwbp_cap): New function.
8586 (arm_linux_get_hw_breakpoint_count): Likewise.
8587 (arm_linux_get_hw_watchpoint_count): Likewise.
8588 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8589 (arm_hwbp_control_initialize): Likewise.
8590 (arm_hwbp_control_is_enabled): Likewise.
8591 (arm_hwbp_control_is_initialized): Likewise.
8592 (arm_hwbp_control_disable): Likewise.
8593 (arm_linux_hw_breakpoint_equal): Likewise.
8594 (arm_linux_hw_point_initialize): Likewise.
8595 (struct update_registers_data): New data structure.
8596 (update_registers_callback: New function.
8597 (arm_insert_point): Likewise.
8598 (arm_remove_point): Likewise.
8599 (arm_stopped_by_watchpoint): Likewise.
8600 (arm_stopped_data_address): Likewise.
8601 (arm_new_process): Likewise.
8602 (arm_new_thread): Likewise.
8603 (arm_prepare_to_resume): Likewise.
8604 (the_low_target): Register arm_insert_point, arm_remove_point,
8605 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8606 arm_new_thread, and arm_prepare_to_resume.
8607
6b9801d4
SS
86082011-09-15 Stan Shebs <stan@codesourcery.com>
8609
8610 * server.h (struct emit_ops): Add compare-goto fields.
8611 * tracepoint.c (gdb_agent_op_sizes): New table.
8612 (emit_eq_goto): New function.
8613 (emit_ne_goto): New function.
8614 (emit_lt_goto): New function.
8615 (emit_le_goto): New function.
8616 (emit_gt_goto): New function.
8617 (emit_ge_goto): New function.
8618 (is_goto_target): New function.
8619 (compile_bytecodes): Recognize special cases of compare-goto
8620 combinations and call specialized emitters for them.
8621 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8622 (amd64_emit_ne_goto): New function.
8623 (amd64_emit_lt_goto): New function.
8624 (amd64_emit_le_goto): New function.
8625 (amd64_emit_gt_goto): New function.
8626 (amd64_emit_ge_goto): New function.
8627 (amd64_emit_ops): Add the new functions.
8628 (i386_emit_eq_goto): New function.
8629 (i386_emit_ne_goto): New function.
8630 (i386_emit_lt_goto): New function.
8631 (i386_emit_le_goto): New function.
8632 (i386_emit_gt_goto): New function.
8633 (i386_emit_ge_goto): New function.
8634 (i386_emit_ops): Add the new functions.
8635
bf15cbda
SS
86362011-09-08 Stan Shebs <stan@codesourcery.com>
8637
8638 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8639 (i386_emit_epilogue): Restore %ebx.
8640
943ca1dd
JZ
86412011-08-31 Jie Zhang <jzhang918@gmail.com>
8642
8643 * server.c (step_thread): Remove definition.
8644 (process_serial_event): Don't handle Hs.
8645 * server.h (step_thread): Remove declaration.
8646 * target.c (set_desired_inferior): Remove use of step_thread.
8647
e3deef73
LM
86482011-08-24 Luis Machado <lgustavo@codesourcery.com>
8649
8650 * linux-low.c: Include linux-procfs.h.
8651 (linux_attach_lwp_1): Update comments.
8652 (linux_attach): Scan for existing threads when attaching to a
8653 process that is the tgid.
8654 * Makefile.in: Update dependencies.
8655
13da1c97
LM
86562011-08-24 Luis Machado <lgustavo@codesourcery.com>
8657
8658 * configure.srv: Add linux-procfs.o dependencies.
8659
881127c9
YQ
86602011-08-14 Yao Qi <yao@codesourcery.com>
8661
8662 * target.h (struct target_ops): Fix indent.
8663 * win32-low.c (win32_target_ops): Fix comment.
8664
58dbd541
YQ
86652011-08-14 Andrew Jenner <andrew@codesourcery.com>
8666 Yao Qi <yao@codesourcery.com>
8667
8668 * Makefile.in (clean): Remove tic6x-*.c files.
8669 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8670 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8671 (tic6x-c64xp-linux.c): Likewise.
8672 * configure.srv: Add support for tic6x-*-uclinux.
8673 * linux-tic6x-low.c: New.
8674 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8675
78d85199
YQ
86762011-08-14 Andrew Stubbs <ams@codesourcery.com>
8677 Yao Qi <yao@codesourcery.com>
8678
8679 * target.h (struct target_ops): Add read_loadmap.
8680 * linux-low.c (struct target_loadseg): New type.
8681 (struct target_loadmap): New type.
8682 (linux_read_loadmap): New function.
8683 (linux_target_ops): Add linux_read_loadmap.
8684 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
8685 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8686 to NULL.
78d85199 8687
a959a88d
EZ
86882011-08-05 Eli Zaretskii <eliz@gnu.org>
8689
8690 * win32-low.c: Include <stdint.h>.
8691
1ced966e
PA
86922011-07-22 Pedro Alves <pedro@codesourcery.com>
8693
8694 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8695 to the inferior here.
8696 (i386_remove_aligned_watchpoint): Ditto.
8697 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8698 fit part of the watchpoint in the debug registers.
8699 (i386_update_inferior_debug_regs): New.
8700 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8701 registers, and only update the inferior on success.
8702 (i386_low_remove_watchpoint): Ditto.
8703
d26e3629
KY
87042011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8705
8706 * linux-low.c (compare_ints, unique, list_threads, show_process,
8707 linux_core_of_thread): Delete.
8708 (linux_target_ops): Change linux_core_of_thread to
8709 linux_common_core_of_thread.
8710 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8711 * utils.c (malloc_failure): Change type of argument.
8712 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8713 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8714 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8715 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8716 (IPA_OBJS): Add common-utils-ipa.o.
8717 (ptid_h, linux_osdata_h): New macros.
8718 (server_h): Add common/common-utils.h, common/xml-utils.h,
8719 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8720 common/ptid.h.
8721 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8722 ptid.o, buffer.o): New rules.
8723 (linux-low.o): Add common/linux-osdata.h as a dependency.
8724 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8725 * configure.ac: Add AC_HEADER_DIRENT check.
8726 * config.in: Regenerate.
8727 * configure: Regenerate.
8728 * remote-utils.c (xml_escape_text): Delete.
8729 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8730 buffer_xml_printf): Move to common/buffer.c.
8731 * server.c (main): Remove call to initialize_inferiors.
8732 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8733 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8734 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8735 internal_error, gdb_assert, gdb_assert_fail): Delete.
8736 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8737 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8738 common/buffer.h.
8739 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8740 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8741 initialize_inferiors): Delete.
8742
2275a1a7
PA
87432011-07-20 Pedro Alves <pedro@codesourcery.com>
8744
8745 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8746 symbol error.
8747
0a5b1e09
PA
87482011-05-31 Pedro Alves <pedro@codesourcery.com>
8749
8750 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8751 assertion.
8752 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8753
6938fd34
YQ
87542011-05-26 Yao Qi <yao@codesourcery.com>
8755
8756 * Makefile.in (thread-db.o): Track dependence to
8757 common/gdb_thread_db.h.
8758 * thread-db.c: include gdb_thread_db.h from right place.
8759
b481f9e0
TT
87602011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8761
8762 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8763 __FILE__ and __LINE__ to internal_error.
8764
98a5dd13
DE
87652011-05-13 Doug Evans <dje@google.com>
8766
8767 * thread-db.c (try_thread_db_load_from_sdir): New function.
8768 (try_thread_db_load_from_dir): New function.
8769 (thread_db_load_search): Handle $sdir, ignore $pdir.
8770 Remove trying of system directories if search of
8771 libthread-db-search-path fails, that is now done via $sdir.
8772
d248b706
KY
87732011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8774
8775 * server.c (handle_query): Add EnableDisableTracepoints to the list
8776 of supported features.
43aaf8b6 8777 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 8778 tracepoints.
43aaf8b6
PA
8779 (cmd_qtenable_disable): New.
8780 (cmd_qtstart): Install tracepoints even if disabled.
8781 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8782 receiving a QTEnable or QTDisable packet.
8783 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8784 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8785 tracepoints.
8786 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 8787
84e578fb
DE
87882011-05-10 Doug Evans <dje@google.com>
8789
8790 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8791
71f55dd8
DE
87922011-05-04 Doug Evans <dje@google.com>
8793
8794 * linux-low.c (linux_join): Skip process lookup.
8795 * spu-low.c (spu_join): Ditto.
8796 * server.c (join_inferiors_callback): Delete.
8797 (process_serial_event): For 'D' packet (detach) call join_inferior
8798 directly.
8799
4d393d60
JM
88002011-05-04 Joseph Myers <joseph@codesourcery.com>
8801
8802 * README: Don't mention xscale*-*-linux*.
8803 * configure.srv (xscale*-*-linux*): Don't handle target.
8804
b00ad6ff
NF
88052011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8806
8807 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8808 casting pointers.
8809 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8810 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8811 (i386_emit_void_call_2): Likewise.
8812
af96c192
YQ
88132011-04-26 Yao Qi <yao@codesourcery.com>
8814
43aaf8b6
PA
8815 * linux-low.c: Move common macros to linux-ptrace.h.
8816 Include linux-ptrace.h.
af96c192
YQ
8817 * Makefile.in (linux_ptrace_h): New.
8818 (linux-low.o): Depends on linux-ptrace.h.
8819
03f2bd59
JK
88202011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8821
8822 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8823 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8824 (remote_prepare): New function with most of the TCP code from ...
8825 (remote_open): ... here. Detect PORT here unconditionally. Move also
8826 setting transport_is_reliable.
8827 * server.c (run_once): New variable.
8828 (gdbserver_usage): Document it.
8829 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8830 the first run if RUN_ONCE.
8831 * server.h (run_once, remote_prepare): New declarations.
8832
7a9dd1b2
TT
88332011-04-19 Tom Tromey <tromey@redhat.com>
8834
8835 * win32-low.c (handle_load_dll): Remove duplicate "the".
8836
81239425
PM
88372011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8838
8839 Remove support for old Cygwin 1.5 versions.
8840 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8841 function to avoid warning.
8842 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8843 warning.
8844
9e0627f1
PM
88452011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8846
8847 * gdbserver/server.h (Macro _): Define it if not available.
8848
588eebee
MS
88492011-03-14 Michael Snyder <msnyder@vmware.com>
8850
348af9f7 8851 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 8852
43f70d4c
JB
88532011-03-10 Joel Brobecker <brobecker@adacore.com>
8854
8855 * Makefile.in (maintainer-clean realclean distclean): Remove
8856 "make ... subdir_do" command.
8857
348af9f7
MS
88582011-03-10 Michael Snyder <msnyder@vmware.com>
8859
8860 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8861
8862 * server.c (handle_v_run): Free alloced buffer on early return.
8863
e637a4f5
YQ
88642011-03-09 Yao Qi <yao@codesourcery.com>
8865
8866 Revert:
8867 2011-03-04 Yao Qi <yao@codesourcery.com>
8868
8869 * Makefile.in: Remove GNU make feature --directory.
8870
8871 2011-03-05 Yao Qi <yao@codesourcery.com>
8872
8873 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8874 (subdir_do): New make target. Copied from gdb/Makefile.
8875 (maintainer-clean, realclean, distclean, clean): Call corresponding
8876 make targets in common/Makefile.
8877
8878 2011-02-11 Yao Qi <yao@codesourcery.com>
8879
8880 * configure.ac: Call AC_PROG_RANLIB.
8881 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8882 * configure: Regenerate.
8883
e6edda56
JK
88842011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8885
8886 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8887
e5141119
JB
88882011-03-06 Yao Qi <yao@codesourcery.com>
8889
8890 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8891
64794aa4
JB
88922011-03-05 Yao Qi <yao@codesourcery.com>
8893
8894 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8895 (subdir_do): New make target. Copied from gdb/Makefile.
8896 (maintainer-clean, realclean, distclean, clean): Call corresponding
8897 make targets in common/Makefile.
8898
7a762829
YQ
88992011-03-04 Yao Qi <yao@codesourcery.com>
8900
8901 * Makefile.in: Remove GNU make feature --directory.
8902
348af9f7
MS
89032011-03-04 Michael Snyder <msnyder@vmware.com>
8904
8905 * server.c (queue_stop_reply): Call xmalloc not malloc.
8906
89072011-03-02 Michael Snyder <msnyder@vmware.com>
8908
8909 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8910
9f72fee2
MS
89112011-02-28 Michael Snyder <msnyder@vmware.com>
8912
588eebee
MS
8913 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8914 (cmd_qtframe): Ditto.
8915 (cmd_qtbuffer): Ditto.
8916 (cmd_bigqtbuffer): Ditto.
8917
9f72fee2
MS
8918 * utils.c (decimal2str): Initialize 'width' to nine, then
8919 don't mess with it.
8920
8040bd49
UW
89212011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8922
8923 * hostio.c (require_data): Free *data, not data.
8924
7e52cbd0
JK
89252011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8926
8927 * hostio.c (require_data): Use free, not xfree.
8928
9130f83e
MS
89292011-02-27 Michael Snyder <msnyder@vmware.com>
8930
4b812f4e
MS
8931 * server.c (handle_query): Discard unused value.
8932
9130f83e
MS
8933 * hostio.c (require_data): Free malloc memory before returning
8934 error.
8935
69d37113
MS
89362011-02-26 Michael Snyder <msnyder@vmware.com>
8937
8938 * linux-low.c (list_threads): Call closedir for dirent.
8939
35f5825a
MS
89402011-02-27 Michael Snyder <msnyder@vmware.com>
8941
2a589cef
MS
8942 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8943 a case statement falls through.
8944
0adea5f7
MS
8945 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8946
35f5825a
MS
8947 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8948 in comparison.
8949
238f1c74
MS
89502011-02-26 Michael Snyder <msnyder@vmware.com>
8951
8952 * utils.c (decimal2str): Eliminate dead code and dead param.
8953 (pulongest): Drop dead param from call to decimal2str.
8954 (plongest): Ditto.
8955
633ff500
JB
89562011-02-24 Joel Brobecker <brobecker@adacore.com>
8957
8958 Revert the following patch (not approved yet):
8959 2011-02-21 Hui Zhu <teawater@gmail.com>
8960 * tracepoint.c (tp_printf): New function.
8961 (eval_agent_expr): Handle gdb_agent_op_printf.
8962
f9c6ff72
HZ
89632011-02-21 Hui Zhu <teawater@gmail.com>
8964
8965 * tracepoint.c (tp_printf): New function.
8966 (eval_agent_expr): Handle gdb_agent_op_printf.
8967
94d5e490
TT
89682011-02-18 Tom Tromey <tromey@redhat.com>
8969
8970 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8971 (tracepoint.o): Likewise.
8972 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8973 (gdb_agent_op_names): Likewise.
8974
c7f96d2b
TT
89752011-02-18 Tom Tromey <tromey@redhat.com>
8976
8977 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8978 gdb_agent_op_rot>: New constants.
8979 (gdb_agent_op_names): Add pick and roll.
8980 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8981 cases.
8982
0feedb2c
JK
89832011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8984
8985 * aclocal.m4: Regenerated with aclocal-1.11.1.
8986
b3b9301e
PA
89872011-02-14 Pedro Alves <pedro@codesourcery.com>
8988
8989 * server.c (handle_qxfer_traceframe_info): New.
8990 (qxfer_packets): Register "traceframe-info".
8991 (handle_query): Report support for qXfer:traceframe-info:read+.
8992 * tracepoint.c (match_blocktype): New.
8993 (traceframe_find_block_type): Rename to ...
8994 (traceframe_walk_blocks): ... this. Add callback filter argument,
8995 and use it.
8996 (traceframe_find_block_type): New, reimplemented on top of
8997 traceframe_walk_blocks.
8998 (build_traceframe_info_xml): New.
8999 (traceframe_read_info): New.
9000 * server.h (traceframe_read_info): Declare.
9001
4f3e6fb7
YQ
90022011-02-11 Yao Qi <yao@codesourcery.com>
9003
9004 * configure.ac: Call AC_PROG_RANLIB.
9005 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9006 * configure: Regenerate.
9007
764880b7
PA
90082011-02-07 Pedro Alves <pedro@codesourcery.com>
9009
9010 * server.c (gdb_read_memory): Change return semantics to allow
9011 partial transfers.
9012 (handle_search_memory_1): Adjust.
9013 (process_serial_event) <'m' packet>: Handle partial transfers.
9014 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9015
1c79eb8a
PA
90162011-01-28 Pedro Alves <pedro@codesourcery.com>
9017
9018 * regcache.c (init_register_cache): Initialize
9019 regcache->register_status.
9020 (free_register_cache): Release regcache->register_status.
9021 (regcache_cpy): Copy register_status.
9022 (registers_to_string): Print 'x's for unavailable registers.
9023 (supply_register): Mark the register's status valid or
9024 unavailable, depending on whether a buffer was passed in or not.
9025 (supply_register_zeroed): New.
9026 (supply_regblock): Mark the registers' status valid or
9027 unavailable, depending on whether a buffer was passed in or not.
9028 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9029 (struct regcache): New `register_status' field.
9030 (supply_register_zeroed): Declare.
9031 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9032 supply_register_zeroed, rather than passing a NULL buffer to
9033 supply_register.
9034 * tracepoint.c (fetch_traceframe_registers): Update comment.
9035
85724a0e
PA
90362011-01-28 Pedro Alves <pedro@codesourcery.com>
9037
9038 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9039 buffer explicit.
9040
d08aafef
PA
90412011-01-25 Pedro Alves <pedro@codesourcery.com>
9042
9043 * server.h (decode_xfer_write): Change prototype.
9044 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9045 and don't extract the annex here.
9046 * server.c (decode_xfer_read): Remove `annex' parameter,
9047 and don't extract the annex here.
9048 (decode_xfer): New.
9049 (struct qxfer): New.
9050 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9051 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9052 (handle_qxfer_statictrace): New functions, abstracted out from
9053 handle_query, and made to use the struct qxfer interface.
9054 (handle_threads_qxfer_proper): Rename to ...
9055 (handle_qxfer_threads_proper): ... this.
9056 (handle_threads_qxfer): Rename to ...
9057 (handle_qxfer_threads): ... this. Adjust.
9058 (qxfer_packets): New array.
9059 (handle_qxfer): New function.
9060 (handle_query): Use handle_qxfer.
9061
493e2a69
MS
90622011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9063
9064 * gdbreplay.c: Shorten lines of >= 80 columns.
9065 * linux-low.c: Ditto.
9066 * linux-ppc-low.c: Ditto.
9067 * linux-s390-low.c: Ditto.
9068 * linux-sparc-low.c: Ditto.
9069 * linux-x86-low.c: Ditto.
9070 * linux-xtensa-low.c: Ditto.
9071 * mem-break.c: Ditto.
9072 * nto-low.c: Ditto.
9073 * regcache.h: Ditto.
9074 * remote-utils.c: Ditto.
9075 * server.c: Ditto.
9076 * server.h: Ditto.
9077 * thread-db.c: Ditto.
9078 * tracepoint.c: Ditto.
9079 * utils.c: Ditto.
9080 * win32-low.h: Ditto.
9081
44944448
JB
90822011-01-05 Joel Brobecker <brobecker@adacore.com>
9083
9084 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9085 update.
9086
71ce852c
JB
90872011-01-01 Joel Brobecker <brobecker@adacore.com>
9088
9089 * server.c (gdbserver_version): Update copyright year in version
9090 output.
9091 * gdbreplay.c (gdbreplay_version): Ditto.
9092
eb826dc6
MF
90932010-12-29 Jie Zhang <jie.zhang@analog.com>
9094
9095 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9096 * linux-bfin-low.c: New file.
9097 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9098 PT_DATA_ADDR for BFIN targets.
9099 * Makefile.in (SFILES): Add linux-bfin-low.c.
9100 (clean): Remove reg-bfin.c.
9101 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9102 * README: Mention supported Blackfin targets.
9103
39ab222a
MF
91042010-12-23 Mike Frysinger <vapier@gentoo.org>
9105
9106 * .gitignore: New file.
9107
a1f2ce7d
MF
91082010-11-16 Mike Frysinger <vapier@gentoo.org>
9109
9110 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9111
f474844c
JZ
91122010-10-22 Jie Zhang <jie@codesourcery.com>
9113
9114 * Makefile.in: Add FLAGS_TO_PASS variable.
9115 (install): Remove dependency of install-only and recursively
9116 invoke make for install-only.
9117
f1048712
DE
91182010-10-04 Doug Evans <dje@google.com>
9119
9120 * Makefile.in (uninstall): Use $(DESTDIR).
9121
b53a1623
PA
91222010-09-24 Pedro Alves <pedro@codesourcery.com>
9123
e6ee044d
PA
9124 PR gdb/11842
9125
b53a1623
PA
9126 * linux-x86-low.c (compat_siginfo_from_siginfo)
9127 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9128 si_code is < 0. Check for si_code == SI_TIMER before checking for
9129 si_code < 0.
9130
fa1bd1e4
JB
91312010-09-13 Joel Brobecker <brobecker@adacore.com>
9132
9133 * lynx-i386-low.c: New file.
9134 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9135
47fac8f8
JB
91362010-09-13 Joel Brobecker <brobecker@adacore.com>
9137
9138 * lynx-low.c (ptrace_request_to_str): Remove handling for
9139 request values that have been removed in LynxOS 5.x.
9140
1adfc54d
JB
91412010-09-13 Joel Brobecker <brobecker@adacore.com>
9142
9143 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9144 <ptrace.h>
9145
c2a66c29
NS
91462010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9147
9148 * configure.ac: Add --enable-inprocess-agent option.
9149 * configure: Rebuilt.
9150
32fcada3
YQ
91512010-09-06 Yao Qi <yao@codesourcery.com>
9152
9153 * linux-low.c (linux_kill): Remove unused variable.
9154 (linux_stabilize_threads): Likewise.
9155 * server.c (start_inferior): Likewise.
9156 (queue_stop_reply_callback): Likewise.
9157 * tracepoint.c (do_action_at_tracepoint): Likewise.
9158
0cccb683
YQ
91592010-09-06 Yao Qi <yao@codesourcery.com>
9160
9161 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9162 on return.
9163
423ec54c
JK
91642010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9165
9166 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9167
12ac6819
PA
91682010-09-06 Pedro Alves <pedro@codesourcery.com>
9169
9170 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9171 "$(IPA_DEPFILES)".
9172
8ed54b31
JB
91732010-09-01 Joel Brobecker <brobecker@adacore.com>
9174
9175 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9176 gdbserver/lynx-ppc-low.c: New files.
9177 * Makefile.in (lynx_low_h): New variable.
9178 (lynx-low.o, lynx-ppc-low.o): New rules.
9179 * configure.ac: On LynxOS, link with -lnetinet.
9180 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9181 * configure: regenerate.
9182
bb0116a4
JB
91832010-09-01 Joel Brobecker <brobecker@adacore.com>
9184
9185 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9186 * configure.ac: Add check for vasprintf and vsnprintf.
9187 * configure, config.in: Regenerate.
9188 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9189
a778ab81 91902010-09-01 Joel Brobecker <brobecker@adacore.com>
9191
9192 * gdbreplay.c: Move include of alloca.h up, next to include of
9193 malloc.h.
9194 * server.h: Add include of malloc.h.
9195 * mem-break.c: Remove include of malloc.h.
9196 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9197
8b034a19 91982010-09-01 Joel Brobecker <brobecker@adacore.com>
9199
9200 * Makefile.in (memmem.o): Build with -Wno-error.
9201
92022010-09-01 Joel Brobecker <brobecker@adacore.com>
9203
9204 * utils.c (xsnprintf): Make non-static.
9205 * server.h: Add xsnprintf declaration.
9206 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9207 replace calls to snprintf by calls to xsnprintf throughout.
9208
92092010-09-01 Joel Brobecker <brobecker@adacore.com>
9210
9211 * configure.ac: Add configure check for alloca.
9212 * configure, config.in: Regenerate.
9213 * server.h: Include alloca.h if it exists.
9214 * gdbreplay.c: Include alloca.h if it exists.
9215
1a981360
PA
92162010-08-28 Pedro Alves <pedro@codesourcery.com>
9217
9218 * linux-low.c (__SIGRTMIN): Define if not already defined.
9219 (linux_create_inferior): Check for __ANDROID__ rather than
9220 __SIGRTMIN.
9221 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9222 are already deferred.
9223 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9224 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9225 stopped and already has a pending signal to report.
9226 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9227 a pending signal to report or is moving out of a jump pad.
9228 (linux_init_signals): Check for __ANDROID__ rather than
9229 __SIGRTMIN.
9230
b4d51a55
PA
92312010-08-28 Pedro Alves <pedro@codesourcery.com>
9232
9233 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9234 debug_threads check. Avoid a linear search when not doing debug
9235 output.
9236
ec48365d
PA
92372010-08-27 Pedro Alves <pedro@codesourcery.com>
9238
9239 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9240 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9241 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9242 (process_event): Change local fd's type to gdb_fildes_t.
9243 (create_file_handler): Adjust prototype.
9244 (delete_file_handler): Adjust prototype.
9245 (handle_file_event): Adjust prototype. Use pfildes.
9246 (create_file_event): Adjsut prototype.
9247 * remote-utils.c (remote_desc, listen_desc): Change type to
9248 gdb_fildes_t.
9249 * server.h: New gdb_fildes_t typedef.
9250 [USE_WIN32API]: Include winsock2.h.
9251 (delete_file_handler, add_file_handler): Adjust prototypes.
9252 (pfildes): Declare.
9253 * utils.c (pfildes): New.
9254
854d88f0
PA
92552010-08-27 Pedro Alves <pedro@codesourcery.com>
9256
9257 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9258 * configure: Regenerate.
9259
0146f85b
PA
92602010-08-27 Pedro Alves <pedro@codesourcery.com>
9261
9262 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9263 (linux_done_accessing_memory): ... this.
9264 (linux_target_ops): Adjust.
9265 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9266 * nto-low.c (nto_target_ops): Adjust comment.
9267 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9268 * spu-low.c (spu_target_ops): Adjust comment.
9269 * target.h (target_ops): Rename unprepare_to_access_memory field
9270 to done_accessing_memory.
9271 (unprepare_to_access_memory): Rename to ...
9272 (done_accessing_memory): ... this.
9273
90d74c30
PA
92742010-08-26 Pedro Alves <pedro@codesourcery.com>
9275
9276 * linux-low.c (linux_prepare_to_access_memory): New.
9277 (linux_unprepare_to_access_memory): New.
9278 (linux_target_ops): Install them.
9279 * server.c (read_memory): Rename to ...
9280 (gdb_read_memory): ... this. Use
9281 prepare_to_access_memory/prepare_to_access_memory.
9282 (write_memory): Rename to ...
9283 (gdb_write_memory): ... this. Use
9284 prepare_to_access_memory/prepare_to_access_memory.
9285 (handle_search_memory_1): Adjust.
9286 (process_serial_event): Adjust.
9287 * target.h (struct target_ops): New fields
9288 prepare_to_access_memory and unprepare_to_access_memory.
9289 (prepare_to_access_memory, unprepare_to_access_memory): New.
9290 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9291 prepare_to_access_memory/prepare_to_access_memory.
9292 * nto-low.c (nto_target_ops): Adjust.
9293 * spu-low.c (spu_target_ops): Adjust.
9294 * win32-low.c (win32_target_ops): Adjust.
9295
fd467969
PA
92962010-08-26 Pedro Alves <pedro@codesourcery.com>
9297
9298 * Makefile.in (WARN_CFLAGS): Get it from configure.
9299 (WERROR_CFLAGS): New.
9300 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9301 * configure.ac: Introduce --enable-werror, which adds -Werror to
9302 the compiler command line. Enabled by default. Disable with
9303 --disable-werror. Add -Wdeclaration-after-statement
9304 Wpointer-arith and -Wformat-nonliteral to warning flags.
9305 * configure: Regenerate.
9306
331e2f5f
PA
93072010-08-26 Pedro Alves <pedro@codesourcery.com>
9308
9309 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9310
e581f2b4
PA
93112010-08-26 Pedro Alves <pedro@codesourcery.com>
9312
9313 * gdbreplay.c (remote_error): New.
9314 (gdbchar): New.
9315 (expect): Use gdbchar. Check for error reading from GDB.
9316 Clarify sync error output.
9317 (play): Check for errors writing to GDB.
9318 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9319 * remote-utils.c (getpkt): Check for errors writing to the remote
9320 descriptor.
9321
3c11dd79
PA
93222010-08-25 Pedro Alves <pedro@codesourcery.com>
9323
9324 * linux-low.c (linux_wait_1): Move non-debugging code out of
9325 `debug_threads' control.
9326
d20a8ad9
PA
93272010-08-25 Pedro Alves <pedro@codesourcery.com>
9328
9329 * linux-low.c (linux_wait_1): Don't set last_status here.
9330 * server.c (push_event, queue_stop_reply_callback): Assert we're
9331 not pushing a TARGET_WAITKIND_IGNORE event.
9332 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9333 (myresume, handle_target_event): Set the thread's last_resume_kind
9334 and last_status from the target returned status.
9335
964e4306
PA
93362010-08-25 Pedro Alves <pedro@codesourcery.com>
9337
9338 PR threads/10729
9339
9340 * linux-x86-low.c (update_debug_registers_callback): New.
9341 (i386_dr_low_set_addr): Use it.
9342 (i386_dr_low_get_addr): New.
9343 (i386_dr_low_set_control): Use update_debug_registers_callback.
9344 (i386_dr_low_get_control): New.
9345 (i386_dr_low_get_status): Adjust.
9346 * linux-low.c (linux_stop_lwp): New.
9347 * linux-low.h (linux_stop_lwp): Declare.
9348
9349 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9350 argument instead of a i386_debug_reg_state.
9351 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9352 a i386_debug_reg_state.
9353 (i386_insert_aligned_watchpoint): Adjust.
9354 (i386_remove_aligned_watchpoint): Adjust.
9355 (i386_low_stopped_data_address): Read the debug registers from the
9356 inferior instead of from the mirrors.
9357 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9358 (i386_dr_low_get_addr): Declare.
9359 (i386_dr_low_get_control): Declare.
9360 (i386_dr_low_get_status): Change prototype.
9361
9362 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9363 (i386_dr_low_get_addr): New.
9364 (i386_dr_low_get_control): New.
9365 (i386_dr_low_get_status): Adjust prototype. Return
9366 dr_status_mirror.
9367 (i386_initial_stuff): Clear dr_status_mirror and
9368 dr_control_mirror.
9369 (i386_get_thread_context): Adjust.
9370 (i386_set_thread_context): Adjust.
9371 (i386_thread_added): Adjust.
9372
5f21a75b
PA
93732010-08-24 Pedro Alves <pedro@codesourcery.com>
9374
9375 * linux-low.h (linux_thread_area): Delete declaration.
9376
3e4c1235
TS
93772010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9378
9379 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9380 after its termination.
9381
1971b033
PA
93822010-08-09 Pedro Alves <pedro@codesourcery.com>
9383
9384 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9385 (gdb_wants_all_stopped): Delete.
9386 (linux_wait_1): Don't call them.
9387 * server.c (handle_v_cont): Tag all threads as want-stopped.
9388 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9389 stopped as "client-wants-stopped".
9390
310444ac
PA
93912010-07-31 Pedro Alves <pedro@codesourcery.com>
9392
9393 * Makefile.in (signals_h): New.
9394 (server_h): Depend on it.
9395 (server.o): Don't depend on $(signals_def).
9396 (signals.o): Depend on $(signals_def).
9397
a19cae16
JK
93982010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9399
9400 * Makefile.in (signals_def): New.
9401 (server_h): Append include/gdb/signals.h and signals_def.
9402 (server.o): Append signals_def.
9403
30d50328
JK
94042010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9405
9406 * server.c (handle_target_event): Use target_signal_to_host for
9407 resume_info.sig initialization.
9408 * target.h (struct thread_resume) <sig>: New comment.
9409
5c3216e2
OS
94102010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9411
c6f46ca0
OS
9412 * server.c (handle_query): strcpy() the returned string from paddress()
9413 instead of sprintf().
5c3216e2
OS
9414 * utils.c (paddress): Return phex_nz().
9415
6bd31874
JB
94162010-07-07 Joel Brobecker <brobecker@adacore.com>
9417
9418 * server.c (handle_v_cont): Call mourn_inferior if process
9419 just exited.
9420 (myresume): Likewise.
9421
0fb4aa4b
PA
94222010-07-01 Pedro Alves <pedro@codesourcery.com>
9423
9424 Static tracepoints, and integration with UST.
9425
9426 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9427 * mem-break.c (uninsert_all_breakpoints)
9428 (reinsert_all_breakpoints): New.
9429 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9430 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9431 (gdb_agent_ust_loaded, helper_thread_id)
9432 (gdb_agent_helper_thread_id): New macros.
9433 (struct ipa_sym_addresses): Add addr_ust_loaded,
9434 addr_helper_thread_id, addr_cmd_buf.
9435 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9436 (in_process_agent_loaded_ust): New.
9437 (write_e_ust_not_loaded): New.
9438 (maybe_write_ipa_ust_not_loaded): New.
9439 (struct collect_static_trace_data_action): New.
9440 (enum tracepoint_type) <static_tracepoint>: New.
9441 (struct tracepoint) <handle>: Mention static tracepoints.
9442 (struct static_tracepoint_ctx): New.
9443 (CMD_BUF_SIZE): New.
9444 (add_tracepoint_action): Handle static tracepoint actions.
9445 (unprobe_marker_at): New.
9446 (clear_installed_tracepoints): Handle static tracepoints.
9447 (cmd_qtdp): Handle static tracepoints.
9448 (probe_marker_at): New.
9449 (cmd_qtstart): Handle static tracepoints.
9450 (response_tracepoint): Handle static tracepoints.
9451 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9452 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9453 (get_context_regcache): Handle static tracepoints.
9454 (do_action_at_tracepoint): Handle static tracepoint actions.
9455 (traceframe_find_block_type): Handle static trace data blocks.
9456 (traceframe_read_sdata): New.
9457 (download_tracepoints): Download static tracepoint actions.
9458 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9459 (GDB_PROBE_NAME): New.
9460 (ust_ops): New.
9461 (GET_UST_SYM): New.
9462 (USTF): New.
9463 (dlsym_ust): New.
9464 (ust_marker_to_static_tracepoint): New.
9465 (gdb_probe): New.
9466 (collect_ust_data_at_tracepoint): New.
9467 (gdb_ust_probe): New.
9468 (UNIX_PATH_MAX, SOCK_DIR): New.
9469 (gdb_ust_connect_sync_socket): New.
9470 (resume_thread, stop_thread): New.
9471 (run_inferior_command): New.
9472 (init_named_socket): New.
9473 (gdb_ust_socket_init): New.
9474 (cstr_to_hexstr): New.
9475 (next_st): New.
9476 (first_marker, next_marker): New.
9477 (response_ust_marker): New.
9478 (cmd_qtfstm, cmd_qtsstm): New.
9479 (unprobe_marker_at, probe_marker_at): New.
9480 (cmd_qtstmat, gdb_ust_thread): New.
9481 (gdb_ust_init): New.
9482 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9483 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9484 (ST_REGENTRY): New.
9485 (x86_64_st_collect_regmap): New.
9486 (X86_64_NUM_ST_COLLECT_GREGS): New.
9487 (AMD64_RIP_REGNUM): New.
9488 (supply_static_tracepoint_registers): New.
9489 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9490 (ST_REGENTRY): New.
9491 (i386_st_collect_regmap): New.
9492 (i386_NUM_ST_COLLECT_GREGS): New.
9493 (supply_static_tracepoint_registers): New.
9494 * server.c (handle_query): Handle qXfer:statictrace:read.
9495 <qSupported>: Report support for StaticTracepoints, and
9496 qXfer:statictrace:read features.
9497 * server.h (traceframe_read_sdata)
9498 (supply_static_tracepoint_registers): Declare.
9499 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9500 (unpack_varlen_hex): Include in IPA build.
9501 * Makefile.in (ustlibs, ustinc): New.
9502 (IPA_OBJS): Add remote-utils-ipa.o.
9503 ($(IPA_LIB)): Link -ldl and -lpthread.
9504 (UST_CFLAGS): New.
9505 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9506 * config.in, configure: Regenerate.
9507
9e4344e5
PA
95082010-06-20 Ian Lance Taylor <iant@google.com>
9509 Pedro Alves <pedro@codesourcery.com>
9510
9511 * linux-x86-low.c (always_true): Delete.
9512 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9513 trying to fool the compiler with always_true.
9514
c6beb2cb
PA
95152010-06-20 Pedro Alves <pedro@codesourcery.com>
9516
9517 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9518 conditions in gdbserver.
9519
d2ed6730
UW
95202010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9521
9522 * spu-low.c (spu_read_memory): Wrap around local store limit.
9523 (spu_write_memory): Likewise.
9524
4e29fb54
PA
95252010-06-15 Pedro Alves <pedro@codesourcery.com>
9526
9527 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9528 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9529 LONGEST uses.
9530 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9531 uses.
9532 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9533 uses with LONGEST uses.
9534
6a271cae
PA
95352010-06-14 Stan Shebs <stan@codesourcery.com>
9536 Pedro Alves <pedro@codesourcery.com>
9537
9538 Bytecode compiler.
9539
9540 * linux-x86-low.c: Include limits.h.
9541 (add_insns): New.
9542 (always_true): New.
9543 (EMIT_ASM): New.
9544 (EMIT_ASM32): New.
9545 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9546 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9547 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9548 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9549 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9550 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9551 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9552 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9553 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9554 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9555 (amd64_emit_void_call_2): New.
9556 (amd64_emit_ops): New.
9557 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9558 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9559 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9560 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9561 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9562 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9563 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9564 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9565 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9566 (i386_emit_stack_adjust, i386_emit_int_call_1)
9567 (i386_emit_void_call_2): New.
9568 (i386_emit_ops): New.
9569 (x86_emit_ops): New.
9570 (the_low_target): Install x86_emit_ops.
9571 * server.h (struct emit_ops): New.
9572 (get_raw_reg_func_addr): Declare.
9573 (current_insn_ptr, emit_error): Declare.
9574 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9575 (set_trace_state_variable_value): New defines.
9576 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9577 addr_get_trace_state_variable_value and
9578 addr_set_trace_state_variable_value.
9579 (symbol_list): New fields for get_raw_reg,
9580 get_trace_state_variable_value and set_trace_state_variable_value.
9581 (condfn): New typedef.
9582 (struct tracepoint): New field `compiled_cond'.
9583 (do_action_at_tracepoint): Clear compiled_cond.
9584 (get_trace_state_variable_value, set_trace_state_variable_value):
9585 Export in the IPA.
9586 (condition_true_at_tracepoint): If there's a compiled condition,
9587 run that.
9588 (current_insn_ptr, emit_error): New globals.
9589 (struct bytecode_address): New.
9590 (get_raw_reg_func_addr): New.
9591 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9592 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9593 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9594 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9595 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9596 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9597 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9598 (compile_tracepoint_condition, compile_bytecodes): New.
9599 * target.h (emit_ops): Forward declare.
9600 (struct target_ops): New field emit_ops.
9601 (target_emit_ops): New.
9602 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9603 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9604 * linux-low.c (linux_emit_ops): New.
9605 (linux_target_ops): Install it.
9606 * linux-low.h (struct linux_target_ops): New field emit_ops.
9607
92b72907
UW
96082010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9609
9610 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9611 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9612
fa593d66
PA
96132010-06-01 Pedro Alves <pedro@codesourcery.com>
9614 Stan Shebs <stan@codesourcery.com>
9615
9616 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9617 (all): Depend on $(extra_libraries).
9618 (install-only): Install the IPA.
9619 (IPA_OBJS, IPA_LIB): New.
9620 (clean): Remove the IPA lib.
9621 (IPAGENT_CFLAGS): New.
9622 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9623 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9624 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9625 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9626 * configure.ac: Check for atomic builtins support in the compiler.
9627 (IPA_DEPFILES, extra_libraries): Define.
9628 * configure.srv (ipa_obj): Add description.
9629 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9630 (i[34567]86-*-linux*): Set ipa_obj.
9631 (x86_64-*-linux*): Set ipa_obj.
9632 * linux-low.c (stabilizing_threads): New.
9633 (supports_fast_tracepoints): New.
9634 (linux_detach): Stabilize threads before detaching.
9635 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9636 the lwp is either not stabilizing, or is moving out of a jump pad.
9637 (linux_fast_tracepoint_collecting): New.
9638 (maybe_move_out_of_jump_pad): New.
9639 (enqueue_one_deferred_signal): New.
9640 (dequeue_one_deferred_signal): New.
9641 (linux_wait_for_event_1): If moving out of a jump pad, defer
9642 pending signals to later.
9643 (linux_stabilize_threads): New.
9644 (linux_wait_1): Check if threads need moving out of jump pads, and
9645 do it if so.
9646 (stuck_in_jump_pad_callback): New.
9647 (move_out_of_jump_pad_callback): New.
9648 (lwp_running): New.
9649 (linux_resume_one_lwp): Handle moving out of jump pads.
9650 (linux_set_resume_request): Dequeue deferred signals.
9651 (need_step_over_p): Also step over fast tracepoint jumps.
9652 (start_step_over): Also uninsert fast tracepoint jumps.
9653 (finish_step_over): Also reinsert fast tracepoint jumps.
9654 (linux_install_fast_tracepoint_jump): New.
9655 (linux_target_ops): Install linux_stabilize_threads and
9656 linux_install_fast_tracepoint_jump_pad.
9657 * linux-low.h (linux_target_ops) <get_thread_area,
9658 install_fast_tracepoint_jump_pad>: New fields.
9659 (struct lwp_info) <collecting_fast_tracepoint,
9660 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9661 (linux_get_thread_area): Declare.
9662 * linux-x86-low.c (jump_insn): New.
9663 (x86_get_thread_area): New.
9664 (append_insns): New.
9665 (push_opcode): New.
9666 (amd64_install_fast_tracepoint_jump_pad): New.
9667 (i386_install_fast_tracepoint_jump_pad): New.
9668 (x86_install_fast_tracepoint_jump_pad): New.
9669 (the_low_target): Install x86_get_thread_area and
9670 x86_install_fast_tracepoint_jump_pad.
9671 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9672 (struct fast_tracepoint_jump): New.
9673 (fast_tracepoint_jump_insn): New.
9674 (fast_tracepoint_jump_shadow): New.
9675 (find_fast_tracepoint_jump_at): New.
9676 (fast_tracepoint_jump_here): New.
9677 (delete_fast_tracepoint_jump): New.
9678 (set_fast_tracepoint_jump): New.
9679 (uninsert_fast_tracepoint_jumps_at): New.
9680 (reinsert_fast_tracepoint_jumps_at): New.
9681 (set_breakpoint_at): Use write_inferior_memory.
9682 (uninsert_raw_breakpoint): Use write_inferior_memory.
9683 (check_mem_read): Mask out fast tracepoint jumps.
9684 (check_mem_write): Mask out fast tracepoint jumps.
9685 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9686 (set_fast_tracepoint_jump): Declare.
9687 (delete_fast_tracepoint_jump)
9688 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9689 (reinsert_fast_tracepoint_jumps_at): Declare.
9690 * regcache.c: Don't compile many functions when building the
9691 in-process agent library.
9692 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9693 the register buffer in the heap.
9694 (free_register_cache): If the register buffer isn't owned by the
9695 regcache, don't free it.
9696 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9697 pre-existing register caches.
9698 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9699 type.
9700 (convert_ascii_to_int): : Constify `from' parameter type.
9701 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9702 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9703 the needed buffer in-place.
9704 (relocate_instruction): New.
9705 * server.c (handle_query) <qSymbols>: If the target supports
9706 tracepoints, give it a chance of looking up symbols. Report
9707 support for fast tracepoints.
9708 (handle_status): Stabilize threads.
9709 (process_serial_event): Adjust.
9710 * server.h (struct fast_tracepoint_jump): Forward declare.
9711 (struct process_info) <fast_tracepoint_jumps>: New field.
9712 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9713 (decode_X_packet, decode_M_packet): Adjust.
9714 (relocate_instruction): Declare.
9715 (in_process_agent_loaded): Declare.
9716 (tracepoint_look_up_symbols): Declare.
9717 (struct fast_tpoint_collect_status): Declare.
9718 (fast_tracepoint_collecting): Declare.
9719 (force_unlock_trace_buffer): Declare.
9720 (handle_tracepoint_bkpts): Declare.
9721 (initialize_low_tracepoint)
9722 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9723 * target.h (struct target_ops) <stabilize_threads,
9724 install_fast_tracepoint_jump_pad>: New fields.
9725 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9726 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9727 [HAVE_STDINT_H]: Include stdint.h.
9728 (trace_debug_1): Rename to ...
9729 (trace_vdebug): ... this.
9730 (trace_debug): Rename to ...
9731 (trace_debug_1): ... this. Add `level' parameter.
9732 (trace_debug): New.
9733 (ATTR_USED, ATTR_NOINLINE): New.
9734 (IP_AGENT_EXPORT): New.
9735 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9736 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9737 (about_to_request_buffer_space, trace_buffer_is_full)
9738 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9739 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9740 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9741 (traceframe_write_count, traceframes_created)
9742 (trace_state_variables)
9743 New renaming defines.
9744 (struct ipa_sym_addresses): New.
9745 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9746 (symbol_list): New.
9747 (ipa_sym_addrs): New.
9748 (all_tracepoint_symbols_looked_up): New.
9749 (in_process_agent_loaded): New.
9750 (write_e_ipa_not_loaded): New.
9751 (maybe_write_ipa_not_loaded): New.
9752 (tracepoint_look_up_symbols): New.
9753 (debug_threads) [IN_PROCESS_AGENT]: New.
9754 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9755 (UNKNOWN_SIDE_EFFECTS): New.
9756 (stop_tracing): New.
9757 (flush_trace_buffer): New.
9758 (stop_tracing_bkpt): New.
9759 (flush_trace_buffer_bkpt): New.
9760 (read_inferior_integer): New.
9761 (read_inferior_uinteger): New.
9762 (read_inferior_data_pointer): New.
9763 (write_inferior_data_pointer): New.
9764 (write_inferior_integer): New.
9765 (write_inferior_uinteger): New.
9766 (struct collect_static_trace_data_action): Delete.
9767 (enum tracepoint_type): New.
9768 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
9769 <actions_str, step_actions, step_actions_str>: Only include in
9770 GDBserver.
fa593d66
PA
9771 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9772 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9773 (tracepoints): Use IP_AGENT_EXPORT.
9774 (last_tracepoint): Don't include in the IPA.
9775 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9776 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9777 (alloced_trace_state_variables): New.
9778 (trace_state_variables): Use IP_AGENT_EXPORT.
9779 (traceframe_t): Delete unused variable.
9780 (circular_trace_buffer): Don't include in the IPA.
9781 (trace_buffer_start): Delete.
9782 (struct trace_buffer_control): New.
9783 (trace_buffer_free): Delete.
9784 (struct ipa_trace_buffer_control): New.
9785 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9786 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9787 New.
9788 (trace_buffer_ctrl): New.
9789 (TRACE_BUFFER_CTRL_CURR): New.
9790 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9791 Reimplement as macros.
9792 (trace_buffer_wrap): Delete.
9793 (traceframe_write_count, traceframe_read_count)
9794 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9795 (struct tracepoint_hit_ctx) <type>: New field.
9796 (struct fast_tracepoint_ctx): New.
9797 (memory_barrier): New.
9798 (cmpxchg): New.
9799 (record_tracepoint_error): Update atomically in the IPA.
9800 (clear_inferior_trace_buffer): New.
9801 (about_to_request_buffer_space): New.
9802 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9803 updating the same buffer.
9804 (add_tracepoint): Default the tracepoint's type to trap
9805 tracepoint, and orig_size to -1.
9806 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9807 internal variables.
9808 (create_trace_state_variable): New parameter `gdb'. Handle it.
9809 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9810 (cmd_qtdp): Handle fast tracepoints.
9811 (cmd_qtdv): Adjust.
9812 (max_jump_pad_size): New.
9813 (gdb_jump_pad_head): New.
9814 (get_jump_space_head): New.
9815 (claim_jump_space): New.
9816 (sort_tracepoints): New.
9817 (MAX_JUMP_SIZE): New.
9818 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9819 IPA.
9820 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9821 support. Upload fast traceframes, and delete internal IPA
9822 breakpoints.
9823 (stop_tracing_handler): New.
9824 (flush_trace_buffer_handler): New.
9825 (cmd_qtstop): Upload fast tracepoints.
9826 (response_tracepoint): Handle fast tracepoints.
9827 (tracepoint_finished_step): Upload fast traceframes. Set the
9828 tracepoint hit context's tracepoint type.
9829 (handle_tracepoint_bkpts): New.
9830 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9831 type. Add comment about fast tracepoints.
9832 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9833 non-existing action_str field.
9834 (get_context_regcache): Handle fast tracepoints.
9835 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9836 to the regcache.
9837 (fast_tracepoint_from_jump_pad_address): New.
9838 (fast_tracepoint_from_ipa_tpoint_address): New.
9839 (collecting_t): New.
9840 (force_unlock_trace_buffer): New.
9841 (fast_tracepoint_collecting): New.
9842 (collecting): New.
9843 (gdb_collect): New.
9844 (write_inferior_data_ptr): New.
9845 (target_tp_heap): New.
9846 (target_malloc): New.
9847 (download_agent_expr): New.
9848 (UALIGN): New.
9849 (download_tracepoints): New.
9850 (download_trace_state_variables): New.
9851 (upload_fast_traceframes): New.
9852 (IPA_FIRST_TRACEFRAME): New.
9853 (IPA_NEXT_TRACEFRAME_1): New.
9854 (IPA_NEXT_TRACEFRAME): New.
9855 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9856 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9857 (gdb_jump_pad_buffer_end): New.
9858 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9859 (initialize_tracepoint): Adjust.
9860 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9861 buffer. Initialize the low module.
9862 * utils.c (PREFIX, TOOLNAME): New.
9863 (malloc_failure): Use PREFIX.
9864 (error): In the IPA, an error causes an exit.
9865 (fatal, warning): Use PREFIX.
9866 (internal_error): Use TOOLNAME.
9867 (NUMCELLS): Increase to 10.
9868 * configure, config.in: Regenerate.
9869
d149dd1d
PA
98702010-06-01 Pedro Alves <pedro@codesourcery.com>
9871
9872 * server.c (handle_query) <qSupported>: Do two passes over the
9873 qSupported string to avoid nesting strtok.
9874
f6528abd
JK
98752010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9876
9877 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9878 (CDEPS): New.
9879 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9880 -Wl,--dynamic-list.
9881 * configure: Regenerate.
9882 * proc-service.list: New.
9883
ca2a87a0
JK
98842010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9885
9886 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9887 New comment.
9888
363a6e9f
OS
98892010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9890
9891 * gdbreplay.c (remote_open): Check error return from socket() call by
9892 its equality to -1 not by it being negative.
9893 * remote-utils.c (remote_open): Likewise.
9894
d23b6cb1
PA
98952010-05-23 Pedro Alves <pedro@codesourcery.com>
9896
9897 * config.h: Regenerate.
9898
28d3cf85
MK
98992010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9900
9901 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9902 doesn't provide PTRACE_GET_THREAD_AREA.
9903
fea36a59
MK
99042010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9905
9906 * linux-m68k-low.c: Include <asm/ptrace.h>
9907 (ps_get_thread_area): Implement.
9908
24b066ba
DE
99092010-05-03 Doug Evans <dje@google.com>
9910
9911 * event-loop.c (struct callback_event): New struct.
9912 (callback_list): New global.
9913 (append_callback_event, delete_callback_event): New functions.
9914 (process_callback): New function.
9915 (start_event_loop): Call it.
9916 * remote-utils.c (NOT_SCHEDULED): Define.
9917 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9918 moved out of readchar.
9919 (readchar): Rewrite. Call reschedule before returning.
9920 (reset_readchar): New function.
9921 (remote_close): Call it.
9922 (process_remaining, reschedule): New functions.
9923 * server.h (callback_handler_func): New typedef.
9924 (append_callback_event, delete_callback_event): Declare.
9925
9836d6ea
PA
99262010-05-03 Pedro Alves <pedro@codesourcery.com>
9927
9928 * proc-service.c (ps_pglobal_lookup): Use
9929 thread_db_look_up_one_symbol.
9930 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9931 parameter. Use it instead of all_symbols_looked_up.
9932 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9933 field.
9934 (all_symbols_looked_up): Don't declare.
9935 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9936 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9937 field.
9938 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9939 Set all_symbols_looked_up here.
9940 (thread_db_look_up_one_symbol): New.
9941 (thread_db_get_tls_address): Adjust.
9942 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9943 thread_db object on the heap, and tentatively set it in the
9944 process structure.
9945 (thread_db_init): Don't set all_symbols_looked_up here.
9946 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9947
7984d532
PA
99482010-05-03 Pedro Alves <pedro@codesourcery.com>
9949
9950 * linux-low.c (linux_kill, linux_detach): Adjust.
9951 (status_pending_p_callback): Remove redundant statement. Check
9952 for !TARGET_WAITIKIND_IGNORE, instead of
9953 TARGET_WAITKIND_STOPPED.
9954 (handle_tracepoints): Make sure LWP is locked. Adjust.
9955 (linux_wait_for_event_1): Adjust.
9956 (linux_cancel_breakpoints): New.
9957 (unsuspend_one_lwp): New.
9958 (unsuspend_all_lwps): New.
9959 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9960 (send_sigstop_callback): Change return type to int, add new
9961 `except' parameter and handle it.
9962 (suspend_and_send_sigstop_callback): New.
9963 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9964 pass them down. If SUSPEND, also increment the lwp's suspend
9965 count.
9966 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9967 (need_step_over_p): Don't consider suspended LWPs.
9968 (start_step_over): Adjust.
9969 (proceed_one_lwp): Change return type to int, add new `except'
9970 parameter and handle it.
9971 (unsuspend_and_proceed_one_lwp): New.
9972 (proceed_all_lwps): Use find_inferior instead of
9973 for_each_inferior.
9974 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9975 also decrement the suspend count of LWPs. Pass `except' down,
9976 instead of hacking its suspend count.
9977 (linux_pause_all): Add `freeze' parameter. Adjust.
9978 (linux_unpause_all): New.
9979 (linux_target_ops): Install linux_unpause_all.
9980 * server.c (handle_status): Adjust.
9981 * target.h (struct target_ops): New fields `unpause_all' and
9982 `cancel_breakpoints'. Add new parameter to `pause_all'.
9983 (pause_all): Add new `freeze' parameter.
9984 (unpause_all): New.
9985 (cancel_breakpoints): New.
9986 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9987 cancel breakpoints.
9988 (cmd_qtstart): Pause threads.
9989 (stop_tracing): Pause threads, and cancel breakpoints.
9990 * win32-low.c (win32_target_ops): Adjust.
9991
e471f25b
PA
99922010-05-03 Pedro Alves <pedro@codesourcery.com>
9993
9994 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9995 the inferior right away from here...
9996 (linux_wait_1): ... to here, and adjust to check the thread's
9997 last_resume_kind instead of the lwp's step or stop_expected flags.
9998
1915ef4f
PA
99992010-05-02 Pedro Alves <pedro@codesourcery.com>
10000
10001 * README: Use consistent `GDB' and `GDBserver' spellings.
10002
f9e39928
PA
100032010-05-02 Pedro Alves <pedro@codesourcery.com>
10004
10005 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10006 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10007 (linux_detach_one_lwp): Assume the lwp is stopped.
10008 (any_thread_of): Delete.
10009 (linux_detach): Stop all lwps here. Don't blindly delete all
10010 breakpoints.
10011 (delete_lwp_callback): New.
10012 (linux_mourn): Delete all lwps of the process that is gone.
10013 (linux_wait_1): Don't delete the last lwp of the process here.
10014 * mem-break.h (mark_breakpoints_out): Declare.
10015 * mem-break.c (mark_breakpoints_out): New.
10016 (free_all_breakpoints): Use it.
10017 * server.c (handle_target_event): If the process is gone, mark
10018 breakpoints out.
10019 * thread-db.c (struct thread_db) <create_bp>: New field.
10020 (thread_db_enable_reporting): Fix prototype. Store a thread event
10021 breakpoint reference in the thread_db struct.
10022 (thread_db_load_search): Clear the thread_db object.
10023 (try_thread_db_load_1): Ditto.
10024 (switch_to_process): New.
10025 (disable_thread_event_reporting): Use it.
10026 (remove_thread_event_breakpoints): New.
10027 (thread_db_detach, thread_db_mourn): Use it.
10028
1e7fc18c
PA
100292010-05-01 Pedro Alves <pedro@codesourcery.com>
10030
10031 * linux-low.c (linux_enable_event_reporting): New.
10032 (linux_wait_for_event_1, handle_extended_wait): Use it.
10033
02fc4de7
PA
100342010-04-30 Pedro Alves <pedro@codesourcery.com>
10035
10036 * linux-low.c (linux_kill_one_lwp, linux_kill)
10037 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10038 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10039 SIGSTOP even if the LWP is stopped.
10040 (send_sigstop_callback): New.
10041 (stop_all_lwps): Use send_sigstop_callback instead.
10042 (linux_resume_one_thread): Adjust.
10043 (proceed_one_lwp): Still proceed an LWP that the client has
10044 requested to stop, if we haven't reported it as stopped yet. Make
10045 sure that LWPs the client want stopped, have a pending SIGSTOP.
10046
bc3b5632
DE
100472010-04-26 Doug Evans <dje@google.com>
10048
ae1ada35
DE
10049 * server.c (handle_general_set): Make static.
10050
bc3b5632
DE
10051 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10052 Print received char after testing for error/eof instead of before.
10053 (input_interrupt): Tweak comment.
10054
65730243
DE
100552010-04-23 Doug Evans <dje@google.com>
10056
10057 * server.c (start_inferior): Print inferior argv if --debug.
10058
a8ae7dc0
AR
100592010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10060
10061 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10062 * nto-x86-low.c: Include server.h
10063
1c07cc19
PM
100642010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10065
10066 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10067 be consistent with other sources of this directory.
10068 (init_registers_amd64): Correct name of source file of this function
10069 in the comment.
10070
e0a61e09
PM
100712010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10072
10073 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10074 64-bit executables.
10075
54709339
PM
100762010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10077
10078 * win32-i386-low.c: Add 64-bit support.
10079 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10080 (init_registers_amd64): Declare.
10081 (mappings): Add 64-bit version of array.
10082 (init_windows_x86): New function.
10083 (the_low_target): Change init_arch field to init_windows_x86.
10084
e8f0053d
PM
100852010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10086
10087 * win32-low.c: Adapt to support also 64-bit architecture.
10088 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10089 (get_image_name): Use SIZE_T type for local variable `done'.
10090 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10091 (toolhelp_get_dll_name): Idem.
10092 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10093 Use uintptr_t typecast to avoid warning.
10094 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10095 (handle_exception): Use phex_nz to avoid warning.
10096 (win32_wait): Remove unused local variable `process'.
10097
c481e77e
PM
100982010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10099
10100 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10101 `amd64-avx.o'.
10102
12ea4b69
PM
101032010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10104
10105 * configure.ac: Use `ws2_32' library for srv_mingw.
10106 * configure: Regenerate.
10107 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10108 * remote-utils.c: Likewise.
10109
f6d1620c
L
101102010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10111
10112 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10113 if __x86_64__ is defined.
10114
8e642873
PM
101152010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10116
10117 * configure: Regenerate.
10118
711e434b
PM
101192010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10120
10121 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10122 * target.h (target_ops): New get_tib_address field.
10123 * win32-low.h (win32_thread_info): Add thread_local_base field.
10124 * win32-low.c (child_add_thread): Add tlb argument.
10125 Set thread_local_base field to TLB.
10126 (get_child_debug_event): Adapt to child_add_thread change.
10127 (win32_get_tib_address): New function.
10128 (win32_target_ops): Set get_tib_address field to
10129 win32_get_tib_address.
10130 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10131
505106cd
PA
101322010-04-12 Pedro Alves <pedro@codesourcery.com>
10133
505106cd
PA
10134 * linux-low.c (linux_mourn): Also remove the process.
10135 * server.c (handle_target_event): Don't remove the process here.
10136 * nto-low.c (nto_mourn): New.
10137 (nto_target_ops): Install it.
10138 * spu-low.c (spu_mourn): New.
10139 (spu_target_ops): Install it.
10140 * win32-low.c (win32_mourn): New.
10141 (win32_target_ops): Install it.
10142
e8470a06
PA
101432010-04-12 Pedro Alves <pedro@codesourcery.com>
10144
10145 * server.h (buffer_xml_printf): Remove redundant `;'.
10146
45ba0d02
PA
101472010-04-12 Pedro Alves <pedro@codesourcery.com>
10148
10149 * regcache.c (set_register_cache): Invalidate regcaches before
10150 changing the register cache layout.
10151 (regcache_invalidate_one): Allow a NULL regcache.
10152 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10153 regcaches before changing the register cache layout or the target
10154 regsets.
10155
59e04013
L
101562010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10157
10158 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10159 variable warning on Linux/x86-64.
10160
8336d594
PA
101612010-04-11 Pedro Alves <pedro@codesourcery.com>
10162
10163 GDBserver disconnected tracing support.
10164
10165 * linux-low.c (linux_remove_process): Delete.
10166 (add_lwp): Don't set last_resume_kind here.
10167 (linux_kill): Use `mourn'.
10168 (linux_detach): Use `thread_db_detach', and `mourn'.
10169 (linux_mourn): New.
10170 (linux_attach_lwp_1): Adjust comment.
10171 (linux_attach): last_resume_kind moved the thread_info; adjust.
10172 (status_pending_p_callback): Adjust.
10173 (linux_wait_for_event_1): Adjust.
10174 (count_events_callback, select_singlestep_lwp_callback)
10175 (select_event_lwp_callback, cancel_breakpoints_callback)
10176 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10177 (proceed_one_lwp): Adjust.
10178 (linux_async): Add debug output.
10179 (linux_thread_stopped): New.
10180 (linux_pause_all): New.
10181 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10182 linux_pause_all.
10183 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10184 (thread_db_free): Delete declaration.
10185 (thread_db_detach, thread_db_mourn): Declare.
10186 * thread-db.c (thread_db_init): Use thread_db_mourn.
10187 (thread_db_free): Delete, split in two.
10188 (disable_thread_event_reporting): New.
10189 (thread_db_detach): New.
10190 (thread_db_mourn): New.
10191
10192 * server.h (struct thread_info) <last_resume_kind>: New field.
10193 <attached>: Add comment.
10194 <gdb_detached>: New field.
10195 (handler_func): Change return type to int.
10196 (handle_serial_event, handle_target_event): Ditto.
10197 (gdb_connected): Declare.
10198 (tracing): Delete.
10199 (disconnected_tracing): Declare.
10200 (stop_tracing): Declare.
10201
10202 * server.c (handle_query) <qSupported>: Report support for
10203 disconnected tracing.
10204 (queue_stop_reply_callback): Account for running threads.
10205 (gdb_wants_thread_stopped): New.
10206 (gdb_wants_all_threads_stopped): New.
10207 (gdb_reattached_process): New.
10208 (handle_status): Clear the `gdb_detached' flag of all processes.
10209 In all-stop, stop all threads.
10210 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10211 (process_serial_event): If the remote connection breaks, or if an
10212 exit was forced with "monitor exit", force an event loop exit.
10213 Handle disconnected tracing on detach.
10214 (handle_serial_event): Adjust.
10215 (handle_target_event): If GDB isn't connected, forward events back
10216 to the inferior, unless the last process exited, in which case,
10217 exit gdbserver. Adjust interface.
10218
10219 * remote-utils.c (remote_open): Don't block in accept. Instead
10220 register an event loop source on the listen socket file
10221 descriptor. Refactor bits into ...
10222 (listen_desc): ... this new global.
10223 (gdb_connected): ... this new function.
10224 (enable_async_notification): ... this new function.
10225 (handle_accept_event): ... this new function.
10226 (remote_close): Clear remote_desc.
10227
10228 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10229
10230 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10231 New fields.
10232 (mourn_inferior): Define.
10233 (target_process_qsupported): Avoid the dangling else problem.
10234 (thread_stopped): Define.
10235 (pause_all): Define.
10236 (target_waitstatus_to_string): Declare.
10237 * target.c (target_waitstatus_to_string): New.
10238
10239 * tracepoint.c (tracing): Make extern.
10240 (disconnected_tracing): New.
10241 (stop_tracing): Make extern. Handle tracing stops due to GDB
10242 disconnecting.
10243 (cmd_qtdisconnected): New.
10244 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10245 (handle_tracepoint_general_set): Handle QTDisconnected.
10246
10247 * event-loop.c (event_handler_func): Change return type to int.
10248 (process_event): Bail out if the event handler wants the event
10249 loop to stop.
10250 (handle_file_event): Ditto.
10251 (start_event_loop): Bail out if the event handler wants the event
10252 loop to stop.
10253
10254 * nto-low.c (nto_target_ops): Adjust.
10255 * spu-low.c (spu_wait): Don't remove the process here.
10256 (spu_target_ops): Adjust.
10257 * win32-low.c (win32_wait): Don't remove the process here.
10258 (win32_target_ops): Adjust.
10259
5d267c4c
PA
102602010-04-11 Pedro Alves <pedro@codesourcery.com>
10261
10262 * regcache.c (realloc_register_cache): Invalidate inferior's
10263 regcache before recreating it.
10264
623ccd72
PA
102652010-04-09 Pedro Alves <pedro@codesourcery.com>
10266
10267 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10268
219f2f23
PA
102692010-04-09 Stan Shebs <stan@codesourcery.com>
10270 Pedro Alves <pedro@codesourcery.com>
10271
10272 * server.h (LONGEST): New.
10273 (struct thread_info) <while_stepping>: New field.
10274 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10275 Declare.
10276 (initialize_tracepoint, handle_tracepoint_general_set)
10277 (handle_tracepoint_query, tracepoint_finished_step)
10278 (tracepoint_was_hit, release_while_stepping_state_list):
10279 (current_traceframe): Declare.
10280 * server.c (handle_general_set): Handle tracepoint packets.
10281 (read_memory): New.
10282 (write_memory): New.
10283 (handle_search_memory_1): Use read_memory.
10284 (handle_query): Report support for conditional tracepoints, trace
10285 state variables, and tracepoint sources. Handle tracepoint
10286 queries.
10287 (main): Initialize the tracepoints module.
10288 (process_serial_event): Handle traceframe reads/writes.
10289
10290 * linux-low.c (handle_tracepoints): New.
10291 (linux_wait_1): Call it.
10292 (linux_resume_one_lwp): Handle while-stepping.
10293 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10294 (linux_target_ops): Install them.
10295 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10296 New field.
10297 * linux-x86-low.c (x86_supports_tracepoints): New.
10298 (the_low_target). Install it.
10299
10300 * mem-break.h (delete_breakpoint): Declare.
10301 * mem-break.c (delete_breakpoint): Make external.
10302
10303 * target.h (struct target_ops): Add `supports_tracepoints',
10304 `read_pc', and `write_pc' fields.
10305 (target_supports_tracepoints): Define.
10306 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10307 (phex_nz): New.
10308
10309 * regcache.h (struct regcache) <registers_owned>: New field.
10310 (init_register_cache, regcache_cpy): Declare.
10311 (regcache_read_pc, regcache_write_pc): Declare.
10312 (register_cache_size): Declare.
10313 (supply_regblock): Declare.
10314 * regcache.c (init_register_cache): New.
10315 (new_register_cache): Use it.
10316 (regcache_cpy): New.
10317 (register_cache_size): New.
10318 (supply_regblock): New.
10319 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 10320
219f2f23
PA
10321 * tracepoint.c: New.
10322
10323 * Makefile.in (OBS): Add tracepoint.o.
10324 (tracepoint.o): New rule.
10325
3a13a53b
L
103262010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10327
10328 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10329 (i386-mmx.o): New.
10330 (i386-mmx.c): Likewise.
10331 (i386-mmx-linux.o): Likewise.
10332 (i386-mmx-linux.c): Likewise.
10333
10334 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10335 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10336 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10337 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10338
10339 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10340 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10341 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10342
1570b33e
L
103432010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10344
10345 * Makefile.in (clean): Updated.
10346 (i386-avx.o): New.
10347 (i386-avx.c): Likewise.
10348 (i386-avx-linux.o): Likewise.
10349 (i386-avx-linux.c): Likewise.
10350 (amd64-avx.o): Likewise.
10351 (amd64-avx.c): Likewise.
10352 (amd64-avx-linux.o): Likewise.
10353 (amd64-avx-linux.c): Likewise.
10354
10355 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10356 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10357 (srv_amd64_regobj): Add amd64-avx.o.
10358 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10359 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10360 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10361 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10362 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10363 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10364 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10365
10366 * i387-fp.c: Include "i386-xstate.h".
10367 (i387_xsave): New.
10368 (i387_cache_to_xsave): Likewise.
10369 (i387_xsave_to_cache): Likewise.
10370 (x86_xcr0): Likewise.
10371
10372 * i387-fp.h (i387_cache_to_xsave): Likewise.
10373 (i387_xsave_to_cache): Likewise.
10374 (x86_xcr0): Likewise.
10375
10376 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10377 * linux-crisv32-low.c (target_regsets): Likewise.
10378 * linux-m68k-low.c (target_regsets): Likewise.
10379 * linux-mips-low.c (target_regsets): Likewise.
10380 * linux-ppc-low.c (target_regsets): Likewise.
10381 * linux-s390-low.c (target_regsets): Likewise.
10382 * linux-sh-low.c (target_regsets): Likewise.
10383 * linux-sparc-low.c (target_regsets): Likewise.
10384 * linux-xtensa-low.c (target_regsets): Likewise.
10385
10386 * linux-low.c: Include <sys/uio.h>.
10387 (regsets_fetch_inferior_registers): Support nt_type.
10388 (regsets_store_inferior_registers): Likewise.
10389 (linux_process_qsupported): New.
10390 (linux_target_ops): Add linux_process_qsupported.
10391
10392 * linux-low.h (regset_info): Add nt_type.
10393 (linux_target_ops): Add process_qsupported.
10394
10395 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10396 and <sys/uio.h>.
10397 (init_registers_i386_avx_linux): New.
10398 (init_registers_amd64_avx_linux): Likewise.
10399 (xmltarget_i386_linux_no_xml): Likewise.
10400 (xmltarget_amd64_linux_no_xml): Likewise.
10401 (PTRACE_GETREGSET): Likewise.
10402 (PTRACE_SETREGSET): Likewise.
10403 (x86_fill_xstateregset): Likewise.
10404 (x86_store_xstateregset): Likewise.
10405 (use_xml): Likewise.
10406 (x86_linux_update_xmltarget): Likewise.
10407 (x86_linux_process_qsupported): Likewise.
10408 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10409 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10410 init_registers_i386_linux here. Call
10411 x86_linux_update_xmltarget.
10412 (the_low_target): Add x86_linux_process_qsupported.
10413
10414 * server.c (handle_query): Call target_process_qsupported.
10415
10416 * target.h (target_ops): Add process_qsupported.
10417 (target_process_qsupported): New.
10418
fc7238bb
PA
104192010-04-03 Pedro Alves <pedro@codesourcery.com>
10420
10421 * inferiors.c (add_thread): Set last_status kind to
10422 TARGET_WAITKIND_IGNORE.
10423 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10424 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10425 (linux_wait_1): Move `thread' local definition to block that uses
10426 it. Don't NULL initialize `event_child'.
10427 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10428 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10429 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10430
bdabb078
PA
104312010-04-01 Pedro Alves <pedro@codesourcery.com>
10432
10433 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10434 an extended waitstatus, or by a watchpoint.
10435 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10436 thread was stepping or has been stopped by a watchpoint.
10437
d3bbe7a0
PA
104382010-04-01 Pedro Alves <pedro@codesourcery.com>
10439
10440 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10441 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10442 of another, then delete the previous, and validate all
10443 breakpoints.
10444 (validate_inserted_breakpoint): New.
10445 (delete_disabled_breakpoints): New.
10446 (validate_breakpoints): New.
10447 (check_mem_read): Validate breakpoints before trusting their
10448 shadow. Delete disabled breakpoints.
10449 (check_mem_write): Validate breakpoints before trusting they
10450 should be inserted. Delete disabled breakpoints.
10451 * mem-break.h (validate_breakpoints):
10452 * server.c (handle_query): Validate breakpoints when we see a
10453 qSymbol query.
10454
8b07ae33
PA
104552010-04-01 Pedro Alves <pedro@codesourcery.com>
10456
10457 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10458 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10459 if we could tell there's a GDB breakpoint at stop_pc.
10460 (need_step_over_p): Don't do a step over if we find a GDB
10461 breakpoint at the resume PC.
10462
10463 * mem-break.c (struct raw_breakpoint): New.
10464 (enum bkpt_type): New type `gdb_breakpoint'.
10465 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10466 fields. New field `raw'.
10467 (find_raw_breakpoint_at): New.
10468 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10469 breakpoint instead.
10470 (set_breakpoint_at): Adjust.
10471 (delete_raw_breakpoint): New.
10472 (release_breakpoint): New.
10473 (delete_breakpoint): Rename to...
10474 (delete_breakpoint_1): ... this. Add proc parameter. Use
10475 release_breakpoint. Return ENOENT.
10476 (delete_breakpoint): Reimplement.
10477 (find_breakpoint_at): Delete.
10478 (find_gdb_breakpoint_at): New.
10479 (delete_breakpoint_at): Delete.
10480 (set_gdb_breakpoint_at): New.
10481 (delete_gdb_breakpoint_at): New.
10482 (gdb_breakpoint_here): New.
10483 (set_reinsert_breakpoint): Use release_breakpoint.
10484 (uninsert_breakpoint): Rename to ...
10485 (uninsert_raw_breakpoint): ... this.
10486 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10487 (reinsert_raw_breakpoint): Change parameter type to
10488 raw_breakpoint.
10489 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10490 instead.
10491 (check_breakpoints): Adjust. Use release_breakpoint.
10492 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10493 (breakpoint_inserted_here): Ditto.
10494 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10495 Don't trust the breakpoint's shadow if it is not inserted.
10496 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10497 (delete_all_breakpoints): Adjust.
10498 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10499 use delete_breakpoint_1.
10500
10501 * mem-break.h (breakpoints_supported): Delete declaration.
10502 (set_gdb_breakpoint_at): Declare.
10503 (gdb_breakpoint_here): Declare.
10504 (delete_breakpoint_at): Delete.
10505 (delete_gdb_breakpoint_at): Declare.
10506
10507 * server.h (struct raw_breakpoint): Forward declare.
10508 (struct process_info): New field `raw_breakpoints'.
10509
10510 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10511 breakpoints.
10512
6bf5e0ba
PA
105132010-03-24 Pedro Alves <pedro@codesourcery.com>
10514
10515 * linux-low.c (status_pending_p_callback): Fix comment.
10516 (linux_wait_for_event_1): Move most of the internal breakpoint
10517 handling from here...
10518 (linux_wait_1): ... to here.
10519 (count_events_callback): New.
10520 (select_singlestep_lwp_callback): New.
10521 (select_event_lwp_callback): New.
10522 (cancel_breakpoints_callback): New.
10523 (select_event_lwp): New.
10524 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10525 priority to all LWPs that have had events that should be reported
10526 to the client. Cancel breakpoints when about to reporting the
10527 event to the client, not while stopping lwps. No longer cancel
10528 finished single-steps here.
10529 (cancel_finished_single_step): Delete.
10530 (cancel_finished_single_steps): Delete.
10531
414a389f
PA
105322010-03-24 Pedro Alves <pedro@codesourcery.com>
10533
10534 * mem-break.c (enum bkpt_type): New.
10535 (struct breakpoint): New field `type'.
10536 (set_breakpoint_at): Change return type to struct breakpoint
10537 pointer. Set type to `other_breakpoint' by default.
10538 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10539 in the breakpoint list.
10540 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10541 (reinsert_breakpoint): Rename to ...
10542 (reinsert_raw_breakpoint): ... this.
10543 (reinsert_breakpoints_at): Adjust.
10544 * mem-break.h (struct breakpoint): Declare.
10545 (set_breakpoint_at): Change return type to struct breakpoint
10546 pointer.
10547
2280c721
PA
105482010-03-24 Pedro Alves <pedro@codesourcery.com>
10549
10550 * server.c (handle_query): Assign, not compare.
10551
d50171e4
PA
105522010-03-24 Pedro Alves <pedro@codesourcery.com>
10553
10554 Teach linux gdbserver to step-over-breakpoints.
10555
10556 * linux-low.c (can_hardware_single_step): New.
10557 (supports_breakpoints): New.
10558 (handle_extended_wait): If stopping threads, read the stop pc of
10559 the new cloned LWP.
10560 (get_pc): New.
10561 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10562 low target doesn't support retrieving the PC.
10563 (add_lwp): Set last_resume_kind to resume_continue.
10564 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10565 (linux_attach): Don't clear stop_expected. Set the lwp's
10566 last_resume_kind to resume_stop.
10567 (linux_detach_one_lwp): Don't check for removed breakpoints.
10568 (check_removed_breakpoint): Delete.
10569 (status_pending_p): Rename to ...
10570 (status_pending_p_callback): ... this. Don't check for removed
10571 breakpoints. Don't consider threads that are stopped from GDB's
10572 perspective.
10573 (linux_wait_for_lwp): Always read the stop_pc here.
10574 (cancel_breakpoint): New.
10575 (step_over_bkpt): New global.
10576 (linux_wait_for_event_1): Implement stepping over breakpoints.
10577 (gdb_wants_lwp_stopped): New.
10578 (gdb_wants_all_stopped): New.
10579 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10580 single-step traps here. Store the thread's last reported target
10581 wait status.
10582 (send_sigstop): Don't clear stop_expected. Always set it,
10583 instead.
10584 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10585 (cancel_finished_single_step): New.
10586 (cancel_finished_single_steps): New.
10587 (wait_for_sigstop): Don't cancel finished single-step traps here.
10588 (linux_resume_one_lwp): Don't check for removed breakpoints.
10589 Don't set `step' on non-hardware step archs.
10590 (linux_set_resume_request): Ignore resume_stop requests if already
10591 stopping or stopped. Set the lwp's last_resume_kind.
10592 (resume_status_pending_p): Don't check for removed breakpoints.
10593 (need_step_over_p): New.
10594 (start_step_over): New.
10595 (finish_step_over): New.
10596 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10597 requests. Clear the thread's last reported target waitstatus.
10598 Don't use the `suspended' flag. Don't consider pending breakpoints.
10599 (linux_resume): Start a step-over if necessary.
10600 (proceed_one_lwp): New.
10601 (proceed_all_lwps): New.
10602 (unstop_all_lwps): New.
10603 * linux-low.h (struct lwp_info): Rewrite comment for the
10604 `suspended' flag. Add the `stop_pc' field. Delete the
10605 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10606 Add `'last_resume_kind' and `need_step_over' fields.
10607 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10608 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10609 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10610 (set_raw_breakpoint_at): New.
10611 (set_breakpoint_at): Rewrite to use it.
10612 (reinsert_breakpoint_handler): Delete.
10613 (set_reinsert_breakpoint): New.
10614 (reinsert_breakpoint_by_bp): Delete.
10615 (delete_reinsert_breakpoints): New.
10616 (uninsert_breakpoint): Rewrite.
10617 (uninsert_breakpoints_at): New.
10618 (reinsert_breakpoint): Rewrite.
10619 (reinsert_breakpoints_at): New.
10620 (check_breakpoints): Rewrite.
10621 (breakpoint_here): New.
10622 (breakpoint_inserted_here): New.
10623 (check_mem_read): Adjust.
10624 * mem-break.h (breakpoints_supported, breakpoint_here)
10625 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10626 (reinsert_breakpoint_by_bp): Delete declaration.
10627 (delete_reinsert_breakpoints): Declare.
10628 (reinsert_breakpoint): Delete declaration.
10629 (reinsert_breakpoints_at): Declare.
10630 (uninsert_breakpoint): Delete declaration.
10631 (uninsert_breakpoints_at): Declare.
10632 (check_breakpoints): Adjust prototype.
10633 * server.h: Adjust include order.
10634 (struct thread_info): Declare here. Add a `last_status' field.
10635
30ba68cb
MS
106362010-03-23 Michael Snyder <msnyder@vmware.com>
10637
10638 * server.c (crc32): New function.
10639 (handle_query): Add handling for 'qCRC:' request.
10640
b9a881c2
PA
106412010-03-23 Pedro Alves <pedro@codesourcery.com>
10642
10643 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10644 lwp had been stopped by a watchpoint.
10645
e92d13d5
PA
106462010-03-16 Pedro Alves <pedro@codesourcery.com>
10647
10648 * server.h (internal_error): Declare.
10649 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10650 * utils.c (internal_error): New function.
10651
64daa791
AS
106522010-03-15 Andreas Schwab <schwab@redhat.com>
10653
10654 * configure.srv: Fix typo setting srv_regobj.
10655
f52cd8cd
PA
106562010-03-15 Pedro Alves <pedro@codesourcery.com>
10657
10658 * linux-low.c (fetch_register): Avoid passing a non string literal
10659 format to `error'.
10660 (usr_store_inferior_registers): Ditto.
10661
93ae6fdc
PA
106622010-03-14 Pedro Alves <pedro@codesourcery.com>
10663
10664 * linux-low.c (linux_write_memory): Bail out early if peeking
10665 memory failed.
10666
c3adc08c
PA
106672010-03-14 Pedro Alves <pedro@codesourcery.com>
10668
10669 * linux-low.h (struct lwp_info): New fields
10670 `stopped_by_watchpoint' and `stopped_data_address'.
10671 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10672 here, and cache them in the lwp object.
10673 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10674 directly.
10675 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10676 field.
10677 (linux_stopped_by_watchpoint): Rewrite.
10678 (linux_stopped_data_address): Rewrite.
10679
bce522a2
PA
106802010-03-06 Simo Melenius <simo.melenius@iki.fi>
10681
10682 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10683 switching the current inferior, not before.
10684
90884b2b
L
106852010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10686
10687 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10688 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10689 i386-linux.c and amd64-linux.c.
10690 (reg-i386.o): Removed.
10691 (reg-i386.c): Likewise.
10692 (reg-i386-linux.o): Likewise.
10693 (reg-i386-linux.c): Likewise.
10694 (reg-x86-64.o): Likewise.
10695 (reg-x86-64.c): Likewise.
10696 (reg-x86-64-linux.o): Likewise.
10697 (reg-x86-64-linux.c): Likewise.
10698 (i386.o): New.
10699 (i386.c): Likewise.
10700 (i386-linux.o): Likewise.
10701 (i386-linux.c): Likewise.
10702 (amd64.o): Likewise.
10703 (amd64.c): Likewise.
10704 (amd64-linux.o): Likewise.
10705 (amd64-linux.c): Likewise.
10706
10707 * configure.srv (srv_i386_regobj): New.
10708 (srv_i386_linux_regobj): Likewise.
10709 (srv_amd64_regobj): Likewise.
10710 (srv_amd64_linux_regobj): Likewise.
10711 (srv_i386_32bit_xmlfiles): Likewise.
10712 (srv_i386_64bit_xmlfiles): Likewise.
10713 (srv_i386_xmlfiles): Likewise.
10714 (srv_amd64_xmlfiles): Likewise.
10715 (srv_i386_linux_xmlfiles): Likewise.
10716 (srv_amd64_linux_xmlfiles): Likewise.
10717 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10718 srv_xmlfiles to $srv_i386_xmlfiles.
10719 (i[34567]86-*-mingw32ce*): Likewise.
10720 (i[34567]86-*-mingw*): Likewise.
10721 (i[34567]86-*-nto*): Likewise.
10722 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10723 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10724 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10725 (x86_64-*-linux*): Likewise.
10726
10727 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10728 (init_registers_amd64_linux): New.
10729 (x86_arch_setup): Replace init_registers_x86_64_linux with
10730 init_registers_amd64_linux.
10731
193f13e6
MK
107322010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10733
10734 * configure.ac: Check for libdl. If it is not available link against
10735 static libthread_db.
10736 * configure: Regenerate.
10737
85d721b8
PA
107382010-02-22 Pedro Alves <pedro@codesourcery.com>
10739
10740 PR9605
10741
10742 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10743 handing a read watchpoint.
10744 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10745
6076632b
DE
107462010-02-12 Doug Evans <dje@google.com>
10747
10748 * linux-low.c (linux_supports_tracefork_flag): Document.
10749 (linux_look_up_symbols): Add comment.
10750
3327ccf7
L
107512010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10752
10753 * regcache.c (supply_register): Clear regcache if buf is NULL.
10754
0718675c 107552010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 10756 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
10757
10758 * inferiors.c (find_inferior): Add function documentation.
10759 (unloaded_dll): Handle the case where the unloaded dll has not
10760 been previously registered in the dll list.
10761
177321bd
DJ
107622010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10763
10764 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10765 (thumb2_breakpoint): New.
10766 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10767
2b009048
DJ
107682010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10769
10770 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10771 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10772 breakpoints.
10773
3be029c7
PA
107742010-01-21 Pedro Alves <pedro@codesourcery.com>
10775
10776 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10777
18f5de3b
JK
107782010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10779
10780 * linux-s390-low.c (s390_collect_ptrace_register)
10781 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10782
3743bb4f
DE
107832010-01-21 Doug Evans <dje@google.com>
10784
14ce3065
DE
10785 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10786 (PTRACE_ARG4_TYPE): New macro.
10787 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10788 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10789 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10790 (usr_store_inferior_registers): Ditto.
10791 (linux_read_memory, linux_write_memory): Ditto.
10792 (linux_test_for_tracefork): Ditto.
10793
3743bb4f
DE
10794 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10795 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10796
8b315be5
PA
107972010-01-21 Pedro Alves <pedro@codesourcery.com>
10798
10799 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10800 target.
10801
85492558
PA
108022010-01-21 Pedro Alves <pedro@codesourcery.com>
10803
10804 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10805 prototype to take a regcache. Adjust.
10806
442ea881
PA
108072010-01-20 Pedro Alves <pedro@codesourcery.com>
10808
10809 * regcache.h (struct thread_info): Forward declare.
10810 (struct regcache): New.
10811 (new_register_cache): Adjust prototype.
10812 (get_thread_regcache): Declare.
10813 (free_register_cache): Adjust prototype.
10814 (registers_to_string, registers_from_string): Ditto.
10815 (supply_register, supply_register_by_name, collect_register)
10816 (collect_register_as_string, collect_register_by_name): Ditto.
10817 * regcache.c (struct inferior_regcache_data): Delete.
10818 (get_regcache): Rename to ...
10819 (get_thread_regcache): ... this. Adjust. Switch inferior before
10820 fetching registers.
10821 (regcache_invalidate_one): Adjust.
10822 (regcache_invalidate): Fix prototype.
10823 (new_register_cache): Return the new register cache.
10824 (free_register_cache): Change prototype.
10825 (realloc_register_cache): Adjust.
10826 (registers_to_string): Change prototype to take a regcache. Adjust.
10827 (registers_from_string): Ditto.
10828 (register_data): Ditto.
10829 (supply_register): Ditto.
10830 (supply_register_by_name): Ditto.
10831 (collect_register): Ditto.
10832 (collect_register_as_string): Ditto.
10833 (collect_register_by_name): Ditto.
10834 * server.c (process_serial_event): Adjust.
10835 * linux-low.h (regset_fill_func, regset_store_func): Change
10836 prototype.
10837 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10838 Change prototype.
10839 * linux-low.c (get_stop_pc): Adjust.
10840 (check_removed_breakpoint): Adjust.
10841 (linux_wait_for_event): Adjust.
10842 (linux_resume_one_lwp): Adjust.
10843 (fetch_register): Add regcache parameter. Adjust.
10844 (usr_store_inferior_registers): Ditto.
10845 (regsets_fetch_inferior_registers): Ditto.
10846 (regsets_store_inferior_registers): Ditto.
10847 (linux_fetch_registers, linux_store_registers): Ditto.
10848 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10849 regcache. Adjust.
43aaf8b6
PA
10850 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10851 Ditto.
442ea881
PA
10852 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10853 prototype to take a regcache.
10854 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10855 * remote-utils.c (convert_ascii_to_int, outreg)
10856 (prepare_resume_reply): Change prototype to take a regcache.
10857 Adjust.
10858 * target.h (struct target_ops) <fetch_registers, store_registers>:
10859 Change prototype to take a regcache.
10860 (fetch_inferior_registers, store_inferior_registers): Change
10861 prototype to take a regcache. Adjust.
10862 * proc-service.c (ps_lgetregs): Adjust.
10863 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10864 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10865 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10866 take a regcache. Adjust.
10867 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10868 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10869 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10870 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10871 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10872 (cris_cannot_fetch_register):
10873 (cris_breakpoint_at): Change prototype to take a regcache.
10874 Adjust.
10875 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10876 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10877 to take a regcache. Adjust.
10878 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10879 Adjust.
10880 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10881 take a regcache. Adjust.
10882 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10883 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10884 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10885 * linux-mips-low.c (mips_get_pc):
10886 (mips_set_pc): Change prototype to take a regcache. Adjust.
10887 (mips_reinsert_addr): Adjust.
10888 (mips_collect_register): Change prototype to take a regcache.
10889 Adjust.
10890 (mips_supply_register):
10891 (mips_collect_register_32bit, mips_supply_register_32bit)
10892 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10893 (mips_store_fpregset): Ditto.
43aaf8b6
PA
10894 * linux-ppc-low.c (ppc_supply_ptrace_register)
10895 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
10896 (parse_spufs_run): Adjust.
10897 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10898 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10899 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10900 take a regcache. Adjust.
10901 * linux-s390-low.c (s390_collect_ptrace_register)
10902 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10903 (s390_set_pc): Change prototype to take a regcache. Adjust.
10904 (s390_arch_setup): Adjust.
10905 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10906 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10907 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10908 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10909 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10910 regcache. Adjust.
10911 (sparc_breakpoint_at): Adjust.
10912 * linux-xtensa-low.c (xtensa_fill_gregset):
10913 (xtensa_store_gregset):
10914 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10915 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10916 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10917 prototype to take a regcache. Adjust.
10918 * win32-arm-low.c (arm_fetch_inferior_register)
10919 (arm_store_inferior_register): Change prototype to take a
10920 regcache. Adjust.
10921 * win32-i386-low.c (i386_fetch_inferior_register)
10922 (i386_store_inferior_register): Change prototype to take a
10923 regcache. Adjust.
10924 * win32-low.c (child_fetch_inferior_registers)
10925 (child_store_inferior_registers): Change prototype to take a
10926 regcache. Adjust.
10927 (win32_wait): Adjust.
10928 (win32_fetch_inferior_registers): Change prototype to take a
10929 regcache. Adjust.
10930 (win32_store_inferior_registers): Adjust.
10931 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10932 store_inferior_register>: Change prototype to take a regcache.
10933
60c3d7b0
DE
109342010-01-20 Doug Evans <dje@google.com>
10935
10936 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10937 #ifdef.
10938 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 10939 (W_STOPCODE): Provide definition if missing.
60c3d7b0 10940
dc146f7c
VP
109412010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10942
10943 * linux-low.c (linux_core_of_thread): New.
10944 (compare_ints, show_process, list_threads): New.
10945 (linux_qxfer_osdata): Report threads and cores.
10946 (linux_target_op): Register linux_core_of_thread.
10947 * remote-utils.c (prepare_resume_reply): Report the core.
10948 (buffer_xml_printf): Support %d specifier.
10949 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10950 New.
10951 (handle_query): Handle qXfer:threads. Announce availability
10952 thereof.
10953 * target.h (struct target_ops): New field core_of_thread.
10954
7803799a
UW
109552010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10956
10957 * Makefile.in (clean): Remove new generated files.
10958 (reg-s390.o, reg-s390.c): Remove rules.
10959 (reg-s390x.o, reg-s390x.c): Likewise.
10960 (s390-linux32.o, s390-linux32.c): Add rules.
10961 (s390-linux64.o, s390-linux64.c): Likewise.
10962 (s390x-linux64.o, s390x-linux64.c): Likewise.
10963 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10964 * linux-s390-low.c: Include <elf.h>.
10965 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10966 (init_registers_s390): Remove prototype.
10967 (init_registers_s390x): Likewise.
10968 (init_registers_s390_linux32): Add prototype.
10969 (init_registers_s390_linux64): Likewise.
10970 (init_registers_s390x_linux64): Likewise.
10971 (s390_num_regs_3264): New define.
10972 (s390_regmap_3264): New global variable.
10973 (s390_cannot_fetch_register): Remove obsolete check.
10974 (s390_cannot_store_register): Likewise.
10975 (s390_collect_ptrace_register): Handle upper/lower register halves.
10976 (s390_supply_ptrace_register): Likewise.
10977 (s390_fill_gregset): Update to register number changes.
10978 (s390_get_hwcap): New routine.
10979 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10980 Install appropriate regmap and register set.
10981
6e7ffa39
JB
109822010-01-01 Joel Brobecker <brobecker@adacore.com>
10983
10984 * server.c (gdbserver_version): Update copyright year to 2010.
10985 * gdbreplay.c (gdbreplay_version): Likewise.
10986
957f3f49
DE
109872009-12-28 Doug Evans <dje@google.com>
10988
10989 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10990 elf/external.h. Include <elf.h> instead but only if necessary.
10991
ca5c370d
PA
109922009-12-28 Pedro Alves <pedro@codesourcery.com>
10993
10994 * linux-low.c (linux_remove_process): Remove `detaching'
10995 parameter. Don't release/detach from thread_db here.
10996 (linux_kill): Release/detach from thread_db here, ...
10997 (linux_detach): ... and here, before actually detaching.
10998 (linux_wait_1): ... and here, when a process exits.
10999 * thread-db.c (any_thread_of): New.
11000 (thread_db_free): Switch the current inferior to a thread of the
11001 passed in process.
11002
4ee62156
DE
110032009-12-21 Doug Evans <dje@google.com>
11004
d90e6a88
DE
11005 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11006
c5f62d5f
DE
11007 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11008 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11009 warning ifndef __NR_tkill. Move setting of errno there too.
11010 Delete unnecessary resetting of errno after syscall.
11011 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11012
10e86dd7
DE
11013 * configure.ac: Check for dladdr.
11014 * config.in: Regenerate.
11015 * configure: Regenerate.
11016 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11017 (try_thread_db_load): Update.
11018
4ee62156
DE
11019 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11020
00f515da
DE
110212009-12-18 Doug Evans <dje@google.com>
11022
e9464885
DE
11023 * event-loop.c: Include unistd.h if it exists.
11024
07d4f67e
DE
11025 * linux-low.c (my_waitpid): Move definition away from being in
11026 between linux_tracefork_child/linux_test_for_tracefork.
11027
00f515da
DE
11028 * gdb_proc_service.h (psaddr_t): Fix type.
11029 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11030 signature to match glibc.
11031
1de1badb
DE
110322009-12-16 Doug Evans <dje@google.com>
11033
11034 * linux-low.c (linux_read_memory): Fix argument to read.
11035
aeeb81d1
PA
110362009-11-26 Pedro Alves <pedro@codesourcery.com>
11037
11038 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11039 events, don't leave current_inferior pointing at null.
11040
10357975
PA
110412009-11-26 Pedro Alves <pedro@codesourcery.com>
11042
11043 * win32-low.c (LOG): Delete.
11044 (OUTMSG): Output to stderr.
11045 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11046 on compile time LOG macro.
11047 (win32_wait): Fix debug output.
11048
cf6e3471
PA
110492009-11-26 Pedro Alves <pedro@codesourcery.com>
11050
11051 * win32-low.c (win32_add_one_solib): If the dll name is
11052 "ntdll.dll", prepend the system directory to the dll path.
11053
0c85e18e
MK
110542009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11055
11056 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11057
9ac544ce 110582009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11059 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11060
11061 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11062 * configure.ac: Check for __mcoldfire__ and set
11063 gdb_cv_m68k_is_coldfire.
11064 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11065 reg-cf.o and reg-m68k.o.
11066 * configure: Regenerated.
11067
fd7dd3e6
PA
110682009-11-16 Pedro Alves <pedro@codesourcery.com>
11069
11070 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11071 Pass it to thread_db_free.
11072 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11073 proper `detaching' argument to linux_remove_process.
11074 * linux-low.h (thread_db_free): Add `detaching' parameter.
11075 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11076 to thread_db_free.
11077 (thread_db_free): Add `detaching' parameter. Only
11078 call td_ta_clear_event if detaching from process.
11079
75aa492e
MK
110802009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11081
11082 * thread-db.c (thread_db_free): Fix typo.
11083
21e1bee4
PP
110842009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11085
11086 PR gdb/10838
11087 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11088
8838b45e
NS
110892009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11090
11091 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11092 with an i686 compiler.
11093 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11094 needed.
11095 * configure: Rebuilt.
11096
8a35fb51
SL
110972009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11098
11099 PR gdb/10783
11100
11101 * server.c (handle_search_memory_1): Correct read_addr initialization
11102 in loop for searching subsequent chunks.
11103
96f15937
PP
111042009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11105
11106 * configure.ac: New --with-libthread-db option.
11107 * thread-db.c: Allow direct dependence on libthread_db.
11108 (thread_db_free): Adjust.
11109 * config.in: Regenerate.
11110 * configure: Likewise.
889bf7c5 11111
5f7d1694
PP
111122009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11113
11114 PR gdb/10757
11115 * thread-db.c (attach_thread): New function.
11116 (maybe_attach_thread): Return success/failure.
11117 (find_new_threads_callback): Adjust.
889bf7c5
PA
11118 (thread_db_find_new_threads): Loop until no new threads.
11119
88e3b899
PA
111202009-10-13 Pedro Alves <pedro@codesourcery.com>
11121
11122 * proc-service.c (ps_lgetregs): Formatting.
11123
cdbfd419
PP
111242009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11125
11126 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11127 * configure.ac: Adjust.
11128 * linux-low.h (struct process_info_private): Move members to struct
11129 thread_db.
11130 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11131 * linux-low.c (linux_remove_process): Adjust.
11132 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11133 * server.c (handle_query): Move code ...
11134 (handle_monitor_command): ... here. New function.
11135 * target.h (struct target_ops): New member.
11136 * thread-db.c (struct thread_db): New.
11137 (libthread_db_search_path): New variable.
11138 (thread_db_create_event, thread_db_enable_reporting)
11139 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11140 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11141 (try_thread_db_load_1, dladdr_to_soname): New functions.
11142 (try_thread_db_load, thread_db_load_search): New functions.
11143 (thread_db_init): Search for libthread_db.
11144 (thread_db_free): New function.
11145 (thread_db_handle_monitor_command): Likewise.
11146 * config.in: Regenerate.
11147 * configure: Regenerate.
889bf7c5 11148
4168d2d6
UW
111492009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11150
11151 * spu-low.c (spu_kill): Wait for inferior to terminate.
11152 Call clear_inferiors.
11153 (spu_detach): Call clear_inferiors.
11154
81ecdfbb
RW
111552009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11156
11157 * aclocal.m4: Regenerate.
11158 * config.in: Likewise.
11159 * configure: Likewise.
11160
0b9ff2c0
UW
111612009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11162
11163 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11164 (parse_spufs_run): New function.
11165 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11166 (ppc_breakpoint_at): Handle SPU breakpoints.
11167
efcbbd14
UW
111682009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11169
11170 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11171 (SPUFS_MAGIC): Define.
11172 (spu_enumerate_spu_ids): New function.
11173 (linux_qxfer_spu): New function.
11174 (linux_target_ops): Install linux_qxfer_spu.
11175
f4d9bade
UW
111762009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11177
11178 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11179 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11180 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11181 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11182 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11183 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11184 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11185 (init_registers_powerpc_cell32l): Add prototype.
11186 (init_registers_powerpc_cell64l): Likewise.
11187 (ppc_arch_setup): Detect Cell/B.E. architecture.
11188
96e946ca
RW
111892009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11190
11191 * Makefile.in (datarootdir): New variable.
11192
58d6951d
DJ
111932009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11194
11195 * linux-low.c (linux_write_memory): Update debugging output.
11196 * Makefile.in (clean): Add new descriptions.
11197 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11198 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11199 * configure.srv: Add new files for arm*-*-linux*.
11200 * linux-arm-low.c: Add new declarations.
11201 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11202 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11203 (HWCAP_VFPv3D16): New.
11204 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11205 instead of __IWMMXT__.
11206 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11207 (arm_arch_setup): New.
11208 (target_regsets): Remove #ifdef. Add VFP regset.
11209 (the_low_target): Use arm_arch_setup.
11210
12b42a12
DJ
112112009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11212
11213 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11214 the main thread again.
11215
ac8c974e
AR
112162009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11217
11218 Adding Neutrino gdbserver.
11219 * configure: Regenerated.
11220 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11221 * configure.srv (i[34567]86-*-nto*): New target.
11222 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11223 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11224 (nto_comctrl) [__QNX__]: New function.
11225 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11226
4424e0c3 112272009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
11228
11229 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11230 srv_tgtobj.
11231
912cf4ba
PA
112322009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11233 Pedro Alves <pedro@codesourcery.com>
11234
11235 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11236 don't support CONTEXT_EXTENDED_REGISTERS.
11237 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11238 (the_low_target): Install them.
11239 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11240 failing with ERROR_PIPE_NOT_CONNECTED.
11241
aa5ca48f
DE
112422009-06-30 Doug Evans <dje@google.com>
11243 Pierre Muller <muller@ics.u-strasbg.fr>
11244
11245 Add h/w watchpoint support to x86-linux, win32-i386.
11246 * Makefile.in (SFILES): Add i386-low.c
11247 (i386_low_h): Define.
11248 (i386-low.o): Add dependencies.
11249 (linux-x86-low.o): Add i386-low.h dependency.
11250 (win32-i386-low.o): Ditto.
11251 * i386-low.c: New file.
11252 * i386-low.h: New file.
11253 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11254 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11255 * linux-low.c (linux_add_process): Initialize arch_private.
11256 (linux_remove_process): Free arch_private.
11257 (add_lwp): Initialize arch_private.
11258 (delete_lwp): Free arch_private.
11259 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11260 provided.
11261 * linux-low.h (process_info_private): New member arch_private.
11262 (lwp_info): New member arch_private.
11263 (linux_target_ops): New members new_process, new_thread,
11264 prepare_to_resume.
11265 (ptid_of): New macro.
11266 * linux-x86-low.c: Include stddef.h, i386-low.h.
11267 (arch_process_info): New struct.
11268 (arch_lwp_info): New struct.
11269 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11270 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11271 (i386_dr_low_get_status): New function.
11272 (x86_insert_point, x86_remove_point): New functions.
11273 (x86_stopped_by_watchpoint): New function.
11274 (x86_stopped_data_address): New function.
11275 (x86_linux_new_process, x86_linux_new_thread): New functions.
11276 (x86_linux_prepare_to_resume): New function.
11277 (the_low_target): Add entries for insert_point, remove_point,
11278 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11279 prepare_to_resume.
11280 * server.c (debug_hw_points): New global.
11281 (monitor_show_help): Document set debug-hw-points.
11282 (handle_query): Process "set debug-hw-points".
11283 * server.h (debug_hw_points): Declare.
11284 (paddress): Declare.
11285 * utils.c (NUMCELLS, CELLSIZE): New macros.
11286 (get_sell, xsnprintf, paddress): New functions.
11287 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11288 remove_point, stopped_by_watchpoint, stopped_data_address.
11289 * win32-i386-low.c: Include i386-low.h.
11290 (debug_reg_state): Replaces dr.
11291 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11292 (i386_dr_low_get_status): New function.
11293 (i386_insert_point, i386_remove_point): New functions.
11294 (i386_stopped_by_watchpoint): New function.
11295 (i386_stopped_data_address): New function.
11296 (i386_initial_stuff): Update.
11297 (get_thread_context,set_thread_context,i386_thread_added): Update.
11298 (the_low_target): Add entries for insert_point,
11299 remove_point, stopped_by_watchpoint, stopped_data_address.
11300 * win32-low.c (win32_insert_watchpoint): New function.
11301 (win32_remove_watchpoint): New function.
11302 (win32_stopped_by_watchpoint): New function.
11303 (win32_stopped_data_address): New function.
11304 (win32_target_ops): Add entries for insert_watchpoint,
11305 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11306 * win32-low.h (win32_target_ops): New members insert_point,
11307 remove_point, stopped_by_watchpoint, stopped_data_address.
11308
d993e290
PA
113092009-06-25 Pedro Alves <pedro@codesourcery.com>
11310
11311 * server.c (process_serial_event): Re-return unsupported, not
11312 error, if the type isn't recognized. Re-allow supporting only
11313 insert or remove packets. Also call require_running for
11314 breakpoints. Add missing break statement to default case. Tidy.
11315 * target.h (struct target_ops): Rename insert_watchpoint to
11316 insert_point, and remove_watchpoint to remove_point.
11317
11318 * linux-low.h (struct linux_target_ops): Likewise.
11319 * linux-low.c (linux_insert_watchpoint): Rename to ...
11320 (linux_insert_point): ... this. Adjust.
11321 (linux_remove_watchpoint): Rename to ...
11322 (linux_remove_point): ... this. Adjust.
11323 (linux_target_ops): Adjust.
11324 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11325 (cris_insert_point): ... this.
11326 (cris_remove_watchpoint): Rename to ...
11327 (cris_remove_point): ... this.
11328 (the_low_target): Adjust.
11329
0f54c268
PM
113302009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11331
11332 * server.c (handle_v_kill): Pass signal_pid to
11333 kill_inferior if multi_process is zero.
11334
c6314022
AR
113352009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11336
11337 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11338 * target.h (target_ops): Comment for *_watchpoint to make it clear
11339 the functions can get types '0' and '1'.
11340
4463ce24
AR
113412009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11342
11343 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11344 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11345 * regcache.c (get_regcache): Likewise.
11346 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11347 * win32-low.c (child_fetch_inferior_registers): Remove check for
11348 regno 0.
11349
cf8fd78b
PA
113502009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11351 Pedro Alves <pedro@codesourcery.com>
11352
11353 * target.h (struct target_ops) <supports_multi_process>: New
11354 callback.
11355 (target_supports_multi_process): New.
11356 * server.c (handle_query): Even if GDB reports support, only
11357 enable multi-process if the target also supports it. Report
11358 multi-process support only if the target backend supports it.
11359 * linux-low.c (linux_supports_multi_process): New function.
11360 (linux_target_ops): Install it as target_supports_multi_process
11361 callback.
11362
47c0c975
DE
113632009-05-24 Doug Evans <dje@google.com>
11364
e09875d4
DE
11365 Global renaming of find_thread_pid to find_thread_ptid.
11366 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11367 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11368 All callers updated.
11369
e27d73f6
DE
11370 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11371 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11372 directly.
11373
47c0c975
DE
11374 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11375 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11376 (linux_resume_one_lwp): Ditto.
11377
2acc282a
DE
113782009-05-23 Doug Evans <dje@google.com>
11379
11380 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11381 from struct inferior_list_entry * to struct lwp_info *.
11382 All callers updated.
11383
9f1036c1
DE
113842009-05-13 Doug Evans <dje@google.com>
11385
11386 * linux-x86-low.c: Don't include assert.h.
11387 (x86_siginfo_fixup): Use fatal, not assert.
11388 (x86_arch_setup): Fix comment.
11389
d0722149
DE
113902009-05-12 Doug Evans <dje@google.com>
11391
11392 Biarch support for i386/amd64 gdbserver.
11393 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11394 Add linux-x86-low.c.
11395 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11396 (linux-x86-low.o): Add.
11397 * linux-x86-64-low.c: Delete.
11398 * linux-i386-low.c: Delete.
11399 * linux-x86-low.c: New file.
11400 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11401 linux-x86-low.o.
11402 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11403 linux-x86-low.o.
11404 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11405 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11406 (linux_child_pid_to_exec_file): New function.
11407 (elf_64_header_p, elf_64_file_p): New functions.
11408 (siginfo_fixup): New function.
11409 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11410 give target a chance to convert layout.
11411 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11412 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11413
fdeb2a12
DE
114142009-05-07 Doug Evans <dje@google.com>
11415
11416 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11417 (regsets_store_inferior_registers): Ditto.
11418
a6dbe5df
PA
114192009-05-06 Pedro Alves <pedro@codesourcery.com>
11420
11421 PR server/10048
11422
11423 * linux-low.c (must_set_ptrace_flags): Delete.
11424 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11425 of the global.
11426 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11427 `lwp->must_set_ptrace_flags' instead.
ba42693b 11428 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
11429 (linux_wait_1): ... not here.
11430
5091eb23
DE
114312009-04-30 Doug Evans <dje@google.com>
11432
9f767825
DE
11433 * inferiors.c (started_inferior_callback): New function.
11434 (attached_inferior_callback): New function.
11435 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11436 * server.c (print_started_pid, print_attached_pid): New functions.
11437 (detach_or_kill_for_exit): New function.
11438 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11439 * server.h (have_started_inferiors_p): Declare.
11440 (have_attached_inferiors_p): Declare.
11441
5091eb23
DE
11442 * inferiors.c (remove_process): Fix memory leak, free process.
11443 * linux-low.c (linux_remove_process): New function.
11444 (linux_kill): Call it instead of remove_process.
11445 (linux_detach, linux_wait_1): Ditto.
11446
155c8968
PA
114472009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11448
11449 * configure.srv: Add x86 Windows CE target.
11450
7fe519cb
UW
114512009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11452
11453 * inferiors.c (get_thread_process): Make global.
11454 * server.h (get_thread_process): Add prototype.
11455 * thread-db.c (find_one_thread): Use get_thread_process
11456 instead of current_process.
11457 (thread_db_get_tls_address): Do not crash if called when
11458 thread layer is not yet initialized.
11459
5472f405
UW
114602009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11461
11462 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11463 * spu-low.c (current_tid): Rename to ...
11464 (current_ptid): ... this.
11465 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11466 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11467 ptid_get_lwp (current_ptid) instead of current_tid.
11468 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11469 instead of current_tid. Use find_process_pid to verify pid
11470 argument is valid. Pass proper argument to remove_process.
11471 (spu_thread_alive): Compare current_ptid instead of current_tid.
11472 (spu_resume): Likewise.
11473
55ac2b99
PA
114742009-04-02 Pedro Alves <pedro@codesourcery.com>
11475
11476 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11477 variable.
11478
95954743
PA
114792009-04-01 Pedro Alves <pedro@codesourcery.com>
11480
11481 Implement the multiprocess extensions, and add linux multiprocess
11482 support.
11483
11484 * server.h (ULONGEST): Declare.
11485 (struct ptid, ptid_t): New.
11486 (minus_one_ptid, null_ptid): Declare.
11487 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11488 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11489 (struct inferior_list_entry): Change `id' type from unsigned from
11490 to ptid_t.
11491 (struct sym_cache, struct breakpoint, struct
11492 process_info_private): Forward declare.
11493 (struct process_info): Declare.
11494 (current_process): Declare.
11495 (all_processes): Declare.
11496 (initialize_inferiors): Declare.
11497 (add_thread): Adjust to use ptid_t.
11498 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11499 (add_process, remove_process, find_thread_pid): Declare.
11500 (find_inferior_id): Adjust to use ptid_t.
11501 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11502 (multi_process): Declare.
11503 (push_event): Adjust to use ptid_t.
11504 (read_ptid, write_ptid): Declare.
11505 (prepare_resume_reply): Adjust to use ptid_t.
11506 (clear_symbol_cache): Declare.
11507 * inferiors.c (all_processes): New.
11508 (null_ptid, minus_one_ptid): New.
11509 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11510 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11511 (add_thread): Change unsigned long to ptid. Remove gdb_id
11512 parameter. Adjust.
11513 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11514 (gdb_id_to_thread): Rename to ...
11515 (find_thread_pid): ... this. Change unsigned long to ptid.
11516 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11517 (loaded_dll, pull_pid_from_list): Adjust.
11518 (add_process, remove_process, find_process_pid)
11519 (get_thread_process, current_process, initialize_inferiors): New.
11520 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11521 (struct target_waitstatus) <related_pid>: Ditto.
11522 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11523 return type to int.
11524 (struct target_ops) <join>: Add `pid' argument.
11525 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11526 (struct target_ops) <wait>: Add `ptid' field. Change return type
11527 to ptid.
11528 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11529 (mywait): Add `ptid' argument. Change return type to ptid_t.
11530 (target_pid_to_str): Declare.
11531 * target.c (set_desired_inferior): Adjust to use ptids.
11532 (mywait): Add new `ptid' argument. Adjust.
11533 (target_pid_to_str): New.
11534 * mem-break.h (free_all_breakpoints): Declare.
11535 * mem-break.c (breakpoints): Delelete.
11536 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11537 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11538 to use per-process breakpoint list.
11539 (free_all_breakpoints): New.
11540 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11541 (symbol_cache, all_symbols_looked_up): Delete.
11542 (hexchars): New.
11543 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11544 read_ptid): New.
11545 (prepare_resume_reply): Change ptid argument's type from unsigned
11546 long to ptid_t. Adjust. Implement W;process and X;process.
11547 (free_sym_cache, clear_symbol_cache): New.
11548 (look_up_one_symbol): Adjust to per-process symbol cache. *
11549 * server.c (cont_thread, general_thread, step_thread): Change type
11550 to ptid_t.
11551 (attached): Delete.
11552 (multi_process): New.
11553 (last_ptid): Change type to ptid_t.
11554 (struct vstop_notif) <ptid>: Change type to ptid_t.
11555 (queue_stop_reply, push_event): Change `ptid' argument's type to
11556 ptid_t.
11557 (discard_queued_stop_replies): Add `pid' argument.
11558 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11559 changes. Don't reference the `attached' global.
11560 (attach_inferior): Adjust to mywait interface changes.
11561 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11562 features. Handle and report "multiprocess+". Handle
11563 "qAttached:PID".
11564 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11565 changes.
11566 (handle_v_kill): New.
11567 (handle_v_stopped): Adjust to use target_pid_to_str.
11568 (handle_v_requests): Allow multiple attaches and runs when
11569 multiprocess extensions are in effect. Handle "vKill".
11570 (myresume): Adjust to use ptids.
11571 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11572 (handle_status): Adjust to discard_queued_stop_replies interface
11573 change.
11574 (first_thread_of, kill_inferior_callback)
11575 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11576 (main): Call initialize_inferiors. Adjust to use ptids, killing
11577 and detaching from all inferiors. Handle multiprocess packet
11578 variants.
11579 * linux-low.h: Include gdb_proc_service.h.
11580 (struct process_info_private): New.
11581 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11582 <lwpid_of>: Use ptid_get_lwp.
11583 (get_lwp_thread): Adjust.
11584 (struct lwp_info): Add `dead' member.
11585 (find_lwp_pid): Declare.
11586 * linux-low.c (thread_db_active): Delete.
11587 (new_inferior): Adjust comment.
11588 (inferior_pid): Delete.
11589 (linux_add_process): New.
11590 (handle_extended_wait): Adjust.
11591 (add_lwp): Change unsigned long to ptid.
11592 (linux_create_inferior): Add process to processes table. Adjust
11593 to use ptids. Don't set new_inferior here.
11594 (linux_attach_lwp): Rename to ...
11595 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11596 it. Adjust to use ptids.
11597 (linux_attach_lwp): New.
11598 (linux_attach): Add process to processes table. Don't set
11599 new_inferior here.
11600 (struct counter): New.
11601 (second_thread_of_pid_p, last_thread_of_process_p): New.
11602 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11603 multiple processes.
11604 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11605 processes. Remove process from process table.
11606 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11607 to multiple processes.
11608 (any_thread_of): New.
11609 (linux_detach): Add `pid' argument, and handle it. Remove process
11610 from processes table.
11611 (linux_join): Add `pid' argument. Handle it.
11612 (linux_thread_alive): Change unsighed long argument to ptid_t.
11613 Consider dead lwps as not being alive.
11614 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11615 threads we're not interested in.
11616 (same_lwp, find_lwp_pid): New.
11617 (linux_wait_for_lwp): Change `pid' argument's type from int to
11618 ptid_t. Adjust.
11619 (linux_wait_for_event): Rename to ...
11620 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11621 from int to ptid_t. Adjust.
11622 (linux_wait_for_event): New.
11623 (linux_wait_1): Add `ptid' argument. Change return type to
11624 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11625 that exit from the process table.
11626 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11627 Adjust.
11628 (mark_lwp_dead): New.
11629 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11630 stopping all threads, mark its main lwp as dead.
11631 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11632 ptids.
11633 (fetch_register, usr_store_inferior_registers)
11634 (regsets_fetch_inferior_registers)
11635 (regsets_store_inferior_registers, linux_read_memory)
11636 (linux_write_memory): Inline `inferior_pid'.
11637 (linux_look_up_symbols): Adjust to use per-process
11638 `thread_db_active'.
11639 (linux_request_interrupt): Adjust to use ptids.
11640 (linux_read_auxv): Inline `inferior_pid'.
11641 (initialize_low): Don't reference thread_db_active.
11642 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11643 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11644 (ps_getpid): Return the pid of the current inferior.
11645 * thread-db.c (proc_handle, thread_agent): Delete.
11646 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11647 per-process data.
11648 (find_one_thread): Change argument type to ptid_t. Adjust to
11649 per-process data.
11650 (maybe_attach_thread): Adjust to per-process data and ptids.
11651 (thread_db_find_new_threads): Ditto.
11652 (thread_db_init): Ditto.
11653 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11654 processes table. Adjust to use ptids.
11655 (spu_kill, spu_detach): Adjust interface. Remove process from
11656 processes table.
11657 (spu_join, spu_thread_alive): Adjust interface.
11658 (spu_wait): Adjust interface. Remove process from processes
11659 table. Adjust to use ptids.
11660 * win32-low.c (current_inferior_tid): Delete.
11661 (current_inferior_ptid): New.
11662 (debug_event_ptid): New.
11663 (thread_rec): Take a ptid. Adjust.
11664 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11665 (child_delete_thread): Ditto.
11666 (do_initial_child_stuff): Add `attached' argument. Add process to
11667 processes table.
11668 (child_fetch_inferior_registers, child_store_inferior_registers):
11669 Adjust.
11670 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11671 (win32_attach): Pass 1 to do_initial_child_stuff.
11672 (win32_kill): Adjust interface. Remove process from processes
11673 table.
11674 (win32_detach): Ditto.
11675 (win32_join): Adjust interface.
11676 (win32_thread_alive): Take a ptid.
11677 (win32_resume): Adjust to use ptids.
11678 (get_child_debug_event): Ditto.
11679 (win32_wait): Adjust interface. Remove exiting process from
11680 processes table.
11681
bd99dc85
PA
116822009-04-01 Pedro Alves <pedro@codesourcery.com>
11683
11684 Non-stop mode support.
11685
11686 * server.h (non_stop): Declare.
11687 (gdb_client_data, handler_func): Declare.
11688 (delete_file_handler, add_file_handler, start_event_loop):
11689 Declare.
11690 (handle_serial_event, handle_target_event, push_event)
11691 (putpkt_notif): Declare.
11692 * target.h (enum resume_kind): New.
11693 (struct thread_resume): Replace `step' field by `kind' field.
11694 (TARGET_WNOHANG): Define.
11695 (struct target_ops) <wait>: Add `options' argument.
11696 <supports_non_stop, async, start_non_stop>: New fields.
11697 (target_supports_non_stop, target_async): New.
11698 (start_non_stop): Declare.
11699 (mywait): Add `options' argument.
11700 * target.c (mywait): Add `options' argument. Print child exit
11701 notifications here.
11702 (start_non_stop): New.
11703 * server.c (non_stop, own_buf, mem_buf): New globals.
11704 (struct vstop_notif): New.
11705 (notif_queue): New global.
11706 (queue_stop_reply, push_event, discard_queued_stop_replies)
11707 (send_next_stop_reply): New.
11708 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11709 interface changes.
11710 (attach_inferior): In non-stop mode, don't wait for the target
11711 here.
11712 (handle_general_set): Handle QNonStop.
11713 (handle_query): When handling qC, return the current general
11714 thread, instead of the first thread of the list.
11715 (handle_query): If the backend supports non-stop mode, include
11716 QNonStop+ in the qSupported query response.
11717 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11718 and non-stop mode.
11719 (handle_v_attach, handle_v_run): Handle non-stop mode.
11720 (handle_v_stopped): New.
11721 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11722 (myresume): Adjust to use resume_kind. Handle non-stop.
11723 (queue_stop_reply_callback): New.
11724 (handle_status): Handle non-stop mode.
11725 (main): Clear non_stop flag on reconnection. Use the event-loop.
11726 Refactor serial protocol handling from here ...
11727 (process_serial_event): ... to this new function. When GDB
11728 selects any thread, select one here. In non-stop mode, wait until
11729 GDB acks all pending events before exiting.
11730 (handle_serial_event, handle_target_event): New.
11731 * remote-utils.c (remote_open): Install remote_desc in the event
11732 loop.
11733 (remote_close): Remove remote_desc from the event loop.
11734 (putpkt_binary): Rename to...
11735 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11736 (putpkt_binary): New as wrapper around putpkt_binary_1.
11737 (putpkt_notif): New.
11738 (prepare_resume_reply): In non-stop mode, don't change the
11739 general_thread.
11740 * event-loop.c: New.
11741 * Makefile.in (OBJ): Add event-loop.o.
11742 (event-loop.o): New rule.
11743
11744 * linux-low.h (pid_of): Moved here.
11745 (lwpid_of): New.
11746 (get_lwp_thread): Use lwpid_of.
11747 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11748 * linux-low.c (pid_of): Delete.
11749 (inferior_pid): Use lwpid_of.
11750 (linux_event_pipe): New.
11751 (target_is_async_p): New.
11752 (delete_lwp): New.
11753 (handle_extended_wait): Use lwpid_of.
11754 (add_lwp): Don't set lwpid field.
11755 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11756 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11757 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11758 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11759 first. Adjust to linux_wait_for_event interface changes. Use
11760 lwpid_of.
11761 (linux_detach): Don't delete the main lwp here.
11762 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11763 (status_pending_p): Don't consider explicitly suspended lwps.
11764 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11765 pointer. Add OPTIONS argument. Change return type to int. Use
11766 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11767 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11768 pointer. Add status pointer argument. Return a pid instead of a
11769 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11770 changes. In non-stop mode, don't switch to a random thread.
11771 (linux_wait): Rename to...
11772 (linux_wait_1): ... this. Add target_options argument, and handle
11773 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11774 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11775 clean exit and signal exit code. Don't stop all threads in
11776 non-stop mode. In all-stop mode, only stop all threads when
11777 reporting a stop to GDB. Handle explicit thread stop requests.
11778 (async_file_flush, async_file_mark): New.
11779 (linux_wait): New.
11780 (send_sigstop): Use lwpid_of.
11781 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11782 interface changes. In non-stop mode, don't switch to a random
11783 thread.
11784 (linux_resume_one_lwp): Use lwpid_of.
11785 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11786 (linux_resume_one_thread): ... this. Handle resume_stop. In
11787 non-stop mode, don't look for pending flag in all threads.
11788 (resume_status_pending_p): Don't consider explicitly suspended
11789 threads.
11790 (my_waitpid): Reimplement. Emulate __WALL.
11791 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11792 Use lwpid_of.
11793 (sigchld_handler, linux_supports_non_stop, linux_async)
11794 (linux_start_non_stop): New.
11795 (linux_target_ops): Register linux_supports_non_stop, linux_async
11796 and linux_start_non_stop.
11797 (initialize_low): Install SIGCHLD handler.
11798 * thread-db.c (thread_db_create_event, find_one_thread)
11799 (thread_db_get_tls_address): Use lwpid_of.
11800 * win32-low.c (win32_detach): Adjust to use resume_kind.
11801 (win32_wait): Add `options' argument.
11802 * spu-low.c (spu_resume): Adjust to use resume_kind.
11803 (spu_wait): Add `options' argument.
11804
5b1c542e
PA
118052009-04-01 Pedro Alves <pedro@codesourcery.com>
11806
11807 Decouple target code from remote protocol.
11808
11809 * target.h (enum target_waitkind): New.
11810 (struct target_waitstatus): New.
11811 (struct target_ops) <wait>: Return an unsigned long. Take a
11812 target_waitstatus pointer instead of a char pointer.
11813 (mywait): Likewise.
11814 * target.c (mywait): Change prototype to return an unsigned long.
11815 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11816 * server.h (thread_from_wait, old_thread_from_wait): Delete
11817 declarations.
11818 (prepare_resume_reply): Change prototype to take a
11819 target_waitstatus.
11820 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11821 (last_status, last_ptid): New.
11822 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11823 pid instead of a signal.
11824 (attach_inferior): Remove "status" and "signal" parameters.
11825 Adjust.
11826 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11827 not as an address.
11828 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11829 (handle_v_requests, myresume): Remove "status" and "signal"
11830 parameters. Adjust.
11831 (handle_status): New.
11832 (main): Delete local `status'. Adjust.
11833 * remote-utils.c: Include target.h.
11834 (prepare_resume_reply): Change prototype to take a
11835 target_waitstatus. Adjust.
11836
11837 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11838 interface.
11839 * spu-low.c (spu_wait): Adjust.
11840 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11841 Delete.
11842 (win32_wait): Adjust.
11843
2bd7c093
PA
118442009-04-01 Pedro Alves <pedro@codesourcery.com>
11845
11846 * target.h (struct thread_resume): Delete leave_stopped member.
11847 (struct target_ops): Add a `n' argument to the `resume' callback.
11848 * server.c (start_inferior): Adjust.
11849 (handle_v_cont, myresume): Adjust.
11850 * linux-low.c (check_removed_breakpoint): Adjust to resume
11851 interface change, and to removed leave_stopped field.
11852 (resume_ptr): Delete.
11853 (struct thread_resume_array): New.
11854 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11855 resume interface change.
11856 (linux_continue_one_thread, linux_queue_one_thread)
11857 (resume_status_pending_p): Check if the resume field is NULL
11858 instead of checking the leave_stopped member.
11859 (linux_resume): Adjust to the target resume interface change.
11860 * spu-low.c (spu_resume): Adjust to the target resume interface
11861 change.
11862 * win32-low.c (win32_detach, win32_resume): Ditto.
11863
c35fafde
PA
118642009-04-01 Pedro Alves <pedro@codesourcery.com>
11865
11866 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11867 flag.
11868 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11869 pending.
11870 (linux_continue_one_thread): Only preserve the stepping flag if
11871 there's a pending breakpoint.
11872
0a59d50b
PA
118732009-03-31 Pedro Alves <pedro@codesourcery.com>
11874
11875 * server.c (main): After the inferior having exited, call
11876 remote_close before exiting gdbserver.
11877
f04c6d38
TJB
118782009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11879
11880 Fix size of FPSCR in Power 7 processors.
11881 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11882 (PPC_FEATURE_HAS_DFP): New #define.
11883 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11884 size of the FPSCR.
11885
78e5cee6
PA
118862009-03-23 Pedro Alves <pedro@codesourcery.com>
11887
11888 * server.c (handle_query) Whitespace and formatting.
11889
1b3f6016
PA
118902009-03-22 Pedro Alves <pedro@codesourcery.com>
11891
11892 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11893 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11894 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11895 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11896 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11897 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11898 Makefile.in, configure.ac: Fix whitespace throughout.
11899 * configure: Regenerate.
11900
a07b2135
PA
119012009-03-22 Pedro Alves <pedro@codesourcery.com>
11902
11903 * inferiors.c (find_inferior): Make it safe for the callback
11904 function to delete the currently iterated inferior.
11905
67cc2626
PA
119062009-03-22 Pedro Alves <pedro@codesourcery.com>
11907
11908 * Makefile.in (linuw_low_h): Move higher.
11909 (thread-db.o): Depend on $(linux_low_h).
11910
54a0b537
PA
119112009-03-17 Pedro Alves <pedro@codesourcery.com>
11912
11913 Rename "process" to "lwp" throughout.
11914
11915 * linux-low.c (all_processes): Rename to...
11916 (all_lwps): ... this.
11917 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11918 (add_process): Rename to ...
11919 (add_lwp): ... this. Adjust.
11920 (linux_create_inferior): Adjust.
11921 (linux_attach_lwp): Adjust.
11922 (linux_attach): Adjust.
11923 (linux_kill_one_process): Rename to ...
11924 (linux_kill_one_lwp): ... this. Adjust.
11925 (linux_kill): Adjust.
11926 (linux_detach_one_process): Rename to ...
11927 (linux_detach_one_lwp): ... this. Adjust.
11928 (linux_detach): Adjust.
11929 (check_removed_breakpoint): Adjust.
11930 (status_pending_p): Adjust.
11931 (linux_wait_for_process): Rename to ...
11932 (linux_wait_for_lwp): ... this. Adjust.
11933 (linux_wait_for_event): Adjust.
11934 (send_sigstop): Adjust.
11935 (wait_for_sigstop): Adjust.
11936 (stop_all_processes): Rename to ...
11937 (stop_all_lwps): ... this.
11938 (linux_resume_one_process): Rename to ...
11939 (linux_resume_one_lwp): ... this. Adjust.
11940 (linux_set_resume_request, linux_continue_one_thread)
11941 (linux_queue_one_thread, resume_status_pending_p)
11942 (usr_store_inferior_registers, regsets_store_inferior_registers)
11943 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11944 Adjust.
11945 * linux-low.h (get_process): Rename to ...
11946 (get_lwp): ... this. Adjust.
11947 (get_thread_process): Rename to ...
11948 (get_thread_lwp): ... this. Adjust.
11949 (get_process_thread): Rename to ...
11950 (get_lwp_thread): ... this. Adjust.
11951 (struct process_info): Rename to ...
11952 (struct lwp_info): ... this.
11953 (all_processes): Rename to ...
11954 (all_lwps): ... this.
11955 * proc-service.c (ps_lgetregs): Adjust.
11956 * thread-db.c (thread_db_create_event, find_one_thread)
11957 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11958
0b16c5cf
PA
119592009-03-14 Pedro Alves <pedro@codesourcery.com>
11960
11961 * server.c (handle_query): Handle "qAttached".
11962
32de4b9d
NS
119632009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11964
11965 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11966 GPLv3, update license URL.
11967
2aecd87f
DE
119682009-03-01 Doug Evans <dje@google.com>
11969
93efd302 11970 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
11971 (server_h): Add gdb_signals.h.
11972 (signals.o): Update.
11973 * server.h (target_signal_from_host,target_signal_to_host_p)
11974 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11975
86b1f9c5
PM
119762009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11977
11978 * remote-utils.c (getpkt): Also generate remote-debug
11979 information if noack_mode is set.
11980
4aa995e1
PA
119812009-02-06 Pedro Alves <pedro@codesourcery.com>
11982
11983 * server.c (handle_query): Report qXfer:siginfo:read and
11984 qXfer:siginfo:write as supported and handle them.
11985 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11986 * linux-low.c (linux_xfer_siginfo): New.
11987 (linux_target_ops): Set it.
11988
62709adf
PA
119892009-01-26 Pedro Alves <pedro@codesourcery.com>
11990
11991 * server.c (gdbserver_usage): Mention --remote-debug.
11992 (main): Accept '--remote-debug' switch.
11993
aef93bd7
DE
119942009-01-18 Doug Evans <dje@google.com>
11995
11996 * regcache.c (new_register_cache): No need to check result of xcalloc.
11997 * server.c (handle_search_memory): Back out calls to xmalloc,
11998 result is checked and error is returned to user upon failure.
11999 (handle_query): Ditto. Add more checks for result of malloc.
12000 (handle_v_cont): Check result of malloc, report error back to
12001 user upon failure.
12002 (handle_v_run): Ditto. Call freeargv.
12003 * server.h (freeargv): Declare.
12004 * utils.c (freeargv): New fn.
12005
54363045
DE
120062009-01-15 Doug Evans <dje@google.com>
12007
f626972c
DE
12008 * gdbreplay.c (perror_with_name): Make arg const char *.
12009 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12010 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12011 * utils.c (perror_with_name): Make arg const char *.
54363045 12012
18aae699
PA
120132009-01-14 Pedro Alves <pedro@codesourcery.com>
12014
12015 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12016 when handling a EXIT_PROCESS_DEBUG_EVENT.
12017
ff703abe
JB
120182009-01-06 Joel Brobecker <brobecker@adacore.com>
12019
12020 * gdbreplay.c (gdbreplay_version): Update copyright year.
12021 * server.c (gdbserver_version): Likewise.
12022
f21cc1a2 120232009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12024
12025 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12026 (handle_extended_wait): Improve comment.
0e21c1ec 12027
bca929d3
DE
120282008-12-13 Doug Evans <dje@google.com>
12029
12030 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12031 * server.h (ATTR_MALLOC): New macro.
12032 (xmalloc,xcalloc,xstrdup): Declare.
12033 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12034 * inferiors.c: Ditto.
12035 * linux-low.c: Ditto.
12036 * mem-break.c: Ditto.
12037 * regcache.c: Ditto.
12038 * remote-utils.c: Ditto.
12039 * server.c: Ditto.
12040 * target.c: Ditto.
12041 * win32-low.c: Ditto.
12042
97438e3f
DE
120432008-12-12 Doug Evans <dje@google.com>
12044
896c7fbb
DE
12045 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12046 in debugging printf.
12047
97438e3f
DE
12048 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12049
e3b886f8
DE
120502008-12-09 Doug Evans <dje@google.com>
12051
12052 * linux-low.h (struct process_info): Delete member tid, unused.
12053 * thread-db.c (find_one_thread): Update.
12054 (maybe_attach_thread): Update.
12055
07e059b5
VP
120562008-12-02 Pedro Alves <pedro@codesourcery.com>
12057
889bf7c5
PA
12058 * target.h (struct target_ops): Add qxfer_osdata member.
12059 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12060 and dirent.h.
12061 (linux_qxfer_osdata): New functions.
12062 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12063 callback.
12064 * server.c (handle_query): Handle "qXfer:osdata:read:".
12065 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12066 (buffer_xml_printf): New functions.
12067 * server.h (struct buffer): New.
12068 (buffer_grow_str, buffer_grow_str0): New macros.
12069 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12070 (buffer_xml_printf): Declare.
07e059b5 12071
4cab47ab
DE
120722008-11-24 Doug Evans <dje@google.com>
12073
12074 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12075
f142445f
DJ
120762008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12077
12078 * server.c (handle_v_run): Always use the supplied argument list.
12079
d0107bb6 120802008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12081
d0107bb6
BW
12082 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12083 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12084
2c4ad781
TJB
120852008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12086
12087 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12088 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12089 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12090 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12091 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12092 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12093 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12094 XML target descriptions.
12095 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12096 when inferior is running on an ISA 2.05 or later processor. Add
12097 special case to return offset for full 64-bit slot of FPSCR when
12098 in 32-bits.
12099
dfb64f85
DJ
121002008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12101
12102 * Makefile.in (SFILES, clean): Added sparc64 files.
12103 (reg-sparc64.o, reg-sparc64.c): New.
12104 * configure.srv (sparc*-*-linux*): New configuration.
12105 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12106 syscall arguments for SPARC.
12107 (regsets_store_inferior_registers): Likewise.
12108 * linux-sparc-low.c: New file.
12109
66b6e1dd
DE
121102008-10-21 Doug Evans <dje@google.com>
12111
12112 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12113 (READLINE_DIR,READLINE_DEP): Delete.
12114 (INTERNAL_CFLAGS): Update.
12115 (LINTFLAGS): Update.
12116
9b710a42
PA
121172008-10-10 Pedro Alves <pedro@codesourcery.com>
12118
12119 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12120 whole argv from the last run, not just argv[0].
12121
5822d809
PA
121222008-09-08 Pedro Alves <pedro@codesourcery.com>
12123
12124 * regcache.c (new_register_cache): Return NULL if the register
12125 cache size isn't known yet.
12126 (free_register_cache): Avoid dereferencing a NULL regcache.
12127
74aac56f
DJ
121282008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12129
12130 * configure.srv: Merge MIPS and MIPS64.
12131
400b20f5
MR
121322008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12133
12134 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12135
677c5bb1
LM
121362008-08-18 Luis Machado <luisgpm@br.ibm.com>
12137
12138 * Makefile.in: Add required vsx dependencies.
12139
12140 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12141 Declare init_registers_powerpc_vsx32l.
12142 Declare init_registers_powerpc_vsx64l.
12143 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12144 (ppc_arch_setup): Check for VSX in hwcap.
12145 (ppc_fill_vsxregset): New function.
12146 (ppc_store_vsxregset): New function.
12147 Add new VSX entry in regset_info target_regsets.
12148
12149 * configure.srv: Add new VSX dependencies.
12150
a6f3e723
SL
121512008-08-12 Pedro Alves <pedro@codesourcery.com>
12152
12153 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12154 (remote_open): Set or clear transport_is_reliable.
12155 (putpkt_binary): Don't expect acks in noack mode.
12156 (getpkt): Don't send ack/nac in noack mode.
12157 * server.c (handle_general_set): Handle QStartNoAckMode.
12158 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12159 qSupported.
12160 (main): Reset noack_mode on every connection.
12161 * server.h (noack_mode): Declare.
12162
a417dc56
RW
121632008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12164
12165 * Makefile.in (GDBREPLAY_OBS): New variable.
12166 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12167
3221518c
UW
121682008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12169 Daniel Jacobowitz <dan@codesourcery.com>
12170
12171 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12172 (usr_store_inferior_registers): Likewise.
12173 (regsets_store_inferior_registers): Likewise.
12174
ec56be1b
PA
121752008-07-31 Rolf Jansen <rj@surtec.com>
12176 Pedro Alves <pedro@codesourcery.com>
12177
12178 * configure.ac: Check for memmem declaration.
12179 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12180 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12181 (disable_packet_qfThreadInfo): Unconditionally compile.
12182 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12183 * configure, config.in: Regenerate.
12184
2fe5e3ff
DE
121852008-07-28 Doug Kwan <dougkwan@google.com>
12186
12187 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12188 (linux_write_memory): Remove declaration of errno.
12189
836acd6d
UW
121902008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12191
12192 * linux-low.c (handle_extended_wait): Do not use "status"
12193 variable uninitialized.
12194
aeba519e
PA
121952008-07-07 Pedro Alves <pedro@codesourcery.com>
12196
12197 * server.c (handle_v_attach): Inhibit reporting dll changes.
12198
db42f210
PA
121992008-06-27 Pedro Alves <pedro@codesourcery.com>
12200
12201 * remote-utils.c (prepare_resume_reply): If requested, don't
12202 output "thread:TID" in the T stop reply.
12203
12204 * server.c (disable_packet_vCont, disable_packet_Tthread)
12205 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12206 (handle_query): If requested, disable support for qC, qfThreadInfo
12207 and qsThreadInfo.
12208 (handle_v_requests): If requested, disable support for vCont.
12209 (gdbserver_show_disableable): New.
12210 (main): Handle --disable-packet and --disable-packet=LIST.
12211
12212 * server.h (disable_packet_vCont, disable_packet_Tthread)
12213 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12214
8e4c5421
CD
122152008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12216
12217 * server.c (gdbserver_usage): Mention --version.
12218
6e23a804
DJ
122192008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12220
12221 * Makefile.in (gdbreplay.o): New rule.
12222
90aa6a40
JM
122232008-06-06 Joseph Myers <joseph@codesourcery.com>
12224
12225 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12226 message, not gdbserver.
12227
c16158bc 122282008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
12229 Nathan Sidwell <nathan@codesourcery.com>
12230 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
12231
12232 * acinclude.m4: Include ../../config/acx.m4.
12233 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12234 * configure, config.in: Regenerate.
12235 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12236 * server.c (gdbserver_version): Print PKGVERSION.
12237 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12238 (main): Adjust gdbserver_usage calls.
12239 * gdbreplay.c (version, host_name): Add declarations.
12240 (gdbreplay_version, gdbreplay_usage): New.
12241 (main): Accept --version and --help options.
12242
aeb75bf5
DJ
122432008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12244
12245 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12246 (arm_breakpoint_at): Handle Thumb.
12247 (the_low_target): Add comment.
12248
76b233dd
UW
122492008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12250
12251 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12252
08388c79
DE
122532008-05-09 Doug Evans <dje@google.com>
12254
a3c83fae
DE
12255 * server.h (decode_search_memory_packet): Declare.
12256 * remote-utils.c (decode_search_memory_packet): New fn.
12257 * server.c (handle_search_memory_1): New fn.
08388c79
DE
12258 (handle_search_memory): New fn.
12259 (handle_query): Process qSearch:memory packets.
12260
bb9c3d36
UW
122612008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12262
12263 * regcache.c (registers_length): Remove.
12264 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12265 full register packet.
12266 * regcache.h (registers_length): Remove prototype.
12267 * server.h (PBUFSIZ): Define to 16384.
12268
7284e1be
UW
122692008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12270
12271 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12272 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12273 powerpc-64l.o, and powerpc-altivec64l.o.
12274 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12275 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12276 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12277 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12278 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12279 to srv_xmlfiles.
12280
12281 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12282 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12283 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12284 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12285 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12286 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12287 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12288 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12289 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12290 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12291 (clean): Update.
12292
12293 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12294 (init_registers_powerpc_32l): ... this new prototype.
12295 (init_registers_powerpc_32): Remove, replace by ...
12296 (init_registers_powerpc_altivec32l): ... this new prototype.
12297 (init_registers_powerpc_e500): Remove, replace by ...
12298 (init_registers_powerpc_e500l): ... this new prototype.
12299 (init_registers_ppc64): Remove, replace by ...
12300 (init_registers_powerpc_64l): ... this new prototype.
12301 (init_registers_powerpc_64): Remove, replace by ...
12302 (init_registers_powerpc_altivec64l): ... this new prototype.
12303 (ppc_num_regs): Set to 73.
12304 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12305 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12306 (ppc_cannot_store_register): Handle orig_r3 and trap.
12307 (ppc_arch_setup): Update init_registers_... calls.
12308 (ppc_fill_gregset): Handle orig_r3 and trap.
12309
12310 * inferiors.c (clear_inferiors): Reset current_inferior.
12311
fdc59709
PB
123122008-04-23 Paolo Bonzini <bonzini@gnu.org>
12313
889bf7c5
PA
12314 * acinclude.m4: Add override.m4.
12315 * configure: Regenerate.
fdc59709 12316
c9b2f845
UW
123172008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12318
12319 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12320 initial call to init_register_ppc64.
12321
550512b8
UW
123222008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12323
43aaf8b6
PA
12324 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12325 single powerpc*-*-linux* case.
550512b8
UW
12326 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12327
b6430ec3
UW
123282008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12329
12330 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 12331 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
12332 from reg_xmlfiles.
12333 * linux-ppc-low.c: Include <elf.h>.
12334 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12335 (ppc_hwcap): New global variable.
12336 (ppc_regmap): Remove __SPE__ #ifdef sections.
12337 (ppc_regmap_e500): New global variable.
12338 (ppc_cannot_store_register): Update __SPE__ special case.
12339 (ppc_get_hwcap): New function.
12340 (ppc_arch_setup): Use it to determine whether inferior supports
12341 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12342 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12343 Do not access registers if target does not support AltiVec.
12344 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12345 Do not access registers if target does not support SPE.
12346 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12347
52fa2412
UW
123482008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12349
12350 * linux-low.c (disabled_regsets, num_regsets): New.
12351 (use_regsets_p): Delete.
12352 (linux_wait_for_process): Clear disabled_regsets.
12353 (regsets_fetch_inferior_registers): Check and set it.
12354 (regsets_store_inferior_registers): Likewise.
12355 (linux_fetch_registers, linux_store_registers): Do not use
12356 use_regsets_p.
12357 (initialize_low): Allocate disabled_regsets.
12358
e28b3332
DJ
123592008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12360
12361 * Makefile.in (LIBOBJS): New.
12362 (OBS): Use LIBOBJS.
12363 (memmem.o): New rule.
12364 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12365 * configure: Regenerated.
12366
4536995d
UW
123672008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12368
12369 * server.c (handle_query): Never return "unsupported" for
12370 qXfer:features:read queries.
12371
221c031f
UW
123722008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12373
12374 * server.c (get_features_xml): Fix inverted condition.
12375 (handle_query): Always support qXfer:feature:read.
12376
ccd213ac
DJ
123772008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12378
12379 * server.c (wrapper_argv): New.
12380 (start_inferior): Handle wrapper_argv. If set, expect an extra
12381 trap.
12382 (gdbserver_usage): Document --wrapper.
12383 (main): Parse --wrapper.
12384
6fe305f7
UW
123852008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12386
12387 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12388 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12389 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12390 (ppc_set_pc): Likewise.
12391 (ppc_arch_setup): New function.
12392 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12393 of collect_register.
889bf7c5 12394 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 12395
5b0a002e
UW
123962008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12397
12398 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12399 instead of linux-ppc64-low.o.
12400 * linux-ppc64-low.c: Remove file.
12401 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12402 (linux-ppc64-low.o): Remove rule.
12403
12404 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12405 (init_registers_powerpc_64): Likewise.
12406 (ppc_regmap): Conditionally define depending on __powerpc64__.
12407 (ppc_cannot_store_register): Do not special-case "fpscr" when
12408 compiled on __powerpc64__.
12409 (ppc_collect_ptrace_register): New function.
12410 (ppc_supply_ptrace_register): New function.
12411 (ppc_breakpoint): Change type to "unsigned int".
12412 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12413 (the_low_target): Conditionally provide initializers for the
889bf7c5 12414 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
12415 collect_ptrace_register and supply_ptrace_register members.
12416
9b4b61c8
UW
124172008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12418
12419 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12420 * server.c (gdbserver_xmltarget): Define.
12421 (get_features_xml): Use it to replace "target.xml" and arch_string.
12422
12423 * configure.srv: Remove srv_xmltarget. Add XML files that were
12424 mentioned there to srv_xmlfiles instead. Remove conditional tests
12425 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12426 srv_xmlfiles and srv_regobj to include all possible choices.
12427 * configure.ac (srv_xmltarget): Remove.
12428 (srv_xmlfiles): Do not add "target.xml".
12429 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12430 checks for supplementary target information.
12431 * configure: Regenerate.
12432 * Makefile.in (XML_TARGET): Remove.
12433 (target.xml): Remove rule.
12434 (clean): Do not clean up target.xml.
12435 (.PRECIOUS): Do not mention target.xml.
12436
12437 * target.h (struct target_ops): Remove arch_string member.
12438 * linux-low.c (linux_arch_string): Remove.
12439 (linux_target_ops): Remove arch_string initializer.
12440 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12441 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12442 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12443 * spu-low.c (spu_arch_string): Remove.
12444 (spu_target_ops): Remove arch_string initializer.
12445 * win32-low.c (win32_arch_string): Remove.
12446 (win32_target_ops): Remove arch_string initializer.
12447 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12448 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12449 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12450
ee1a7ae4
UW
124512008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12452
12453 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12454 by collect_ptrace_register and supply_ptrace_register hooks.
12455 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12456 instead of checking for the_low_target.left_pad_xfer.
12457 (usr_store_inferior_registers): Use collect_ptrace_register callback
12458 instead of checking for the_low_target.left_pad_xfer.
12459
12460 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12461 (s390_supply_ptrace_register): Likewise.
12462 (s390_fill_gregset): Call s390_collect_ptrace_register.
12463 (the_low_target): Update.
12464
12465 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12466 (ppc_supply_ptrace_register): Likewise.
12467 (the_low_target): Update.
12468
12469 * linux-i386-low.c (the_low_target): Update.
12470 * linux-x86-64-low.c (the_low_target): Update.
12471
d61ddec4
UW
124722008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12473
12474 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12475 reg-s390.o and reg-s390x.o.
12476
12477 * linux-low.c (new_inferior): New global variable.
12478 (linux_create_inferior, linux_attach): Set it.
12479 (linux_wait_for_process): Call the_low_target.arch_setup after the
12480 target has stopped for the first time.
12481 (initialize_low): Do not call the_low_target.arch_setup.
12482
12483 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12484 (s390_set_pc): Likewise.
12485 (s390_arch_setup): New function.
12486 (the_low_target): Use s390_arch_setup as arch_setup routine.
12487
12488 * regcache.c (realloc_register_cache): New function.
12489 (set_register_cache): Call it for each existing regcache.
12490
d05b4ac3
UW
124912008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12492
12493 * server.h (init_registers): Remove prototype.
12494
12495 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12496 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12497 instead of init_registers ().
12498 * linux-arm-low.c (init_registers_arm): Add prototype.
12499 (init_registers_arm_with_iwmmxt): Likewise.
12500 (the_low_target): Add initializer for arch_setup field.
12501 * linux-cris-low.c (init_registers_cris): Add prototype.
12502 (the_low_target): Add initializer for arch_setup field.
12503 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12504 (the_low_target): Add initializer for arch_setup field.
12505 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12506 (the_low_target): Add initializer for arch_setup field.
12507 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12508 (the_low_target): Add initializer for arch_setup field.
12509 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12510 (the_low_target): Add initializer for arch_setup field.
12511 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12512 (the_low_target): Add initializer for arch_setup field.
12513 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12514 (init_registers_mips64_linux): Likewise.
12515 (the_low_target): Add initializer for arch_setup field.
12516 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12517 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12518 (the_low_target): Add initializer for arch_setup field.
12519 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12520 (init_registers_powerpc_64): Likewise.
12521 (the_low_target): Add initializer for arch_setup field.
12522 * linux-s390-low.c (init_registers_s390): Add prototype.
12523 (init_registers_s390x): Likewise.
12524 (the_low_target): Add initializer for arch_setup field.
12525 * linux-sh-low.c (init_registers_sh): Add prototype.
12526 (the_low_target): Add initializer for arch_setup field.
12527 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12528 (the_low_target): Add initializer for arch_setup field.
12529 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12530 (the_low_target): Add initializer for arch_setup field.
12531
12532 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12533 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12534 instead of init_registers ().
12535 * win32-arm-low.c (init_registers_arm): Add prototype.
12536 (the_low_target): Add initializer for arch_setup field.
12537 * win32-i386-low.c (init_registers_i386): Add prototype.
12538 (the_low_target): Add initializer for arch_setup field.
12539
12540 * spu-low.c (init_registers_spu): Add prototype.
12541 (initialize_low): Call initialie_registers_spu () instead of
12542 initialize_registers ().
12543
fd96d250
PA
125442008-02-19 Pedro Alves <pedro@codesourcery.com>
12545
12546 * server.c (handle_v_requests): When handling the vRun and vAttach
12547 packets, if already debugging a process, don't kill it. Return an
12548 error instead.
12549
d41b6bb4
DJ
125502008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12551
12552 * server.c (handle_query): Correct length check.
12553
5ac588cf
PA
125542008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12555
12556 * win32-low.c (do_initial_child_stuff): Add process handle
12557 parameter. Set current_process_handle and current_process_id from the
12558 parameters. Clear globals.
12559 (win32_create_inferior): Don't set current_process_handle and
12560 current_process_id here. Instead pass them on the call to
12561 do_initial_child_stuff.
12562 (win32_attach): Likewise.
12563 (win32_clear_inferiors): New.
12564 (win32_kill): Don't close the current process handle or the
12565 current thread handle here. Instead call win32_clear_inferiors.
12566 (win32_detach): Don't open a new handle to the process. Call
12567 win32_clear_inferiors.
12568 (win32_join): Don't rely on current_process_handle; open a new
12569 handle using the process id.
12570 (win32_wait): Call win32_clear_inferiors when the inferior process
12571 has exited.
12572
ecd7ecbc
DJ
125732008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12574
12575 * server.c (monitor_show_help): Add "exit".
12576
1525d545
MG
125772008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12578
ecd7ecbc 12579 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
12580 (clean): Add reg-xtensa.c.
12581 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
12582 * configure.srv (xtensa*-*-linux*) New target.
12583 * linux-xtensa-low.c: New.
12584 * xtensa-xtregs.c: New.
1525d545 12585
59a016f0
PA
125862008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12587
12588 * hostio.c: Don't include errno.h.
12589 (errno_to_fileio_errno): Move to hostio-errno.
12590 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12591 error number outputting to the target->hostio_last_error callback.
12592 (hostio_packet_error): Use FILEIO_EINVAL directly.
12593 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12594 calls to hostio_error.
12595 * hostio-errno.c: New.
12596 * server.h (hostio_last_error_from_errno): Declare.
12597 * target.h (target_ops): Add hostio_last_error member.
12598 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12599 as hostio_last_error handler.
889bf7c5 12600 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
12601 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12602 (wince_hostio_last_error): New functions.
12603 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12604 as hostio_last_error handler.
12605 (win32_target_ops) [!_WIN32_WCE]: Register
12606 hostio_last_error_from_errno as hostio_last_error handler.
12607 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12608 (hostio-errno.o): New rule.
12609 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12610 * configure.srv (srv_hostio_err_objs): New variable. Default to
12611 hostio-errno.o.
12612 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12613 * configure: Regenerate.
12614
2d717e4f
DJ
126152008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12616
12617 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12618 (linux_kill, linux_detach): Clean up the process list.
12619 * remote-utils.c (remote_open): Improve port number parsing.
12620 (putpkt_binary, input_interrupt): Only send interrupts if the target
12621 is running.
12622 * server.c (extended_protocol): Make static.
12623 (attached): Define earlier.
12624 (exit_requested, response_needed, program_argv): New variables.
12625 (target_running): New.
12626 (start_inferior): Clear attached here.
12627 (attach_inferior): Set attached here.
12628 (require_running): Define.
12629 (handle_query): Use require_running and target_running. Implement
12630 "monitor exit".
12631 (handle_v_attach, handle_v_run): New.
12632 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12633 (gdbserver_usage): Update.
12634 (main): Redo argument parsing. Handle --debug and --multi. Handle
12635 --attach along with other options or after the port. Save
12636 program_argv. Support no initial program. Resynchronize
12637 communication with GDB after an error. Handle "monitor exit".
12638 Use require_running and target_running. Always allow the extended
12639 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12640 restart in extended mode.
12641 * README: Refer to the GDB manual. Update --attach usage.
12642
7407e2de
AS
126432007-12-20 Andreas Schwab <schwab@suse.de>
12644
12645 * linux-low.c (STACK_SIZE): Define.
12646 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12647 (linux_test_for_tracefork): Likewise.
12648
b65d95c5
DJ
126492007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12650
12651 * linux-low.c (linux_wait_for_event): Update messages. Do not
12652 reinsert auto-delete breakpoints.
12653 * mem-break.c (struct breakpoint): Change return type of handler to
12654 int.
12655 (set_breakpoint_at): Update handler type.
12656 (reinsert_breakpoint_handler): Return 1 instead of calling
12657 delete_breakpoint.
12658 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12659 setting a new one.
12660 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12661 * mem-break.h (set_breakpoint_at): Update handler type.
12662 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12663 * win32-low.c (auto_delete_breakpoint): New.
12664 (get_child_debug_event): Use it.
12665
4e799345
DJ
126662007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12667
12668 * configure.ac: Check for pread and pwrite.
12669 * hostio.c (handle_pread): Fall back to lseek and read.
12670 (handle_pwrite): Fall back to lseek and write.
12671 * config.in, configure: Regenerated.
12672
27524b67
DJ
126732007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12674
12675 * server.c (myresume): Add own_buf argument.
12676 (main): Update calls.
12677
a20d5e98
DJ
126782007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12679
12680 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12681 * remote-utils.c (remote_open): Do not call disable_async_io.
12682 (block_async_io): Delete.
12683 (unblock_async_io): Make static.
12684 (initialize_async_io): New.
12685 * server.c (handle_v_cont): Handle async I/O here.
12686 (myresume): Likewise. Move other common resume tasks here...
12687 (main): ... from here. Call initialize_async_io. Disable async
12688 I/O before the main loop.
12689 * server.h (initialize_async_io): Declare.
12690 (block_async_io, unblock_async_io): Delete prototypes.
12691 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12692
b79d787e
DJ
126932007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12694
12695 * remote-utils.c (readchar): Allow binary data in received messages.
12696
d97903b2
PA
126972007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12698
12699 * win32-low.c (attaching): New global.
12700 (win32_create_inferior): Clear the `attaching' global.
12701 (win32_attach): Set the `attaching' global.
12702 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12703 attaching. Only set a breakpoint at the entry point if not
12704 attaching.
12705
311de423
PA
127062007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12707
12708 * server.c (main): Don't report dll events on the initial
12709 connection on attaches.
12710
6c2d16d2
PA
127112007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12712
12713 * server.c (main): Relax numerical bases supported for the pid of
12714 the --attach command line argument.
12715
5ca906e6
PA
127162007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12717
12718 * win32-low.c (win32_attach): Call OpenProcess before
12719 DebugActiveProcess, not after. Add last error output to error
12720 call.
12721
9c6c8194
PA
127222007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12723
12724 * win32-low.c (win32_get_thread_context)
12725 (win32_set_thread_context): New functions.
12726 (thread_rec): Use win32_get_thread_context.
12727 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12728 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12729 field.
12730
4d5d1aaa
PA
127312007-12-03 Leo Zayas
12732 Pedro Alves <pedro_alves@portugalmail.pt>
12733
12734 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12735 global variables.
12736 (child_add_thread): Minor cleanup.
12737 (child_continue): Resume artificially suspended threads before
12738 calling ContinueDebugEvent.
12739 (suspend_one_thread): New.
12740 (fake_breakpoint_event): New.
12741 (get_child_debug_event): Change return type to int. Check here if
12742 gdb sent an interrupt request. If a soft interrupt was requested,
12743 fake a breakpoint event. Return 0 if there is no event to handle,
12744 and 1 otherwise.
12745 (win32_wait): Don't check here if gdb sent an interrupt request.
12746 Ensure there is a valid event to handle.
12747 (win32_request_interrupt): Add soft interruption method as last
12748 resort.
12749
c436e841
PA
127502007-12-03 Leo Zayas
12751 Pedro Alves <pedro_alves@portugalmail.pt>
12752
12753 * win32-low.h (win32_thread_info): Add descriptions to the
12754 structure members. Replace `suspend_count' counter by a
12755 `suspended' flag.
12756 * win32-low.c (thread_rec): Update condition of when to get the
12757 context from the inferior. Rely on ContextFlags being set if it
12758 has already been retrieved. Only suspend the inferior thread if
12759 we haven't already. Warn if that fails.
12760 (continue_one_thread): s/suspend_count/suspended/. Only call
12761 ResumeThread once. Warn if that fails.
12762
e7b5fa67
PA
127632007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12764
12765 * win32-low.c (win32_wait): Don't read from the inferior when it
12766 has already exited.
12767
a385171d
PA
127682007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12769
12770 * Makefile.in (win32_low_h): New variable.
12771 (win32-low.o): Add dependency on $(win32_low_h).
12772 (win32-arm-low.o, win32-i386-low.o): New rules.
12773
f80c84b3
DJ
127742007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12775
12776 * hostio.c: Correct copyright year.
12777
a6b151f1
DJ
127782007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12779
12780 * Makefile.in (OBS): Add hostio.o.
12781 (hostio.o): New rule.
12782 * server.h (handle_vFile): Declare.
12783 * hostio.c: New file.
12784 * server.c (handle_v_requests): Take packet_len and new_packet_len
12785 for binary packets. Call handle_vFile.
12786 (main): Update call to handle_v_requests.
12787
f9387fc3
DJ
127882007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12789
12790 * linux-low.c: Include <sched.h>.
12791
51c2684e
DJ
127922007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12793
12794 * linux-low.c (linux_tracefork_grandchild): New.
12795 (linux_tracefork_child): Use clone.
12796 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12797
75f83163
JB
127982007-10-31 Joel Brobecker <brobecker@adacore.com>
12799
12800 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12801
da5898ce
DJ
128022007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12803
12804 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12805
24a09b5f
DJ
128062007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12807
12808 * inferiors.c (change_inferior_id): Delete.
12809 (add_pid_to_list, pull_pid_from_list): New.
12810 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12811 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12812 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12813 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12814 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12815 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12816 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12817 (using_threads): Always set to 1.
12818 (handle_extended_wait): New.
12819 (add_process): Do not set TID.
12820 (linux_create_inferior): Set must_set_ptrace_flags.
12821 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12822 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12823 (linux_thread_alive): Rename TID argument to LWPID.
12824 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12825 (linux_wait_for_event): Do not use TID or check using_threads. Update
12826 call to dead_thread_notify. Call handle_extended_wait.
12827 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12828 (send_sigstop): Delete sigstop_sent.
12829 (wait_for_sigstop): Avoid TID.
12830 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12831 (linux_test_for_tracefork): New.
12832 (linux_lookup_signals): Use thread_db_active and
12833 linux_supports_tracefork_flag.
12834 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12835 * linux-low.h (get_process_thread): Avoid TID.
12836 (struct process_ifo): Move thread_known and tid to the end. Remove
12837 sigstop_sent.
12838 (linux_attach_lwp, thread_db_init): Update prototypes.
12839 * server.h (change_inferior_id): Delete prototype.
12840 (add_pid_to_list, pull_pid_from_list): New prototypes.
12841 * thread-db.c (thread_db_use_events): New.
12842 (find_first_thread): Rename to...
12843 (find_one_thread): ...this. Update callers and messages. Do not
12844 call fatal. Check thread_db_use_events. Do not call
12845 change_inferior_id or new_thread_notify.
12846 (maybe_attach_thread): Update. Do not call new_thread_notify.
12847 (thread_db_init): Set thread_db_use_events. Check use_events.
12848 * utils.c (fatal, warning): Correct message prefix.
12849
30ed0a8f
DJ
128502007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12851
12852 * Makefile.in (clean): Remove new files.
12853 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12854 (powerpc-64.o, powerpc-64.c): New rules.
12855 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12856 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12857 with SPE.
12858 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12859 SPE targets.
12860 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12861 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12862 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12863 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12864 (target_regsets): Add AltiVec and SPE register sets.
12865 * configure.ac: Check for AltiVec and SPE.
12866 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12867 (ppc_fill_vrregset, ppc_store_vrregset): New.
12868 (target_regsets): Add AltiVec register set.
12869 * configure: Regenerated.
12870
fd462a61
DJ
128712007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12872
12873 * linux-low.c (O_LARGEFILE): Define.
12874 (linux_read_memory): Use /proc/PID/mem.
12875 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12876 * configure, config.in: Regenerated.
12877
69f223ed
DJ
128782007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12879
12880 * linux-low.c (linux_wait_for_event): Do not pass signals while
12881 single-stepping.
12882
aec18585
PA
128832007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12884
12885 * win32-low.c (create_process): New.
12886 (win32_create_inferior): Use create_process instead of
12887 CreateProcess. If create_process failed retry appending an ".exe"
12888 suffix. Store the GetLastError result immediatelly after
12889 create_process calls and use it on the call to error.
12890
34d86ddd
PA
128912007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12892
12893 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12894
5a0e3bd0
JB
128952007-08-23 Joel Brobecker <brobecker@adacore.com>
12896
12897 * configure.ac: Switch license to GPLv3.
12898
f88c79e6
MS
128992007-08-01 Michael Snyder <msnyder@access-company.com>
12900
12901 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12902
6b3d9b83
PA
129032007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12904
12905 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12906 typedef.
12907 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12908 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12909 CloseToolhelp32Snapshot.
12910 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12911 CloseToolhelp32Snapshot.
12912
c588c53c
MS
129132007-07-27 Michael Snyder <michael.snyder@access-company.com>
12914
12915 * server.c (main): Check for inferior exit before main loop.
12916
aa0403d9
PA
129172007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12918
12919 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12920 instead of on tmp_desc.
12921
255e7678
DJ
129222007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12923 Daniel Jacobowitz <dan@codesourcery.com>
12924
12925 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12926 (add_thread): Minor cleanups.
12927 (clear_inferiors): Move lower in the file. Clear the DLL
12928 list.
12929 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12930 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12931 (xml_escape_text): New.
12932 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12933 for qSupported.
12934 (handle_v_cont): Report errors.
12935 (gdbserver_version): Update.
12936 (main): Correct size of own_buf. Do not report initial DLL events.
12937 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12938 (unloaded_dll, xml_escape_text): New.
12939 * win32-low.c (enum target_waitkind): Update comments.
12940 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12941 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12942 (win32_EnumProcessModules, win32_GetModuleInformation)
12943 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12944 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12945 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12946 (win32_Module32First, win32_Module32Next, load_toolhelp)
12947 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12948 (get_child_debug_event): Handle DLL events.
12949 (win32_wait): Likewise.
12950
0d37add9
DJ
129512007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12952
12953 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12954 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12955
45e2715e
PA
129562007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12957
12958 * win32-low.c (handle_output_debug_string): Ignore event if not
12959 waiting.
12960
c5674cf1
PA
129612007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12962
12963 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12964
2bbe3cc1
DJ
129652007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12966
12967 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12968
ae13219e
DJ
129692007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12970
12971 * inferiors.c (change_inferior_id): Add comment.
12972 * linux-low.c (check_removed_breakpoint): Add an early
12973 prototype. Improve debug output.
12974 (linux_attach): Doc update.
12975 (linux_detach_one_process, linux_detach): Clean up before releasing
12976 each process.
12977 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12978 * linux-low.h (struct process_info): Doc improvement.
12979 * mem-break.c (delete_all_breakpoints): New.
12980 * mem-break.h (delete_all_breakpoints): New prototype.
12981 * thread-db.c (find_first_thread): New.
12982 (thread_db_create_event): Call it instead of
12983 thread_db_find_new_threads. Clean up unused variables.
12984 (maybe_attach_thread): Remove first thread handling.
12985 (thread_db_find_new_threads): Use find_first_thread.
12986 (thread_db_get_tls_address): Likewise.
12987
4105de34
DJ
129882007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12989
12990 * thread-db.c (thread_db_find_new_threads): Add prototype.
12991 (thread_db_create_event): Check for the main thread before adding
12992 a new thread.
12993 (maybe_attach_thread): Only enable event reporting if TID == 0.
12994 (thread_db_get_tls_address): Check for new threads.
12995
2b876972
DJ
129962007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
12997
12998 * linux-low.c (linux_create_inferior): Try execv before execvp.
12999 * spu-low.c (spu_create_inferior): Likewise.
13000
7a245884
DJ
130012007-06-13 Mike Frysinger <vapier@gentoo.org>
13002
13003 * linux-low.c (linux_create_inferior): Change execv to execvp.
13004 * spu-low.c (spu_create_inferior): Likewies.
13005
117ce543
DJ
130062007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13007
13008 * Makefile.in (clean): Clean new files instead of deleted ones.
13009 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13010 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13011 rules.
13012 * configure.srv: Specify XML files and new regformats for MIPS and
13013 MIPS64 GNU/Linux.
13014 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13015 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13016 an entry for the restart register.
13017 (mips_cannot_fetch_register, mips_cannot_store_register)
13018 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13019 register names to match the XML descriptions.
13020 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13021 restart register instead of $0.
13022
0e7f50da
UW
130232007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13024 Markus Deuling <deuling@de.ibm.com>
13025
13026 * remote-utils.c (decode_xfer_write): New function.
13027 * server.h (decode_xfer_write): Add prototype.
13028 * server.c (handle_query): Add PACKET_LEN argument. Support
13029 qXfer:spu:read and qXfer:spu:write packets.
13030 (main): Pass packet_len to handle_query.
13031 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13032 * target.h (target_ops): Add qxfer_spu.
13033
374c1d38
UW
130342007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13035
13036 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13037 accessing non-seekable spufs files.
13038
bb63802a
UW
130392007-05-16 Markus Deuling <deuling@de.ibm.com>
13040
889bf7c5 13041 * server.c (handle_query): Add reply for qC packet.
bb63802a 13042
7390519e
PA
130432007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13044 Leo Zayas <lerele@champenstudios@com>
13045
13046 * server.h (check_remote_input_interrupt_request): New function.
13047 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13048 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13049 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13050 (check_remote_input_interrupt_request): New function.
13051 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13052 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13053 winapi_GenerateConsoleCtrlEvent): New typedefs.
13054 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13055 to 250 ms.
13056 (win32_wait): Check for remote interrupt request
13057 with check_remote_input_interrupt_request.
13058 (win32_request_interrupt): New function.
13059 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13060
34b34921
PA
130612007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13062
13063 * win32-low.c (debug_registers_changed,
13064 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13065 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13066 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13067 (thread_rec): Get context using the low target.
13068 (child_add_thread): Call thread_added on the low target,
13069 which does the same thing.
13070 (regptr): Delete.
13071 (do_initial_child_stuff): Remove debug registers references.
13072 Set context using the low target. Resume threads after
13073 setting the contexts.
13074 (child_continue): Remove dead variable. Remove debug
13075 registers references.
13076 (child_fetch_inferior_registers): Go through the low target.
13077 (do_child_store_inferior_registers): Remove.
13078 (child_store_inferior_registers): Go through the low target.
13079 (win32_resume): Remove debug registers references.
13080 Set context using the low target.
13081 (handle_exception): Change return type to void. Don't record
13082 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13083 first chance exception.
889bf7c5 13084 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13085 goto loop. Always return after waiting for debug event.
13086 (win32_wait): Convert to switch statement. Handle spurious
13087 events.
13088
13089 * win32-i386-low.c (debug_registers_changed,
13090 debug_registers_used): New.
13091 (initial_stuff): Rename to ...
13092 (i386_initial_stuff): ... this. Clear debug registers
13093 state variables.
13094 (store_debug_registers): Delete.
13095 (i386_get_thread_context): New.
13096 (load_debug_registers): Delete.
13097 (i386_set_thread_context): New.
13098 (i386_thread_added): New.
13099 (single_step): Rename to ...
13100 (i386_single_step): ... this.
13101 (do_fetch_inferior_registers): Rename to ...
13102 (i386_fetch_inferior_register): ... this.
13103 (i386_store_inferior_register): New.
13104 (the_low_target): Adapt to new interface.
13105
13106 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13107 (arm_get_thread_context): New.
13108 (arm_set_thread_context): New.
13109 (regptr): New.
13110 (do_fetch_inferior_registers): Rename to ...
13111 (arm_fetch_inferior_register): ... this.
13112 (arm_store_inferior_register): New.
13113 (arm_wince_breakpoint): Reimplement as unsigned long.
13114 (arm_wince_breakpoint_len): Define.
13115 (the_low_target): Adapt to new interface.
13116
13117 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13118 load_debug_registers. Add get_thread_context, set_thread_context,
13119 thread_added and store_inferior_register. Rename
13120 fetch_inferior_registers to fetch_inferior_register.
13121 (regptr): Remove declaration.
13122
dd6953e1
PA
131232007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13124
13125 * linux-low.c (linux_detach): Change return type to int. Return 0.
13126 * spu-low.c (spu_detach): Likewise.
13127
444d6139
PA
131282007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13129
13130 * target.h (target_ops): Change return type of detach to int.
13131 Add join.
13132 (join_inferior): New.
13133 * server.c (main): Don't skip detach support on mingw32.
13134 If the inferior doesn't support detaching return error.
13135 Call join_inferior instead of using waitpid.
13136 * linux-low.c (linux_join): New.
13137 (linux_target_op): Add linux_join.
13138 * spu-low.c (spu_join): New.
13139 (spu_target_ops): Add spu_join.
13140 * win32-low.c (win32_detach): Adapt to new interface.
13141 Reopen current_process_handle before detaching. Issue a child
13142 resume before detaching.
13143 (win32_join): New.
13144 (win32_target_op): Add win32_join.
13145
1d5315fe
PA
131462007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13147
13148 * win32-low.c (win32-attach): Fix return value.
13149 * target.h (target_ops): Describe ATTACH return values.
13150
bf914831
PA
131512007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13152
13153 * win32-low.c (GETPROCADDRESS): Define.
13154 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13155 (winapi_DebugSetProcessKillOnExit): Likewise.
13156 (win32_create_inferior): Force usage of ansi CreateProcessA.
13157 (win32_attach): Use GETPROCADDRESS.
13158 (win32_detach): Likewise.
13159
f72f3e60
PA
131602007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13161
13162 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13163
ed50f18f
PA
131642007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13165
13166 * win32-low.c: Commit leftover changes from 2007-03-29.
13167
0c2ead7e
DJ
131682007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13169
13170 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13171 fields short instead of int. Add explicit padding.
13172 (i387_cache_to_fsave): Remove unnecessary casts.
13173 (i387_fsave_to_cache): Doc fix.
13174 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13175
73725ff3
DJ
131762007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13177
13178 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13179 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13180
d99f33d8
PA
131812007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13182
13183 * configure.srv (arm*-*-mingw32ce*): Move near the other
13184 arm targets.
13185
68070c10
PA
131862007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13187
2482afc6 13188 * configure.ac: Add errno checking.
68070c10
PA
13189 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13190 sys/file.h and malloc.h.
13191 (AC_CHECK_DECLS): Add perror.
13192 (srv_mingwce): Handle.
2482afc6 13193 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
13194 win32-i386-low.o to srv_tgtobj.
13195 (i[34567]86-*-mingw*): Likewise.
13196 (arm*-*-mingw32ce*): Add case.
13197 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13198 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13199 [__MINGW32CE__] (strerror): New function.
13200 [__MINGW32CE__] (errno): Define to GetLastError.
13201 [__MINGW32CE__] (COUNTOF): New macro.
13202 (remote_open): Remove extra close call.
13203 * mem-break.c (delete_breakpoint_at): New function.
13204 * mem-break.h (delete_breakpoint_at): Declare.
13205 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13206 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13207 [USE_WIN32API] (read, write): Add char* casts.
13208 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13209 * server.h: Include wincecompat.h on Windows CE.
13210 [HAVE_ERRNO_H]: Check.
13211 (perror): Declare if not declared.
13212 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13213 (perror_with_name): Remove errno declaration.
13214 * wincecompat.h: New.
13215 * wincecompat.c: New.
13216 * win32-low.h: New.
13217 * win32-arm-low.c: New.
13218 * win32-i386-low.c: New.
13219 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13220 (OUTMSG2): Make it safe.
13221 (_T): New macro.
13222 (COUNTOF): New macro.
13223 (NUM_REGS): Get it from the low target.
13224 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13225 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13226 (thread_rec): Let low target handle debug registers.
13227 (child_add_thread): Likewise.
13228 (child_init_thread_list): Likewise.
13229 (continue_one_thread): Likewise.
13230 (regptr): New.
13231 (do_child_fetch_inferior_registers): Move to ...
13232 * win32-i386-low.c: ... here, and rename to ...
13233 (do_fetch_inferior_registers): ... this.
889bf7c5 13234 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
13235 Go through the low target.
13236 (do_child_store_inferior_registers): Use regptr.
13237 (strwinerror): New function.
13238 (win32_create_inferior): Handle Windows CE.
13239 Use strwinerror instead of strerror on Windows error
13240 codes. Add program to the error output.
13241 Don't close the main thread handle on Windows CE.
13242 (win32_attach): Use coredll.dll on Windows CE.
13243 (win32_kill): Close current process and current
13244 thread handles.
13245 (win32_detach): Use coredll.dll on Windows CE.
13246 (win32_resume): Let low target handle debug registers, and
13247 step request.
13248 (handle_exception): Add/Remove initial breakpoint. Avoid
13249 non-existant WSTOPSIG on Windows CE.
13250 (win32_read_inferior_memory): Cast to remove warning.
13251 (win32_arch_string): Go through the low target.
13252 (initialize_low): Call set_breakpoint_data with the low
13253 target's breakpoint.
13254 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13255 FOP_REGNUM, mappings): Move to ...
13256 * win32-i386-low.c: ... here.
13257 * win32-low.c (win32_thread_info): Move to ...
13258 * win32-low.h: ... here.
13259 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13260 win32-arm-low.c and wincecompat.c.
13261 (all:): Add $EXEEXT.
13262 (install-only:): Likewise.
13263 (gdbserver:): Likewise.
13264 (gdbreplay:): Likewise.
13265 * config.in: Regenerate.
13266 * configure: Regenerate.
13267
41093d81
PA
132682007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13269
13270 * win32-low.c: Rename typedef thread_info to
13271 win32_thread_info throughout.
13272
544afa54
PA
132732007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13274
13275 * win32-i386-low.c: Rename to ...
13276 * win32-low.c: ... this.
13277 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13278 * Makefile.in: Likewise.
13279
bce7165d
PA
132802007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13281
13282 * remote-utils.c (monitor_output): Constify msg parameter.
13283 * server.h (monitor_output): Likewise.
13284 * win32-i386-low.c (handle_output_debug_string): New.
13285 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13286 handle_output_debug_string.
13287 (get_child_debug_event): Likewise.
13288
506c7aa0
DJ
132892007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13290
13291 * server.c (main): Correct strtoul check.
13292
42c81e2a
DJ
132932007-03-27 Jon Ringle <jon@ringle.org>
13294
13295 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13296
9453113a
DJ
132972007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13298
13299 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13300
64a69107
DJ
133012007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13302
13303 * terminal.h: Check HAVE_SGTTY_H.
13304
133052007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
13306
13307 * remote-utils.c (remote_open): Print out the assigned port number.
13308
c74d0ad8
DJ
133092007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13310
13311 * remote-utils.c (monitor_output): New function.
13312 * server.c (debug_threads): Define here.
13313 (monitor_show_help): New function.
13314 (handle_query): Handle qRcmd.
13315 (main): Do not handle 'd' packet.
13316 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13317 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13318 of debug_threads.
13319
de7c3b4a
PA
133202007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13321
13322 * Makefile.in (EXEEXT): New.
13323 (clean): Use $(EXEEXT).
13324
ef57601b
PA
133252007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13326
13327 * target.h (target_ops): Rename send_signal to request_interrupt,
13328 and remove enum target_signal parameter.
13329 * linux-low.c (linux_request_interrupt): Rename from
13330 linux_send_signal, and always send SIGINT.
13331 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13332 and always send SIGINT.
13333 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13334 of send_signal.
13335 (input_interrupt): Likewise.
13336
820f2bda
PA
133372007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13338
13339 * server.c (get_features_xml): Check if target implemented
13340 arch_string.
13341 * win32-i386-low.c (win32_arch_string): New.
13342 (win32_target_ops): Add win32_arch_string as arch_string member.
13343
ab39bf24
UW
133442007-02-22 Markus Deuling <deuling@de.ibm.com>
13345
13346 * spu-low.c (spu_arch_string): New.
13347 (spu_target_ops): Add spu_arch_string.
13348
61ff6e04
DJ
133492007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13350
13351 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13352 * configure.ac: Do not check for terminal.h.
13353 * configure, config.in: Regenerated.
13354
fb1e4ffc
DJ
133552007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13356
13357 * Makefile.in (OBS): Add $(XML_BUILTIN).
13358 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13359 (clean): Update.
13360 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13361 (arm-with-iwmmxt.c): New.
13362 * config.in, configure: Regenerate.
13363 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13364 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13365 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13366 (arm*-*-linux*): Add iWMMXt and regset support.
13367 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13368 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13369 (arm_store_wmmxregset, target_regsets): New.
13370 * server.c (get_features_xml): Take annex argument. Check builtin
13371 XML documents.
13372 (handle_query): Handle multiple annexes.
13373
0f48aa01
DJ
133742007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13375
13376 * remote-utils.c [USE_WIN32API] (read, write): Define.
13377 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13378 write.
13379
23181151
DJ
133802007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13381
13382 * linux-i386-low.c (the_low_target): Set arch_string.
13383 * linux-x86-64-low.c (the_low_target): Likewise.
13384 * linux-low.c (linux_arch_string): New.
13385 (linux_target_ops): Add it.
13386 * linux-low.h (struct linux_target_ops): Add arch_string.
13387 * server.c (write_qxfer_response): Use const void * for DATA.
13388 (get_features_xml): New.
13389 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13390 * target.h (struct target_ops): Add arch_string method.
13391
9d606399
DJ
133922007-01-03 Denis Pilat <denis.pilat@st.com>
13393 Daniel Jacobowitz <dan@codesourcery.com>
13394
13395 * linux-low.c (linux_kill): Handle being called with no threads.
13396 * win32-i386-low.c (win32_kill): Likewise.
13397 (get_child_debug_event): Clear current_process_handle.
13398
133992006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
13400 Daniel Jacobowitz <dan@codesourcery.com>
13401
13402 * remote-utils.c (remote_open): Check the type of specified
13403 serial port devices before opening them.
13404 * server.c (main): Kill the inferior if an error occurs during
13405 the first remote_open.
13406
a5e13d24
DJ
134072006-12-05 Markus Deuling <deuling@de.ibm.com>
13408
13409 * README: Update supported targets.
13410
186947f7
DJ
134112006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13412
13413 * Makefile.in (clean): Remove reg-mips64.c.
13414 (reg-mips64.c, reg-mips64.o): New rules.
13415 * configure.srv: Handle mips64. Include regset support for mips.
13416 * linux-mips-low.c (union mips_register): New.
13417 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13418 (mips_breakpoint, mips_breakpoint_at): Use int.
13419 (mips_collect_register, mips_supply_register)
13420 (mips_collect_register_32bit, mips_supply_register_32bit)
13421 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13422 (mips_store_fpregset, target_regsets): New.
13423 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13424
a13e2c95
UW
134252006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13426
13427 * configure.srv: Add target "spu*-*-*".
13428 * Makefile.in (clean): Remove reg-spu.c.
13429 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13430 * spu-low.c: New file.
13431
cb7283db
DJ
134322006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13433
13434 * configure.ac: Correct td_thr_tls_get_addr test.
13435 * configure: Regenerated.
13436
89be2091
DJ
134372006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13438
13439 * linux-low.c (linux_wait_for_event): Reformat. Use the
13440 pass_signals array.
13441 * remote-utils.c (decode_address_to_semicolon): New.
13442 * server.c (pass_signals, handle_general_set): New.
13443 (handle_query): Mention QPassSignals for qSupported.
13444 (main): Call handle_general_set.
13445 * server.h (pass_signals, decode_address_to_semicolon): New.
13446
000ef4f0
DJ
134472006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13448
13449 * server.c (handle_query): Correct error handling for read_auxv.
13450
b7149293
UW
134512005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13452
13453 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13454 and srv_linux_thread_db to yes.
13455 * linux-s390-low.c (s390_fill_gregset): New function.
13456 (target_regsets): Define data structure.
13457
dae5f5cf
DJ
134582006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13459
13460 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13461 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13462 * config.in, configure: Regenerated.
13463 * inferiors.c (gdb_id_to_thread): New function.
13464 (gdb_id_to_thread_id): Use it.
13465 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13466 * linux-low.h (struct process_info): Add th member.
13467 (thread_db_get_tls_address): New prototype.
13468 * remote-utils.c (decode_address): Make non-static.
13469 * server.c (handle_query): Handle qGetTLSAddr.
13470 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13471 * target.h (struct target_ops): Add get_tls_address.
13472 * thread-db.c (maybe_attach_thread): Save the thread handle.
13473 (thread_db_get_tls_address): New.
13474
32ca6d61
DJ
134752006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13476
13477 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13478 (linux_resume_one_process): Take a siginfo_t *. Update all
13479 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13480 (struct pending_signals): Add a siginfo_t.
13481 (linux_wait_for_process): Always set last_status.
13482 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13483 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13484 * linux-low.h (struct process_info): Add last_status.
13485
5ffff7c1
DJ
134862006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13487
13488 * remote-utils.c (try_rle): New function.
13489 (putpkt_binary): Use it.
13490
8695c747
DJ
134912006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13492
13493 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13494 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13495 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13496 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13497 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13498 point registers.
13499
290fadea
RS
135002006-08-08 Richard Sandiford <richard@codesourcery.com>
13501
13502 * server.c (terminal_fd): New variable.
13503 (old_foreground_pgrp): Likewise.
13504 (restore_old_foreground_pgrp): New function.
13505 (start_inferior): Record the terminal file descriptor in terminal_fd
13506 and its original foreground group in old_foreground_pgrp. Register
13507 restore_old_foreground_pgrp with atexit().
13508
9f2e1e63
DJ
135092006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13510
13511 * server.c (handle_query): Correct qPart to qXfer.
13512
b80864fb
DJ
135132006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13514
13515 * configure.ac: Check for more headers which are missing on
13516 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13517 * configure.srv: Add Cygwin and mingw32.
13518 * remote-utils.c: Don't include headers unconditionally which
13519 are missing on mingw32. Include <winsock.h> for mingw32.
13520 (remote_open): Adjust for mingw32 support. Flush
13521 standard error after writing to it.
13522 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13523 (unblock_async_io, enable_async_io, disable_async_io)
13524 (readchar, getpkt): Update for Winsock support.
13525 (prepare_resume_reply): Expect a protocol signal number.
13526 * server.c: Disable <sys/wait.h> on mingw32.
13527 (start_inferior): Adjust for mingw32 support. Flush
13528 standard error after writing to it.
13529 (attach_inferior): Likewise. Use protocol signal
13530 numbers.
13531 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13532 and names.
13533 * win32-i386-low.c: New file.
13534 * Makefile.in (XM_CLIBS): Set.
13535 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13536 (win32-i386-low.o): New dependency rule.
13537 * linux-low.c (linux_wait): Use target signal numbers.
13538 * target.h (struct target_ops): Doc fix.
13539 * server.h (target_signal_to_name): New prototype.
13540 * gdbreplay.c: Don't include headers unconditionally which
13541 are missing on mingw32. Include <winsock.h> for mingw32.
13542 (remote_close, remote_open): Adjust for Winsock support.
13543 * configure, config.in: Regenerated.
13544
0876f84a
DJ
135452006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13546
13547 * server.c (decode_xfer_read, write_qxfer_response): New.
13548 (handle_query): Take a packet length argument. Handle
13549 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13550 the qSupported response.
13551 (main): Update call to handle_query.
13552
01f9e8fa
DJ
135532006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13554
13555 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13556 (putpkt_binary): Renamed from putpkt and adjusted for binary
13557 data.
13558 (putpkt): New wrapper for putpkt_binary.
13559 (readchar): Don't mask off the high bit.
13560 (decode_X_packet): New function.
13561 * server.c (main): Call putpkt_binary if a handler sets the packet
13562 length. Save the length of the incoming packet. Handle 'X'.
13563 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13564
be2a5f71
DJ
135652006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13566
13567 * server.c (handle_query): Handle qSupported.
13568
ea025f5f
DJ
135692006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13570
13571 * remote-utils.c (all_symbols_looked_up): New variable.
13572 (look_up_one_symbol): Check it.
13573 * server.h (look_up_one_symbol): New declaration.
13574 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13575
9308fc88
DJ
135762006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13577
13578 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 13579 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
13580 (PTRACE_GET_THREAD_AREA): Define.
13581 (ps_get_thread_area): New function.
13582
52fb6437
NS
135832006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13584
13585 * configure.srv (m68k*-*-uclinux*): New target.
13586 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13587 (linux_resume_one_process): Remove extraneous cast.
13588 (linux_read_offsets): New.
13589 (linux_target_op): Add linux_read_offsets on mmuless systems.
13590 * server.c (handle_query): Add qOffsets logic.
13591 * target.h (struct target_ops): Add read_offsets.
13592
21b0f40c
DJ
135932006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13594
13595 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13596 (PTRACE_GET_THREAD_AREA): Define.
13597 (ps_get_thread_area): New function.
13598 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13599 (linux-x86-64-low.o): Update.
13600
0050a760
DJ
136012006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13602
13603 * configure.ac: Remove checks for prfpregset_t.
13604 * gdb_proc_service.h: New file.
13605 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13606 new "gdb_proc_service.h".
13607 * proc-service.c: Likewise.
13608 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13609 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13610 * Makefile.in (gdb_proc_service_h): Updated.
13611 * configure, config.in: Regenerated.
13612
b92a518e
DJ
136132006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13614
13615 * remote-utils.c (prepare_resume_reply): Move declaration
13616 of gdb_id_from_wait to the top of the block.
13617
545587ee
DJ
136182006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13619
13620 * linux-low.c (regsets_store_inferior_registers): Read the regset
13621 from the target before filling it.
13622
9db87ebd
DJ
136232006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13624
13625 * server.c (attach_inferior): Return SIGTRAP for a successful
13626 attach.
13627
dd24457d
DJ
136282006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13629
13630 * Makefile.in (OBS): Add version.o.
13631 (STAGESTUFF): Delete.
13632 (version.o): Add dependencies.
13633 (version.c): Replace rule.
13634 (clean): Remove version.c.
13635 * server.c (gdbserver_version): New.
13636 (gdbserver_usage): Use printf.
13637 (main): Handle --version and --help.
13638 * server.h (version, host_name): Add declarations.
13639
6f0f660e
EZ
136402005-12-23 Eli Zaretskii <eliz@gnu.org>
13641
889bf7c5
PA
13642 * linux-arm-low.c:
13643 * linux-arm-low.c:
13644 * inferiors.c:
13645 * i387-fp.h:
13646 * i387-fp.c:
13647 * gdbreplay.c:
13648 * regcache.c:
13649 * proc-service.c:
13650 * mem-break.h:
13651 * mem-break.c:
13652 * linux-x86-64-low.c:
13653 * linux-sh-low.c:
13654 * linux-s390-low.c:
13655 * linux-ppc64-low.c:
13656 * linux-ppc-low.c:
13657 * linux-mips-low.c:
13658 * linux-m68k-low.c:
13659 * linux-m32r-low.c:
13660 * linux-low.h:
13661 * linux-low.c:
13662 * linux-ia64-low.c:
13663 * linux-i386-low.c:
13664 * linux-crisv32-low.c:
13665 * thread-db.c:
13666 * terminal.h:
13667 * target.h:
13668 * target.c:
13669 * server.h:
13670 * server.c:
13671 * remote-utils.c:
13672 * regcache.h:
13673 * utils.c:
13674 * Makefile.in:
13675 * configure.ac:
6f0f660e
EZ
13676 * gdbserver.1: Add (C) after Copyright. Update the FSF
13677 address.
13678
9d1fb177
DJ
136792005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13680
13681 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13682 (arm_breakpoint_at): Recognize both breakpoints.
13683 (the_low_target): Use the correct breakpoint instruction.
13684
011a70c2
DJ
136852005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13686
13687 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13688 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13689 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13690 (the_low_target): Update.
13691
7fb85e41
AS
136922005-10-25 Andreas Schwab <schwab@suse.de>
13693
13694 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13695
13696 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13697 (ia64_num_regs): Reduce to 462.
13698
3db0444b
DJ
136992005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13700
13701 * acinclude.m4: Correct quoting.
13702 * aclocal.m4: Regenerated.
13703
13704 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13705 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13706 (thread_db_init): Call thread_db_err_str.
13707 * configure.ac: Check for TD_VERSION.
13708 * config.in, configure: Regenerated.
13709
bee0189a
DJ
137102005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13711
13712 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13713
e9d25b98
DJ
137142005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13715
13716 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13717 is not available. Define HAVE_PTRACE_GETREGS if it is.
13718 * config.in, configure: Regenerated.
13719 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13720 * linux-i386-low.c, linux-m68k-low.c: Update to use
13721 HAVE_PTRACE_GETREGS.
13722 * linux-low.c (regsets_fetch_inferior_registers)
13723 (regsets_store_inferior_registers): Only return 0 if we processed
13724 GENERAL_REGS.
13725 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13726 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13727
a06660f7
DJ
137282005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13729
13730 * inferiors.c (struct thread_info): Add gdb_id.
13731 (add_thread): Add gdb_id argument.
13732 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13733 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13734 calls to add_thread.
13735 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13736 * server.c (handle_query): Use thread_to_gdb_id.
13737 (handle_v_cont, main): Use gdb_id_to_thread_id.
13738 * server.h (add_thread): Update prototype.
13739 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13740 prototypes.
13741
5a1f5858
DJ
137422005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13743
13744 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13745 left-padded registers.
13746 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13747 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13748
e122f1f5
SE
137492005-07-01 Steve Ellcey <sje@cup.hp.com>
13750
13751 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13752 * configure: Regenerate.
13753 * config.in: Regenerate.
13754 * server.h (NEED_DECLARATION_STRERROR):
13755 Replace with !HAVE_DECL_STRERROR.
13756
d592fa2f
DJ
137572005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13758
13759 * linux-low.c (linux_wait, linux_send_signal): Don't test
13760 an unsigned long variable for > 0 if it could be MAX_ULONG.
13761 * server.c (myresume): Likewise.
13762 * target.c (set_desired_inferior): Likewise.
13763
ccbd4912
MK
137642005-06-13 Mark Kettenis <kettenis@gnu.org>
13765
13766 * configure.ac: Simplify and improve check for socklen_t.
13767 * configure, config.in: Regenerate.
13768
f450004a
DJ
137692005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13770
13771 * acconfig.h: Remove.
13772 * configure.ac: Add a test for socklen_t. Use three-argument
13773 AC_DEFINE throughout.
13774 * config.in: Regenerated using autoheader 2.59.
13775 * configure: Regenerated.
13776
13777 * gdbreplay.c (socklen_t): Provide a default.
13778 (remote_open): Use socklen_t.
13779 * remote-utils.c (socklen_t): Provide a default.
13780 (remote_open): Use socklen_t.
13781 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13782 unsigned char.
13783
13784 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13785 char for buffers.
13786 * linux-low.c (linux_read_memory, linux_write_memory)
13787 (linux_read_auxv): Likewise.
13788 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13789 (check_mem_write): Likewise.
13790 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13791 Likewise.
13792 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13793 (registers_from_string, register_data): Likewise.
13794 * server.c (handle_query, main): Likewise.
13795 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13796 (decode_M_packet): Likewise.
13797 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13798 * target.h (struct target_ops): Update read_memory, write_memory,
13799 and read_auxv.
13800 (read_inferior_memory, write_inferior_memory): Update.
13801 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13802 to unsigned char *.
13803 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13804 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13805 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13806 linux-s390-low.c, linux-sh-low.c: Update for changes in
13807 read_inferior_memory and the_low_target->breakpoint.
13808
eee84df1
DJ
138092005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13810
13811 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13812 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13813 * configure.srv: Add powerpc64-*-linux*.
13814 * linux-ppc64-low.c: New file.
13815
45b134e5
OF
138162005-05-23 Orjan Friberg <orjanf@axis.com>
13817
13818 * linux-cris-low.c: New file with support for CRIS.
13819 * linux-crisv32-low.c: Ditto for CRISv32.
13820 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13821 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 13822 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
13823 reg-crisv32.o, and reg-crisv32.c to make rules.
13824 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13825 recognized targets.
13826
48d93c75
UW
138272005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13828
13829 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13830 of sizeof (PTRACE_XFER_TYPE).
13831 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13832
e013ee27
OF
138332005-05-12 Orjan Friberg <orjanf@axis.com>
13834
889bf7c5 13835 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
13836 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13837 pointers for hardware watchpoint support.
13838 * linux-low.h (struct linux_target_ops): Ditto.
13839 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13840 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13841 to linux_target_ops.
13842 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13843 reply packet.
13844 * server.c (main): Recognize 'Z' and 'z' packets.
13845
b0ded00b
UW
138462005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13847
13848 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13849 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13850 (the_low_target): Add new members.
13851
8643e2ad
DJ
138522005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13853
13854 * proc-service.c (ps_lgetregs): Search all_processes instead of
13855 all_threads.
13856
fc620387
DJ
138572005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13858
13859 * server.c (start_inferior): Change return type to int.
13860 (attach_inferior): Change sigptr to int *.
13861 (handle_v_cont, handle_v_requests): Change signal to int *.
13862 (main): Change signal to int.
13863
138642005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
13865
13866 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13867 * configure.srv: Add m32r*-*-linux*.
13868 * linux-m32r-low.c: New file.
13869
e0e76420
DJ
138702005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13871
13872 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13873
a1928bad
DJ
138742005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13875
13876 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13877 Take unsigned long arguments for PIDs.
13878 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13879 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13880 (wait_for_sigstop, linux_resume_one_process)
13881 (regsets_fetch_inferior_registers, linux_send_signal)
13882 (linux_read_auxv): Likewise. Update the types of variables holding
13883 PIDs. Update format string specifiers.
13884 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13885 * remote-utils.c (prepare_resume_reply): Likewise.
13886 * server.c (cont_thread, general_thread, step_thread)
13887 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13888 unsigned long.
13889 (handle_query): Update format specifiers.
13890 (handle_v_cont, main): Use strtoul for thread IDs.
13891 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13892 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13893 (general_thread, step_thread, thread_from_wait)
13894 (old_thread_from_wait): Update.
13895 * target.h (struct thread_resume): Use unsigned long for THREAD.
13896 (struct target_ops): Use unsigned long for arguments to attach and
13897 thread_alive.
13898
dcdb98d2
DJ
138992005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13900
13901 * acinclude.m4: Include bfd/bfd.m4 directly.
13902 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13903 <agriffis@toolchain.org>.
13904 * aclocal.m4, configure: Regenerated.
13905
bec39cab
AC
139062005-01-07 Andrew Cagney <cagney@gnu.org>
13907
13908 * configure.ac: Rename configure.in, require autoconf 2.59.
13909 * configure: Re-generate.
13910
434c4c77
DJ
139112004-12-08 Daniel Jacobowitz <dan@debian.org>
13912
13913 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13914 LIBS when finished.
13915 * aclocal.m4: Regenerated.
13916 * configure: Regenerated.
13917
db1d3e1b
AS
139182004-11-21 Andreas Schwab <schwab@suse.de>
13919
13920 * linux-m68k-low.c (m68k_num_gregs): Define.
13921 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13922 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13923 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13924 (m68k_breakpoint_at): New. Add to the_low_target.
13925
13926 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13927 srv_linux_thread_db to yes.
13928
43360365
JB
139292004-10-20 Joel Brobecker <brobecker@gnat.com>
13930
13931 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13932 (ARCH_SET_FS): Likewise.
13933 (ARCH_GET_FS): Likewise.
13934 (ARCH_GET_GS): Likewise.
13935
fd500816
DJ
139362004-10-16 Daniel Jacobowitz <dan@debian.org>
13937
13938 * linux-i386-low.c (ps_get_thread_area): New.
13939 * linux-x86-64-low.c (ps_get_thread_area): New.
13940 * linux-low.c: Include <sys/syscall.h>.
13941 (linux_kill_one_process): Don't kill the first thread here.
13942 (linux_kill): Kill the first thread here.
13943 (kill_lwp): New function.
13944 (send_sigstop, linux_send_signal): Use it.
13945 * proc-service.c: Clean up #ifdefs.
13946 (fpregset_info): Delete.
13947 (ps_lgetregs): Update and enable implementation.
13948 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13949 implementations.
13950 * remote-utils.c (struct sym_cache, symbol_cache): New.
13951 (input_interrupt): Print a clearer message.
13952 (async_io_enabled): New variable.
13953 (enable_async_io, disable_async_io): Use it. Update comments.
13954 (look_up_one_symbol): Use the symbol cache.
13955 * thread-db.c (thread_db_look_up_symbols): New function.
13956 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13957
f6de3c42
DJ
139582004-10-16 Daniel Jacobowitz <dan@debian.org>
13959
13960 * configure.in: Test for -rdynamic.
13961 * configure: Regenerated.
13962 * Makefile (INTERNAL_LDFLAGS): New.
13963 (gdbserver, gdbreplay): Use it.
13964
2c0fc042
AC
139652004-09-02 Andrew Cagney <cagney@gnu.org>
13966
13967 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13968
075b3282
DJ
139692004-03-23 Daniel Jacobowitz <drow@mvista.com>
13970
13971 * linux-low.c (linux_wait): Clear all_processes list also.
13972
fa6a77dc
DJ
139732004-03-12 Daniel Jacobowitz <drow@mvista.com>
13974
13975 * linux-low.c: Include <errno.h>. Remove extern declaration of
13976 errno.
13977
6d782a97
DJ
139782004-03-12 Daniel Jacobowitz <drow@mvista.com>
13979
13980 * gdbreplay.c, server.h, utils.c: Update copyright years.
13981
3a7fb99b
DJ
139822004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13983
13984 * server.c (main): Print child status or termination signal from
13985 variable 'signal', not 'sig'.
13986
c3e735a6
DJ
139872004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13988
13989 * linux-low.c (linux_read_memory): Change return type to
13990 int. Check for and return error from ptrace().
13991 * target.c (read_inferior_memory): Change return type to int. Pass
13992 back return status from the_target->read_memory().
13993 * target.h (struct target_ops): Adapt *read_memory() prototype.
13994 Update comment.
13995 (read_inferior_memory): Adapt prototype.
13996 * server.c (main): Return an error packet if
13997 read_inferior_memory() returns an error.
13998
a59d1c82
DJ
139992004-03-04 Daniel Jacobowitz <drow@mvista.com>
14000
14001 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14002 Unify with other clean targets.
14003
dc3f8883
DJ
140042004-02-29 Daniel Jacobowitz <drow@mvista.com>
14005
14006 * server.c (handle_v_cont): Call set_desired_inferior.
14007
89a208da
DJ
140082004-02-29 Daniel Jacobowitz <drow@mvista.com>
14009
14010 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14011
62ea82f5
DJ
140122004-02-29 Daniel Jacobowitz <drow@mvista.com>
14013
14014 * linux-low.c (linux_wait): Unblock async I/O.
14015 (linux_resume): Block and enable async I/O.
14016 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14017 * server.h (block_async_io, unblock_async_io): Add prototypes.
14018
6910d122
DJ
140192004-02-29 Daniel Jacobowitz <drow@mvista.com>
14020
14021 * remote-utils.c (remote_open): Print a status notice after
14022 opening a TCP port.
14023 * server.c (attach_inferior): Print a status notice after
14024 attaching.
14025
140262004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14027
14028 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14029
c89dc5d4
DJ
140302004-02-26 Daniel Jacobowitz <drow@mvista.com>
14031
14032 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14033 error packet.
14034 * server.c, target.h: Update copyright years.
14035
4b8dad4a
RM
140362004-02-25 Roland McGrath <roland@redhat.com>
14037
14038 * target.h (struct target_ops): New member `read_auxv'.
14039 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14040 * linux-low.c (linux_read_auxv): New function.
14041 (linux_target_ops): Initialize `read_auxv' member to that.
14042
d7446758
JB
140432004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14044
14045 Committed by Jim Blandy <jimb@redhat.com>.
14046
14047 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14048 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14049 instead of GPR_SIZE to distiguish s390 and s390x targets.
14050
5544ad89
DJ
140512004-01-31 Daniel Jacobowitz <drow@mvista.com>
14052
14053 * linux-low.c: Update copyright year.
14054 (check_removed_breakpoint): Clear pending_is_breakpoint.
14055 (linux_set_resume_request, linux_queue_one_thread)
14056 (resume_status_pending_p): New functions.
14057 (linux_continue_one_thread): Use process->resume.
14058 (linux_resume): Only resume threads if there are no pending events.
14059 * linux-low.h (struct process_info): Add resume request
14060 pointer.
14061
2a68b70e
DJ
140622004-01-30 Daniel Jacobowitz <drow@mvista.com>
14063
14064 * regcache.c (new_register_cache): Clear the allocated register
14065 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14066
64386c31
DJ
140672003-10-13 Daniel Jacobowitz <drow@mvista.com>
14068
14069 * linux-low.c (linux_resume): Take a struct thread_resume *
14070 argument.
14071 (linux_wait): Update call.
14072 (resume_ptr): New static variable.
14073 (linux_continue_one_thread): Renamed from
14074 linux_continue_one_process. Use resume_ptr.
14075 (linux_resume): Use linux_continue_one_thread.
14076 * server.c (handle_v_cont, handle_v_requests): New functions.
14077 (myresume): New function.
14078 (main): Handle 'v' case.
14079 * target.h (struct thread_resume): New type.
14080 (struct target_ops): Change argument of "resume" to struct
14081 thread_resume *.
14082 (myresume): Delete macro.
14083
c938e9b0
L
140842003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14085
14086 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14087 (uninstall): Support DESTDIR.
14088
7f313d07
BC
14089Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14090
14091 * configure.srv: Add xscale*linux copy of arm*linux entry.
14092
3b2fc2ea
DJ
140932003-07-24 Daniel Jacobowitz <drow@mvista.com>
14094
14095 * linux-arm-low.c (arm_reinsert_addr): New function.
14096 (the_low_target): Add arm_reinsert_addr.
14097
1c0a559e
MK
140982003-07-08 Mark Kettenis <kettenis@gnu.org>
14099
14100 * mem-break.c: Remove whitespace at end of file.
14101
43d5792c
DJ
141022003-06-28 Daniel Jacobowitz <drow@mvista.com>
14103
14104 * configure.in: Check whether we need to prototype strerror.
14105 * server.h: Optionally prototype strerror.
14106 * gdbreplay.c (perror_with_name): Use strerror.
14107 * linux-low.c (linux_attach_lwp): Use strerror.
14108 * utils.c (perror_with_name): Use strerror.
14109 * config.in, configure: Regenerated.
14110
c8a86edf
DJ
141112003-06-28 Daniel Jacobowitz <drow@mvista.com>
14112
14113 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14114 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14115
73d37363
DJ
141162003-06-20 Daniel Jacobowitz <drow@mvista.com>
14117
14118 * Makefile.in (SFILES): Update.
14119 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14120 low-sun3.c: Remove files.
14121
6ad8ae5c
DJ
141222003-06-17 Daniel Jacobowitz <drow@mvista.com>
14123
14124 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14125 (linux_detach_one_process, linux_detach): New functions.
14126 (linux_target_ops): Add linux_detach.
14127 * server.c (main): Handle 'D' packet.
14128 * target.h (struct target_ops): Add "detach" member.
14129 (detach_inferior): Define.
14130
1581182a
MK
141312003-06-13 Mark Kettenis <kettenis@gnu.org>
14132
14133 From Kelley Cook <kelleycook@wideopenwest.com>:
14134 * configure.srv: Accept i[34567]86 variants.
14135
e5379b03
DJ
141362003-06-05 Daniel Jacobowitz <drow@mvista.com>
14137
14138 * linux-low.c (linux_wait_for_event): Correct comment typos.
14139 (linux_resume_one_process): Call check_removed_breakpoint.
14140 (linux_send_signal): New function.
14141 (linux_target_ops): Add linux_send_signal.
14142 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14143 of kill.
14144 * target.h (struct target_ops): Add send_signal.
14145
2ff29de4
JB
141462003-05-29 Jim Blandy <jimb@redhat.com>
14147
14148 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14149 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14150 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14151 away part of the register's value.
14152
254787d4
DJ
141532003-03-26 Daniel Jacobowitz <drow@mvista.com>
14154
14155 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14156 (linux_wait_for_event, linux_init_signals): Likewise.
14157
94e10508
DJ
141582003-03-17 Daniel Jacobowitz <drow@mvista.com>
14159
14160 * configure.in: Check for stdlib.h.
14161 * configure: Regenerated.
14162 * config.in: Regenerated.
14163
4c0711e0
DJ
141642003-01-04 Andreas Schwab <schwab@suse.de>
14165
14166 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14167
ef66e766
AC
141682003-01-02 Andrew Cagney <ac131313@redhat.com>
14169
14170 * Makefile.in: Remove obsolete code.
14171
a1358604
DJ
141722002-11-20 Daniel Jacobowitz <drow@mvista.com>
14173
14174 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14175 defined(PT_FPR0_HI).
14176
23ce3b1c
DJ
141772002-11-17 Stuart Hughes <seh@zee2.com>
14178
14179 * linux-arm-low.c (arm_num_regs): Increase.
14180 (arm_regmap): Include status register.
14181
141822002-11-17 Daniel Jacobowitz <drow@mvista.com>
14183
14184 * linux-low.c (register_addr): Remove incorrect -1 check.
14185
a9fa9f7d
DJ
141862002-08-29 Daniel Jacobowitz <drow@mvista.com>
14187
14188 * linux-low.c (linux_create_inferior): Call setpgid. Return
14189 the new PID.
14190 (unstopped_p, linux_signal_pid): Remove.
14191 (linux_target_ops): Remove linux_signal_pid.
14192 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14193 global instead of target method.
14194 * target.h (struct target_ops): Remove signal_pid. Update comment
14195 for create_inferior.
14196 * server.c (signal_pid): New variable.
14197 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 14198 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
14199 (attach_inferior): Set signal_pid.
14200
17574093
DJ
142012002-08-23 Daniel Jacobowitz <drow@mvista.com>
14202
14203 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14204
142052002-08-20 Jim Blandy <jimb@redhat.com>
14206
14207 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14208 default for this.
14209
142102002-08-01 Andrew Cagney <cagney@redhat.com>
14211
14212 * Makefile.in: Make chill references obsolete.
14213
142142002-07-24 Kevin Buettner <kevinb@redhat.com>
14215
14216 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14217 * configure: Regenerate.
14218 * config.in: Regenerate.
14219
142202002-07-09 David O'Brien <obrien@FreeBSD.org>
14221
14222 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14223 (perror_with_name, remote_close, remote_open, expect, play): Static.
14224
142252002-07-04 Michal Ludvig <mludvig@suse.cz>
14226
4b8dad4a 14227 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
14228 byte offsets instead of an array of indexes.
14229 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14230
142312002-06-13 Daniel Jacobowitz <drow@mvista.com>
14232
14233 * regcache.c: Add comment.
14234
142352002-06-11 Daniel Jacobowitz <drow@mvista.com>
14236
14237 * thread-db.c: New file.
14238 * proc-service.c: New file.
14239 * acinclude.m4: New file.
14240 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14241 proc-service.o, and thread-db.o.
14242 (linux-low.o): Add USE_THREAD_DB.
14243 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14244 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14245 * aclocal.m4: Regenerated.
14246 * config.in: Regenerated.
14247 * configure: Regenerated.
14248 * configure.in: Check for proc_service.h, sys/procfs.h,
14249 thread_db.h, and linux/elf.h headrs.
14250 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14251 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14252 Check for -lthread_db and thread support.
14253 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14254 PowerPC, and SuperH.
14255 * i387-fp.c: Constify arguments.
14256 * i387-fp.h: Likewise.
14257 * inferiors.c: (struct thread_info): Renamed from
14258 `struct inferior_info'. Remove PID member. Use generic inferior
14259 list header. All uses updated.
14260 (inferiors, signal_pid): Removed.
14261 (all_threads): New variable.
14262 (get_thread): Define.
14263 (add_inferior_to_list): New function.
14264 (for_each_inferior): New function.
14265 (change_inferior_id): New function.
14266 (add_inferior): Removed.
14267 (remove_inferior): New function.
14268 (add_thread): New function.
14269 (free_one_thread): New function.
14270 (remove_thread): New function.
14271 (clear_inferiors): Use for_each_inferior and free_one_thread.
14272 (find_inferior): New function.
14273 (find_inferior_id): New function.
14274 (inferior_target_data): Update argument type.
14275 (set_inferior_target_data): Likewise.
14276 (inferior_regcache_data): Likewise.
14277 (set_inferior_regcache_data): Likewise.
14278 * linux-low.c (linux_bp_reinsert): Remove.
14279 (all_processes, stopping_threads, using_thrads)
14280 (struct pending_signals, debug_threads, pid_of): New.
14281 (inferior_pid): Replace with macro.
14282 (struct inferior_linux_data): Remove.
14283 (get_stop_pc, add_process): New functions.
14284 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14285 Use add_process and add_thread.
14286 (linux_attach_lwp): New function, based on old linux_attach. Use
14287 add_process and add_thread. Set stop_expected for new threads.
14288 (linux_attach): New function.
14289 (linux_kill_one_process): New function.
14290 (linux_kill): Kill all LWPs.
14291 (linux_thread_alive): Use find_inferior_id.
14292 (check_removed_breakpoints, status_pending_p): New functions.
14293 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14294 Update. Use WNOHANG. Wait for cloned processes also. Update process
14295 struct for the found process.
14296 (linux_wait_for_event): New function.
14297 (linux_wait): Use it. Support LWPs.
14298 (send_sigstop, wait_for_sigstop, stop_all_processes)
14299 (linux_resume_one_process, linux_continue_one_process): New functions.
14300 (linux_resume): Support LWPs.
14301 (REGISTER_RAW_SIZE): Remove.
14302 (fetch_register): Use register_size instead. Call supply_register.
14303 (usr_store_inferior_registers): Likewise. Call collect_register.
14304 Fix recursive case.
14305 (regsets_fetch_inferior_registers): Improve error message.
14306 (regsets_store_inferior_registers): Add debugging.
14307 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14308 (unstopped_p, linux_signal_pid): New functions.
14309 (linux_target_ops): Add linux_signal_pid.
14310 (linux_init_signals): New function.
14311 (initialize_low): Call it. Initialize using_threads.
14312 * regcache.c (inferior_regcache_data): Add valid
14313 flag.
14314 (get_regcache): Fetch registers lazily. Add fetch argument
14315 and update all callers.
14316 (regcache_invalidate_one, regcache_invalidate): New
14317 functions.
14318 (new_register_cache): Renamed from create_register_cache.
14319 Return the new regcache.
14320 (free_register_cache): Change argument to a void *.
14321 (registers_to_string, registers_from_string): Call get_regcache
14322 with fetch flag set.
14323 (register_data): Make static. Pass fetch flag to get_regcache.
14324 (supply_register): Call get_regcache with fetch flag clear.
14325 (collect_register): Call get_regcache with fetch flag set.
14326 (collect_register_as_string): New function.
14327 * regcache.h: Update.
14328 * remote-utils.c (putpkt): Flush after debug output and use
14329 stderr.
14330 Handle input interrupts while waiting for an ACK.
14331 (input_interrupt): Use signal_pid method.
14332 (getpkt): Flush after debug output and use stderr.
14333 (outreg): Use collect_register_as_string.
14334 (new_thread_notify, dead_thread_notify): New functions.
14335 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14336 and general_thread.
14337 (look_up_one_symbol): Flush after debug output.
14338 * server.c (step_thread, server_waiting): New variables.
14339 (start_inferior): Don't use signal_pid. Update call to mywait.
14340 (attach_inferior): Update call to mywait.
14341 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14342 (main): Don't fetch/store registers explicitly. Use
14343 set_desired_inferior. Support proposed ``Hs'' packet. Update
14344 calls to mywait.
14345 * server.h: Update.
14346 (struct inferior_list, struct_inferior_list_entry): New.
14347 * target.c (set_desired_inferior): New.
14348 (write_inferior_memory): Constify.
14349 (mywait): New function.
14350 * target.h: Update.
14351 (struct target_ops): New signal_pid method.
14352 (mywait): Removed macro, added prototype.
14353
14354 * linux-low.h (regset_func): Removed.
14355 (regset_fill_func, regset_store_func): New.
14356 (enum regset_type): New.
14357 (struct regset_info): Add type field. Use new operation types.
14358 (struct linux_target_ops): stop_pc renamed to get_pc.
14359 Add decr_pc_after_break and breakpoint_at.
14360 (get_process, get_thread_proess, get_process_thread)
14361 (strut process_info, all_processes, linux_attach_lwp)
14362 (thread_db_init): New.
14363
14364 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14365 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14366 (the_low_target): Add new members.
14367 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14368 (i386_store_fpxregset): Constify.
14369 (target_regsets): Add new kind identifier.
14370 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14371 (i386_set_pc): Add debugging.
14372 (i386_breakpoint_at): New function.
14373 (the_low_target): Add new members.
14374 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14375 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14376 (mips_breakpoint_at): New.
14377 (the_low_target): Add new members.
14378 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14379 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14380 (the_low_target): Add new members.
14381 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14382 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14383 (the_low_target): Add new members.
14384 * linux-x86-64-low.c (target_regsets): Add new kind
14385 identifier.
14386
143872002-05-15 Daniel Jacobowitz <drow@mvista.com>
14388
14389 From Martin Pool <mbp@samba.org>:
14390 * server.c (gdbserver_usage): New function.
14391 (main): Call it.
14392
143932002-05-14 Daniel Jacobowitz <drow@mvista.com>
14394
14395 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14396 stop_at -> stop_pc.
14397
143982002-05-04 Andrew Cagney <ac131313@redhat.com>
14399
14400 * Makefile.in: Remove obsolete code.
14401
144022002-04-24 Michal Ludvig <mludvig@suse.cz>
14403
14404 * linux-low.c (regsets_fetch_inferior_registers),
14405 (regsets_store_inferior_registers): Removed cast to int from
14406 ptrace() calls.
14407 * regcache.h: Added declaration of struct inferior_info.
14408
144092002-04-20 Daniel Jacobowitz <drow@mvista.com>
14410
14411 * inferiors.c (struct inferior_info): Add regcache_data.
14412 (add_inferior): Call create_register_cache.
14413 (clear_inferiors): Call free_register_cache.
14414 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14415 * regcache.c (struct inferior_regcache_data): New.
14416 (registers): Remove.
14417 (get_regcache): New function.
14418 (create_register_cache, free_register_cache): New functions.
14419 (set_register_cache): Don't initialize the register cache here.
14420 (registers_to_string, registers_from_string, register_data): Call
14421 get_regcache.
14422 * regcache.h: Add prototypes.
14423 * server.h: Likewise.
14424
144252002-04-20 Daniel Jacobowitz <drow@mvista.com>
14426
14427 * mem-break.c: New file.
14428 * mem-break.h: New file.
14429 * Makefile.in: Add mem-break.o rule; update server.h
14430 dependencies.
14431 * inferiors.c (struct inferior_info): Add target_data
14432 member.
14433 (clear_inferiors): Free target_data member if set.
14434 (inferior_target_data, set_inferior_target_data): New functions.
14435 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14436 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14437 * linux-low.c (linux_bp_reinsert): New variable.
14438 (struct inferior_linux_data): New.
14439 (linux_create_inferior): Use set_inferior_target_data.
14440 (linux_attach): Likewise. Call add_inferior.
14441 (linux_wait_for_one_inferior): New function.
14442 (linux_wait): Call it.
14443 (linux_write_memory): Add const.
14444 (initialize_low): Call set_breakpoint_data.
14445 * linux-low.h (struct linux_target_ops): Add breakpoint
14446 handling members.
14447 * server.c (attach_inferior): Remove extra add_inferior
14448 call.
14449 * server.h: Include mem-break.h. Update inferior.c
14450 prototypes.
14451 * target.c (read_inferior_memory)
14452 (write_inferior_memory): New functions.
14453 * target.h (read_inferior_memory)
14454 (write_inferior_memory): Change macros to prototypes.
14455 (struct target_ops): Update comments. Add const to write_memory
14456 definition.
14457
144582002-04-11 Daniel Jacobowitz <drow@mvista.com>
14459
14460 * linux-low.c (usr_store_inferior_registers): Support
14461 registers which are allowed to fail to store.
14462 * linux-low.h (linux_target_ops): Likewise.
14463 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14464 (ppc_cannot_store_register): FPSCR may not be storable.
14465
144662002-04-09 Daniel Jacobowitz <drow@mvista.com>
14467
14468 * server.h: Include <string.h> if HAVE_STRING_H.
14469 * ChangeLog: Correct paths in last ChangeLog entry.
14470
144712002-04-09 Daniel Jacobowitz <drow@mvista.com>
14472
14473 * linux-low.h: Remove obsolete prototypes.
14474 (struct linux_target_ops): New.
14475 (extern the_low_target): New.
14476 * linux-low.c (num_regs, regmap): Remove declarations.
14477 (register_addr): Use the_low_target explicitly.
14478 (fetch_register): Likewise.
14479 (usr_fetch_inferior_registers): Likewise.
14480 (usr_store_inferior_registers): Likewise.
14481 * linux-arm-low.c (num_regs): Remove.
14482 (arm_num_regs): Define.
14483 (arm_regmap): Renamed from regmap, made static.
14484 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14485 made static.
14486 (arm_cannot_store_register): Renamed from cannot_store_register,
14487 made static.
14488 (the_low_target): New.
14489 * linux-i386-low.c (num_regs): Remove.
14490 (i386_num_regs): Define.
14491 (i386_regmap): Renamed from regmap, made static.
14492 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14493 made static.
14494 (i386_cannot_store_register): Renamed from cannot_store_register,
14495 made static.
14496 (the_low_target): New.
14497 * linux-ia64-low.c (num_regs): Remove.
14498 (ia64_num_regs): Define.
14499 (ia64_regmap): Renamed from regmap, made static.
14500 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14501 made static.
14502 (ia64_cannot_store_register): Renamed from cannot_store_register,
14503 made static.
14504 (the_low_target): New.
14505 * linux-m68k-low.c (num_regs): Remove.
14506 (m68k_num_regs): Define.
14507 (m68k_regmap): Renamed from regmap, made static.
14508 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14509 made static.
14510 (m68k_cannot_store_register): Renamed from cannot_store_register,
14511 made static.
14512 (the_low_target): New.
14513 * linux-mips-low.c (num_regs): Remove.
14514 (mips_num_regs): Define.
14515 (mips_regmap): Renamed from regmap, made static.
14516 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14517 made static.
14518 (mips_cannot_store_register): Renamed from cannot_store_register,
14519 made static.
14520 (the_low_target): New.
14521 * linux-ppc-low.c (num_regs): Remove.
14522 (ppc_num_regs): Define.
14523 (ppc_regmap): Renamed from regmap, made static.
14524 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14525 made static.
14526 (ppc_cannot_store_register): Renamed from cannot_store_register,
14527 made static.
14528 (the_low_target): New.
14529 * linux-s390-low.c (num_regs): Remove.
14530 (s390_num_regs): Define.
14531 (s390_regmap): Renamed from regmap, made static.
14532 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14533 made static.
14534 (s390_cannot_store_register): Renamed from cannot_store_register,
14535 made static.
14536 (the_low_target): New.
14537 * linux-sh-low.c (num_regs): Remove.
14538 (sh_num_regs): Define.
14539 (sh_regmap): Renamed from regmap, made static.
14540 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14541 made static.
14542 (sh_cannot_store_register): Renamed from cannot_store_register,
14543 made static.
14544 (the_low_target): New.
14545 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14546 (the_low_target): New.
14547
145482002-04-09 Daniel Jacobowitz <drow@mvista.com>
14549
14550 * Makefile.in: Add stamp-h target.
14551 * configure.in: Create stamp-h.
14552 * configure: Regenerated.
14553
145542002-04-09 Daniel Jacobowitz <drow@mvista.com>
14555
14556 * inferiors.c: New file.
14557 * target.c: New file.
14558 * target.h: New file.
14559 * Makefile.in: Add target.o and inferiors.o. Update
14560 dependencies.
14561 * linux-low.c (inferior_pid): New static variable,
14562 moved from server.c.
14563 (linux_create_inferior): Renamed from create_inferior.
14564 Call add_inferior. Return 0 on success instead of a PID.
14565 (linux_attach): Renamed from myattach.
14566 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14567 (linux_thread_alive): Renamed from mythread_alive.
14568 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14569 child dies.
14570 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14571 (regsets_store_inferior_registers): Correct error message.
14572 Add missing ``return 0''.
14573 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14574 (linux_store_registers): Renamed from store_inferior_registers.
14575 (linux_read_memory): Renamed from read_inferior_memory.
14576 (linux_write_memory): Renamed from write_inferior_memory.
14577 (linux_target_ops): New structure.
14578 (initialize_low): Call set_target_ops ().
14579 * remote-utils.c (unhexify): New function.
14580 (hexify): New function.
14581 (input_interrupt): Send signals to ``signal_pid''.
14582 * server.c (inferior_pid): Remove.
14583 (start_inferior): Update create_inferior call.
14584 (attach_inferior): Call add_inferior.
14585 (handle_query): New function.
14586 (main): Call handle_query for `q' packets.
14587 * server.h: Include "target.h". Remove obsolete prototypes.
14588 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14589
145902002-04-09 Daniel Jacobowitz <drow@mvista.com>
14591
14592 * Makefile.in: Add WARN_CFLAGS. Update configury
14593 dependencies.
14594 * configure.in: Check for <string.h>
14595 * configure: Regenerate.
14596 * config.in: Regenerate.
14597 * gdbreplay.c: Include needed system headers.
14598 (remote_open): Remove strchr prototype.
14599 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14600 * regcache.c (supply_register): Change buf argument to const void *.
14601 (supply_register_by_name): Likewise.
14602 (collect_register): Change buf argument to void *.
14603 (collect_register_by_name): Likewise.
14604 * regcache.h: Add missing prototypes.
14605 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14606 * server.c (handle_query): New function.
14607 (attached): New static variable, moved out of main.
14608 (main): Quiet longjmp clobber warnings.
14609 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14610 * utils.c (error): Remove NORETURN.
14611 (fatal): Likewise.
This page took 1.931509 seconds and 4 git commands to generate.