Normalize names of some source files
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
b593ecca
SM
12016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * Makefile.in (SFILES, OBS): Flatten list and order
4 alphabetically.
5
9986ba08
PA
62016-11-23 Pedro Alves <palves@redhat.com>
7
8 * event-loop.c (handle_file_event): Use warning.
9 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
10 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
11 Use warning.
12
4eefa7bc
PA
132016-11-23 Pedro Alves <palves@redhat.com>
14
15 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
16 output.
17 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
18 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
19 debug_printf and debug_flush for debug output.
20 * server.c (handle_general_set): Likewise.
21 * thread-db.c (try_thread_db_load): Use debug_printf for debug
22 output.
23
5443506e
SM
242016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
25
26 * Makefile.in (.c.o): Replace rule with ...
27 (%.o: %.c): ... this one.
28
3b165252
SM
292016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
30
31 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
32 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
33 make.
34 * configure.ac: Remove checks for the make program.
35 * configure: Re-generate.
36
0bcda685
PA
372016-10-28 Pedro Alves <palves@redhat.com>
38
39 * Makefile.in (CXX_DIALECT): Get from configure.
40 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
41 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
42 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
43 * config.in: Regenerate.
44 * configure: Regenerate.
45
c3805894
YQ
462016-10-27 Yao Qi <yao.qi@linaro.org>
47
48 * linux-low.c (linux_supports_range_stepping): Return true if
49 can_software_single_step return true.
50
89342618
YQ
512016-10-27 Yao Qi <yao.qi@linaro.org>
52
53 * inferiors.c (find_inferior_in_random): New function.
54 * inferiors.h (find_inferior_in_random): Declare.
55 * linux-low.c (linux_wait_for_event_filtered): Call
56 find_inferior_in_random instead of find_inferior.
57
e3652c84
YQ
582016-10-27 Yao Qi <yao.qi@linaro.org>
59
60 * linux-low.c (linux_wait_1): If single-step breakpoints are
61 inserted, remove them.
62
5a04c4cf
PA
632016-10-26 Pedro Alves <palves@redhat.com>
64
65 * linux-low.c (handle_extended_wait): Link parent/child fork
66 threads.
67 (linux_wait_1): Unlink them.
68 (linux_set_resume_request): Ignore resume requests for
69 already-resumed and unhandled fork child threads.
70 * linux-low.h (struct lwp_info) <fork_relative>: New field.
71 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
72 New functions.
73 (handle_v_requests) <vCont>: Don't call require_running.
74 * server.h (in_queued_stop_replies): New declaration.
75
cb93dc7f
YQ
762016-10-24 Yao Qi <yao.qi@linaro.org>
77
78 PR server/20733
79 * linux-aarch64-low.c (append_insns): Cast the return value to
80 'uint32_t *'.
81
a1078bea
YQ
822016-10-10 Yao Qi <yao.qi@linaro.org>
83
84 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
85
1fb77080
SDJ
862016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
87
88 * target.c (target_supports_multi_process): New function, moved
89 from...
90 * target.h (target_supports_multi_process): ... here. Remove
91 macro.
92
39b5a3b9
TT
932016-10-05 Tom Tromey <tom@tromey.com>
94
95 PR remote/20655:
96 * tracepoint.c (handle_tracepoint_bkpts): Check
97 ipa_error_tracepoint, not ipa_stopping_tracepoint.
98
c1d0b70a
YQ
992016-10-05 Yao Qi <yao.qi@linaro.org>
100
101 * configure.srv: Update the path of arm-*.xml files.
102
0a69eedb
YQ
1032016-10-05 Terry Guo <terry.guo@arm.com>
104 Yao Qi <yao.qi@linaro.org>
105
106 * Makefile.in: Adjust the path of rules.
107 * configure.srv: Update the path of xml files.
108 * regformats/arm-with-iwmmxt.dat: Regenerated.
109 * regformats/arm-with-neon.dat: Likewise.
110 * regformats/arm-with-vfpv2.dat: Likewise.
111 * regformats/arm-with-vfpv3.dat Likewise.
112
17e16485
YQ
1132016-09-30 Yao Qi <yao.qi@linaro.org>
114
115 PR gdbserver/20627
116 * target.c (target_stop_and_wait): Don't call
117 target_continue_no_signal, use resume_stop instead.
118
edeeb602
YQ
1192016-09-26 Yao Qi <yao.qi@linaro.org>
120
121 * linux-low.c (linux_wait_1): Call debug_exit.
122
503b1c39
PA
1232016-09-23 Pedro Alves <palves@redhat.com>
124
125 * Makefile.in (SFILES): Add common/new-op.c.
126 (OBS): Add common/new-op.o.
127 (new-op.o): New rule.
128
74172ecf
SM
1292016-09-21 Simon Marchi <simon.marchi@ericsson.com>
130
131 * .gitinore: Ignore more files.
132
fc6cda2e
YQ
1332016-09-21 Yao Qi <yao.qi@linaro.org>
134
135 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
136 23.
137
bc1e6c81
SDJ
1382016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
139
140 * server.c (start_inferior): Call target_mourn_inferior instead of
141 mourn_inferior; pass ptid_t argument to it.
142 (resume): Likewise.
143 (handle_target_event): Likewise.
144 * target.c (target_mourn_inferior): New function.
145 * target.h (mourn_inferior): Delete macro.
146
0e00e962
AA
1472016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
148
149 * linux-low.c (lwp_is_stepping): New function.
150
1d8cb77d
CL
1512016-09-06 Carl Love <cel@us.ibm.com>
152
153 * server.c (start_inferior): Fixed comment, requested comment change
154 didn't get updated correctly. Removed reference to ptrace () call as
155 it is only true on Linux systems.
156
7313bced
CL
1572016-09-06 Carl Love <cel@us.ibm.com>
158
159 * server.c (start_inferior): Do not call
160 function target_post_create_inferior () if the
161 inferior process has already exited.
162
cf6de44d
PA
1632016-09-05 Pedro Alves <palves@redhat.com>
164
165 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
166 (COMPILE.pre, CC_LD): Use CXX directly.
167 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
168 * acinclude.m4: Don't include build-with-cxx.m4.
169 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
170 * configure: Regenerate.
171
c1da6748
AT
1722016-09-02 Akash Trehan <akash.trehan123@gmail.com>
173
174 PR gdb/19495
175 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
176 call writing data to own_buf.
177
f2b9e3df
SDJ
1782016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
179
180 * target.c (mywait): Call target_wait instead of
181 the_target->wait.
182 (target_wait): New function.
183
049a8570
SDJ
1842016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
185
186 * server.c (start_inferior): New variable 'ptid'. Replace calls
187 to the_target->resume by target_continue{,_no_signal}, depending
188 on the case.
189 * target.c (target_stop_and_wait): Call target_continue_no_signal
190 instead of the_target->resume.
191 (target_continue): New function.
192
3aa5cfa0
AT
1932016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
194
195 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
196
754653a7
AZ
1972016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
198
199 PR server/20491
200 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
201 ps_prochandle.
202 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
203 * linux-arm-low.c (ps_get_thread_area): Likewise.
204 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
205 * linux-m68k-low.c (ps_get_thread_area): Likewise.
206 * linux-mips-low.c (ps_get_thread_area): Likewise.
207 * linux-nios2-low.c (ps_get_thread_area): Likewise.
208 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
209 * linux-x86-low.c (ps_get_thread_area): Likewise.
210 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
211
ed036b40
PA
2122016-08-19 Pedro Alves <palves@redhat.com>
213
214 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
215
c8ef42ee
PA
2162016-08-19 Pedro Alves <palves@redhat.com>
217
218 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
219 comment. Use memcpy instead of casting through unsigned long.
220
9c235a72
PA
2212016-08-19 Pedro Alves <palves@redhat.com>
222
223 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
224 allocating around 0x80000000.
225
201506da
PA
2262016-08-19 Pedro Alves <palves@redhat.com>
227
228 PR gdb/20415
229 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
230 (x32-avx512-linux-ipa.o): New rules.
231 * configure.ac (x86_64-*-linux*): New x32 check.
232 * configure.srv (ipa_x32_linux_regobj): New.
233 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
234 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
235 descriptions.
236 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
237 descriptions.
238 * configure: Regenerate.
239
f348d89a
PA
2402016-08-09 Pedro Alves <palves@redhat.com>
241
242 PR gdb/18653
243 * Makefile.in (OBS): Add signals-state-save-restore.o.
244 (signals-state-save-restore.o): New rule.
245 * config.in: Regenerate.
246 * configure: Regenerate.
247 * linux-low.c: Include "signals-state-save-restore.h".
248 (linux_create_inferior): Call
249 restore_original_signals_state.
250 * server.c: Include "dispositions-save-restore.h".
251 (captured_main): Call save_original_signals_state.
252
1baf5149
PA
2532016-08-05 Pedro Alves <palves@redhat.com>
254
255 * configure: Regenerate.
256
fcd4a73d
YQ
2572016-08-04 Yao Qi <yao.qi@linaro.org>
258
259 * linux-low.c (regsets_fetch_inferior_registers): Check
260 errno is ESRCH or not.
261
979659d0
YQ
2622016-08-02 Yao Qi <yao.qi@linaro.org>
263
264 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
265 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
266 (thread_db_load_search): Update.
267 (try_thread_db_load_1): Don't look for td_ta_event_addr,
268 td_ta_set_event and td_ta_event_getmsg.
269
6598661d
PA
2702016-07-26 Pedro Alves <palves@redhat.com>
271
272 PR server/20414
273 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
274 of unsigned long for 64-bit registers and use uint32_t instead of
275 unsigned int for 32-bit registers.
276
9cf12d57
PA
2772016-07-26 Pedro Alves <palves@redhat.com>
278
279 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
280 to 'ptrace'.
281
305450ed
TT
2822016-07-21 Tom Tromey <tom@tromey.com>
283
284 * configure: Rebuild.
285
2583da7c
YQ
2862016-07-21 Yao Qi <yao.qi@linaro.org>
287
288 * mem-break.c (find_gdb_breakpoint): Cast bp to
289 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
290
21536b36
YQ
2912016-07-21 Yao Qi <yao.qi@linaro.org>
292
293 * server.c (handle_v_requests): Support s and S actions
294 if target_supports_software_single_step return true.
295
8901d193
YQ
2962016-07-21 Yao Qi <yao.qi@linaro.org>
297
298 * linux-low.c (resume_stopped_resumed_lwps): If resume request
299 is resume_step, call maybe_hw_step.
300 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
301 and unstop them.
302 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
303 breakpoints or not.
304 (proceed_one_lwp): If resume request is resume_step, install
305 reinsert breakpoints and call maybe_hw_step.
306
0e9a339e
YQ
3072016-07-21 Yao Qi <yao.qi@linaro.org>
308
309 * linux-low.c (proceed_one_lwp): Declare.
310 (linux_resume_one_thread): Remove local variable 'step'.
311 Lift code enqueue signal. Call proceed_one_lwp instead of
312 linux_resume_one_lwp.
313
4281b351
YQ
3142016-07-21 Yao Qi <yao.qi@linaro.org>
315
316 * linux-low.c (linux_resume_one_thread): Call
317 enqueue_pending_signal.
318
984a2c04
YQ
3192016-07-21 Yao Qi <yao.qi@linaro.org>
320
321 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
322 * inferiors.c (do_restore_current_thread_cleanup): New function.
323 (make_cleanup_restore_current_thread): Likewise.
324 * linux-low.c (install_software_single_step_breakpoints): Call
325 make_cleanup_restore_current_thread. Switch current_thread to
326 thread.
327
bec903c9
YQ
3282016-07-21 Yao Qi <yao.qi@linaro.org>
329
330 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
331 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
332 (clone_one_breakpoint): Likewise.
333 (delete_reinsert_breakpoints): Change parameter to thread.
334 Callers updated.
335 (has_reinsert_breakpoints): Likewise.
336 (uninsert_reinsert_breakpoints): Likewise.
337 (reinsert_reinsert_breakpoints): Likewise.
338 * mem-break.h (set_reinsert_breakpoint): Update declaration.
339 (delete_reinsert_breakpoints): Likewise.
340 (reinsert_reinsert_breakpoints): Likewise.
341 (uninsert_reinsert_breakpoints): Likewise.
342 (has_reinsert_breakpoints): Likewise.
343
63c40ec7
YQ
3442016-07-21 Yao Qi <yao.qi@linaro.org>
345
346 * inferiors.c (get_thread_process): Make parameter const.
347 * inferiors.h (get_thread_process): Update declaration.
348 * mem-break.c (clone_all_breakpoints): Remove all parameters.
349 Add new parameters child_thread and parent_thread. Callers
350 updated.
351 * mem-break.h (clone_all_breakpoints): Update declaration.
352
9aa76cd0
YQ
3532016-07-21 Yao Qi <yao.qi@linaro.org>
354
355 * mem-break.c (struct breakpoint) <cond_list>: Remove.
356 <command_list, handler>: Remove.
357 (struct gdb_breakpoint): New.
358 (struct other_breakpoint): New.
359 (struct reinsert_breakpoint): New.
360 (is_gdb_breakpoint): New function.
361 (any_persistent_commands): Update command_list if
362 is_gdb_breakpoint returns true.
363 (set_breakpoint): Create breakpoints according to their types.
364 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
365 (set_gdb_breakpoint_1): Likewise.
366 (set_gdb_breakpoint): Likewise.
367 (clear_breakpoint_conditions): Change parameter type to
368 'struct gdb_breakpoint *'.
369 (clear_breakpoint_commands): Likewise.
370 (clear_breakpoint_conditions_and_commands): Likewise.
371 (add_condition_to_breakpoint): Likewise.
372 (add_breakpoint_condition): Likewise.
373 (add_commands_to_breakpoint): Likewise.
374 (check_breakpoints): Check other_breakpoint.
375 (clone_one_breakpoint): Clone breakpopint according to its type.
376 * mem-break.h (struct gdb_breakpoint): Declare.
377 (set_gdb_breakpoint): Update declaration.
378 (clear_breakpoint_conditions_and_commands): Likewise.
379 (add_breakpoint_condition): Likewise.
380 (add_breakpoint_commands): Likewise.
381 * server.c (process_point_options): Change parameter type to
382 'struct gdb_breakpoint *'.
383
811f8301
YQ
3842016-07-21 Yao Qi <yao.qi@linaro.org>
385
386 * mem-break.c (set_breakpoint_at): Rename it to ...
387 (set_breakpoint_type_at): ... it.
388 (set_breakpoint_at): Call set_breakpoint_type_at.
389 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
390 * mem-break.h (set_breakpoint_at): Update comments.
391
b1c51e36
CLT
3922016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
393
394 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
395 to buf parameter.
396 (nios2_store_gregset): Likewise.
397
ced2dffb
PA
3982016-07-01 Pedro Alves <palves@redhat.com>
399 Antoine Tremblay <antoine.tremblay@ericsson.com>
400
401 * linux-low.c: Change interface to take the target lwp_info
402 pointer directly and return void. Handle detaching from a zombie
403 thread.
404 (linux_detach_lwp_callback): New function.
405 (linux_detach): Detach from the leader thread after detaching from
406 the clone threads.
407
2ac09a5b
YQ
4082016-06-28 Yao Qi <yao.qi@linaro.org>
409
410 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
411 for variable new_offset.
412 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
413 (aarch64_ftrace_insn_reloc_cb): Likewise.
414 (aarch64_ftrace_insn_reloc_tb): Likewise.
415 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
416 PRIx64 instead of PRIx32.
417
79e7fd4f
YQ
4182016-06-28 Yao Qi <yao.qi@linaro.org>
419
420 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
421 (the_low_target): Install arm_get_syscall_trapinfo.
422
061fc021
YQ
4232016-06-28 Yao Qi <yao.qi@linaro.org>
424
425 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
426 function.
427 (the_low_target): Install aarch64_get_syscall_trapinfo.
428
4cc32bec
YQ
4292016-06-28 Yao Qi <yao.qi@linaro.org>
430
431 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
432 Callers updated.
433 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
434 Remove parameter sysno.
435 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
436 sysret.
437
782c1122
AA
4382016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
439
440 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
441 (s390_emit_ne_goto): Likewise.
442 (s390_emit_lt_goto): Likewise.
443 (s390_emit_le_goto): Likewise.
444 (s390_emit_gt_goto): Likewise.
445 (s390_emit_ge_goto): Likewise.
446 (s390x_emit_eq_goto): Likewise.
447 (s390x_emit_ne_goto): Likewise.
448 (s390x_emit_lt_goto): Likewise.
449 (s390x_emit_le_goto): Likewise.
450 (s390x_emit_gt_goto): Likewise.
451 (s390x_emit_ge_goto): Likewise.
452 (s390_emit_ops_impl): Mark variable static.
453 (s390x_emit_ops): Likewise.
454
2e7b624b
YQ
4552016-06-17 Yao Qi <yao.qi@linaro.org>
456
457 * linux-low.c (handle_extended_wait): Call
458 uninsert_reinsert_breakpoints for the parent process. Remove
459 reinsert breakpoints from the child process. Reinsert them to
460 the parent process when vfork is done.
461 * mem-break.c (uninsert_reinsert_breakpoints): New function.
462 (reinsert_reinsert_breakpoints): New function.
463 * mem-break.h (uninsert_reinsert_breakpoints): Declare
464 (reinsert_reinsert_breakpoints): Declare.
465
8a81c5d7
YQ
4662016-06-17 Yao Qi <yao.qi@linaro.org>
467
468 * linux-low.c (handle_extended_wait): If the parent is doing
469 step-over, remove the reinsert breakpoints from the forked child.
470
f50bf8e5
YQ
4712016-06-17 Yao Qi <yao.qi@linaro.org>
472
473 * linux-low.c (unsuspend_all_lwps): Declare.
474 (linux_low_filter_event): If thread exited, call finish_step_over.
475 If step-over is finished, unsuspend other threads.
476
8376a3cb
YQ
4772016-06-17 Yao Qi <yao.qi@linaro.org>
478
479 * linux-low.c (linux_resume_one_lwp_throw): Assert
480 has_reinsert_breakpoints returns false.
481 * mem-break.c (delete_disabled_breakpoints): Assert
482 bp type isn't reinsert_breakpoint.
483
f79b145d
YQ
4842016-06-17 Yao Qi <yao.qi@linaro.org>
485
486 * linux-low.c (maybe_hw_step): New function.
487 (linux_resume_one_lwp_throw): Call maybe_hw_step.
488 (finish_step_over): Switch current_thread to lwp temporarily,
489 and assert has_reinsert_breakpoints returns true.
490 (proceed_one_lwp): Call maybe_hw_step.
491 * mem-break.c (has_reinsert_breakpoints): New function.
492 * mem-break.h (has_reinsert_breakpoints): Declare.
493
0ae534d2
JT
4942016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
495
496 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
497
fcdad592
YQ
4982016-05-17 Yao Qi <yao.qi@linaro.org>
499
500 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
501 instead of find_inferior.
502
9e784964
YQ
5032016-05-05 Yao Qi <yao.qi@linaro.org>
504
505 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
506 Initialize res to zero.
507
cf2ebb6e
YQ
5082016-05-05 Yao Qi <yao.qi@linaro.org>
509
510 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
511 to uint32_t.
512
c1aebf87
UW
5132016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
514
515 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
516 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
517 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
518
35fd2deb 5192016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 520 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
521
522 * tracepoint.c (write_inferior_int8): New function.
523 (cmd_qtenable_disable): Write enable flag using
524 write_inferior_int8.
525
484b3c32
YQ
5262016-04-25 Yao Qi <yao.qi@linaro.org>
527
528 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
529 (need_step_over_p): Return zero if the LWP has pending signals
530 can be delivered on software single step target.
531
85ba7d86
YQ
5322016-04-25 Yao Qi <yao.qi@linaro.org>
533
534 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
535 return instead of error.
536
3539aa13
YQ
5372016-04-22 Yao Qi <yao.qi@linaro.org>
538
539 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
540 to 23.
541
5b061e98
YQ
5422016-04-22 Yao Qi <yao.qi@linaro.org>
543
544 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
545 signal when stepping over breakpoint with software single
546 step.
547
3451269c
PA
5482016-04-21 Pedro Alves <palves@redhat.com>
549
550 * linux-s390-low.c (s390_collect_ptrace_register)
551 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
552 add casts.
553 (s390_check_regset): Use void * instead of gdb_byte *.
554
a2358508
PA
5552016-04-20 Pedro Alves <palves@redhat.com>
556
557 * configure: Renegerate.
558
6885166d
YQ
5592016-04-20 Yao Qi <yao.qi@linaro.org>
560
561 * linux-aarch32-low.c: Include "arch/arm-linux.h".
562 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
563 number 16.
564 (arm_store_gregset): Likewise.
565
2b863f51
WT
5662016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
567
568 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
569 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
570 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
571 (amd64-avx-mpx-linux.c): New rules.
572 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
573 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
574 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
575 (srv_amd64_regobj): Add amd64-avx-mpx.o.
576 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
577 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
578 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
579 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
580 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
581 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
582 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
583 * linux-x86-low.c (x86_linux_read_description): Add case for
584 X86_XSTATE_AVX_MPX_MASK.
585 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
586 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
587 init_registers_i386_avx_mpx_linux.
588 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
589 (initialize_low_tracepoint): Call
590 init_registers_i386_avx_mpx_linux.
591 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
592 (initialize_low_tracepoint): Call
593 init_registers_amd64_avx_mpx_linux.
594 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
595 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
596 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
597 declarations.
598
9b30624b
PA
5992016-04-18 Pedro Alves <palves@redhat.com>
600
601 * configure: Regenerate.
602
45e3745e
AT
6032016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
604
605 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
606 (aarch64_emit_sub): Likewise.
607
2afc13ff
PA
6082016-04-12 Pedro Alves <palves@redhat.com>
609
610 * utils.c (prepare_to_throw_exception): Delete.
611
6e774b13
SM
6122016-04-05 Simon Marchi <simon.marchi@ericsson.com>
613
614 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
615
4dca19f8
MK
6162016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
617
618 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
619
d0a9981f
MK
6202016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
621
622 * linux-aarch64-ipa.c: Add <elf.h> include.
623 * linux-ppc-ipa.c: Add <elf.h> include.
624 * linux-s390-ipa.c: Add <elf.h> include.
625
252db07e
MK
6262016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
627
628 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
629 (get_raw_reg_ptr): Likewise.
630 (get_trace_state_variable_value_ptr): Likewise.
631 (set_trace_state_variable_value_ptr): Likewise.
632 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
633 char *.
634
14e2b6d9
MK
6352016-03-31 Wei-cheng Wang <cole945@gmail.com>
636 Marcin Kościelnicki <koriakin@0x04.net>
637
638 PR/17221
639 * linux-ppc-low.c (emit_insns): New function.
640 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
641 (ppc_emit_prologue): New function.
642 (ppc_emit_epilogue): New function.
643 (ppc_emit_add): New function.
644 (ppc_emit_sub): New function.
645 (ppc_emit_mul): New function.
646 (ppc_emit_lsh): New function.
647 (ppc_emit_rsh_signed): New function.
648 (ppc_emit_rsh_unsigned): New function.
649 (ppc_emit_ext): New function.
650 (ppc_emit_zero_ext): New function.
651 (ppc_emit_log_not): New function.
652 (ppc_emit_bit_and): New function.
653 (ppc_emit_bit_or): New function.
654 (ppc_emit_bit_xor): New function.
655 (ppc_emit_bit_not): New function.
656 (ppc_emit_equal): New function.
657 (ppc_emit_less_signed): New function.
658 (ppc_emit_less_unsigned): New function.
659 (ppc_emit_ref): New function.
660 (ppc_emit_const): New function.
661 (ppc_emit_reg): New function.
662 (ppc_emit_pop): New function.
663 (ppc_emit_stack_flush): New function.
664 (ppc_emit_swap): New function.
665 (ppc_emit_stack_adjust): New function.
666 (ppc_emit_call): New function.
667 (ppc_emit_int_call_1): New function.
668 (ppc_emit_void_call_2): New function.
669 (ppc_emit_if_goto): New function.
670 (ppc_emit_goto): New function.
671 (ppc_emit_eq_goto): New function.
672 (ppc_emit_ne_goto): New function.
673 (ppc_emit_lt_goto): New function.
674 (ppc_emit_le_goto): New function.
675 (ppc_emit_gt_goto): New function.
676 (ppc_emit_ge_goto): New function.
677 (ppc_write_goto_address): New function.
678 (ppc_emit_ops_impl): New static variable.
679 (ppc64v1_emit_prologue): New function.
680 (ppc64v2_emit_prologue): New function.
681 (ppc64_emit_epilogue): New function.
682 (ppc64_emit_add): New function.
683 (ppc64_emit_sub): New function.
684 (ppc64_emit_mul): New function.
685 (ppc64_emit_lsh): New function.
686 (ppc64_emit_rsh_signed): New function.
687 (ppc64_emit_rsh_unsigned): New function.
688 (ppc64_emit_ext): New function.
689 (ppc64_emit_zero_ext): New function.
690 (ppc64_emit_log_not): New function.
691 (ppc64_emit_bit_and): New function.
692 (ppc64_emit_bit_or): New function.
693 (ppc64_emit_bit_xor): New function.
694 (ppc64_emit_bit_not): New function.
695 (ppc64_emit_equal): New function.
696 (ppc64_emit_less_signed): New function.
697 (ppc64_emit_less_unsigned): New function.
698 (ppc64_emit_ref): New function.
699 (ppc64_emit_const): New function.
700 (ppc64v1_emit_reg): New function.
701 (ppc64v2_emit_reg): New function.
702 (ppc64_emit_pop): New function.
703 (ppc64_emit_stack_flush): New function.
704 (ppc64_emit_swap): New function.
705 (ppc64v1_emit_call): New function.
706 (ppc64v2_emit_call): New function.
707 (ppc64v1_emit_int_call_1): New function.
708 (ppc64v2_emit_int_call_1): New function.
709 (ppc64v1_emit_void_call_2): New function.
710 (ppc64v2_emit_void_call_2): New function.
711 (ppc64_emit_if_goto): New function.
712 (ppc64_emit_eq_goto): New function.
713 (ppc64_emit_ne_goto): New function.
714 (ppc64_emit_lt_goto): New function.
715 (ppc64_emit_le_goto): New function.
716 (ppc64_emit_gt_goto): New function.
717 (ppc64_emit_ge_goto): New function.
718 (ppc64v1_emit_ops_impl): New static variable.
719 (ppc64v2_emit_ops_impl): New static variable.
720 (ppc_emit_ops): New function.
721 (linux_low_target): Wire in ppc_emit_ops.
722
a2174ba4
MK
7232016-03-31 Wei-cheng Wang <cole945@gmail.com>
724 Marcin Kościelnicki <koriakin@0x04.net>
725
726 PR/17221
727 * Makefile.in: Add powerpc-*-ipa.o
728 * configure.srv: Add ipa_obj for powerpc*-linux.
729 * linux-ppc-ipa.c: New file.
730 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
731 includes.
732 (PPC_FIELD): New macro.
733 (PPC_SEXT): New macro.
734 (PPC_OP6): New macro.
735 (PPC_BO): New macro.
736 (PPC_LI): New macro.
737 (PPC_BD): New macro.
738 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
739 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
740 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
741 (ppc_get_thread_area): New function.
742 (is_elfv2_inferior): New function.
743 (gen_ds_form): New function.
744 (GEN_STD): New macro.
745 (GEN_STDU): New macro.
746 (GEN_LD): New macro.
747 (GEN_LDU): New macro.
748 (gen_d_form): New function.
749 (GEN_ADDI): New macro.
750 (GEN_ADDIS): New macro.
751 (GEN_LI): New macro.
752 (GEN_LIS): New macro.
753 (GEN_ORI): New macro.
754 (GEN_ORIS): New macro.
755 (GEN_LWZ): New macro.
756 (GEN_STW): New macro.
757 (GEN_STWU): New macro.
758 (gen_xfx_form): New function.
759 (GEN_MFSPR): New macro.
760 (GEN_MTSPR): New macro.
761 (GEN_MFCR): New macro.
762 (GEN_MTCR): New macro.
763 (GEN_SYNC): New macro.
764 (GEN_LWSYNC): New macro.
765 (gen_x_form): New function.
766 (GEN_OR): New macro.
767 (GEN_MR): New macro.
768 (GEN_LWARX): New macro.
769 (GEN_STWCX): New macro.
770 (GEN_CMPW): New macro.
771 (gen_md_form): New function.
772 (GEN_RLDICL): New macro.
773 (GEN_RLDICR): New macro.
774 (gen_i_form): New function.
775 (GEN_B): New macro.
776 (GEN_BL): New macro.
777 (gen_b_form): New function.
778 (GEN_BNE): New macro.
779 (GEN_LOAD): New macro.
780 (GEN_STORE): New macro.
781 (gen_limm): New function.
782 (gen_atomic_xchg): New function.
783 (gen_call): New function.
784 (ppc_relocate_instruction): New function.
785 (ppc_install_fast_tracepoint_jump_pad): New function.
786 (ppc_get_min_fast_tracepoint_insn_len): New function.
787 (ppc_get_ipa_tdesc_idx): New function.
788 (the_low_target): Wire in the new functions.
789 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
790 tdescs.
791 * linux-ppc-tdesc.h: New file.
792
a13c4696
MK
7932016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
794
795 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
796 (alloc_jump_pad_buffer): New function.
797 * linux-amd64-ipa.c: Add <sys/mman.h> include.
798 (alloc_jump_pad_buffer): New function.
799 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
800 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
801 (alloc_jump_pad_buffer): New function.
802 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
803 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
804 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
805 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
806
1cda1512
MK
8072016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
808
809 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
810 * linux-amd64-ipa.c: Likewise.
811 * linux-i386-ipa.c: Likewise.
812 * linux-s390-ipa.c: Likewise.
813 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
814 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
815 set_trace_state_variable_value_ptr.
816 (struct ipa_sym_addresses): Likewise.
817 (symbol_list): Likewise.
818 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
819 accessing gdb_collect directly.
820 (gdb_collect_ptr_type): New typedef.
821 (get_raw_reg_ptr_type): New typedef.
822 (get_trace_state_variable_value_ptr_type): New typedef.
823 (set_trace_state_variable_value_ptr_type): New typedef.
824 (gdb_collect_ptr): New global.
825 (get_raw_reg_ptr): New global.
826 (get_trace_state_variable_value_ptr): New global.
827 (set_trace_state_variable_value_ptr): New global.
828 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
829 accessing get_raw_reg directly.
830 (get_get_tsv_func_addr): Likewise for
831 get_trace_state_variable_value_ptr.
832 (get_set_tsv_func_addr): Likewise for
833 set_trace_state_variable_value_ptr.
834 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
835
72fb5488
SM
8362016-03-30 Simon Marchi <simon.marchi@ericsson.com>
837
838 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
839
28170b88
MK
8402016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
841
842 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
843 packets.
844 (relocate_instruction): Remove own_buf.
845 * server.c (own_buf): Make global.
846 (handle_v_requests): Make global.
847 * server.h (own_buf): New declaration.
848 (handle_v_requests): New prototype.
849
f39e8743
MK
8502016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
851
852 PR 18377
853 * linux-s390-low.c (add_insns): New function.
854 (s390_emit_prologue): New function.
855 (s390_emit_epilogue): New function.
856 (s390_emit_add): New function.
857 (s390_emit_sub): New function.
858 (s390_emit_mul): New function.
859 (s390_emit_lsh): New function.
860 (s390_emit_rsh_signed): New function.
861 (s390_emit_rsh_unsigned): New function.
862 (s390_emit_ext): New function.
863 (s390_emit_log_not): New function.
864 (s390_emit_bit_and): New function.
865 (s390_emit_bit_or): New function.
866 (s390_emit_bit_xor): New function.
867 (s390_emit_bit_not): New function.
868 (s390_emit_equal): New function.
869 (s390_emit_less_signed): New function.
870 (s390_emit_less_unsigned): New function.
871 (s390_emit_ref): New function.
872 (s390_emit_if_goto): New function.
873 (s390_emit_goto): New function.
874 (s390_write_goto_address): New function.
875 (s390_emit_litpool): New function.
876 (s390_emit_const): New function.
877 (s390_emit_call): New function.
878 (s390_emit_reg): New function.
879 (s390_emit_pop): New function.
880 (s390_emit_stack_flush): New function.
881 (s390_emit_zero_ext): New function.
882 (s390_emit_swap): New function.
883 (s390_emit_stack_adjust): New function.
884 (s390_emit_set_r2): New function.
885 (s390_emit_int_call_1): New function.
886 (s390_emit_void_call_2): New function.
887 (s390_emit_eq_goto): New function.
888 (s390_emit_ne_goto): New function.
889 (s390_emit_lt_goto): New function.
890 (s390_emit_le_goto): New function.
891 (s390_emit_gt_goto): New function.
892 (s390_emit_ge_goto): New function.
893 (s390x_emit_prologue): New function.
894 (s390x_emit_epilogue): New function.
895 (s390x_emit_add): New function.
896 (s390x_emit_sub): New function.
897 (s390x_emit_mul): New function.
898 (s390x_emit_lsh): New function.
899 (s390x_emit_rsh_signed): New function.
900 (s390x_emit_rsh_unsigned): New function.
901 (s390x_emit_ext): New function.
902 (s390x_emit_log_not): New function.
903 (s390x_emit_bit_and): New function.
904 (s390x_emit_bit_or): New function.
905 (s390x_emit_bit_xor): New function.
906 (s390x_emit_bit_not): New function.
907 (s390x_emit_equal): New function.
908 (s390x_emit_less_signed): New function.
909 (s390x_emit_less_unsigned): New function.
910 (s390x_emit_ref): New function.
911 (s390x_emit_if_goto): New function.
912 (s390x_emit_const): New function.
913 (s390x_emit_call): New function.
914 (s390x_emit_reg): New function.
915 (s390x_emit_pop): New function.
916 (s390x_emit_stack_flush): New function.
917 (s390x_emit_zero_ext): New function.
918 (s390x_emit_swap): New function.
919 (s390x_emit_stack_adjust): New function.
920 (s390x_emit_int_call_1): New function.
921 (s390x_emit_void_call_2): New function.
922 (s390x_emit_eq_goto): New function.
923 (s390x_emit_ne_goto): New function.
924 (s390x_emit_lt_goto): New function.
925 (s390x_emit_le_goto): New function.
926 (s390x_emit_gt_goto): New function.
927 (s390x_emit_ge_goto): New function.
928 (s390_emit_ops): New function.
929 (struct linux_target_ops): Fill in emit_ops hook.
930
abd9baf9
MK
9312016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
932
933 PR 18377
934 * Makefile.in: Add s390 IPA files.
935 * configure.srv: Build IPA for s390.
936 * linux-s390-ipa.c: New file.
937 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
938 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
939 (tdesc_s390_linux32): Likewise.
940 (init_registers_s390_linux32v1): Likewise.
941 (tdesc_s390_linux32v1): Likewise.
942 (init_registers_s390_linux32v2): Likewise.
943 (tdesc_s390_linux32v2): Likewise.
944 (init_registers_s390_linux64): Likewise.
945 (tdesc_s390_linux64): Likewise.
946 (init_registers_s390_linux64v1): Likewise.
947 (tdesc_s390_linux64v1): Likewise.
948 (init_registers_s390_linux64v2): Likewise.
949 (tdesc_s390_linux64v2): Likewise.
950 (init_registers_s390_te_linux64): Likewise.
951 (tdesc_s390_te_linux64): Likewise.
952 (init_registers_s390_vx_linux64): Likewise.
953 (tdesc_s390_vx_linux64): Likewise.
954 (init_registers_s390_tevx_linux64): Likewise.
955 (tdesc_s390_tevx_linux64): Likewise.
956 (init_registers_s390x_linux64): Likewise.
957 (tdesc_s390x_linux64): Likewise.
958 (init_registers_s390x_linux64v1): Likewise.
959 (tdesc_s390x_linux64v1): Likewise.
960 (init_registers_s390x_linux64v2): Likewise.
961 (tdesc_s390x_linux64v2): Likewise.
962 (init_registers_s390x_te_linux64): Likewise.
963 (tdesc_s390x_te_linux64): Likewise.
964 (init_registers_s390x_vx_linux64): Likewise.
965 (tdesc_s390x_vx_linux64): Likewise.
966 (init_registers_s390x_tevx_linux64): Likewise.
967 (tdesc_s390x_tevx_linux64): Likewise.
968 (have_hwcap_s390_vx): New static variable.
969 (s390_arch_setup): Fill have_hwcap_s390_vx.
970 (s390_get_thread_area): New function.
971 (s390_ft_entry_gpr_esa): New const.
972 (s390_ft_entry_gpr_zarch): New const.
973 (s390_ft_entry_misc): New const.
974 (s390_ft_entry_fr): New const.
975 (s390_ft_entry_vr): New const.
976 (s390_ft_main_31): New const.
977 (s390_ft_main_64): New const.
978 (s390_ft_exit_fr): New const.
979 (s390_ft_exit_vr): New const.
980 (s390_ft_exit_misc): New const.
981 (s390_ft_exit_gpr_esa): New const.
982 (s390_ft_exit_gpr_zarch): New const.
983 (append_insns): New function.
984 (s390_relocate_instruction): New function.
985 (s390_install_fast_tracepoint_jump_pad): New function.
986 (s390_get_min_fast_tracepoint_insn_len): New function.
987 (s390_get_ipa_tdesc_idx): New function.
988 (struct linux_target_ops): Wire in the above functions.
989 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
990 * linux-s390-tdesc.h: New file.
991
a4105d04
MK
9922016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
993
994 * linux-s390-low.c (s390_supports_tracepoints): New function.
995 (struct linux_target_ops): Fill supports_tracepoints hook.
996
35ac8b3e
YQ
9972016-03-18 Yao Qi <yao.qi@linaro.org>
998
999 * linux-low.c (lwp_signal_can_be_delivered): New function.
1000 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1001
94610ec4
YQ
10022016-03-18 Yao Qi <yao.qi@linaro.org>
1003
1004 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1005 0 if signal is enqueued. Remove 'signal' from one debugging
1006 message. Move one debugging message to some lines below.
1007 Remove code setting 'signal' to 0.
1008
80aea927
YQ
10092016-03-18 Yao Qi <yao.qi@linaro.org>
1010
1011 * linux-low.c (linux_low_filter_event): Remove redundant
1012 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1013
b04fd3be
MK
10142016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1015
1016 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1017 (struct linux_target_ops): Wire in the above.
1018
c40c8d4b
YQ
10192016-03-03 Yao Qi <yao.qi@linaro.org>
1020
1021 * linux-low.c: Update comments to start_step_over.
1022
0f8288ae
YQ
10232016-03-03 Yao Qi <yao.qi@linaro.org>
1024
1025 PR server/19736
1026 * linux-low.c (handle_extended_wait): Set child suspended
1027 if event_lwp->bp_reinsert isn't zero.
1028
fdbd04a8
YQ
10292016-03-02 Yao Qi <yao.qi@linaro.org>
1030
1031 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1032 enqueue_pending_signal.
1033
6896a8fa
MK
10342016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1035
1036 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1037 is actually loaded.
1038
ab503087
MK
10392016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1040
1041 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1042 (s390_regmap_3264) [!__s390x__]: New global.
1043 (s390_collect_ptrace_register): Skip map entries containing -1.
1044 (s390_supply_ptrace_register): Ditto.
1045 (s390_fill_gprs_high): New function.
1046 (s390_store_gprs_high): New function.
1047 (s390_regsets): Add NT_S390_HIGH_GPRS.
1048 (s390_get_hwcap): Enable on 31-bit.
1049 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1050 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1051 Detect NT_S390_HIGH_GPRS.
1052 (s390_usrregs_info_3264): Enable on 31-bit.
1053 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1054 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1055
ae91f625
MK
10562016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1057
1058 PR gdb/13808
1059 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1060 * configure.srv: Ditto.
1061 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1062 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1063 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1064 (init_registers_amd64_linux): Remove prototype.
1065 (tdesc_amd64_linux): Remove declaration.
1066 (get_ipa_tdesc): New function.
1067 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1068 initialize remaining tdescs.
1069 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1070 (init_registers_i386_linux): Remove prototype.
1071 (tdesc_i386_linux): Remove declaration.
1072 (get_ipa_tdesc): New function.
1073 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1074 initialize remaining tdescs.
1075 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1076 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1077 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1078 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1079 (x86_get_ipa_tdesc_idx): New function.
1080 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1081 * linux-x86-tdesc.h: New file.
1082 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1083 (target_get_ipa_tdesc_idx): New macro.
1084 * tracepoint.c (ipa_tdesc_idx): New macro.
1085 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1086 (symbol_list): Add ipa_tdesc_idx.
1087 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1088 (ipa_tdesc): Remove.
1089 (ipa_tdesc_idx): New variable.
1090 (get_context_regcache): Use get_ipa_tdesc.
1091 (gdb_collect): Ditto.
1092 (gdb_probe): Ditto.
1093 * tracepoint.h (get_ipa_tdesc): New prototype.
1094 (ipa_tdesc): Remove.
1095
e7ad2f14
PA
10962016-02-24 Pedro Alves <palves@redhat.com>
1097
1098 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1099 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1100 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1101 Factor out common code between the USE_SIGTRAP_SIGINFO and
1102 !USE_SIGTRAP_SIGINFO blocks.
1103 (linux_low_filter_event): Call save_stop_reason instead of
1104 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1105 Update comments.
1106 (linux_wait_1): Update comments.
1107
657f9cde
WW
11082016-02-24 Wei-cheng Wang <cole945@gmail.com>
1109
1110 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1111 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1112 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1113 ppc_insert_point, ppc_remove_point.
1114
b00b61e1
MK
11152016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1116
1117 * linux-s390-low.c (s390_supports_z_point_type): New function.
1118 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1119
553cb527
YQ
11202016-02-16 Yao Qi <yao.qi@linaro.org>
1121
1122 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1123 PC. Get pc from regcache_read_pc.
1124
a5652c21
YQ
11252016-02-12 Yao Qi <yao.qi@linaro.org>
1126
1127 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1128 or linux_get_pc_32bit.
1129 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1130
ed443b61
YQ
11312016-02-12 Yao Qi <yao.qi@linaro.org>
1132
1133 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1134 arm_linux_get_next_pcs_fixup.
1135
020ecd38
MK
11362016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1137
1138 * tracepoint.c (x_tracepoint_action_download): Change
1139 write_inferior_data_ptr to write_inferior_data_pointer.
1140 (cmd_qtstart): Likewise.
1141 (write_inferior_data_ptr): Remove.
1142 (download_agent_expr): Change write_inferior_data_ptr to
1143 write_inferior_data_pointer.
1144 (download_tracepoint_1): Likewise.
1145 (download_tracepoint): Likewise.
1146 (download_trace_state_variables): Likewise.
1147
7cae9051
WW
11482016-02-11 Wei-cheng Wang <cole945@gmail.com>
1149 Marcin Kościelnicki <koriakin@0x04.net>
1150
1151 * tracepoint.c (struct tracepoint_action_ops): Remove.
1152 (struct tracepoint_action): Remove ops.
1153 (m_tracepoint_action_download, r_tracepoint_action_download)
1154 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1155 size and offset accordingly.
1156 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1157 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1158 (tracepoint_action_send, tracepoint_action_download): New functions.
1159 Helpers for trace action handlers.
1160 (add_tracepoint_action): Remove setup actions ops.
1161 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1162
9f6a71b4
YQ
11632016-02-10 Yao Qi <yao.qi@linaro.org>
1164
1165 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1166
1e94266c
SM
11672016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1168
1169 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1170 to AC_OUTPUT.
1171 * configure: Regenerate.
1172
8adce034
SM
11732016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1174
1175 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1176 void * to gdb_byte *.
1177 * linux-low.c (siginfo_fixup): Likewise.
1178 (linux_xfer_siginfo): Likewise.
1179 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1180 Likewise.
1181 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1182
93813b37
WT
11832016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1184
1185 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1186 to srv_tgtobj.
1187 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1188 to srv_tgtobj.
1189 * linux-x86-low.c [__x86_64__]: Include
1190 "nat/amd64-linux-siginfo.h".
1191 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1192 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1193 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1194 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1195 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1196 (cpt_si_fd, si_timerid, si_overrun): Move from
1197 nat/amd64-linux-siginfo.c.
1198 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1199
8424cc97
SM
12002016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1201
1202 * server.c (skip_to_semicolon): Remove.
1203 (process_point_options): Use strchrnul instead of
1204 skip_to_semicolon.
1205
4d18591b
YQ
12062016-01-26 Yao Qi <yao.qi@linaro.org>
1207
1208 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1209 * linux-low.c (install_software_single_step_breakpoints): Don't
1210 call regcache_read_pc.
1211 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1212 argument pc.
1213
d8020970
YQ
12142016-01-26 Yao Qi <yao.qi@linaro.org>
1215
1216 * linux-low.c (install_software_single_step_breakpoints): Call
1217 regcache_read_pc instead of get_pc.
1218
8b207339
YQ
12192016-01-26 Yao Qi <yao.qi@linaro.org>
1220
1221 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1222 (unblock_async_io): Rename to ...
1223 (block_unblock_async_io): ... it. New function.
1224 (enable_async_io): Don't install SIGIO handler. Unblock it
1225 instead.
1226 (disable_async_io): Don't ignore SIGIO. Block it instead.
1227 (initialize_async_io): Install SIGIO handler. Don't call
1228 unblock_async_io.
1229
18879fef
YQ
12302016-01-26 Yao Qi <yao.qi@linaro.org>
1231
1232 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1233 first character is '\003', call *the_target->request_interrupt.
1234
a0f8e08a
YQ
12352016-01-25 Yao Qi <yao.qi@linaro.org>
1236
1237 * remote-utils.c (new_thread_notify): Remove.
1238 (dead_thread_notify): Likewise.
1239 * remote-utils.h (new_thread_notify): Remove declaration.
1240 (dead_thread_notify): Likewise.
1241
cc5fd9ab
MK
12422016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1243
1244 * gdb.trace/pending.exp: Fix expected message on continue.
1245
99e8eb11
MK
12462016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1247
1248 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1249 it works properly on big-endian machines where sizeof (CORE_ADDR)
1250 != sizeof (void *).
1251
a994041d
PA
12522016-01-21 Pedro Alves <palves@redhat.com>
1253
1254 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1255 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1256 * configure: Regenerate.
1257
f7a6a40d
YQ
12582016-01-21 Yao Qi <yao.qi@linaro.org>
1259
1260 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1261 is_thumb and set it according to CPSR saved on the stack.
1262 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1263 arm_sigreturn_next_pc.
1264
6f69e520
YQ
12652016-01-18 Yao Qi <yao.qi@linaro.org>
1266
1267 * linux-low.c (linux_set_pc_64bit): New function.
1268 (linux_get_pc_64bit): New function.
1269 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1270 Declare.
1271 * linux-sparc-low.c (debug_threads): Remove declaration.
1272 (sparc_get_pc): Remove.
1273 (the_low_target): Use linux_get_pc_64bit instead of
1274 sparc_get_pc.
1275 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1276 (the_low_target): Use linux_get_pc_64bit and
1277 linux_set_pc_64bit.
1278
276d4552
YQ
12792016-01-18 Yao Qi <yao.qi@linaro.org>
1280
1281 * linux-arm-low.c (debug_threads): Remove declaration.
1282 (arm_get_pc, arm_set_pc): Remove.
1283 (the_low_target): Use linux_get_pc_32bit and
1284 linux_set_pc_32bit.
1285 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1286 (the_low_target): Use linux_get_pc_32bit and
1287 linux_set_pc_32bit.
1288 * linux-cris-low.c (debug_threads): Remove declaration.
1289 (cris_get_pc, cris_set_pc,): Remove.
1290 (the_low_target): Use linux_get_pc_32bit and
1291 linux_set_pc_32bit.
1292 * linux-crisv32-low.c (debug_threads): Remove declaration.
1293 (cris_get_pc, cris_set_pc): Remove.
1294 (the_low_target): Use linux_get_pc_32bit and
1295 linux_set_pc_32bit.
1296 * linux-low.c: Include inttypes.h.
1297 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1298 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1299 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1300 (the_low_target): Use linux_get_pc_32bit and
1301 linux_set_pc_32bit.
1302 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1303 (the_low_target): Use linux_get_pc_32bit and
1304 linux_set_pc_32bit.
1305 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1306 (the_low_target): Use linux_get_pc_32bit and
1307 linux_set_pc_32bit.
1308 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1309 (the_low_target): Use linux_get_pc_32bit and
1310 linux_set_pc_32bit.
1311 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1312 (the_low_target): Use linux_get_pc_32bit and
1313 linux_set_pc_32bit.
1314
eb0edac8
GB
13152016-01-18 Gary Benson <gbenson@redhat.com>
1316
1317 * configure.ac (AC_FUNC_FORK): New check.
1318 * config.in: Regenerate.
1319 * configure: Likewise.
1320
1b451dda
YQ
13212016-01-14 Yao Qi <yao.qi@linaro.org>
1322
1323 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1324 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1325 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1326 arm_get_next_pcs_ctor.
1327
82075af2
JS
13282016-01-12 Josh Stone <jistone@redhat.com>
1329 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1330
1331 * inferiors.h: Include "gdb_vecs.h".
1332 (struct process_info): Add syscalls_to_catch.
1333 * inferiors.c (remove_process): Free syscalls_to_catch.
1334 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1335 syscall_return stops.
1336 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1337 * server.c (handle_general_set): Handle QCatchSyscalls.
1338 (handle_query): Report support for QCatchSyscalls.
1339 * target.h (struct target_ops): Add supports_catch_syscall.
1340 (target_supports_catch_syscall): New macro.
1341 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1342 (struct lwp_info): Add syscall_state.
1343 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1344 Maintain syscall_state and syscalls_to_catch across exec.
1345 (get_syscall_trapinfo): New function, proxy to the_low_target.
1346 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1347 (linux_low_filter_event): Toggle syscall_state entry/return for
1348 syscall traps, and set it ignored for all others.
1349 (gdb_catching_syscalls_p): New function.
1350 (gdb_catch_this_syscall_p): New function.
1351 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1352 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1353 (linux_supports_catch_syscall): New function.
1354 (linux_target_ops): Install it.
1355 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1356 (the_low_target): Install it.
1357
8f13a3ce
MF
13582016-01-12 Mike Frysinger <vapier@gentoo.org>
1359
1360 * acinclude.m4: Include new ../warning.m4 file.
1361 * configure: Regenerated.
1362 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1363
5b3da067
MF
13642016-01-12 Mike Frysinger <vapier@gentoo.org>
1365
1366 * ax.c (is_goto_target): Mark static.
1367 * linux-low.c (register_addr): Likewise.
1368 (linux_fetch_registers, linux_store_registers): Likewise.
1369 * mem-break.c (any_persistent_commands): Fix old prototype.
1370 (add_commands_to_breakpoint): Mark static.
1371 * regcache.c (find_register_by_name): Delete unused func.
1372 * remote-utils.c (hex_or_minus_one): Mark static.
1373 * server.c (monitor_show_help): Mark static.
1374 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1375 handle_v_requests): Likewise.
1376
bc504a31
PA
13772016-01-12 Pedro Alves <palves@redhat.com>
1378
1379 Remove use of the registered trademark symbol throughout.
1380
5a0dd67a
YQ
13812016-01-08 Yao Qi <yao.qi@linaro.org>
1382
1383 * remote-utils.c (getpkt): If c is '\003', call target hook
1384 request_interrupt.
1385
b2ca446f
YQ
13862016-01-06 Yao Qi <yao.qi@linaro.org>
1387
1388 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1389 linux-aarch32-low.c.
1390 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1391 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1392 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1393 (thumb2_breakpoint): Declare.
1394 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1395 linux-aarch32-low.h.
1396 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1397 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1398 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1399
edd88788
JB
14002016-01-01 Joel Brobecker <brobecker@adacore.com>
1401
1402 * gdbreplay.c (gdbreplay_version): Change copyright year in
1403 version message.
1404 * server.c (gdbserver_version): Likewise.
1405
65da7f14
PP
14062015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1407
1408 * server.c (crc32_table): Delete.
1409 (crc32): Use libiberty's xcrc32 function.
1410
4abd5ed2
JB
14112015-12-22 Joel Brobecker <brobecker@adacore.com>
1412
1413 * lynx-low.c (lynx_delete_thread_callback): New function.
1414 (lynx_mourn): Properly delete our process and all of its
1415 threads. Remove call to clear_inferiors.
1416
0e50fe5c
JB
14172015-12-22 Joel Brobecker <brobecker@adacore.com>
1418
1419 * target.c (thread_search_callback): Add check that
1420 the thread_stopped target callback is not NULL before
1421 calling it.
1422
35adc03f
YQ
14232015-12-21 Yao Qi <yao.qi@linaro.org>
1424
1425 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1426 arm breakpoint.
1427
bd2b2909
AT
14282015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1429
1430 * server.c (handle_query): Call target_supports_software_single_step.
1431
7fe5e27e
AT
14322015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1433
1434 * linux-low.c (single_step): New function.
1435 (linux_resume_one_lwp_throw): Call single_step.
1436 (start_step_over): Likewise.
1437
d9311bfa
AT
14382015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1439
1440 * Makefile.in (SFILES): Append arch/arm-linux.c,
1441 arch/arm-get-next-pcs.c.
1442 (arm-linux.o): New rule.
1443 (arm-get-next-pcs.o): New rule.
1444 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1445 arm-linux.o.
1446 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1447 to linux-aarch32-low.c.
1448 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1449 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1450 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1451 (thumb2_breakpoint_len): Likewise.
1452 (arm_is_thumb_mode): Make non-static.
1453 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1454 from linux-aarch32-low.c.
1455 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1456 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1457 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1458 (thumb2_breakpoint_len): Likewise.
1459 (arm_is_thumb_mode): New declaration.
1460 * linux-arm-low.c: Include arch/arm-linux.h
1461 aarch/arm-get-next-pcs.h, sys/syscall.h.
1462 (get_next_pcs_ops): New struct.
1463 (get_next_pcs_addr_bits_remove): New function.
1464 (get_next_pcs_is_thumb): New function.
1465 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1466 (arm_sigreturn_next_pc): Likewise.
1467 (get_next_pcs_syscall_next_pc): Likewise.
1468 (arm_gdbserver_get_next_pcs): Likewise.
1469 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1470 Initialize.
1471 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1472 * server.h: Include gdb_vecs.h.
1473
68ce2059
AT
14742015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1475
1476 * Makefile.in (SFILES): Append common/common-regcache.c.
1477 (OBS): Append common-regcache.o.
1478 (common-regcache.o): New rule.
1479 * regcache.c (init_register_cache): Initialize cache to
1480 REG_UNAVAILABLE.
1481 (regcache_raw_read_unsigned): New function.
1482 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1483 register_status enum.
1484
fa5308bd
AT
14852015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1486
1487 * linux-aarch64-low.c (the_low_targets): Rename
1488 breakpoint_reinsert_addr to get_next_pcs.
1489 * linux-arm-low.c (the_low_targets): Likewise.
1490 * linux-bfin-low.c (the_low_targets): Likewise.
1491 * linux-cris-low.c (the_low_targets): Likewise.
1492 * linux-crisv32-low.c (the_low_targets): Likewise.
1493 * linux-low.c (can_software_single_step): Likewise.
1494 (install_software_single_step_breakpoints): New function.
1495 (start_step_over): Use install_software_single_step_breakpoints.
1496 * linux-low.h: New CORE_ADDR vector.
1497 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1498 get_next_pcs.
1499 * linux-mips-low.c (the_low_targets): Likewise.
1500 * linux-nios2-low.c (the_low_targets): Likewise.
1501 * linux-sparc-low.c (the_low_targets): Likewise.
1502
4a6ed09b
PA
15032015-12-17 Pedro Alves <palves@redhat.com>
1504
1505 * linux-low.c (linux_kill_one_lwp): Remove references to
1506 LinuxThreads.
1507 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1508 to 'kill'.
1509 (linux_init_signals): Delete.
1510 (initialize_low): Adjust.
1511 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1512
7544db95
PA
15132015-12-16 Pedro Alves <palves@redhat.com>
1514
1515 * configure.ac (compiler warning flags): When testing a
1516 -Wno-foo option, check whether -Wfoo works instead.
1517 * configure: Regenerate.
1518
8020350c
DB
15192015-12-11 Don Breazeal <donb@codesourcery.com>
1520
1521 * server.c (process_serial_event): Don't exit from gdbserver
1522 in remote mode if there are still active inferiors.
1523
db91f502
YQ
15242015-12-11 Yao Qi <yao.qi@linaro.org>
1525
1526 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1527 arm_breakpoint_at if the process is 32-bit.
1528
b37a6290
YQ
15292015-12-11 Yao Qi <yao.qi@linaro.org>
1530
1531 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1532 arm breakpoint.
1533
17b1509a
YQ
15342015-12-07 Yao Qi <yao.qi@linaro.org>
1535
1536 * configure.srv: Append arm.o to srv_tgtobj for
1537 aarch64*-*-linux* target.
1538 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1539 from linux-arm-low.c.
1540 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1541 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1542 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1543 (thumb2_breakpoint_len): Likewise.
1544 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1545 (arm_breakpoint_kinds): Likewise.
1546 (arm_breakpoint_kind_from_pc): Likewise.
1547 (arm_sw_breakpoint_from_kind): Likewise.
1548 (arm_breakpoint_kind_from_current_state): Likewise.
1549 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1550 (arm_sw_breakpoint_from_kind): Declare.
1551 (arm_breakpoint_kind_from_current_state): Declare.
1552 (arm_breakpoint_at): Declare.
1553 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1554 arm_sw_breakpoint_from_kind if process is 32-bit.
1555 (aarch64_breakpoint_kind_from_pc): New function.
1556 (aarch64_breakpoint_kind_from_current_state): New function.
1557 (the_low_target): Initialize fields breakpoint_kind_from_pc
1558 and breakpoint_kind_from_current_state.
1559 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1560 linux-aarch32-low.c.
1561 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1562 (arm_breakpoint, arm_breakpoint_len): Likewise.
1563 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1564 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1565 (arm_is_thumb_mode): Likewise.
1566 (arm_breakpoint_at): Likewise.
1567 (arm_breakpoint_kind_from_pc): Likewise.
1568 (arm_sw_breakpoint_from_kind): Likewise.
1569 (arm_breakpoint_kind_from_current_state): Likewise.
1570
1571 Revert:
1572 2015-08-04 Yao Qi <yao.qi@linaro.org>
1573
1574 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1575 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1576 * server.c (extended_protocol): Remove "static".
1577 * server.h (extended_protocol): Declare it.
1578
ece66d65
JS
15792015-12-04 Josh Stone <jistone@redhat.com>
1580
1581 * target.h (struct target_ops) <arch_setup>: Rename to ...
1582 (struct target_ops) <post_create_inferior>: ... this.
1583 (target_arch_setup): Rename to ...
1584 (target_post_create_inferior): ... this, calling post_create_inferior.
1585 * server.c (start_inferior): Update target_arch_setup calls to
1586 target_post_create_inferior.
1587 * linux-low.c (linux_low_ptrace_options): Forward declare.
1588 (linux_arch_setup): Update its comment for general use.
1589 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1590 (struct linux_target_ops): Use linux_post_create_inferior.
1591 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1592 to post_create_inferior.
1593 * nto-low.c (struct nto_target_ops): Likewise.
1594 * spu-low.c (struct spu_target_ops): Likewise.
1595 * win32-low.c (struct win32_target_ops): Likewise.
1596
e58c48b4
AT
15972015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1598
1599 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1600
fbec8956
AT
16012015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1602
1603 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1604 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1605 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1606 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1607 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1608 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1609 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1610 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1611 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1612 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1613 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1614 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1615
9b4c5f87
AT
16162015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1617
1618 * linux-low.c (linux_look_up_symbols): Don't call
1619 linux_supports_traceclone.
1620 * linux-low.h (thread_db_init): Remove use_events argument.
1621 * thread-db.c (thread_db_use_event): Remove global variable.
1622 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1623 (struct thread_db) <td_create_bp>: Remove field.
1624 (thread_db_create_event): Remove function.
1625 (thread_db_enable_reporting): Likewise.
1626 (find_one_thread): Don't check for thread_db_use_events.
1627 (attach_thread): Likewise.
1628 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1629 (try_thread_db_load_1): Don't check for thread_db_use_events.
1630 (thread_db_init): Remove use_events argument and thread events
1631 handling.
1632 (remove_thread_event_breakpoints): Remove function.
1633 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1634
7d00775e
AT
16352015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1636
1637 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1638 New function.
1639 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1640 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1641 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1642 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1643 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1644 Initialize.
1645 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1646 New function.
1647 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1648 * linux-low.c (can_hardware_single_step): Use
1649 supports_hardware_single_step.
1650 (can_software_single_step): New function.
1651 (start_step_over): Call can_software_single_step.
1652 (linux_supports_hardware_single_step): New function.
1653 (struct target_ops) <supports_software_single_step>: Initialize.
1654 * linux-low.h (struct linux_target_ops)
1655 <supports_hardware_single_step>: Initialize.
1656 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1657 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1658 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1659 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1660 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1661 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1662 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1663 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1664 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1665 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1666 Initialize.
1667 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1668 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1669 Initialize.
1670 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1671 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1672 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1673 New function.
1674 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1675 * target.h (struct target_ops): <supports_software_single_step>:
1676 New field.
1677 (target_supports_software_single_step): New macro.
1678
2d97cd35
AT
16792015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1680
1681 * linux-low.c (linux_wait_1): Fix pc advance condition.
1682 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1683 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1684
769ef81f
AT
16852015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1686
1687 * linux-arm-low.c (arm_is_thumb_mode): New function.
1688 (arm_breakpoint_at): Use arm_is_thumb_mode.
1689 (arm_breakpoint_kind_from_current_state): New function.
1690 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1691 Initialize.
1692 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1693 (linux_breakpoint_kind_from_current_state): New function.
1694 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1695 * linux-low.h (struct linux_target_ops)
1696 <breakpoint_kind_from_current_state>: New field.
1697 * target.h (struct target_ops): Likewise.
1698 (target_breakpoint_kind_from_current_state): New macro.
1699
1bebeeca
PA
17002015-11-30 Pedro Alves <palves@redhat.com>
1701
1702 * linux-low.c (linux_resume): Wake up the event loop before
1703 returning.
1704
a67a9fae
PA
17052015-11-30 Pedro Alves <palves@redhat.com>
1706
1707 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1708 check.
1709 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1710 to -1.
1711 * target.c (struct thread_search): New structure.
1712 (thread_search_callback): New function.
1713 (prev_general_thread): New global.
1714 (prepare_to_access_memory, done_accessing_memory): New functions.
1715 * target.h (prepare_to_access_memory, done_accessing_memory):
1716 Replace macros with function declarations.
1717
f2faf941
PA
17182015-11-30 Pedro Alves <palves@redhat.com>
1719
1720 PR 14618
1721 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1722 report TARGET_WAITKIND_NO_RESUMED.
1723 * remote-utils.c (prepare_resume_reply): Handle
1724 TARGET_WAITKIND_NO_RESUMED.
1725 * server.c (report_no_resumed): New global.
1726 (handle_query) <qSupported>: Handle "no-resumed+". Report
1727 "no-resumed+" support.
1728 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1729 return error if the client doesn't support no-resumed events.
1730 (push_stop_notification): New function.
1731 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1732 events if the client supports them.
1733
a681f9c9
PA
17342015-11-30 Pedro Alves <palves@redhat.com>
1735
1736 * linux-low.c (thread_still_has_status_pending_p): Don't check
1737 vCont;t here.
1738 (lwp_resumed): New function.
1739 (status_pending_p_callback): Return early if the LWP is not
1740 supposed to be resumed.
1741
65706a29
PA
17422015-11-30 Pedro Alves <palves@redhat.com>
1743
1744 * linux-low.c (handle_extended_wait): Assert that the LWP's
1745 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1746 thread create events, leave the new child's status pending.
1747 (linux_low_filter_event): If GDB wants to hear about thread exit
1748 events, leave the LWP marked dead and don't delete it.
1749 (linux_wait_for_event_filtered): Don't check for thread exit.
1750 (filter_exit_event): New function.
1751 (linux_wait_1): Use it, when returning an exit event.
1752 (linux_resume_one_lwp_throw): Assert that the LWP's
1753 waitstatus is TARGET_WAITKIND_IGNORE.
1754 * remote-utils.c (prepare_resume_reply): Handle
1755 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1756 * server.c (report_thread_events): New global.
1757 (handle_general_set): Handle QThreadEvents.
1758 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1759 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1760 TARGET_WAITKIND_THREAD_EXITED.
1761 * server.h (report_thread_events): Declare.
1762
56cf4bed
PA
17632015-11-30 Pedro Alves <palves@redhat.com>
1764
1765 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1766 the thread's last_resume_kind was resume_stop.
1767
500c1d85
PA
17682015-11-30 Pedro Alves <palves@redhat.com>
1769
1770 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1771 before returning.
1772
de979965
PA
17732015-11-30 Pedro Alves <palves@redhat.com>
1774
1775 * server.c (handle_v_requests): Handle vCtrlC.
1776
34c65914
PA
17772015-11-30 Pedro Alves <palves@redhat.com>
1778
1779 * gdbthread.h (find_any_thread_of_pid): Declare.
1780 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1781 functions.
1782 * server.c (handle_query): If current_thread is NULL, look for
1783 another thread of the selected process.
1784
79efa585 17852015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 1786 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
1787
1788 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1789 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1790 name in reply.
1791 * target.h (struct target_ops) <thread_name>: New field.
1792 (target_thread_name): New macro.
1793
80d82c19
JB
17942015-11-23 Joel Brobecker <brobecker@adacore.com>
1795
1796 * regcache.h (regcache_invalidate_pid): Add declaration.
1797 * regcache.c (regcache_invalidate_pid): New function, extracted
1798 from regcache_invalidate.
1799 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1800 Add trivial documentation comment.
1801 * lynx-low.c: Use regcache_invalidate_pid instead of
1802 regcache_invalidate.
1803
64da5dd5
JB
18042015-11-23 Joel Brobecker <brobecker@adacore.com>
1805
1806 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1807 and Elf64_auxv_t if the target is Android.
1808
37ce4055
DE
18092015-11-22 Doug Evans <xdje42@gmail.com>
1810
1811 * target.h: #include <sys/types.h>.
1812
06e03fff
PA
18132015-11-19 Pedro Alves <palves@redhat.com>
1814
1815 * linux-low.c (linux_process_qsupported): Change prototype.
1816 Adjust.
1817 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1818 Change prototype.
1819 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1820 and adjust to loop over all features.
1821 * server.c (handle_query) <qSupported>: Adjust to call
1822 target_process_qsupported once, passing it a vector of unprocessed
1823 features.
1824 * target.h (struct target_ops) <process_qsupported>: Change
1825 prototype.
1826 (target_process_qsupported): Adjust.
1827
9a084706
PA
18282015-11-19 Pedro Alves <palves@redhat.com>
1829
1830 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1831 mode.
1832 * configure: Regenerate.
1833
dad44a1f
PA
18342015-11-19 Pedro Alves <palves@redhat.com>
1835
1836 * configure: Regenerate.
1837
231c0592
YQ
18382015-11-19 Yao Qi <yao.qi@linaro.org>
1839
1840 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1841 type to uint32_t.
1842
6c1c9a8b
YQ
18432015-11-19 Yao Qi <yao.qi@linaro.org>
1844
1845 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1846 (struct aarch64_operand): Move enum out.
1847
9caa3311
YQ
18482015-11-19 Yao Qi <yao.qi@linaro.org>
1849
1850 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1851 struct user_fpsimd_state *.
1852 (aarch64_store_fpregset): Likewise.
1853
6a69a054
YQ
18542015-11-19 Yao Qi <yao.qi@linaro.org>
1855
1856 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1857 struct user_pt_regs *.
1858 (aarch64_store_gregset): Likewise.
1859
1798301e
PA
18602015-11-18 Pedro Alves <palves@redhat.com>
1861
1862 * Makefile.in (all_object_files): Add $IPA_OBJS.
1863
ce7715e2
PA
18642015-11-17 Pedro Alves <palves@redhat.com>
1865
1866 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1867 GDB_SIGNAL_0 and gdb_signal_to_string.
1868
c0879059
PA
18692015-11-17 Pedro Alves <palves@redhat.com>
1870
1871 * win32-low.c (handle_output_debug_string): Remove parameter.
1872 (win32_kill): Remove our_status local and adjust call to
1873 handle_output_debug_string.
1874 (get_child_debug_event): Adjust call to
1875 handle_output_debug_string.
1876
1996e237
SM
18772015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1878
1879 * linux-mips-low.c (mips_fill_gregset): Add cast.
1880 (mips_store_gregset): Likewise.
1881 (mips_fill_fpregset): Likewise.
1882 (mips_store_fpregset): Likewise.
1883
cbec665b
SM
18842015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1885
1886 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1887 priv.
1888
eb3e3c67
SM
18892015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1890
1891 * linux-mips-low.c (mips_linux_new_thread): Change type of
1892 watch_type to enum target_hw_bp_type.
1893
171de4b8
SM
18942015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1895
1896 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1897 Change return type to arm_hwbp_type.
1898
04248ead
SM
18992015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1900
1901 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1902 (arm_store_gregset): Likewise.
1903 * linux-arm-low.c (arm_get_hwcap): Likewise.
1904 (arm_read_description): Likewise.
1905
04b3479c
SM
19062015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1907
1908 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1909
2bc84e8a
SM
19102015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1911
1912 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1913 (ppc_fill_vsxregset): Likewise.
1914 (ppc_store_vsxregset): Likewise.
1915 (ppc_fill_vrregset): Likewise.
1916 (ppc_store_vrregset): Likewise.
1917 (ppc_fill_evrregset): Likewise.
1918 (ppc_store_evrregset): Likewise.
1919
e6c5bb05
SM
19202015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1921
1922 * linux-ppc-low.c (ppc_usrregs_info): Remove
1923 forward-declaration.
1924 (ppc_arch_setup): Move lower in file.
1925
7ea45d72
SM
19262015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1927
1928 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1929 (ps_pdwrite): Likewise.
1930
69291610
HW
19312015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1932
1933 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1934 to after assert checks.
1935
b42945fd
SM
19362015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1937
1938 * proc-service.c (ps_pdread): Add/adjust casts.
1939 (ps_pdwrite): Add/adjust casts.
1940
d6f85c84
SM
19412015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1942
1943 * server.c (handle_search_memory_1): Cast return value of
1944 memmem.
1945
f98cd059
SM
19462015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1947
1948 * server.c (write_qxfer_response): Change type of data to
1949 gdb_byte *.
1950
d2412fa5
PA
19512015-10-29 Pedro Alves <palves@redhat.com>
1952
1953 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1954
c17414a2
PA
19552015-10-29 Pedro Alves <palves@redhat.com>
1956
1957 * tracepoint.c (clear_installed_tracepoints): Add casts.
1958
e053fbc4
PA
19592015-10-29 Pedro Alves <palves@redhat.com>
1960
1961 * server.c (handle_v_cont, process_serial_event): Add enum
1962 gdb_signal casts to signal parsing code.
1963
add67df8
PA
19642015-10-29 Pedro Alves <palves@redhat.com>
1965
1966 * linux-low.h (NULL_REGSET): Define.
1967 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1968 * linux-arm-low.c (arm_regsets): Likewise.
1969 * linux-crisv32-low.c (cris_regsets): Likewise.
1970 * linux-m68k-low.c (m68k_regsets): Likewise.
1971 * linux-mips-low.c (mips_regsets): Likewise.
1972 * linux-nios2-low.c (nios2_regsets): Likewise.
1973 * linux-ppc-low.c (ppc_regsets): Likewise.
1974 * linux-s390-low.c (s390_regsets): Likewise.
1975 * linux-sh-low.c (sh_regsets): Likewise.
1976 * linux-sparc-low.c (sparc_regsets): Likewise.
1977 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1978 * linux-tile-low.c (tile_regsets): Likewise.
1979 * linux-x86-low.c (x86_regsets): Likewise.
1980 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1981
50bc912a
PA
19822015-10-29 Pedro Alves <palves@redhat.com>
1983
1984 * linux-low.h (NULL_REGSET): Define.
1985 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1986 * linux-arm-low.c (arm_regsets): Likewise.
1987 * linux-crisv32-low.c (cris_regsets): Likewise.
1988 * linux-m68k-low.c (m68k_regsets): Likewise.
1989 * linux-mips-low.c (mips_regsets): Likewise.
1990 * linux-nios2-low.c (nios2_regsets): Likewise.
1991 * linux-ppc-low.c (ppc_regsets): Likewise.
1992 * linux-s390-low.c (s390_regsets): Likewise.
1993 * linux-sh-low.c (sh_regsets): Likewise.
1994 * linux-sparc-low.c (sparc_regsets): Likewise.
1995 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1996 * linux-tile-low.c (tile_regsets): Likewise.
1997 * linux-x86-low.c (x86_regsets): Likewise.
1998 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1999
682b2546
DE
20002015-10-26 Doug Evans <dje@google.com>
2001
2002 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2003
963843d4
DE
20042015-10-26 Doug Evans <dje@google.com>
2005
2006 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2007
d41401ac
DE
20082015-10-26 Doug Evans <dje@google.com>
2009
2010 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2011 for debug_printf.
2012 (attach_thread, find_new_threads_callback): Ditto.
2013
3db28855
AT
20142015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2015
2016 * mem-break.h (set_breakpoint_data): Remove.
2017
fb78e89c
AT
20182015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2019
2020 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2021 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2022 (initialize_low): Remove set_breakpoint_data call.
2023 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2024 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2025 (initialize_low): Remove set_breakpoint_data call.
2026 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2027 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2028 (initialize_low): Remove set_breakpoint_data call.
2029
2e6ee069
AT
20302015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2031
2032 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2033 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2034 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2035 * target.h (target_breakpoint_kind_from_pc): New macro.
2036
1652a986
AT
20372015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2038
2039 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2040 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2041 the default breakpoint kind.
2042
abeead09
AT
20432015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2044
2045 * linux-arm-low.c (arm_supports_z_point_type): Add software
2046 breakpoint support.
2047
b0b4b501
AT
20482015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2049
2050 * linux-arm-low.c: Refactor breakpoint definitions.
2051 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2052 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2053
8689682c
AT
20542015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2055
2056 * Makefile.in: Add arm.c/o.
2057 * configure.srv: Likewise.
2058 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2059 (arm_breakpoint_kind_from_pc): New function.
2060 (arm_sw_breakpoint_from_kind): Return proper kind.
2061 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2062
27165294
AT
20632015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2064
2065 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2066 removal.
2067 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2068 (struct raw_breakpoint) <size>: Remove.
2069 (struct raw_breakpoint) <kind>: Add.
2070 (bp_size): New function.
2071 (bp_opcode): Likewise.
2072 (find_raw_breakpoint_at): Adjust for kind.
2073 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2074 (remove_memory_breakpoint): Adjust for kind call bp_size.
2075 (set_raw_breakpoint_at): Adjust for kind.
2076 (set_breakpoint): Likewise.
2077 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2078 (delete_raw_breakpoint): Adjust for kind.
2079 (delete_breakpoint): Likewise.
2080 (find_gdb_breakpoint): Likewise.
2081 (set_gdb_breakpoint_1): Likewise.
2082 (set_gdb_breakpoint): Likewise.
2083 (delete_gdb_breakpoint_1): Likewise.
2084 (delete_gdb_breakpoint): Likewise.
2085 (uninsert_raw_breakpoint): Likewise.
2086 (reinsert_raw_breakpoint): Likewise.
2087 (set_breakpoint_data): Remove.
2088 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2089 (check_mem_read): Adjust for kind call bp_size.
2090 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2091 (clone_one_breakpoint): Adjust for kind.
2092 * mem-break.h (set_gdb_breakpoint): Likewise.
2093 (delete_gdb_breakpoint): Likewise.
2094 * server.c (process_serial_event): Likewise.
2095
dd373349
AT
20962015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2097
2098 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2099 (struct linux_target_ops) <breakpoint>: Remove.
2100 (struct linux_target_ops) <breakpoint_len>: Remove.
2101 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2102 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2103 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2104 (arm_sw_breakpoint_from_kind): New function.
2105 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2106 (struct linux_target_ops) <breakpoint>: Remove.
2107 (struct linux_target_ops) <breakpoint_len>: Remove.
2108 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2109 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2110 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2111 (struct linux_target_ops) <breakpoint>: Remove.
2112 (struct linux_target_ops) <breakpoint_len>: Remove.
2113 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2114 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2115 * linux-crisv32-low.c (cris_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-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2121 and sw_breakpoint_from_kind to increment the pc.
2122 (linux_breakpoint_kind_from_pc): New function.
2123 (linux_sw_breakpoint_from_kind): New function.
2124 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2125 (initialize_low): Call breakpoint_kind_from_pc and
2126 sw_breakpoint_from_kind to replace breakpoint_data/len.
2127 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2128 New field.
2129 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2130 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2131 (struct linux_target_ops) <breakpoint>: Remove.
2132 (struct linux_target_ops) <breakpoint_len>: Remove.
2133 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2134 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2135 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2136 (struct linux_target_ops) <breakpoint>: Remove.
2137 (struct linux_target_ops) <breakpoint_len>: Remove.
2138 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2139 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2140 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2141 (struct linux_target_ops) <breakpoint>: Remove.
2142 (struct linux_target_ops) <breakpoint_len>: Remove.
2143 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2144 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2145 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2146 (struct linux_target_ops) <breakpoint>: Remove.
2147 (struct linux_target_ops) <breakpoint_len>: Remove.
2148 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2149 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2150 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2151 (struct linux_target_ops) <breakpoint>: Remove.
2152 (struct linux_target_ops) <breakpoint_len>: Remove.
2153 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2154 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2155 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2156 (struct linux_target_ops) <breakpoint>: Remove.
2157 (struct linux_target_ops) <breakpoint_len>: Remove.
2158 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2159 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2160 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2161 (struct linux_target_ops) <breakpoint>: Remove.
2162 (struct linux_target_ops) <breakpoint_len>: Remove.
2163 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2164 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2165 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2166 (struct linux_target_ops) <breakpoint>: Remove.
2167 (struct linux_target_ops) <breakpoint_len>: Remove.
2168 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2169 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2170 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2171 (struct linux_target_ops) <breakpoint>: Remove.
2172 (struct linux_target_ops) <breakpoint_len>: Remove.
2173 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2174 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2175 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2176 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2177 (struct linux_target_ops) <breakpoint>: Remove.
2178 (struct linux_target_ops) <breakpoint_len>: Remove.
2179 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2180 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2181 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2182 (struct linux_target_ops) <breakpoint>: Remove.
2183 (struct linux_target_ops) <breakpoint_len>: Remove.
2184 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2185 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2186
4cd98a19
AT
21872015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2188
2189 * linux-cris-low.c (cris_get_pc): Remove void arg.
2190
774ee6d2
AR
21912015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2192
2193 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2194 variable name.
2195
833dcd29
AR
21962015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2197
2198 * inferiors.c (thread_pid_matches_callback): New function.
2199 (find_thread_process): New function.
2200 (remove_thread): Reset current_thread.
2201 (remove_process): Assert threads have been removed first.
2202
8d689ee5
YQ
22032015-10-15 Yao Qi <yao.qi@linaro.org>
2204
2205 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2206 if it is 3.
2207 (aarch64_remove_point): Likewise.
2208 * regcache.c (regcache_register_size): New function.
2209
1c2e1515
YQ
22102015-10-12 Yao Qi <yao.qi@linaro.org>
2211
2212 * linux-aarch64-low.c: Update all callers as emit_load_store
2213 is renamed to aarch64_emit_load_store.
2214
e1c587c3
YQ
22152015-10-12 Yao Qi <yao.qi@linaro.org>
2216
2217 * linux-aarch64-low.c: Update all callers of function renaming
2218 from emit_insn to aarch64_emit_insn.
2219
b6542f81
YQ
22202015-10-12 Yao Qi <yao.qi@linaro.org>
2221
2222 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2223 arch/aarch64-insn.h.
2224 (struct aarch64_memory_operand): Likewise.
2225 (ENCODE): Likewise.
2226 (emit_insn): Move to arch/aarch64-insn.c.
2227 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2228 (emit_load_store): Move to arch/aarch64-insn.c.
2229 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2230 (can_encode_int32): Remove.
2231
246994ce
YQ
22322015-10-12 Yao Qi <yao.qi@linaro.org>
2233
2234 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2235 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2236 (aarch64_relocate_instruction): Likewise.
2237 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2238 (struct aarch64_insn_visitor): Likewise.
2239
0badd99f
YQ
22402015-10-12 Yao Qi <yao.qi@linaro.org>
2241
2242 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2243 (struct aarch64_insn_visitor): New.
2244 (struct aarch64_insn_relocation_data): New.
2245 (aarch64_ftrace_insn_reloc_b): New function.
2246 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2247 (aarch64_ftrace_insn_reloc_cb): Likewise.
2248 (aarch64_ftrace_insn_reloc_tb): Likewise.
2249 (aarch64_ftrace_insn_reloc_adr): Likewise.
2250 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2251 (aarch64_ftrace_insn_reloc_others): Likewise.
2252 (visitor): New.
2253 (aarch64_relocate_instruction): Use visitor.
2254
dfaffe9d
YQ
22552015-10-12 Yao Qi <yao.qi@linaro.org>
2256
2257 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2258 int. Add argument buf.
2259 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2260 aarch64_relocate_instruction.
2261
70b439f0
YQ
22622015-10-12 Yao Qi <yao.qi@linaro.org>
2263
2264 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2265 argument insn. Remove local variable insn. Don't call
2266 target_read_uint32.
2267 (aarch64_install_fast_tracepoint_jump_pad): Call
2268 target_read_uint32.
2269
7781c06f
YQ
22702015-09-30 Yao Qi <yao.qi@linaro.org>
2271
2272 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2273 (emit_load_store_pair): Likewise.
2274
9a3c8263
SM
22752015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2276
2277 * dll.c (match_dll): Add cast(s).
2278 (unloaded_dll): Likewise.
2279 * linux-low.c (second_thread_of_pid_p): Likewise.
2280 (delete_lwp_callback): Likewise.
2281 (count_events_callback): Likewise.
2282 (select_event_lwp_callback): Likewise.
2283 (linux_set_resume_request): Likewise.
2284 * server.c (accumulate_file_name_length): Likewise.
2285 (emit_dll_description): Likewise.
2286 (handle_qxfer_threads_worker): Likewise.
2287 (visit_actioned_threads): Likewise.
2288 * thread-db.c (any_thread_of): Likewise.
2289 * tracepoint.c (same_process_p): Likewise.
2290 (match_blocktype): Likewise.
2291 (build_traceframe_info_xml): Likewise.
2292
224c3ddb
SM
22932015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2294
2295 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2296 assignment.
2297 (gdb_unparse_agent_expr): Likewise.
2298 * hostio.c (require_data): Likewise.
2299 (handle_pread): Likewise.
2300 * linux-low.c (disable_regset): Likewise.
2301 (fetch_register): Likewise.
2302 (store_register): Likewise.
2303 (get_dynamic): Likewise.
2304 (linux_qxfer_libraries_svr4): Likewise.
2305 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2306 (set_fast_tracepoint_jump): Likewise.
2307 (uninsert_fast_tracepoint_jumps_at): Likewise.
2308 (reinsert_fast_tracepoint_jumps_at): Likewise.
2309 (validate_inserted_breakpoint): Likewise.
2310 (clone_agent_expr): Likewise.
2311 * regcache.c (init_register_cache): Likewise.
2312 * remote-utils.c (putpkt_binary_1): Likewise.
2313 (decode_M_packet): Likewise.
2314 (decode_X_packet): Likewise.
2315 (look_up_one_symbol): Likewise.
2316 (relocate_instruction): Likewise.
2317 (monitor_output): Likewise.
2318 * server.c (handle_search_memory): Likewise.
2319 (handle_qxfer_exec_file): Likewise.
2320 (handle_qxfer_libraries): Likewise.
2321 (handle_qxfer): Likewise.
2322 (handle_query): Likewise.
2323 (handle_v_cont): Likewise.
2324 (handle_v_run): Likewise.
2325 (captured_main): Likewise.
2326 * target.c (write_inferior_memory): Likewise.
2327 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2328 * tracepoint.c (init_trace_buffer): Likewise.
2329 (add_tracepoint_action): Likewise.
2330 (add_traceframe): Likewise.
2331 (add_traceframe_block): Likewise.
2332 (cmd_qtdpsrc): Likewise.
2333 (cmd_qtdv): Likewise.
2334 (cmd_qtstatus): Likewise.
2335 (response_source): Likewise.
2336 (response_tsv): Likewise.
2337 (cmd_qtnotes): Likewise.
2338 (gdb_collect): Likewise.
2339 (initialize_tracepoint): Likewise.
2340
afbe19f8
PL
23412015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2342
2343 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2344 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2345 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2346 <NOP>: New.
2347 (enum aarch64_condition_codes): New enum.
2348 (w0): New static global.
2349 (fp): Likewise.
2350 (lr): Likewise.
2351 (struct aarch64_memory_operand) <type>: New
2352 MEMORY_OPERAND_POSTINDEX type.
2353 (postindex_memory_operand): New helper function.
2354 (emit_ret): New function.
2355 (emit_load_store_pair): New function, factored out of emit_stp
2356 with support for MEMORY_OPERAND_POSTINDEX.
2357 (emit_stp): Rewrite using emit_load_store_pair.
2358 (emit_ldp): New function.
2359 (emit_load_store): Likewise.
2360 (emit_ldr): Mention post-index instruction in comment.
2361 (emit_ldrh): New function.
2362 (emit_ldrb): New function.
2363 (emit_ldrsw): Mention post-index instruction in comment.
2364 (emit_str): Likewise.
2365 (emit_subs): New function.
2366 (emit_cmp): Likewise.
2367 (emit_and): Likewise.
2368 (emit_orr): Likewise.
2369 (emit_orn): Likewise.
2370 (emit_eor): Likewise.
2371 (emit_mvn): Likewise.
2372 (emit_lslv): Likewise.
2373 (emit_lsrv): Likewise.
2374 (emit_asrv): Likewise.
2375 (emit_mul): Likewise.
2376 (emit_sbfm): Likewise.
2377 (emit_sbfx): Likewise.
2378 (emit_ubfm): Likewise.
2379 (emit_ubfx): Likewise.
2380 (emit_csinc): Likewise.
2381 (emit_cset): Likewise.
2382 (emit_nop): Likewise.
2383 (emit_ops_insns): New helper function.
2384 (emit_pop): Likewise.
2385 (emit_push): Likewise.
2386 (aarch64_emit_prologue): New function.
2387 (aarch64_emit_epilogue): Likewise.
2388 (aarch64_emit_add): Likewise.
2389 (aarch64_emit_sub): Likewise.
2390 (aarch64_emit_mul): Likewise.
2391 (aarch64_emit_lsh): Likewise.
2392 (aarch64_emit_rsh_signed): Likewise.
2393 (aarch64_emit_rsh_unsigned): Likewise.
2394 (aarch64_emit_ext): Likewise.
2395 (aarch64_emit_log_not): Likewise.
2396 (aarch64_emit_bit_and): Likewise.
2397 (aarch64_emit_bit_or): Likewise.
2398 (aarch64_emit_bit_xor): Likewise.
2399 (aarch64_emit_bit_not): Likewise.
2400 (aarch64_emit_equal): Likewise.
2401 (aarch64_emit_less_signed): Likewise.
2402 (aarch64_emit_less_unsigned): Likewise.
2403 (aarch64_emit_ref): Likewise.
2404 (aarch64_emit_if_goto): Likewise.
2405 (aarch64_emit_goto): Likewise.
2406 (aarch64_write_goto_address): Likewise.
2407 (aarch64_emit_const): Likewise.
2408 (aarch64_emit_call): Likewise.
2409 (aarch64_emit_reg): Likewise.
2410 (aarch64_emit_pop): Likewise.
2411 (aarch64_emit_stack_flush): Likewise.
2412 (aarch64_emit_zero_ext): Likewise.
2413 (aarch64_emit_swap): Likewise.
2414 (aarch64_emit_stack_adjust): Likewise.
2415 (aarch64_emit_int_call_1): Likewise.
2416 (aarch64_emit_void_call_2): Likewise.
2417 (aarch64_emit_eq_goto): Likewise.
2418 (aarch64_emit_ne_goto): Likewise.
2419 (aarch64_emit_lt_goto): Likewise.
2420 (aarch64_emit_le_goto): Likewise.
2421 (aarch64_emit_gt_goto): Likewise.
2422 (aarch64_emit_ge_got): Likewise.
2423 (aarch64_emit_ops_impl): New static global variable.
2424 (aarch64_emit_ops): New target function, return
2425 &aarch64_emit_ops_impl.
2426 (struct linux_target_ops): Install it.
2427
bb903df0
PL
24282015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2429
2430 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2431 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2432 aarch64-ipa.o.
2433 * linux-aarch64-ipa.c: New file.
2434 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2435 and endian.h.
2436 (aarch64_get_thread_area): New target method.
2437 (extract_signed_bitfield): New helper function.
2438 (aarch64_decode_ldr_literal): New function.
2439 (enum aarch64_opcodes): New enum.
2440 (struct aarch64_register): New struct.
2441 (struct aarch64_operand): New struct.
2442 (x0): New static global.
2443 (x1): Likewise.
2444 (x2): Likewise.
2445 (x3): Likewise.
2446 (x4): Likewise.
2447 (w2): Likewise.
2448 (ip0): Likewise.
2449 (sp): Likewise.
2450 (xzr): Likewise.
2451 (aarch64_register): New helper function.
2452 (register_operand): Likewise.
2453 (immediate_operand): Likewise.
2454 (struct aarch64_memory_operand): New struct.
2455 (offset_memory_operand): New helper function.
2456 (preindex_memory_operand): Likewise.
2457 (enum aarch64_system_control_registers): New enum.
2458 (ENCODE): New macro.
2459 (emit_insn): New helper function.
2460 (emit_b): New function.
2461 (emit_bcond): Likewise.
2462 (emit_cb): Likewise.
2463 (emit_tb): Likewise.
2464 (emit_blr): Likewise.
2465 (emit_stp): Likewise.
2466 (emit_ldp_q_offset): Likewise.
2467 (emit_stp_q_offset): Likewise.
2468 (emit_load_store): Likewise.
2469 (emit_ldr): Likewise.
2470 (emit_ldrsw): Likewise.
2471 (emit_str): Likewise.
2472 (emit_ldaxr): Likewise.
2473 (emit_stxr): Likewise.
2474 (emit_stlr): Likewise.
2475 (emit_data_processing_reg): Likewise.
2476 (emit_data_processing): Likewise.
2477 (emit_add): Likewise.
2478 (emit_sub): Likewise.
2479 (emit_mov): Likewise.
2480 (emit_movk): Likewise.
2481 (emit_mov_addr): Likewise.
2482 (emit_mrs): Likewise.
2483 (emit_msr): Likewise.
2484 (emit_sevl): Likewise.
2485 (emit_wfe): Likewise.
2486 (append_insns): Likewise.
2487 (can_encode_int32_in): New helper function.
2488 (aarch64_relocate_instruction): New function.
2489 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2490 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2491 (struct linux_target_ops): Install aarch64_get_thread_area,
2492 aarch64_install_fast_tracepoint_jump_pad and
2493 aarch64_get_min_fast_tracepoint_insn_len.
2494
787749ea
PL
24952015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2496
2497 * Makefile.in (aarch64-insn.o): New rule.
2498 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2499
9812b2e6
YQ
25002015-09-21 Yao Qi <yao.qi@linaro.org>
2501
2502 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2503
18fe412b
YQ
25042015-09-21 Yao Qi <yao.qi@linaro.org>
2505
2506 * tracepoint.c (max_jump_pad_size): Remove.
2507
a0cc84cd
YQ
25082015-09-18 Yao Qi <yao.qi@linaro.org>
2509
2510 * linux-aarch64-low.c: Don't include sys/uio.h.
2511 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2512
d78908cf
WW
25132015-09-16 Wei-cheng Wang <cole945@gmail.com>
2514
2515 * tracepoint.c (eval_result_type): Change prototype.
2516 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2517
d57e0d50
PA
25182015-09-15 Pedro Alves <palves@redhat.com>
2519
2520 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2521 Check whether to report exec events instead of checking whether
2522 multiprocess is enabled.
2523
5a676acc
PA
25242015-09-15 Pedro Alves <palves@redhat.com>
2525
2526 PR remote/18965
2527 * remote-utils.c (prepare_resume_reply): Merge
2528 TARGET_WAITKIND_VFORK_DONE switch case with the
2529 TARGET_WAITKIND_FORKED case.
2530
7c5d0fad
YQ
25312015-09-15 Yao Qi <yao.qi@linaro.org>
2532
2533 * server.c (handle_query): Check string comparison using
2534 "else if" instead of "if".
2535
750ce8d1
YQ
25362015-09-15 Yao Qi <yao.qi@linaro.org>
2537
2538 * server.c (vCont_supported): New global variable.
2539 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2540 matches. Append ";vContSupported+" to own_buf.
2541 (handle_v_requests): Append ";s;S" to own_buf if target supports
2542 hardware single step or vCont_supported is false.
2543 (capture_main): Set vCont_supported to zero.
2544
70b90b91
YQ
25452015-09-15 Yao Qi <yao.qi@linaro.org>
2546
2547 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2548 it to ...
2549 (linux_supports_hardware_single_step): ... New function.
2550 (linux_target_ops): Update.
2551 * lynx-low.c (lynx_target_ops): Set field
2552 supports_hardware_single_step to target_can_do_hardware_single_step.
2553 * nto-low.c (nto_target_ops): Likewise.
2554 * spu-low.c (spu_target_ops): Likewise.
2555 * win32-low.c (win32_target_ops): Likewise.
2556 * target.c (target_can_do_hardware_single_step): New function.
2557 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2558 Remove. <supports_hardware_single_step>: New field.
2559 (target_supports_conditional_breakpoints): Remove.
2560 (target_supports_hardware_single_step): New macro.
2561 (target_can_do_hardware_single_step): Declare.
2562 * server.c (handle_query): Use target_supports_hardware_single_step
2563 instead of target_supports_conditional_breakpoints.
2564
ade90bde
YQ
25652015-09-15 Yao Qi <yao.qi@linaro.org>
2566
2567 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2568 function.
2569 (struct linux_target_ops the_low_target): Install
2570 aarch64_linux_siginfo_fixup.
2571
94585166
DB
25722015-09-11 Don Breazeal <donb@codesourcery.com>
2573 Luis Machado <lgustavo@codesourcery.com>
2574
2575 * linux-low.c (linux_mourn): Static declaration.
2576 (linux_arch_setup): Move in front of
2577 handle_extended_wait.
2578 (linux_arch_setup_thread): New function.
2579 (handle_extended_wait): Handle exec events. Call
2580 linux_arch_setup_thread. Make event_lwp argument a
2581 pointer-to-a-pointer.
2582 (check_zombie_leaders): Do not check stopped threads.
2583 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2584 (linux_low_filter_event): Add lwp and thread for exec'ing
2585 non-leader thread if leader thread has been deleted.
2586 Refactor code into linux_arch_setup_thread and call it.
2587 Pass child lwp pointer by reference to handle_extended_wait.
2588 (linux_wait_for_event_filtered): Update comment.
2589 (linux_wait_1): Prevent clobbering exec event status.
2590 (linux_supports_exec_events): New function.
2591 (linux_target_ops) <supports_exec_events>: Initialize new member.
2592 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2593 new member.
2594 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2595 * server.c (report_exec_events): New global variable.
2596 (handle_query): Handle qSupported query for exec-events feature.
2597 (captured_main): Initialize report_exec_events.
2598 * server.h (report_exec_events): Declare new global variable.
2599 * target.h (struct target_ops) <supports_exec_events>: New
2600 member.
2601 (target_supports_exec_events): New macro.
2602 * win32-low.c (win32_target_ops) <supports_exec_events>:
2603 Initialize new member.
2604
0568462b
MM
26052015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2606
2607 * linux-low.c (linux_low_enable_btrace): Remove.
2608 (linux_target_ops): Replace linux_low_enable_btrace with
2609 linux_enable_btrace.
2610
39edd165
YQ
26112015-09-03 Yao Qi <yao.qi@linaro.org>
2612
2613 * linux-aarch64-low.c (aarch64_insert_point): Call
2614 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2615 returns true.
2616
1db33b5a
UW
26172015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2618
2619 * linux-low.c (check_stopped_by_breakpoint): Use
2620 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2621
ab290430
PA
26222015-08-27 Pedro Alves <palves@redhat.com>
2623
2624 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2625
8d749320
SM
26262015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2627
6711b7f8
SM
2628 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2629 the XNEW-family equivalent.
8d749320
SM
2630 (compile_bytecodes): Likewise.
2631 * dll.c (loaded_dll): Likewise.
2632 * event-loop.c (append_callback_event): Likewise.
2633 (create_file_handler): Likewise.
2634 (create_file_event): Likewise.
2635 * hostio.c (handle_open): Likewise.
2636 * inferiors.c (add_thread): Likewise.
2637 (add_process): Likewise.
2638 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2639 * linux-arm-low.c (arm_new_process): Likewise.
2640 (arm_new_thread): Likewise.
2641 * linux-low.c (add_to_pid_list): Likewise.
2642 (linux_add_process): Likewise.
2643 (handle_extended_wait): Likewise.
2644 (add_lwp): Likewise.
2645 (enqueue_one_deferred_signal): Likewise.
2646 (enqueue_pending_signal): Likewise.
2647 (linux_resume_one_lwp_throw): Likewise.
2648 (linux_resume_one_thread): Likewise.
2649 (linux_read_memory): Likewise.
2650 (linux_write_memory): Likewise.
2651 * linux-mips-low.c (mips_linux_new_process): Likewise.
2652 (mips_linux_new_thread): Likewise.
2653 (mips_add_watchpoint): Likewise.
2654 * linux-x86-low.c (initialize_low_arch): Likewise.
2655 * lynx-low.c (lynx_add_process): Likewise.
2656 * mem-break.c (set_raw_breakpoint_at): Likewise.
2657 (set_breakpoint): Likewise.
2658 (add_condition_to_breakpoint): Likewise.
2659 (add_commands_to_breakpoint): Likewise.
2660 (clone_agent_expr): Likewise.
2661 (clone_one_breakpoint): Likewise.
2662 * regcache.c (new_register_cache): Likewise.
2663 * remote-utils.c (look_up_one_symbol): Likewise.
2664 * server.c (queue_stop_reply): Likewise.
2665 (start_inferior): Likewise.
2666 (queue_stop_reply_callback): Likewise.
2667 (handle_target_event): Likewise.
2668 * spu-low.c (fetch_ppc_memory): Likewise.
2669 (store_ppc_memory): Likewise.
2670 * target.c (set_target_ops): Likewise.
2671 * thread-db.c (thread_db_load_search): Likewise.
2672 (try_thread_db_load_1): Likewise.
2673 * tracepoint.c (add_tracepoint): Likewise.
2674 (add_tracepoint_action): Likewise.
2675 (create_trace_state_variable): Likewise.
2676 (cmd_qtdpsrc): Likewise.
2677 (cmd_qtro): Likewise.
2678 (add_while_stepping_state): Likewise.
2679 * win32-low.c (child_add_thread): Likewise.
2680 (get_image_name): Likewise.
2681
ed8b7b42
YQ
26822015-08-25 Yao Qi <yao.qi@linaro.org>
2683
2684 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2685
db3cb7cb
YQ
26862015-08-25 Yao Qi <yao.qi@linaro.org>
2687
2688 * Makefile.in (aarch64-linux.o): New rule.
2689 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2690 srv_tgtobj.
2691 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2692 (aarch64_init_debug_reg_state): Make it extern.
2693 (aarch64_linux_prepare_to_resume): Remove.
2694
f6011a1c
YQ
26952015-08-25 Yao Qi <yao.qi@linaro.org>
2696
2697 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2698 lwp_arch_private_info and ptid_of_lwp.
2699
88e2cf7e
YQ
27002015-08-25 Yao Qi <yao.qi@linaro.org>
2701
2702 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2703 Find proc_info by find_process_pid. All callers updated.
2704
5e35436e
YQ
27052015-08-25 Yao Qi <yao.qi@linaro.org>
2706
2707 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2708 Remove.
2709 (debug_reg_change_callback): Remove.
2710 (aarch64_notify_debug_reg_change): Remove.
2711
4a8a7965
YQ
27122015-08-25 Yao Qi <yao.qi@linaro.org>
2713
2714 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2715 Call current_lwp_ptid.
2716
32a271ee
YQ
27172015-08-25 Yao Qi <yao.qi@linaro.org>
2718
2719 * linux-aarch64-low.c (debug_reg_change_callback): Use
2720 debug_printf.
2721
0d51c8d7
YQ
27222015-08-25 Yao Qi <yao.qi@linaro.org>
2723
2724 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2725
31a43dd5
YQ
27262015-08-25 Yao Qi <yao.qi@linaro.org>
2727
2728 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2729
8ee52567
YQ
27302015-08-25 Yao Qi <yao.qi@linaro.org>
2731
2732 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2733 the code.
2734
ff3f0f45
YQ
27352015-08-25 Yao Qi <yao.qi@linaro.org>
2736
2737 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2738 Remove.
2739 (debug_reg_change_callback): Remove argument entry and add argument
2740 lwp. Remove local variable thread. Don't print thread id in the
2741 debugging output. Don't check whether pid of thread equals to pid.
2742 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2743 iterate_over_lwps instead find_inferior.
2744
3d40fbb5
PA
27452015-08-24 Pedro Alves <palves@redhat.com>
2746
2747 * inferiors.c (get_first_process): New function.
2748 * inferiors.h (get_first_process): New declaration.
2749 * remote-utils.c (read_ptid): Default to the first process in the
2750 list, instead of to the current thread's process.
2751
438e1e42
PA
27522015-08-24 Pedro Alves <palves@redhat.com>
2753
2754 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2755 * event-loop.c: Likewise.
2756 * remote-utils.c: Likewise.
2757 * tracepoint.c: Likewise.
2758
a8c6d4fc
PA
27592015-08-24 Pedro Alves <palves@redhat.com>
2760
2761 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2762 ptid_get_lwp.
2763
99b0bb12
PA
27642015-08-21 Pedro Alves <palves@redhat.com>
2765
2766 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2767 instead of literal 1.
2768
f8904751
PA
27692015-08-21 Pedro Alves <palves@redhat.com>
2770
2771 * tdesc.c (default_description): Explicitly zero-initialize.
2772
465a859e
PA
27732015-08-21 Pedro Alves <palves@redhat.com>
2774
2775 PR gdb/18749
2776 * inferiors.c (remove_thread): Discard any pending stop reply for
2777 this thread.
2778 * server.c (remove_all_on_match_pid): Rename to ...
2779 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2780 instead of a pid.
2781 (discard_queued_stop_replies): Change parameter to a ptid. Now
2782 extern.
2783 (handle_v_kill, kill_inferior_callback, captured_main)
2784 (process_serial_event): Adjust.
2785 * server.h (discard_queued_stop_replies): Declare.
2786
f0db101d
PA
27872015-08-21 Pedro Alves <palves@redhat.com>
2788
2789 * linux-low.c (wait_for_sigstop): Always switch to no thread
2790 selected if the previously current thread dies.
2791 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2792 process instead of the current thread's.
2793 * remote-utils.c (input_interrupt): Don't check if there's no
2794 current thread.
2795 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2796 current thread to the general thread fails, error out.
2797 (handle_qxfer_auxv, handle_qxfer_libraries)
2798 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2799 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2800 (handle_query): Check if there's a thread selected instead of
2801 checking whether there's any thread in the thread list.
2802 (handle_qxfer_threads, handle_qxfer_btrace)
2803 (handle_qxfer_btrace_conf): Don't error out early if there's no
2804 thread in the thread list.
2805 (handle_v_cont, myresume): Don't set the current thread to the
2806 continue thread.
2807 (process_serial_event) <Hg handling>: Also set thread_id if the
2808 previous general thread is still alive.
2809 (process_serial_event) <g/G handling>: If setting the current
2810 thread to the general thread fails, error out.
2811 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2812 thread's lwp instead of the current thread's.
2813 * target.c (set_desired_thread): If the desired thread was not
2814 found, leave the current thread pointing to NULL. Return an int
2815 (boolean) indicating success.
2816 * target.h (set_desired_thread): Change return type to int.
2817
40045d91
MF
28182015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2819
2820 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2821 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2822 #includes.
2823 (ps_get_thread_area): New function.
2824
45face3b
GB
28252015-08-19 Gary Benson <gbenson@redhat.com>
2826
2827 * hostio.c (handle_pread): Do not attempt to read more data
2828 than hostio_reply_with_data can fit in a packet.
2829
16d5f642
JB
28302015-08-18 Joel Brobecker <brobecker@adacore.com>
2831
2832 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2833
a738da3a
MF
28342015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2835
2836 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2837
33ebda9d
PA
28382015-08-06 Pedro Alves <palves@redhat.com>
2839
2840 * tracepoint.c (expr_eval_result): Now an int.
2841
a44892be
PA
28422015-08-06 Pedro Alves <palves@redhat.com>
2843
2844 * gdbthread.h (struct regcache): Forward declare.
2845 (struct thread_info) <regcache_data>: Now a struct regcache
2846 pointer.
2847 * inferiors.c (inferior_regcache_data)
2848 (set_inferior_regcache_data): Now work with struct regcache
2849 pointers.
2850 * inferiors.h (struct regcache): Forward declare.
2851 (inferior_regcache_data, set_inferior_regcache_data): Now work
2852 with struct regcache pointers.
2853 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2854 (free_register_cache_thread): Remove struct regcache pointer
2855 casts.
2856
608a1e46
PA
28572015-08-06 Pedro Alves <palves@redhat.com>
2858
2859 * server.c (captured_main): On error, print the exception message
2860 to stderr, and if run_once is set, throw a quit.
2861
f0ce0d3a
PA
28622015-08-06 Pedro Alves <palves@redhat.com>
2863
2864 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2865 the current thread.
2866
bf47e248
PA
28672015-08-06 Pedro Alves <palves@redhat.com>
2868
2869 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2870 reading beyond the passed in buffer length.
2871
b6b9ffcc
PL
28722015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2873
2874 * tracepoint.c (symbol_list) <required>: Remove.
2875
863d01bd
PA
28762015-08-06 Pedro Alves <palves@redhat.com>
2877
2878 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2879 count if stopping and suspending threads.
2880 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2881 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2882 (linux_detach): Complete an ongoing step-over.
2883 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2884 throughout.
2885 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2886 (linux_wait_1): If passing a signal to the inferior after
2887 finishing a step-over, unsuspend and re-resume all lwps. If we
2888 see a single-step event but the thread should be continuing, don't
2889 pass the trap to gdb.
2890 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2891 internal_error instead of gdb_assert.
2892 (enqueue_pending_signal): New function.
2893 (check_ptrace_stopped_lwp_gone): Add debug output.
2894 (start_step_over): Use internal_error instead of gdb_assert.
2895 (complete_ongoing_step_over): New function.
2896 (linux_resume_one_thread): Don't resume a suspended thread.
2897 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2898 it stepping.
2899
00db26fa
PA
29002015-08-06 Pedro Alves <palves@redhat.com>
2901
2902 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2903 (linux_thread_alive): Use lwp_is_marked_dead.
2904 (extended_event_reported): Delete.
2905 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2906 instead of extended_event_reported.
2907 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2908 as well.
2909 (lwp_is_marked_dead): New function.
2910 (lwp_running): Use lwp_is_marked_dead.
2911 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2912 comment.
2913
ad071a30
PA
29142015-08-06 Pedro Alves <palves@redhat.com>
2915
2916 * linux-low.c (linux_wait_1): Move fork event output out of the
2917 !report_to_gdb check. Pass event_child->waitstatus to
2918 target_waitstatus_to_string instead of ourstatus.
2919
524b57e6
YQ
29202015-08-04 Yao Qi <yao.qi@linaro.org>
2921
2922 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2923 if current_thread is 32 bit.
2924
6085d6f6
YQ
29252015-08-04 Yao Qi <yao.qi@linaro.org>
2926
2927 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2928 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2929 * server.c (extended_protocol): Remove "static".
2930 * server.h (extended_protocol): Declare it.
2931
8a7e4587
YQ
29322015-08-04 Yao Qi <yao.qi@linaro.org>
2933
2934 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2935 both aarch64 and aarch32.
2936 (aarch64_set_pc): Likewise.
2937
3b53ae99
YQ
29382015-08-04 Yao Qi <yao.qi@linaro.org>
2939
2940 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2941 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2942 arm-with-neon.xml to srv_xmlfiles.
2943 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2944 (is_64bit_tdesc): New function.
2945 (aarch64_linux_read_description): New function.
2946 (aarch64_arch_setup): Call aarch64_linux_read_description.
2947 (regs_info): Rename to regs_info_aarch64.
2948 (aarch64_regs_info): Return right regs_info.
2949 (initialize_low_arch): Call initialize_low_arch_aarch32.
2950
bd9e6534
YQ
29512015-08-04 Yao Qi <yao.qi@linaro.org>
2952
2953 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2954 * linux-aarch32-low.c: New file.
2955 * linux-aarch32-low.h: New file.
2956 * linux-arm-low.c (arm_fill_gregset): Move it to
2957 linux-aarch32-low.c.
2958 (arm_store_gregset): Likewise.
2959 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2960 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2961 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2962 (regs_info): Rename to regs_info_arm.
2963 (arm_regs_info): Return regs_info_aarch32 if
2964 have_ptrace_getregset is 1 and target description is
2965 arm_with_neon or arm_with_vfpv3.
2966 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2967 Call initialize_low_arch_aarch32 instead.
2968
ded48a5e
YQ
29692015-08-04 Yao Qi <yao.qi@linaro.org>
2970
2971 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2972 * linux-low.c: ... here.
2973 * linux-low.h (have_ptrace_getregset): Declare it.
2974
96e9210f
PA
29752015-08-04 Pedro Alves <palves@redhat.com>
2976
2977 * thread-db.c (struct thread_db): Use new typedefs.
2978 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2979 CHK calls.
2980 (disable_thread_event_reporting): Cast result of dlsym to
2981 destination function pointer type.
2982 (thread_db_mourn): Use td_ta_delete_ftype.
2983
af60a1ef
SL
29842015-08-03 Sandra Loosemore <sandra@codesourcery.com>
2985
2986 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2987 arch variant.
2988 (CDX_BREAKPOINT): Define for R2.
2989 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2990 (the_low_target): Add comments.
2991
e8b41681
YQ
29922015-07-30 Yao Qi <yao.qi@linaro.org>
2993
2994 * linux-arm-low.c (arm_hwcap): Remove it.
2995 (arm_read_description): New local variable arm_hwcap. Don't
2996 set arm_hwcap to zero.
2997
89abb039
YQ
29982015-07-30 Yao Qi <yao.qi@linaro.org>
2999
3000 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3001 Use regcache->tdesc instead.
3002 (arm_store_wmmxregset): Likewise.
3003 (arm_fill_vfpregset): Likewise.
3004 (arm_store_vfpregset): Likewise.
3005
deca266c
YQ
30062015-07-30 Yao Qi <yao.qi@linaro.org>
3007
3008 * linux-arm-low.c: Include arch/arm.h.
3009 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3010 (arm_store_gregset): Likewise.
3011
aa58a496
SM
30122015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3013
3014 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3015 ptrace's 4th parameter.
3016
50904b25
YQ
30172015-07-27 Yao Qi <yao.qi@linaro.org>
3018
3019 * configure.srv (case aarch64*-*-linux*): Don't set
3020 srv_linux_usrregs.
3021
5826e159
PA
30222015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3023
3024 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3025 sys/ptrace.h.
3026 * linux-arm-low.c: Likewise.
3027 * linux-cris-low.c: Likewise.
3028 * linux-crisv32-low.c: Likewise.
3029 * linux-low.c: Likewise.
3030 * linux-m68k-low.c: Likewise.
3031 * linux-mips-low.c: Likewise.
3032 * linux-nios2-low.c: Likewise.
3033 * linux-s390-low.c: Likewise.
3034 * linux-sparc-low.c: Likewise.
3035 * linux-tic6x-low.c: Likewise.
3036 * linux-tile-low.c: Likewise.
3037 * linux-x86-low.c: Likewise.
3038
54019719
PA
30392015-07-24 Pedro Alves <palves@redhat.com>
3040
3041 * config.in: Regenerate.
3042 * configure: Regenerate.
3043
eb7aa561
PA
30442015-07-24 Pedro Alves <palves@redhat.com>
3045
3046 * acinclude.m4: Include ../ptrace.m4.
3047 * configure.ac: Call GDB_AC_PTRACE.
3048 * config.in, configure: Regenerate.
3049
55d7b841
YQ
30502015-07-24 Yao Qi <yao.qi@linaro.org>
3051
3052 * linux-low.c (linux_create_inferior): Remove setting to
3053 proc->priv->new_inferior.
3054 (linux_attach): Likewise.
3055 (linux_low_filter_event): Likewise.
3056 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3057
c06cbd92
YQ
30582015-07-24 Yao Qi <yao.qi@linaro.org>
3059
3060 * linux-low.c (linux_arch_setup): New function.
3061 (linux_low_filter_event): If proc->tdesc is NULL and
3062 proc->attached is true, call the_low_target.arch_setup.
3063 Otherwise, keep status pending, and return.
3064 (linux_resume_one_lwp_throw): Don't call get_pc if
3065 thread->while_stepping isn't NULL. Don't call
3066 get_thread_regcache if proc->tdesc is NULL.
3067 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3068 (linux_target_ops): Install arch_setup.
3069 * server.c (start_inferior): Call the_target->arch_setup.
3070 * target.h (struct target_ops) <arch_setup>: New field.
3071 (target_arch_setup): New marco.
3072 * lynx-low.c (lynx_target_ops): Update.
3073 * nto-low.c (nto_target_ops): Update.
3074 * spu-low.c (spu_target_ops): Update.
3075 * win32-low.c (win32_target_ops): Update.
3076
5ae3ebba
YQ
30772015-07-24 Yao Qi <yao.qi@linaro.org>
3078
3079 * linux-low.c (linux_add_process): Don't set
3080 proc->priv->new_inferior.
3081 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3082 (linux_attach): Likewise.
3083
eb97750b
YQ
30842015-07-24 Yao Qi <yao.qi@linaro.org>
3085
3086 * server.c (start_inferior): Code refactor.
3087
51aee833
YQ
30882015-07-24 Yao Qi <yao.qi@linaro.org>
3089
3090 * server.c (process_serial_event): Set general_thread.
3091
af1b22f3
YQ
30922015-07-21 Yao Qi <yao.qi@linaro.org>
3093
3094 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3095 aarch64_linux_get_debug_reg_capacity.
3096
554717a3
YQ
30972015-07-17 Yao Qi <yao.qi@linaro.org>
3098
3099 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3100 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3101 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3102 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3103 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3104 (AARCH64_HWP_ALIGNMENT): Likewise.
3105 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3106 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3107 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3108 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3109 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3110 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3111 (struct aarch64_debug_reg_state): Likewise.
3112 (struct arch_lwp_info): Likewise.
3113 (aarch64_align_watchpoint): Likewise.
3114 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3115 (aarch64_watchpoint_length): Likewise.
3116 (aarch64_point_encode_ctrl_reg): Likewise
3117 (aarch64_point_is_aligned): Likewise.
3118 (aarch64_align_watchpoint): Likewise.
3119 (aarch64_linux_set_debug_regs):
3120 (aarch64_dr_state_insert_one_point): Likewise.
3121 (aarch64_dr_state_remove_one_point): Likewise.
3122 (aarch64_handle_breakpoint): Likewise.
3123 (aarch64_handle_aligned_watchpoint): Likewise.
3124 (aarch64_handle_unaligned_watchpoint): Likewise.
3125 (aarch64_handle_watchpoint): Likewise.
3126
c67ca4de
YQ
31272015-07-17 Yao Qi <yao.qi@linaro.org>
3128
3129 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3130 and don't aarch64_get_debug_reg_state. All callers update.
3131 (aarch64_handle_aligned_watchpoint): Likewise.
3132 (aarch64_handle_unaligned_watchpoint): Likewise.
3133 (aarch64_handle_watchpoint): Likewise.
3134 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3135 (aarch64_remove_point): Likewise.
3136
25abf979
YQ
31372015-07-17 Yao Qi <yao.qi@linaro.org>
3138
3139 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3140 debug_printf.
3141 (aarch64_handle_unaligned_watchpoint): Likewise.
3142
db1ff28b
JK
31432015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3144
3145 Revert the previous 3 commits:
3146 Move gdb_regex* to common/
3147 Move linux_find_memory_regions_full & co.
3148 gdbserver build-id attribute generator
3149
700ca40f
JK
31502015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3151 Jan Kratochvil <jan.kratochvil@redhat.com>
3152
3153 gdbserver build-id attribute generator.
3154 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3155 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3156 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3157 (find_phdr): New.
3158 (get_dynamic): Use find_pdhr to traverse program headers.
3159 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3160 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3161 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3162 (get_hex_build_id): New.
3163 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3164 to reply XML document.
3165
9904185c
JK
31662015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3167 Jan Kratochvil <jan.kratochvil@redhat.com>
3168
3169 * target.c: Include target/target-utils.h and fcntl.h.
3170 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3171 (target_fileio_read_stralloc): New functions.
3172
6e5b4429
JK
31732015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3174
3175 * Makefile.in (OBS): Add gdb_regex.o.
3176 (gdb_regex.o): New.
3177 * config.in: Rebuilt.
3178 * configure: Rebuilt.
3179
ddc98fbf
JK
31802015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3181 Jan Kratochvil <jan.kratochvil@redhat.com>
3182
3183 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3184 * Makefile.in (OBS): Add target-utils.o.
3185 (linux-maps.o, target-utils.o): New.
3186 * configure.srv (srv_linux_obj): Add linux-maps.o.
3187
e57bb7a0
PL
31882015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3189
3190 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3191 function, return 1.
3192 (the_low_target): Install it.
3193
586b02a9
PA
31942015-07-14 Pedro Alves <palves@redhat.com>
3195
3196 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3197 Instead, ignore ECHILD, and throw an error for other errnos.
3198
58c1b36c
PA
31992015-07-10 Pedro Alves <palves@redhat.com>
3200
3201 * event-loop.c (struct callback_event) <data>: Change type to
3202 gdb_client_data instance instead of gdb_client_data pointer.
3203 (append_callback_event): Adjust.
3204
421530db
PL
32052015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3206
3207 * linux-aarch64-low.c: Add comments for each linux_target_ops
3208 method. Remove comments already covered in target_ops and
3209 linux_target_ops definitions.
3210 (the_low_target): Add comments for each unimplemented method.
3211
c2d65f38
YQ
32122015-07-09 Yao Qi <yao.qi@linaro.org>
3213
3214 * linux-aarch64-low.c (aarch64_regmap): Remove.
3215 (aarch64_usrregs_info): Remove.
3216 (regs_info): Set field usrregs to NULL.
3217
b20a6524
MM
32182015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3219
3220 * linux-low.c: Include "rsp-low.h"
3221 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3222 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3223 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3224 (handle_btrace_enable_pt): New.
3225 (handle_btrace_general_set): Support "pt".
3226 (handle_btrace_conf_general_set): Support "pt:size".
3227
96c97461
PL
32282015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3229
3230 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3231 Z_PACKET_SW_BP.
3232
37d66942
PL
32332015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3234
3235 * linux-aarch64-low.c: Remove comment about endianness.
3236 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3237 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3238 memcmp.
3239
dc06243f
GB
32402015-06-24 Gary Benson <gbenson@redhat.com>
3241
3242 * linux-i386-ipa.c (stdint.h): Do not include.
3243 * lynx-i386-low.c (stdint.h): Likewise.
3244 * lynx-ppc-low.c (stdint.h): Likewise.
3245 * mem-break.c (stdint.h): Likewise.
3246 * thread-db.c (stdint.h): Likewise.
3247 * tracepoint.c (stdint.h): Likewise.
3248 * win32-low.c (stdint.h): Likewise.
3249
124e13d9
SM
32502015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3251
3252 * server.c (write_qxfer_response): Update call to
3253 remote_escape_output.
3254
909c2cda
JK
32552015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3256 Jan Kratochvil <jan.kratochvil@redhat.com>
3257
3258 Merge multiple hex conversions.
3259 * gdbreplay.c (tohex): Rename to 'fromhex'.
3260 (logchar): Use fromhex.
3261
24c05f46
JK
32622015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3263
3264 * server.c (handle_qxfer_libraries): Set `version' attribute for
3265 <library-list>.
3266
14d2069a
GB
32672015-06-10 Gary Benson <gbenson@redhat.com>
3268
3269 * target.h (struct target_ops) <multifs_open>: New field.
3270 <multifs_unlink>: Likewise.
3271 <multifs_readlink>: Likewise.
3272 * linux-low.c (nat/linux-namespaces.h): New include.
3273 (linux_target_ops): Initialize the_target->multifs_open,
3274 the_target->multifs_unlink and the_target->multifs_readlink.
3275 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3276 * hostio.c (hostio_fs_pid): New static variable.
3277 (hostio_handle_new_gdb_connection): New function.
3278 (handle_setfs): Likewise.
3279 (handle_open): Use the_target->multifs_open as appropriate.
3280 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3281 (handle_readlink): Use the_target->multifs_readlink as
3282 appropriate.
3283 (handle_vFile): Handle vFile:setfs packets.
3284 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3285 after target_handle_new_gdb_connection.
3286
4b8b5e72
GB
32872015-06-10 Gary Benson <gbenson@redhat.com>
3288
3289 * configure.ac (AC_CHECK_FUNCS): Add setns.
3290 * config.in: Regenerate.
3291 * configure: Likewise.
3292 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3293 (linux-namespaces.o): New rule.
3294 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3295
3ac2e371
GB
32962015-06-09 Gary Benson <gbenson@redhat.com>
3297
3298 * hostio.c (handle_open): Process mode argument with
3299 fileio_to_host_mode.
3300
ca9b78ce
YQ
33012015-06-01 Yao Qi <yao.qi@linaro.org>
3302
3303 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3304 * linux-x86-low.c: Likewise.
3305
bfacd19d
DB
33062015-05-28 Don Breazeal <donb@codesourcery.com>
3307
3308 * linux-low.c (handle_extended_wait): Initialize
3309 thread_info.last_resume_kind for new fork children.
3310
452003ef
PA
33112015-05-15 Pedro Alves <palves@redhat.com>
3312
3313 * target.h (target_handle_new_gdb_connection): Rewrite using if
3314 wrapped in do/while.
3315
1041a03c
JB
33162015-05-14 Joel Brobecker <brobecker@adacore.com>
3317
3318 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3319 * configure, config.in: Regenerate.
3320 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3321 Declare typedef.
3322
c269dbdb
DB
33232015-05-12 Don Breazeal <donb@codesourcery.com>
3324
3325 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3326 PTRACE_EVENT_VFORK_DONE.
3327 (linux_low_ptrace_options, extended_event_reported): Add vfork
3328 events.
3329 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3330 and "vforkdone" for RSP 'T' Stop Reply Packet.
3331 * server.h (report_vfork_events): Declare
3332 global variable.
3333
3a8a0396
DB
33342015-05-12 Don Breazeal <donb@codesourcery.com>
3335
3336 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3337 (the_low_target) <new_fork>: Initialize new member.
3338 * linux-arm-low.c (arm_new_fork): New function.
3339 (the_low_target) <new_fork>: Initialize new member.
3340 * linux-low.c (handle_extended_wait): Call new target function
3341 new_fork.
3342 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3343 * linux-mips-low.c (mips_add_watchpoint): New function
3344 extracted from mips_insert_point.
3345 (the_low_target) <new_fork>: Initialize new member.
3346 (mips_linux_new_fork): New function.
3347 (mips_insert_point): Call mips_add_watchpoint.
3348 * linux-x86-low.c (x86_linux_new_fork): New function.
3349 (the_low_target) <new_fork>: Initialize new member.
3350
de0d863e
DB
33512015-05-12 Don Breazeal <donb@codesourcery.com>
3352
3353 * linux-low.c (handle_extended_wait): Implement return value,
3354 rename argument 'event_child' to 'event_lwp', handle
3355 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3356 (linux_low_ptrace_options): New function.
3357 (linux_low_filter_event): Call linux_low_ptrace_options,
3358 use different argument fo linux_enable_event_reporting,
3359 use return value from handle_extended_wait.
3360 (extended_event_reported): New function.
3361 (linux_wait_1): Call extended_event_reported and set
3362 status to report fork events.
3363 (linux_write_memory): Add pid to debug message.
3364 (reset_lwp_ptrace_options_callback): New function.
3365 (linux_handle_new_gdb_connection): New function.
3366 (linux_target_ops): Initialize new structure member.
3367 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3368 * lynx-low.c: Initialize new structure member.
3369 * remote-utils.c (prepare_resume_reply): Implement stop reason
3370 "fork" for "T" stop message.
3371 * server.c (handle_query): Call handle_new_gdb_connection.
3372 * server.h (report_fork_events): Declare global flag.
3373 * target.h (struct target_ops) <handle_new_gdb_connection>:
3374 New member.
3375 (target_handle_new_gdb_connection): New macro.
3376 * win32-low.c: Initialize new structure member.
3377
ddcbc397
DB
33782015-05-12 Don Breazeal <donb@codesourcery.com>
3379
3380 * mem-break.c (APPEND_TO_LIST): Define macro.
3381 (clone_agent_expr): New function.
3382 (clone_one_breakpoint): New function.
3383 (clone_all_breakpoints): New function.
3384 * mem-break.h: Declare new functions.
3385
89245bc0
DB
33862015-05-12 Don Breazeal <donb@codesourcery.com>
3387
3388 * linux-low.c (linux_supports_fork_events): New function.
3389 (linux_supports_vfork_events): New function.
3390 (linux_target_ops): Initialize new structure members.
3391 (initialize_low): Call linux_check_ptrace_features.
3392 * lynx-low.c (lynx_target_ops): Initialize new structure
3393 members.
3394 * server.c (report_fork_events, report_vfork_events):
3395 New global flags.
3396 (handle_query): Add new features to qSupported packet and
3397 response.
3398 (captured_main): Initialize new global variables.
3399 * target.h (struct target_ops) <supports_fork_events>:
3400 New member.
3401 <supports_vfork_events>: New member.
3402 (target_supports_fork_events): New macro.
3403 (target_supports_vfork_events): New macro.
3404 * win32-low.c (win32_target_ops): Initialize new structure
3405 members.
3406
835205d0
GB
34072015-05-12 Gary Benson <gbenson@redhat.com>
3408
3409 * server.c (handle_qxfer_exec_file): Use current process
3410 if annex is empty.
3411
21e94bd9
SL
34122015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3413
3414 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3415 Remove HAVE_PTRACE_GETREGS conditionals.
3416 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3417 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3418
45614f15
YQ
34192015-05-08 Yao Qi <yao.qi@linaro.org>
3420
3421 * linux-low.c (linux_supports_conditional_breakpoints): New
3422 function.
3423 (linux_target_ops): Install new target method.
3424 * lynx-low.c (lynx_target_ops): Install NULL hook for
3425 supports_conditional_breakpoints.
3426 * nto-low.c (nto_target_ops): Likewise.
3427 * spu-low.c (spu_target_ops): Likewise.
3428 * win32-low.c (win32_target_ops): Likewise.
3429 * server.c (handle_query): Check
3430 target_supports_conditional_breakpoints.
3431 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3432 New field.
3433 (target_supports_conditional_breakpoints): New macro.
3434
80ad801e
PA
34352015-05-06 Pedro Alves <palves@redhat.com>
3436
3437 PR server/18081
3438 * server.c (start_inferior): If the process exits, mourn it.
3439
819843c7
GB
34402015-04-21 Gary Benson <gbenson@redhat.com>
3441
3442 * hostio.c (fileio_open_flags_to_host): Factored out to
3443 fileio_to_host_openflags in common/fileio.c. Single use
3444 updated.
3445
a2d5a9d7
MF
34462015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3447
3448 * linux-xtensa-low.c (xtensa_fill_gregset)
3449 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3450 XCHAL_HAVE_LOOP.
3451
deb44829
MF
34522015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3453
3454 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3455 (regs_info): Replace usrregs pointer with NULL.
3456
e57f1de3
GB
34572015-04-17 Gary Benson <gbenson@redhat.com>
3458
3459 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3460 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3461 * server.c (handle_qxfer_exec_file): New function.
3462 (qxfer_packets): Add exec-file entry.
3463 (handle_query): Report qXfer:exec-file:read as supported packet.
3464
62828379
RN
34652015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3466
3467 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3468
b88bb450
GB
34692015-04-09 Gary Benson <gbenson@redhat.com>
3470
3471 * hostio-errno.c (errno_to_fileio_error): Remove function.
3472 Update caller to use remote_fileio_to_fio_error.
3473
c8f4bfdd
YQ
34742015-04-09 Yao Qi <yao.qi@linaro.org>
3475
3476 * linux-low.c (linux_insert_point): Call
3477 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3478 (linux_remove_point): Call remove_memory_breakpoint if type is
3479 raw_bkpt_type_sw.
3480 * linux-x86-low.c (x86_insert_point): Don't call
3481 insert_memory_breakpoint.
3482 (x86_remove_point): Don't call remove_memory_breakpoint.
3483
41f98f02
PA
34842015-04-01 Pedro Alves <palves@redhat.com>
3485 Cleber Rosa <crosa@redhat.com>
3486
3487 * server.c (gdbserver_usage): Reorganize and extend the usage
3488 message.
3489
2bf6fb9d
PA
34902015-03-24 Pedro Alves <palves@redhat.com>
3491
3492 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3493 output. Also dump TRAP_TRACE.
3494 (linux_low_filter_event): In debug output, distinguish a
3495 resume_stop SIGSTOP from a delayed SIGSTOP.
3496
369f6daa
GB
34972015-03-24 Gary Benson <gbenson@redhat.com>
3498
3499 * linux-x86-low.c (x86_linux_new_thread): Moved to
3500 nat/x86-linux.c.
3501 (x86_linux_prepare_to_resume): Likewise.
3502
8e5d4070
GB
35032015-03-24 Gary Benson <gbenson@redhat.com>
3504
3505 * Makefile.in (x86-linux-dregs.o): New rule.
3506 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3507 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3508 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3509 (x86_linux_dr_get): Likewise.
3510 (x86_linux_dr_set): Likewise.
3511 (update_debug_registers_callback): Likewise.
3512 (x86_linux_dr_set_addr): Likewise.
3513 (x86_linux_dr_get_addr): Likewise.
3514 (x86_linux_dr_set_control): Likewise.
3515 (x86_linux_dr_get_control): Likewise.
3516 (x86_linux_dr_get_status): Likewise.
3517 (x86_linux_update_debug_registers): Likewise.
3518
2b95d440
GB
35192015-03-24 Gary Benson <gbenson@redhat.com>
3520
3521 * linux-x86-low.c (x86_linux_update_debug_registers):
3522 New function, factored out from...
3523 (x86_linux_prepare_to_resume): ...this.
3524
14b0bc68
GB
35252015-03-24 Gary Benson <gbenson@redhat.com>
3526
3527 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3528 (x86_linux_dr_set): Likewise.
3529 (update_debug_registers_callback): Likewise.
3530 (x86_linux_dr_set_addr): Likewise.
3531 (x86_linux_dr_get_addr): Likewise.
3532 (x86_linux_dr_set_control): Likewise.
3533 (x86_linux_dr_get_control): Likewise.
3534 (x86_linux_dr_get_status): Likewise.
3535 (x86_linux_prepare_to_resume): Likewise.
3536
5dfe6ca8
GB
35372015-03-24 Gary Benson <gbenson@redhat.com>
3538
3539 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3540 Use perror_with_name. Pass string through gettext.
3541 (x86_linux_dr_set): Likewise.
3542
d33472ad
GB
35432015-03-24 Gary Benson <gbenson@redhat.com>
3544
3545 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3546 (x86_linux_dr_set_addr): ...this.
3547 (x86_dr_low_get_addr): Rename to...
3548 (x86_linux_dr_get_addr): ...this.
3549 (x86_dr_low_set_control): Rename to...
3550 (x86_linux_dr_set_control): ...this.
3551 (x86_dr_low_get_control): Rename to...
3552 (x86_linux_dr_get_control): ...this.
3553 (x86_dr_low_get_status): Rename to...
3554 (x86_linux_dr_get_status): ...this.
3555 (x86_dr_low): Update with new function names.
3556
4b134ca1
GB
35572015-03-24 Gary Benson <gbenson@redhat.com>
3558
3559 * Makefile.in (x86-linux.o): New rule.
3560 * configure.srv: Add x86-linux.o to relevant targets.
3561 * linux-low.c (lwp_set_arch_private_info): New function.
3562 (lwp_arch_private_info): Likewise.
3563 * linux-x86-low.c: Include nat/x86-linux.h.
3564 (arch_lwp_info): Removed structure.
3565 (update_debug_registers_callback):
3566 Use lwp_set_debug_registers_changed.
3567 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3568 and lwp_set_debug_registers_changed.
3569 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3570
34c703da
GB
35712015-03-24 Gary Benson <gbenson@redhat.com>
3572
3573 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3574 * linux-arm-low.c (arm_new_thread): Likewise.
3575 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3576 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3577 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3578 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3579
cff068da
GB
35802015-03-24 Gary Benson <gbenson@redhat.com>
3581
3582 * linux-low.c (ptid_of_lwp): New function.
3583 (lwp_is_stopped): Likewise.
3584 (lwp_stop_reason): Likewise.
3585 * linux-x86-low.c (update_debug_registers_callback):
3586 Use lwp_is_stopped.
3587 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3588 lwp_stop_reason.
3589
b2f7c7e8
GB
35902015-03-24 Gary Benson <gbenson@redhat.com>
3591
3592 * linux-low.h (linux_stop_lwp): Remove declaration.
3593
6d4ee8c6
GB
35942015-03-24 Gary Benson <gbenson@redhat.com>
3595
3596 * linux-low.h: Include nat/linux-nat.h.
3597 * linux-low.c (iterate_over_lwps_args): New structure.
3598 (iterate_over_lwps_filter): New function.
3599 (iterate_over_lwps): Likewise.
3600 * linux-x86-low.c (update_debug_registers_callback):
3601 Update signature to what iterate_over_lwps expects.
3602 Remove PID check that iterate_over_lwps now performs.
3603 (x86_dr_low_set_addr): Use iterate_over_lwps.
3604 (x86_dr_low_set_control): Likewise.
3605
70a0bb6b
GB
36062015-03-24 Gary Benson <gbenson@redhat.com>
3607
3608 * linux-x86-low.c (x86_debug_reg_state): New function.
3609 (x86_linux_prepare_to_resume): Use the above.
3610
7b669087
GB
36112015-03-24 Gary Benson <gbenson@redhat.com>
3612
3613 * linux-low.c (current_lwp_ptid): New function.
3614 * linux-x86-low.c: Include nat/linux-nat.h.
3615 (x86_dr_low_get_addr): Use current_lwp_ptid.
3616 (x86_dr_low_get_control): Likewise.
3617 (x86_dr_low_get_status): Likewise.
3618
eef49a3d
PA
36192015-03-20 Pedro Alves <palves@redhat.com>
3620
3621 * tracepoint.c (cmd_qtstatus): Make "str" const.
3622
b2333d22
PA
36232015-03-20 Pedro Alves <palves@redhat.com>
3624
3625 * server.c (handle_general_set): Make "req_str" const.
3626
23f238d3
PA
36272015-03-19 Pedro Alves <palves@redhat.com>
3628
3629 * linux-low.c (linux_resume_one_lwp): Rename to ...
3630 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3631 instead call perror_with_name.
3632 (check_ptrace_stopped_lwp_gone): New function.
3633 (linux_resume_one_lwp): Reimplement as wrapper around
3634 linux_resume_one_lwp_throw that swallows errors if the LWP is
3635 gone.
3636
91baf43f
PA
36372015-03-19 Pedro Alves <palves@redhat.com>
3638
3639 * linux-low.c (count_events_callback, select_event_lwp_callback):
3640 No longer check whether the thread has resume_stop as last resume
3641 kind.
3642
8bf3b159
PA
36432015-03-19 Pedro Alves <palves@redhat.com>
3644
3645 * linux-low.c (count_events_callback, select_event_lwp_callback):
3646 Use the lwp's status_pending_p field, not the thread's.
3647
b90fc188
PA
36482015-03-19 Pedro Alves <palves@redhat.com>
3649
3650 * linux-low.c (select_event_lwp_callback): Update comments to
3651 no longer mention SIGTRAP.
3652
464b0089
GB
36532015-03-18 Gary Benson <gbenson@redhat.com>
3654
3655 * server.c (handle_query): Do not report vFile:fstat as supported.
3656
aa9e327f
GB
36572015-03-11 Gary Benson <gbenson@redhat.com>
3658
3659 * hostio.c (sys/types.h): New include.
3660 (sys/stat.h): Likewise.
3661 (common-remote-fileio.h): Likewise.
3662 (handle_fstat): New function.
3663 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 3664
791c0056
GB
36652015-03-11 Gary Benson <gbenson@redhat.com>
3666
3667 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3668 struct stat.st_blocks and struct stat.st_blksize.
3669 * configure: Regenerate.
3670 * config.in: Likewise.
3671 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3672 (OBS): Add common-remote-fileio.o.
3673 (common-remote-fileio.o): New rule.
3674
9a9df970
PA
36752015-03-09 Pedro Alves <palves@redhat.com>
3676
3677 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3678 'struct sockaddr' pointer in 'accept' call.
3679
9eb1356e
PA
36802015-03-09 Pedro Alves <palves@redhat.com>
3681
3682 Revert:
3683 2015-03-07 Pedro Alves <palves@redhat.com>
3684 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3685 or <winsock2.h> here. Instead include "gdb_socket.h".
3686 (remote_open): Use union gdb_sockaddr_u.
3687 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3688 or <winsock2.h> here. Instead include "gdb_socket.h".
3689 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3690 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3691 or <sys/un.h>.
3692 (init_named_socket, gdb_agent_helper_thread): Use union
3693 gdb_sockaddr_u.
3694
aac331e4
PA
36952015-03-07 Pedro Alves <palves@redhat.com>
3696
3697 * configure.ac (build_warnings): Move
3698 -Wdeclaration-after-statement to the C-specific set.
3699 * configure: Regenerate.
3700
366c75fc
PA
37012015-03-07 Pedro Alves <palves@redhat.com>
3702
3703 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3704 or <winsock2.h> here. Instead include "gdb_socket.h".
3705 (remote_open): Use union gdb_sockaddr_u.
3706 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3707 or <winsock2.h> here. Instead include "gdb_socket.h".
3708 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3709 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3710 or <sys/un.h>.
3711 (init_named_socket, gdb_agent_helper_thread): Use union
3712 gdb_sockaddr_u.
3713
492d29ea
PA
37142015-03-07 Pedro Alves <palves@redhat.com>
3715
3716 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3717 instead.
3718
60a191ed
YQ
37192015-03-06 Yao Qi <yao.qi@linaro.org>
3720
3721 * linux-aarch64-low.c (aarch64_insert_point): Use
3722 show_debug_regs as a boolean.
3723 (aarch64_remove_point): Likewise.
3724
f5771b1d
PA
37252015-03-05 Pedro Alves <palves@redhat.com>
3726
3727 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3728 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3729 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3730 * nto-low.c (nto_target_ops): Likewise.
3731 * spu-low.c (spu_target_ops): Likewise.
3732 * win32-low.c (win32_target_ops): Likewise.
3733
3e572f71
PA
37342015-03-04 Pedro Alves <palves@redhat.com>
3735
72f4393d 3736 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
3737 Decide whether a breakpoint triggered based on the SIGTRAP's
3738 siginfo.si_code.
72f4393d
L
3739 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3740 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
3741 (linux_low_filter_event): Check for breakpoints before checking
3742 watchpoints.
3743 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3744 siginfo.si_code.
72f4393d
L
3745 (linux_stopped_by_sw_breakpoint)
3746 (linux_supports_stopped_by_sw_breakpoint)
3747 (linux_stopped_by_hw_breakpoint)
3748 (linux_supports_stopped_by_hw_breakpoint): New functions.
3749 (linux_target_ops): Install new target methods.
3e572f71 3750
1ec68e26
PA
37512015-03-04 Pedro Alves <palves@redhat.com>
3752
3753 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3754 * server.c (swbreak_feature, hwbreak_feature): New globals.
3755 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3756 (captured_main): Clear swbreak_feature and hwbreak_feature.
3757 * server.h (swbreak_feature, hwbreak_feature): Declare.
3758 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3759 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3760 supports_stopped_by_hw_breakpoint>: New fields.
3761 (target_supports_stopped_by_sw_breakpoint)
3762 (target_stopped_by_sw_breakpoint)
3763 (target_supports_stopped_by_hw_breakpoint)
3764 (target_stopped_by_hw_breakpoint): Declare.
3765
15c66dd6
PA
37662015-03-04 Pedro Alves <palves@redhat.com>
3767
3768 enum lwp_stop_reason -> enum target_stop_reason
3769 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3770 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3771 (linux_wait_1, stuck_in_jump_pad_callback)
3772 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3773 (linux_stopped_by_watchpoint):
3774 * linux-low.h (enum lwp_stop_reason): Delete.
3775 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3776 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3777
98fc70d6
YQ
37782015-03-04 Yao Qi <yao.qi@linaro.org>
3779
3780 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3781
dd2ac174
GB
37822015-03-03 Gary Benson <gbenson@redhat.com>
3783
3784 * hostio.c (handle_vFile): Fix prefix lengths.
3785
d68e53f4
MM
37862015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3787
3788 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3789 ptr_bits.
3790
bf2d68ab
AA
37912015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3792
3793 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3794 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3795 (clean): Add "rm -f" for above C files.
3796 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3797 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3798 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3799 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3800 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3801 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3802 (init_registers_s390x_vx_linux64)
3803 (init_registers_s390x_tevx_linux64)
3804 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3805 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3806 declarations.
3807 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3808 (s390_store_vxrs_high): New functions.
3809 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3810 NT_S390_VXRS_HIGH.
3811 (s390_arch_setup): Add logic for selecting one of the new target
3812 descriptions. Activate the new vector regsets if applicable.
3813 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3814 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3815 and init_registers_s390x_tevx_linux64.
3816
c966a859
PA
38172015-03-01 Pedro Alves <palves@redhat.com>
3818
3819 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3820 parameter.
3821
4180215b
PA
38222015-02-27 Pedro Alves <palves@redhat.com>
3823
3824 * linux-x86-low.c (u_debugreg_offset): New function.
3825 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3826
749bab01
PA
38272015-02-27 Pedro Alves <palves@redhat.com>
3828
3829 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3830 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3831 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3832 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3833 (ps_lsetfpregs, ps_getpid)
3834 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3835 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3836 (ps_lsetxregs, ps_plog): Declare.
3837
3c14e5a3
PA
38382015-02-27 Pedro Alves <palves@redhat.com>
3839
3840 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3841 IP_AGENT_EXPORT_FUNC.
3842 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3843 IP_AGENT_EXPORT_FUNC.
3844 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3845 (IP_AGENT_EXPORT): Delete.
3846 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3847 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3848 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3849 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3850 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3851 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3852 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3853 (traceframe_read_count, traceframe_write_count)
3854 (traceframes_created, trace_state_variables, get_raw_reg)
3855 (get_trace_state_variable_value, set_trace_state_variable_value)
3856 (ust_loaded, helper_thread_id, cmd_buf): Use
3857 IPA_SYM_EXPORTED_NAME.
3858 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3859 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3860 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3861 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3862 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3863 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3864 EXTERN_C_PUSH/EXTERN_C_POP.
3865 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3866 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3867 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3868 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3869 (traceframe_write_count, traceframe_read_count)
3870 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3871 (about_to_request_buffer_space, get_trace_state_variable_value)
3872 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3873 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3874 EXTERN_C_PUSH/EXTERN_C_POP.
3875 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3876 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3877 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3878 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3879 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3880 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3881 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3882 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3883 Define.
3884 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3885 (IP_AGENT_EXPORT_VAR_DECL): Define.
3886 (tracing): Declare.
3887 (gdb_agent_get_raw_reg): Declare.
3888
fe978cb0
PA
38892015-02-27 Tom Tromey <tromey@redhat.com>
3890 Pedro Alves <palves@redhat.com>
3891
3892 Rename symbols whose names are reserved C++ keywords throughout.
3893
3bc3d82a
PA
38942015-02-27 Pedro Alves <palves@redhat.com>
3895
3896 * Makefile.in (COMPILER): New, get it from autoconf.
3897 (CXX): Get from autoconf instead.
3898 (COMPILE.pre): Use COMPILER.
3899 (CC-LD): Rename to ...
3900 (CC_LD): ... this. Use COMPILER.
3901 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3902 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3903 * acinclude.m4: Include build-with-cxx.m4.
3904 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3905 Disable -Werror by default if building in C++ mode.
3906 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3907 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3908 the C++ compiler. Save/restore CXXFLAGS too.
3909 * configure: Regenerate.
3910
07697489
PA
39112015-02-27 Pedro Alves <palves@redhat.com>
3912
3913 * acinclude.m4: Include libiberty.m4.
3914 * configure.ac: Call libiberty_INIT.
3915 * config.in, configure: Regenerate.
3916
9beb7c4e
PA
39172015-02-26 Pedro Alves <palves@redhat.com>
3918
3919 * linux-low.c (linux_wait_1): When incrementing the PC past a
3920 program breakpoint always use the_low_target.breakpoint_len as
3921 increment, rather than the maximum between that and
3922 the_low_target.decr_pc_after_break.
3923
8090aef2
PA
39242015-02-23 Pedro Alves <palves@redhat.com>
3925
3926 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3927 thread was doing a step-over; always adjust the PC if
3928 we stepped over a permanent breakpoint.
3929 (linux_wait_1): If we stepped over breakpoint that was on top of a
3930 permanent breakpoint, manually advance the PC past it.
3931
bc9540e8
PA
39322015-02-23 Pedro Alves <palves@redhat.com>
3933
3934 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3935 modes.
3936 (x86_fill_gregset, x86_store_gregset): Use it when handling
3937 $orig_eax.
3938
2db9a427
PA
39392015-02-20 Pedro Alves <palves@redhat.com>
3940
3941 * thread-db.c: Include "nat/linux-procfs.h".
3942 (thread_db_init): Skip listing new threads if the kernel supports
3943 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3944
afa8d396
PA
39452015-02-20 Pedro Alves <palves@redhat.com>
3946
3947 * linux-low.c (status_pending_p_callback): Use ptid_match.
3948
c9587f88
AT
39492015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3950
3951 PR breakpoints/16812
3952 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3953 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3954 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3955
b05ec7a5
AT
39562015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3957
3958 PR breakpoints/15956
3959 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3960
d33501a5
MM
39612015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3962
3963 * linux-low.c (linux_low_btrace_conf): Print size.
3964 * server.c (handle_btrace_conf_general_set): New.
3965 (hanle_general_set): Call handle_btrace_conf_general_set.
3966 (handle_query): Report Qbtrace-conf:bts:size as supported.
3967
f4abbc16
MM
39682015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3969
3970 * linux-low.c (linux_low_enable_btrace): Update parameters.
3971 (linux_low_btrace_conf): New.
3972 (linux_target_ops)<to_btrace_conf>: Initialize.
3973 * server.c (current_btrace_conf): New.
3974 (handle_btrace_enable): Rename to ...
3975 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
3976 to target_enable_btrace. Update comment. Update users.
3977 (handle_qxfer_btrace_conf): New.
3978 (qxfer_packets): Add btrace-conf entry.
3979 (handle_query): Report qXfer:btrace-conf:read as supported packet.
3980 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3981 (target_ops)<read_btrace_conf>: New.
3982 (target_enable_btrace): Update parameters.
3983 (target_read_btrace_conf): New.
3984
043c3577
MM
39852015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3986
3987 * server.c (handle_btrace_general_set): Remove call to
3988 target_supports_btrace.
3989 (supported_btrace_packets): New.
3990 (handle_query): Call supported_btrace_packets.
3991 * target.h: include btrace-common.h.
3992 (btrace_target_info): Removed.
3993 (supports_btrace, target_supports_btrace): Update parameters.
3994
734b0e4b
MM
39952015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3996
3997 * Makefile.in (SFILES): Add common/btrace-common.c.
3998 (OBS): Add common/btrace-common.o.
3999 (btrace-common.o): Add build rules.
4000 * linux-low: Include btrace-common.h.
4001 (linux_low_read_btrace): Use struct btrace_data. Call
4002 btrace_data_init and btrace_data_fini.
4003
d6c146e9
PA
40042015-02-06 Pedro Alves <palves@redhat.com>
4005
4006 * thread-db.c (find_new_threads_callback): Add debug output.
4007
20ba1ce6
PA
40082015-02-04 Pedro Alves <palves@redhat.com>
4009
4010 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4011 (resume_stopped_resumed_lwps): New function.
4012 (linux_wait_for_event_filtered): Use it.
4013
8cc73a39
SDJ
40142015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4015
4016 * Makefile.in (SFILES): Add linux-personality.c.
4017 (linux-personality.o): New rule.
4018 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4019 list of objects to be built.
4020 * linux-low.c: Include nat/linux-personality.h.
4021 (linux_create_inferior): Remove code to disable address space
4022 randomization (moved to ../nat/linux-personality.c). Create
4023 cleanup to disable address space randomization.
4024
fb23d554
SDJ
40252015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4026
4027 * Makefile.in (posix-strerror.o): New rule.
4028 (mingw-strerror.o): Likewise.
4029 * configure: Regenerated.
4030 * configure.ac: Source file ../common/common.host. Initialize new
4031 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4032
cdf43629
YQ
40332015-01-14 Yao Qi <yao@codesourcery.com>
4034
4035 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4036 (ppc-linux.o): New rule.
4037 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4038 * configure.ac: AC_CHECK_FUNCS(getauxval).
4039 * config.in: Re-generated.
4040 * configure: Re-generated.
4041 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4042 ppc64_64bit_inferior_p
4043
514c5338
YQ
40442015-01-14 Yao Qi <yao@codesourcery.com>
4045
4046 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4047 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4048 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4049 (PT_ORIG_R3, PT_TRAP): Likewise.
4050 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4051 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4052 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4053
3368c1e5
JB
40542015-01-10 Joel Brobecker <brobecker@adacore.com>
4055
4056 * i387-fp.c (i387_cache_to_xsave): In look over
4057 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4058 zmmh_low_space field by use of zmmh_high_space.
4059
582511be
PA
40602015-01-09 Pedro Alves <palves@redhat.com>
4061
4062 * linux-low.c (step_over_bkpt): Move higher up in the file.
4063 (handle_extended_wait): Don't store the stop_pc here.
4064 (get_stop_pc): Adjust comments and rename to ...
4065 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4066 stopped for a software breakpoint or hardware breakpoint.
4067 (thread_still_has_status_pending_p): New function.
4068 (status_pending_p_callback): Use
4069 thread_still_has_status_pending_p. If the event is no longer
4070 interesting, resume the LWP.
4071 (handle_tracepoints): Add assert.
4072 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4073 (wstatus_maybe_breakpoint): New function.
4074 (cancel_breakpoint): Delete function.
4075 (check_stopped_by_watchpoint): New function, factored out from
4076 linux_low_filter_event.
4077 (lp_status_maybe_breakpoint): Delete function.
4078 (linux_low_filter_event): Remove filter_ptid argument.
4079 Leave thread group exits pending here. Store the LWP's stop PC.
4080 Always leave events pending.
4081 (linux_wait_for_event_filtered): Pull all events out of the
4082 kernel, and leave them all pending.
4083 (count_events_callback, select_event_lwp_callback): Consider all
4084 events.
4085 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4086 (select_event_lwp): Only give preference to the stepping LWP in
4087 all-stop mode. Adjust comments.
4088 (ignore_event): New function.
4089 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4090 references to cancel_breakpoints. Adjust to renames. Also give
4091 equal priority to all LWPs that have had events in non-stop mode.
4092 If reporting a software breakpoint event, unadjust the LWP's PC.
4093 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4094 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4095 Adjust.
4096 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4097 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4098 (linux_stopped_by_watchpoint): Adjust.
4099 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4100 * linux-low.h (enum lwp_stop_reason): New.
4101 (struct lwp_info) <stop_pc>: Adjust comment.
4102 <stopped_by_watchpoint>: Delete field.
4103 <stop_reason>: New field.
4104 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4105 * mem-break.c (software_breakpoint_inserted_here)
4106 (hardware_breakpoint_inserted_here): New function.
4107 * mem-break.h (software_breakpoint_inserted_here)
4108 (hardware_breakpoint_inserted_here): Declare.
4109 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4110 (cancel_breakpoints): Delete.
4111 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4112 (upload_fast_traceframes): Remove references to
4113 cancel_breakpoints.
4114
a33e3959
PA
41152015-01-09 Pedro Alves <palves@redhat.com>
4116
4117 * thread-db.c (find_new_threads_callback): Ignore thread if the
4118 kernel thread ID is -1.
4119
8784d563
PA
41202015-01-09 Pedro Alves <palves@redhat.com>
4121
4122 * linux-low.c (linux_attach_fail_reason_string): Move to
4123 nat/linux-ptrace.c, and rename.
4124 (linux_attach_lwp): Update comment.
4125 (attach_proc_task_lwp_callback): New function.
4126 (linux_attach): Adjust to rename and use
4127 linux_proc_attach_tgid_threads.
4128 (linux_attach_fail_reason_string): Delete declaration.
4129
76f2b779
JB
41302015-01-01 Joel Brobecker <brobecker@adacore.com>
4131
4132 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4133 * server.c (gdbserver_version): Likewise.
4134
fafcc06a
SDJ
41352014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4136
4137 * remote-utils.c: Include ctype.h.
4138 (input_interrupt): Explicitly handle the case when the char
4139 received is the NUL byte. Improve the printing of non-ASCII
4140 characters.
4141
beed38b8
JB
41422014-12-16 Joel Brobecker <brobecker@adacore.com>
4143
4144 * linux-low.c (linux_low_filter_event): Update call to
4145 linux_enable_event_reporting following the addition of
4146 a new parameter to that function.
4147
bf330350
CU
41482014-12-16 Catalin Udma <catalin.udma@freescale.com>
4149
4150 PR server/17457
4151 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4152 (AARCH64_FPCR_REGNO): Likewise.
4153 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4154 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4155 (aarch64_store_fpregset): Likewise.
4156
5227d625
JB
41572014-12-15 Joel Brobecker <brobecker@adacore.com>
4158
4159 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4160 Remove FIXME comment about assumption about N.
4161
f93b65a0
JB
41622014-12-13 Joel Brobecker <brobecker@adacore.com>
4163
4164 * configure.ac: If large-file support is disabled in GDBserver,
4165 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4166 * configure: Regenerate.
4167
e5a9158d
AA
41682014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4169
4170 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4171 warning upon ENODATA from ptrace.
4172 * linux-s390-low.c (s390_store_tdb): New.
4173 (s390_regsets): Add regset for NT_S390_TDB.
4174
feea5f36
AA
41752014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4176
4177 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4178 without a fill_function.
4179 * linux-s390-low.c (s390_fill_last_break): Remove.
4180 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4181 (s390_arch_setup): Use regset's size instead of fill_function for
4182 loop end condition.
4183
098dbe61
AA
41842014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4185
4186 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4187 the regset's store function when ptrace returned an error.
4188 * regcache.c (get_thread_regcache): Invalidate register cache
4189 before fetching inferior's registers.
4190
28eef672
AA
41912014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4192
4193 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4194 while-loop as for-loop.
4195 (regsets_store_inferior_registers): Likewise.
4196
bdca27a2
YQ
41972014-11-28 Yao Qi <yao@codesourcery.com>
4198
4199 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4200 * config.in, configure: Re-generate.
4201 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4202 is defined.
4203
9c232dda
YQ
42042014-11-21 Yao Qi <yao@codesourcery.com>
4205
4206 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4207 (AC_CHECK_HEADERS): Remove malloc.h.
4208 * configure: Re-generated.
4209 * config.in: Re-generated.
4210 * server.h: Don't include alloca.h and malloc.h.
4211 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4212 Don't include malloc.h.
4213
43968415
JB
42142014-11-17 Joel Brobecker <brobecker@adacore.com>
4215
4216 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4217 corresponding ERRNO check in same block.
4218
40e91bc7
PA
42192014-11-12 Pedro Alves <palves@redhat.com>
4220
4221 * server.c (cont_thread): Update comment.
4222 (start_inferior, attach_inferior): No longer clear cont_thread.
4223 (handle_v_cont): No longer set cont_thread.
4224 (captured_main): Clear cont_thread each time a GDB connects.
4225
c2c118cf
PA
42262014-11-12 Pedro Alves <palves@redhat.com>
4227
4228 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4229 thread, and don't resume all threads if the Hc thread has exited.
4230
78708b7c
PA
42312014-11-12 Pedro Alves <palves@redhat.com>
4232
4233 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4234 the process group instead of to a specific LWP.
4235
a2abc7de
PA
42362014-10-15 Pedro Alves <palves@redhat.com>
4237
4238 PR server/17487
4239 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4240 parameter.
4241 (arm_set_thread_context): Delete.
4242 (the_low_target): Adjust.
4243 * win32-i386-low.c (debug_registers_changed)
4244 (debug_registers_used): Delete.
4245 (update_debug_registers_callback): New function.
4246 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4247 needing to update their debug registers.
4248 (win32_get_current_dr): New function.
4249 (x86_dr_low_get_addr, x86_dr_low_get_control)
4250 (x86_dr_low_get_status): Fetch the debug register from the thread
4251 record's context.
4252 (i386_initial_stuff): Adjust.
4253 (i386_get_thread_context): Remove current_event parameter. Don't
4254 clear debug_registers_changed nor copy DR values to
4255 debug_reg_state.
4256 (i386_set_thread_context): Delete.
4257 (i386_prepare_to_resume): New function.
4258 (i386_thread_added): Mark the thread as needing to update irs
4259 debug registers.
4260 (the_low_target): Remove i386_set_thread_context and install
4261 i386_prepare_to_resume.
4262 * win32-low.c (win32_get_thread_context): Adjust.
4263 (win32_set_thread_context): Use SetThreadContext
4264 directly.
4265 (win32_prepare_to_resume): New function.
4266 (win32_require_context): New function, factored out from ...
4267 (thread_rec): ... this.
4268 (continue_one_thread): Call win32_prepare_to_resume on each thread
4269 we're about to continue.
4270 (win32_resume): Call win32_prepare_to_resume on the event thread.
4271 * win32-low.h (struct win32_thread_info)
4272 <debug_registers_changed>: New field.
4273 (struct win32_target_ops): Change prototype of set_thread_context,
4274 delete set_thread_context and add prepare_to_resume.
4275 (win32_require_context): New declaration.
4276
a442d071
GB
42772014-10-08 Gary Benson <gbenson@redhat.com>
4278
4279 * server.h: Do not include common-exceptions.h.
4280
6f1947e8
GB
42812014-10-08 Gary Benson <gbenson@redhat.com>
4282
4283 * server.h: Do not include cleanups.h.
4284
63b434a4
JH
42852014-09-30 James Hogan <james.hogan@imgtec.com>
4286
4287 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4288 mips64-dsp-linux.c.
4289
c4d9ceb6
YQ
42902014-09-23 Yao Qi <yao@codesourcery.com>
4291
4292 * linux-low.c (lp_status_maybe_breakpoint): New function.
4293 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4294 (count_events_callback): Likewise.
4295 (select_event_lwp_callback): Likewise.
4296 (cancel_breakpoints_callback): Likewise.
4297
89a5711c
DB
42982014-09-19 Don Breazeal <donb@codesourcery.com>
4299
4300 * linux-low.c (handle_extended_wait): Call
4301 linux_ptrace_get_extended_event.
4302 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4303 linux_is_extended_waitstatus.
4304
bffc0964
JB
43052014-09-16 Joel Brobecker <brobecker@adacore.com>
4306
4307 * Makefile.in (CPPFLAGS): Define.
4308 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4309 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4310
0bfdf32f
GB
43112014-09-16 Gary Benson <gbenson@redhat.com>
4312
4313 * inferiors.h (current_inferior): Renamed as...
4314 (current_thread): New variable. All uses updated.
4315 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4316 (maybe_move_out_of_jump_pad): Likewise.
4317 (cancel_breakpoint): Likewise.
4318 (linux_low_filter_event): Likewise.
4319 (wait_for_sigstop): Likewise.
4320 (linux_resume_one_lwp): Likewise.
4321 (need_step_over_p): Likewise.
4322 (start_step_over): Likewise.
4323 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4324 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4325 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4326 and save_inferior as saved_thread.
4327 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4328 saved_thread.
4329 (regcache_invalidate_thread): Likewise.
4330 * remote-utils.c (prepare_resume_reply): Likewise.
4331 * thread-db.c (thread_db_get_tls_address): Likewise.
4332 (disable_thread_event_reporting): Likewise.
4333 (remove_thread_event_breakpoints): Likewise.
4334 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4335 as saved_thread.
4336 * target.h (set_desired_inferior): Renamed as...
4337 (set_desired_thread): New declaration. All uses updated.
4338 * server.c (myresume): Updated comment to reference thread instead
4339 of inferior.
4340 (handle_serial_event): Likewise.
4341 (handle_target_event): Likewise.
4342
361c8ade
GB
43432014-09-12 Tom Tromey <tromey@redhat.com>
4344 Gary Benson <gbenson@redhat.com>
4345
4346 * regcache.h: Include common-regcache.h.
4347 (regcache_read_pc): Don't declare.
4348 * regcache.c (get_thread_regcache_for_ptid): New function.
4349
bd9269f7
GB
43502014-09-11 Tom Tromey <tromey@redhat.com>
4351 Gary Benson <gbenson@redhat.com>
4352
4353 * symbol.c: New file.
4354 * Makefile.in (SFILES): Add symbol.c.
4355 (OBS): Add symbol.o.
4356
f8c1d06b
GB
43572014-09-11 Gary Benson <gbenson@redhat.com>
4358
4359 * target.c (target_stop_ptid, target_continue_ptid): New
4360 functions.
4361
721ec300
GB
43622014-09-11 Tom Tromey <tromey@redhat.com>
4363 Gary Benson <gbenson@redhat.com>
4364
4365 * target.h: Include target/target.h.
4366 * target.c (target_read_memory, target_read_uint32)
4367 (target_write_memory): New functions.
4368
c5e92cca
GB
43692014-09-11 Gary Benson <gbenson@redhat.com>
4370
4371 * server.h (debug_hw_points): Don't declare.
4372 * server.c (debug_hw_points): Don't define. Replace all uses
4373 with show_debug_regs.
4374 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4375 all uses with show_debug_regs.
4376
2e4bb98a
EBM
43772014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4378
4379 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4380 endianness into account.
4381 (ppc_supply_ptrace_register): Likewise.
4382
ac740bc7
JH
43832014-09-03 James Hogan <james.hogan@imgtec.com>
4384
4385 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4386 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4387
97ea6506
GB
43882014-09-03 Gary Benson <gbenson@redhat.com>
4389
4390 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4391 ALL_DEBUG_ADDRESS_REGISTERS.
4392
df7e5265
GB
43932014-09-02 Gary Benson <gbenson@redhat.com>
4394
4395 * i386-low.h: Renamed as...
4396 * x86-low.h: New file. All type, function and variable name
4397 prefixes changed from "i386_" to "x86_". All references updated.
4398 * i386-low.c: Renamed as...
4399 * x86-low.c: New file. All type, function and variable name
4400 prefixes changed from "i386_" to "x86_". All references updated.
4401
ed859da7
GB
44022014-09-02 Gary Benson <gbenson@redhat.com>
4403
4404 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4405 (x86_linux_new_thread): Likewise.
4406
860789c7
GB
44072014-08-29 Gary Benson <gbenson@redhat.com>
4408
4409 * server.h (setjmp.h): Do not include.
4410 (toplevel): Do not declare.
4411 (common-exceptions.h): Include.
4412 (cleanups.h): Likewise.
4413 * server.c (toplevel): Do not define.
4414 (exit_code): New static global.
4415 (detach_or_kill_for_exit_cleanup): New function.
4416 (main): New function. Original main renamed to...
4417 (captured_main): New function.
4418 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4419
ff55e1b5
GB
44202014-08-29 Gary Benson <gbenson@redhat.com>
4421
4422 * Makefile.in (SFILES): Add common/common-exceptions.c.
4423 (OBS): Add common-exceptions.o.
4424 (common-exceptions.o): New rule.
4425 * utils.c (prepare_to_throw_exception): New function.
4426
e9bcb658
GB
44272014-08-29 Gary Benson <gbenson@redhat.com>
4428
4429 * config.in: Regenerate.
4430 * configure: Likewise.
4431
e3180625
GB
44322014-08-29 Gary Benson <gbenson@redhat.com>
4433
4434 * Makefile.in (SFILES): Add common/cleanups.c.
4435 (OBS): cleanups.o.
4436 (cleanups.o): New rule.
4437
e3d6ba5d
GB
44382014-08-29 Gary Benson <gbenson@redhat.com>
4439
4440 * utils.c (internal_vwarning): New function.
4441
7096e886
GB
44422014-08-28 Gary Benson <gbenson@redhat.com>
4443
4444 * utils.h (fatal): Remove declaration.
4445 * utils.c (fatal): Remove function.
4446
14ce3192
GB
44472014-08-28 Gary Benson <gbenson@redhat.com>
4448
4449 * tracepoint.c (gdb_agent_init): Replace fatal with
4450 perror_with_name.
4451 (initialize_tracepoint): Likewise.
4452
50278d59
GB
44532014-08-28 Gary Benson <gbenson@redhat.com>
4454
4455 * remote-utils.c (remote_prepare): Replace fatal with error.
4456
aa96c426
GB
44572014-08-28 Gary Benson <gbenson@redhat.com>
4458
4459 * linux-low.c (linux_async): Replace fatal with warning.
4460 Tidy up and return.
4461 (linux_start_non_stop): Return -1 if linux_async failed.
4462
f7160e97
GB
44632014-08-28 Gary Benson <gbenson@redhat.com>
4464
4465 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4466 gdb_assert.
4467 (i386_dr_low_get_addr): Remove vague comment.
4468 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4469 gdb_assert.
4470
38e08fca
GB
44712014-08-28 Gary Benson <gbenson@redhat.com>
4472
4473 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4474 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4475 internal_error.
4476 (linux_resume_one_lwp): Likewise.
4477 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4478 gdb_assert.
4479 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4480 with internal_error.
4481 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4482 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4483 (find_register_by_name): Replace fatal with internal_error.
4484 (find_regno): Likewise.
4485 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4486 * thread-db.c (thread_db_create_event): Likewise.
4487 (thread_db_load_search): Likewise.
4488 (try_thread_db_load_1): Likewise.
4489 * tracepoint.c (get_jump_space_head): Replace fatal with
4490 internal_error.
4491 (claim_trampoline_space): Likewise.
4492 (have_fast_tracepoint_trampoline_buffer): Likewise.
4493 (cmd_qtstart): Likewise.
4494 (stop_tracing): Likewise.
4495 (fast_tracepoint_collecting): Likewise.
4496 (target_malloc): Likewise.
4497 (download_tracepoint): Likewise.
4498 (download_trace_state_variables): Replace check with gdb_assert.
4499 (upload_fast_traceframes): Replace fatal with internal_error.
4500
34abf635
GB
45012014-08-19 Tom Tromey <tromey@redhat.com>
4502 Gary Benson <gbenson@redhat.com>
4503
4504 * Makefile.in (SFILES): Add common/common-debug.c.
4505 (OBS): Add common-debug.o.
4506 (common-debug.o): New rule.
4507 * debug.h (debug_printf): Don't declare.
4508 * debug.c (debug_printf): Renamed and rewritten as...
4509 (debug_vprintf): New function.
4510
f6e94d78
GB
45112014-08-19 Gary Benson <gbenson@redhat.com>
4512
4513 * utils.h: Do not include print-utils.h.
4514
9239eeab
GB
45152014-08-19 Tom Tromey <tromey@redhat.com>
4516 Gary Benson <gbenson@redhat.com>
4517
4518 * server.h: Add static assertion.
4519 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4520
ef87c8bb
GB
45212014-08-19 Tom Tromey <tromey@redhat.com>
4522 Gary Benson <gbenson@redhat.com>
4523
4524 * Makefile.in (SFILES): Add common/errors.c.
4525 (OBS): Add errors.o.
4526 (IPA_OBS): Add errors-ipa.o.
4527 (errors.o): New rule.
4528 (errors-ipa.o): Likewise.
4529 * utils.h (perror_with_name, error, warning): Don't declare.
4530 * utils.c (warning): Renamed and rewritten as...
4531 (vwarning): New function.
4532 (error): Renamed and rewritten as...
4533 (verror): New function.
4534 (internal_error): Renamed and rewritten as...
4535 (internal_verror): New function.
4536
bb974a24
GB
45372014-08-07 Gary Benson <gbenson@redhat.com>
4538
4539 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4540 * configure: Regenerate.
4541 * config.in: Likewise.
4542 * server.h: Do not include errno.h.
4543 * event-loop.c: Likewise.
4544 * hostio-errno.c: Likewise.
4545 * linux-low.c: Likewise.
4546 * remote-utils.c: Likewise.
4547 * spu-low.c: Likewise.
4548 * utils.c: Likewise.
4549 * gdbreplay.c: Unconditionally include errno.h.
4550
6d3d12eb
GB
45512014-08-07 Gary Benson <gbenson@redhat.com>
4552
4553 * server.h: Do not include string.h.
4554 * event-loop.c: Likewise.
4555 * linux-low.c: Likewise.
4556 * regcache.c: Likewise.
4557 * remote-utils.c: Likewise.
4558 * spu-low.c: Likewise.
4559 * utils.c: Likewise.
4560
dccbb609
GB
45612014-08-07 Gary Benson <gbenson@redhat.com>
4562
4563 * server.h: Do not include gdb_assert.h.
4564
e76df0d0
GB
45652014-08-07 Gary Benson <gbenson@redhat.com>
4566
4567 * server.h: Do not include common-utils.h.
4568
4cb9c816
GB
45692014-08-07 Gary Benson <gbenson@redhat.com>
4570
4571 * server.h: Do not include ptid.h.
4572 * notif.h: Likewise.
4573
3995eeee
GB
45742014-08-07 Gary Benson <gbenson@redhat.com>
4575
4576 * server.h: Do not include gdb_locale.h.
4577
cb9f1a9b
GB
45782014-08-07 Gary Benson <gbenson@redhat.com>
4579
4580 * server.h: Do not include gdb/signals.h.
4581 * win32-low.c: Likewise.
4582
a5fceff8
GB
45832014-08-07 Gary Benson <gbenson@redhat.com>
4584
4585 * server.h: Do not include pathmax.h.
4586
b9391142
GB
45872014-08-07 Gary Benson <gbenson@redhat.com>
4588
4589 * server.h: Do not include libiberty.h.
4590 * linux-bfin-low.c: Likewise.
4591
0e443c87
GB
45922014-08-07 Gary Benson <gbenson@redhat.com>
4593
4594 * server.h: Do not include ansidecl.h.
4595
8ebb3f56
GB
45962014-08-07 Gary Benson <gbenson@redhat.com>
4597
4598 * linux-x86-low.c: Do not include stddef.h.
4599 * lynx-ppc-low.c: Likewise.
4600 * tracepoint.c: Likewise.
4601
8980bdf6
GB
46022014-08-07 Gary Benson <gbenson@redhat.com>
4603
4604 * server.h: Do not include stdarg.h.
4605 * nto-low.c: Likewise.
4606
d7096f71
GB
46072014-08-07 Gary Benson <gbenson@redhat.com>
4608
4609 * server.h: Do not include stdlib.h.
4610 * inferiors.c: Likewise.
4611 * linux-low.c: Likewise.
4612 * regcache.c: Likewise.
4613 * spu-low.c: Likewise.
4614 * tracepoint.c: Likewise.
4615 * utils.c: Likewise.
4616
d02f550d
GB
46172014-08-07 Gary Benson <gbenson@redhat.com>
4618
4619 * server.h: Do not include stdio.h.
4620 * linux-low.c: Likewise.
4621 * remote-utils.c: Likewise.
4622 * spu-low.c: Likewise.
4623 * utils.c: Likewise.
4624 * wincecompat.c: Likewise.
4625
87f6c4e3
GB
46262014-08-06 Gary Benson <gbenson@redhat.com>
4627
4628 * regcache.c (init_register_cache): Move conditionals inside if.
4629
7089dca4
GB
46302014-08-06 Gary Benson <gbenson@redhat.com>
4631
4632 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4633
462f517e
GB
46342014-07-31 Gary Benson <gbenson@redhat.com>
4635
4636 * ax.h: Do not include server.h.
4637 * gdbthread.h: Likewise.
4638 * lynx-low.h: Likewise.
4639 * notif.h: Likewise.
4640
976411d6
GB
46412014-07-30 Gary Benson <gbenson@redhat.com>
4642
4643 * server.h: Include common-defs.h.
4644 Do not include config.h or build-gnulib-gdbserver/config.h.
4645
d41f6d8e
GB
46462014-07-30 Gary Benson <gbenson@redhat.com>
4647
4648 * hostio-errno.c: Move server.h to top of includes list.
4649 * inferiors.c: Likewise.
4650 * linux-x86-low.c: Likewise.
4651 * notif.c: Include server.h.
4652
314c6a35
TT
46532014-07-24 Tom Tromey <tromey@redhat.com>
4654 Gary Benson <gbenson@redhat.com>
4655
4656 * server.h (CORE_ADDR): Now unsigned.
4657
69ff6be5
PA
46582014-07-16 Pedro Alves <palves@redhat.com>
4659
4660 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4661
ce9e3fe7
PA
46622014-07-15 Pedro Alves <palves@redhat.com>
4663
4664 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4665 copy.
4666
e76126e8
PA
46672014-07-11 Pedro Alves <palves@redhat.com>
4668
4669 * linux-low.c (kill_wait_lwp): New function, based on
4670 kill_one_lwp_callback, but use my_waitpid directly.
4671 (kill_one_lwp_callback, linux_kill): Use it.
4672
8e9db26e
PA
46732014-06-23 Pedro Alves <palves@redhat.com>
4674
4675 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4676 before setting DR0..DR3.
4677
698b3e08
GB
46782014-06-20 Gary Benson <gbenson@redhat.com>
4679
4680 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4681 * configure: Regenerated.
4682 * config.in: Likewise.
4683
125f8a3d
GB
46842014-06-20 Gary Benson <gbenson@redhat.com>
4685
4686 * Makefile.in (SFILES): Update locations for files moved
4687 from common to nat.
4688 (object file files): Reordered.
4689
42995dbd
GB
46902014-06-20 Gary Benson <gbenson@redhat.com>
4691
4692 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4693 (i386_dr_low_set_addr): Likewise.
4694 (i386_dr_low_get_addr): Likewise.
4695 (i386_dr_low_can_set_control): Likewise.
4696 (i386_dr_low_set_control): Likewise.
4697 (i386_dr_low_get_control): Likewise.
4698 (i386_dr_low_get_status): Likewise.
4699 (i386_get_debug_register_length): Likewise.
4700 * linux-x86-low.c (i386_dr_low_set_addr):
4701 Changed signature. Made static.
4702 (i386_dr_low_get_addr): Likewise.
4703 (i386_dr_low_set_control): Likewise.
4704 (i386_dr_low_get_control): Likewise.
4705 (i386_dr_low_get_status): Likewise.
4706 (i386_dr_low): New global variable.
4707 * win32-i386-low.c (i386_dr_low_set_addr):
4708 Changed signature. Made static.
4709 (i386_dr_low_get_addr): Likewise.
4710 (i386_dr_low_set_control): Likewise.
4711 (i386_dr_low_get_control): Likewise.
4712 (i386_dr_low_get_status): Likewise.
4713 (i386_dr_low): New global variable.
4714
e1d2394b
MS
47152014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4716
4717 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4718 * Makefile.in (AR, AR_FLAGS): Define.
4719 * configure: Regenerate.
4720
3a8ee006
GB
47212014-06-19 Gary Benson <gbenson@redhat.com>
4722
4723 * Makefile.in (i386-dregs.o): New rule.
4724 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4725 * i386-low.c (target.h): Remove include.
4726 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4727 (DR_CONTROL_SHIFT): Likewise.
4728 (DR_CONTROL_SIZE): Likewise.
4729 (DR_RW_EXECUTE): Likewise.
4730 (DR_RW_WRITE): Likewise.
4731 (DR_RW_READ): Likewise.
4732 (DR_RW_IORW): Likewise.
4733 (DR_LEN_1): Likewise.
4734 (DR_LEN_2): Likewise.
4735 (DR_LEN_4): Likewise.
4736 (DR_LEN_8): Likewise.
4737 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4738 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4739 (DR_ENABLE_SIZE): Likewise.
4740 (DR_LOCAL_SLOWDOWN): Likewise.
4741 (DR_GLOBAL_SLOWDOWN): Likewise.
4742 (DR_CONTROL_RESERVED): Likewise.
4743 (I386_DR_CONTROL_MASK): Likewise.
4744 (I386_DR_VACANT): Likewise.
4745 (I386_DR_LOCAL_ENABLE): Likewise.
4746 (I386_DR_GLOBAL_ENABLE): Likewise.
4747 (I386_DR_DISABLE): Likewise.
4748 (I386_DR_SET_RW_LEN): Likewise.
4749 (I386_DR_GET_RW_LEN): Likewise.
4750 (I386_DR_WATCH_HIT): Likewise.
4751 (i386_wp_op_t): Likewise.
4752 (i386_show_dr): Likewise.
4753 (i386_length_and_rw_bits): Likewise.
4754 (i386_insert_aligned_watchpoint): Likewise.
4755 (i386_remove_aligned_watchpoint): Likewise.
4756 (i386_handle_nonaligned_watchpoint): Likewise.
4757 i386_update_inferior_debug_regs(): Likewise.
4758 (i386_dr_insert_watchpoint): Likewise.
4759 (i386_dr_remove_watchpoint): Likewise.
4760 (i386_dr_region_ok_for_watchpoint): Likewise.
4761 (i386_dr_stopped_data_address): Likewise.
4762 (i386_dr_stopped_by_watchpoint): Likewise.
4763
8f26655c
GB
47642014-06-19 Gary Benson <gbenson@redhat.com>
4765
4766 * i386-low.c (i386_dr_show): Renamed to
4767 i386_show_dr and made static. All uses updated.
4768 (i386_dr_length_and_rw_bits): Renamed to
4769 i386_length_and_rw_bits and made static.
4770 All uses updated.
4771 (i386_dr_insert_aligned_watchpoint): Renamed to
4772 i386_insert_aligned_watchpoint and made static.
4773 All uses updated.
4774 (i386_dr_remove_aligned_watchpoint): Renamed to
4775 i386_remove_aligned_watchpoint and made static.
4776 All uses updated.
4777 (i386_dr_update_inferior_debug_regs): Renamed to
4778 i386_update_inferior_debug_regs and made static.
4779 All uses updated.
4780
b9228891
GB
47812014-06-18 Gary Benson <gbenson@redhat.com>
4782
5171def3
GB
4783 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4784 (i386_dr_low_can_set_control): Likewise.
4785 (i386_get_debug_register_length): Likewise.
4786 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4787 (i386_dr_low_can_set_control): Likewise.
4788 (i386_get_debug_register_length): Likewise.
4789
47902014-06-17 Gary Benson <gbenson@redhat.com>
4791
b9228891
GB
4792 * i386-low.h (i386-dregs.h): New include.
4793 (DR_FIRSTADDR): Now in i386-dregs.h.
4794 (DR_LASTADDR): Likewise.
4795 (DR_NADDR): Likewise.
4796 (DR_STATUS): Likewise.
4797 (DR_CONTROL): Likewise.
4798 (i386_debug_reg_state): Likewise.
4799 (i386_dr_insert_watchpoint): Likewise.
4800 (i386_dr_remove_watchpoint): Likewise.
4801 (i386_dr_region_ok_for_watchpoint): Likewise.
4802 (i386_dr_stopped_data_address): Likewise.
4803 (i386_dr_stopped_by_watchpoint): Likewise.
4804 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4805
4be83cc2
GB
48062014-06-18 Gary Benson <gbenson@redhat.com>
4807
4808 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4809 i386_dr_insert_watchpoint.
4810 (i386_low_remove_watchpoint): Renamed to
4811 i386_dr_remove_watchpoint.
4812 (i386_low_region_ok_for_watchpoint): Renamed to
4813 i386_dr_region_ok_for_watchpoint.
4814 (i386_low_stopped_data_address): Renamed to
4815 i386_dr_stopped_data_address.
4816 (i386_low_stopped_by_watchpoint): Renamed to
4817 i386_dr_stopped_by_watchpoint.
4818 * i386-low.c (i386_show_dr): Renamed to
4819 i386_dr_show and made nonstatic. All uses updated.
4820 (i386_length_and_rw_bits): Renamed to
4821 i386_dr_length_and_rw_bits and made nonstatic.
4822 All uses updated.
4823 (i386_insert_aligned_watchpoint): Renamed to
4824 i386_dr_insert_aligned_watchpoint and made nonstatic.
4825 All uses updated.
4826 (i386_remove_aligned_watchpoint): Renamed to
4827 i386_dr_remove_aligned_watchpoint and made nonstatic.
4828 All uses updated.
4829 (i386_update_inferior_debug_regs): Renamed to
4830 i386_dr_update_inferior_debug_regs and made nonstatic.
4831 All uses updated.
4832 (i386_low_insert_watchpoint): Renamed to
4833 i386_dr_insert_watchpoint. All uses updated.
4834 (i386_low_remove_watchpoint): Renamed to
4835 i386_dr_remove_watchpoint. All uses updated.
4836 (i386_low_region_ok_for_watchpoint): Renamed to
4837 i386_dr_region_ok_for_watchpoint. All uses updated.
4838 (i386_low_stopped_data_address): Renamed to
4839 i386_dr_stopped_data_address. All uses updated.
4840 (i386_low_stopped_by_watchpoint): Renamed to
4841 i386_dr_stopped_by_watchpoint. All uses updated.
4842
131aa0d4
GB
48432014-06-18 Gary Benson <gbenson@redhat.com>
4844
4845 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4846 (i386_dr_low_can_set_control): Likewise.
4847 (i386_insert_aligned_watchpoint): New check.
4848
d9305f7f
GB
48492014-06-18 Gary Benson <gbenson@redhat.com>
4850
4851 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4852 Renamed to state.
4853
e927c9fc
GB
48542014-06-18 Gary Benson <gbenson@redhat.com>
4855
4856 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4857 instead of fatal and error.
4858 (i386_handle_nonaligned_watchpoint): Likewise.
4859
1b6d4134
GB
48602014-06-18 Gary Benson <gbenson@redhat.com>
4861
4862 * i386-low.c (i386_get_debug_register_length): New macro.
4863 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4864 (i386_show_dr): Use debug_printf instead of fprintf. Use
4865 phex to format values.
4866
6e62758f
GB
48672014-06-18 Gary Benson <gbenson@redhat.com>
4868
4869 * i386-low.h: Comment changes.
4870 * i386-low.c: Likewise.
4871
fc6e2f03
GB
48722014-06-18 Gary Benson <gbenson@redhat.com>
4873
4874 * i386-low.c: Whitespace changes.
4875
f9d1eeed
TT
48762014-06-12 Tom Tromey <tromey@redhat.com>
4877
4878 * utils.c (freeargv): Remove.
4879
0b04e523
TT
48802014-06-12 Tom Tromey <tromey@redhat.com>
4881
4882 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4883 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4884 (parse_debug_format_options): Likewise.
4885 (gdbserver_usage): Likewise.
4886 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4887 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4888 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4889 against libiberty.
4890 ($(LIBGNU)): Depend on libiberty.
4891 (all-lib): Recurse into all subdirs.
4892 (install-only): Invoke "install" target in subdirs.
4893 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4894 targets.
4895 * configure: Rebuild.
4896 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4897 for vasprintf, vsnprintf, or gettimeofday.
4898 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4899 srv_tgtobj.
4900
270c9937
JB
49012014-06-05 Joel Brobecker <brobecker@adacore.com>
4902
4903 * development.sh: Delete.
4904 * Makefile.in (config.status): Adjust dependency on development.sh.
4905 * configure.ac: Adjust development.sh source call.
4906 * configure: Regenerate.
4907
0a261ed8
PA
49082014-06-02 Pedro Alves <palves@redhat.com>
4909
4910 * ax.c (gdb_free_agent_expr): New function.
4911 * ax.h (gdb_free_agent_expr): New declaration.
4912 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4913 list.
4914 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4915 static.
4916 (clear_breakpoint_conditions_and_commands): New function.
4917 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4918 (clear_breakpoint_conditions_and_commands): New declaration.
4919
e9dae05e
RR
49202014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4921
4922 * linux-aarch64-low.c (asm/ptrace.h): Include.
4923
5876f503
JK
49242014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4925
4926 Fix TLS access for -static -pthread.
4927 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4928 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4929 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4930
802e8e6d
PA
49312014-05-20 Pedro Alves <palves@redhat.com>
4932
4933 * linux-aarch64-low.c (aarch64_insert_point)
4934 (aarch64_remove_point): No longer check whether the type is
4935 supported here. Adjust to new interface.
4936 (the_low_target): Install aarch64_supports_z_point_type as
4937 supports_z_point_type method.
4938 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4939 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4940 instead of a Z packet char. Adjust.
4941 (arm_supports_z_point_type): New function.
4942 (arm_insert_point, arm_remove_point): Adjust to new interface.
4943 (the_low_target): Install arm_supports_z_point_type.
4944 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4945 (cris_insert_point, cris_remove_point): Adjust to new interface.
4946 Don't check whether the type is supported here.
4947 (the_low_target): Install cris_supports_z_point_type.
4948 * linux-low.c (linux_supports_z_point_type): New function.
4949 (linux_insert_point, linux_remove_point): Adjust to new interface.
4950 * linux-low.h (struct linux_target_ops) <insert_point,
4951 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4952 raw_breakpoint pointer parameter.
4953 <supports_z_point_type>: New method.
4954 * linux-mips-low.c (mips_supports_z_point_type): New function.
4955 (mips_insert_point, mips_remove_point): Adjust to new interface.
4956 Use mips_supports_z_point_type.
4957 (the_low_target): Install mips_supports_z_point_type.
4958 * linux-ppc-low.c (the_low_target): Install NULL as
4959 supports_z_point_type method.
4960 * linux-s390-low.c (the_low_target): Install NULL as
4961 supports_z_point_type method.
4962 * linux-sparc-low.c (the_low_target): Install NULL as
4963 supports_z_point_type method.
4964 * linux-x86-low.c (x86_supports_z_point_type): New function.
4965 (x86_insert_point): Adjust to new insert_point interface. Use
4966 insert_memory_breakpoint. Adjust to new
4967 i386_low_insert_watchpoint interface.
4968 (x86_remove_point): Adjust to remove_point interface. Use
4969 remove_memory_breakpoint. Adjust to new
4970 i386_low_remove_watchpoint interface.
4971 (the_low_target): Install x86_supports_z_point_type.
4972 * lynx-low.c (lynx_target_ops): Install NULL as
4973 supports_z_point_type callback.
4974 * nto-low.c (nto_supports_z_point_type): New.
4975 (nto_insert_point, nto_remove_point): Adjust to new interface.
4976 (nto_target_ops): Install nto_supports_z_point_type.
4977 * mem-break.c: Adjust intro comment.
4978 (struct raw_breakpoint) <raw_type, size>: New fields.
4979 <inserted>: Update comment.
4980 <shlib_disabled>: Delete field.
4981 (enum bkpt_type) <gdb_breakpoint>: Delete value.
4982 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4983 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4984 (raw_bkpt_type_to_target_hw_bp_type): New function.
4985 (find_enabled_raw_code_breakpoint_at): New function.
4986 (find_raw_breakpoint_at): New type and size parameters. Use them.
4987 (insert_memory_breakpoint): New function, based off
4988 set_raw_breakpoint_at.
4989 (remove_memory_breakpoint): New function.
4990 (set_raw_breakpoint_at): Reimplement.
4991 (set_breakpoint): New, based on set_breakpoint_at.
4992 (set_breakpoint_at): Reimplement.
4993 (delete_raw_breakpoint): Go through the_target->remove_point
4994 instead of assuming memory breakpoints.
4995 (find_gdb_breakpoint_at): Delete.
4996 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4997 (find_gdb_breakpoint): New function.
4998 (set_gdb_breakpoint_at): Delete.
4999 (z_type_supported): New function.
5000 (set_gdb_breakpoint_1): New function, loosely based off
5001 set_gdb_breakpoint_at.
5002 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5003 (delete_gdb_breakpoint_at): Delete.
5004 (delete_gdb_breakpoint_1): New function, loosely based off
5005 delete_gdb_breakpoint_at.
5006 (delete_gdb_breakpoint): New function.
5007 (clear_gdb_breakpoint_conditions): Rename to ...
5008 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5009 breakpoint.
5010 (add_condition_to_breakpoint): Make static.
5011 (add_breakpoint_condition): Take a struct breakpoint pointer
5012 instead of an address. Adjust.
5013 (gdb_condition_true_at_breakpoint): Rename to ...
5014 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5015 z_type parameter.
5016 (gdb_condition_true_at_breakpoint): Reimplement.
5017 (add_breakpoint_commands): Take a struct breakpoint pointer
5018 instead of an address. Adjust.
5019 (gdb_no_commands_at_breakpoint): Rename to ...
5020 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5021 parameter. Return true if no breakpoint was found. Change debug
5022 output.
5023 (gdb_no_commands_at_breakpoint): Reimplement.
5024 (run_breakpoint_commands): Rename to ...
5025 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5026 and change return type to boolean.
5027 (run_breakpoint_commands): New function.
5028 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5029 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5030 breakpoint. Go through the_target->remove_point instead of
5031 assuming memory breakpoint.
5032 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5033 software and hardware breakpoints.
5034 (reinsert_raw_breakpoint): Go through the_target->insert_point
5035 instead of assuming memory breakpoint.
5036 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5037 software and hardware breakpoints.
5038 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5039 Check both software and hardware breakpoints.
5040 (validate_inserted_breakpoint): Assert the breakpoint is a
5041 software breakpoint. Set the inserted flag to -1 instead of
5042 setting shlib_disabled.
5043 (delete_disabled_breakpoints): Adjust.
5044 (validate_breakpoints): Only validate software breakpoints.
5045 Adjust to inserted flag change.
5046 (check_mem_read, check_mem_write): Skip breakpoint types other
5047 than software breakpoints. Adjust to inserted flag change.
5048 * mem-break.h (enum raw_bkpt_type): New enum.
5049 (raw_breakpoint, struct process_info): Forward declare.
5050 (Z_packet_to_target_hw_bp_type): Delete declaration.
5051 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5052 (set_gdb_breakpoint, delete_gdb_breakpoint)
5053 (clear_breakpoint_conditions): New declarations.
5054 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5055 (breakpoint_inserted_here): Update comment.
5056 (add_breakpoint_condition, add_breakpoint_commands): Replace
5057 address parameter with a breakpoint pointer parameter.
5058 (gdb_breakpoint_here): Update comment.
5059 (delete_gdb_breakpoint_at): Delete.
5060 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5061 * server.c (process_point_options): Take a struct breakpoint
5062 pointer instead of an address. Adjust.
5063 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5064 delete_gdb_breakpoint.
5065 * spu-low.c (spu_target_ops): Install NULL as
5066 supports_z_point_type method.
5067 * target.h: Include mem-break.h.
5068 (struct target_ops) <prepare_to_access_memory>: Update comment.
5069 <supports_z_point_type>: New field.
5070 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5071 instead of a char. Also take a raw breakpoint pointer.
5072 * win32-arm-low.c (the_low_target): Install NULL as
5073 supports_z_point_type.
5074 * win32-i386-low.c (i386_supports_z_point_type): New function.
5075 (i386_insert_point, i386_remove_point): Adjust to new interface.
5076 (the_low_target): Install i386_supports_z_point_type.
5077 * win32-low.c (win32_supports_z_point_type): New function.
5078 (win32_insert_point, win32_remove_point): Adjust to new interface.
5079 (win32_target_ops): Install win32_supports_z_point_type.
5080 * win32-low.h (struct win32_target_ops):
5081 <supports_z_point_type>: New method.
5082 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5083 instead of a char. Also take a raw breakpoint pointer.
5084
932539e3
PA
50852014-05-20 Pedro Alves <palves@redhat.com>
5086
5087 * mem-break.h: Include break-common.h.
5088 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5089 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5090 (Z_packet_to_target_hw_bp_type): New declaration.
5091 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5092 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5093 (Z_PACKET_ACCESS_WP): Delete macros.
5094 (Z_packet_to_hw_type): Delete function.
5095 * i386-low.h: Don't include break-common.h here.
5096 (Z_packet_to_hw_type): Delete declaration.
5097 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5098 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5099 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5100 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5101 * linux-aarch64-low.c: Don't include break-common.h here.
5102 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5103 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5104 (Z_packet_to_target_hw_bp_type): Delete function.
5105 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5106 function.
5107 (mips_insert_point, mips_remove_point): Use
5108 Z_packet_to_target_hw_bp_type.
5109
4ff0d3d8
PA
51102014-05-20 Pedro Alves <palves@redhat.com>
5111
5112 * linux-aarch64-low.c: Include break-common.h.
5113 (enum target_point_type): Delete.
5114 (Z_packet_to_point_type): Rename to ...
5115 (Z_packet_to_target_hw_bp_type): ... this, and return a
5116 target_hw_bp_type instead.
5117 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5118 instead of an enum target_point_type.
5119 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5120 breakpoint type.
5121 (aarch64_dr_state_insert_one_point)
5122 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5123 (aarch64_handle_aligned_watchpoint)
5124 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5125 Take an enum target_hw_bp_type instead of an enum
5126 target_point_type.
5127 (aarch64_supports_z_point_type): New function.
5128 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5129 use Z_packet_to_target_hw_bp_type.
5130
786dc519
JB
51312014-05-20 Joel Brobecker <brobecker@adacore.com>
5132
5133 * configure.ac: Only use -Werror by default when DEVELOPMENT
5134 is true.
5135 * configure: Regenerate.
5136
9e0aa64f
JK
51372014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5138
5139 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5140 * linux-x86-low.c (X86_64_USER_REGS): New.
5141 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5142
2b577b92
YQ
51432014-04-28 Yao Qi <yao@codesourcery.com>
5144
5145 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5146 name.
5147
94611da2
PA
51482014-04-25 Pedro Alves <palves@redhat.com>
5149
5150 PR server/16255
5151 * linux-low.c (linux_attach_fail_reason_string): New function.
5152 (linux_attach_lwp): Delete.
5153 (linux_attach_lwp_1): Rename to ...
5154 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5155 argument. Remove "initial" parameter. Return int instead of
5156 void. Don't error or warn here.
5157 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5158 failure to attach to the tgid. Call warning when failing to
5159 attach to an lwp.
5160 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5161 argument. Remove "initial" parameter. Return int instead of
5162 void. Don't error or warn here.
5163 (linux_attach_fail_reason_string): New declaration.
5164 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5165 interface change. Use linux_attach_fail_reason_string.
5166
01f9f808
MS
51672014-04-24 Michael Sturm <michael.sturm@mintel.com>
5168 Walfred Tedeschi <walfred.tedeschi@intel.com>
5169
5170 * Makefile.in: Added rules to handle new files
5171 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5172 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5173 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5174 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5175 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5176 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5177 x32-avx512-linux.o.
5178 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5179 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5180 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5181 i386/x32-avx512.xml.
5182 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5183 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5184 i386/x32-avx512-linux.xml.
5185 * i387-fp.c (num_avx512_k_registers): New constant for number
5186 of K registers.
5187 (num_avx512_zmmh_low_registers): New constant for number of
5188 lower ZMM registers (0-15).
5189 (num_avx512_zmmh_high_registers): New constant for number of
5190 higher ZMM registers (16-31).
5191 (num_avx512_ymmh_registers): New contant for number of higher
5192 YMM registers (ymm16-31 added by avx521 on x86_64).
5193 (num_avx512_xmm_registers): New constant for number of higher
5194 XMM registers (xmm16-31 added by AVX512 on x86_64).
5195 (struct i387_xsave): Add space for AVX512 registers.
5196 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5197 Add code to handle AVX512 registers.
5198 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5199 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5200 prototypei from generated file.
5201 (tdesc_amd64_avx512_linux): Likewise.
5202 (init_registers_x32_avx512_linux): Likewise.
5203 (tdesc_x32_avx512_linux): Likewise.
5204 (init_registers_i386_avx512_linux): Likewise.
5205 (tdesc_i386_avx512_linux): Likewise.
5206 (x86_64_regmap): Add AVX512 registers.
5207 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5208 mask.
5209 (initialize_low_arch): Add code to initialize AVX512 registers.
5210
51aa91f9
PA
52112014-04-23 Pedro Alves <palves@redhat.com>
5212
5213 * mem-break.c (find_gdb_breakpoint_at): Make static.
5214 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5215
a4165e94
PA
52162014-04-23 Pedro Alves <palves@redhat.com>
5217
5218 * i386-low.c: Don't include break-common.h here.
5219 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5220 prototype to take target_hw_bp_type as argument instead of a Z
5221 packet char.
5222 * i386-low.h: Include break-common.h here.
5223 (Z_packet_to_hw_type): Declare.
5224 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5225 prototypes.
5226 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5227 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5228 (x86_remove_point): Convert the packet number to a
5229 target_hw_bp_type before calling i386_low_remove_watchpoint.
5230 * win32-i386-low.c (i386_insert_point): Convert the packet number
5231 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5232 (i386_remove_point): Convert the packet number to a
5233 target_hw_bp_type before calling i386_low_remove_watchpoint.
5234
b8acf843
PA
52352014-04-23 Pedro Alves <palves@redhat.com>
5236
5237 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5238
d708bcd1
PA
52392014-04-10 Pedro Alves <palves@redhat.com>
5240
5241 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5242 Check if the condition or command is NULL before checking if the
5243 breakpoint is known. On success, return true.
5244 * mem-break.h (add_breakpoint_condition): Document return.
5245 (add_breakpoint_commands): Add describing comment.
5246 * server.c (skip_to_semicolon): New function.
5247 (process_point_options): Use it.
5248
2eec7d5b
PA
52492014-04-09 Pedro Alves <palves@redhat.com>
5250
5251 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5252 to lwpid_of.
5253
fa96cb38
PA
52542014-02-27 Pedro Alves <palves@redhat.com>
5255
5256 PR 12702
5257 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5258 macros.
5259 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5260 output.
5261 (last_thread_of_process_p): Take a PID argument instead of a
5262 thread pointer.
5263 (linux_wait_for_lwp): Delete.
5264 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5265 functions.
5266 (linux_low_filter_event): New function, party factored out from
5267 linux_wait_for_event.
5268 (linux_wait_for_event): Rename to ...
5269 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5270 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5271 sigsuspend. Check for zombie leaders.
5272 (linux_wait_for_event): Reimplement as wrapper around
5273 linux_wait_for_event_filtered.
5274 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5275 a normal or signal exit is seen, it's the whole process exiting.
5276 (wait_for_sigstop): No longer a for_each_inferior callback.
5277 Rewrite on top of linux_wait_for_event_filtered.
5278 (stop_all_lwps): Call wait_for_sigstop directly.
5279 * server.c (resume, handle_target_event): Handle
5280 TARGET_WAITKIND_NO_RESUMED.
5281
d763de10
JB
52822014-02-26 Joel Brobecker <brobecker@adacore.com>
5283
5284 * win32-low.c (psapi_get_dll_name,
5285 * win32_CreateToolhelp32Snapshot): Delete.
5286 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5287 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5288 Delete.
5289 (handle_load_dll): Add function description.
5290 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5291
850a0f76
JB
52922014-02-26 Joel Brobecker <brobecker@adacore.com>
5293
5294 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5295 Add comment.
5296 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5297 base address when calling win32_add_one_solib.
5298 (handle_load_dll): Delete local variable load_addr.
5299 Remove 0x1000 offset applied to DLL base address when calling
5300 win32_add_one_solib.
5301 (handle_unload_dll): Add comment.
5302
f25b3fc3
JB
53032014-02-26 Joel Brobecker <brobecker@adacore.com>
5304
5305 * win32-low.c (win32_add_all_dlls): Renames
5306 win32_ensure_ntdll_loaded. Rewrite function documentation.
5307 Adjust implementation to always load all DLLs.
5308 Add 0x1000 offset to DLL base address when calling
5309 win32_add_one_solib.
5310 (child_initialization_done): New static global.
5311 (do_initial_child_stuff): Set child_initialization_done to
5312 zero during child initialization, and 1 after. Replace call
5313 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5314 Add comment.
5315 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5316 (handle_unload_dll): Add function documentation.
5317 (get_child_debug_event): Ignore load and unload DLL events
5318 during child initialization.
5319
d86d4aaf
DE
53202014-02-20 Doug Evans <dje@google.com>
5321
3bc32da3 5322 Remove global all_lwps.
d86d4aaf
DE
5323 * inferiors.h (ptid_of): Move here from linux-low.h.
5324 (pid_of, lwpid_of): Ditto.
5325 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5326 parameter is a struct thread_info * now.
5327 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5328 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5329 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5330 directly.
5331 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5332 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5333 * linux-arm-low.c (update_registers_callback): Update, "entry"
5334 parameter is a struct thread_info * now.
5335 Fetch lwpid from current_inferior directly.
5336 (arm_insert_point): Pass &all_threads to find_inferior instead of
5337 &all_lwps.
5338 (arm_remove_point): Ditto.
5339 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5340 (arm_prepare_to_resume): Fetch pid from thread.
5341 (arm_read_description): Fetch lwpid from current_inferior directly.
5342 * linux-low.c (all_lwps): Delete.
5343 (delete_lwp): Delete call to remove_inferior.
5344 (handle_extended_wait): Fetch lwpid from thread.
5345 (add_lwp): Don't set lwp->entry.id. Remove call to
5346 add_inferior_to_list.
5347 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5348 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5349 (kill_one_lwp_callback): Ditto.
5350 (linux_kill): Don't dereference NULL pointer.
5351 Fetch ptid,lwpid from thread.
5352 (get_detach_signal): Fetch ptid from thread.
5353 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5354 Simplify call to regcache_invalidate_thread.
5355 (delete_lwp_callback): Update, "entry" parameter is a
5356 struct thread_info * now. Fetch pid from thread.
5357 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5358 (status_pending_p_callback): Update, "entry" parameter is a
5359 struct thread_info * now. Fetch ptid from thread.
5360 (find_lwp_pid): Update, "entry" parameter is a
5361 struct thread_info * now.
5362 (linux_wait_for_lwp): Fetch pid from thread.
5363 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5364 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5365 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5366 (dequeue_one_deferred_signal): Ditto.
5367 (cancel_breakpoint): Fetch ptid from current_inferior.
5368 (linux_wait_for_event): Pass &all_threads to find_inferior,
5369 not &all_lwps. Fetch ptid, lwpid from thread.
5370 (count_events_callback): Update, "entry" parameter is a
5371 struct thread_info * now.
5372 (select_singlestep_lwp_callback): Ditto.
5373 (select_event_lwp_callback): Ditto.
5374 (cancel_breakpoints_callback): Ditto.
5375 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5376 not &all_lwps.
5377 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5378 (unsuspend_one_lwp): Update, "entry" parameter is a
5379 struct thread_info * now.
5380 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5381 not &all_lwps.
5382 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5383 Fetch lwpid from thread, not lwp.
5384 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5385 Pass &all_threads to find_inferior, not &all_lwps.
5386 (send_sigstop): Fetch lwpid from thread, not lwp.
5387 (send_sigstop_callback): Update, "entry" parameter is a
5388 struct thread_info * now.
5389 (suspend_and_send_sigstop_callback): Ditto.
5390 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5391 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5392 struct thread_info * now.
5393 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5394 from thread, lwp.
5395 (lwp_running): Update, "entry" parameter is a
5396 struct thread_info * now.
5397 (stop_all_lwps): Fetch ptid from thread.
5398 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5399 (linux_resume_one_lwp): Fetch lwpid from thread.
5400 (linux_set_resume_request): Update, "entry" parameter is a
5401 struct thread_info * now. Fetch pid, lwpid from thread.
5402 (resume_status_pending_p): Update, "entry" parameter is a
5403 struct thread_info * now.
5404 (need_step_over_p): Ditto. Fetch lwpid from thread.
5405 (start_step_over): Fetch lwpid from thread.
5406 (linux_resume_one_thread): Update, "entry" parameter is a
5407 struct thread_info * now. Fetch lwpid from thread.
5408 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5409 (proceed_one_lwp): Update, "entry" parameter is a
5410 struct thread_info * now. Fetch lwpid from thread.
5411 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5412 struct thread_info * now.
5413 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5414 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5415 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5416 directly.
5417 (regsets_store_inferior_registers): Ditto.
5418 (fetch_register, store_register): Ditto.
5419 (linux_read_memory, linux_write_memory): Ditto.
5420 (linux_request_interrupt): Ditto.
5421 (linux_read_auxv): Ditto.
5422 (linux_xfer_siginfo): Ditto.
5423 (linux_qxfer_spu): Ditto.
5424 (linux_qxfer_libraries_svr4): Ditto.
5425 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5426 moved to inferiors.h.
5427 (get_lwp): Delete.
5428 (get_thread_lwp): Update.
5429 (struct lwp_info): Delete member "entry". Simplify comment for
5430 member "thread".
5431 (all_lwps): Delete.
5432 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5433 current_inferior directly.
5434 (update_watch_registers_callback): Update, "entry" parameter is a
5435 struct thread_info * now. Fetch pid from thread.
5436 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5437 (mips_insert_point): Fetch lwpid from current_inferior.
5438 Pass &all_threads to find_inferior, not &all_lwps.
5439 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5440 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5441 directly.
5442 (mips_stopped_data_address): Ditto.
5443 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5444 directly.
5445 * linux-tile-low.c (tile_arch_setup): Ditto.
5446 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5447 (update_debug_registers_callback): Update, "entry" parameter is a
5448 struct thread_info * now. Fetch pid from thread.
5449 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5450 Pass &all_threads to find_inferior, not &all_lwps.
5451 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5452 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5453 Pass &all_threads to find_inferior, not &all_lwps.
5454 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5455 (i386_dr_low_get_status): Ditto.
5456 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5457 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5458 (x86_linux_read_description): Ditto.
5459 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5460
3b8361aa
DE
54612014-02-20 Doug Evans <dje@google.com>
5462
5463 * inferiors.c (get_first_inferior): Fix buglet.
5464
f7667f0d
DE
54652014-02-19 Doug Evans <dje@google.com>
5466
5467 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5468 * inferiors.c (add_thread): Change result type to struct thread_info *.
5469 All callers updated.
5470 (add_lwp): Call add_thread here instead of in callers.
5471 All callers updated.
5472 * linux-low.h (get_lwp_thread): Rewrite.
5473 (struct lwp_info): New member "thread".
5474
b3312d80
DE
54752014-02-19 Doug Evans <dje@google.com>
5476
5477 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5478 All callers updated.
5479
ecc6f45c
DE
54802014-02-19 Doug Evans <dje@google.com>
5481
5482 * inferiors.c (add_thread): Fix whitespace.
5483
649ebbca
DE
54842014-02-19 Doug Evans <dje@google.com>
5485
5486 * dll.c (clear_dlls): Replace accessing list implemention details
5487 with API function.
5488 * gdbthread.h (get_first_thread): Declare.
5489 * inferiors.c (for_each_inferior_with_data): New function.
5490 (get_first_thread): New function.
5491 (find_thread_ptid): Simplify.
5492 (get_first_inferior): New function.
5493 (clear_list): Delete.
5494 (one_inferior_p): New function.
5495 (clear_inferior_list): New function.
5496 (clear_inferiors): Update.
5497 * inferiors.h (for_each_inferior_with_data): Declare.
5498 (clear_inferior_list): Declare.
5499 (one_inferior_p): Declare.
5500 (get_first_inferior): Declare.
5501 * linux-low.c (linux_wait_for_event): Replace accessing list
5502 implemention details with API function.
5503 * server.c (target_running): Ditto.
5504 (accumulate_file_name_length): New function.
5505 (emit_dll_description): New function.
5506 (handle_qxfer_libraries): Replace accessing list implemention
5507 details with API function.
5508 (handle_qxfer_threads_worker): New function.
5509 (handle_qxfer_threads_proper): Replace accessing list implemention
5510 details with API function.
5511 (handle_query): Ditto.
5512 (visit_actioned_threads_callback_ftype): New typedef.
5513 (visit_actioned_threads_data): New struct.
5514 (visit_actioned_threads): Rewrite to be find_inferior callback.
5515 (resume): Call find_inferior.
5516 (handle_status): Replace accessing list implemention
5517 details with API function.
5518 (process_serial_event): Replace accessing list implemention details
5519 with API function.
5520 * target.c (set_desired_inferior): Replace accessing list implemention
5521 details with API function.
5522 * tracepoint.c (same_process_p): New function.
5523 (gdb_agent_about_to_close): Replace accessing list implemention
5524 details with API function.
5525 * win32-low.c (child_delete_thread): Replace accessing list
5526 implemention details with API function.
5527 (match_dll_by_basename): New function.
5528 (dll_is_loaded_by_basename): New function.
5529 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5530 details call to dll_is_loaded_by_basename.
5531
80894984
DE
55322014-02-19 Doug Evans <dje@google.com>
5533
5534 * dll.h (struct dll_info): Add comment.
5535 * gdbthread.h (struct thread_info): Add comment.
5536 (current_ptid): Simplify.
5537 * inferiors.c (add_process): Update.
5538 (remove_process): Update.
5539 * inferiors.h (struct process_info): Rename member "head" to "entry".
5540 * linux-low.c (delete_lwp): Update.
5541 (add_lwp): Update.
5542 (last_thread_of_process_p): Update.
5543 (kill_one_lwp_callback, linux_kill): Update.
5544 (status_pending_p_callback): Update.
5545 (wait_for_sigstop): Update. Simplify read of ptid.
5546 (start_step_over): Update.
5547 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5548 (get_lwp_thread): Update.
5549 (struct lwp_info): Rename member "head" to "entry".
5550 * regcache.h (inferior_list_entry): Delete.
5551 * server.c (kill_inferior_callback): Update.
5552 (detach_or_kill_inferior_callback): Update.
5553 (print_started_pid): Update.
5554 (print_attached_pid): Update.
5555 (process_serial_event): Simplify read of ptid.
5556 * thread-db.c (thread_db_create_event): Update.
5557 (thread_db_get_tls_address): Update.
5558 * win32-low.c (current_inferior_ptid): Simplify.
5559
46917d26
TT
55602014-02-19 Tom Tromey <tromey@redhat.com>
5561
5562 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5563 argument.
5564 (target_supports_btrace): Update.
5565
0759a81e
YQ
55662014-02-14 Yao Qi <yao@codesourcery.com>
5567
5568 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5569 (rsp-low-ipa.o): New target.
5570
a7191e8b
TT
55712014-02-12 Tom Tromey <tromey@redhat.com>
5572
5573 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5574 convert_ascii_to_int.
5575 * regcache.c (registers_to_string): Likewise.
5576 * remote-utils.c (decode_M_packet): Likewise.
5577 * server.c (process_serial_event): Likewise.
5578
ff0e980e
TT
55792014-02-12 Tom Tromey <tromey@redhat.com>
5580
5581 * server.c (handle_query, handle_v_run): Use hex2bin, not
5582 unhexify.
5583 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5584
e9371aff
TT
55852014-02-12 Tom Tromey <tromey@redhat.com>
5586
5587 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5588 convert_int_to_ascii.
5589 * regcache.c (registers_to_string, collect_register_as_string):
5590 Likewise.
5591 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5592 Likewise.
5593 * server.c (process_serial_event): Likewise.
5594 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5595 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5596
971dc0b8
TT
55972014-02-12 Tom Tromey <tromey@redhat.com>
5598
5599 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5600 bin2hex, not hexify.
5601 * tracepoint.c (cmd_qtstatus): Likewise.
5602
0a822afb
TT
56032014-02-12 Tom Tromey <tromey@redhat.com>
5604
5605 * remote-utils.c (monitor_output): Pass explicit length to
5606 hexify.
5607
9c3d6531
TT
56082014-02-12 Tom Tromey <tromey@redhat.com>
5609
5610 * tracepoint.c: Include rsp-low.h.
5611 * server.c: Include rsp-low.h.
5612 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5613 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5614 declare.
5615 * remote-utils.c: Include rsp-low.h.
5616 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5617 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5618 (convert_int_to_ascii, convert_ascii_to_int): Move to
5619 common/rsp-low.c.
5620 * regcache.c: Include rsp-low.h.
5621 * ax.c: Include rsp-low.h.
5622 * Makefile.in (SFILES): Add common/rsp-low.c.
5623 (OBS): Add rsp-low.o.
5624 (rsp-low.o): New target.
5625
01fd3ea5
TT
56262014-02-12 Tom Tromey <tromey@redhat.com>
5627
5628 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5629 Include print-utils.h.
5630 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5631 (plongest, thirty_two, phex_nz): Remove.
5632 * Makefile.in (SFILES): Add common/print-utils.c.
5633 (OBS): Add print-utils.o.
5634 (print-utils-ipa.o): New target.
5635 (print-utils.o): New target.
5636 (IPA_OBJS): Add print-utils-ipa.o.
5637
e99dc820
TT
56382014-02-06 Tom Tromey <tromey@redhat.com>
5639
5640 * Makefile.in (SFILES): Fix indentation.
5641
ee1e2d4f
DE
56422014-02-05 Doug Evans <dje@google.com>
5643
5644 * linux-low.c (linux_wait_for_event): Improve comment.
5645 (linux_wait_1): Keep current_inferior in sync with event_child.
5646
f5a02773
DE
56472014-01-22 Doug Evans <dje@google.com>
5648
5649 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5650
87ce2a04
DE
56512014-01-22 Doug Evans <dje@google.com>
5652
5653 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5654 * configure: Regenerate.
5655 * config.in: Regenerate.
5656 * Makefile.in (SFILES): Add debug.c.
5657 (OBS): Add debug.o.
5658 * debug.c: New file.
5659 * debug.h: New file.
5660 * linux-aarch64-low.c (*): Update all debugging printfs to use
5661 debug_printf instead of fprintf.
5662 * linux-arm-low.c (*): Ditto.
5663 * linux-cris-low.c (*): Ditto.
5664 * linux-crisv32-low.c (*): Ditto.
5665 * linux-m32r-low.c (*): Ditto.
5666 * linux-sparc-low.c (*): Ditto.
5667 * linux-x86.c (*): Ditto.
5668 * linux-low.c (*): Ditto.
5669 (linux_wait_1): Add calls to debug_enter, debug_exit.
5670 (linux_wait): Remove redundant debugging printf.
5671 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5672 (linux_resume, unstop_all_lwps): Ditto.
5673 * mem-break.c (*): Update all debugging printfs to use
5674 debug_printf instead of fprintf.
5675 * remote-utils.c (*): Ditto.
5676 * thread-db.c (*): Ditto.
5677 * server.c #include <ctype.h>, "gdb_vecs.h".
5678 (debug_threads): Moved to debug.c.
5679 (*): Update all debugging printfs to use debug_printf instead of
5680 fprintf.
5681 (start_inferior): Replace call to fflush with call to debug_flush.
5682 (monitor_show_help): Mention set debug-format.
5683 (parse_debug_format_options): New function.
5684 (handle_monitor_command): Handle "monitor set debug-format".
5685 (gdbserver_usage): Mention --debug-format.
5686 (main): Parse --debug-format.
5687 * server.h (debug_threads): Declaration moved to debug.h.
5688 #include "debug.h".
5689 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5690 trace_debug_1 that uses debug_printf.
5691 (tracepoint_look_up_symbols): Update all debugging printfs to use
5692 debug_printf instead of fprintf.
5693
e671835b
BS
56942014-01-20 Baruch Siach <baruch@tkos.co.il>
5695
5696 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5697 sys/ptrace.h.
5698
b5737fa9
PA
56992014-01-17 Pedro Alves <palves@redhat.com>
5700
ea38d2a9 5701 PR build/16445
c7faa97a
PA
5702 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5703 defined after including gdb_proc_service.h.
b5737fa9 5704
40ed484e
DE
57052014-01-16 Doug Evans <dje@google.com>
5706
5707 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5708 (match_dll): Use it.
5709
969c39fb
MM
57102014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5711
5712 * target.h (target_ops) <read_btrace>: Change parameters and
5713 return type to allow error reporting.
5714 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5715 trace reading errors on.
5716 * linux-low.c (linux_low_read_btrace): Pass trace reading
5717 errors on.
5718 (linux_low_disable_btrace): New.
5719
ab7f45ba
DE
57202014-01-15 Doug Evans <dje@google.com>
5721
5722 * inferiors.c (thread_id_to_gdb_id): Delete.
5723 * inferiors.h (thread_id_to_gdb_id): Delete.
5724
66af0f44
EZ
57252014-01-13 Eli Zaretskii <eliz@gnu.org>
5726
5727 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5728 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5729 versions.
5730
9939e131
PA
57312014-01-08 Pedro Alves <palves@redhat.com>
5732
5733 * server.c (handle_status): Don't discard previous queued stop
5734 replies or thread's pending status here.
5735 (main) <disconnection>: Do it here instead.
5736
b7ea362b
PA
57372014-01-08 Pedro Alves <palves@redhat.com>
5738
5739 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5740 * server.c (visit_actioned_threads, handle_pending_status): New
5741 function.
5742 (handle_v_cont): Factor out parts to ...
5743 (resume): ... this new function. If in all-stop, and a thread
5744 being resumed has a pending status, report it without actually
5745 resuming.
5746 (myresume): Adjust to use the new 'resume' function.
5747 (clear_pending_status_callback, set_pending_status_callback)
5748 (find_status_pending_thread_callback): New functions.
5749 (handle_status): Handle the case of multiple threads having
5750 interesting statuses to report. Report threads' real last signal
5751 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5752 with an interesting thread to report the status for, instead of
5753 always reporting the status of the first thread.
5754
28498c42
JB
57552014-01-01 Joel Brobecker <brobecker@adacore.com>
5756
5757 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5758 * gdbreplay.c (gdbreplay_version): Likewise.
5759
f45c82da
YZ
57602013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5761
5762 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5763 iov.iov_len with the real length in use.
5764
379a5e2d
JB
57652013-12-13 Joel Brobecker <brobecker@adacore.com>
5766
5767 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5768 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5769 for all targets that use win32-low.c.
5770 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5771 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5772
4210d83e
PA
57732013-12-13 Pedro Alves <palves@redhat.com>
5774
5775 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5776 if equal to TARGET_WAITKIND_LOADED.
5777 * win32-low.c (cached_status): New static global.
5778 (win32_wait): Add declaration.
5779 (do_initial_child_stuff): Flush all initial pending debug events
5780 up to the initial breakpoint.
5781 (win32_wait): If CACHED_STATUS was set, return that instead
5782 of doing a real wait. Remove the code resuming the execution
5783 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5784 during the initial phase. Also remove the code changing
5785 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5786 TARGET_WAITKIND_STOPPED.
5787
e7f0d979
YQ
57882013-12-11 Yao Qi <yao@codesourcery.com>
5789
5790 * notif.c (handle_notif_ack): Return 0 if no notification
5791 matches.
5792
ebcf782c
DE
57932013-11-20 Doug Evans <dje@google.com>
5794
5795 * linux-low.c (linux_set_resume_request): Fix comment.
5796
20ad9378
DE
57972013-11-20 Doug Evans <dje@google.com>
5798
5799 * linux-low.c (resume_status_pending_p): Tweak comment.
5800
a196ebeb
WT
58012013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5802
5803 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5804 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5805 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5806 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5807 (srv_amd64_regobj): Add amd64-mpx.o.
5808 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5809 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5810 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5811 * i387-fp.c (num_pl_bnd_register) Added constant.
5812 (num_pl_bnd_cfg_registers) Added constant.
5813 (struct i387_xsave) Added reserved area and MPX fields.
5814 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5815 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5816 function.
5817 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5818 (init_registers_amd64_mpx_linux): Declare new function.
5819 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5820 (x86_64_regmap): Add MPX registers.
5821 (x86_linux_read_description): Add MPX case.
5822 (initialize_low_arch): Initialize MPX targets.
5823
0080a2f6
TT
58242013-11-18 Tom Tromey <tromey@redhat.com>
5825
5826 * configure: Rebuild.
5827 * configure.ac: Don't check for stdlib.h.
5828 * gdbreplay.c: Unconditionally include stdlib.h.
5829
2978b111
TT
58302013-11-18 Tom Tromey <tromey@redhat.com>
5831
5832 * config.in: Rebuild.
5833 * configure: Rebuild.
5834 * configure.ac: Don't use AC_HEADER_DIRENT.
5835
a3d08894
TT
58362013-11-18 Tom Tromey <tromey@redhat.com>
5837
5838 * server.h: Don't check HAVE_STRING_H.
5839 * gdbreplay.c: Don't check HAVE_STRING_H.
5840 * configure: Rebuild.
5841
0a5dd17d
TT
58422013-11-18 Tom Tromey <tromey@redhat.com>
5843
5844 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5845 LIBGNU.
5846
1bd2f0ba
TT
58472013-11-08 Tom Tromey <tromey@redhat.com>
5848
5849 * configure, config.in: Rebuild.
5850 * configure.ac: Remove unused configury.
5851
3266f10b
TT
58522013-11-08 Tom Tromey <tromey@redhat.com>
5853
5854 * acinclude.m4: Include common.m4, codeset.m4.
5855 * configure, config.in: Rebuild.
5856 * configure.ac: Use GDB_AC_COMMON.
5857
6682d959
AA
58582013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5859
5860 * linux-s390-low.c (HWCAP_S390_TE): New define.
5861 (s390_arch_setup): Consider the TE field in the HWCAP for
5862 determining 'have_regset_tdb'.
5863
fd0a4d76
SDJ
58642013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5865
5866 PR gdb/16014
5867 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5868 call to sizeof.
5869
1a3d890b
PA
58702013-10-02 Pedro Alves <palves@redhat.com>
5871
5872 * server.c (process_serial_event): Don't output "GDBserver
5873 exiting" if GDB is connected through stdio.
5874 * target.c (mywait): Likewise, be silent if GDB is connected
5875 through stdio.
5876
97ad4581
JB
58772013-10-01 Joel Brobecker <brobecker@adacore.com>
5878
5879 * lynx-low.c (lynx_add_threads_after_attach): New function.
5880 (lynx_attach): Remove call to add_thread. Add call to
5881 lynx_add_threads_after_attach instead.
5882
5b4e221c
MF
58832013-09-28 Mike Frysinger <vapier@gentoo.org>
5884
5885 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5886 * config.in, configure: Regenerated.
5887
ee47b2f8
YQ
58882013-09-18 Yao Qi <yao@codesourcery.com>
5889
5890 PR server/15959
5891 * server.c (start_inferior): Clear 'resume_info'.
5892
d6707650 58932013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5894
d6707650
JW
5895 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5896 for each register.
5897
9243dd0e 58982013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5899
9243dd0e
JW
5900 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5901 linux-tile-low.o to srv_tgtobj.
5902
c623a6ef
WN
59032013-09-16 Will Newton <will.newton@linaro.org>
5904
5905 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5906 out regs.
5907
fb71d39e
PA
59082013-09-06 Pedro Alves <palves@redhat.com>
5909
5910 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5911 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5912 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5913 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5914 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5915 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5916
8e7e9910
PA
59172013-09-06 Pedro Alves <palves@redhat.com>
5918
5919 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5920 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5921
7c3a12ca
PA
59222013-09-06 Pedro Alves <palves@redhat.com>
5923
5924 * linux-amd64-ipa.c: Include tracepoint.h.
5925 * linux-i386-ipa.c: Include tracepoint.h.
5926
8eb3d7b6
RW
59272013-09-06 Ricard Wanderlof <ricardw@axis.com>
5928
5929 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5930 (ps_get_thread_area): New function.
5931
eddddb9d
RW
59322013-09-06 Ricard Wanderlof <ricardw@axis.com>
5933
5934 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5935 (initialize_low_arch): Call init_registers_crisv32 rather than
5936 init_register_crisv32.
5937
533b0600
PA
59382013-09-05 Pedro Alves <palves@redhat.com>
5939
5940 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5941 to ...
5942 * hostio.h: ... this new file.
5943 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5944 win32-low.c: Include hostio.h.
5945
0ce3d3b5
PA
59462013-09-05 Pedro Alves <palves@redhat.com>
5947
5948 * server.h (gdb_client_data, handler_func, callback_handler_func)
5949 (delete_file_handler, add_file_handler, append_callback_event)
5950 (delete_callback_event, start_event_loop, initialize_event_loop):
5951 Move to event-loop.h and include it.
5952 * event-loop.h: New file.
5953
799cdc37
PA
59542013-09-05 Pedro Alves <palves@redhat.com>
5955
5956 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5957 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5958 (loaded_dll, unloaded_dll): Move to ...
5959 * dll.h: ... this new file.
5960 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5961
6a6bbd9d
PA
59622013-09-05 Pedro Alves <palves@redhat.com>
5963
5964 * server.h (current_process, get_thread_process, all_processes)
5965 (add_inferior_to_list, for_each_inferior, current_inferior)
5966 (remove_inferior, add_process, remove_process, find_process_pid)
5967 (have_started_inferiors_p, have_attached_inferiors_p)
5968 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5969 (clear_inferiors, find_inferior, find_inferior_id)
5970 (inferior_target_data, set_inferior_target_data)
5971 (inferior_regcache_data, set_inferior_regcache_data): Move to
5972 inferiors.h, and include it.
5973 * inferiors.h: New file.
5974
f699aaba
PA
59752013-09-05 Pedro Alves <palves@redhat.com>
5976
5977 * server.h (struct emit_ops, current_insn_ptr, emit_error):
5978 Move ...
72f4393d 5979 * ax.h: ... here.
f699aaba 5980
c144c7a0
PA
59812013-09-05 Pedro Alves <palves@redhat.com>
5982
5983 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5984 tracepoint.h.
5985 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5986 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5987 (handle_tracepoint_general_set, handle_tracepoint_query)
5988 (tracepoint_finished_step, tracepoint_was_hit)
5989 (release_while_stepping_state_list, current_traceframe)
5990 (in_readonly_region, traceframe_read_mem)
5991 (fetch_traceframe_registers, traceframe_read_sdata)
5992 (traceframe_read_info, struct fast_tpoint_collect_status)
5993 (fast_tracepoint_collecting, force_unlock_trace_buffer)
5994 (handle_tracepoit_bkpts, initialize_low_tracepoint)
5995 (supply_fast_tracepoint_registers)
5996 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5997 (ipa_tdesc, claim_trampoline_space)
5998 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5999 (agent_mem_read, agent_get_trace_state_variable_value)
6000 (agent_set_trace_state_variable_value, agent_tsv_read)
6001 (agent_mem_read_string, get_raw_reg_func_addr)
6002 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6003 * tracepoint.h: ... this new file.
6004
ff42e6ab
PA
60052013-09-05 Pedro Alves <palves@redhat.com>
6006
6007 * server.h (perror_with_name, error, fatal, warning, paddress)
6008 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6009 include it.
6010 * utils.h: New file.
6011
541af0f4
PA
60122013-09-05 Pedro Alves <palves@redhat.com>
6013
6014 * server.h (remote_debug, noack_mode, transport_is_reliable)
6015 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6016 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6017 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6018 (write_enn, initialize_async_io, enable_async_io)
6019 (disable_async_io, check_remote_input_interrupt_request)
6020 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6021 (dead_thread_notify, prepare_resume_reply)
6022 (decode_address_to_semicolon, decode_address, decode_m_packet)
6023 (decode_M_packet, decode_X_packet, decode_xfer_write)
6024 (decode_search_memory_packet, unhexify, hexify)
6025 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6026 (look_up_one_symbol, relocate_instruction)
6027 (monitor_output): Move to remote-utils.h, and include it.
6028 * remote-utils.h: New file.
6029
eebdf26b
PA
60302013-09-05 Pedro Alves <palves@redhat.com>
6031
6032 * server.h (_): Delete.
6033
3aafd2ff
PA
60342013-09-02 Pedro Alves <palves@redhat.com>
6035
6036 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6037 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6038 allocated.
6039 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6040
cee83bcb
PM
60412013-09-02 Pierre Muller <muller@sourceware.org>
6042
6043 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6044 or WriteProcessMemory complete successfully and handle
6045 ERROR_PARTIAL_COPY error.
6046
9a13b2fa
PA
60472013-09-02 Pedro Alves <palves@redhat.com>
6048
6049 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6050 error instead of EIO.
6051
602e3198
JK
60522013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6053
6054 PR server/15604
6055 * linux-low.c: Include filestuff.h.
6056 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6057 * lynx-low.c: Include filestuff.h.
6058 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6059 * server.c: Include filestuff.h.
6060 (main): Call notice_open_fds.
6061 * spu-low.c: Include filestuff.h.
6062 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6063
96d7229d
LM
60642013-08-22 Luis Machado <lgustavo@codesourcery.com>
6065
6066 * Makefile.in: Explain why ../target and ../nat are not
6067 listed as include file search paths.
6068 (linux-waitpid.o): New object file rule.
6069 * configure.srv (srv_native_linux_obj): New variable.
6070 Replace all occurrences of linux native object files with
6071 $srv_native_linux_obj.
6072 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6073 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6074 (linux_enable_event_reporting): Remove declaration.
6075 (my_waitpid): Moved to common/linux-waitpid.c.
6076 (linux_wait_for_event): Pass ptid when calling
6077 linux_enable_event_reporting.
6078 (linux_supports_tracefork_flag): Remove.
6079 (linux_enable_event_reporting): Likewise.
6080 (linux_tracefork_grandchild): Remove.
6081 (STACK_SIZE): Moved to common/linux-ptrace.c.
6082 (linux_tracefork_child): Remove.
6083 (linux_test_for_tracefork): Remove.
6084 (linux_look_up_symbols): Call linux_supports_traceclone.
6085 (initialize_low): Remove call to linux_test_for_tracefork.
6086 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6087 common/linux-ptrace.h.
6088 (PTRACE_TYPE_ARG4): Likewise.
6089 Include linux-ptrace.h.
6090
32940073
PA
60912013-08-21 Pedro Alves <palves@redhat.com>
6092
6093 * config.in: Renegerate.
6094
33b60d58 60952013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6096
33b60d58
LM
6097 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6098 (SFILES): Remove $(srcdir)/common/target-common.c and
6099 add $(srcdir)/target/waitstatus.c.
6100 (OBS): Remove target-common.o and add waitstatus.o.
6101 (server_h): Remove $(srcdir)/../common/target-common.h and
6102 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6103 and $(srcdir)/../target/waitstatus.h.
6104 (target-common.o): Remove.
6105 (waitstatus.o): New target object file.
6106 * target.h: Do not include target-common.h and
6107 include target/resume.h, target/wait.h and
6108 target/waitstatus.h.
6109
b8e1b30e
LM
61102013-08-13 Luis Machado <lgustavo@codesourcery.com>
6111
6112 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6113 to PTRACE_TYPE_ARG3.
6114 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6115 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6116 PTRACE_TYPE_ARG4.
6117 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6118 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6119
7a60ad40
YQ
61202013-07-27 Jie Zhang <jie@codesourcery.com>
6121 Daniel Jacobowitz <dan@codesourcery.com>
6122 Yao Qi <yao@codesourcery.com>
6123
6124 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6125 (mips-linux-watch.o): New rule.
6126 (mips_linux_watch_h): New variable.
6127 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6128 srv_tgtobj.
6129 * linux-mips-low.c: Include mips-linux-watch.h.
6130 (struct arch_process_info, struct arch_lwp_info): New.
6131 (update_watch_registers_callback): New function.
6132 (mips_linux_new_process, mips_linux_new_thread) New functions.
6133 (mips_linux_prepare_to_resume, mips_insert_point): New
6134 functions.
6135 (mips_remove_point, mips_stopped_by_watchpoint): New
6136 functions.
6137 (rsp_bp_type_to_target_hw_bp_type): New function.
6138 (mips_stopped_data_address): New function.
6139 (the_low_target): Add watchpoint support functions.
6140
de6f69ad
YQ
61412013-07-27 Yao Qi <yao@codesourcery.com>
6142
6143 * i386-low.c: Include break-common.h.
6144 (enum target_hw_bp_type): Remove.
6145
3360c0bf
LM
61462013-07-24 Luis Machado <lgustavo@codesourcery.com>
6147
6148 * Makefile.in (SFILES): /common/target-common.c.
6149 (OBS): Add target-common.o.
6150 (server_h): Add $(srcdir)/../common/target-common.h.
6151 (target-common.o): New target.
6152 * server.c (queue_stop_reply_callback): Free
6153 status string after use.
6154 * target.c (target_waitstatus_to_string): Remove.
6155 * target.h: Include target-common.h.
6156 (resume_kind): Likewise.
6157 (target_waitkind): Likewise.
6158 (target_waitstatus): Likewise.
6159 (TARGET_WNOHANG): Likewise.
6160
bd885420
YQ
61612013-07-04 Yao Qi <yao@codesourcery.com>
6162
6163 * Makefile.in (host_alias): Use @host_noncanonical@.
6164 (target_alias): Use @target_noncanonical@.
6165 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6166 ACX_NONCANONICAL_HOST.
6167 * configure: Regenerated.
6168
6169 Revert:
6170 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6171
6172 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6173 * configure: Rebuild.
6174 * Makefile.in (version_host, version_target): Get from configure.
6175 (version.c): Use $(version_host) and $(version_target).
6176
17ef446e
PA
61772013-07-03 Pedro Alves <palves@redhat.com>
6178
6179 * Makefile.in (config.status): Depend on development.sh.
6180 * acinclude.m4: Include libmcheck.m4.
6181 * configure: Regenerate.
6182
7a9a7487
MG
61832013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6184
6185 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6186 attribute inside the parentheses.
6187 (winapi_DebugSetProcessKillOnExit): Ditto.
6188 (winapi_DebugBreakProcess): Ditto.
6189 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 6190
49b64de6
MG
61912013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6192
6193 * notif.h (notif_event): Add a dummy member to avoid compiler
6194 errors.
6195
d5749ee7
PA
61962013-07-01 Pedro Alves <palves@redhat.com>
6197
6198 * hostio.c (HOSTIO_PATH_MAX): Define.
6199 (require_filename, handle_open, handle_unlink, handle_readlink):
6200 Use it.
6201
d8d2a3ee
PA
62022013-07-01 Pedro Alves <palves@redhat.com>
6203
6204 * server.h: Include "pathmax.h".
6205 * linux-low.c: Don't include sys/param.h.
6206 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6207 MAXPATHLEN.
6208 * win32-low.c: Don't include sys/param.h.
6209 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6210
bc7dea8d
PA
62112013-07-01 Pedro Alves <palves@redhat.com>
6212
6213 * event-loop.c: Don't check HAVE_UNISTD_H before including
6214 <unistd.h>.
6215 * gdbreplay.c: Likewise.
6216 * remote-utils.c: Likewise.
6217 * server.c: Likewise.
6218 * configure.ac: Don't check for unistd.h.
6219 * configure: Regenerate.
6220
d6c2da54
TT
62212013-06-28 Tom Tromey <tromey@redhat.com>
6222
6223 * Makefile.in (version.c): Use version.in, not
6224 common/version.in.
6225
257b6bec
MG
62262013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6227
6228 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6229 * configure: Rebuild.
6230 * Makefile.in (version_host, version_target): Get from configure.
6231 (version.c): Use $(version_host) and $(version_target).
6232
86ebe149
DK
62332013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6234
6235 Fix trace-status to output user name without trailing colon.
6236 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6237
f30aa5af
DK
62382013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6239
6240 Fix trace-status to output proper start-time and stop-time.
6241 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6242 output start time and stop time in hex as gdb expects.
6243
28a93511
YQ
62442013-06-26 Pedro Alves <pedro@codesourcery.com>
6245
6246 * tracepoint.c (build_traceframe_info_xml): Output trace state
6247 variables present in the trace buffer.
6248
01208463
TT
62492013-06-24 Tom Tromey <tromey@redhat.com>
6250
6251 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6252 create-version.sh.
6253 (version.o): Remove.
6254 * gdbreplay.c: Include version.h.
6255 (version, host_name): Don't declare.
6256 * server.h: Include version.h.
6257 (version, host_name): Don't declare.
6258
760256f9
PA
62592013-06-12 Pedro Alves <palves@redhat.com>
6260
6261 * linux-x86-low.c (linux_is_elf64): Delete global.
6262 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6263 with local linux_pid_exe_is_elf_64_file use.
6264
030031ee
PA
62652013-06-11 Pedro Alves <palves@redhat.com>
6266
6267 * linux-low.c (regset_disabled, disable_regset): New functions.
6268 (regsets_fetch_inferior_registers)
6269 (regsets_store_inferior_registers): Use them.
6270 (initialize_regsets_info); Don't allocate the disabled_regsets
6271 array here.
6272 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6273 comment.
6274
5da6eb0a
PA
62752013-06-11 Pedro Alves <palves@redhat.com>
6276
6277 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6278 xmalloc.
6279
7e5aaa09
PA
62802013-06-11 Pedro Alves <palves@redhat.com>
6281
6282 * linux-x86-low.c (initialize_low_arch): Call
6283 init_registers_x32_avx_linux.
6284
d878444c
JK
62852013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6286
6287 Fix compatibility with Android Bionic.
6288 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6289 it is not empty.
6290
3aee8918
PA
62912013-06-07 Pedro Alves <palves@redhat.com>
6292
5f2b57b5 6293 PR server/14823
3aee8918
PA
6294 * Makefile.in (OBS): Add tdesc.o.
6295 (IPA_OBJS): Add tdesc-ipa.o.
6296 (tdesc-ipa.o): New rule.
6297 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6298 interface.
6299 * linux-low.c (new_inferior): Delete.
6300 (disabled_regsets, num_regsets): Delete.
6301 (linux_add_process): Adjust to set the new per-process
6302 new_inferior flag.
6303 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6304 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6305 was a stop. When calling arch_setup, switch the current inferior
6306 to the thread that got an event.
6307 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6308 (regsets_fetch_inferior_registers)
6309 (regsets_store_inferior_registers): New regsets_info parameter.
6310 Adjust to use it.
6311 (linux_register_in_regsets): New regs_info parameter. Adjust to
6312 use it.
6313 (register_addr, fetch_register, store_register): New usrregs_info
6314 parameter. Adjust to use it.
6315 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6316 parameter regs_info. Adjust to use it.
6317 (linux_fetch_registers): Get the current inferior's regs_info, and
6318 adjust to use it.
6319 (linux_store_registers): Ditto.
6320 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6321 (initialize_low): Don't initialize the target_regsets here. Call
6322 initialize_low_arch.
6323 * linux-low.h (target_regsets): Delete declaration.
6324 (struct regsets_info): New.
6325 (struct usrregs_info): New.
6326 (struct regs_info): New.
6327 (struct process_info_private) <new_inferior>: New field.
6328 (struct linux_target_ops): Delete the num_regs, regmap, and
6329 regset_bitmap fields. New field regs_info.
6330 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6331 * i387-fp.c (num_xmm_registers): Delete.
6332 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6333 calls to new interface.
6334 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6335 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6336 Infer the number of xmm registers from the regcache's target
6337 description.
6338 * i387-fp.h (num_xmm_registers): Delete.
6339 * inferiors.c (add_thread): Don't install the thread's regcache
6340 here.
6341 * proc-service.c (gregset_info): Fetch the current inferior's
6342 regs_info. Adjust to use it.
6343 * regcache.c: Include tdesc.h.
6344 (register_bytes, reg_defs, num_registers)
6345 (gdbserver_expedite_regs): Delete.
6346 (get_thread_regcache): If the thread doesn't have a regcache yet,
6347 create one, instead of aborting gdbserver.
6348 (regcache_invalidate_one): Rename to ...
6349 (regcache_invalidate_thread): ... this.
6350 (regcache_invalidate_one): New.
6351 (regcache_invalidate): Only invalidate registers of the current
6352 process.
6353 (init_register_cache): Add target_desc parameter, and use it.
6354 (new_register_cache): Ditto. Assert the target description has a
6355 non zero registers_size.
6356 (regcache_cpy): Add assertions. Adjust.
6357 (realloc_register_cache, set_register_cache): Delete.
6358 (registers_to_string, registers_from_string): Adjust.
6359 (find_register_by_name, find_regno, find_register_by_number)
6360 (register_cache_size): Add target_desc parameter, and use it.
6361 (free_register_cache_thread, free_register_cache_thread_one)
6362 (regcache_release, register_cache_size): New.
6363 (register_size): Add target_desc parameter, and use it.
6364 (register_data, supply_register, supply_register_zeroed)
6365 (supply_regblock, supply_register_by_name, collect_register)
6366 (collect_register_as_string, collect_register_by_name): Adjust.
6367 * regcache.h (struct target_desc): Forward declare.
6368 (struct regcache) <tdesc>: New field.
6369 (init_register_cache, new_register_cache): Add target_desc
6370 parameter.
6371 (regcache_invalidate_thread): Declare.
6372 (regcache_invalidate_one): Delete declaration.
6373 (regcache_release): Declare.
6374 (find_register_by_number, register_cache_size, register_size)
6375 (find_regno): Add target_desc parameter.
6376 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6377 declarations.
6378 * remote-utils.c: Include tdesc.h.
6379 (outreg, prepare_resume_reply): Adjust.
6380 * server.c: Include tdesc.h.
6381 (gdbserver_xmltarget): Delete declaration.
6382 (get_features_xml, process_serial_event): Adjust.
6383 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6384 declare.
6385 (struct process_info) <tdesc>: New field.
6386 (ipa_tdesc): Declare.
6387 * tdesc.c: New file.
6388 * tdesc.h: New file.
6389 * tracepoint.c: Include tdesc.h.
6390 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6391 (get_context_regcache): Adjust to pass ipa_tdesc down.
6392 (do_action_at_tracepoint): Adjust to get the register cache size
6393 from the context regcache's description.
6394 (traceframe_walk_blocks): Adjust to get the register cache size
6395 from the current trace frame's description.
6396 (traceframe_get_pc): Adjust to get current trace frame's
6397 description and pass it down.
6398 (gdb_collect): Adjust to get the register cache size from the
6399 IPA's description.
6400 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6401 (gdbserver_xmltarget): Delete.
6402 (initialize_low_tracepoint): Set the ipa's target description.
6403 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6404 (initialize_low_tracepoint): Set the ipa's target description.
6405 * linux-x86-low.c: Include tdesc.h.
6406 [__x86_64__] (is_64bit_tdesc): New.
6407 (ps_get_thread_area, x86_get_thread_area): Use it.
6408 (i386_cannot_store_register): Rename to ...
6409 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6410 (i386_cannot_fetch_register): Rename to ...
6411 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6412 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6413 to new interface.
6414 (target_regsets): Rename to ...
6415 (x86_regsets): ... this.
6416 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6417 interface.
6418 (x86_siginfo_fixup): Use is_64bit_tdesc.
6419 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6420 (tdesc_x32_avx_linux, tdesc_x32_linux)
6421 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6422 Declare.
6423 (x86_linux_update_xmltarget): Delete.
6424 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6425 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6426 (AMD64_LINUX_USER64_CS): New.
6427 (x86_linux_read_description): New, based on
6428 x86_linux_update_xmltarget.
6429 (same_process_callback): New.
6430 (x86_arch_setup_process_callback): New.
6431 (x86_linux_update_xmltarget): New.
6432 (x86_regsets_info): New.
6433 (amd64_linux_regs_info): New.
6434 (i386_linux_usrregs_info): New.
6435 (i386_linux_regs_info): New.
6436 (x86_linux_regs_info): New.
6437 (x86_arch_setup): Reimplement.
6438 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6439 (x86_emit_ops): Ditto.
6440 (the_low_target): Adjust. Install x86_linux_regs_info,
6441 x86_cannot_fetch_register, and x86_cannot_store_register.
6442 (initialize_low_arch): New.
6443 * linux-ia64-low.c (tdesc_ia64): Declare.
6444 (ia64_fetch_register): Adjust.
6445 (ia64_usrregs_info, regs_info): New globals.
6446 (ia64_regs_info): New function.
6447 (the_low_target): Adjust.
6448 (initialize_low_arch): New function.
6449 * linux-sparc-low.c (tdesc_sparc64): Declare.
6450 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6451 Adjust.
6452 (sparc_arch_setup): New function.
6453 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6454 (the_low_target): Adjust.
6455 (initialize_low_arch): New function.
6456 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6457 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6458 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6459 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6460 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6461 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6462 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6463 (tdesc_powerpc_isa205_vsx64l): Declare.
6464 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6465 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6466 (ppc_set_pc, ppc_get_hwcap): Adjust.
6467 (ppc_usrregs_info): Forward declare.
6468 (!__powerpc64__) ppc_regmap_adjusted: New global.
6469 (ppc_arch_setup): Adjust to the current process'es target
6470 description.
6471 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6472 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6473 (ppc_store_evrregset): Adjust.
6474 (target_regsets): Rename to ...
6475 (ppc_regsets): ... this, and make static.
6476 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6477 (ppc_regs_info): New function.
6478 (the_low_target): Adjust.
6479 (initialize_low_arch): New function.
6480 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6481 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6482 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6483 (tdesc_s390x_linux64v2): Declare.
6484 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6485 (s390_fill_gregset, s390_store_last_break): Adjust.
6486 (target_regsets): Rename to ...
6487 (s390_regsets): ... this, and make static.
6488 (s390_get_pc, s390_set_pc): Adjust.
6489 (s390_get_hwcap): New target_desc parameter, and use it.
6490 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6491 (s390_arch_setup): Adjust to set the current process'es target
6492 description. Don't adjust the regmap.
6493 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6494 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6495 (regs_info_3264): New globals.
6496 (s390_regs_info): New function.
6497 (the_low_target): Adjust.
6498 (initialize_low_arch): New function.
6499 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6500 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6501 [__mips64] (init_registers_mips_linux)
6502 (init_registers_mips_dsp_linux): Delete defines.
6503 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6504 (have_dsp): New global.
6505 (mips_read_description): New, based on mips_arch_setup.
6506 (mips_arch_setup): Reimplement.
6507 (get_usrregs_info): New function.
6508 (mips_cannot_fetch_register, mips_cannot_store_register)
6509 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6510 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6511 (target_regsets): Rename to ...
6512 (mips_regsets): ... this, and make static.
6513 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6514 (dsp_regs_info, regs_info): New globals.
6515 (mips_regs_info): New function.
6516 (the_low_target): Adjust.
6517 (initialize_low_arch): New function.
6518 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6519 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6520 Declare.
6521 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6522 (arm_read_description): New, with bits factored from
6523 arm_arch_setup.
6524 (arm_arch_setup): Reimplement.
6525 (target_regsets): Rename to ...
6526 (arm_regsets): ... this, and make static.
6527 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6528 (arm_regs_info): New function.
6529 (the_low_target): Adjust.
6530 (initialize_low_arch): New function.
6531 * linux-m68k-low.c (tdesc_m68k): Declare.
6532 (target_regsets): Rename to ...
6533 (m68k_regsets): ... this, and make static.
6534 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6535 (m68k_regs_info): New function.
6536 (m68k_arch_setup): New function.
6537 (the_low_target): Adjust.
6538 (initialize_low_arch): New function.
6539 * linux-sh-low.c (tdesc_sharch): Declare.
6540 (target_regsets): Rename to ...
6541 (sh_regsets): ... this, and make static.
6542 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6543 (sh_regs_info, sh_arch_setup): New functions.
6544 (the_low_target): Adjust.
6545 (initialize_low_arch): New function.
6546 * linux-bfin-low.c (tdesc_bfin): Declare.
6547 (bfin_arch_setup): New function.
6548 (bfin_usrregs_info, regs_info): New globals.
6549 (bfin_regs_info): New function.
6550 (the_low_target): Adjust.
6551 (initialize_low_arch): New function.
6552 * linux-cris-low.c (tdesc_cris): Declare.
6553 (cris_arch_setup): New function.
6554 (cris_usrregs_info, regs_info): New globals.
6555 (cris_regs_info): New function.
6556 (the_low_target): Adjust.
6557 (initialize_low_arch): New function.
6558 * linux-cris-low.c (tdesc_crisv32): Declare.
6559 (cris_arch_setup): New function.
6560 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6561 (cris_regs_info): New function.
6562 (the_low_target): Adjust.
6563 (initialize_low_arch): New function.
6564 * linux-m32r-low.c (tdesc_m32r): Declare.
6565 (m32r_arch_setup): New function.
6566 (m32r_usrregs_info, regs_info): New globals.
6567 (m32r_regs_info): Adjust.
6568 (initialize_low_arch): New function.
6569 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6570 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6571 (tic6x_usrregs_info): Forward declare.
6572 (tic6x_read_description): New function, based on ...
6573 (tic6x_arch_setup): ... this. Reimplement.
6574 (target_regsets): Rename to ...
6575 (tic6x_regsets): ... this, and make static.
6576 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6577 (tic6x_regs_info): New function.
6578 (the_low_target): Adjust.
6579 (initialize_low_arch): New function.
6580 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6581 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6582 (target_regsets): Rename to ...
6583 (xtensa_regsets): ... this, and make static.
6584 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6585 globals.
6586 (xtensa_arch_setup, xtensa_regs_info): New functions.
6587 (the_low_target): Adjust.
6588 (initialize_low_arch): New function.
6589 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6590 (nios2_arch_setup): Set the current process'es tdesc.
6591 (target_regsets): Rename to ...
6592 (nios2_regsets): ... this.
6593 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6594 (nios2_regs_info): New function.
6595 (the_low_target): Adjust.
6596 (initialize_low_arch): New function.
a261b8f5
PA
6597 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6598 (aarch64_arch_setup): Set the current process'es tdesc.
6599 (target_regsets): Rename to ...
6600 (aarch64_regsets): ... this.
6601 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6602 (aarch64_regs_info): New function.
6603 (the_low_target): Adjust.
6604 (initialize_low_arch): New function.
3aee8918
PA
6605 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6606 globals.
6607 (target_regsets): Rename to ...
6608 (tile_regsets): ... this.
6609 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6610 (tile_regs_info): New function.
6611 (tile_arch_setup): Set the current process'es tdesc.
6612 (the_low_target): Adjust.
6613 (initialize_low_arch): New function.
6614 * spu-low.c (tdesc_spu): Declare.
6615 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6616 * win32-arm-low.c (tdesc_arm): Declare.
6617 (arm_arch_setup): New function.
6618 (the_low_target): Install arm_arch_setup instead of
6619 init_registers_arm.
6620 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6621 (init_windows_x86): Rename to ...
6622 (i386_arch_setup): ... this. Set `win32_tdesc'.
6623 (the_low_target): Adjust.
6624 * win32-low.c (win32_tdesc): New global.
6625 (child_add_thread): Don't create the thread cache here.
6626 (do_initial_child_stuff): Set the new process'es tdesc.
6627 * win32-low.h (struct target_desc): Forward declare.
6628 (win32_tdesc): Declare.
6629 * lynx-i386-low.c (tdesc_i386): Declare global.
6630 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6631 * lynx-low.c (lynx_tdesc): New global.
6632 (lynx_add_process): Set the new process'es tdesc.
6633 * lynx-low.h (struct target_desc): Forward declare.
6634 (lynx_tdesc): Declare global.
6635 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6636 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6637 * nto-low.c (nto_tdesc): New global.
6638 (do_attach): Set the new process'es tdesc.
6639 * nto-low.h (struct target_desc): Forward declare.
6640 (nto_tdesc): Declare.
6641 * nto-x86-low.c (tdesc_i386): Declare.
6642 (nto_x86_arch_setup): Set `nto_tdesc'.
6643
b1fbec62
GB
66442013-06-04 Gary Benson <gbenson@redhat.com>
6645
6646 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6647 to qSupported response when appropriate.
6648 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6649 with nonzero-length annex.
6650 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6651 arguments supplied in annex.
6652
d1ec4ce7
DE
66532013-05-31 Doug Evans <dje@google.com>
6654
ac44adcb 6655 PR server/15594
d1ec4ce7
DE
6656 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6657 64 bits in 64-cross-32 environment.
6658
9b25f2d3
PA
66592013-05-28 Pedro Alves <palves@redhat.com>
6660
6661 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6662 (aarch64-without-fpu.c): Delete rule.
6663 * configure.srv (aarch64*-*-linux*): Remove references to
6664 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6665 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6666 declaration.
6667
6740dc9c
PA
66682013-05-24 Pedro Alves <palves@redhat.com>
6669
6670 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6671 instead of strchr/decode_address. Error if the range isn't split
6672 with a ','. Don't assume there's be a ':' in the action.
6673
c2d6af84
PA
66742013-05-23 Yao Qi <yao@codesourcery.com>
6675 Pedro Alves <palves@redhat.com>
6676
6677 * linux-low.c (lwp_in_step_range): New function.
6678 (linux_wait_1): If the thread was range stepping and stopped
6679 outside the stepping range, report the stop to GDB. Otherwise,
6680 continue stepping. Add range stepping debug output.
6681 (linux_set_resume_request): Copy the step range from the resume
6682 request to the lwp.
6683 (linux_supports_range_stepping): New.
6684 (linux_target_ops) <supports_range_stepping>: Set to
6685 linux_supports_range_stepping.
6686 * linux-low.h (struct linux_target_ops)
6687 <supports_range_stepping>: New field.
6688 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6689 * linux-x86-low.c (x86_supports_range_stepping): New.
6690 (the_low_target) <supports_range_stepping>: Set to
6691 x86_supports_range_stepping.
6692 * server.c (handle_v_cont): Handle 'r' action.
6693 (handle_v_requests): Append ";r" if the target supports range
6694 stepping.
6695 * target.h (struct thread_resume) <step_range_start,
6696 step_range_end>: New fields.
6697 (struct target_ops) <supports_range_stepping>:
6698 New field.
6699 (target_supports_range_stepping): New macro.
6700
58794e1a
JB
67012013-05-17 Joel Brobecker <brobecker@adacore.com>
6702
6703 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6704 confusion in comment.
6705
d631c5a7
JB
67062013-05-17 Joel Brobecker <brobecker@adacore.com>
6707
6708 * lynx-low.c (struct process_info_private): New type.
6709 (lynx_add_process): New function.
6710 (lynx_create_inferior, lynx_attach): Replace calls to
6711 add_process by calls to lynx_add_process.
6712 (lynx_resume): If PTID is null, then try using
6713 current_process()->private->last_wait_event_ptid.
6714 Add comments.
6715 (lynx_clear_inferiors): Delete. The contents of that function
6716 has been inlined in lynx_mourn;
6717 (lynx_wait_1): Save the ptid in the process's private data.
6718 (lynx_mourn): Free the process' private data. Replace call
6719 to lynx_clear_inferiors by call to clear_inferiors.
6720
96f7a20f
YQ
67212013-05-17 Yao Qi <yao@codesourcery.com>
6722
6723 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6724 the right place.
6725
db0dfaa0
LM
67262013-05-16 Luis Machado <lgustavo@codesourcery.com>
6727
6728 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6729 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6730 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6731 PT_TEXT_END_ADDR guards. Update comments.
6732 (linux_target_op) <read_offsets>: Conditionally define to
6733 linux_read_offsets if the target is UCLIBC and if it defines
6734 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6735
68f5f838
SL
67362013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6737 Andrew Jenner <andrew@codesourcery.com>
6738
6739 * Makefile.in (SFILES): Add linux-nios2-low.c.
6740 (clean): Add action to delete nios2-linux.c.
6741 (nios2-linux.c): New rule.
6742 * configure.srv: Add nios2*-*-linux*.
6743 * linux-nios2-low.c: New.
6744
1ebff1fd
HAQ
67452013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6746
6747 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6748
f6150862
HZ
67492013-04-25 Hui Zhu <hui@codesourcery.com>
6750
6751 PR gdb/15186
f6150862
HZ
6752 * ax.c (ax_printf): Add fflush.
6753
614c279d
TT
67542013-04-22 Tom Tromey <tromey@redhat.com>
6755
6756 * Makefile.in (SFILES): Add filestuff.c.
6757 (OBS): Add filestuff.o.
6758 (filestuff.o): New target.
6759 * config.in, configure: Rebuild.
6760 * configure.ac: Check for fdwalk, pipe2.
6761
7d4e5717
PA
67622013-04-17 Pedro Alves <palves@redhat.com>
6763
6764 * configure.ac (USE_THREAD_DB): Delete variable.
6765 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6766 Don't AC_SUBST USE_THREAD_DB.
6767 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6768 * config.in, configure: Regenerate.
6769
d5c93e41
PA
67702013-04-16 Pedro Alves <palves@redhat.com>
6771
6772 * linux-low.h (struct lwp_info) <thread_known>: Move under
6773 the USE_THREAD_DB #ifdef.
6774
04f5fe89
PA
67752013-04-16 Pedro Alves <palves@redhat.com>
6776
6777 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6778 (linux-low.o): Delete rule.
6779 * linux-low.h: Always include "gdb_thread_db.h" instead of
6780 conditionally including thread_db.h.
6781 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6782 HAVE_THREAD_DB_H.
6783
480b27bf
JK
67842013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6785
6786 * Makefile.in (install-only): Fix make install regression.
6787
43662968
JK
67882013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6789
6790 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6791 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6792 installation.
6793 * gdbserver.1: Remove.
6794
3e74e146
PA
67952013-03-22 Pedro Alves <palves@redhat.com>
6796
6797 * linux-low.c (handle_extended_wait): Don't call
6798 linux_enable_event_reporting.
6799
a8347a2a
TT
68002013-03-15 Tony Theodore <tonyt@logyst.com>
6801
6802 PR build/9098:
6803 * Makefile.in (SHELL): Use @SHELL@.
6804
eeb56fa7
SDJ
68052013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6806
6807 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6808 compiler warning.
6809
4fa7e2ff
JB
68102013-03-13 Joel Brobecker <brobecker@adacore.com>
6811
6812 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6813 Remove extraneous NULL element.
6814
8ddb1965
YQ
68152013-03-13 Yao Qi <yao@codesourcery.com>
6816
6817 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6818 'V' block in trace frame.
6819
9accd112
MM
68202013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6821
6822 * target.h (struct target_ops): Add btrace ops.
6823 (target_supports_btrace): New macro.
6824 (target_enable_btrace): New macro.
6825 (target_disable_btrace): New macro.
6826 (target_read_btrace): New macro.
6827 * gdbthread.h (struct thread_info): Add btrace field.
6828 * server.c: Include btrace-common.h.
6829 (handle_btrace_general_set): New function.
6830 (handle_btrace_enable): New function.
6831 (handle_btrace_disable): New function.
6832 (handle_general_set): Call handle_btrace_general_set.
6833 (handle_qxfer_btrace): New function.
6834 (struct qxfer qxfer_packets[]): Add btrace entry.
6835 * inferiors.c (remove_thread): Disable btrace.
6836 * linux-low: Include linux-btrace.h.
6837 (linux_low_enable_btrace): New function.
6838 (linux_low_read_btrace): New function.
6839 (linux_target_ops): Add btrace ops.
6840 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6841 Add srv_linux_btrace=yes.
6842 (x86_64-*-linux*): Add linux-btrace.o.
6843 Add srv_linux_btrace=yes.
6844 * configure.ac: Define HAVE_LINUX_BTRACE.
6845 * config.in: Regenerated.
6846 * configure: Regenerated.
6847
5cc22e4c
MM
68482013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6849
6850 * server.c (handle_qxfer): Preserve error message if -3 is
6851 returned.
6852 (qxfer): Document the -3 return value.
6853
7c97f91e
MM
68542013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6855
6856 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6857 (linux_btrace_h): New variable.
6858 (linux-btrace.o): New rule.
6859
be9a119c 68602013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
6861 Hafiz Abid Qadeer <abidh@codesourcery.com>
6862
6863 * tracepoint.c (trace_buffer_size): New global.
6864 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6865 (init_trace_buffer): Change to one-argument function. Allocate
6866 trace buffer memory.
6867 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6868 handle QTBuffer:size packet.
6869 (cmd_bigqtbuffer_size): New function.
6870 (initialize_tracepoint): Call init_trace_buffer with
6871 DEFAULT_TRACE_BUFFER_SIZE.
6872 * server.c (handle_query): Add QTBuffer:size in the
6873 supported packets.
6874
e64f7499
YQ
68752013-03-07 Yao Qi <yao@codesourcery.com>
6876
6877 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6878 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6879 of -1.
6880 (cmd_qtsp): Adjust condition. Do post increment.
6881 Set cur_action and cur_step_action back to 0.
6882
f0ae6fc3
PA
68832013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6884
6885 PR server/15236
6886 * linux-low.c (linux_write_memory): Return early success if LEN is
6887 zero.
6888
b5b0b0af
CV
68892013-03-05 Corinna Vinschen <vinschen@redhat.de>
6890
334ad4a8 6891 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 6892
589bc927
TT
68932013-02-28 Tom Tromey <tromey@redhat.com>
6894
6895 * configure.ac: Invoke AC_SYS_LARGEFILE.
6896 * configure, config.in: Rebuild.
6897
dfe07582
CV
68982013-02-28 Corinna Vinschen <vinschen@redhat.com>
6899
6900 * win32-low.c: Throughout, fix format strings and casts of
6901 printf-like functions to avoid type related warnings on all
6902 platforms.
6903 (get_child_debug_event): Print dwDebugEventCode as hex since
6904 that's how it's usually documented.
6905
736cd585
YQ
69062013-02-28 Yao Qi <yao@codesourcery.com>
6907
6908 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6909 pulongest.
6910
e1f58301
JW
69112013-02-27 Jiong Wang <jiwang@tilera.com>
6912
6913 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6914 (reg-tilegx32.c): New rule.
6915 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6916 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6917 different register info initializer according to elf class.
6918 (init_registers_tilgx32): New function. The tilegx32 register info
6919 initializer.
6920 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6921 (tile_store_gregset): Likewise.
6922
d171ca78
YQ
69232013-02-27 Yao Qi <yao@codesourcery.com>
6924
6925 * server.c (process_point_options): Print debug message when
6926 debug_threads is true.
6927
282bbdf3
YQ
69282013-02-26 Yao Qi <yao@codesourcery.com>
6929
6930 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6931
aca22551
PA
69322013-02-19 Pedro Alves <palves@redhat.com>
6933 Kai Tietz <ktietz@redhat.com>
6934
6935 PR gdb/15161
6936
6937 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6938 instead of strtoul to extract address from packet.
6939 (process_serial_event) <'z'>: Likewise.
6940
4f3cee1c
YQ
69412013-02-18 Yao Qi <yao@codesourcery.com>
6942
6943 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6944
8e1d55a3
PA
69452013-02-14 Pedro Alves <palves@redhat.com>
6946
6947 Plug memory leak.
6948
6949 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6950 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6951
458820da
PA
69522013-02-14 Pedro Alves <palves@redhat.com>
6953
6954 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6955
baea0dae
PA
69562013-02-14 Pedro Alves <palves@redhat.com>
6957
6958 * tracepoint.c (save_string): Delete.
6959 (add_tracepoint_action): Use savestring instead of save_string.
6960
0b1afbb3
PA
69612013-02-12 Pedro Alves <palves@redhat.com>
6962
6963 * linux-xtensa-low.c: Ditto.
6964 * xtensa-xtregs.c: Ditto.
6965
8a4ac37e
PA
69662013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6967
6968 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6969 thread_db.
6970
148de6bb
MS
69712013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6972
6973 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6974 aarch64_num_wp_regs and aarch64_num_bp_regs to
6975 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6976
55fac6e0
MS
69772013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6978
6979 * linux-aarch64-low.c (ps_get_thread_area): Replace
6980 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6981
176eb98c
MS
69822013-02-04 Jim MacArthur <jim.macarthur@arm.com>
6983 Marcus Shawcroft <marcus.shawcroft@arm.com>
6984 Nigel Stephens <nigel.stephens@arm.com>
6985 Yufeng Zhang <yufeng.zhang@arm.com>
6986
6987 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6988 (aarch64.c, aarch64-without-fpu.c): New targets.
6989 * configure.srv (aarch64*-*-linux*): New.
6990 * linux-aarch64-low.c: New file.
6991
56f7af9c
MS
69922013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
6993
43aaf8b6 6994 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
6995 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6996 (dequeue_one_deferred_signal, linux_resume_one_thread)
6997 (fetch_register, linux_write_memory, linux_enable_event_reporting)
6998 (linux_tracefork_grandchild, linux_test_for_tracefork)
6999 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7000 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7001 where the argument is 0.
7002
60f662b0
YQ
70032013-01-25 Yao Qi <yao@codesourcery.com>
7004
7005 * event-loop.c: Include "queue.h".
7006 (gdb_event_p): New typedef.
7007 (struct gdb_event) <next_event>: Remove.
7008 (event_queue): Change to QUEUE(gdb_event_p).
7009 (async_queue_event): Remove.
7010 (gdb_event_xfree): New.
7011 (initialize_event_loop): New.
7012 (process_event): Use API from QUEUE.
7013 (wait_for_event): Likewise.
7014 * server.c (main): Call initialize_event_loop.
7015 * server.h (initialize_event_loop): Declare.
7016
5ae4861a
YQ
70172013-01-18 Yao Qi <yao@codesourcery.com>
7018
7019 * ax.h (struct eval_agent_expr_context): New.
7020 (gdb_eval_agent_expr): Update declaration.
7021 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7022 TFRAME. Add new argument CTX.
7023 * server.h (struct eval_agent_expr_context): Declare.
7024 (agent_mem_read, agent_tsv_read): Update declaration.
7025 (agent_mem_read_string): Likewise.
7026 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7027 (add_traceframe_block): Add new argument TPOINT.
7028 Increase TPOINT->traceframe_usage.
7029 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7030 eval_tracepoint_agent_expr.
7031 (condition_true_at_tracepoint): Likewise.
7032 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7033 (agent_mem_read_string, agent_tsv_read): Likewise.
7034
85e00e85
YQ
70352013-01-16 Yao Qi <yao@codesourcery.com>
7036
7037 * linux-low.c (linux_resume_one_lwp): Don't check
7038 'lwp->bp_reinsert != 0'.
7039
4039cf45
JB
70402013-01-07 Joel Brobecker <brobecker@adacore.com>
7041 Pedro Alves <palves@redhat.com>
7042
7043 * lynx-low.c (ptrace_request_to_str): Define a temporary
7044 macro and use it to simplify this function's implementation.
7045
9044dee2
JB
70462013-01-07 Joel Brobecker <brobecker@adacore.com>
7047
7048 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7049 sets errno.
7050
e6352c8f
JB
70512013-01-07 Joel Brobecker <brobecker@adacore.com>
7052
7053 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7054
50681a27
JB
70552013-01-07 Joel Brobecker <brobecker@adacore.com>
7056
7057 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7058
3f6e77ef
JB
70592013-01-07 Joel Brobecker <brobecker@adacore.com>
7060
7061 * lynx-low.c (lynx_resume): Use the resume_info parameter
7062 to determine the ptid for the lynx_ptrace call, unless
7063 it is equal to minus_one_ptid, in which case we use the
7064 ptid of the current_inferior.
7065 (lynx_wait_1): After having received a thread create/exit
7066 event, resume the inferior's execution using the signaling
7067 thread's ptid, rather than the old ptid.
7068
7fda33ae
JB
70692013-01-07 Joel Brobecker <brobecker@adacore.com>
7070
7071 * lynx-low.c (lynx_resume): Delete variable ret.
7072
b9786c74
JB
70732013-01-01 Joel Brobecker <brobecker@adacore.com>
7074
7075 * gdbreplay.c (gdbreplay_version): Update copyright year.
7076 * server.c (gdbserver_version): Likewise.
7077
8b93d60f
JB
70782012-12-17 Joel Brobecker <brobecker@adacore.com>
7079
7080 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7081 new thread.
7082
037335a7
JB
70832012-12-17 Joel Brobecker <brobecker@adacore.com>
7084
7085 * lynx-low.c (ptrace_request_to_str): Add handling for
7086 PTRACE_GETTRACESIG.
7087
52d4cbd8
JB
70882012-12-17 Joel Brobecker <brobecker@adacore.com>
7089
7090 * lynx-low.c (lynx_attach): Delete variable new_process.
7091
ab8f6ca9
JB
70922012-12-17 Joel Brobecker <brobecker@adacore.com>
7093
7094 * lynx-low.c (lynx_create_inferior): Delete variable
7095 new_process.
7096
78cbc024
JB
70972012-12-17 Joel Brobecker <brobecker@adacore.com>
7098
7099 * lynx-low.c (ptrace_request_to_str): Do not handle
7100 PTRACE_GETTHREADLIST if this macro does not exist.
7101
14a00470
YQ
71022012-12-15 Yao Qi <yao@codesourcery.com>
7103
7104 * Makefile.in (OBS): Add notif.o.
7105 * notif.c, notif.h: New.
7106 * server.c: Include "notif.h".
7107 (struct vstop_notif) <next>: Remove.
7108 <base>: New field.
7109 (queue_stop_reply): Update.
7110 (push_event, send_next_stop_reply): Remove.
7111 (discard_queued_stop_replies): Update.
7112 (notif_stop): New variable.
7113 (handle_v_stopped): Remove.
7114 (handle_v_requests): Don't call handle_v_stopped. Call
7115 handle_ack_notif instead.
7116 (queue_stop_reply_callback): Call notif_event_enque instead
7117 of queue_stop_reply.
7118 (handle_status): Don't call send_next_stop_reply, call
7119 notif_write_event instead.
7120 (kill_inferior_callback): Likewise.
7121 (detach_or_kill_inferior_callback): Likewise.
7122 (main): Call initialize_notif.
7123 (process_serial_event): Call QUEUE_is_empty.
7124 (handle_target_event): Call notif_push instead of push event.
7125 * server.h (push_event): Remove declaration.
7126
61c125b9
TT
71272012-12-10 Tom Tromey <tromey@redhat.com>
7128
7129 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7130 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7131 macros.
7132 (.c.o): Rewrite.
7133 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7134 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7135 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7136 (amd64-linux-ipa.o, ax.o): Rewrite.
7137 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7138 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7139 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7140 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7141 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7142 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7143 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7144 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7145 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7146 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7147 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7148 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7149 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7150 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7151 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7152 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7153 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7154 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7155 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7156 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7157 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7158 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7159 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7160 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7161 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7162 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7163 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7164 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7165 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7166 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7167 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7168 (reg-tilegx.o): Remove.
7169 (all_object_files): New macro.
7170 Include .deps files.
7171 * aclocal.m4, configure: Rebuild.
7172 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7173 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7174 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7175
e90e9ad9
TT
71762012-12-05 Tom Tromey <tromey@redhat.com>
7177
7178 PR gdb/14917:
7179 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7180
02d403bf 71812012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
7182
7183 * configure.ac: Check for linux/perf_event.h.
7184 * config.in: Regenerated.
7185 * configure: Regenerated.
7186
0270a750
PA
71872012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7188
7189 * hostio.c (handle_readlink): Decrease buffer size
7190 parameter passed to readlink by one byte.
7191
8c29b58e
YQ
71922012-11-26 Yao Qi <yao@codesourcery.com>
7193
7194 * configure.ac (build_warnings): Append '-Wempty-body'.
7195 * configure: Regenerated.
7196 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7197 body.
7198
8bdce1ff
PM
71992012-11-15 Pierre Muller <muller@sourceware.org>
7200
7201 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7202 * config.in: Regenerate.
7203 * configure: Regenerate.
7204 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7205 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7206 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7207 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7208 header.
7209 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7210 instead of <sys/wait.h> header.
7211 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7212
02d403bf 72132012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
7214
7215 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7216 (various make rules): Remove -DGDBSERVER
7217
fbd5db48
YQ
72182012-11-09 Yao Qi <yao@codesourcery.com>
7219
7220 * spu-low.c (current_ptid): Move it to ..
7221 * gdbthread.h: ... here. New.
7222 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7223 * server.c (myresume, process_serial_event): Likewise.
7224 * thread-db.c (thread_db_find_new_threads): Likewise.
7225 * tracepoint.c (run_inferior_command): Likewise.
7226
b3dc46ff
AB
72272012-10-01 Andrew Burgess <aburgess@broadcom.com>
7228
7229 * server.c (handle_search_memory_1): Include access length in
7230 warning message.
7231
07c04788
HPN
72322012-09-05 Michael Brandt <michael.brandt@axis.com>
7233
7234 * linux-crisv32-low.c: Fix compile errors.
7235
918d227b
YQ
72362012-09-04 Yao Qi <yao@codesourcery.com>
7237
7238 * tracepoint.c (cmd_qtsv): Adjust debug message.
7239 Don't check CUR_TPOINT.
7240
18c1b81a
YQ
72412012-08-28 Yao Qi <yao@codesourcery.com>
7242
7243 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7244 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7245 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7246 Remove declarations of xmalloc, xreallloc, xstrdup and
7247 freeargv.
7248 * Makefile.in (libiberty_h): New.
7249 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7250 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7251
dc82f37b
YQ
72522012-08-23 Yao Qi <yao@codesourcery.com>
7253
7254 * server.h: Remove declaration of 'xsnprintf'.
7255
406b1477
KS
72562012-08-22 Keith Seitz <keiths@redhat.com>
7257
7258 * server.h: Include build-gnulib-gbserver/config.h.
7259 * gdbreplay.c: Likewise.
7260
e6712ff1
DE
72612012-08-08 Doug Evans <dje@google.com>
7262
7263 * Makefile.in (SFILES): Add gdb_vecs.c.
7264 (OBS): Add gdb_vecs.o.
7265 (gdb_vecs_h, host_defs_h): New variables.
7266 (thread-db.o): Add $(gdb_vecs_h) dependency.
7267 (gdb_vecs.o): New rule.
7268 * thread-db.c: #include "gdb_vecs.h".
7269 (thread_db_load_search): Use a vector to iterate over path elements.
7270 Handle text appearing after "$pdir".
7271
7272 * configure.ac: Add check for strstr.
7273 * config.in: Regenerate.
7274 * configure: Regenerate.
7275
7c3270ae
UW
72762012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7277
7278 * hostio.c (handle_pread): If pread fails, fall back to attempting
7279 lseek/read.
7280 (handle_pwrite): Likewise for pwrite.
7281
b62e2b27
UW
72822012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7283
7284 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7285 between unsupported TYPE and unimplementable ADDR/LEN combination.
7286 (arm_insert_point): Act on new return value.
7287
78a99e91
PA
72882012-07-31 Pedro Alves <palves@redhat.com>
7289
7290 * server.c (process_point_options): Only skip tokens if we find
7291 one that is unrecognized. Don't treat 'X' specially while
7292 skipping unrecognized tokens.
7293
fcf303ab
UW
72942012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7295
7296 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7297 to 4-byte-align HW breakpoint addresses for Thumb.
7298
7255706c
YQ
72992012-07-27 Yao Qi <yao@codesourcery.com>
7300
7301 PR remote/14161.
7302
7303 * server.h: Declare gdb_agent_about_to_close.
7304 * target.c (kill_inferior): Include "agent.h".
7305 New. Send command 'kill'.
7306 * target.h (kill_inferior): Removed macro.
7307 * tracepoint.c (gdb_agent_about_to_close): New.
7308 (gdb_agent_helper_thread): Handle command 'close'.
7309 Wait endlessly until the inferior stops.
7310 Install gdb_agent_remove_socket to atexit hook.
7311 (agent_socket_name): New static variable.
7312 (gdb_agent_socket_init): Replace local variable 'name' with
7313 'agent_socket_name'.
7314 (gdb_agent_remove_socket): New.
7315
5a3f286f
YQ
73162012-07-27 Yao Qi <yao@codesourcery.com>
7317
7318 * server.c (process_point_options): Stop at 'X' when parsing.
7319
961bd387
ME
73202012-07-19 Michael Eager <eager@eagercon.com>
7321
a261b8f5 7322 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
7323 to hw_execute.
7324 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7325 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7326 hardware breakpoint.
7327
aa7c7447
JK
73282012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7329
7330 * gdbserver/linux-low.c (initialize_low): Call
7331 linux_ptrace_init_warnings.
7332
7f216e7c
DE
73332012-07-02 Doug Evans <dje@google.com>
7334
7335 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7336 pointer to int.
7337
d3ce09f5
SS
73382012-07-02 Stan Shebs <stan@codesourcery.com>
7339
7340 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7341 (ax.o): Add it to build rule.
7342 (ax-ipa.o): Ditto.
7343 (OBS): Add format.o.
7344 (IPA_OBS): Add format.o.
7345 * server.c (handle_query): Claim support for breakpoint commands.
7346 (process_point_options): Add command case.
7347 (process_serial_event): Leave running if there are printfs in
7348 effect.
7349 * mem-break.h (any_persistent_commands): Declare.
7350 (add_breakpoint_commands): Declare.
7351 (gdb_no_commands_at_breakpoint): Declare.
7352 (run_breakpoint_commands): Declare.
7353 * mem-break.c (struct point_command_list): New struct.
7354 (struct breakpoint): New field command_list.
7355 (any_persistent_commands): New function.
7356 (add_commands_to_breakpoint): New function.
7357 (add_breakpoint_commands): New function.
7358 (gdb_no_commands_at_breakpoint): New function.
7359 (run_breakpoint_commands): New function.
7360 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7361 locally.
7362 * ax.c: Include format.h.
7363 (ax_printf): New function.
7364 (gdb_eval_agent_expr): Add printf opcode.
7365
2f8f6aed
YQ
73662012-06-13 Yao Qi <yao@codesourcery.com>
7367
7368 * server.c (start_inferior): Remove duplicated writes to fields
7369 'last_resume_kind' and 'last_status' of 'current_inferior'.
7370
0c9070b3
YQ
73712012-06-12 Yao Qi <yao@codesourcery.com>
7372 Pedro Alves <palves@redhat.com>
7373
7374 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7375 comment.
7376 * server.c (handle_v_cont): Extend comment.
7377
c52daf70
YQ
73782012-06-11 Yao Qi <yao@codesourcery.com>
7379
7380 * linux-low.c (linux_attach): Add 'static'.
7381
d38bbb0a
YQ
73822012-06-06 Yao Qi <yao@codesourcery.com>
7383
7384 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7385
89dc0afd
JK
73862012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7387
7388 Fix gcc -flto compilation warning.
7389 * server.c (main): Make variable multi_mode and attach volatile.
7390
75f62ce7
TJB
73912012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7392
7393 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7394 if the platform doesn't know about it.
7395
65f479b6
PA
73962012-05-30 Jeff Kenton <jkenton@tilera.com>
7397
7398 * Makefile.in (SFILES): Add linux-tile-low.c.
7399 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7400 * configure.srv: Handle tilegx-*-linux*.
7401 * linux-tile-low.c: New file.
7402
0c5bf5a9
JK
74032012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7404
7405 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7406
a493e3e2
PA
74072012-05-24 Pedro Alves <palves@redhat.com>
7408
7409 PR gdb/7205
7410
43aaf8b6 7411 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 7412
2ea28649
PA
74132012-05-24 Pedro Alves <palves@redhat.com>
7414
7415 PR gdb/7205
7416
7417 Replace target_signal with gdb_signal throughout.
7418
8d409d16
MR
74192012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7420
7421 * linux-low.c (linux_store_registers): Avoid the copying sequence
7422 when no data has been retrieved by ptrace.
7423
23512c01
MGD
74242012-05-22 Will Deacon <will.deacon@arm.com>
7425
7426 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7427 Include asm/ptrace.h.
7428 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7429 already defined.
7430
4934b29e
MR
74312012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7432
7433 * linux-low.c (linux_store_registers): Don't re-retrieve data
7434 with ptrace that has already been obtained from /proc. Always
7435 copy any data retrieved with ptrace to the buffer supplied.
7436
bde24c0a
PA
74372012-05-11 Yao Qi <yao@codesourcery.com>
7438 Pedro Alves <palves@redhat.com>
7439
7440 * linux-low.c (enum stopping_threads_kind): New.
7441 (stopping_threads): Change type to `enum stopping_threads_kind'.
7442 (handle_extended_wait): If stopping and suspending threads, leave
7443 the new_lwp suspended too.
7444 (linux_wait_for_event): Adjust.
7445 (stop_all_lwps): Set `stopping_threads' to
7446 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7447 whether we're suspending threads or just stopping them. Assert no
7448 recursion happens.
7449
623b6bdf
YQ
74502012-04-29 Yao Qi <yao@codesourcery.com>
7451
7452 * server.h: Move some code to ...
7453 * gdbthread.h: ... here. New.
7454 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7455 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7456 (nto-low.o, win32-low.o): Likewise.
7457 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7458 * regcache.c, remote-utils.c, server.c: Likewise.
7459 * target.c, tracepoint.c, win32-low.c: Likewise.
7460
f15f9948
TJB
74612012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7462
7463 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7464 (PTRACE_ARG4_TYPE): Likewise.
7465 (PTRACE_XFER_TYPE): Likewise.
7466 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7467 ptrace to PTRACE_ARG3_TYPE.
7468 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7469 (PTRACE_ARG4_TYPE): Likewise.
7470 (PTRACE_XFER_TYPE): Likewise.
7471 (linux_detach_one_lwp): Cast fourth argument of
7472 ptrace to long then PTRACE_ARG4_TYPE.
7473 (regsets_fetch_inferior_registers): Cast third argument of
7474 ptrace to long then PTRACE_ARG3_TYPE.
7475 (regsets_store_inferior_registers): Likewise.
7476
38ea300a
PA
74772012-04-20 Pedro Alves <palves@redhat.com>
7478
7479 * configure: Regenerate.
7480
c971b7fa
PA
74812012-04-19 Pedro Alves <palves@redhat.com>
7482
43aaf8b6 7483 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 7484 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
7485 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7486 (all, install-only, uninstall, clean-info, all-lib, clean): No
7487 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7488 (maintainer-clean realclean distclean): Use subdir_do.
7489 (subdir_do): New.
7490 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 7491 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
7492 * acinclude.m4: Include acx_configure_dir.m4.
7493 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7494 calls. Call AC_PROG_RANLIB. Configure gnulib using
7495 ACX_CONFIGURE_DIR.
7496 (GNULIB): New.
7497 (GNULIB_STDINT_H): Adjust.
7498 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7499 * gdbreplay.c: Include build-gnulib/config.h.
7500 * server.h: Likewise.
7501 * aclocal.m4: Regenerate.
7502 * config.in: Regenerate.
7503 * configure: Regenerate.
c971b7fa 7504
809277f8
PA
75052012-04-19 Pedro Alves <palves@redhat.com>
7506
7507 * Makefile.in (LIBGNU, INCGNU): Adjust.
7508 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7509 (all, install-only, uninstall, clean-info, all-lib, clean)
7510 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7511 * configure.ac: Adjust AC_OUTPUT output.
7512 * aclocal.m4: Regenerate.
7513 * configure: Regenerate.
7514
fd9bb8b8
PA
75152012-04-19 Pedro Alves <palves@redhat.com>
7516
7517 * Makefile.in (generated_files): New.
7518 (server_h): Remove the explicit dependency on config.h, and depend
7519 on $generated_files.
7520
1c298c66
PA
75212012-04-19 Pedro Alves <palves@redhat.com>
7522
7523 * Makefile.in (INCGNU): Add -Ignulib.
7524
57c4b50b
PA
75252012-04-19 Pedro Alves <palves@redhat.com>
7526
7527 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7528 (INCGNU): ... this, and spell out -I here.
7529 (GNULIB_LIB): Rename to ...
7530 (LIBGNU): ... this.
7531 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7532
1030e047
PA
75332012-04-19 Pedro Alves <palves@redhat.com>
7534
7535 * config.in: Regenerate.
7536
447d4319
PA
75372012-04-19 Pedro Alves <palves@redhat.com>
7538
7539 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7540 * server.h (memmem): Remove declaration.
7541 * config.in: Regenerate.
7542 * configure: Regenerate.
7543
aad9eab9
YQ
75442012-04-19 Yao Qi <yao@codesourcery.com>
7545
7546 * Makefile.in (SFILES): Add common/vec.c.
7547 (OBS): Add vec.o.
7548 (vec.o): New rule.
7549
3e10640f
YQ
75502012-04-19 Yao Qi <yao@codesourcery.com>
7551
7552 * remote-utils.c (prepare_resume_reply): Replace with macro
7553 target_core_of_thread.
7554 * server.c (handle_qxfer_threads_proper): Likewise.
7555 * target.h (traget_core_of_thread): New macro.
7556
71622373
PA
75572012-04-18 Pedro Alves <palves@redhat.com>
7558
7559 * aclocal.m4: Regenerate.
7560 * configure: Regenerate.
7561
80d26939
YQ
75622012-04-16 Yao Qi <yao@codesourcery.com>
7563
7564 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7565 duplicated on address.
7566
42476b70
YQ
75672012-04-16 Yao Qi <yao@codesourcery.com>
7568
7569 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7570 (struct tracepoint_action_ops) <send>: New field.
7571 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7572 (agent_expr_send, x_tracepoint_action_send): New.
7573 (l_tracepoint_action_send): New.
7574 (cmd_qtdp): Download and install tracepoint
7575 according to `use_agent'.
7576 (run_inferior_command): Add one more parameter `len'.
7577 Update callers.
7578 (tracepoint_send_agent): New.
7579 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7580
7bc83639
YQ
75812012-04-16 Yao Qi <yao@codesourcery.com>
7582
7583 * tracepoint.c (download_tracepoints): Moved to ...
7584 (cmd_qtstart): ... here.
7585
5f18041e
YQ
75862012-04-14 Yao Qi <yao@codesourcery.com>
7587
7588 * tracepoint.c: Include inttypes.h.
7589 (struct collect_memory_action): Use sized types.
7590 (struct tracepoint): Likewise.
7591 (cmd_qtdp, stop_tracing): Update print specifiers.
7592 (cmd_qtp, response_tracepoint): Likewise.
7593 (collect_data_at_tracepoint): Likewise.
7594 (collect_data_at_step): Likewise.
7595
55a8c076
YQ
75962012-04-14 Yao Qi <yao@codesourcery.com>
7597
7598 Import gnulib module inttypes.
7599 * aclocal.m4, config.in, configure: Regenerated.
7600
dc750257
YQ
76012012-04-14 Yao Qi <yao@codesourcery.com>
7602
7603 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7604 Makefile and config.status at last.
7605
0ab5faf9
YQ
76062012-04-13 Yao Qi <yao@codesourcery.com>
7607
7608 * tracepoint.c: Include stdint.h unconditionally.
7609
18f5fd81
TJB
76102012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7611
7612 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7613 on BFD_HAVE_SYS_PROCFS_TYPE.
7614 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7615 * configure: Regenerate.
7616 * config.in: Likewise.
7617
4d47af5c
L
76182012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7619
7620 * Makefile.in (clean): Also remove x32.c x32-linux.c
7621 x32-avx.c x32-avx-linux.c.
7622 (x32.o): New target.
7623 (x32.c): Likewise.
7624 (x32-linux.o): Likewise.
7625 (x32-linux.c): Likewise.
7626 (x32-avx.o): Likewise.
7627 (x32-avx.c): Likewise.
7628 (x32-avx-linux.o): Likewise.
7629 (x32-avx-linux.c): Likewise.
7630
7631 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7632 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7633 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7634 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7635 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7636 i386/x32-avx-linux.xml.
7637
7638 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7639 (init_registers_x32_avx_linux): Likwise.
7640 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7641 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7642
ecedbe58
PA
76432012-04-13 Pedro Alves <palves@redhat.com>
7644
7645 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7646 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7647 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7648 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7649 the sub-make.
7650
c92b5177
L
76512012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7652
7653 * linux-x86-low.c (compat_x32_clock_t): New.
7654 (compat_x32_siginfo_t): Likewise.
7655 (compat_x32_siginfo_from_siginfo): Likewise.
7656 (siginfo_from_compat_x32_siginfo): Likewise.
7657 (linux_is_elf64): Likewise.
7658 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7659 and siginfo_from_compat_x32_siginfo for x32.
7660 (x86_arch_setup): Set linux_is_elf64.
7661
214d508e
L
76622012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7663
7664 PR gdb/13969
7665 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7666 e_machine field.
7667 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7668 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7669 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7670 compatible with process.
7671
c9a1864a
YQ
76722012-04-12 Yao Qi <yao@codesourcery.com>
7673
7674 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7675 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7676 (install-only, install-info, clean): Handle sub dir gnulib.
7677 (all-lib, am--refresh): New targets.
7678 (memmem.o): Remove target.
7679 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7680 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7681 (AC_REPLACE_FUNCS): Remove memmem.
7682 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7683 (AC_OUTPUT): Generate Makefile in gnulib/.
7684 * aclocal.m4, config.in, configure: Regenerated.
7685
367ba2c2
MR
76862012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7687
7688 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7689
9d236627
PA
76902012-04-05 Pedro Alves <palves@redhat.com>
7691
7692 -Werror=strict-aliasing
7693
7694 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7695 pointer.
7696
111217b3
PA
76972012-04-04 Pedro Alves <palves@redhat.com>
7698
7699 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7700 (sparc_store_gregset_from_stack, sparc_store_gregset)
7701 (sparc_breakpoint_at): Fix formatting.
7702
8365dcf5
TJB
77032012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7704
7705 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7706 are available.
7707 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7708 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7709 * config.in: Regenerate.
7710 * configure: Likewise.
7711
689cc2ae
PA
77122012-03-29 Pedro Alves <palves@redhat.com>
7713
7714 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7715 Correct ptrace arguments.
7716
c14dfd32
PA
77172012-03-28 Pedro Alves <palves@redhat.com>
7718
7719 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7720 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7721 (IA64_FR1_REGNUM): New defines.
7722 (ia64_fetch_register): New.
7723 (the_low_target): Install it.
7724 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7725 field.
7726 * linux-low.c (linux_fetch_registers): Try the
7727 the_low_target.fetch_register hook first.
7728
7729 * linux-arm-low.c (the_low_target): Adjust.
7730 * linux-bfin-low.c (the_low_target): Adjust.
7731 * linux-cris-low.c (the_low_target): Adjust.
7732 * linux-crisv32-low.c (the_low_target): Adjust.
7733 * linux-m32r-low.c (the_low_target): Adjust.
7734 * linux-m68k-low.c (the_low_target): Adjust.
7735 * linux-mips-low.c (the_low_target): Adjust.
7736 * linux-ppc-low.c (the_low_target): Adjust.
7737 * linux-s390-low.c (the_low_target): Adjust.
7738 * linux-sh-low.c (the_low_target): Adjust.
7739 * linux-sparc-low.c (the_low_target): Adjust.
7740 * linux-tic6x-low.c (the_low_target): Adjust.
7741 * linux-x86-low.c (the_low_target): Adjust.
7742 * linux-xtensa-low.c (the_low_target): Adjust.
7743
63c88e13
PA
77442012-03-26 Pedro Alves <palves@redhat.com>
7745
7746 * server.c (handle_qxfer_libraries): Don't bail early if
7747 the_target->qxfer_libraries_svr4 is not NULL.
7748
fb723180
PA
77492012-03-26 Pedro Alves <palves@redhat.com>
7750
7751 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7752
0afae3cf
PA
77532012-03-23 Pedro Alves <palves@redhat.com>
7754
7755 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7756 "library-list-svr4" element's start tag when the the DSO list is
7757 empty.
7758
485f1ee4
PA
77592012-03-23 Pedro Alves <palves@redhat.com>
7760
7761 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7762 a variable whose type size is the same as the inferior's pointer
7763 size.
7764
a5362b9a
TS
77652012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7766
7767 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7768 struct siginfo.
7769 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7770 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7771 * linux-low.h: Include <signal.h>.
7772 (struct siginfo): Remove forward declaration.
7773 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7774 struct siginfo.
7775
d226c142
MF
77762012-03-21 Mike Frysinger <vapier@gentoo.org>
7777
7778 * .gitignore: Ignore more files.
7779
122f36ef
PA
77802012-03-19 Pedro Alves <palves@redhat.com>
7781 Jan Kratochvil <jan.kratochvil@redhat.com>
7782
7783 * server.c (cont_thread, general_thread): Add describing comments.
7784 (start_inferior): Clear `cont_thread'.
7785 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7786 of a process.
7787
fc3e5175
YQ
77882012-03-15 Yao Qi <yao@codesourcery.com>
7789
7790 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7791 handling to ...
7792 (cmd_qtdp): ... here.
7793
8d0d92cd
YQ
77942012-03-15 Yao Qi <yao@codesourcery.com>
7795
7796 * tracepoint.c (struct tracepoint_action_ops): New.
7797 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7798 (m_tracepoint_action_download): New.
7799 (r_tracepoint_action_download): New.
7800 (x_tracepoint_action_download): New.
7801 (l_tracepoint_action_download): New.
7802 (add_tracepoint_action): Install `action->ops' according type.
7803 (download_tracepoint_1): Move code `download' function pointer
7804 of various tracepoint_action_ops.
7805
87b0bb13
JK
78062012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7807
7808 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7809 linux_ptrace_attach_warnings.
7810
5f572dec
JK
78112012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7812
7813 * Makefile.in (linux-ptrace.o): New.
7814 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7815 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7816 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7817 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7818 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7819 of these targets.
7820 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7821
f4647387
YQ
78222012-03-08 Yao Qi <yao@codesourcery.com>
7823 Pedro Alves <palves@redhat.com>
7824
7825 Fix PR server/13392.
7826 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7827 offset of JMP insn.
7828 * tracepoint.c (remove_tracepoint): New.
7829 (cmd_qtdp): Call remove_tracepoint when failed to install.
7830
9b224c5e
PA
78312012-03-07 Pedro Alves <palves@redhat.com>
7832
7833 * linux-low.c (get_detach_signal): New.
7834 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7835 Pass on pending signals to PTRACE_DETACH. Check the result of the
7836 ptrace call.
7837 * server.c (program_signals, program_signals_p): New.
7838 (handle_general_set): Handle QProgramSignals.
7839 * server.h (program_signals, program_signals_p): Declare.
7840
e237a7e2
JK
78412012-03-05 Pedro Alves <palves@redhat.com>
7842 Jan Kratochvil <jan.kratochvil@redhat.com>
7843
7844 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7845 New comment why.
7846
5808517f
YQ
78472012-03-03 Yao Qi <yao@codesourcery.com>
7848
7849 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7850 agent_look_up_symbols.
7851
58b4daa5
YQ
78522012-03-03 Yao Qi <yao@codesourcery.com>
7853
7854 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7855 (linux-x86-low.o): Likewise.
7856 * server.h: Remove in_process_agent_loaded.
7857 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7858 common/agent.c.
7859 Update callers.
7860
8ffcbaaf
YQ
78612012-03-03 Yao Qi <yao@codesourcery.com>
7862
7863 * tracepoint.c (gdb_agent_capability): New global.
7864 (in_process_agent_loaded_ust): Renamed to
7865 `in_process_agent_supports_ust'.
7866 Update callers.
7867 (in_process_agent_supports_ust): Call agent_capability_check.
7868 (clear_installed_tracepoints): Assert that agent supports
7869 agent.
7870
d1feda86
YQ
78712012-03-03 Yao Qi <yao@codesourcery.com>
7872
7873 * linux-low.c (linux_supports_agent): New.
7874 (linux_target_ops): Initialize field `supports_agent' with
7875 linux_supports_agent.
7876 * target.h (struct target_ops) <supports_agent>: New.
7877 (target_supports_agent): New macro.
7878 * server.c (handle_general_set): Handle packet 'QAgent'.
7879 (handle_query): Send `QAgent+'.
7880 * Makefile.in (server.o): Depends on agent.h.
7881
2fa291ac
YQ
78822012-03-03 Yao Qi <yao@codesourcery.com>
7883
7884 * Makefile.in (OBS): Add agent.o.
7885 Add new rule for agent.o.
7886 Track dependence of tracepoint.c on agent.h.
7887 * tracepoint.c (run_inferior_command_1):
7888 (run_inferior_command): Call agent_run_command.
7889 (gdb_ust_connect_sync_socket): Deleted. Move it to
7890 common/agent.c.
7891 (resume_thread, stop_thread): Likewise.
7892 (gdb_ust_socket_init): Renamed to ...
7893 (gdb_agent_socket_init): ... New.
7894 (gdb_ust_thread): Renamed to ...
7895 (gdb_agent_helper_thread): ... New.
7896 (gdb_ust_init): Move some code to ...
7897 (gdb_agent_init): ... here. New.
7898 [HAVE_UST]: Call gdb_ust_init.
7899 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7900 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7901 * config.in, configure: Regenerated.
7902
05044653
PA
79032012-03-02 Pedro Alves <palves@redhat.com>
7904
7905 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7906 * linux-low.c (struct simple_pid_list): New.
7907 (stopped_pids): New a struct simple_pid_list pointer.
7908 (add_to_pid_list, pull_pid_from_list): New.
7909 (handle_extended_wait): Don't assume the first signal new children
7910 report is SIGSTOP. Adjust call to pull_pid_from_list.
7911 (linux_wait_for_lwp): Adjust.
7912
8d00225b
YQ
79132012-03-02 Yao Qi <yao@codesourcery.com>
7914
7915 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7916 debug log.
7917
19560ba5
YQ
79182012-03-02 Yao Qi <yao@codesourcery.com>
7919
7920 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7921 `stop_pc' and `tpoint'. Update caller.
7922
1faeff08
MR
79232012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7924
7925 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7926 * linux-low.c (use_linux_regsets): New macro.
7927 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7928 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7929 (linux_register_in_regsets): New function.
7930 (usr_fetch_inferior_registers): Skip registers covered by
7931 regsets.
7932 (usr_store_inferior_registers): Likewise.
7933 (usr_fetch_inferior_registers): New macro.
7934 (usr_store_inferior_registers): Likewise.
7935 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7936 (linux_store_registers): Likewise.
7937 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7938 prototype.
7939 (init_registers_mips64_dsp_linux): Likewise.
7940 (init_registers_mips_linux): New macro.
7941 (init_registers_mips_dsp_linux): Likewise.
7942 (mips_dsp_num_regs): Likewise.
7943 (DSP_BASE, DSP_CONTROL): New fallback macros.
7944 (mips_base_regs): New macro.
7945 (mips_regmap): Use it. Fix the size.
7946 (mips_dsp_regmap): New variable.
7947 (mips_dsp_regset_bitmap): Likewise.
7948 (mips_arch_setup): New function.
7949 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7950 than mips_regmap.
7951 (mips_cannot_store_register): Likewise.
7952 (the_low_target): Update .arch_setup, .num_regs and .regmap
7953 initializers. Add .regset_bitmap initializer.
7954 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7955 initializer.
7956 * linux-bfin-low.c (the_low_target): Likewise.
7957 * linux-cris-low.c (the_low_target): Likewise.
7958 * linux-crisv32-low.c (the_low_target): Likewise.
7959 * linux-ia64-low.c (the_low_target): Likewise.
7960 * linux-m32r-low.c (the_low_target): Likewise.
7961 * linux-m68k-low.c (the_low_target): Likewise.
7962 * linux-ppc-low.c (the_low_target): Likewise.
7963 * linux-s390-low.c (the_low_target): Likewise.
7964 * linux-sh-low.c (the_low_target): Likewise.
7965 * linux-sparc-low.c (the_low_target): Likewise.
7966 * linux-tic6x-low.c (the_low_target): Likewise.
7967 * linux-x86-low.c (the_low_target): Likewise.
7968 * linux-xtensa-low.c (the_low_target): Likewise.
7969 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7970 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7971 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7972 srv_xmlfiles.
7973 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7974 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7975
c03e6ccc
YQ
79762012-02-29 Yao Qi <yao@codesourcery.com>
7977 Pedro Alves <palves@redhat.com>
7978
7979 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7980 `step_over_finished' is true.
7981
644cebc9
PA
79822012-02-27 Pedro Alves <palves@redhat.com>
7983
7984 * linux-low.c (pid_is_stopped): Delete, moved to common/.
7985 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7986
c14d7ab2
PA
79872012-02-27 Pedro Alves <palves@redhat.com>
7988
7989 PR server/9684
7990 * linux-low.c (pid_is_stopped): New.
7991 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7992
412c89dd
LM
79932012-02-25 Luis Machado <lgustavo@codesourcery.com>
7994
7995 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7996 of conditions.
7997
b745defe
MR
79982012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
7999
8000 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8001
9f3a5c85
LM
80022012-02-24 Luis Machado <lgustavo@codesourcery>
8003
8004 * server.c (handle_query): Advertise support for target-side
8005 breakpoint condition evaluation.
8006 (process_point_options): New function.
8007 (process_serial_event): When inserting a breakpoint, check for
8008 a target-side condition that should be evaluated.
8009
8010 * mem-break.c: Include regcache.h and ax.h.
8011 (point_cond_list_t): New data structure.
8012 (breakpoint) <cond_list>: New field.
8013 (find_gdb_breakpoint_at): Make non-static.
8014 (delete_gdb_breakpoint_at): Clear any target-side
8015 conditions.
8016 (clear_gdb_breakpoint_conditions): New function.
8017 (add_condition_to_breakpoint): Likewise.
8018 (add_breakpoint_condition): Likewise.
8019 (gdb_condition_true_at_breakpoint): Likewise.
8020 (gdb_breakpoint_here): Return result directly instead
8021 of going through a local variable.
8022
8023 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8024 (clear_gdb_breakpoint_conditions): Likewise.
8025 (add_breakpoint_condition): Likewise.
8026 (gdb_condition_true_at_breakpoint): Likewise.
8027
8028 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8029 (need_step_over_p): Take target-side breakpoint condition into
8030 consideration.
8031
5e1dc496
LM
80322012-02-24 Luis Machado <lgustavo@codesourcery>
8033
8034 * server.h: Include tracepoint.h.
8035 (agent_mem_read, agent_get_trace_state_variable_value,
8036 agent_set_trace_state_variable_value,
8037 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8038 get_set_tsv_func_addr): New prototypes.
8039
8040 * ax.h: New include file.
8041 * ax.c: New source file.
8042
8043 * tracepoint.c: Include ax.h.
8044 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8045 agent_expr, eval_result_type): Move to ax.h.
8046 (parse_agent_expr): Rename to ...
8047 (gdb_parse_agent_expr): ... this, make it non-static and move
8048 to ax.h.
8049 (unparse_agent_expr) Rename to ...
8050 (gdb_unparse_agent_expr): ... this, make it non-static and move
8051 to ax.h.
8052 (eval_agent_expr): Rename to ...
8053 (eval_tracepoint_agent_expr): ... this.
8054 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8055 forward declarations.
8056 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8057 (agent_get_trace_state_variable_value): New function.
8058 (agent_set_trace_state_variable_value): New function.
8059 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8060 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8061 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8062 (condition_true_at_tracepoint): Likewise.
8063 (parse_agent_expr): Rename to ...
8064 (gdb_parse_agent_expr): ... this and move to ax.c.
8065 (unparse_agent_expr): Rename to ...
8066 (gdb_unparse_agent_expr): ... this and move to ax.c.
8067 (gdb_agent_op_name): Move to ax.c.
8068 (eval_agent_expr): Rename to ...
8069 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8070 and move to ax.c.
8071 (eval_tracepoint_agent_expr): New function.
8072 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8073 non-static.
5e1dc496
LM
8074 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8075 ax.c.
8076 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8077 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8078 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8079 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8080 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8081 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8082 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8083 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8084 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8085 (compile_bytecodes): Remove forward declaration.
8086 (is_goto_target): Move to ax.c.
8087 (compile_bytecodes): Move to ax.c and call
8088 agent_get_trace_state_variable_value (...) and
8089 agent_set_trace_state_variable_value (...).
8090
8091 * Makefile.in: Update ax.c and IPA dependencies.
8092
277e4e52
PA
80932012-02-24 Pedro Alves <palves@redhat.com>
8094
8095 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8096 (cmd_bigqtbuffer_circular): ... this. Only handle
8097 'QTBuffer:circular:'.
8098 (handle_tracepoint_general_set): Adjust.
8099
bf4c19f7
YQ
81002012-02-16 Yao Qi <yao@codesourcery.com>
8101
8102 * inferiors.c: Move code to ...
8103 * dll.c: .... here. New.
8104 * server.h: Declare clear_dlls.
8105 * Makefile.in (SFILES): Add dll.c.
8106 (OBS): Add dll.o
8107 (dll.o): New rule.
8108
d73f2619
YQ
81092012-02-11 Yao Qi <yao@codesourcery.com>
8110
8111 * server.c: (handle_monitor_command): Add a new parameter
8112 `own_buf'.
8113 (handle_query): Update caller.
8114
f8255c2a
JB
81152012-02-09 Joel Brobecker <brobecker@adacore.com>
8116
8117 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8118 * configure, config.in: Regenerate.
8119 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8120 is not defined.
8121
da84f473
PA
81222012-02-02 Pedro Alves <palves@redhat.com>
8123
8124 Try SIGKILL first, then PTRACE_KILL.
8125 * linux-low.c (linux_kill_one_lwp): New.
8126 (linux_kill_one_lwp): Rename to ...
8127 (kill_one_lwp_callback): ... this. Use the new
8128 linux_kill_one_lwp.
8129
e886a173
PA
81302012-02-02 Pedro Alves <palves@redhat.com>
8131
8132 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8133 inferior.
8134
be07f1a2
PA
81352012-01-27 Pedro Alves <palves@redhat.com>
8136
8137 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8138 (elf_64_file_p): Make static.
8139 (linux_pid_exe_is_elf_64_file): New.
8140 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8141 Delete declarations.
8142 (linux_pid_exe_is_elf_64_file): Declare.
8143 * linux-x86-low.c (x86_arch_setup): Use
8144 linux_pid_exe_is_elf_64_file.
8145
d8301ad1
JK
81462012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8147
8148 * linux-low.c (linux_wait_for_event_1): Rename to ...
8149 (linux_wait_for_event): ... here and merge it with former
8150 linux_wait_for_event - new variable wait_ptid, use it.
8151 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8152
01b17894
PA
81532012-01-23 Pedro Alves <palves@redhat.com>
8154
8155 * server.c (main): Avoid yet another case of infinite loop while
8156 detaching/killing after a longjmp.
8157
e825046f
JK
81582012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8159
8160 Code cleanup.
8161 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8162
b9e7b9c3
UW
81632012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8164
8165 * hostio.c (handle_readlink): New function.
8166 (handle_vFile): Call it to handle "vFile:readlink" packets.
8167
901f9912
UW
81682012-01-20 Pedro Alves <palves@redhat.com>
8169 Ulrich Weigand <ulrich.weigand@linaro.org>
8170
8171 * server.c (handle_v_requests): Only support vAttach and vRun to
8172 start multiple processes when in extended protocol mode.
8173
fc1ab1a0
PA
81742012-01-17 Pedro Alves <palves@redhat.com>
8175
8176 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8177 memalign plus mprotect to allocate the scratch buffer.
8178
7d5d4e98
PA
81792012-01-13 Pedro Alves <palves@redhat.com>
8180
8181 * server.c (attach_inferior): Clear `cont_thread'.
8182
f128d5e9
PA
81832012-01-13 Pedro Alves <palves@redhat.com>
8184
8185 * server.c (main): Avoid infinite loop while detaching/killing
8186 after a longjmp.
8187
06db92f0
DE
81882012-01-09 Doug Evans <dje@google.com>
8189
8190 * server.c (start_inferior): Set last_ptid in --wrapper case.
8191
32d92999
YQ
81922012-01-06 Yao Qi <yao@codesourcery.com>
8193
8194 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8195 defined.
8196 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8197
5e0a92a9
YQ
81982012-01-04 Yao Qi <yao@codesourcery.com>
8199
8200 * tracepoint.c (cmd_qtdp): Print debug message
8201 for static tracepoint.
8202
ae639e8c
YQ
82032012-01-04 Yao Qi <yao@codesourcery.com>
8204
8205 * tracepoint.c (trace_vdebug): Differentiate debug message
8206 between gdbserver and IPA.
8207
f72429c5
YQ
82082012-01-03 Yao Qi <yao@codesourcery.com>
8209
8210 * tracepoint.c (tracepoint_was_hit): Don't collect for
8211 static tracepoint.
8212
12c3e59c
JB
82132012-01-02 Joel Brobecker <brobecker@adacore.com>
8214
8215 * terminal.h: Reformat copyright header.
8216
67827812
JB
82172012-01-02 Joel Brobecker <brobecker@adacore.com>
8218
8219 * server.c (gdbserver_version): Update copyright year.
8220 * gdbreplay.c (gdbreplay_version): Likewise.
8221
3e52c33d
JK
82222011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8223
8224 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8225
8226 Revert:
8227 2011-12-18 Hui Zhu <teawater@gmail.com>
8228 * linux-low.c (linux_create_inferior): Save return value to ret.
8229
66f1260e
HZ
82302011-12-18 Hui Zhu <teawater@gmail.com>
8231
8232 * linux-low.c (linux_create_inferior): Save return value to ret.
8233
e77616d7
DE
82342011-12-16 Doug Evans <dje@google.com>
8235
e7b06c57
DE
8236 * linux-low.c (linux_create_inferior): If stdio connection,
8237 redirect stdin from /dev/null, stdout to stderr.
8238 * remote-utils.c (remote_is_stdio): New static global.
8239 (remote_connection_is_stdio): New function.
8240 (remote_prepare): Handle stdio connection.
8241 (remote_open): Ditto.
8242 (remote_close): Don't close stdin for stdio connections.
8243 (read_prim,write_prim): New functions. Replace all calls to
8244 read/write to these.
8245 * server.c (main): Watch for "-" argument. Move call to
8246 remote_prepare before start_inferior.
8247 * server.h (STDIO_CONNECTION_NAME): New macro.
8248 (remote_connection_is_stdio): Declare.
8249
e77616d7
DE
8250 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8251 in debugging output.
8252
82067193
YQ
82532011-12-15 Yao Qi <yao@codesourcery.com>
8254
8255 * tracepoint.c: Include sys/syscall.h.
8256 (gdb_ust_thread): Remove preprocessor conditional.
8257
82bfbe7e
PA
82582011-12-14 Pedro Alves <pedro@codesourcery.com>
8259
8260 * linux-low.c (linux_detach_one_lwp): Call
8261 the_low_target.prepare_to_resume before detaching.
8262
712c6575
YQ
82632011-12-14 Yao Qi <yao@codesourcery.com>
8264
8265 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8266 of write.
8267
d54d1edf
YQ
82682011-12-14 Yao Qi <yao@codesourcery.com>
8269
8270 * i386-low.c (i386_low_stopped_data_address): Initialize local
8271 variable `control'.
8272
6210a125
PA
82732011-12-13 Pedro Alves <pedro@codesourcery.com>
8274
8275 PR remote/13492
8276
8277 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8278 DR_CONTROL unless necessary. Extend comments.
8279 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8280 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8281
2ece8244
YQ
82822011-12-13 Yao Qi <yao@codesourcery.com>
8283
8284 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8285 macros.
8286 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8287
784867a5
JK
82882011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8289
8290 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8291 Print new debug message for such case.
8292
6bf36717
JK
82932011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8294
8295 Fix overlapping memcpy.
8296 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8297 the read_inferior_memory transfer.
8298 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8299 write_inferior_memory transfer.
8300 (set_fast_tracepoint_jump): New variable buf. Use it for the
8301 read_inferior_memory and write_inferior_memory transfers.
8302 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8303 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8304 Use it for the write_inferior_memory transfer.
8305 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8306 buffers.
8307
50275556
MR
83082011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8309
8310 * linux-low.c (fetch_register, store_register): Make code
8311 consistent, fix formatting.
8312
7325beb4
MR
83132011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8314
8315 * linux-low.c (usr_store_inferior_registers): Factor out code
8316 to handle individual registers into...
8317 (store_register): ... this new function.
8318
c642a434
UW
83192011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8320
8321 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8322 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8323 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8324 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8325 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8326 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8327 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8328 (srv_xmlfiles): Add new XML files.
8329
8330 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8331 and <sys/uio.h>.
8332 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8333 (init_registers_s390_linux32v1): Add prototype.
8334 (init_registers_s390_linux32v2): Likewise.
8335 (init_registers_s390_linux64v1): Likewise.
8336 (init_registers_s390_linux64v2): Likewise.
8337 (init_registers_s390x_linux64v1): Likewise.
8338 (init_registers_s390x_linux64v2): Likewise.
8339 (s390_num_regs): Increment to 52.
8340 (s390_regmap): Add orig_r2 register.
8341 (s390_num_regs_3264): Increment to 68.
8342 (s390_regmap_3264): Add orig_r2 register.
8343 (s390_collect_ptrace_register): Handle orig_r2 register.
8344 (s390_supply_ptrace_register): Likewise.
8345 (s390_fill_last_break): New function.
8346 (s390_store_last_break): Likewise.
8347 (s390_fill_system_call): New function.
8348 (s390_store_system_call): Likewise.
8349 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8350 register sets.
8351 (s390_check_regset): New function.
8352 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8353 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8354 Update target_regsets for available register sets.
8355
2268b414
JK
83562011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8357 Jan Kratochvil <jan.kratochvil@redhat.com>
8358
8359 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8360 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8361 New.
8362 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8363 * linux-low.h (struct process_info_private): New member r_debug.
8364 * server.c (handle_qxfer_libraries): Call
8365 the_target->qxfer_libraries_svr4.
8366 (handle_qxfer_libraries_svr4): New function.
8367 (qxfer_packets): New entry "libraries-svr4".
8368 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8369 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8370 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8371 PACKET_qXfer_libraries_svr4.
8372
d6db1fab
UW
83732011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8374
8375 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8376 PSW address/mask between 8-byte and 16-byte formats.
8377 (s390_supply_ptrace_register): Likewise.
8378 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8379 basic addressing mode bit.
8380
242f5f1c
SS
83812011-11-24 Stan Shebs <stan@codesourcery.com>
8382
8383 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8384
f196051f
SS
83852011-11-17 Stan Shebs <stan@codesourcery.com>
8386
8387 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8388 (tracing_start_time): New global.
8389 (tracing_stop_time): New global.
8390 (tracing_user_name): New global.
8391 (tracing_notes): New global.
8392 (tracing_stop_note): New global.
8393 (cmd_qtstart): Set traceframe_usage, start_time.
8394 (stop_tracing): Set stop_time.
8395 (cmd_qtstatus): Report additional status.
8396 (cmd_qtp): New function.
8397 (handle_tracepoint_query): Call it.
8398 (cmd_qtnotes): New function.
8399 (handle_tracepoint_general_set): Call it.
8400 (get_timestamp): Rename from tsv_get_timestamp.
8401
405f8e94
SS
84022011-11-14 Stan Shebs <stan@codesourcery.com>
8403 Kwok Cheung Yeung <kcy@codesourcery.com>
8404
8405 * linux-x86-low.c (small_jump_insn): New.
8406 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8407 trampoline and error message, build a trampoline and issue a small
8408 jump instruction to it.
8409 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8410 trampoline and error message.
8411 (x86_get_min_fast_tracepoint_insn_len): New.
8412 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8413 * linux-low.h (struct linux_target_ops): Add arguments to
8414 install_fast_tracepoint_jump_pad operation, add new operation.
8415 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8416 arguments.
8417 (linux_get_min_fast_tracepoint_insn_len): New function.
8418 (linux_target_op): Add new operation.
8419 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8420 (gdb_trampoline_buffer_end): Ditto.
8421 (gdb_trampoline_buffer_error): Ditto.
8422 (struct ipa_sym_addresses): Add fields for new IPA variables.
8423 (symbol_list): Add entries for new IPA variables.
8424 (struct tracepoint): Add fields to hold the address range of the
8425 trampoline used by the tracepoint.
8426 (trampoline_buffer_head): New static variable.
8427 (trampoline_buffer_tail): Ditto.
8428 (claim_trampoline_space): New function.
8429 (have_fast_tracepoint_trampoline_buffer): New function.
8430 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8431 structure.
8432 (install_fast_tracepoint): Ditto, also add error buffer argument.
8433 (cmd_qtminftpilen): New function.
8434 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8435 (fast_tracepoint_from_trampoline_address): New function.
8436 (fast_tracepoint_collecting): Handle trampoline as part of jump
8437 pad space.
8438 (set_trampoline_buffer_space): New function.
8439 (initialize_tracepoint): Initialize new IPA variables.
8440 * target.h (struct target_ops): Add arguments to
8441 install_fast_tracepoint_jump_pad operation, add new
8442 get_min_fast_tracepoint_insn_len operation.
8443 (target_get_min_fast_tracepoint_insn_len): New.
8444 (install_fast_tracepoint_jump_pad): Add arguments.
8445 * server.h (IPA_BUFSIZ): Define.
8446 * linux-i386-ipa.c: Include extra header files.
8447 (initialize_fast_tracepoint_trampoline_buffer): New function.
8448 (initialize_low_tracepoint): Call it.
8449 * server.h (set_trampoline_buffer_space): Declare.
8450 (claim_trampoline_space): Ditto.
8451 (have_fast_tracepoint_trampoline_buffer): Ditto.
8452
1e4d1764
YQ
84532011-11-14 Yao Qi <yao@codesourcery.com>
8454
8455 * server.c (handle_query): Handle InstallInTrace for qSupported.
8456 * tracepoint.c (add_tracepoint): Sort list.
8457 (install_tracepoint, download_tracepoint): New.
8458 (cmd_qtdp): Call them to install and download tracepoints.
8459 (sort_tracepoints): Removed.
8460 (cmd_qtstart): Update.
8461
5c73ff4e
YQ
84622011-11-14 Yao Qi <yao@codesourcery.com>
8463
8464 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8465 * mem-break.h: Declare.
8466 * tracepoint.c (cmd_qtstart): Move some code to ...
8467 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8468 New.
8469 (download_tracepoints): Move some code to ...
8470 (download_tracepoint_1): ... here. New.
8471
86a30030
YQ
84722011-11-08 Yao Qi <yao@codesourcery.com>
8473
8474 * remote-utils.c (relocate_instruction): A comment fix.
8475
8d26e50c
JB
84762011-11-07 Joel Brobecker <brobecker@adacore.com>
8477
8478 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8479 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8480 dr_status_mirror and dr_control_mirror from debug_reg_state.
8481 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8482 (i386_initial_stuff): Remove use of deleted globals.
8483 (i386_get_thread_context, i386_set_thread_context,
8484 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8485 from debug_reg_state.
8486
a59306a3
YQ
84872011-11-05 Yao Qi <yao@codesourcery.com>
8488
8489 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8490 address as TPOINT's.
8491
3065dfb6
SS
84922011-11-02 Stan Shebs <stan@codesourcery.com>
8493
8494 * tracepoint.c (agent_mem_read_string): New function.
8495 (eval_agent_expr): Call it for tracenz.
8496 * server.c (handle_query): Report support for tracenz.
8497
fd0d8c7c
YQ
84982011-11-02 Yao Qi <yao@codesourcery.com>
8499
8500 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8501
609086b1
YQ
85022011-11-02 Yao Qi <yao@codesourcery.com>
8503
8504 * target.h: Fix a typo in comment.
8505
b9fd1791
PA
85062011-10-31 Pedro Alves <pedro@codesourcery.com>
8507
8508 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8509 clobber the breakpoints' shadows with fast tracepoint jumps.
8510 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8511 * target.c (write_inferior_memory): Also pass MYADDR down to
8512 check_mem_write.
8513
03583c20
UW
85142011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8515
8516 * configure.ac: Check support for personality routine.
8517 * configure: Regenerate.
8518 * config.in: Likewise.
8519 * linux-low.c: Include <sys/personality.h>.
8520 Define ADDR_NO_RANDOMIZE if necessary.
8521 (linux_create_inferior): Disable address space randomization when
8522 forking inferior, if requested.
8523 (linux_supports_disable_randomization): New function.
8524 (linux_target_ops): Install it.
8525 * server.h (disable_randomization): Declare.
8526 * server.c (disable_randomization): New global variable.
8527 (handle_general_set): Handle QDisableRandomization.
8528 (handle_query): Likewise for qSupported.
8529 (main): Support --disable-randomization and --no-disable-randomization
8530 command line arguments.
8531 * target.h (struct target_ops): Add supports_disable_randomization.
8532 (target_supports_disable_randomization): New macro.
8533
723b724b
MF
85342011-09-29 Mike Frysinger <vapier@gentoo.org>
8535
8536 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8537 ifdef check.
8538 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8539 [!PT_GETDSBT] (target_loadmap): New definition.
8540 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8541 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8542 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8543 and PT_GETDSBT to LINUX_LOADMAP.
8544 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8545 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8546
55329a5c 85472011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
8548
8549 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8550 (arm_linux_hwbp_cap): New static variable.
8551 (arm_linux_get_hwbp_cap): Replace by ...
8552 (arm_linux_init_hwbp_cap): ... this new function.
8553 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8554 (arm_linux_get_hw_watchpoint_count): Likewise.
8555 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8556 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8557 (arm_prepare_to_resume): Use perror_with_name instead of error.
8558
55329a5c 85592011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
8560
8561 * linux-arm-low.c: Include <signal.h>.
8562 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8563 (struct arm_linux_hwbp_cap): New data type.
8564 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8565 (struct arm_linux_hw_breakpoint): New data type.
8566 (MAX_BPTS, MAX_WPTS): Define.
8567 (struct arch_process_info, struct arch_lwp_info): New data types.
8568 (arm_linux_get_hwbp_cap): New function.
8569 (arm_linux_get_hw_breakpoint_count): Likewise.
8570 (arm_linux_get_hw_watchpoint_count): Likewise.
8571 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8572 (arm_hwbp_control_initialize): Likewise.
8573 (arm_hwbp_control_is_enabled): Likewise.
8574 (arm_hwbp_control_is_initialized): Likewise.
8575 (arm_hwbp_control_disable): Likewise.
8576 (arm_linux_hw_breakpoint_equal): Likewise.
8577 (arm_linux_hw_point_initialize): Likewise.
8578 (struct update_registers_data): New data structure.
8579 (update_registers_callback: New function.
8580 (arm_insert_point): Likewise.
8581 (arm_remove_point): Likewise.
8582 (arm_stopped_by_watchpoint): Likewise.
8583 (arm_stopped_data_address): Likewise.
8584 (arm_new_process): Likewise.
8585 (arm_new_thread): Likewise.
8586 (arm_prepare_to_resume): Likewise.
8587 (the_low_target): Register arm_insert_point, arm_remove_point,
8588 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8589 arm_new_thread, and arm_prepare_to_resume.
8590
6b9801d4
SS
85912011-09-15 Stan Shebs <stan@codesourcery.com>
8592
8593 * server.h (struct emit_ops): Add compare-goto fields.
8594 * tracepoint.c (gdb_agent_op_sizes): New table.
8595 (emit_eq_goto): New function.
8596 (emit_ne_goto): New function.
8597 (emit_lt_goto): New function.
8598 (emit_le_goto): New function.
8599 (emit_gt_goto): New function.
8600 (emit_ge_goto): New function.
8601 (is_goto_target): New function.
8602 (compile_bytecodes): Recognize special cases of compare-goto
8603 combinations and call specialized emitters for them.
8604 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8605 (amd64_emit_ne_goto): New function.
8606 (amd64_emit_lt_goto): New function.
8607 (amd64_emit_le_goto): New function.
8608 (amd64_emit_gt_goto): New function.
8609 (amd64_emit_ge_goto): New function.
8610 (amd64_emit_ops): Add the new functions.
8611 (i386_emit_eq_goto): New function.
8612 (i386_emit_ne_goto): New function.
8613 (i386_emit_lt_goto): New function.
8614 (i386_emit_le_goto): New function.
8615 (i386_emit_gt_goto): New function.
8616 (i386_emit_ge_goto): New function.
8617 (i386_emit_ops): Add the new functions.
8618
bf15cbda
SS
86192011-09-08 Stan Shebs <stan@codesourcery.com>
8620
8621 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8622 (i386_emit_epilogue): Restore %ebx.
8623
943ca1dd
JZ
86242011-08-31 Jie Zhang <jzhang918@gmail.com>
8625
8626 * server.c (step_thread): Remove definition.
8627 (process_serial_event): Don't handle Hs.
8628 * server.h (step_thread): Remove declaration.
8629 * target.c (set_desired_inferior): Remove use of step_thread.
8630
e3deef73
LM
86312011-08-24 Luis Machado <lgustavo@codesourcery.com>
8632
8633 * linux-low.c: Include linux-procfs.h.
8634 (linux_attach_lwp_1): Update comments.
8635 (linux_attach): Scan for existing threads when attaching to a
8636 process that is the tgid.
8637 * Makefile.in: Update dependencies.
8638
13da1c97
LM
86392011-08-24 Luis Machado <lgustavo@codesourcery.com>
8640
8641 * configure.srv: Add linux-procfs.o dependencies.
8642
881127c9
YQ
86432011-08-14 Yao Qi <yao@codesourcery.com>
8644
8645 * target.h (struct target_ops): Fix indent.
8646 * win32-low.c (win32_target_ops): Fix comment.
8647
58dbd541
YQ
86482011-08-14 Andrew Jenner <andrew@codesourcery.com>
8649 Yao Qi <yao@codesourcery.com>
8650
8651 * Makefile.in (clean): Remove tic6x-*.c files.
8652 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8653 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8654 (tic6x-c64xp-linux.c): Likewise.
8655 * configure.srv: Add support for tic6x-*-uclinux.
8656 * linux-tic6x-low.c: New.
8657 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8658
78d85199
YQ
86592011-08-14 Andrew Stubbs <ams@codesourcery.com>
8660 Yao Qi <yao@codesourcery.com>
8661
8662 * target.h (struct target_ops): Add read_loadmap.
8663 * linux-low.c (struct target_loadseg): New type.
8664 (struct target_loadmap): New type.
8665 (linux_read_loadmap): New function.
8666 (linux_target_ops): Add linux_read_loadmap.
8667 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
8668 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8669 to NULL.
78d85199 8670
a959a88d
EZ
86712011-08-05 Eli Zaretskii <eliz@gnu.org>
8672
8673 * win32-low.c: Include <stdint.h>.
8674
1ced966e
PA
86752011-07-22 Pedro Alves <pedro@codesourcery.com>
8676
8677 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8678 to the inferior here.
8679 (i386_remove_aligned_watchpoint): Ditto.
8680 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8681 fit part of the watchpoint in the debug registers.
8682 (i386_update_inferior_debug_regs): New.
8683 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8684 registers, and only update the inferior on success.
8685 (i386_low_remove_watchpoint): Ditto.
8686
d26e3629
KY
86872011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8688
8689 * linux-low.c (compare_ints, unique, list_threads, show_process,
8690 linux_core_of_thread): Delete.
8691 (linux_target_ops): Change linux_core_of_thread to
8692 linux_common_core_of_thread.
8693 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8694 * utils.c (malloc_failure): Change type of argument.
8695 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8696 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8697 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8698 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8699 (IPA_OBJS): Add common-utils-ipa.o.
8700 (ptid_h, linux_osdata_h): New macros.
8701 (server_h): Add common/common-utils.h, common/xml-utils.h,
8702 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8703 common/ptid.h.
8704 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8705 ptid.o, buffer.o): New rules.
8706 (linux-low.o): Add common/linux-osdata.h as a dependency.
8707 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8708 * configure.ac: Add AC_HEADER_DIRENT check.
8709 * config.in: Regenerate.
8710 * configure: Regenerate.
8711 * remote-utils.c (xml_escape_text): Delete.
8712 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8713 buffer_xml_printf): Move to common/buffer.c.
8714 * server.c (main): Remove call to initialize_inferiors.
8715 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8716 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8717 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8718 internal_error, gdb_assert, gdb_assert_fail): Delete.
8719 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8720 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8721 common/buffer.h.
8722 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8723 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8724 initialize_inferiors): Delete.
8725
2275a1a7
PA
87262011-07-20 Pedro Alves <pedro@codesourcery.com>
8727
8728 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8729 symbol error.
8730
0a5b1e09
PA
87312011-05-31 Pedro Alves <pedro@codesourcery.com>
8732
8733 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8734 assertion.
8735 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8736
6938fd34
YQ
87372011-05-26 Yao Qi <yao@codesourcery.com>
8738
8739 * Makefile.in (thread-db.o): Track dependence to
8740 common/gdb_thread_db.h.
8741 * thread-db.c: include gdb_thread_db.h from right place.
8742
b481f9e0
TT
87432011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8744
8745 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8746 __FILE__ and __LINE__ to internal_error.
8747
98a5dd13
DE
87482011-05-13 Doug Evans <dje@google.com>
8749
8750 * thread-db.c (try_thread_db_load_from_sdir): New function.
8751 (try_thread_db_load_from_dir): New function.
8752 (thread_db_load_search): Handle $sdir, ignore $pdir.
8753 Remove trying of system directories if search of
8754 libthread-db-search-path fails, that is now done via $sdir.
8755
d248b706
KY
87562011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8757
8758 * server.c (handle_query): Add EnableDisableTracepoints to the list
8759 of supported features.
43aaf8b6 8760 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 8761 tracepoints.
43aaf8b6
PA
8762 (cmd_qtenable_disable): New.
8763 (cmd_qtstart): Install tracepoints even if disabled.
8764 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8765 receiving a QTEnable or QTDisable packet.
8766 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8767 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8768 tracepoints.
8769 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 8770
84e578fb
DE
87712011-05-10 Doug Evans <dje@google.com>
8772
8773 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8774
71f55dd8
DE
87752011-05-04 Doug Evans <dje@google.com>
8776
8777 * linux-low.c (linux_join): Skip process lookup.
8778 * spu-low.c (spu_join): Ditto.
8779 * server.c (join_inferiors_callback): Delete.
8780 (process_serial_event): For 'D' packet (detach) call join_inferior
8781 directly.
8782
4d393d60
JM
87832011-05-04 Joseph Myers <joseph@codesourcery.com>
8784
8785 * README: Don't mention xscale*-*-linux*.
8786 * configure.srv (xscale*-*-linux*): Don't handle target.
8787
b00ad6ff
NF
87882011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8789
8790 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8791 casting pointers.
8792 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8793 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8794 (i386_emit_void_call_2): Likewise.
8795
af96c192
YQ
87962011-04-26 Yao Qi <yao@codesourcery.com>
8797
43aaf8b6
PA
8798 * linux-low.c: Move common macros to linux-ptrace.h.
8799 Include linux-ptrace.h.
af96c192
YQ
8800 * Makefile.in (linux_ptrace_h): New.
8801 (linux-low.o): Depends on linux-ptrace.h.
8802
03f2bd59
JK
88032011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8804
8805 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8806 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8807 (remote_prepare): New function with most of the TCP code from ...
8808 (remote_open): ... here. Detect PORT here unconditionally. Move also
8809 setting transport_is_reliable.
8810 * server.c (run_once): New variable.
8811 (gdbserver_usage): Document it.
8812 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8813 the first run if RUN_ONCE.
8814 * server.h (run_once, remote_prepare): New declarations.
8815
7a9dd1b2
TT
88162011-04-19 Tom Tromey <tromey@redhat.com>
8817
8818 * win32-low.c (handle_load_dll): Remove duplicate "the".
8819
81239425
PM
88202011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8821
8822 Remove support for old Cygwin 1.5 versions.
8823 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8824 function to avoid warning.
8825 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8826 warning.
8827
9e0627f1
PM
88282011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8829
8830 * gdbserver/server.h (Macro _): Define it if not available.
8831
588eebee
MS
88322011-03-14 Michael Snyder <msnyder@vmware.com>
8833
348af9f7 8834 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 8835
43f70d4c
JB
88362011-03-10 Joel Brobecker <brobecker@adacore.com>
8837
8838 * Makefile.in (maintainer-clean realclean distclean): Remove
8839 "make ... subdir_do" command.
8840
348af9f7
MS
88412011-03-10 Michael Snyder <msnyder@vmware.com>
8842
8843 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8844
8845 * server.c (handle_v_run): Free alloced buffer on early return.
8846
e637a4f5
YQ
88472011-03-09 Yao Qi <yao@codesourcery.com>
8848
8849 Revert:
8850 2011-03-04 Yao Qi <yao@codesourcery.com>
8851
8852 * Makefile.in: Remove GNU make feature --directory.
8853
8854 2011-03-05 Yao Qi <yao@codesourcery.com>
8855
8856 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8857 (subdir_do): New make target. Copied from gdb/Makefile.
8858 (maintainer-clean, realclean, distclean, clean): Call corresponding
8859 make targets in common/Makefile.
8860
8861 2011-02-11 Yao Qi <yao@codesourcery.com>
8862
8863 * configure.ac: Call AC_PROG_RANLIB.
8864 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8865 * configure: Regenerate.
8866
e6edda56
JK
88672011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8868
8869 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8870
e5141119
JB
88712011-03-06 Yao Qi <yao@codesourcery.com>
8872
8873 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8874
64794aa4
JB
88752011-03-05 Yao Qi <yao@codesourcery.com>
8876
8877 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8878 (subdir_do): New make target. Copied from gdb/Makefile.
8879 (maintainer-clean, realclean, distclean, clean): Call corresponding
8880 make targets in common/Makefile.
8881
7a762829
YQ
88822011-03-04 Yao Qi <yao@codesourcery.com>
8883
8884 * Makefile.in: Remove GNU make feature --directory.
8885
348af9f7
MS
88862011-03-04 Michael Snyder <msnyder@vmware.com>
8887
8888 * server.c (queue_stop_reply): Call xmalloc not malloc.
8889
88902011-03-02 Michael Snyder <msnyder@vmware.com>
8891
8892 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8893
9f72fee2
MS
88942011-02-28 Michael Snyder <msnyder@vmware.com>
8895
588eebee
MS
8896 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8897 (cmd_qtframe): Ditto.
8898 (cmd_qtbuffer): Ditto.
8899 (cmd_bigqtbuffer): Ditto.
8900
9f72fee2
MS
8901 * utils.c (decimal2str): Initialize 'width' to nine, then
8902 don't mess with it.
8903
8040bd49
UW
89042011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8905
8906 * hostio.c (require_data): Free *data, not data.
8907
7e52cbd0
JK
89082011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8909
8910 * hostio.c (require_data): Use free, not xfree.
8911
9130f83e
MS
89122011-02-27 Michael Snyder <msnyder@vmware.com>
8913
4b812f4e
MS
8914 * server.c (handle_query): Discard unused value.
8915
9130f83e
MS
8916 * hostio.c (require_data): Free malloc memory before returning
8917 error.
8918
69d37113
MS
89192011-02-26 Michael Snyder <msnyder@vmware.com>
8920
8921 * linux-low.c (list_threads): Call closedir for dirent.
8922
35f5825a
MS
89232011-02-27 Michael Snyder <msnyder@vmware.com>
8924
2a589cef
MS
8925 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8926 a case statement falls through.
8927
0adea5f7
MS
8928 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8929
35f5825a
MS
8930 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8931 in comparison.
8932
238f1c74
MS
89332011-02-26 Michael Snyder <msnyder@vmware.com>
8934
8935 * utils.c (decimal2str): Eliminate dead code and dead param.
8936 (pulongest): Drop dead param from call to decimal2str.
8937 (plongest): Ditto.
8938
633ff500
JB
89392011-02-24 Joel Brobecker <brobecker@adacore.com>
8940
8941 Revert the following patch (not approved yet):
8942 2011-02-21 Hui Zhu <teawater@gmail.com>
8943 * tracepoint.c (tp_printf): New function.
8944 (eval_agent_expr): Handle gdb_agent_op_printf.
8945
f9c6ff72
HZ
89462011-02-21 Hui Zhu <teawater@gmail.com>
8947
8948 * tracepoint.c (tp_printf): New function.
8949 (eval_agent_expr): Handle gdb_agent_op_printf.
8950
94d5e490
TT
89512011-02-18 Tom Tromey <tromey@redhat.com>
8952
8953 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8954 (tracepoint.o): Likewise.
8955 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8956 (gdb_agent_op_names): Likewise.
8957
c7f96d2b
TT
89582011-02-18 Tom Tromey <tromey@redhat.com>
8959
8960 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8961 gdb_agent_op_rot>: New constants.
8962 (gdb_agent_op_names): Add pick and roll.
8963 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8964 cases.
8965
0feedb2c
JK
89662011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8967
8968 * aclocal.m4: Regenerated with aclocal-1.11.1.
8969
b3b9301e
PA
89702011-02-14 Pedro Alves <pedro@codesourcery.com>
8971
8972 * server.c (handle_qxfer_traceframe_info): New.
8973 (qxfer_packets): Register "traceframe-info".
8974 (handle_query): Report support for qXfer:traceframe-info:read+.
8975 * tracepoint.c (match_blocktype): New.
8976 (traceframe_find_block_type): Rename to ...
8977 (traceframe_walk_blocks): ... this. Add callback filter argument,
8978 and use it.
8979 (traceframe_find_block_type): New, reimplemented on top of
8980 traceframe_walk_blocks.
8981 (build_traceframe_info_xml): New.
8982 (traceframe_read_info): New.
8983 * server.h (traceframe_read_info): Declare.
8984
4f3e6fb7
YQ
89852011-02-11 Yao Qi <yao@codesourcery.com>
8986
8987 * configure.ac: Call AC_PROG_RANLIB.
8988 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8989 * configure: Regenerate.
8990
764880b7
PA
89912011-02-07 Pedro Alves <pedro@codesourcery.com>
8992
8993 * server.c (gdb_read_memory): Change return semantics to allow
8994 partial transfers.
8995 (handle_search_memory_1): Adjust.
8996 (process_serial_event) <'m' packet>: Handle partial transfers.
8997 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8998
1c79eb8a
PA
89992011-01-28 Pedro Alves <pedro@codesourcery.com>
9000
9001 * regcache.c (init_register_cache): Initialize
9002 regcache->register_status.
9003 (free_register_cache): Release regcache->register_status.
9004 (regcache_cpy): Copy register_status.
9005 (registers_to_string): Print 'x's for unavailable registers.
9006 (supply_register): Mark the register's status valid or
9007 unavailable, depending on whether a buffer was passed in or not.
9008 (supply_register_zeroed): New.
9009 (supply_regblock): Mark the registers' status valid or
9010 unavailable, depending on whether a buffer was passed in or not.
9011 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9012 (struct regcache): New `register_status' field.
9013 (supply_register_zeroed): Declare.
9014 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9015 supply_register_zeroed, rather than passing a NULL buffer to
9016 supply_register.
9017 * tracepoint.c (fetch_traceframe_registers): Update comment.
9018
85724a0e
PA
90192011-01-28 Pedro Alves <pedro@codesourcery.com>
9020
9021 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9022 buffer explicit.
9023
d08aafef
PA
90242011-01-25 Pedro Alves <pedro@codesourcery.com>
9025
9026 * server.h (decode_xfer_write): Change prototype.
9027 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9028 and don't extract the annex here.
9029 * server.c (decode_xfer_read): Remove `annex' parameter,
9030 and don't extract the annex here.
9031 (decode_xfer): New.
9032 (struct qxfer): New.
9033 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9034 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9035 (handle_qxfer_statictrace): New functions, abstracted out from
9036 handle_query, and made to use the struct qxfer interface.
9037 (handle_threads_qxfer_proper): Rename to ...
9038 (handle_qxfer_threads_proper): ... this.
9039 (handle_threads_qxfer): Rename to ...
9040 (handle_qxfer_threads): ... this. Adjust.
9041 (qxfer_packets): New array.
9042 (handle_qxfer): New function.
9043 (handle_query): Use handle_qxfer.
9044
493e2a69
MS
90452011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9046
9047 * gdbreplay.c: Shorten lines of >= 80 columns.
9048 * linux-low.c: Ditto.
9049 * linux-ppc-low.c: Ditto.
9050 * linux-s390-low.c: Ditto.
9051 * linux-sparc-low.c: Ditto.
9052 * linux-x86-low.c: Ditto.
9053 * linux-xtensa-low.c: Ditto.
9054 * mem-break.c: Ditto.
9055 * nto-low.c: Ditto.
9056 * regcache.h: Ditto.
9057 * remote-utils.c: Ditto.
9058 * server.c: Ditto.
9059 * server.h: Ditto.
9060 * thread-db.c: Ditto.
9061 * tracepoint.c: Ditto.
9062 * utils.c: Ditto.
9063 * win32-low.h: Ditto.
9064
44944448
JB
90652011-01-05 Joel Brobecker <brobecker@adacore.com>
9066
9067 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9068 update.
9069
71ce852c
JB
90702011-01-01 Joel Brobecker <brobecker@adacore.com>
9071
9072 * server.c (gdbserver_version): Update copyright year in version
9073 output.
9074 * gdbreplay.c (gdbreplay_version): Ditto.
9075
eb826dc6
MF
90762010-12-29 Jie Zhang <jie.zhang@analog.com>
9077
9078 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9079 * linux-bfin-low.c: New file.
9080 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9081 PT_DATA_ADDR for BFIN targets.
9082 * Makefile.in (SFILES): Add linux-bfin-low.c.
9083 (clean): Remove reg-bfin.c.
9084 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9085 * README: Mention supported Blackfin targets.
9086
39ab222a
MF
90872010-12-23 Mike Frysinger <vapier@gentoo.org>
9088
9089 * .gitignore: New file.
9090
a1f2ce7d
MF
90912010-11-16 Mike Frysinger <vapier@gentoo.org>
9092
9093 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9094
f474844c
JZ
90952010-10-22 Jie Zhang <jie@codesourcery.com>
9096
9097 * Makefile.in: Add FLAGS_TO_PASS variable.
9098 (install): Remove dependency of install-only and recursively
9099 invoke make for install-only.
9100
f1048712
DE
91012010-10-04 Doug Evans <dje@google.com>
9102
9103 * Makefile.in (uninstall): Use $(DESTDIR).
9104
b53a1623
PA
91052010-09-24 Pedro Alves <pedro@codesourcery.com>
9106
e6ee044d
PA
9107 PR gdb/11842
9108
b53a1623
PA
9109 * linux-x86-low.c (compat_siginfo_from_siginfo)
9110 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9111 si_code is < 0. Check for si_code == SI_TIMER before checking for
9112 si_code < 0.
9113
fa1bd1e4
JB
91142010-09-13 Joel Brobecker <brobecker@adacore.com>
9115
9116 * lynx-i386-low.c: New file.
9117 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9118
47fac8f8
JB
91192010-09-13 Joel Brobecker <brobecker@adacore.com>
9120
9121 * lynx-low.c (ptrace_request_to_str): Remove handling for
9122 request values that have been removed in LynxOS 5.x.
9123
1adfc54d
JB
91242010-09-13 Joel Brobecker <brobecker@adacore.com>
9125
9126 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9127 <ptrace.h>
9128
c2a66c29
NS
91292010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9130
9131 * configure.ac: Add --enable-inprocess-agent option.
9132 * configure: Rebuilt.
9133
32fcada3
YQ
91342010-09-06 Yao Qi <yao@codesourcery.com>
9135
9136 * linux-low.c (linux_kill): Remove unused variable.
9137 (linux_stabilize_threads): Likewise.
9138 * server.c (start_inferior): Likewise.
9139 (queue_stop_reply_callback): Likewise.
9140 * tracepoint.c (do_action_at_tracepoint): Likewise.
9141
0cccb683
YQ
91422010-09-06 Yao Qi <yao@codesourcery.com>
9143
9144 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9145 on return.
9146
423ec54c
JK
91472010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9148
9149 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9150
12ac6819
PA
91512010-09-06 Pedro Alves <pedro@codesourcery.com>
9152
9153 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9154 "$(IPA_DEPFILES)".
9155
8ed54b31
JB
91562010-09-01 Joel Brobecker <brobecker@adacore.com>
9157
9158 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9159 gdbserver/lynx-ppc-low.c: New files.
9160 * Makefile.in (lynx_low_h): New variable.
9161 (lynx-low.o, lynx-ppc-low.o): New rules.
9162 * configure.ac: On LynxOS, link with -lnetinet.
9163 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9164 * configure: regenerate.
9165
bb0116a4
JB
91662010-09-01 Joel Brobecker <brobecker@adacore.com>
9167
9168 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9169 * configure.ac: Add check for vasprintf and vsnprintf.
9170 * configure, config.in: Regenerate.
9171 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9172
a778ab81 91732010-09-01 Joel Brobecker <brobecker@adacore.com>
9174
9175 * gdbreplay.c: Move include of alloca.h up, next to include of
9176 malloc.h.
9177 * server.h: Add include of malloc.h.
9178 * mem-break.c: Remove include of malloc.h.
9179 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9180
8b034a19 91812010-09-01 Joel Brobecker <brobecker@adacore.com>
9182
9183 * Makefile.in (memmem.o): Build with -Wno-error.
9184
91852010-09-01 Joel Brobecker <brobecker@adacore.com>
9186
9187 * utils.c (xsnprintf): Make non-static.
9188 * server.h: Add xsnprintf declaration.
9189 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9190 replace calls to snprintf by calls to xsnprintf throughout.
9191
91922010-09-01 Joel Brobecker <brobecker@adacore.com>
9193
9194 * configure.ac: Add configure check for alloca.
9195 * configure, config.in: Regenerate.
9196 * server.h: Include alloca.h if it exists.
9197 * gdbreplay.c: Include alloca.h if it exists.
9198
1a981360
PA
91992010-08-28 Pedro Alves <pedro@codesourcery.com>
9200
9201 * linux-low.c (__SIGRTMIN): Define if not already defined.
9202 (linux_create_inferior): Check for __ANDROID__ rather than
9203 __SIGRTMIN.
9204 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9205 are already deferred.
9206 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9207 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9208 stopped and already has a pending signal to report.
9209 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9210 a pending signal to report or is moving out of a jump pad.
9211 (linux_init_signals): Check for __ANDROID__ rather than
9212 __SIGRTMIN.
9213
b4d51a55
PA
92142010-08-28 Pedro Alves <pedro@codesourcery.com>
9215
9216 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9217 debug_threads check. Avoid a linear search when not doing debug
9218 output.
9219
ec48365d
PA
92202010-08-27 Pedro Alves <pedro@codesourcery.com>
9221
9222 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9223 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9224 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9225 (process_event): Change local fd's type to gdb_fildes_t.
9226 (create_file_handler): Adjust prototype.
9227 (delete_file_handler): Adjust prototype.
9228 (handle_file_event): Adjust prototype. Use pfildes.
9229 (create_file_event): Adjsut prototype.
9230 * remote-utils.c (remote_desc, listen_desc): Change type to
9231 gdb_fildes_t.
9232 * server.h: New gdb_fildes_t typedef.
9233 [USE_WIN32API]: Include winsock2.h.
9234 (delete_file_handler, add_file_handler): Adjust prototypes.
9235 (pfildes): Declare.
9236 * utils.c (pfildes): New.
9237
854d88f0
PA
92382010-08-27 Pedro Alves <pedro@codesourcery.com>
9239
9240 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9241 * configure: Regenerate.
9242
0146f85b
PA
92432010-08-27 Pedro Alves <pedro@codesourcery.com>
9244
9245 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9246 (linux_done_accessing_memory): ... this.
9247 (linux_target_ops): Adjust.
9248 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9249 * nto-low.c (nto_target_ops): Adjust comment.
9250 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9251 * spu-low.c (spu_target_ops): Adjust comment.
9252 * target.h (target_ops): Rename unprepare_to_access_memory field
9253 to done_accessing_memory.
9254 (unprepare_to_access_memory): Rename to ...
9255 (done_accessing_memory): ... this.
9256
90d74c30
PA
92572010-08-26 Pedro Alves <pedro@codesourcery.com>
9258
9259 * linux-low.c (linux_prepare_to_access_memory): New.
9260 (linux_unprepare_to_access_memory): New.
9261 (linux_target_ops): Install them.
9262 * server.c (read_memory): Rename to ...
9263 (gdb_read_memory): ... this. Use
9264 prepare_to_access_memory/prepare_to_access_memory.
9265 (write_memory): Rename to ...
9266 (gdb_write_memory): ... this. Use
9267 prepare_to_access_memory/prepare_to_access_memory.
9268 (handle_search_memory_1): Adjust.
9269 (process_serial_event): Adjust.
9270 * target.h (struct target_ops): New fields
9271 prepare_to_access_memory and unprepare_to_access_memory.
9272 (prepare_to_access_memory, unprepare_to_access_memory): New.
9273 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9274 prepare_to_access_memory/prepare_to_access_memory.
9275 * nto-low.c (nto_target_ops): Adjust.
9276 * spu-low.c (spu_target_ops): Adjust.
9277 * win32-low.c (win32_target_ops): Adjust.
9278
fd467969
PA
92792010-08-26 Pedro Alves <pedro@codesourcery.com>
9280
9281 * Makefile.in (WARN_CFLAGS): Get it from configure.
9282 (WERROR_CFLAGS): New.
9283 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9284 * configure.ac: Introduce --enable-werror, which adds -Werror to
9285 the compiler command line. Enabled by default. Disable with
9286 --disable-werror. Add -Wdeclaration-after-statement
9287 Wpointer-arith and -Wformat-nonliteral to warning flags.
9288 * configure: Regenerate.
9289
331e2f5f
PA
92902010-08-26 Pedro Alves <pedro@codesourcery.com>
9291
9292 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9293
e581f2b4
PA
92942010-08-26 Pedro Alves <pedro@codesourcery.com>
9295
9296 * gdbreplay.c (remote_error): New.
9297 (gdbchar): New.
9298 (expect): Use gdbchar. Check for error reading from GDB.
9299 Clarify sync error output.
9300 (play): Check for errors writing to GDB.
9301 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9302 * remote-utils.c (getpkt): Check for errors writing to the remote
9303 descriptor.
9304
3c11dd79
PA
93052010-08-25 Pedro Alves <pedro@codesourcery.com>
9306
9307 * linux-low.c (linux_wait_1): Move non-debugging code out of
9308 `debug_threads' control.
9309
d20a8ad9
PA
93102010-08-25 Pedro Alves <pedro@codesourcery.com>
9311
9312 * linux-low.c (linux_wait_1): Don't set last_status here.
9313 * server.c (push_event, queue_stop_reply_callback): Assert we're
9314 not pushing a TARGET_WAITKIND_IGNORE event.
9315 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9316 (myresume, handle_target_event): Set the thread's last_resume_kind
9317 and last_status from the target returned status.
9318
964e4306
PA
93192010-08-25 Pedro Alves <pedro@codesourcery.com>
9320
9321 PR threads/10729
9322
9323 * linux-x86-low.c (update_debug_registers_callback): New.
9324 (i386_dr_low_set_addr): Use it.
9325 (i386_dr_low_get_addr): New.
9326 (i386_dr_low_set_control): Use update_debug_registers_callback.
9327 (i386_dr_low_get_control): New.
9328 (i386_dr_low_get_status): Adjust.
9329 * linux-low.c (linux_stop_lwp): New.
9330 * linux-low.h (linux_stop_lwp): Declare.
9331
9332 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9333 argument instead of a i386_debug_reg_state.
9334 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9335 a i386_debug_reg_state.
9336 (i386_insert_aligned_watchpoint): Adjust.
9337 (i386_remove_aligned_watchpoint): Adjust.
9338 (i386_low_stopped_data_address): Read the debug registers from the
9339 inferior instead of from the mirrors.
9340 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9341 (i386_dr_low_get_addr): Declare.
9342 (i386_dr_low_get_control): Declare.
9343 (i386_dr_low_get_status): Change prototype.
9344
9345 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9346 (i386_dr_low_get_addr): New.
9347 (i386_dr_low_get_control): New.
9348 (i386_dr_low_get_status): Adjust prototype. Return
9349 dr_status_mirror.
9350 (i386_initial_stuff): Clear dr_status_mirror and
9351 dr_control_mirror.
9352 (i386_get_thread_context): Adjust.
9353 (i386_set_thread_context): Adjust.
9354 (i386_thread_added): Adjust.
9355
5f21a75b
PA
93562010-08-24 Pedro Alves <pedro@codesourcery.com>
9357
9358 * linux-low.h (linux_thread_area): Delete declaration.
9359
3e4c1235
TS
93602010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9361
9362 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9363 after its termination.
9364
1971b033
PA
93652010-08-09 Pedro Alves <pedro@codesourcery.com>
9366
9367 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9368 (gdb_wants_all_stopped): Delete.
9369 (linux_wait_1): Don't call them.
9370 * server.c (handle_v_cont): Tag all threads as want-stopped.
9371 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9372 stopped as "client-wants-stopped".
9373
310444ac
PA
93742010-07-31 Pedro Alves <pedro@codesourcery.com>
9375
9376 * Makefile.in (signals_h): New.
9377 (server_h): Depend on it.
9378 (server.o): Don't depend on $(signals_def).
9379 (signals.o): Depend on $(signals_def).
9380
a19cae16
JK
93812010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9382
9383 * Makefile.in (signals_def): New.
9384 (server_h): Append include/gdb/signals.h and signals_def.
9385 (server.o): Append signals_def.
9386
30d50328
JK
93872010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9388
9389 * server.c (handle_target_event): Use target_signal_to_host for
9390 resume_info.sig initialization.
9391 * target.h (struct thread_resume) <sig>: New comment.
9392
5c3216e2
OS
93932010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9394
c6f46ca0
OS
9395 * server.c (handle_query): strcpy() the returned string from paddress()
9396 instead of sprintf().
5c3216e2
OS
9397 * utils.c (paddress): Return phex_nz().
9398
6bd31874
JB
93992010-07-07 Joel Brobecker <brobecker@adacore.com>
9400
9401 * server.c (handle_v_cont): Call mourn_inferior if process
9402 just exited.
9403 (myresume): Likewise.
9404
0fb4aa4b
PA
94052010-07-01 Pedro Alves <pedro@codesourcery.com>
9406
9407 Static tracepoints, and integration with UST.
9408
9409 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9410 * mem-break.c (uninsert_all_breakpoints)
9411 (reinsert_all_breakpoints): New.
9412 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9413 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9414 (gdb_agent_ust_loaded, helper_thread_id)
9415 (gdb_agent_helper_thread_id): New macros.
9416 (struct ipa_sym_addresses): Add addr_ust_loaded,
9417 addr_helper_thread_id, addr_cmd_buf.
9418 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9419 (in_process_agent_loaded_ust): New.
9420 (write_e_ust_not_loaded): New.
9421 (maybe_write_ipa_ust_not_loaded): New.
9422 (struct collect_static_trace_data_action): New.
9423 (enum tracepoint_type) <static_tracepoint>: New.
9424 (struct tracepoint) <handle>: Mention static tracepoints.
9425 (struct static_tracepoint_ctx): New.
9426 (CMD_BUF_SIZE): New.
9427 (add_tracepoint_action): Handle static tracepoint actions.
9428 (unprobe_marker_at): New.
9429 (clear_installed_tracepoints): Handle static tracepoints.
9430 (cmd_qtdp): Handle static tracepoints.
9431 (probe_marker_at): New.
9432 (cmd_qtstart): Handle static tracepoints.
9433 (response_tracepoint): Handle static tracepoints.
9434 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9435 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9436 (get_context_regcache): Handle static tracepoints.
9437 (do_action_at_tracepoint): Handle static tracepoint actions.
9438 (traceframe_find_block_type): Handle static trace data blocks.
9439 (traceframe_read_sdata): New.
9440 (download_tracepoints): Download static tracepoint actions.
9441 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9442 (GDB_PROBE_NAME): New.
9443 (ust_ops): New.
9444 (GET_UST_SYM): New.
9445 (USTF): New.
9446 (dlsym_ust): New.
9447 (ust_marker_to_static_tracepoint): New.
9448 (gdb_probe): New.
9449 (collect_ust_data_at_tracepoint): New.
9450 (gdb_ust_probe): New.
9451 (UNIX_PATH_MAX, SOCK_DIR): New.
9452 (gdb_ust_connect_sync_socket): New.
9453 (resume_thread, stop_thread): New.
9454 (run_inferior_command): New.
9455 (init_named_socket): New.
9456 (gdb_ust_socket_init): New.
9457 (cstr_to_hexstr): New.
9458 (next_st): New.
9459 (first_marker, next_marker): New.
9460 (response_ust_marker): New.
9461 (cmd_qtfstm, cmd_qtsstm): New.
9462 (unprobe_marker_at, probe_marker_at): New.
9463 (cmd_qtstmat, gdb_ust_thread): New.
9464 (gdb_ust_init): New.
9465 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9466 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9467 (ST_REGENTRY): New.
9468 (x86_64_st_collect_regmap): New.
9469 (X86_64_NUM_ST_COLLECT_GREGS): New.
9470 (AMD64_RIP_REGNUM): New.
9471 (supply_static_tracepoint_registers): New.
9472 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9473 (ST_REGENTRY): New.
9474 (i386_st_collect_regmap): New.
9475 (i386_NUM_ST_COLLECT_GREGS): New.
9476 (supply_static_tracepoint_registers): New.
9477 * server.c (handle_query): Handle qXfer:statictrace:read.
9478 <qSupported>: Report support for StaticTracepoints, and
9479 qXfer:statictrace:read features.
9480 * server.h (traceframe_read_sdata)
9481 (supply_static_tracepoint_registers): Declare.
9482 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9483 (unpack_varlen_hex): Include in IPA build.
9484 * Makefile.in (ustlibs, ustinc): New.
9485 (IPA_OBJS): Add remote-utils-ipa.o.
9486 ($(IPA_LIB)): Link -ldl and -lpthread.
9487 (UST_CFLAGS): New.
9488 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9489 * config.in, configure: Regenerate.
9490
9e4344e5
PA
94912010-06-20 Ian Lance Taylor <iant@google.com>
9492 Pedro Alves <pedro@codesourcery.com>
9493
9494 * linux-x86-low.c (always_true): Delete.
9495 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9496 trying to fool the compiler with always_true.
9497
c6beb2cb
PA
94982010-06-20 Pedro Alves <pedro@codesourcery.com>
9499
9500 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9501 conditions in gdbserver.
9502
d2ed6730
UW
95032010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9504
9505 * spu-low.c (spu_read_memory): Wrap around local store limit.
9506 (spu_write_memory): Likewise.
9507
4e29fb54
PA
95082010-06-15 Pedro Alves <pedro@codesourcery.com>
9509
9510 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9511 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9512 LONGEST uses.
9513 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9514 uses.
9515 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9516 uses with LONGEST uses.
9517
6a271cae
PA
95182010-06-14 Stan Shebs <stan@codesourcery.com>
9519 Pedro Alves <pedro@codesourcery.com>
9520
9521 Bytecode compiler.
9522
9523 * linux-x86-low.c: Include limits.h.
9524 (add_insns): New.
9525 (always_true): New.
9526 (EMIT_ASM): New.
9527 (EMIT_ASM32): New.
9528 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9529 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9530 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9531 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9532 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9533 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9534 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9535 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9536 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9537 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9538 (amd64_emit_void_call_2): New.
9539 (amd64_emit_ops): New.
9540 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9541 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9542 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9543 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9544 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9545 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9546 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9547 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9548 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9549 (i386_emit_stack_adjust, i386_emit_int_call_1)
9550 (i386_emit_void_call_2): New.
9551 (i386_emit_ops): New.
9552 (x86_emit_ops): New.
9553 (the_low_target): Install x86_emit_ops.
9554 * server.h (struct emit_ops): New.
9555 (get_raw_reg_func_addr): Declare.
9556 (current_insn_ptr, emit_error): Declare.
9557 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9558 (set_trace_state_variable_value): New defines.
9559 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9560 addr_get_trace_state_variable_value and
9561 addr_set_trace_state_variable_value.
9562 (symbol_list): New fields for get_raw_reg,
9563 get_trace_state_variable_value and set_trace_state_variable_value.
9564 (condfn): New typedef.
9565 (struct tracepoint): New field `compiled_cond'.
9566 (do_action_at_tracepoint): Clear compiled_cond.
9567 (get_trace_state_variable_value, set_trace_state_variable_value):
9568 Export in the IPA.
9569 (condition_true_at_tracepoint): If there's a compiled condition,
9570 run that.
9571 (current_insn_ptr, emit_error): New globals.
9572 (struct bytecode_address): New.
9573 (get_raw_reg_func_addr): New.
9574 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9575 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9576 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9577 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9578 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9579 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9580 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9581 (compile_tracepoint_condition, compile_bytecodes): New.
9582 * target.h (emit_ops): Forward declare.
9583 (struct target_ops): New field emit_ops.
9584 (target_emit_ops): New.
9585 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9586 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9587 * linux-low.c (linux_emit_ops): New.
9588 (linux_target_ops): Install it.
9589 * linux-low.h (struct linux_target_ops): New field emit_ops.
9590
92b72907
UW
95912010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9592
9593 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9594 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9595
fa593d66
PA
95962010-06-01 Pedro Alves <pedro@codesourcery.com>
9597 Stan Shebs <stan@codesourcery.com>
9598
9599 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9600 (all): Depend on $(extra_libraries).
9601 (install-only): Install the IPA.
9602 (IPA_OBJS, IPA_LIB): New.
9603 (clean): Remove the IPA lib.
9604 (IPAGENT_CFLAGS): New.
9605 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9606 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9607 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9608 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9609 * configure.ac: Check for atomic builtins support in the compiler.
9610 (IPA_DEPFILES, extra_libraries): Define.
9611 * configure.srv (ipa_obj): Add description.
9612 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9613 (i[34567]86-*-linux*): Set ipa_obj.
9614 (x86_64-*-linux*): Set ipa_obj.
9615 * linux-low.c (stabilizing_threads): New.
9616 (supports_fast_tracepoints): New.
9617 (linux_detach): Stabilize threads before detaching.
9618 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9619 the lwp is either not stabilizing, or is moving out of a jump pad.
9620 (linux_fast_tracepoint_collecting): New.
9621 (maybe_move_out_of_jump_pad): New.
9622 (enqueue_one_deferred_signal): New.
9623 (dequeue_one_deferred_signal): New.
9624 (linux_wait_for_event_1): If moving out of a jump pad, defer
9625 pending signals to later.
9626 (linux_stabilize_threads): New.
9627 (linux_wait_1): Check if threads need moving out of jump pads, and
9628 do it if so.
9629 (stuck_in_jump_pad_callback): New.
9630 (move_out_of_jump_pad_callback): New.
9631 (lwp_running): New.
9632 (linux_resume_one_lwp): Handle moving out of jump pads.
9633 (linux_set_resume_request): Dequeue deferred signals.
9634 (need_step_over_p): Also step over fast tracepoint jumps.
9635 (start_step_over): Also uninsert fast tracepoint jumps.
9636 (finish_step_over): Also reinsert fast tracepoint jumps.
9637 (linux_install_fast_tracepoint_jump): New.
9638 (linux_target_ops): Install linux_stabilize_threads and
9639 linux_install_fast_tracepoint_jump_pad.
9640 * linux-low.h (linux_target_ops) <get_thread_area,
9641 install_fast_tracepoint_jump_pad>: New fields.
9642 (struct lwp_info) <collecting_fast_tracepoint,
9643 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9644 (linux_get_thread_area): Declare.
9645 * linux-x86-low.c (jump_insn): New.
9646 (x86_get_thread_area): New.
9647 (append_insns): New.
9648 (push_opcode): New.
9649 (amd64_install_fast_tracepoint_jump_pad): New.
9650 (i386_install_fast_tracepoint_jump_pad): New.
9651 (x86_install_fast_tracepoint_jump_pad): New.
9652 (the_low_target): Install x86_get_thread_area and
9653 x86_install_fast_tracepoint_jump_pad.
9654 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9655 (struct fast_tracepoint_jump): New.
9656 (fast_tracepoint_jump_insn): New.
9657 (fast_tracepoint_jump_shadow): New.
9658 (find_fast_tracepoint_jump_at): New.
9659 (fast_tracepoint_jump_here): New.
9660 (delete_fast_tracepoint_jump): New.
9661 (set_fast_tracepoint_jump): New.
9662 (uninsert_fast_tracepoint_jumps_at): New.
9663 (reinsert_fast_tracepoint_jumps_at): New.
9664 (set_breakpoint_at): Use write_inferior_memory.
9665 (uninsert_raw_breakpoint): Use write_inferior_memory.
9666 (check_mem_read): Mask out fast tracepoint jumps.
9667 (check_mem_write): Mask out fast tracepoint jumps.
9668 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9669 (set_fast_tracepoint_jump): Declare.
9670 (delete_fast_tracepoint_jump)
9671 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9672 (reinsert_fast_tracepoint_jumps_at): Declare.
9673 * regcache.c: Don't compile many functions when building the
9674 in-process agent library.
9675 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9676 the register buffer in the heap.
9677 (free_register_cache): If the register buffer isn't owned by the
9678 regcache, don't free it.
9679 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9680 pre-existing register caches.
9681 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9682 type.
9683 (convert_ascii_to_int): : Constify `from' parameter type.
9684 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9685 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9686 the needed buffer in-place.
9687 (relocate_instruction): New.
9688 * server.c (handle_query) <qSymbols>: If the target supports
9689 tracepoints, give it a chance of looking up symbols. Report
9690 support for fast tracepoints.
9691 (handle_status): Stabilize threads.
9692 (process_serial_event): Adjust.
9693 * server.h (struct fast_tracepoint_jump): Forward declare.
9694 (struct process_info) <fast_tracepoint_jumps>: New field.
9695 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9696 (decode_X_packet, decode_M_packet): Adjust.
9697 (relocate_instruction): Declare.
9698 (in_process_agent_loaded): Declare.
9699 (tracepoint_look_up_symbols): Declare.
9700 (struct fast_tpoint_collect_status): Declare.
9701 (fast_tracepoint_collecting): Declare.
9702 (force_unlock_trace_buffer): Declare.
9703 (handle_tracepoint_bkpts): Declare.
9704 (initialize_low_tracepoint)
9705 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9706 * target.h (struct target_ops) <stabilize_threads,
9707 install_fast_tracepoint_jump_pad>: New fields.
9708 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9709 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9710 [HAVE_STDINT_H]: Include stdint.h.
9711 (trace_debug_1): Rename to ...
9712 (trace_vdebug): ... this.
9713 (trace_debug): Rename to ...
9714 (trace_debug_1): ... this. Add `level' parameter.
9715 (trace_debug): New.
9716 (ATTR_USED, ATTR_NOINLINE): New.
9717 (IP_AGENT_EXPORT): New.
9718 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9719 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9720 (about_to_request_buffer_space, trace_buffer_is_full)
9721 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9722 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9723 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9724 (traceframe_write_count, traceframes_created)
9725 (trace_state_variables)
9726 New renaming defines.
9727 (struct ipa_sym_addresses): New.
9728 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9729 (symbol_list): New.
9730 (ipa_sym_addrs): New.
9731 (all_tracepoint_symbols_looked_up): New.
9732 (in_process_agent_loaded): New.
9733 (write_e_ipa_not_loaded): New.
9734 (maybe_write_ipa_not_loaded): New.
9735 (tracepoint_look_up_symbols): New.
9736 (debug_threads) [IN_PROCESS_AGENT]: New.
9737 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9738 (UNKNOWN_SIDE_EFFECTS): New.
9739 (stop_tracing): New.
9740 (flush_trace_buffer): New.
9741 (stop_tracing_bkpt): New.
9742 (flush_trace_buffer_bkpt): New.
9743 (read_inferior_integer): New.
9744 (read_inferior_uinteger): New.
9745 (read_inferior_data_pointer): New.
9746 (write_inferior_data_pointer): New.
9747 (write_inferior_integer): New.
9748 (write_inferior_uinteger): New.
9749 (struct collect_static_trace_data_action): Delete.
9750 (enum tracepoint_type): New.
9751 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
9752 <actions_str, step_actions, step_actions_str>: Only include in
9753 GDBserver.
fa593d66
PA
9754 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9755 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9756 (tracepoints): Use IP_AGENT_EXPORT.
9757 (last_tracepoint): Don't include in the IPA.
9758 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9759 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9760 (alloced_trace_state_variables): New.
9761 (trace_state_variables): Use IP_AGENT_EXPORT.
9762 (traceframe_t): Delete unused variable.
9763 (circular_trace_buffer): Don't include in the IPA.
9764 (trace_buffer_start): Delete.
9765 (struct trace_buffer_control): New.
9766 (trace_buffer_free): Delete.
9767 (struct ipa_trace_buffer_control): New.
9768 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9769 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9770 New.
9771 (trace_buffer_ctrl): New.
9772 (TRACE_BUFFER_CTRL_CURR): New.
9773 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9774 Reimplement as macros.
9775 (trace_buffer_wrap): Delete.
9776 (traceframe_write_count, traceframe_read_count)
9777 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9778 (struct tracepoint_hit_ctx) <type>: New field.
9779 (struct fast_tracepoint_ctx): New.
9780 (memory_barrier): New.
9781 (cmpxchg): New.
9782 (record_tracepoint_error): Update atomically in the IPA.
9783 (clear_inferior_trace_buffer): New.
9784 (about_to_request_buffer_space): New.
9785 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9786 updating the same buffer.
9787 (add_tracepoint): Default the tracepoint's type to trap
9788 tracepoint, and orig_size to -1.
9789 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9790 internal variables.
9791 (create_trace_state_variable): New parameter `gdb'. Handle it.
9792 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9793 (cmd_qtdp): Handle fast tracepoints.
9794 (cmd_qtdv): Adjust.
9795 (max_jump_pad_size): New.
9796 (gdb_jump_pad_head): New.
9797 (get_jump_space_head): New.
9798 (claim_jump_space): New.
9799 (sort_tracepoints): New.
9800 (MAX_JUMP_SIZE): New.
9801 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9802 IPA.
9803 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9804 support. Upload fast traceframes, and delete internal IPA
9805 breakpoints.
9806 (stop_tracing_handler): New.
9807 (flush_trace_buffer_handler): New.
9808 (cmd_qtstop): Upload fast tracepoints.
9809 (response_tracepoint): Handle fast tracepoints.
9810 (tracepoint_finished_step): Upload fast traceframes. Set the
9811 tracepoint hit context's tracepoint type.
9812 (handle_tracepoint_bkpts): New.
9813 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9814 type. Add comment about fast tracepoints.
9815 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9816 non-existing action_str field.
9817 (get_context_regcache): Handle fast tracepoints.
9818 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9819 to the regcache.
9820 (fast_tracepoint_from_jump_pad_address): New.
9821 (fast_tracepoint_from_ipa_tpoint_address): New.
9822 (collecting_t): New.
9823 (force_unlock_trace_buffer): New.
9824 (fast_tracepoint_collecting): New.
9825 (collecting): New.
9826 (gdb_collect): New.
9827 (write_inferior_data_ptr): New.
9828 (target_tp_heap): New.
9829 (target_malloc): New.
9830 (download_agent_expr): New.
9831 (UALIGN): New.
9832 (download_tracepoints): New.
9833 (download_trace_state_variables): New.
9834 (upload_fast_traceframes): New.
9835 (IPA_FIRST_TRACEFRAME): New.
9836 (IPA_NEXT_TRACEFRAME_1): New.
9837 (IPA_NEXT_TRACEFRAME): New.
9838 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9839 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9840 (gdb_jump_pad_buffer_end): New.
9841 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9842 (initialize_tracepoint): Adjust.
9843 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9844 buffer. Initialize the low module.
9845 * utils.c (PREFIX, TOOLNAME): New.
9846 (malloc_failure): Use PREFIX.
9847 (error): In the IPA, an error causes an exit.
9848 (fatal, warning): Use PREFIX.
9849 (internal_error): Use TOOLNAME.
9850 (NUMCELLS): Increase to 10.
9851 * configure, config.in: Regenerate.
9852
d149dd1d
PA
98532010-06-01 Pedro Alves <pedro@codesourcery.com>
9854
9855 * server.c (handle_query) <qSupported>: Do two passes over the
9856 qSupported string to avoid nesting strtok.
9857
f6528abd
JK
98582010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9859
9860 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9861 (CDEPS): New.
9862 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9863 -Wl,--dynamic-list.
9864 * configure: Regenerate.
9865 * proc-service.list: New.
9866
ca2a87a0
JK
98672010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9868
9869 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9870 New comment.
9871
363a6e9f
OS
98722010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9873
9874 * gdbreplay.c (remote_open): Check error return from socket() call by
9875 its equality to -1 not by it being negative.
9876 * remote-utils.c (remote_open): Likewise.
9877
d23b6cb1
PA
98782010-05-23 Pedro Alves <pedro@codesourcery.com>
9879
9880 * config.h: Regenerate.
9881
28d3cf85
MK
98822010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9883
9884 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9885 doesn't provide PTRACE_GET_THREAD_AREA.
9886
fea36a59
MK
98872010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9888
9889 * linux-m68k-low.c: Include <asm/ptrace.h>
9890 (ps_get_thread_area): Implement.
9891
24b066ba
DE
98922010-05-03 Doug Evans <dje@google.com>
9893
9894 * event-loop.c (struct callback_event): New struct.
9895 (callback_list): New global.
9896 (append_callback_event, delete_callback_event): New functions.
9897 (process_callback): New function.
9898 (start_event_loop): Call it.
9899 * remote-utils.c (NOT_SCHEDULED): Define.
9900 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9901 moved out of readchar.
9902 (readchar): Rewrite. Call reschedule before returning.
9903 (reset_readchar): New function.
9904 (remote_close): Call it.
9905 (process_remaining, reschedule): New functions.
9906 * server.h (callback_handler_func): New typedef.
9907 (append_callback_event, delete_callback_event): Declare.
9908
9836d6ea
PA
99092010-05-03 Pedro Alves <pedro@codesourcery.com>
9910
9911 * proc-service.c (ps_pglobal_lookup): Use
9912 thread_db_look_up_one_symbol.
9913 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9914 parameter. Use it instead of all_symbols_looked_up.
9915 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9916 field.
9917 (all_symbols_looked_up): Don't declare.
9918 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9919 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9920 field.
9921 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9922 Set all_symbols_looked_up here.
9923 (thread_db_look_up_one_symbol): New.
9924 (thread_db_get_tls_address): Adjust.
9925 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9926 thread_db object on the heap, and tentatively set it in the
9927 process structure.
9928 (thread_db_init): Don't set all_symbols_looked_up here.
9929 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9930
7984d532
PA
99312010-05-03 Pedro Alves <pedro@codesourcery.com>
9932
9933 * linux-low.c (linux_kill, linux_detach): Adjust.
9934 (status_pending_p_callback): Remove redundant statement. Check
9935 for !TARGET_WAITIKIND_IGNORE, instead of
9936 TARGET_WAITKIND_STOPPED.
9937 (handle_tracepoints): Make sure LWP is locked. Adjust.
9938 (linux_wait_for_event_1): Adjust.
9939 (linux_cancel_breakpoints): New.
9940 (unsuspend_one_lwp): New.
9941 (unsuspend_all_lwps): New.
9942 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9943 (send_sigstop_callback): Change return type to int, add new
9944 `except' parameter and handle it.
9945 (suspend_and_send_sigstop_callback): New.
9946 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9947 pass them down. If SUSPEND, also increment the lwp's suspend
9948 count.
9949 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9950 (need_step_over_p): Don't consider suspended LWPs.
9951 (start_step_over): Adjust.
9952 (proceed_one_lwp): Change return type to int, add new `except'
9953 parameter and handle it.
9954 (unsuspend_and_proceed_one_lwp): New.
9955 (proceed_all_lwps): Use find_inferior instead of
9956 for_each_inferior.
9957 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9958 also decrement the suspend count of LWPs. Pass `except' down,
9959 instead of hacking its suspend count.
9960 (linux_pause_all): Add `freeze' parameter. Adjust.
9961 (linux_unpause_all): New.
9962 (linux_target_ops): Install linux_unpause_all.
9963 * server.c (handle_status): Adjust.
9964 * target.h (struct target_ops): New fields `unpause_all' and
9965 `cancel_breakpoints'. Add new parameter to `pause_all'.
9966 (pause_all): Add new `freeze' parameter.
9967 (unpause_all): New.
9968 (cancel_breakpoints): New.
9969 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9970 cancel breakpoints.
9971 (cmd_qtstart): Pause threads.
9972 (stop_tracing): Pause threads, and cancel breakpoints.
9973 * win32-low.c (win32_target_ops): Adjust.
9974
e471f25b
PA
99752010-05-03 Pedro Alves <pedro@codesourcery.com>
9976
9977 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9978 the inferior right away from here...
9979 (linux_wait_1): ... to here, and adjust to check the thread's
9980 last_resume_kind instead of the lwp's step or stop_expected flags.
9981
1915ef4f
PA
99822010-05-02 Pedro Alves <pedro@codesourcery.com>
9983
9984 * README: Use consistent `GDB' and `GDBserver' spellings.
9985
f9e39928
PA
99862010-05-02 Pedro Alves <pedro@codesourcery.com>
9987
9988 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9989 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
9990 (linux_detach_one_lwp): Assume the lwp is stopped.
9991 (any_thread_of): Delete.
9992 (linux_detach): Stop all lwps here. Don't blindly delete all
9993 breakpoints.
9994 (delete_lwp_callback): New.
9995 (linux_mourn): Delete all lwps of the process that is gone.
9996 (linux_wait_1): Don't delete the last lwp of the process here.
9997 * mem-break.h (mark_breakpoints_out): Declare.
9998 * mem-break.c (mark_breakpoints_out): New.
9999 (free_all_breakpoints): Use it.
10000 * server.c (handle_target_event): If the process is gone, mark
10001 breakpoints out.
10002 * thread-db.c (struct thread_db) <create_bp>: New field.
10003 (thread_db_enable_reporting): Fix prototype. Store a thread event
10004 breakpoint reference in the thread_db struct.
10005 (thread_db_load_search): Clear the thread_db object.
10006 (try_thread_db_load_1): Ditto.
10007 (switch_to_process): New.
10008 (disable_thread_event_reporting): Use it.
10009 (remove_thread_event_breakpoints): New.
10010 (thread_db_detach, thread_db_mourn): Use it.
10011
1e7fc18c
PA
100122010-05-01 Pedro Alves <pedro@codesourcery.com>
10013
10014 * linux-low.c (linux_enable_event_reporting): New.
10015 (linux_wait_for_event_1, handle_extended_wait): Use it.
10016
02fc4de7
PA
100172010-04-30 Pedro Alves <pedro@codesourcery.com>
10018
10019 * linux-low.c (linux_kill_one_lwp, linux_kill)
10020 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10021 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10022 SIGSTOP even if the LWP is stopped.
10023 (send_sigstop_callback): New.
10024 (stop_all_lwps): Use send_sigstop_callback instead.
10025 (linux_resume_one_thread): Adjust.
10026 (proceed_one_lwp): Still proceed an LWP that the client has
10027 requested to stop, if we haven't reported it as stopped yet. Make
10028 sure that LWPs the client want stopped, have a pending SIGSTOP.
10029
bc3b5632
DE
100302010-04-26 Doug Evans <dje@google.com>
10031
ae1ada35
DE
10032 * server.c (handle_general_set): Make static.
10033
bc3b5632
DE
10034 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10035 Print received char after testing for error/eof instead of before.
10036 (input_interrupt): Tweak comment.
10037
65730243
DE
100382010-04-23 Doug Evans <dje@google.com>
10039
10040 * server.c (start_inferior): Print inferior argv if --debug.
10041
a8ae7dc0
AR
100422010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10043
10044 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10045 * nto-x86-low.c: Include server.h
10046
1c07cc19
PM
100472010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10048
10049 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10050 be consistent with other sources of this directory.
10051 (init_registers_amd64): Correct name of source file of this function
10052 in the comment.
10053
e0a61e09
PM
100542010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10055
10056 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10057 64-bit executables.
10058
54709339
PM
100592010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10060
10061 * win32-i386-low.c: Add 64-bit support.
10062 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10063 (init_registers_amd64): Declare.
10064 (mappings): Add 64-bit version of array.
10065 (init_windows_x86): New function.
10066 (the_low_target): Change init_arch field to init_windows_x86.
10067
e8f0053d
PM
100682010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10069
10070 * win32-low.c: Adapt to support also 64-bit architecture.
10071 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10072 (get_image_name): Use SIZE_T type for local variable `done'.
10073 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10074 (toolhelp_get_dll_name): Idem.
10075 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10076 Use uintptr_t typecast to avoid warning.
10077 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10078 (handle_exception): Use phex_nz to avoid warning.
10079 (win32_wait): Remove unused local variable `process'.
10080
c481e77e
PM
100812010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10082
10083 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10084 `amd64-avx.o'.
10085
12ea4b69
PM
100862010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10087
10088 * configure.ac: Use `ws2_32' library for srv_mingw.
10089 * configure: Regenerate.
10090 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10091 * remote-utils.c: Likewise.
10092
f6d1620c
L
100932010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10094
10095 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10096 if __x86_64__ is defined.
10097
8e642873
PM
100982010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10099
10100 * configure: Regenerate.
10101
711e434b
PM
101022010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10103
10104 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10105 * target.h (target_ops): New get_tib_address field.
10106 * win32-low.h (win32_thread_info): Add thread_local_base field.
10107 * win32-low.c (child_add_thread): Add tlb argument.
10108 Set thread_local_base field to TLB.
10109 (get_child_debug_event): Adapt to child_add_thread change.
10110 (win32_get_tib_address): New function.
10111 (win32_target_ops): Set get_tib_address field to
10112 win32_get_tib_address.
10113 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10114
505106cd
PA
101152010-04-12 Pedro Alves <pedro@codesourcery.com>
10116
505106cd
PA
10117 * linux-low.c (linux_mourn): Also remove the process.
10118 * server.c (handle_target_event): Don't remove the process here.
10119 * nto-low.c (nto_mourn): New.
10120 (nto_target_ops): Install it.
10121 * spu-low.c (spu_mourn): New.
10122 (spu_target_ops): Install it.
10123 * win32-low.c (win32_mourn): New.
10124 (win32_target_ops): Install it.
10125
e8470a06
PA
101262010-04-12 Pedro Alves <pedro@codesourcery.com>
10127
10128 * server.h (buffer_xml_printf): Remove redundant `;'.
10129
45ba0d02
PA
101302010-04-12 Pedro Alves <pedro@codesourcery.com>
10131
10132 * regcache.c (set_register_cache): Invalidate regcaches before
10133 changing the register cache layout.
10134 (regcache_invalidate_one): Allow a NULL regcache.
10135 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10136 regcaches before changing the register cache layout or the target
10137 regsets.
10138
59e04013
L
101392010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10140
10141 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10142 variable warning on Linux/x86-64.
10143
8336d594
PA
101442010-04-11 Pedro Alves <pedro@codesourcery.com>
10145
10146 GDBserver disconnected tracing support.
10147
10148 * linux-low.c (linux_remove_process): Delete.
10149 (add_lwp): Don't set last_resume_kind here.
10150 (linux_kill): Use `mourn'.
10151 (linux_detach): Use `thread_db_detach', and `mourn'.
10152 (linux_mourn): New.
10153 (linux_attach_lwp_1): Adjust comment.
10154 (linux_attach): last_resume_kind moved the thread_info; adjust.
10155 (status_pending_p_callback): Adjust.
10156 (linux_wait_for_event_1): Adjust.
10157 (count_events_callback, select_singlestep_lwp_callback)
10158 (select_event_lwp_callback, cancel_breakpoints_callback)
10159 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10160 (proceed_one_lwp): Adjust.
10161 (linux_async): Add debug output.
10162 (linux_thread_stopped): New.
10163 (linux_pause_all): New.
10164 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10165 linux_pause_all.
10166 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10167 (thread_db_free): Delete declaration.
10168 (thread_db_detach, thread_db_mourn): Declare.
10169 * thread-db.c (thread_db_init): Use thread_db_mourn.
10170 (thread_db_free): Delete, split in two.
10171 (disable_thread_event_reporting): New.
10172 (thread_db_detach): New.
10173 (thread_db_mourn): New.
10174
10175 * server.h (struct thread_info) <last_resume_kind>: New field.
10176 <attached>: Add comment.
10177 <gdb_detached>: New field.
10178 (handler_func): Change return type to int.
10179 (handle_serial_event, handle_target_event): Ditto.
10180 (gdb_connected): Declare.
10181 (tracing): Delete.
10182 (disconnected_tracing): Declare.
10183 (stop_tracing): Declare.
10184
10185 * server.c (handle_query) <qSupported>: Report support for
10186 disconnected tracing.
10187 (queue_stop_reply_callback): Account for running threads.
10188 (gdb_wants_thread_stopped): New.
10189 (gdb_wants_all_threads_stopped): New.
10190 (gdb_reattached_process): New.
10191 (handle_status): Clear the `gdb_detached' flag of all processes.
10192 In all-stop, stop all threads.
10193 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10194 (process_serial_event): If the remote connection breaks, or if an
10195 exit was forced with "monitor exit", force an event loop exit.
10196 Handle disconnected tracing on detach.
10197 (handle_serial_event): Adjust.
10198 (handle_target_event): If GDB isn't connected, forward events back
10199 to the inferior, unless the last process exited, in which case,
10200 exit gdbserver. Adjust interface.
10201
10202 * remote-utils.c (remote_open): Don't block in accept. Instead
10203 register an event loop source on the listen socket file
10204 descriptor. Refactor bits into ...
10205 (listen_desc): ... this new global.
10206 (gdb_connected): ... this new function.
10207 (enable_async_notification): ... this new function.
10208 (handle_accept_event): ... this new function.
10209 (remote_close): Clear remote_desc.
10210
10211 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10212
10213 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10214 New fields.
10215 (mourn_inferior): Define.
10216 (target_process_qsupported): Avoid the dangling else problem.
10217 (thread_stopped): Define.
10218 (pause_all): Define.
10219 (target_waitstatus_to_string): Declare.
10220 * target.c (target_waitstatus_to_string): New.
10221
10222 * tracepoint.c (tracing): Make extern.
10223 (disconnected_tracing): New.
10224 (stop_tracing): Make extern. Handle tracing stops due to GDB
10225 disconnecting.
10226 (cmd_qtdisconnected): New.
10227 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10228 (handle_tracepoint_general_set): Handle QTDisconnected.
10229
10230 * event-loop.c (event_handler_func): Change return type to int.
10231 (process_event): Bail out if the event handler wants the event
10232 loop to stop.
10233 (handle_file_event): Ditto.
10234 (start_event_loop): Bail out if the event handler wants the event
10235 loop to stop.
10236
10237 * nto-low.c (nto_target_ops): Adjust.
10238 * spu-low.c (spu_wait): Don't remove the process here.
10239 (spu_target_ops): Adjust.
10240 * win32-low.c (win32_wait): Don't remove the process here.
10241 (win32_target_ops): Adjust.
10242
5d267c4c
PA
102432010-04-11 Pedro Alves <pedro@codesourcery.com>
10244
10245 * regcache.c (realloc_register_cache): Invalidate inferior's
10246 regcache before recreating it.
10247
623ccd72
PA
102482010-04-09 Pedro Alves <pedro@codesourcery.com>
10249
10250 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10251
219f2f23
PA
102522010-04-09 Stan Shebs <stan@codesourcery.com>
10253 Pedro Alves <pedro@codesourcery.com>
10254
10255 * server.h (LONGEST): New.
10256 (struct thread_info) <while_stepping>: New field.
10257 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10258 Declare.
10259 (initialize_tracepoint, handle_tracepoint_general_set)
10260 (handle_tracepoint_query, tracepoint_finished_step)
10261 (tracepoint_was_hit, release_while_stepping_state_list):
10262 (current_traceframe): Declare.
10263 * server.c (handle_general_set): Handle tracepoint packets.
10264 (read_memory): New.
10265 (write_memory): New.
10266 (handle_search_memory_1): Use read_memory.
10267 (handle_query): Report support for conditional tracepoints, trace
10268 state variables, and tracepoint sources. Handle tracepoint
10269 queries.
10270 (main): Initialize the tracepoints module.
10271 (process_serial_event): Handle traceframe reads/writes.
10272
10273 * linux-low.c (handle_tracepoints): New.
10274 (linux_wait_1): Call it.
10275 (linux_resume_one_lwp): Handle while-stepping.
10276 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10277 (linux_target_ops): Install them.
10278 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10279 New field.
10280 * linux-x86-low.c (x86_supports_tracepoints): New.
10281 (the_low_target). Install it.
10282
10283 * mem-break.h (delete_breakpoint): Declare.
10284 * mem-break.c (delete_breakpoint): Make external.
10285
10286 * target.h (struct target_ops): Add `supports_tracepoints',
10287 `read_pc', and `write_pc' fields.
10288 (target_supports_tracepoints): Define.
10289 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10290 (phex_nz): New.
10291
10292 * regcache.h (struct regcache) <registers_owned>: New field.
10293 (init_register_cache, regcache_cpy): Declare.
10294 (regcache_read_pc, regcache_write_pc): Declare.
10295 (register_cache_size): Declare.
10296 (supply_regblock): Declare.
10297 * regcache.c (init_register_cache): New.
10298 (new_register_cache): Use it.
10299 (regcache_cpy): New.
10300 (register_cache_size): New.
10301 (supply_regblock): New.
10302 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 10303
219f2f23
PA
10304 * tracepoint.c: New.
10305
10306 * Makefile.in (OBS): Add tracepoint.o.
10307 (tracepoint.o): New rule.
10308
3a13a53b
L
103092010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10310
10311 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10312 (i386-mmx.o): New.
10313 (i386-mmx.c): Likewise.
10314 (i386-mmx-linux.o): Likewise.
10315 (i386-mmx-linux.c): Likewise.
10316
10317 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10318 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10319 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10320 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10321
10322 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10323 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10324 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10325
1570b33e
L
103262010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10327
10328 * Makefile.in (clean): Updated.
10329 (i386-avx.o): New.
10330 (i386-avx.c): Likewise.
10331 (i386-avx-linux.o): Likewise.
10332 (i386-avx-linux.c): Likewise.
10333 (amd64-avx.o): Likewise.
10334 (amd64-avx.c): Likewise.
10335 (amd64-avx-linux.o): Likewise.
10336 (amd64-avx-linux.c): Likewise.
10337
10338 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10339 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10340 (srv_amd64_regobj): Add amd64-avx.o.
10341 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10342 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10343 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10344 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10345 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10346 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10347 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10348
10349 * i387-fp.c: Include "i386-xstate.h".
10350 (i387_xsave): New.
10351 (i387_cache_to_xsave): Likewise.
10352 (i387_xsave_to_cache): Likewise.
10353 (x86_xcr0): Likewise.
10354
10355 * i387-fp.h (i387_cache_to_xsave): Likewise.
10356 (i387_xsave_to_cache): Likewise.
10357 (x86_xcr0): Likewise.
10358
10359 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10360 * linux-crisv32-low.c (target_regsets): Likewise.
10361 * linux-m68k-low.c (target_regsets): Likewise.
10362 * linux-mips-low.c (target_regsets): Likewise.
10363 * linux-ppc-low.c (target_regsets): Likewise.
10364 * linux-s390-low.c (target_regsets): Likewise.
10365 * linux-sh-low.c (target_regsets): Likewise.
10366 * linux-sparc-low.c (target_regsets): Likewise.
10367 * linux-xtensa-low.c (target_regsets): Likewise.
10368
10369 * linux-low.c: Include <sys/uio.h>.
10370 (regsets_fetch_inferior_registers): Support nt_type.
10371 (regsets_store_inferior_registers): Likewise.
10372 (linux_process_qsupported): New.
10373 (linux_target_ops): Add linux_process_qsupported.
10374
10375 * linux-low.h (regset_info): Add nt_type.
10376 (linux_target_ops): Add process_qsupported.
10377
10378 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10379 and <sys/uio.h>.
10380 (init_registers_i386_avx_linux): New.
10381 (init_registers_amd64_avx_linux): Likewise.
10382 (xmltarget_i386_linux_no_xml): Likewise.
10383 (xmltarget_amd64_linux_no_xml): Likewise.
10384 (PTRACE_GETREGSET): Likewise.
10385 (PTRACE_SETREGSET): Likewise.
10386 (x86_fill_xstateregset): Likewise.
10387 (x86_store_xstateregset): Likewise.
10388 (use_xml): Likewise.
10389 (x86_linux_update_xmltarget): Likewise.
10390 (x86_linux_process_qsupported): Likewise.
10391 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10392 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10393 init_registers_i386_linux here. Call
10394 x86_linux_update_xmltarget.
10395 (the_low_target): Add x86_linux_process_qsupported.
10396
10397 * server.c (handle_query): Call target_process_qsupported.
10398
10399 * target.h (target_ops): Add process_qsupported.
10400 (target_process_qsupported): New.
10401
fc7238bb
PA
104022010-04-03 Pedro Alves <pedro@codesourcery.com>
10403
10404 * inferiors.c (add_thread): Set last_status kind to
10405 TARGET_WAITKIND_IGNORE.
10406 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10407 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10408 (linux_wait_1): Move `thread' local definition to block that uses
10409 it. Don't NULL initialize `event_child'.
10410 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10411 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10412 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10413
bdabb078
PA
104142010-04-01 Pedro Alves <pedro@codesourcery.com>
10415
10416 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10417 an extended waitstatus, or by a watchpoint.
10418 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10419 thread was stepping or has been stopped by a watchpoint.
10420
d3bbe7a0
PA
104212010-04-01 Pedro Alves <pedro@codesourcery.com>
10422
10423 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10424 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10425 of another, then delete the previous, and validate all
10426 breakpoints.
10427 (validate_inserted_breakpoint): New.
10428 (delete_disabled_breakpoints): New.
10429 (validate_breakpoints): New.
10430 (check_mem_read): Validate breakpoints before trusting their
10431 shadow. Delete disabled breakpoints.
10432 (check_mem_write): Validate breakpoints before trusting they
10433 should be inserted. Delete disabled breakpoints.
10434 * mem-break.h (validate_breakpoints):
10435 * server.c (handle_query): Validate breakpoints when we see a
10436 qSymbol query.
10437
8b07ae33
PA
104382010-04-01 Pedro Alves <pedro@codesourcery.com>
10439
10440 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10441 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10442 if we could tell there's a GDB breakpoint at stop_pc.
10443 (need_step_over_p): Don't do a step over if we find a GDB
10444 breakpoint at the resume PC.
10445
10446 * mem-break.c (struct raw_breakpoint): New.
10447 (enum bkpt_type): New type `gdb_breakpoint'.
10448 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10449 fields. New field `raw'.
10450 (find_raw_breakpoint_at): New.
10451 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10452 breakpoint instead.
10453 (set_breakpoint_at): Adjust.
10454 (delete_raw_breakpoint): New.
10455 (release_breakpoint): New.
10456 (delete_breakpoint): Rename to...
10457 (delete_breakpoint_1): ... this. Add proc parameter. Use
10458 release_breakpoint. Return ENOENT.
10459 (delete_breakpoint): Reimplement.
10460 (find_breakpoint_at): Delete.
10461 (find_gdb_breakpoint_at): New.
10462 (delete_breakpoint_at): Delete.
10463 (set_gdb_breakpoint_at): New.
10464 (delete_gdb_breakpoint_at): New.
10465 (gdb_breakpoint_here): New.
10466 (set_reinsert_breakpoint): Use release_breakpoint.
10467 (uninsert_breakpoint): Rename to ...
10468 (uninsert_raw_breakpoint): ... this.
10469 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10470 (reinsert_raw_breakpoint): Change parameter type to
10471 raw_breakpoint.
10472 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10473 instead.
10474 (check_breakpoints): Adjust. Use release_breakpoint.
10475 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10476 (breakpoint_inserted_here): Ditto.
10477 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10478 Don't trust the breakpoint's shadow if it is not inserted.
10479 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10480 (delete_all_breakpoints): Adjust.
10481 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10482 use delete_breakpoint_1.
10483
10484 * mem-break.h (breakpoints_supported): Delete declaration.
10485 (set_gdb_breakpoint_at): Declare.
10486 (gdb_breakpoint_here): Declare.
10487 (delete_breakpoint_at): Delete.
10488 (delete_gdb_breakpoint_at): Declare.
10489
10490 * server.h (struct raw_breakpoint): Forward declare.
10491 (struct process_info): New field `raw_breakpoints'.
10492
10493 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10494 breakpoints.
10495
6bf5e0ba
PA
104962010-03-24 Pedro Alves <pedro@codesourcery.com>
10497
10498 * linux-low.c (status_pending_p_callback): Fix comment.
10499 (linux_wait_for_event_1): Move most of the internal breakpoint
10500 handling from here...
10501 (linux_wait_1): ... to here.
10502 (count_events_callback): New.
10503 (select_singlestep_lwp_callback): New.
10504 (select_event_lwp_callback): New.
10505 (cancel_breakpoints_callback): New.
10506 (select_event_lwp): New.
10507 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10508 priority to all LWPs that have had events that should be reported
10509 to the client. Cancel breakpoints when about to reporting the
10510 event to the client, not while stopping lwps. No longer cancel
10511 finished single-steps here.
10512 (cancel_finished_single_step): Delete.
10513 (cancel_finished_single_steps): Delete.
10514
414a389f
PA
105152010-03-24 Pedro Alves <pedro@codesourcery.com>
10516
10517 * mem-break.c (enum bkpt_type): New.
10518 (struct breakpoint): New field `type'.
10519 (set_breakpoint_at): Change return type to struct breakpoint
10520 pointer. Set type to `other_breakpoint' by default.
10521 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10522 in the breakpoint list.
10523 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10524 (reinsert_breakpoint): Rename to ...
10525 (reinsert_raw_breakpoint): ... this.
10526 (reinsert_breakpoints_at): Adjust.
10527 * mem-break.h (struct breakpoint): Declare.
10528 (set_breakpoint_at): Change return type to struct breakpoint
10529 pointer.
10530
2280c721
PA
105312010-03-24 Pedro Alves <pedro@codesourcery.com>
10532
10533 * server.c (handle_query): Assign, not compare.
10534
d50171e4
PA
105352010-03-24 Pedro Alves <pedro@codesourcery.com>
10536
10537 Teach linux gdbserver to step-over-breakpoints.
10538
10539 * linux-low.c (can_hardware_single_step): New.
10540 (supports_breakpoints): New.
10541 (handle_extended_wait): If stopping threads, read the stop pc of
10542 the new cloned LWP.
10543 (get_pc): New.
10544 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10545 low target doesn't support retrieving the PC.
10546 (add_lwp): Set last_resume_kind to resume_continue.
10547 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10548 (linux_attach): Don't clear stop_expected. Set the lwp's
10549 last_resume_kind to resume_stop.
10550 (linux_detach_one_lwp): Don't check for removed breakpoints.
10551 (check_removed_breakpoint): Delete.
10552 (status_pending_p): Rename to ...
10553 (status_pending_p_callback): ... this. Don't check for removed
10554 breakpoints. Don't consider threads that are stopped from GDB's
10555 perspective.
10556 (linux_wait_for_lwp): Always read the stop_pc here.
10557 (cancel_breakpoint): New.
10558 (step_over_bkpt): New global.
10559 (linux_wait_for_event_1): Implement stepping over breakpoints.
10560 (gdb_wants_lwp_stopped): New.
10561 (gdb_wants_all_stopped): New.
10562 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10563 single-step traps here. Store the thread's last reported target
10564 wait status.
10565 (send_sigstop): Don't clear stop_expected. Always set it,
10566 instead.
10567 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10568 (cancel_finished_single_step): New.
10569 (cancel_finished_single_steps): New.
10570 (wait_for_sigstop): Don't cancel finished single-step traps here.
10571 (linux_resume_one_lwp): Don't check for removed breakpoints.
10572 Don't set `step' on non-hardware step archs.
10573 (linux_set_resume_request): Ignore resume_stop requests if already
10574 stopping or stopped. Set the lwp's last_resume_kind.
10575 (resume_status_pending_p): Don't check for removed breakpoints.
10576 (need_step_over_p): New.
10577 (start_step_over): New.
10578 (finish_step_over): New.
10579 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10580 requests. Clear the thread's last reported target waitstatus.
10581 Don't use the `suspended' flag. Don't consider pending breakpoints.
10582 (linux_resume): Start a step-over if necessary.
10583 (proceed_one_lwp): New.
10584 (proceed_all_lwps): New.
10585 (unstop_all_lwps): New.
10586 * linux-low.h (struct lwp_info): Rewrite comment for the
10587 `suspended' flag. Add the `stop_pc' field. Delete the
10588 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10589 Add `'last_resume_kind' and `need_step_over' fields.
10590 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10591 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10592 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10593 (set_raw_breakpoint_at): New.
10594 (set_breakpoint_at): Rewrite to use it.
10595 (reinsert_breakpoint_handler): Delete.
10596 (set_reinsert_breakpoint): New.
10597 (reinsert_breakpoint_by_bp): Delete.
10598 (delete_reinsert_breakpoints): New.
10599 (uninsert_breakpoint): Rewrite.
10600 (uninsert_breakpoints_at): New.
10601 (reinsert_breakpoint): Rewrite.
10602 (reinsert_breakpoints_at): New.
10603 (check_breakpoints): Rewrite.
10604 (breakpoint_here): New.
10605 (breakpoint_inserted_here): New.
10606 (check_mem_read): Adjust.
10607 * mem-break.h (breakpoints_supported, breakpoint_here)
10608 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10609 (reinsert_breakpoint_by_bp): Delete declaration.
10610 (delete_reinsert_breakpoints): Declare.
10611 (reinsert_breakpoint): Delete declaration.
10612 (reinsert_breakpoints_at): Declare.
10613 (uninsert_breakpoint): Delete declaration.
10614 (uninsert_breakpoints_at): Declare.
10615 (check_breakpoints): Adjust prototype.
10616 * server.h: Adjust include order.
10617 (struct thread_info): Declare here. Add a `last_status' field.
10618
30ba68cb
MS
106192010-03-23 Michael Snyder <msnyder@vmware.com>
10620
10621 * server.c (crc32): New function.
10622 (handle_query): Add handling for 'qCRC:' request.
10623
b9a881c2
PA
106242010-03-23 Pedro Alves <pedro@codesourcery.com>
10625
10626 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10627 lwp had been stopped by a watchpoint.
10628
e92d13d5
PA
106292010-03-16 Pedro Alves <pedro@codesourcery.com>
10630
10631 * server.h (internal_error): Declare.
10632 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10633 * utils.c (internal_error): New function.
10634
64daa791
AS
106352010-03-15 Andreas Schwab <schwab@redhat.com>
10636
10637 * configure.srv: Fix typo setting srv_regobj.
10638
f52cd8cd
PA
106392010-03-15 Pedro Alves <pedro@codesourcery.com>
10640
10641 * linux-low.c (fetch_register): Avoid passing a non string literal
10642 format to `error'.
10643 (usr_store_inferior_registers): Ditto.
10644
93ae6fdc
PA
106452010-03-14 Pedro Alves <pedro@codesourcery.com>
10646
10647 * linux-low.c (linux_write_memory): Bail out early if peeking
10648 memory failed.
10649
c3adc08c
PA
106502010-03-14 Pedro Alves <pedro@codesourcery.com>
10651
10652 * linux-low.h (struct lwp_info): New fields
10653 `stopped_by_watchpoint' and `stopped_data_address'.
10654 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10655 here, and cache them in the lwp object.
10656 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10657 directly.
10658 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10659 field.
10660 (linux_stopped_by_watchpoint): Rewrite.
10661 (linux_stopped_data_address): Rewrite.
10662
bce522a2
PA
106632010-03-06 Simo Melenius <simo.melenius@iki.fi>
10664
10665 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10666 switching the current inferior, not before.
10667
90884b2b
L
106682010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10669
10670 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10671 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10672 i386-linux.c and amd64-linux.c.
10673 (reg-i386.o): Removed.
10674 (reg-i386.c): Likewise.
10675 (reg-i386-linux.o): Likewise.
10676 (reg-i386-linux.c): Likewise.
10677 (reg-x86-64.o): Likewise.
10678 (reg-x86-64.c): Likewise.
10679 (reg-x86-64-linux.o): Likewise.
10680 (reg-x86-64-linux.c): Likewise.
10681 (i386.o): New.
10682 (i386.c): Likewise.
10683 (i386-linux.o): Likewise.
10684 (i386-linux.c): Likewise.
10685 (amd64.o): Likewise.
10686 (amd64.c): Likewise.
10687 (amd64-linux.o): Likewise.
10688 (amd64-linux.c): Likewise.
10689
10690 * configure.srv (srv_i386_regobj): New.
10691 (srv_i386_linux_regobj): Likewise.
10692 (srv_amd64_regobj): Likewise.
10693 (srv_amd64_linux_regobj): Likewise.
10694 (srv_i386_32bit_xmlfiles): Likewise.
10695 (srv_i386_64bit_xmlfiles): Likewise.
10696 (srv_i386_xmlfiles): Likewise.
10697 (srv_amd64_xmlfiles): Likewise.
10698 (srv_i386_linux_xmlfiles): Likewise.
10699 (srv_amd64_linux_xmlfiles): Likewise.
10700 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10701 srv_xmlfiles to $srv_i386_xmlfiles.
10702 (i[34567]86-*-mingw32ce*): Likewise.
10703 (i[34567]86-*-mingw*): Likewise.
10704 (i[34567]86-*-nto*): Likewise.
10705 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10706 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10707 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10708 (x86_64-*-linux*): Likewise.
10709
10710 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10711 (init_registers_amd64_linux): New.
10712 (x86_arch_setup): Replace init_registers_x86_64_linux with
10713 init_registers_amd64_linux.
10714
193f13e6
MK
107152010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10716
10717 * configure.ac: Check for libdl. If it is not available link against
10718 static libthread_db.
10719 * configure: Regenerate.
10720
85d721b8
PA
107212010-02-22 Pedro Alves <pedro@codesourcery.com>
10722
10723 PR9605
10724
10725 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10726 handing a read watchpoint.
10727 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10728
6076632b
DE
107292010-02-12 Doug Evans <dje@google.com>
10730
10731 * linux-low.c (linux_supports_tracefork_flag): Document.
10732 (linux_look_up_symbols): Add comment.
10733
3327ccf7
L
107342010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10735
10736 * regcache.c (supply_register): Clear regcache if buf is NULL.
10737
0718675c 107382010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 10739 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
10740
10741 * inferiors.c (find_inferior): Add function documentation.
10742 (unloaded_dll): Handle the case where the unloaded dll has not
10743 been previously registered in the dll list.
10744
177321bd
DJ
107452010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10746
10747 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10748 (thumb2_breakpoint): New.
10749 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10750
2b009048
DJ
107512010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10752
10753 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10754 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10755 breakpoints.
10756
3be029c7
PA
107572010-01-21 Pedro Alves <pedro@codesourcery.com>
10758
10759 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10760
18f5de3b
JK
107612010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10762
10763 * linux-s390-low.c (s390_collect_ptrace_register)
10764 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10765
3743bb4f
DE
107662010-01-21 Doug Evans <dje@google.com>
10767
14ce3065
DE
10768 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10769 (PTRACE_ARG4_TYPE): New macro.
10770 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10771 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10772 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10773 (usr_store_inferior_registers): Ditto.
10774 (linux_read_memory, linux_write_memory): Ditto.
10775 (linux_test_for_tracefork): Ditto.
10776
3743bb4f
DE
10777 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10778 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10779
8b315be5
PA
107802010-01-21 Pedro Alves <pedro@codesourcery.com>
10781
10782 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10783 target.
10784
85492558
PA
107852010-01-21 Pedro Alves <pedro@codesourcery.com>
10786
10787 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10788 prototype to take a regcache. Adjust.
10789
442ea881
PA
107902010-01-20 Pedro Alves <pedro@codesourcery.com>
10791
10792 * regcache.h (struct thread_info): Forward declare.
10793 (struct regcache): New.
10794 (new_register_cache): Adjust prototype.
10795 (get_thread_regcache): Declare.
10796 (free_register_cache): Adjust prototype.
10797 (registers_to_string, registers_from_string): Ditto.
10798 (supply_register, supply_register_by_name, collect_register)
10799 (collect_register_as_string, collect_register_by_name): Ditto.
10800 * regcache.c (struct inferior_regcache_data): Delete.
10801 (get_regcache): Rename to ...
10802 (get_thread_regcache): ... this. Adjust. Switch inferior before
10803 fetching registers.
10804 (regcache_invalidate_one): Adjust.
10805 (regcache_invalidate): Fix prototype.
10806 (new_register_cache): Return the new register cache.
10807 (free_register_cache): Change prototype.
10808 (realloc_register_cache): Adjust.
10809 (registers_to_string): Change prototype to take a regcache. Adjust.
10810 (registers_from_string): Ditto.
10811 (register_data): Ditto.
10812 (supply_register): Ditto.
10813 (supply_register_by_name): Ditto.
10814 (collect_register): Ditto.
10815 (collect_register_as_string): Ditto.
10816 (collect_register_by_name): Ditto.
10817 * server.c (process_serial_event): Adjust.
10818 * linux-low.h (regset_fill_func, regset_store_func): Change
10819 prototype.
10820 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10821 Change prototype.
10822 * linux-low.c (get_stop_pc): Adjust.
10823 (check_removed_breakpoint): Adjust.
10824 (linux_wait_for_event): Adjust.
10825 (linux_resume_one_lwp): Adjust.
10826 (fetch_register): Add regcache parameter. Adjust.
10827 (usr_store_inferior_registers): Ditto.
10828 (regsets_fetch_inferior_registers): Ditto.
10829 (regsets_store_inferior_registers): Ditto.
10830 (linux_fetch_registers, linux_store_registers): Ditto.
10831 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10832 regcache. Adjust.
43aaf8b6
PA
10833 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10834 Ditto.
442ea881
PA
10835 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10836 prototype to take a regcache.
10837 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10838 * remote-utils.c (convert_ascii_to_int, outreg)
10839 (prepare_resume_reply): Change prototype to take a regcache.
10840 Adjust.
10841 * target.h (struct target_ops) <fetch_registers, store_registers>:
10842 Change prototype to take a regcache.
10843 (fetch_inferior_registers, store_inferior_registers): Change
10844 prototype to take a regcache. Adjust.
10845 * proc-service.c (ps_lgetregs): Adjust.
10846 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10847 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10848 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10849 take a regcache. Adjust.
10850 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10851 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10852 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10853 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10854 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10855 (cris_cannot_fetch_register):
10856 (cris_breakpoint_at): Change prototype to take a regcache.
10857 Adjust.
10858 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10859 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10860 to take a regcache. Adjust.
10861 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10862 Adjust.
10863 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10864 take a regcache. Adjust.
10865 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10866 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10867 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10868 * linux-mips-low.c (mips_get_pc):
10869 (mips_set_pc): Change prototype to take a regcache. Adjust.
10870 (mips_reinsert_addr): Adjust.
10871 (mips_collect_register): Change prototype to take a regcache.
10872 Adjust.
10873 (mips_supply_register):
10874 (mips_collect_register_32bit, mips_supply_register_32bit)
10875 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10876 (mips_store_fpregset): Ditto.
43aaf8b6
PA
10877 * linux-ppc-low.c (ppc_supply_ptrace_register)
10878 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
10879 (parse_spufs_run): Adjust.
10880 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10881 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10882 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10883 take a regcache. Adjust.
10884 * linux-s390-low.c (s390_collect_ptrace_register)
10885 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10886 (s390_set_pc): Change prototype to take a regcache. Adjust.
10887 (s390_arch_setup): Adjust.
10888 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10889 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10890 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10891 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10892 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10893 regcache. Adjust.
10894 (sparc_breakpoint_at): Adjust.
10895 * linux-xtensa-low.c (xtensa_fill_gregset):
10896 (xtensa_store_gregset):
10897 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10898 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10899 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10900 prototype to take a regcache. Adjust.
10901 * win32-arm-low.c (arm_fetch_inferior_register)
10902 (arm_store_inferior_register): Change prototype to take a
10903 regcache. Adjust.
10904 * win32-i386-low.c (i386_fetch_inferior_register)
10905 (i386_store_inferior_register): Change prototype to take a
10906 regcache. Adjust.
10907 * win32-low.c (child_fetch_inferior_registers)
10908 (child_store_inferior_registers): Change prototype to take a
10909 regcache. Adjust.
10910 (win32_wait): Adjust.
10911 (win32_fetch_inferior_registers): Change prototype to take a
10912 regcache. Adjust.
10913 (win32_store_inferior_registers): Adjust.
10914 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10915 store_inferior_register>: Change prototype to take a regcache.
10916
60c3d7b0
DE
109172010-01-20 Doug Evans <dje@google.com>
10918
10919 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10920 #ifdef.
10921 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 10922 (W_STOPCODE): Provide definition if missing.
60c3d7b0 10923
dc146f7c
VP
109242010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10925
10926 * linux-low.c (linux_core_of_thread): New.
10927 (compare_ints, show_process, list_threads): New.
10928 (linux_qxfer_osdata): Report threads and cores.
10929 (linux_target_op): Register linux_core_of_thread.
10930 * remote-utils.c (prepare_resume_reply): Report the core.
10931 (buffer_xml_printf): Support %d specifier.
10932 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10933 New.
10934 (handle_query): Handle qXfer:threads. Announce availability
10935 thereof.
10936 * target.h (struct target_ops): New field core_of_thread.
10937
7803799a
UW
109382010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10939
10940 * Makefile.in (clean): Remove new generated files.
10941 (reg-s390.o, reg-s390.c): Remove rules.
10942 (reg-s390x.o, reg-s390x.c): Likewise.
10943 (s390-linux32.o, s390-linux32.c): Add rules.
10944 (s390-linux64.o, s390-linux64.c): Likewise.
10945 (s390x-linux64.o, s390x-linux64.c): Likewise.
10946 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10947 * linux-s390-low.c: Include <elf.h>.
10948 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10949 (init_registers_s390): Remove prototype.
10950 (init_registers_s390x): Likewise.
10951 (init_registers_s390_linux32): Add prototype.
10952 (init_registers_s390_linux64): Likewise.
10953 (init_registers_s390x_linux64): Likewise.
10954 (s390_num_regs_3264): New define.
10955 (s390_regmap_3264): New global variable.
10956 (s390_cannot_fetch_register): Remove obsolete check.
10957 (s390_cannot_store_register): Likewise.
10958 (s390_collect_ptrace_register): Handle upper/lower register halves.
10959 (s390_supply_ptrace_register): Likewise.
10960 (s390_fill_gregset): Update to register number changes.
10961 (s390_get_hwcap): New routine.
10962 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10963 Install appropriate regmap and register set.
10964
6e7ffa39
JB
109652010-01-01 Joel Brobecker <brobecker@adacore.com>
10966
10967 * server.c (gdbserver_version): Update copyright year to 2010.
10968 * gdbreplay.c (gdbreplay_version): Likewise.
10969
957f3f49
DE
109702009-12-28 Doug Evans <dje@google.com>
10971
10972 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10973 elf/external.h. Include <elf.h> instead but only if necessary.
10974
ca5c370d
PA
109752009-12-28 Pedro Alves <pedro@codesourcery.com>
10976
10977 * linux-low.c (linux_remove_process): Remove `detaching'
10978 parameter. Don't release/detach from thread_db here.
10979 (linux_kill): Release/detach from thread_db here, ...
10980 (linux_detach): ... and here, before actually detaching.
10981 (linux_wait_1): ... and here, when a process exits.
10982 * thread-db.c (any_thread_of): New.
10983 (thread_db_free): Switch the current inferior to a thread of the
10984 passed in process.
10985
4ee62156
DE
109862009-12-21 Doug Evans <dje@google.com>
10987
d90e6a88
DE
10988 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10989
c5f62d5f
DE
10990 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10991 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10992 warning ifndef __NR_tkill. Move setting of errno there too.
10993 Delete unnecessary resetting of errno after syscall.
10994 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10995
10e86dd7
DE
10996 * configure.ac: Check for dladdr.
10997 * config.in: Regenerate.
10998 * configure: Regenerate.
10999 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11000 (try_thread_db_load): Update.
11001
4ee62156
DE
11002 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11003
00f515da
DE
110042009-12-18 Doug Evans <dje@google.com>
11005
e9464885
DE
11006 * event-loop.c: Include unistd.h if it exists.
11007
07d4f67e
DE
11008 * linux-low.c (my_waitpid): Move definition away from being in
11009 between linux_tracefork_child/linux_test_for_tracefork.
11010
00f515da
DE
11011 * gdb_proc_service.h (psaddr_t): Fix type.
11012 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11013 signature to match glibc.
11014
1de1badb
DE
110152009-12-16 Doug Evans <dje@google.com>
11016
11017 * linux-low.c (linux_read_memory): Fix argument to read.
11018
aeeb81d1
PA
110192009-11-26 Pedro Alves <pedro@codesourcery.com>
11020
11021 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11022 events, don't leave current_inferior pointing at null.
11023
10357975
PA
110242009-11-26 Pedro Alves <pedro@codesourcery.com>
11025
11026 * win32-low.c (LOG): Delete.
11027 (OUTMSG): Output to stderr.
11028 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11029 on compile time LOG macro.
11030 (win32_wait): Fix debug output.
11031
cf6e3471
PA
110322009-11-26 Pedro Alves <pedro@codesourcery.com>
11033
11034 * win32-low.c (win32_add_one_solib): If the dll name is
11035 "ntdll.dll", prepend the system directory to the dll path.
11036
0c85e18e
MK
110372009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11038
11039 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11040
9ac544ce 110412009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11042 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11043
11044 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11045 * configure.ac: Check for __mcoldfire__ and set
11046 gdb_cv_m68k_is_coldfire.
11047 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11048 reg-cf.o and reg-m68k.o.
11049 * configure: Regenerated.
11050
fd7dd3e6
PA
110512009-11-16 Pedro Alves <pedro@codesourcery.com>
11052
11053 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11054 Pass it to thread_db_free.
11055 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11056 proper `detaching' argument to linux_remove_process.
11057 * linux-low.h (thread_db_free): Add `detaching' parameter.
11058 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11059 to thread_db_free.
11060 (thread_db_free): Add `detaching' parameter. Only
11061 call td_ta_clear_event if detaching from process.
11062
75aa492e
MK
110632009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11064
11065 * thread-db.c (thread_db_free): Fix typo.
11066
21e1bee4
PP
110672009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11068
11069 PR gdb/10838
11070 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11071
8838b45e
NS
110722009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11073
11074 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11075 with an i686 compiler.
11076 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11077 needed.
11078 * configure: Rebuilt.
11079
8a35fb51
SL
110802009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11081
11082 PR gdb/10783
11083
11084 * server.c (handle_search_memory_1): Correct read_addr initialization
11085 in loop for searching subsequent chunks.
11086
96f15937
PP
110872009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11088
11089 * configure.ac: New --with-libthread-db option.
11090 * thread-db.c: Allow direct dependence on libthread_db.
11091 (thread_db_free): Adjust.
11092 * config.in: Regenerate.
11093 * configure: Likewise.
889bf7c5 11094
5f7d1694
PP
110952009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11096
11097 PR gdb/10757
11098 * thread-db.c (attach_thread): New function.
11099 (maybe_attach_thread): Return success/failure.
11100 (find_new_threads_callback): Adjust.
889bf7c5
PA
11101 (thread_db_find_new_threads): Loop until no new threads.
11102
88e3b899
PA
111032009-10-13 Pedro Alves <pedro@codesourcery.com>
11104
11105 * proc-service.c (ps_lgetregs): Formatting.
11106
cdbfd419
PP
111072009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11108
11109 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11110 * configure.ac: Adjust.
11111 * linux-low.h (struct process_info_private): Move members to struct
11112 thread_db.
11113 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11114 * linux-low.c (linux_remove_process): Adjust.
11115 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11116 * server.c (handle_query): Move code ...
11117 (handle_monitor_command): ... here. New function.
11118 * target.h (struct target_ops): New member.
11119 * thread-db.c (struct thread_db): New.
11120 (libthread_db_search_path): New variable.
11121 (thread_db_create_event, thread_db_enable_reporting)
11122 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11123 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11124 (try_thread_db_load_1, dladdr_to_soname): New functions.
11125 (try_thread_db_load, thread_db_load_search): New functions.
11126 (thread_db_init): Search for libthread_db.
11127 (thread_db_free): New function.
11128 (thread_db_handle_monitor_command): Likewise.
11129 * config.in: Regenerate.
11130 * configure: Regenerate.
889bf7c5 11131
4168d2d6
UW
111322009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11133
11134 * spu-low.c (spu_kill): Wait for inferior to terminate.
11135 Call clear_inferiors.
11136 (spu_detach): Call clear_inferiors.
11137
81ecdfbb
RW
111382009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11139
11140 * aclocal.m4: Regenerate.
11141 * config.in: Likewise.
11142 * configure: Likewise.
11143
0b9ff2c0
UW
111442009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11145
11146 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11147 (parse_spufs_run): New function.
11148 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11149 (ppc_breakpoint_at): Handle SPU breakpoints.
11150
efcbbd14
UW
111512009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11152
11153 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11154 (SPUFS_MAGIC): Define.
11155 (spu_enumerate_spu_ids): New function.
11156 (linux_qxfer_spu): New function.
11157 (linux_target_ops): Install linux_qxfer_spu.
11158
f4d9bade
UW
111592009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11160
11161 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11162 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11163 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11164 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11165 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11166 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11167 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11168 (init_registers_powerpc_cell32l): Add prototype.
11169 (init_registers_powerpc_cell64l): Likewise.
11170 (ppc_arch_setup): Detect Cell/B.E. architecture.
11171
96e946ca
RW
111722009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11173
11174 * Makefile.in (datarootdir): New variable.
11175
58d6951d
DJ
111762009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11177
11178 * linux-low.c (linux_write_memory): Update debugging output.
11179 * Makefile.in (clean): Add new descriptions.
11180 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11181 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11182 * configure.srv: Add new files for arm*-*-linux*.
11183 * linux-arm-low.c: Add new declarations.
11184 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11185 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11186 (HWCAP_VFPv3D16): New.
11187 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11188 instead of __IWMMXT__.
11189 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11190 (arm_arch_setup): New.
11191 (target_regsets): Remove #ifdef. Add VFP regset.
11192 (the_low_target): Use arm_arch_setup.
11193
12b42a12
DJ
111942009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11195
11196 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11197 the main thread again.
11198
ac8c974e
AR
111992009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11200
11201 Adding Neutrino gdbserver.
11202 * configure: Regenerated.
11203 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11204 * configure.srv (i[34567]86-*-nto*): New target.
11205 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11206 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11207 (nto_comctrl) [__QNX__]: New function.
11208 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11209
4424e0c3 112102009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
11211
11212 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11213 srv_tgtobj.
11214
912cf4ba
PA
112152009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11216 Pedro Alves <pedro@codesourcery.com>
11217
11218 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11219 don't support CONTEXT_EXTENDED_REGISTERS.
11220 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11221 (the_low_target): Install them.
11222 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11223 failing with ERROR_PIPE_NOT_CONNECTED.
11224
aa5ca48f
DE
112252009-06-30 Doug Evans <dje@google.com>
11226 Pierre Muller <muller@ics.u-strasbg.fr>
11227
11228 Add h/w watchpoint support to x86-linux, win32-i386.
11229 * Makefile.in (SFILES): Add i386-low.c
11230 (i386_low_h): Define.
11231 (i386-low.o): Add dependencies.
11232 (linux-x86-low.o): Add i386-low.h dependency.
11233 (win32-i386-low.o): Ditto.
11234 * i386-low.c: New file.
11235 * i386-low.h: New file.
11236 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11237 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11238 * linux-low.c (linux_add_process): Initialize arch_private.
11239 (linux_remove_process): Free arch_private.
11240 (add_lwp): Initialize arch_private.
11241 (delete_lwp): Free arch_private.
11242 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11243 provided.
11244 * linux-low.h (process_info_private): New member arch_private.
11245 (lwp_info): New member arch_private.
11246 (linux_target_ops): New members new_process, new_thread,
11247 prepare_to_resume.
11248 (ptid_of): New macro.
11249 * linux-x86-low.c: Include stddef.h, i386-low.h.
11250 (arch_process_info): New struct.
11251 (arch_lwp_info): New struct.
11252 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11253 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11254 (i386_dr_low_get_status): New function.
11255 (x86_insert_point, x86_remove_point): New functions.
11256 (x86_stopped_by_watchpoint): New function.
11257 (x86_stopped_data_address): New function.
11258 (x86_linux_new_process, x86_linux_new_thread): New functions.
11259 (x86_linux_prepare_to_resume): New function.
11260 (the_low_target): Add entries for insert_point, remove_point,
11261 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11262 prepare_to_resume.
11263 * server.c (debug_hw_points): New global.
11264 (monitor_show_help): Document set debug-hw-points.
11265 (handle_query): Process "set debug-hw-points".
11266 * server.h (debug_hw_points): Declare.
11267 (paddress): Declare.
11268 * utils.c (NUMCELLS, CELLSIZE): New macros.
11269 (get_sell, xsnprintf, paddress): New functions.
11270 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11271 remove_point, stopped_by_watchpoint, stopped_data_address.
11272 * win32-i386-low.c: Include i386-low.h.
11273 (debug_reg_state): Replaces dr.
11274 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11275 (i386_dr_low_get_status): New function.
11276 (i386_insert_point, i386_remove_point): New functions.
11277 (i386_stopped_by_watchpoint): New function.
11278 (i386_stopped_data_address): New function.
11279 (i386_initial_stuff): Update.
11280 (get_thread_context,set_thread_context,i386_thread_added): Update.
11281 (the_low_target): Add entries for insert_point,
11282 remove_point, stopped_by_watchpoint, stopped_data_address.
11283 * win32-low.c (win32_insert_watchpoint): New function.
11284 (win32_remove_watchpoint): New function.
11285 (win32_stopped_by_watchpoint): New function.
11286 (win32_stopped_data_address): New function.
11287 (win32_target_ops): Add entries for insert_watchpoint,
11288 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11289 * win32-low.h (win32_target_ops): New members insert_point,
11290 remove_point, stopped_by_watchpoint, stopped_data_address.
11291
d993e290
PA
112922009-06-25 Pedro Alves <pedro@codesourcery.com>
11293
11294 * server.c (process_serial_event): Re-return unsupported, not
11295 error, if the type isn't recognized. Re-allow supporting only
11296 insert or remove packets. Also call require_running for
11297 breakpoints. Add missing break statement to default case. Tidy.
11298 * target.h (struct target_ops): Rename insert_watchpoint to
11299 insert_point, and remove_watchpoint to remove_point.
11300
11301 * linux-low.h (struct linux_target_ops): Likewise.
11302 * linux-low.c (linux_insert_watchpoint): Rename to ...
11303 (linux_insert_point): ... this. Adjust.
11304 (linux_remove_watchpoint): Rename to ...
11305 (linux_remove_point): ... this. Adjust.
11306 (linux_target_ops): Adjust.
11307 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11308 (cris_insert_point): ... this.
11309 (cris_remove_watchpoint): Rename to ...
11310 (cris_remove_point): ... this.
11311 (the_low_target): Adjust.
11312
0f54c268
PM
113132009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11314
11315 * server.c (handle_v_kill): Pass signal_pid to
11316 kill_inferior if multi_process is zero.
11317
c6314022
AR
113182009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11319
11320 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11321 * target.h (target_ops): Comment for *_watchpoint to make it clear
11322 the functions can get types '0' and '1'.
11323
4463ce24
AR
113242009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11325
11326 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11327 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11328 * regcache.c (get_regcache): Likewise.
11329 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11330 * win32-low.c (child_fetch_inferior_registers): Remove check for
11331 regno 0.
11332
cf8fd78b
PA
113332009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11334 Pedro Alves <pedro@codesourcery.com>
11335
11336 * target.h (struct target_ops) <supports_multi_process>: New
11337 callback.
11338 (target_supports_multi_process): New.
11339 * server.c (handle_query): Even if GDB reports support, only
11340 enable multi-process if the target also supports it. Report
11341 multi-process support only if the target backend supports it.
11342 * linux-low.c (linux_supports_multi_process): New function.
11343 (linux_target_ops): Install it as target_supports_multi_process
11344 callback.
11345
47c0c975
DE
113462009-05-24 Doug Evans <dje@google.com>
11347
e09875d4
DE
11348 Global renaming of find_thread_pid to find_thread_ptid.
11349 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11350 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11351 All callers updated.
11352
e27d73f6
DE
11353 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11354 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11355 directly.
11356
47c0c975
DE
11357 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11358 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11359 (linux_resume_one_lwp): Ditto.
11360
2acc282a
DE
113612009-05-23 Doug Evans <dje@google.com>
11362
11363 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11364 from struct inferior_list_entry * to struct lwp_info *.
11365 All callers updated.
11366
9f1036c1
DE
113672009-05-13 Doug Evans <dje@google.com>
11368
11369 * linux-x86-low.c: Don't include assert.h.
11370 (x86_siginfo_fixup): Use fatal, not assert.
11371 (x86_arch_setup): Fix comment.
11372
d0722149
DE
113732009-05-12 Doug Evans <dje@google.com>
11374
11375 Biarch support for i386/amd64 gdbserver.
11376 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11377 Add linux-x86-low.c.
11378 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11379 (linux-x86-low.o): Add.
11380 * linux-x86-64-low.c: Delete.
11381 * linux-i386-low.c: Delete.
11382 * linux-x86-low.c: New file.
11383 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11384 linux-x86-low.o.
11385 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11386 linux-x86-low.o.
11387 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11388 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11389 (linux_child_pid_to_exec_file): New function.
11390 (elf_64_header_p, elf_64_file_p): New functions.
11391 (siginfo_fixup): New function.
11392 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11393 give target a chance to convert layout.
11394 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11395 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11396
fdeb2a12
DE
113972009-05-07 Doug Evans <dje@google.com>
11398
11399 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11400 (regsets_store_inferior_registers): Ditto.
11401
a6dbe5df
PA
114022009-05-06 Pedro Alves <pedro@codesourcery.com>
11403
11404 PR server/10048
11405
11406 * linux-low.c (must_set_ptrace_flags): Delete.
11407 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11408 of the global.
11409 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11410 `lwp->must_set_ptrace_flags' instead.
ba42693b 11411 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
11412 (linux_wait_1): ... not here.
11413
5091eb23
DE
114142009-04-30 Doug Evans <dje@google.com>
11415
9f767825
DE
11416 * inferiors.c (started_inferior_callback): New function.
11417 (attached_inferior_callback): New function.
11418 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11419 * server.c (print_started_pid, print_attached_pid): New functions.
11420 (detach_or_kill_for_exit): New function.
11421 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11422 * server.h (have_started_inferiors_p): Declare.
11423 (have_attached_inferiors_p): Declare.
11424
5091eb23
DE
11425 * inferiors.c (remove_process): Fix memory leak, free process.
11426 * linux-low.c (linux_remove_process): New function.
11427 (linux_kill): Call it instead of remove_process.
11428 (linux_detach, linux_wait_1): Ditto.
11429
155c8968
PA
114302009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11431
11432 * configure.srv: Add x86 Windows CE target.
11433
7fe519cb
UW
114342009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11435
11436 * inferiors.c (get_thread_process): Make global.
11437 * server.h (get_thread_process): Add prototype.
11438 * thread-db.c (find_one_thread): Use get_thread_process
11439 instead of current_process.
11440 (thread_db_get_tls_address): Do not crash if called when
11441 thread layer is not yet initialized.
11442
5472f405
UW
114432009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11444
11445 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11446 * spu-low.c (current_tid): Rename to ...
11447 (current_ptid): ... this.
11448 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11449 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11450 ptid_get_lwp (current_ptid) instead of current_tid.
11451 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11452 instead of current_tid. Use find_process_pid to verify pid
11453 argument is valid. Pass proper argument to remove_process.
11454 (spu_thread_alive): Compare current_ptid instead of current_tid.
11455 (spu_resume): Likewise.
11456
55ac2b99
PA
114572009-04-02 Pedro Alves <pedro@codesourcery.com>
11458
11459 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11460 variable.
11461
95954743
PA
114622009-04-01 Pedro Alves <pedro@codesourcery.com>
11463
11464 Implement the multiprocess extensions, and add linux multiprocess
11465 support.
11466
11467 * server.h (ULONGEST): Declare.
11468 (struct ptid, ptid_t): New.
11469 (minus_one_ptid, null_ptid): Declare.
11470 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11471 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11472 (struct inferior_list_entry): Change `id' type from unsigned from
11473 to ptid_t.
11474 (struct sym_cache, struct breakpoint, struct
11475 process_info_private): Forward declare.
11476 (struct process_info): Declare.
11477 (current_process): Declare.
11478 (all_processes): Declare.
11479 (initialize_inferiors): Declare.
11480 (add_thread): Adjust to use ptid_t.
11481 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11482 (add_process, remove_process, find_thread_pid): Declare.
11483 (find_inferior_id): Adjust to use ptid_t.
11484 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11485 (multi_process): Declare.
11486 (push_event): Adjust to use ptid_t.
11487 (read_ptid, write_ptid): Declare.
11488 (prepare_resume_reply): Adjust to use ptid_t.
11489 (clear_symbol_cache): Declare.
11490 * inferiors.c (all_processes): New.
11491 (null_ptid, minus_one_ptid): New.
11492 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11493 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11494 (add_thread): Change unsigned long to ptid. Remove gdb_id
11495 parameter. Adjust.
11496 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11497 (gdb_id_to_thread): Rename to ...
11498 (find_thread_pid): ... this. Change unsigned long to ptid.
11499 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11500 (loaded_dll, pull_pid_from_list): Adjust.
11501 (add_process, remove_process, find_process_pid)
11502 (get_thread_process, current_process, initialize_inferiors): New.
11503 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11504 (struct target_waitstatus) <related_pid>: Ditto.
11505 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11506 return type to int.
11507 (struct target_ops) <join>: Add `pid' argument.
11508 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11509 (struct target_ops) <wait>: Add `ptid' field. Change return type
11510 to ptid.
11511 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11512 (mywait): Add `ptid' argument. Change return type to ptid_t.
11513 (target_pid_to_str): Declare.
11514 * target.c (set_desired_inferior): Adjust to use ptids.
11515 (mywait): Add new `ptid' argument. Adjust.
11516 (target_pid_to_str): New.
11517 * mem-break.h (free_all_breakpoints): Declare.
11518 * mem-break.c (breakpoints): Delelete.
11519 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11520 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11521 to use per-process breakpoint list.
11522 (free_all_breakpoints): New.
11523 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11524 (symbol_cache, all_symbols_looked_up): Delete.
11525 (hexchars): New.
11526 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11527 read_ptid): New.
11528 (prepare_resume_reply): Change ptid argument's type from unsigned
11529 long to ptid_t. Adjust. Implement W;process and X;process.
11530 (free_sym_cache, clear_symbol_cache): New.
11531 (look_up_one_symbol): Adjust to per-process symbol cache. *
11532 * server.c (cont_thread, general_thread, step_thread): Change type
11533 to ptid_t.
11534 (attached): Delete.
11535 (multi_process): New.
11536 (last_ptid): Change type to ptid_t.
11537 (struct vstop_notif) <ptid>: Change type to ptid_t.
11538 (queue_stop_reply, push_event): Change `ptid' argument's type to
11539 ptid_t.
11540 (discard_queued_stop_replies): Add `pid' argument.
11541 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11542 changes. Don't reference the `attached' global.
11543 (attach_inferior): Adjust to mywait interface changes.
11544 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11545 features. Handle and report "multiprocess+". Handle
11546 "qAttached:PID".
11547 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11548 changes.
11549 (handle_v_kill): New.
11550 (handle_v_stopped): Adjust to use target_pid_to_str.
11551 (handle_v_requests): Allow multiple attaches and runs when
11552 multiprocess extensions are in effect. Handle "vKill".
11553 (myresume): Adjust to use ptids.
11554 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11555 (handle_status): Adjust to discard_queued_stop_replies interface
11556 change.
11557 (first_thread_of, kill_inferior_callback)
11558 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11559 (main): Call initialize_inferiors. Adjust to use ptids, killing
11560 and detaching from all inferiors. Handle multiprocess packet
11561 variants.
11562 * linux-low.h: Include gdb_proc_service.h.
11563 (struct process_info_private): New.
11564 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11565 <lwpid_of>: Use ptid_get_lwp.
11566 (get_lwp_thread): Adjust.
11567 (struct lwp_info): Add `dead' member.
11568 (find_lwp_pid): Declare.
11569 * linux-low.c (thread_db_active): Delete.
11570 (new_inferior): Adjust comment.
11571 (inferior_pid): Delete.
11572 (linux_add_process): New.
11573 (handle_extended_wait): Adjust.
11574 (add_lwp): Change unsigned long to ptid.
11575 (linux_create_inferior): Add process to processes table. Adjust
11576 to use ptids. Don't set new_inferior here.
11577 (linux_attach_lwp): Rename to ...
11578 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11579 it. Adjust to use ptids.
11580 (linux_attach_lwp): New.
11581 (linux_attach): Add process to processes table. Don't set
11582 new_inferior here.
11583 (struct counter): New.
11584 (second_thread_of_pid_p, last_thread_of_process_p): New.
11585 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11586 multiple processes.
11587 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11588 processes. Remove process from process table.
11589 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11590 to multiple processes.
11591 (any_thread_of): New.
11592 (linux_detach): Add `pid' argument, and handle it. Remove process
11593 from processes table.
11594 (linux_join): Add `pid' argument. Handle it.
11595 (linux_thread_alive): Change unsighed long argument to ptid_t.
11596 Consider dead lwps as not being alive.
11597 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11598 threads we're not interested in.
11599 (same_lwp, find_lwp_pid): New.
11600 (linux_wait_for_lwp): Change `pid' argument's type from int to
11601 ptid_t. Adjust.
11602 (linux_wait_for_event): Rename to ...
11603 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11604 from int to ptid_t. Adjust.
11605 (linux_wait_for_event): New.
11606 (linux_wait_1): Add `ptid' argument. Change return type to
11607 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11608 that exit from the process table.
11609 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11610 Adjust.
11611 (mark_lwp_dead): New.
11612 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11613 stopping all threads, mark its main lwp as dead.
11614 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11615 ptids.
11616 (fetch_register, usr_store_inferior_registers)
11617 (regsets_fetch_inferior_registers)
11618 (regsets_store_inferior_registers, linux_read_memory)
11619 (linux_write_memory): Inline `inferior_pid'.
11620 (linux_look_up_symbols): Adjust to use per-process
11621 `thread_db_active'.
11622 (linux_request_interrupt): Adjust to use ptids.
11623 (linux_read_auxv): Inline `inferior_pid'.
11624 (initialize_low): Don't reference thread_db_active.
11625 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11626 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11627 (ps_getpid): Return the pid of the current inferior.
11628 * thread-db.c (proc_handle, thread_agent): Delete.
11629 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11630 per-process data.
11631 (find_one_thread): Change argument type to ptid_t. Adjust to
11632 per-process data.
11633 (maybe_attach_thread): Adjust to per-process data and ptids.
11634 (thread_db_find_new_threads): Ditto.
11635 (thread_db_init): Ditto.
11636 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11637 processes table. Adjust to use ptids.
11638 (spu_kill, spu_detach): Adjust interface. Remove process from
11639 processes table.
11640 (spu_join, spu_thread_alive): Adjust interface.
11641 (spu_wait): Adjust interface. Remove process from processes
11642 table. Adjust to use ptids.
11643 * win32-low.c (current_inferior_tid): Delete.
11644 (current_inferior_ptid): New.
11645 (debug_event_ptid): New.
11646 (thread_rec): Take a ptid. Adjust.
11647 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11648 (child_delete_thread): Ditto.
11649 (do_initial_child_stuff): Add `attached' argument. Add process to
11650 processes table.
11651 (child_fetch_inferior_registers, child_store_inferior_registers):
11652 Adjust.
11653 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11654 (win32_attach): Pass 1 to do_initial_child_stuff.
11655 (win32_kill): Adjust interface. Remove process from processes
11656 table.
11657 (win32_detach): Ditto.
11658 (win32_join): Adjust interface.
11659 (win32_thread_alive): Take a ptid.
11660 (win32_resume): Adjust to use ptids.
11661 (get_child_debug_event): Ditto.
11662 (win32_wait): Adjust interface. Remove exiting process from
11663 processes table.
11664
bd99dc85
PA
116652009-04-01 Pedro Alves <pedro@codesourcery.com>
11666
11667 Non-stop mode support.
11668
11669 * server.h (non_stop): Declare.
11670 (gdb_client_data, handler_func): Declare.
11671 (delete_file_handler, add_file_handler, start_event_loop):
11672 Declare.
11673 (handle_serial_event, handle_target_event, push_event)
11674 (putpkt_notif): Declare.
11675 * target.h (enum resume_kind): New.
11676 (struct thread_resume): Replace `step' field by `kind' field.
11677 (TARGET_WNOHANG): Define.
11678 (struct target_ops) <wait>: Add `options' argument.
11679 <supports_non_stop, async, start_non_stop>: New fields.
11680 (target_supports_non_stop, target_async): New.
11681 (start_non_stop): Declare.
11682 (mywait): Add `options' argument.
11683 * target.c (mywait): Add `options' argument. Print child exit
11684 notifications here.
11685 (start_non_stop): New.
11686 * server.c (non_stop, own_buf, mem_buf): New globals.
11687 (struct vstop_notif): New.
11688 (notif_queue): New global.
11689 (queue_stop_reply, push_event, discard_queued_stop_replies)
11690 (send_next_stop_reply): New.
11691 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11692 interface changes.
11693 (attach_inferior): In non-stop mode, don't wait for the target
11694 here.
11695 (handle_general_set): Handle QNonStop.
11696 (handle_query): When handling qC, return the current general
11697 thread, instead of the first thread of the list.
11698 (handle_query): If the backend supports non-stop mode, include
11699 QNonStop+ in the qSupported query response.
11700 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11701 and non-stop mode.
11702 (handle_v_attach, handle_v_run): Handle non-stop mode.
11703 (handle_v_stopped): New.
11704 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11705 (myresume): Adjust to use resume_kind. Handle non-stop.
11706 (queue_stop_reply_callback): New.
11707 (handle_status): Handle non-stop mode.
11708 (main): Clear non_stop flag on reconnection. Use the event-loop.
11709 Refactor serial protocol handling from here ...
11710 (process_serial_event): ... to this new function. When GDB
11711 selects any thread, select one here. In non-stop mode, wait until
11712 GDB acks all pending events before exiting.
11713 (handle_serial_event, handle_target_event): New.
11714 * remote-utils.c (remote_open): Install remote_desc in the event
11715 loop.
11716 (remote_close): Remove remote_desc from the event loop.
11717 (putpkt_binary): Rename to...
11718 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11719 (putpkt_binary): New as wrapper around putpkt_binary_1.
11720 (putpkt_notif): New.
11721 (prepare_resume_reply): In non-stop mode, don't change the
11722 general_thread.
11723 * event-loop.c: New.
11724 * Makefile.in (OBJ): Add event-loop.o.
11725 (event-loop.o): New rule.
11726
11727 * linux-low.h (pid_of): Moved here.
11728 (lwpid_of): New.
11729 (get_lwp_thread): Use lwpid_of.
11730 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11731 * linux-low.c (pid_of): Delete.
11732 (inferior_pid): Use lwpid_of.
11733 (linux_event_pipe): New.
11734 (target_is_async_p): New.
11735 (delete_lwp): New.
11736 (handle_extended_wait): Use lwpid_of.
11737 (add_lwp): Don't set lwpid field.
11738 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11739 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11740 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11741 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11742 first. Adjust to linux_wait_for_event interface changes. Use
11743 lwpid_of.
11744 (linux_detach): Don't delete the main lwp here.
11745 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11746 (status_pending_p): Don't consider explicitly suspended lwps.
11747 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11748 pointer. Add OPTIONS argument. Change return type to int. Use
11749 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11750 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11751 pointer. Add status pointer argument. Return a pid instead of a
11752 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11753 changes. In non-stop mode, don't switch to a random thread.
11754 (linux_wait): Rename to...
11755 (linux_wait_1): ... this. Add target_options argument, and handle
11756 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11757 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11758 clean exit and signal exit code. Don't stop all threads in
11759 non-stop mode. In all-stop mode, only stop all threads when
11760 reporting a stop to GDB. Handle explicit thread stop requests.
11761 (async_file_flush, async_file_mark): New.
11762 (linux_wait): New.
11763 (send_sigstop): Use lwpid_of.
11764 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11765 interface changes. In non-stop mode, don't switch to a random
11766 thread.
11767 (linux_resume_one_lwp): Use lwpid_of.
11768 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11769 (linux_resume_one_thread): ... this. Handle resume_stop. In
11770 non-stop mode, don't look for pending flag in all threads.
11771 (resume_status_pending_p): Don't consider explicitly suspended
11772 threads.
11773 (my_waitpid): Reimplement. Emulate __WALL.
11774 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11775 Use lwpid_of.
11776 (sigchld_handler, linux_supports_non_stop, linux_async)
11777 (linux_start_non_stop): New.
11778 (linux_target_ops): Register linux_supports_non_stop, linux_async
11779 and linux_start_non_stop.
11780 (initialize_low): Install SIGCHLD handler.
11781 * thread-db.c (thread_db_create_event, find_one_thread)
11782 (thread_db_get_tls_address): Use lwpid_of.
11783 * win32-low.c (win32_detach): Adjust to use resume_kind.
11784 (win32_wait): Add `options' argument.
11785 * spu-low.c (spu_resume): Adjust to use resume_kind.
11786 (spu_wait): Add `options' argument.
11787
5b1c542e
PA
117882009-04-01 Pedro Alves <pedro@codesourcery.com>
11789
11790 Decouple target code from remote protocol.
11791
11792 * target.h (enum target_waitkind): New.
11793 (struct target_waitstatus): New.
11794 (struct target_ops) <wait>: Return an unsigned long. Take a
11795 target_waitstatus pointer instead of a char pointer.
11796 (mywait): Likewise.
11797 * target.c (mywait): Change prototype to return an unsigned long.
11798 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11799 * server.h (thread_from_wait, old_thread_from_wait): Delete
11800 declarations.
11801 (prepare_resume_reply): Change prototype to take a
11802 target_waitstatus.
11803 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11804 (last_status, last_ptid): New.
11805 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11806 pid instead of a signal.
11807 (attach_inferior): Remove "status" and "signal" parameters.
11808 Adjust.
11809 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11810 not as an address.
11811 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11812 (handle_v_requests, myresume): Remove "status" and "signal"
11813 parameters. Adjust.
11814 (handle_status): New.
11815 (main): Delete local `status'. Adjust.
11816 * remote-utils.c: Include target.h.
11817 (prepare_resume_reply): Change prototype to take a
11818 target_waitstatus. Adjust.
11819
11820 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11821 interface.
11822 * spu-low.c (spu_wait): Adjust.
11823 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11824 Delete.
11825 (win32_wait): Adjust.
11826
2bd7c093
PA
118272009-04-01 Pedro Alves <pedro@codesourcery.com>
11828
11829 * target.h (struct thread_resume): Delete leave_stopped member.
11830 (struct target_ops): Add a `n' argument to the `resume' callback.
11831 * server.c (start_inferior): Adjust.
11832 (handle_v_cont, myresume): Adjust.
11833 * linux-low.c (check_removed_breakpoint): Adjust to resume
11834 interface change, and to removed leave_stopped field.
11835 (resume_ptr): Delete.
11836 (struct thread_resume_array): New.
11837 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11838 resume interface change.
11839 (linux_continue_one_thread, linux_queue_one_thread)
11840 (resume_status_pending_p): Check if the resume field is NULL
11841 instead of checking the leave_stopped member.
11842 (linux_resume): Adjust to the target resume interface change.
11843 * spu-low.c (spu_resume): Adjust to the target resume interface
11844 change.
11845 * win32-low.c (win32_detach, win32_resume): Ditto.
11846
c35fafde
PA
118472009-04-01 Pedro Alves <pedro@codesourcery.com>
11848
11849 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11850 flag.
11851 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11852 pending.
11853 (linux_continue_one_thread): Only preserve the stepping flag if
11854 there's a pending breakpoint.
11855
0a59d50b
PA
118562009-03-31 Pedro Alves <pedro@codesourcery.com>
11857
11858 * server.c (main): After the inferior having exited, call
11859 remote_close before exiting gdbserver.
11860
f04c6d38
TJB
118612009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11862
11863 Fix size of FPSCR in Power 7 processors.
11864 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11865 (PPC_FEATURE_HAS_DFP): New #define.
11866 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11867 size of the FPSCR.
11868
78e5cee6
PA
118692009-03-23 Pedro Alves <pedro@codesourcery.com>
11870
11871 * server.c (handle_query) Whitespace and formatting.
11872
1b3f6016
PA
118732009-03-22 Pedro Alves <pedro@codesourcery.com>
11874
11875 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11876 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11877 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11878 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11879 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11880 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11881 Makefile.in, configure.ac: Fix whitespace throughout.
11882 * configure: Regenerate.
11883
a07b2135
PA
118842009-03-22 Pedro Alves <pedro@codesourcery.com>
11885
11886 * inferiors.c (find_inferior): Make it safe for the callback
11887 function to delete the currently iterated inferior.
11888
67cc2626
PA
118892009-03-22 Pedro Alves <pedro@codesourcery.com>
11890
11891 * Makefile.in (linuw_low_h): Move higher.
11892 (thread-db.o): Depend on $(linux_low_h).
11893
54a0b537
PA
118942009-03-17 Pedro Alves <pedro@codesourcery.com>
11895
11896 Rename "process" to "lwp" throughout.
11897
11898 * linux-low.c (all_processes): Rename to...
11899 (all_lwps): ... this.
11900 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11901 (add_process): Rename to ...
11902 (add_lwp): ... this. Adjust.
11903 (linux_create_inferior): Adjust.
11904 (linux_attach_lwp): Adjust.
11905 (linux_attach): Adjust.
11906 (linux_kill_one_process): Rename to ...
11907 (linux_kill_one_lwp): ... this. Adjust.
11908 (linux_kill): Adjust.
11909 (linux_detach_one_process): Rename to ...
11910 (linux_detach_one_lwp): ... this. Adjust.
11911 (linux_detach): Adjust.
11912 (check_removed_breakpoint): Adjust.
11913 (status_pending_p): Adjust.
11914 (linux_wait_for_process): Rename to ...
11915 (linux_wait_for_lwp): ... this. Adjust.
11916 (linux_wait_for_event): Adjust.
11917 (send_sigstop): Adjust.
11918 (wait_for_sigstop): Adjust.
11919 (stop_all_processes): Rename to ...
11920 (stop_all_lwps): ... this.
11921 (linux_resume_one_process): Rename to ...
11922 (linux_resume_one_lwp): ... this. Adjust.
11923 (linux_set_resume_request, linux_continue_one_thread)
11924 (linux_queue_one_thread, resume_status_pending_p)
11925 (usr_store_inferior_registers, regsets_store_inferior_registers)
11926 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11927 Adjust.
11928 * linux-low.h (get_process): Rename to ...
11929 (get_lwp): ... this. Adjust.
11930 (get_thread_process): Rename to ...
11931 (get_thread_lwp): ... this. Adjust.
11932 (get_process_thread): Rename to ...
11933 (get_lwp_thread): ... this. Adjust.
11934 (struct process_info): Rename to ...
11935 (struct lwp_info): ... this.
11936 (all_processes): Rename to ...
11937 (all_lwps): ... this.
11938 * proc-service.c (ps_lgetregs): Adjust.
11939 * thread-db.c (thread_db_create_event, find_one_thread)
11940 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11941
0b16c5cf
PA
119422009-03-14 Pedro Alves <pedro@codesourcery.com>
11943
11944 * server.c (handle_query): Handle "qAttached".
11945
32de4b9d
NS
119462009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11947
11948 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11949 GPLv3, update license URL.
11950
2aecd87f
DE
119512009-03-01 Doug Evans <dje@google.com>
11952
93efd302 11953 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
11954 (server_h): Add gdb_signals.h.
11955 (signals.o): Update.
11956 * server.h (target_signal_from_host,target_signal_to_host_p)
11957 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11958
86b1f9c5
PM
119592009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11960
11961 * remote-utils.c (getpkt): Also generate remote-debug
11962 information if noack_mode is set.
11963
4aa995e1
PA
119642009-02-06 Pedro Alves <pedro@codesourcery.com>
11965
11966 * server.c (handle_query): Report qXfer:siginfo:read and
11967 qXfer:siginfo:write as supported and handle them.
11968 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11969 * linux-low.c (linux_xfer_siginfo): New.
11970 (linux_target_ops): Set it.
11971
62709adf
PA
119722009-01-26 Pedro Alves <pedro@codesourcery.com>
11973
11974 * server.c (gdbserver_usage): Mention --remote-debug.
11975 (main): Accept '--remote-debug' switch.
11976
aef93bd7
DE
119772009-01-18 Doug Evans <dje@google.com>
11978
11979 * regcache.c (new_register_cache): No need to check result of xcalloc.
11980 * server.c (handle_search_memory): Back out calls to xmalloc,
11981 result is checked and error is returned to user upon failure.
11982 (handle_query): Ditto. Add more checks for result of malloc.
11983 (handle_v_cont): Check result of malloc, report error back to
11984 user upon failure.
11985 (handle_v_run): Ditto. Call freeargv.
11986 * server.h (freeargv): Declare.
11987 * utils.c (freeargv): New fn.
11988
54363045
DE
119892009-01-15 Doug Evans <dje@google.com>
11990
f626972c
DE
11991 * gdbreplay.c (perror_with_name): Make arg const char *.
11992 * server.h (target_signal_to_name): Make return type const char *.
0842e787 11993 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 11994 * utils.c (perror_with_name): Make arg const char *.
54363045 11995
18aae699
PA
119962009-01-14 Pedro Alves <pedro@codesourcery.com>
11997
11998 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11999 when handling a EXIT_PROCESS_DEBUG_EVENT.
12000
ff703abe
JB
120012009-01-06 Joel Brobecker <brobecker@adacore.com>
12002
12003 * gdbreplay.c (gdbreplay_version): Update copyright year.
12004 * server.c (gdbserver_version): Likewise.
12005
f21cc1a2 120062009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12007
12008 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12009 (handle_extended_wait): Improve comment.
0e21c1ec 12010
bca929d3
DE
120112008-12-13 Doug Evans <dje@google.com>
12012
12013 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12014 * server.h (ATTR_MALLOC): New macro.
12015 (xmalloc,xcalloc,xstrdup): Declare.
12016 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12017 * inferiors.c: Ditto.
12018 * linux-low.c: Ditto.
12019 * mem-break.c: Ditto.
12020 * regcache.c: Ditto.
12021 * remote-utils.c: Ditto.
12022 * server.c: Ditto.
12023 * target.c: Ditto.
12024 * win32-low.c: Ditto.
12025
97438e3f
DE
120262008-12-12 Doug Evans <dje@google.com>
12027
896c7fbb
DE
12028 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12029 in debugging printf.
12030
97438e3f
DE
12031 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12032
e3b886f8
DE
120332008-12-09 Doug Evans <dje@google.com>
12034
12035 * linux-low.h (struct process_info): Delete member tid, unused.
12036 * thread-db.c (find_one_thread): Update.
12037 (maybe_attach_thread): Update.
12038
07e059b5
VP
120392008-12-02 Pedro Alves <pedro@codesourcery.com>
12040
889bf7c5
PA
12041 * target.h (struct target_ops): Add qxfer_osdata member.
12042 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12043 and dirent.h.
12044 (linux_qxfer_osdata): New functions.
12045 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12046 callback.
12047 * server.c (handle_query): Handle "qXfer:osdata:read:".
12048 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12049 (buffer_xml_printf): New functions.
12050 * server.h (struct buffer): New.
12051 (buffer_grow_str, buffer_grow_str0): New macros.
12052 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12053 (buffer_xml_printf): Declare.
07e059b5 12054
4cab47ab
DE
120552008-11-24 Doug Evans <dje@google.com>
12056
12057 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12058
f142445f
DJ
120592008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12060
12061 * server.c (handle_v_run): Always use the supplied argument list.
12062
d0107bb6 120632008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12064
d0107bb6
BW
12065 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12066 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12067
2c4ad781
TJB
120682008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12069
12070 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12071 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12072 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12073 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12074 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12075 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12076 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12077 XML target descriptions.
12078 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12079 when inferior is running on an ISA 2.05 or later processor. Add
12080 special case to return offset for full 64-bit slot of FPSCR when
12081 in 32-bits.
12082
dfb64f85
DJ
120832008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12084
12085 * Makefile.in (SFILES, clean): Added sparc64 files.
12086 (reg-sparc64.o, reg-sparc64.c): New.
12087 * configure.srv (sparc*-*-linux*): New configuration.
12088 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12089 syscall arguments for SPARC.
12090 (regsets_store_inferior_registers): Likewise.
12091 * linux-sparc-low.c: New file.
12092
66b6e1dd
DE
120932008-10-21 Doug Evans <dje@google.com>
12094
12095 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12096 (READLINE_DIR,READLINE_DEP): Delete.
12097 (INTERNAL_CFLAGS): Update.
12098 (LINTFLAGS): Update.
12099
9b710a42
PA
121002008-10-10 Pedro Alves <pedro@codesourcery.com>
12101
12102 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12103 whole argv from the last run, not just argv[0].
12104
5822d809
PA
121052008-09-08 Pedro Alves <pedro@codesourcery.com>
12106
12107 * regcache.c (new_register_cache): Return NULL if the register
12108 cache size isn't known yet.
12109 (free_register_cache): Avoid dereferencing a NULL regcache.
12110
74aac56f
DJ
121112008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12112
12113 * configure.srv: Merge MIPS and MIPS64.
12114
400b20f5
MR
121152008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12116
12117 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12118
677c5bb1
LM
121192008-08-18 Luis Machado <luisgpm@br.ibm.com>
12120
12121 * Makefile.in: Add required vsx dependencies.
12122
12123 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12124 Declare init_registers_powerpc_vsx32l.
12125 Declare init_registers_powerpc_vsx64l.
12126 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12127 (ppc_arch_setup): Check for VSX in hwcap.
12128 (ppc_fill_vsxregset): New function.
12129 (ppc_store_vsxregset): New function.
12130 Add new VSX entry in regset_info target_regsets.
12131
12132 * configure.srv: Add new VSX dependencies.
12133
a6f3e723
SL
121342008-08-12 Pedro Alves <pedro@codesourcery.com>
12135
12136 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12137 (remote_open): Set or clear transport_is_reliable.
12138 (putpkt_binary): Don't expect acks in noack mode.
12139 (getpkt): Don't send ack/nac in noack mode.
12140 * server.c (handle_general_set): Handle QStartNoAckMode.
12141 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12142 qSupported.
12143 (main): Reset noack_mode on every connection.
12144 * server.h (noack_mode): Declare.
12145
a417dc56
RW
121462008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12147
12148 * Makefile.in (GDBREPLAY_OBS): New variable.
12149 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12150
3221518c
UW
121512008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12152 Daniel Jacobowitz <dan@codesourcery.com>
12153
12154 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12155 (usr_store_inferior_registers): Likewise.
12156 (regsets_store_inferior_registers): Likewise.
12157
ec56be1b
PA
121582008-07-31 Rolf Jansen <rj@surtec.com>
12159 Pedro Alves <pedro@codesourcery.com>
12160
12161 * configure.ac: Check for memmem declaration.
12162 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12163 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12164 (disable_packet_qfThreadInfo): Unconditionally compile.
12165 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12166 * configure, config.in: Regenerate.
12167
2fe5e3ff
DE
121682008-07-28 Doug Kwan <dougkwan@google.com>
12169
12170 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12171 (linux_write_memory): Remove declaration of errno.
12172
836acd6d
UW
121732008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12174
12175 * linux-low.c (handle_extended_wait): Do not use "status"
12176 variable uninitialized.
12177
aeba519e
PA
121782008-07-07 Pedro Alves <pedro@codesourcery.com>
12179
12180 * server.c (handle_v_attach): Inhibit reporting dll changes.
12181
db42f210
PA
121822008-06-27 Pedro Alves <pedro@codesourcery.com>
12183
12184 * remote-utils.c (prepare_resume_reply): If requested, don't
12185 output "thread:TID" in the T stop reply.
12186
12187 * server.c (disable_packet_vCont, disable_packet_Tthread)
12188 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12189 (handle_query): If requested, disable support for qC, qfThreadInfo
12190 and qsThreadInfo.
12191 (handle_v_requests): If requested, disable support for vCont.
12192 (gdbserver_show_disableable): New.
12193 (main): Handle --disable-packet and --disable-packet=LIST.
12194
12195 * server.h (disable_packet_vCont, disable_packet_Tthread)
12196 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12197
8e4c5421
CD
121982008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12199
12200 * server.c (gdbserver_usage): Mention --version.
12201
6e23a804
DJ
122022008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12203
12204 * Makefile.in (gdbreplay.o): New rule.
12205
90aa6a40
JM
122062008-06-06 Joseph Myers <joseph@codesourcery.com>
12207
12208 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12209 message, not gdbserver.
12210
c16158bc 122112008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
12212 Nathan Sidwell <nathan@codesourcery.com>
12213 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
12214
12215 * acinclude.m4: Include ../../config/acx.m4.
12216 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12217 * configure, config.in: Regenerate.
12218 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12219 * server.c (gdbserver_version): Print PKGVERSION.
12220 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12221 (main): Adjust gdbserver_usage calls.
12222 * gdbreplay.c (version, host_name): Add declarations.
12223 (gdbreplay_version, gdbreplay_usage): New.
12224 (main): Accept --version and --help options.
12225
aeb75bf5
DJ
122262008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12227
12228 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12229 (arm_breakpoint_at): Handle Thumb.
12230 (the_low_target): Add comment.
12231
76b233dd
UW
122322008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12233
12234 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12235
08388c79
DE
122362008-05-09 Doug Evans <dje@google.com>
12237
a3c83fae
DE
12238 * server.h (decode_search_memory_packet): Declare.
12239 * remote-utils.c (decode_search_memory_packet): New fn.
12240 * server.c (handle_search_memory_1): New fn.
08388c79
DE
12241 (handle_search_memory): New fn.
12242 (handle_query): Process qSearch:memory packets.
12243
bb9c3d36
UW
122442008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12245
12246 * regcache.c (registers_length): Remove.
12247 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12248 full register packet.
12249 * regcache.h (registers_length): Remove prototype.
12250 * server.h (PBUFSIZ): Define to 16384.
12251
7284e1be
UW
122522008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12253
12254 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12255 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12256 powerpc-64l.o, and powerpc-altivec64l.o.
12257 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12258 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12259 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12260 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12261 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12262 to srv_xmlfiles.
12263
12264 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12265 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12266 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12267 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12268 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12269 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12270 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12271 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12272 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12273 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12274 (clean): Update.
12275
12276 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12277 (init_registers_powerpc_32l): ... this new prototype.
12278 (init_registers_powerpc_32): Remove, replace by ...
12279 (init_registers_powerpc_altivec32l): ... this new prototype.
12280 (init_registers_powerpc_e500): Remove, replace by ...
12281 (init_registers_powerpc_e500l): ... this new prototype.
12282 (init_registers_ppc64): Remove, replace by ...
12283 (init_registers_powerpc_64l): ... this new prototype.
12284 (init_registers_powerpc_64): Remove, replace by ...
12285 (init_registers_powerpc_altivec64l): ... this new prototype.
12286 (ppc_num_regs): Set to 73.
12287 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12288 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12289 (ppc_cannot_store_register): Handle orig_r3 and trap.
12290 (ppc_arch_setup): Update init_registers_... calls.
12291 (ppc_fill_gregset): Handle orig_r3 and trap.
12292
12293 * inferiors.c (clear_inferiors): Reset current_inferior.
12294
fdc59709
PB
122952008-04-23 Paolo Bonzini <bonzini@gnu.org>
12296
889bf7c5
PA
12297 * acinclude.m4: Add override.m4.
12298 * configure: Regenerate.
fdc59709 12299
c9b2f845
UW
123002008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12301
12302 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12303 initial call to init_register_ppc64.
12304
550512b8
UW
123052008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12306
43aaf8b6
PA
12307 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12308 single powerpc*-*-linux* case.
550512b8
UW
12309 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12310
b6430ec3
UW
123112008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12312
12313 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 12314 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
12315 from reg_xmlfiles.
12316 * linux-ppc-low.c: Include <elf.h>.
12317 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12318 (ppc_hwcap): New global variable.
12319 (ppc_regmap): Remove __SPE__ #ifdef sections.
12320 (ppc_regmap_e500): New global variable.
12321 (ppc_cannot_store_register): Update __SPE__ special case.
12322 (ppc_get_hwcap): New function.
12323 (ppc_arch_setup): Use it to determine whether inferior supports
12324 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12325 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12326 Do not access registers if target does not support AltiVec.
12327 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12328 Do not access registers if target does not support SPE.
12329 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12330
52fa2412
UW
123312008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12332
12333 * linux-low.c (disabled_regsets, num_regsets): New.
12334 (use_regsets_p): Delete.
12335 (linux_wait_for_process): Clear disabled_regsets.
12336 (regsets_fetch_inferior_registers): Check and set it.
12337 (regsets_store_inferior_registers): Likewise.
12338 (linux_fetch_registers, linux_store_registers): Do not use
12339 use_regsets_p.
12340 (initialize_low): Allocate disabled_regsets.
12341
e28b3332
DJ
123422008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12343
12344 * Makefile.in (LIBOBJS): New.
12345 (OBS): Use LIBOBJS.
12346 (memmem.o): New rule.
12347 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12348 * configure: Regenerated.
12349
4536995d
UW
123502008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12351
12352 * server.c (handle_query): Never return "unsupported" for
12353 qXfer:features:read queries.
12354
221c031f
UW
123552008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12356
12357 * server.c (get_features_xml): Fix inverted condition.
12358 (handle_query): Always support qXfer:feature:read.
12359
ccd213ac
DJ
123602008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12361
12362 * server.c (wrapper_argv): New.
12363 (start_inferior): Handle wrapper_argv. If set, expect an extra
12364 trap.
12365 (gdbserver_usage): Document --wrapper.
12366 (main): Parse --wrapper.
12367
6fe305f7
UW
123682008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12369
12370 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12371 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12372 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12373 (ppc_set_pc): Likewise.
12374 (ppc_arch_setup): New function.
12375 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12376 of collect_register.
889bf7c5 12377 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 12378
5b0a002e
UW
123792008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12380
12381 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12382 instead of linux-ppc64-low.o.
12383 * linux-ppc64-low.c: Remove file.
12384 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12385 (linux-ppc64-low.o): Remove rule.
12386
12387 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12388 (init_registers_powerpc_64): Likewise.
12389 (ppc_regmap): Conditionally define depending on __powerpc64__.
12390 (ppc_cannot_store_register): Do not special-case "fpscr" when
12391 compiled on __powerpc64__.
12392 (ppc_collect_ptrace_register): New function.
12393 (ppc_supply_ptrace_register): New function.
12394 (ppc_breakpoint): Change type to "unsigned int".
12395 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12396 (the_low_target): Conditionally provide initializers for the
889bf7c5 12397 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
12398 collect_ptrace_register and supply_ptrace_register members.
12399
9b4b61c8
UW
124002008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12401
12402 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12403 * server.c (gdbserver_xmltarget): Define.
12404 (get_features_xml): Use it to replace "target.xml" and arch_string.
12405
12406 * configure.srv: Remove srv_xmltarget. Add XML files that were
12407 mentioned there to srv_xmlfiles instead. Remove conditional tests
12408 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12409 srv_xmlfiles and srv_regobj to include all possible choices.
12410 * configure.ac (srv_xmltarget): Remove.
12411 (srv_xmlfiles): Do not add "target.xml".
12412 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12413 checks for supplementary target information.
12414 * configure: Regenerate.
12415 * Makefile.in (XML_TARGET): Remove.
12416 (target.xml): Remove rule.
12417 (clean): Do not clean up target.xml.
12418 (.PRECIOUS): Do not mention target.xml.
12419
12420 * target.h (struct target_ops): Remove arch_string member.
12421 * linux-low.c (linux_arch_string): Remove.
12422 (linux_target_ops): Remove arch_string initializer.
12423 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12424 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12425 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12426 * spu-low.c (spu_arch_string): Remove.
12427 (spu_target_ops): Remove arch_string initializer.
12428 * win32-low.c (win32_arch_string): Remove.
12429 (win32_target_ops): Remove arch_string initializer.
12430 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12431 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12432 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12433
ee1a7ae4
UW
124342008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12435
12436 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12437 by collect_ptrace_register and supply_ptrace_register hooks.
12438 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12439 instead of checking for the_low_target.left_pad_xfer.
12440 (usr_store_inferior_registers): Use collect_ptrace_register callback
12441 instead of checking for the_low_target.left_pad_xfer.
12442
12443 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12444 (s390_supply_ptrace_register): Likewise.
12445 (s390_fill_gregset): Call s390_collect_ptrace_register.
12446 (the_low_target): Update.
12447
12448 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12449 (ppc_supply_ptrace_register): Likewise.
12450 (the_low_target): Update.
12451
12452 * linux-i386-low.c (the_low_target): Update.
12453 * linux-x86-64-low.c (the_low_target): Update.
12454
d61ddec4
UW
124552008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12456
12457 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12458 reg-s390.o and reg-s390x.o.
12459
12460 * linux-low.c (new_inferior): New global variable.
12461 (linux_create_inferior, linux_attach): Set it.
12462 (linux_wait_for_process): Call the_low_target.arch_setup after the
12463 target has stopped for the first time.
12464 (initialize_low): Do not call the_low_target.arch_setup.
12465
12466 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12467 (s390_set_pc): Likewise.
12468 (s390_arch_setup): New function.
12469 (the_low_target): Use s390_arch_setup as arch_setup routine.
12470
12471 * regcache.c (realloc_register_cache): New function.
12472 (set_register_cache): Call it for each existing regcache.
12473
d05b4ac3
UW
124742008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12475
12476 * server.h (init_registers): Remove prototype.
12477
12478 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12479 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12480 instead of init_registers ().
12481 * linux-arm-low.c (init_registers_arm): Add prototype.
12482 (init_registers_arm_with_iwmmxt): Likewise.
12483 (the_low_target): Add initializer for arch_setup field.
12484 * linux-cris-low.c (init_registers_cris): Add prototype.
12485 (the_low_target): Add initializer for arch_setup field.
12486 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12487 (the_low_target): Add initializer for arch_setup field.
12488 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12489 (the_low_target): Add initializer for arch_setup field.
12490 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12491 (the_low_target): Add initializer for arch_setup field.
12492 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12493 (the_low_target): Add initializer for arch_setup field.
12494 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12495 (the_low_target): Add initializer for arch_setup field.
12496 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12497 (init_registers_mips64_linux): Likewise.
12498 (the_low_target): Add initializer for arch_setup field.
12499 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12500 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12501 (the_low_target): Add initializer for arch_setup field.
12502 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12503 (init_registers_powerpc_64): Likewise.
12504 (the_low_target): Add initializer for arch_setup field.
12505 * linux-s390-low.c (init_registers_s390): Add prototype.
12506 (init_registers_s390x): Likewise.
12507 (the_low_target): Add initializer for arch_setup field.
12508 * linux-sh-low.c (init_registers_sh): Add prototype.
12509 (the_low_target): Add initializer for arch_setup field.
12510 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12511 (the_low_target): Add initializer for arch_setup field.
12512 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12513 (the_low_target): Add initializer for arch_setup field.
12514
12515 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12516 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12517 instead of init_registers ().
12518 * win32-arm-low.c (init_registers_arm): Add prototype.
12519 (the_low_target): Add initializer for arch_setup field.
12520 * win32-i386-low.c (init_registers_i386): Add prototype.
12521 (the_low_target): Add initializer for arch_setup field.
12522
12523 * spu-low.c (init_registers_spu): Add prototype.
12524 (initialize_low): Call initialie_registers_spu () instead of
12525 initialize_registers ().
12526
fd96d250
PA
125272008-02-19 Pedro Alves <pedro@codesourcery.com>
12528
12529 * server.c (handle_v_requests): When handling the vRun and vAttach
12530 packets, if already debugging a process, don't kill it. Return an
12531 error instead.
12532
d41b6bb4
DJ
125332008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12534
12535 * server.c (handle_query): Correct length check.
12536
5ac588cf
PA
125372008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12538
12539 * win32-low.c (do_initial_child_stuff): Add process handle
12540 parameter. Set current_process_handle and current_process_id from the
12541 parameters. Clear globals.
12542 (win32_create_inferior): Don't set current_process_handle and
12543 current_process_id here. Instead pass them on the call to
12544 do_initial_child_stuff.
12545 (win32_attach): Likewise.
12546 (win32_clear_inferiors): New.
12547 (win32_kill): Don't close the current process handle or the
12548 current thread handle here. Instead call win32_clear_inferiors.
12549 (win32_detach): Don't open a new handle to the process. Call
12550 win32_clear_inferiors.
12551 (win32_join): Don't rely on current_process_handle; open a new
12552 handle using the process id.
12553 (win32_wait): Call win32_clear_inferiors when the inferior process
12554 has exited.
12555
ecd7ecbc
DJ
125562008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12557
12558 * server.c (monitor_show_help): Add "exit".
12559
1525d545
MG
125602008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12561
ecd7ecbc 12562 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
12563 (clean): Add reg-xtensa.c.
12564 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
12565 * configure.srv (xtensa*-*-linux*) New target.
12566 * linux-xtensa-low.c: New.
12567 * xtensa-xtregs.c: New.
1525d545 12568
59a016f0
PA
125692008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12570
12571 * hostio.c: Don't include errno.h.
12572 (errno_to_fileio_errno): Move to hostio-errno.
12573 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12574 error number outputting to the target->hostio_last_error callback.
12575 (hostio_packet_error): Use FILEIO_EINVAL directly.
12576 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12577 calls to hostio_error.
12578 * hostio-errno.c: New.
12579 * server.h (hostio_last_error_from_errno): Declare.
12580 * target.h (target_ops): Add hostio_last_error member.
12581 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12582 as hostio_last_error handler.
889bf7c5 12583 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
12584 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12585 (wince_hostio_last_error): New functions.
12586 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12587 as hostio_last_error handler.
12588 (win32_target_ops) [!_WIN32_WCE]: Register
12589 hostio_last_error_from_errno as hostio_last_error handler.
12590 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12591 (hostio-errno.o): New rule.
12592 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12593 * configure.srv (srv_hostio_err_objs): New variable. Default to
12594 hostio-errno.o.
12595 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12596 * configure: Regenerate.
12597
2d717e4f
DJ
125982008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12599
12600 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12601 (linux_kill, linux_detach): Clean up the process list.
12602 * remote-utils.c (remote_open): Improve port number parsing.
12603 (putpkt_binary, input_interrupt): Only send interrupts if the target
12604 is running.
12605 * server.c (extended_protocol): Make static.
12606 (attached): Define earlier.
12607 (exit_requested, response_needed, program_argv): New variables.
12608 (target_running): New.
12609 (start_inferior): Clear attached here.
12610 (attach_inferior): Set attached here.
12611 (require_running): Define.
12612 (handle_query): Use require_running and target_running. Implement
12613 "monitor exit".
12614 (handle_v_attach, handle_v_run): New.
12615 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12616 (gdbserver_usage): Update.
12617 (main): Redo argument parsing. Handle --debug and --multi. Handle
12618 --attach along with other options or after the port. Save
12619 program_argv. Support no initial program. Resynchronize
12620 communication with GDB after an error. Handle "monitor exit".
12621 Use require_running and target_running. Always allow the extended
12622 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12623 restart in extended mode.
12624 * README: Refer to the GDB manual. Update --attach usage.
12625
7407e2de
AS
126262007-12-20 Andreas Schwab <schwab@suse.de>
12627
12628 * linux-low.c (STACK_SIZE): Define.
12629 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12630 (linux_test_for_tracefork): Likewise.
12631
b65d95c5
DJ
126322007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12633
12634 * linux-low.c (linux_wait_for_event): Update messages. Do not
12635 reinsert auto-delete breakpoints.
12636 * mem-break.c (struct breakpoint): Change return type of handler to
12637 int.
12638 (set_breakpoint_at): Update handler type.
12639 (reinsert_breakpoint_handler): Return 1 instead of calling
12640 delete_breakpoint.
12641 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12642 setting a new one.
12643 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12644 * mem-break.h (set_breakpoint_at): Update handler type.
12645 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12646 * win32-low.c (auto_delete_breakpoint): New.
12647 (get_child_debug_event): Use it.
12648
4e799345
DJ
126492007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12650
12651 * configure.ac: Check for pread and pwrite.
12652 * hostio.c (handle_pread): Fall back to lseek and read.
12653 (handle_pwrite): Fall back to lseek and write.
12654 * config.in, configure: Regenerated.
12655
27524b67
DJ
126562007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12657
12658 * server.c (myresume): Add own_buf argument.
12659 (main): Update calls.
12660
a20d5e98
DJ
126612007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12662
12663 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12664 * remote-utils.c (remote_open): Do not call disable_async_io.
12665 (block_async_io): Delete.
12666 (unblock_async_io): Make static.
12667 (initialize_async_io): New.
12668 * server.c (handle_v_cont): Handle async I/O here.
12669 (myresume): Likewise. Move other common resume tasks here...
12670 (main): ... from here. Call initialize_async_io. Disable async
12671 I/O before the main loop.
12672 * server.h (initialize_async_io): Declare.
12673 (block_async_io, unblock_async_io): Delete prototypes.
12674 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12675
b79d787e
DJ
126762007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12677
12678 * remote-utils.c (readchar): Allow binary data in received messages.
12679
d97903b2
PA
126802007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12681
12682 * win32-low.c (attaching): New global.
12683 (win32_create_inferior): Clear the `attaching' global.
12684 (win32_attach): Set the `attaching' global.
12685 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12686 attaching. Only set a breakpoint at the entry point if not
12687 attaching.
12688
311de423
PA
126892007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12690
12691 * server.c (main): Don't report dll events on the initial
12692 connection on attaches.
12693
6c2d16d2
PA
126942007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12695
12696 * server.c (main): Relax numerical bases supported for the pid of
12697 the --attach command line argument.
12698
5ca906e6
PA
126992007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12700
12701 * win32-low.c (win32_attach): Call OpenProcess before
12702 DebugActiveProcess, not after. Add last error output to error
12703 call.
12704
9c6c8194
PA
127052007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12706
12707 * win32-low.c (win32_get_thread_context)
12708 (win32_set_thread_context): New functions.
12709 (thread_rec): Use win32_get_thread_context.
12710 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12711 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12712 field.
12713
4d5d1aaa
PA
127142007-12-03 Leo Zayas
12715 Pedro Alves <pedro_alves@portugalmail.pt>
12716
12717 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12718 global variables.
12719 (child_add_thread): Minor cleanup.
12720 (child_continue): Resume artificially suspended threads before
12721 calling ContinueDebugEvent.
12722 (suspend_one_thread): New.
12723 (fake_breakpoint_event): New.
12724 (get_child_debug_event): Change return type to int. Check here if
12725 gdb sent an interrupt request. If a soft interrupt was requested,
12726 fake a breakpoint event. Return 0 if there is no event to handle,
12727 and 1 otherwise.
12728 (win32_wait): Don't check here if gdb sent an interrupt request.
12729 Ensure there is a valid event to handle.
12730 (win32_request_interrupt): Add soft interruption method as last
12731 resort.
12732
c436e841
PA
127332007-12-03 Leo Zayas
12734 Pedro Alves <pedro_alves@portugalmail.pt>
12735
12736 * win32-low.h (win32_thread_info): Add descriptions to the
12737 structure members. Replace `suspend_count' counter by a
12738 `suspended' flag.
12739 * win32-low.c (thread_rec): Update condition of when to get the
12740 context from the inferior. Rely on ContextFlags being set if it
12741 has already been retrieved. Only suspend the inferior thread if
12742 we haven't already. Warn if that fails.
12743 (continue_one_thread): s/suspend_count/suspended/. Only call
12744 ResumeThread once. Warn if that fails.
12745
e7b5fa67
PA
127462007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12747
12748 * win32-low.c (win32_wait): Don't read from the inferior when it
12749 has already exited.
12750
a385171d
PA
127512007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12752
12753 * Makefile.in (win32_low_h): New variable.
12754 (win32-low.o): Add dependency on $(win32_low_h).
12755 (win32-arm-low.o, win32-i386-low.o): New rules.
12756
f80c84b3
DJ
127572007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12758
12759 * hostio.c: Correct copyright year.
12760
a6b151f1
DJ
127612007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12762
12763 * Makefile.in (OBS): Add hostio.o.
12764 (hostio.o): New rule.
12765 * server.h (handle_vFile): Declare.
12766 * hostio.c: New file.
12767 * server.c (handle_v_requests): Take packet_len and new_packet_len
12768 for binary packets. Call handle_vFile.
12769 (main): Update call to handle_v_requests.
12770
f9387fc3
DJ
127712007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12772
12773 * linux-low.c: Include <sched.h>.
12774
51c2684e
DJ
127752007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12776
12777 * linux-low.c (linux_tracefork_grandchild): New.
12778 (linux_tracefork_child): Use clone.
12779 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12780
75f83163
JB
127812007-10-31 Joel Brobecker <brobecker@adacore.com>
12782
12783 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12784
da5898ce
DJ
127852007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12786
12787 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12788
24a09b5f
DJ
127892007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12790
12791 * inferiors.c (change_inferior_id): Delete.
12792 (add_pid_to_list, pull_pid_from_list): New.
12793 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12794 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12795 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12796 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12797 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12798 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12799 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12800 (using_threads): Always set to 1.
12801 (handle_extended_wait): New.
12802 (add_process): Do not set TID.
12803 (linux_create_inferior): Set must_set_ptrace_flags.
12804 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12805 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12806 (linux_thread_alive): Rename TID argument to LWPID.
12807 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12808 (linux_wait_for_event): Do not use TID or check using_threads. Update
12809 call to dead_thread_notify. Call handle_extended_wait.
12810 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12811 (send_sigstop): Delete sigstop_sent.
12812 (wait_for_sigstop): Avoid TID.
12813 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12814 (linux_test_for_tracefork): New.
12815 (linux_lookup_signals): Use thread_db_active and
12816 linux_supports_tracefork_flag.
12817 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12818 * linux-low.h (get_process_thread): Avoid TID.
12819 (struct process_ifo): Move thread_known and tid to the end. Remove
12820 sigstop_sent.
12821 (linux_attach_lwp, thread_db_init): Update prototypes.
12822 * server.h (change_inferior_id): Delete prototype.
12823 (add_pid_to_list, pull_pid_from_list): New prototypes.
12824 * thread-db.c (thread_db_use_events): New.
12825 (find_first_thread): Rename to...
12826 (find_one_thread): ...this. Update callers and messages. Do not
12827 call fatal. Check thread_db_use_events. Do not call
12828 change_inferior_id or new_thread_notify.
12829 (maybe_attach_thread): Update. Do not call new_thread_notify.
12830 (thread_db_init): Set thread_db_use_events. Check use_events.
12831 * utils.c (fatal, warning): Correct message prefix.
12832
30ed0a8f
DJ
128332007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12834
12835 * Makefile.in (clean): Remove new files.
12836 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12837 (powerpc-64.o, powerpc-64.c): New rules.
12838 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12839 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12840 with SPE.
12841 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12842 SPE targets.
12843 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12844 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12845 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12846 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12847 (target_regsets): Add AltiVec and SPE register sets.
12848 * configure.ac: Check for AltiVec and SPE.
12849 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12850 (ppc_fill_vrregset, ppc_store_vrregset): New.
12851 (target_regsets): Add AltiVec register set.
12852 * configure: Regenerated.
12853
fd462a61
DJ
128542007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12855
12856 * linux-low.c (O_LARGEFILE): Define.
12857 (linux_read_memory): Use /proc/PID/mem.
12858 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12859 * configure, config.in: Regenerated.
12860
69f223ed
DJ
128612007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12862
12863 * linux-low.c (linux_wait_for_event): Do not pass signals while
12864 single-stepping.
12865
aec18585
PA
128662007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12867
12868 * win32-low.c (create_process): New.
12869 (win32_create_inferior): Use create_process instead of
12870 CreateProcess. If create_process failed retry appending an ".exe"
12871 suffix. Store the GetLastError result immediatelly after
12872 create_process calls and use it on the call to error.
12873
34d86ddd
PA
128742007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12875
12876 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12877
5a0e3bd0
JB
128782007-08-23 Joel Brobecker <brobecker@adacore.com>
12879
12880 * configure.ac: Switch license to GPLv3.
12881
f88c79e6
MS
128822007-08-01 Michael Snyder <msnyder@access-company.com>
12883
12884 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12885
6b3d9b83
PA
128862007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12887
12888 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12889 typedef.
12890 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12891 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12892 CloseToolhelp32Snapshot.
12893 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12894 CloseToolhelp32Snapshot.
12895
c588c53c
MS
128962007-07-27 Michael Snyder <michael.snyder@access-company.com>
12897
12898 * server.c (main): Check for inferior exit before main loop.
12899
aa0403d9
PA
129002007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12901
12902 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12903 instead of on tmp_desc.
12904
255e7678
DJ
129052007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12906 Daniel Jacobowitz <dan@codesourcery.com>
12907
12908 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12909 (add_thread): Minor cleanups.
12910 (clear_inferiors): Move lower in the file. Clear the DLL
12911 list.
12912 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12913 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12914 (xml_escape_text): New.
12915 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12916 for qSupported.
12917 (handle_v_cont): Report errors.
12918 (gdbserver_version): Update.
12919 (main): Correct size of own_buf. Do not report initial DLL events.
12920 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12921 (unloaded_dll, xml_escape_text): New.
12922 * win32-low.c (enum target_waitkind): Update comments.
12923 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12924 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12925 (win32_EnumProcessModules, win32_GetModuleInformation)
12926 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12927 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12928 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12929 (win32_Module32First, win32_Module32Next, load_toolhelp)
12930 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12931 (get_child_debug_event): Handle DLL events.
12932 (win32_wait): Likewise.
12933
0d37add9
DJ
129342007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12935
12936 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12937 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12938
45e2715e
PA
129392007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12940
12941 * win32-low.c (handle_output_debug_string): Ignore event if not
12942 waiting.
12943
c5674cf1
PA
129442007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12945
12946 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12947
2bbe3cc1
DJ
129482007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12949
12950 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12951
ae13219e
DJ
129522007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12953
12954 * inferiors.c (change_inferior_id): Add comment.
12955 * linux-low.c (check_removed_breakpoint): Add an early
12956 prototype. Improve debug output.
12957 (linux_attach): Doc update.
12958 (linux_detach_one_process, linux_detach): Clean up before releasing
12959 each process.
12960 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12961 * linux-low.h (struct process_info): Doc improvement.
12962 * mem-break.c (delete_all_breakpoints): New.
12963 * mem-break.h (delete_all_breakpoints): New prototype.
12964 * thread-db.c (find_first_thread): New.
12965 (thread_db_create_event): Call it instead of
12966 thread_db_find_new_threads. Clean up unused variables.
12967 (maybe_attach_thread): Remove first thread handling.
12968 (thread_db_find_new_threads): Use find_first_thread.
12969 (thread_db_get_tls_address): Likewise.
12970
4105de34
DJ
129712007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12972
12973 * thread-db.c (thread_db_find_new_threads): Add prototype.
12974 (thread_db_create_event): Check for the main thread before adding
12975 a new thread.
12976 (maybe_attach_thread): Only enable event reporting if TID == 0.
12977 (thread_db_get_tls_address): Check for new threads.
12978
2b876972
DJ
129792007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
12980
12981 * linux-low.c (linux_create_inferior): Try execv before execvp.
12982 * spu-low.c (spu_create_inferior): Likewise.
12983
7a245884
DJ
129842007-06-13 Mike Frysinger <vapier@gentoo.org>
12985
12986 * linux-low.c (linux_create_inferior): Change execv to execvp.
12987 * spu-low.c (spu_create_inferior): Likewies.
12988
117ce543
DJ
129892007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
12990
12991 * Makefile.in (clean): Clean new files instead of deleted ones.
12992 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12993 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12994 rules.
12995 * configure.srv: Specify XML files and new regformats for MIPS and
12996 MIPS64 GNU/Linux.
12997 * linux-mips-low.c (mips_num_regs): Set to only used registers.
12998 (mips_regmap): Do not fetch $0. Remove unused registers. Add
12999 an entry for the restart register.
13000 (mips_cannot_fetch_register, mips_cannot_store_register)
13001 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13002 register names to match the XML descriptions.
13003 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13004 restart register instead of $0.
13005
0e7f50da
UW
130062007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13007 Markus Deuling <deuling@de.ibm.com>
13008
13009 * remote-utils.c (decode_xfer_write): New function.
13010 * server.h (decode_xfer_write): Add prototype.
13011 * server.c (handle_query): Add PACKET_LEN argument. Support
13012 qXfer:spu:read and qXfer:spu:write packets.
13013 (main): Pass packet_len to handle_query.
13014 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13015 * target.h (target_ops): Add qxfer_spu.
13016
374c1d38
UW
130172007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13018
13019 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13020 accessing non-seekable spufs files.
13021
bb63802a
UW
130222007-05-16 Markus Deuling <deuling@de.ibm.com>
13023
889bf7c5 13024 * server.c (handle_query): Add reply for qC packet.
bb63802a 13025
7390519e
PA
130262007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13027 Leo Zayas <lerele@champenstudios@com>
13028
13029 * server.h (check_remote_input_interrupt_request): New function.
13030 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13031 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13032 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13033 (check_remote_input_interrupt_request): New function.
13034 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13035 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13036 winapi_GenerateConsoleCtrlEvent): New typedefs.
13037 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13038 to 250 ms.
13039 (win32_wait): Check for remote interrupt request
13040 with check_remote_input_interrupt_request.
13041 (win32_request_interrupt): New function.
13042 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13043
34b34921
PA
130442007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13045
13046 * win32-low.c (debug_registers_changed,
13047 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13048 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13049 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13050 (thread_rec): Get context using the low target.
13051 (child_add_thread): Call thread_added on the low target,
13052 which does the same thing.
13053 (regptr): Delete.
13054 (do_initial_child_stuff): Remove debug registers references.
13055 Set context using the low target. Resume threads after
13056 setting the contexts.
13057 (child_continue): Remove dead variable. Remove debug
13058 registers references.
13059 (child_fetch_inferior_registers): Go through the low target.
13060 (do_child_store_inferior_registers): Remove.
13061 (child_store_inferior_registers): Go through the low target.
13062 (win32_resume): Remove debug registers references.
13063 Set context using the low target.
13064 (handle_exception): Change return type to void. Don't record
13065 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13066 first chance exception.
889bf7c5 13067 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13068 goto loop. Always return after waiting for debug event.
13069 (win32_wait): Convert to switch statement. Handle spurious
13070 events.
13071
13072 * win32-i386-low.c (debug_registers_changed,
13073 debug_registers_used): New.
13074 (initial_stuff): Rename to ...
13075 (i386_initial_stuff): ... this. Clear debug registers
13076 state variables.
13077 (store_debug_registers): Delete.
13078 (i386_get_thread_context): New.
13079 (load_debug_registers): Delete.
13080 (i386_set_thread_context): New.
13081 (i386_thread_added): New.
13082 (single_step): Rename to ...
13083 (i386_single_step): ... this.
13084 (do_fetch_inferior_registers): Rename to ...
13085 (i386_fetch_inferior_register): ... this.
13086 (i386_store_inferior_register): New.
13087 (the_low_target): Adapt to new interface.
13088
13089 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13090 (arm_get_thread_context): New.
13091 (arm_set_thread_context): New.
13092 (regptr): New.
13093 (do_fetch_inferior_registers): Rename to ...
13094 (arm_fetch_inferior_register): ... this.
13095 (arm_store_inferior_register): New.
13096 (arm_wince_breakpoint): Reimplement as unsigned long.
13097 (arm_wince_breakpoint_len): Define.
13098 (the_low_target): Adapt to new interface.
13099
13100 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13101 load_debug_registers. Add get_thread_context, set_thread_context,
13102 thread_added and store_inferior_register. Rename
13103 fetch_inferior_registers to fetch_inferior_register.
13104 (regptr): Remove declaration.
13105
dd6953e1
PA
131062007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13107
13108 * linux-low.c (linux_detach): Change return type to int. Return 0.
13109 * spu-low.c (spu_detach): Likewise.
13110
444d6139
PA
131112007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13112
13113 * target.h (target_ops): Change return type of detach to int.
13114 Add join.
13115 (join_inferior): New.
13116 * server.c (main): Don't skip detach support on mingw32.
13117 If the inferior doesn't support detaching return error.
13118 Call join_inferior instead of using waitpid.
13119 * linux-low.c (linux_join): New.
13120 (linux_target_op): Add linux_join.
13121 * spu-low.c (spu_join): New.
13122 (spu_target_ops): Add spu_join.
13123 * win32-low.c (win32_detach): Adapt to new interface.
13124 Reopen current_process_handle before detaching. Issue a child
13125 resume before detaching.
13126 (win32_join): New.
13127 (win32_target_op): Add win32_join.
13128
1d5315fe
PA
131292007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13130
13131 * win32-low.c (win32-attach): Fix return value.
13132 * target.h (target_ops): Describe ATTACH return values.
13133
bf914831
PA
131342007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13135
13136 * win32-low.c (GETPROCADDRESS): Define.
13137 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13138 (winapi_DebugSetProcessKillOnExit): Likewise.
13139 (win32_create_inferior): Force usage of ansi CreateProcessA.
13140 (win32_attach): Use GETPROCADDRESS.
13141 (win32_detach): Likewise.
13142
f72f3e60
PA
131432007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13144
13145 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13146
ed50f18f
PA
131472007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13148
13149 * win32-low.c: Commit leftover changes from 2007-03-29.
13150
0c2ead7e
DJ
131512007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13152
13153 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13154 fields short instead of int. Add explicit padding.
13155 (i387_cache_to_fsave): Remove unnecessary casts.
13156 (i387_fsave_to_cache): Doc fix.
13157 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13158
73725ff3
DJ
131592007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13160
13161 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13162 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13163
d99f33d8
PA
131642007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13165
13166 * configure.srv (arm*-*-mingw32ce*): Move near the other
13167 arm targets.
13168
68070c10
PA
131692007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13170
2482afc6 13171 * configure.ac: Add errno checking.
68070c10
PA
13172 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13173 sys/file.h and malloc.h.
13174 (AC_CHECK_DECLS): Add perror.
13175 (srv_mingwce): Handle.
2482afc6 13176 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
13177 win32-i386-low.o to srv_tgtobj.
13178 (i[34567]86-*-mingw*): Likewise.
13179 (arm*-*-mingw32ce*): Add case.
13180 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13181 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13182 [__MINGW32CE__] (strerror): New function.
13183 [__MINGW32CE__] (errno): Define to GetLastError.
13184 [__MINGW32CE__] (COUNTOF): New macro.
13185 (remote_open): Remove extra close call.
13186 * mem-break.c (delete_breakpoint_at): New function.
13187 * mem-break.h (delete_breakpoint_at): Declare.
13188 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13189 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13190 [USE_WIN32API] (read, write): Add char* casts.
13191 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13192 * server.h: Include wincecompat.h on Windows CE.
13193 [HAVE_ERRNO_H]: Check.
13194 (perror): Declare if not declared.
13195 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13196 (perror_with_name): Remove errno declaration.
13197 * wincecompat.h: New.
13198 * wincecompat.c: New.
13199 * win32-low.h: New.
13200 * win32-arm-low.c: New.
13201 * win32-i386-low.c: New.
13202 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13203 (OUTMSG2): Make it safe.
13204 (_T): New macro.
13205 (COUNTOF): New macro.
13206 (NUM_REGS): Get it from the low target.
13207 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13208 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13209 (thread_rec): Let low target handle debug registers.
13210 (child_add_thread): Likewise.
13211 (child_init_thread_list): Likewise.
13212 (continue_one_thread): Likewise.
13213 (regptr): New.
13214 (do_child_fetch_inferior_registers): Move to ...
13215 * win32-i386-low.c: ... here, and rename to ...
13216 (do_fetch_inferior_registers): ... this.
889bf7c5 13217 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
13218 Go through the low target.
13219 (do_child_store_inferior_registers): Use regptr.
13220 (strwinerror): New function.
13221 (win32_create_inferior): Handle Windows CE.
13222 Use strwinerror instead of strerror on Windows error
13223 codes. Add program to the error output.
13224 Don't close the main thread handle on Windows CE.
13225 (win32_attach): Use coredll.dll on Windows CE.
13226 (win32_kill): Close current process and current
13227 thread handles.
13228 (win32_detach): Use coredll.dll on Windows CE.
13229 (win32_resume): Let low target handle debug registers, and
13230 step request.
13231 (handle_exception): Add/Remove initial breakpoint. Avoid
13232 non-existant WSTOPSIG on Windows CE.
13233 (win32_read_inferior_memory): Cast to remove warning.
13234 (win32_arch_string): Go through the low target.
13235 (initialize_low): Call set_breakpoint_data with the low
13236 target's breakpoint.
13237 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13238 FOP_REGNUM, mappings): Move to ...
13239 * win32-i386-low.c: ... here.
13240 * win32-low.c (win32_thread_info): Move to ...
13241 * win32-low.h: ... here.
13242 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13243 win32-arm-low.c and wincecompat.c.
13244 (all:): Add $EXEEXT.
13245 (install-only:): Likewise.
13246 (gdbserver:): Likewise.
13247 (gdbreplay:): Likewise.
13248 * config.in: Regenerate.
13249 * configure: Regenerate.
13250
41093d81
PA
132512007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13252
13253 * win32-low.c: Rename typedef thread_info to
13254 win32_thread_info throughout.
13255
544afa54
PA
132562007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13257
13258 * win32-i386-low.c: Rename to ...
13259 * win32-low.c: ... this.
13260 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13261 * Makefile.in: Likewise.
13262
bce7165d
PA
132632007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13264
13265 * remote-utils.c (monitor_output): Constify msg parameter.
13266 * server.h (monitor_output): Likewise.
13267 * win32-i386-low.c (handle_output_debug_string): New.
13268 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13269 handle_output_debug_string.
13270 (get_child_debug_event): Likewise.
13271
506c7aa0
DJ
132722007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13273
13274 * server.c (main): Correct strtoul check.
13275
42c81e2a
DJ
132762007-03-27 Jon Ringle <jon@ringle.org>
13277
13278 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13279
9453113a
DJ
132802007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13281
13282 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13283
64a69107
DJ
132842007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13285
13286 * terminal.h: Check HAVE_SGTTY_H.
13287
132882007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
13289
13290 * remote-utils.c (remote_open): Print out the assigned port number.
13291
c74d0ad8
DJ
132922007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13293
13294 * remote-utils.c (monitor_output): New function.
13295 * server.c (debug_threads): Define here.
13296 (monitor_show_help): New function.
13297 (handle_query): Handle qRcmd.
13298 (main): Do not handle 'd' packet.
13299 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13300 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13301 of debug_threads.
13302
de7c3b4a
PA
133032007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13304
13305 * Makefile.in (EXEEXT): New.
13306 (clean): Use $(EXEEXT).
13307
ef57601b
PA
133082007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13309
13310 * target.h (target_ops): Rename send_signal to request_interrupt,
13311 and remove enum target_signal parameter.
13312 * linux-low.c (linux_request_interrupt): Rename from
13313 linux_send_signal, and always send SIGINT.
13314 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13315 and always send SIGINT.
13316 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13317 of send_signal.
13318 (input_interrupt): Likewise.
13319
820f2bda
PA
133202007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13321
13322 * server.c (get_features_xml): Check if target implemented
13323 arch_string.
13324 * win32-i386-low.c (win32_arch_string): New.
13325 (win32_target_ops): Add win32_arch_string as arch_string member.
13326
ab39bf24
UW
133272007-02-22 Markus Deuling <deuling@de.ibm.com>
13328
13329 * spu-low.c (spu_arch_string): New.
13330 (spu_target_ops): Add spu_arch_string.
13331
61ff6e04
DJ
133322007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13333
13334 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13335 * configure.ac: Do not check for terminal.h.
13336 * configure, config.in: Regenerated.
13337
fb1e4ffc
DJ
133382007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13339
13340 * Makefile.in (OBS): Add $(XML_BUILTIN).
13341 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13342 (clean): Update.
13343 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13344 (arm-with-iwmmxt.c): New.
13345 * config.in, configure: Regenerate.
13346 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13347 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13348 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13349 (arm*-*-linux*): Add iWMMXt and regset support.
13350 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13351 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13352 (arm_store_wmmxregset, target_regsets): New.
13353 * server.c (get_features_xml): Take annex argument. Check builtin
13354 XML documents.
13355 (handle_query): Handle multiple annexes.
13356
0f48aa01
DJ
133572007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13358
13359 * remote-utils.c [USE_WIN32API] (read, write): Define.
13360 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13361 write.
13362
23181151
DJ
133632007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13364
13365 * linux-i386-low.c (the_low_target): Set arch_string.
13366 * linux-x86-64-low.c (the_low_target): Likewise.
13367 * linux-low.c (linux_arch_string): New.
13368 (linux_target_ops): Add it.
13369 * linux-low.h (struct linux_target_ops): Add arch_string.
13370 * server.c (write_qxfer_response): Use const void * for DATA.
13371 (get_features_xml): New.
13372 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13373 * target.h (struct target_ops): Add arch_string method.
13374
9d606399
DJ
133752007-01-03 Denis Pilat <denis.pilat@st.com>
13376 Daniel Jacobowitz <dan@codesourcery.com>
13377
13378 * linux-low.c (linux_kill): Handle being called with no threads.
13379 * win32-i386-low.c (win32_kill): Likewise.
13380 (get_child_debug_event): Clear current_process_handle.
13381
133822006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
13383 Daniel Jacobowitz <dan@codesourcery.com>
13384
13385 * remote-utils.c (remote_open): Check the type of specified
13386 serial port devices before opening them.
13387 * server.c (main): Kill the inferior if an error occurs during
13388 the first remote_open.
13389
a5e13d24
DJ
133902006-12-05 Markus Deuling <deuling@de.ibm.com>
13391
13392 * README: Update supported targets.
13393
186947f7
DJ
133942006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13395
13396 * Makefile.in (clean): Remove reg-mips64.c.
13397 (reg-mips64.c, reg-mips64.o): New rules.
13398 * configure.srv: Handle mips64. Include regset support for mips.
13399 * linux-mips-low.c (union mips_register): New.
13400 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13401 (mips_breakpoint, mips_breakpoint_at): Use int.
13402 (mips_collect_register, mips_supply_register)
13403 (mips_collect_register_32bit, mips_supply_register_32bit)
13404 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13405 (mips_store_fpregset, target_regsets): New.
13406 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13407
a13e2c95
UW
134082006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13409
13410 * configure.srv: Add target "spu*-*-*".
13411 * Makefile.in (clean): Remove reg-spu.c.
13412 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13413 * spu-low.c: New file.
13414
cb7283db
DJ
134152006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13416
13417 * configure.ac: Correct td_thr_tls_get_addr test.
13418 * configure: Regenerated.
13419
89be2091
DJ
134202006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13421
13422 * linux-low.c (linux_wait_for_event): Reformat. Use the
13423 pass_signals array.
13424 * remote-utils.c (decode_address_to_semicolon): New.
13425 * server.c (pass_signals, handle_general_set): New.
13426 (handle_query): Mention QPassSignals for qSupported.
13427 (main): Call handle_general_set.
13428 * server.h (pass_signals, decode_address_to_semicolon): New.
13429
000ef4f0
DJ
134302006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13431
13432 * server.c (handle_query): Correct error handling for read_auxv.
13433
b7149293
UW
134342005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13435
13436 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13437 and srv_linux_thread_db to yes.
13438 * linux-s390-low.c (s390_fill_gregset): New function.
13439 (target_regsets): Define data structure.
13440
dae5f5cf
DJ
134412006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13442
13443 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13444 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13445 * config.in, configure: Regenerated.
13446 * inferiors.c (gdb_id_to_thread): New function.
13447 (gdb_id_to_thread_id): Use it.
13448 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13449 * linux-low.h (struct process_info): Add th member.
13450 (thread_db_get_tls_address): New prototype.
13451 * remote-utils.c (decode_address): Make non-static.
13452 * server.c (handle_query): Handle qGetTLSAddr.
13453 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13454 * target.h (struct target_ops): Add get_tls_address.
13455 * thread-db.c (maybe_attach_thread): Save the thread handle.
13456 (thread_db_get_tls_address): New.
13457
32ca6d61
DJ
134582006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13459
13460 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13461 (linux_resume_one_process): Take a siginfo_t *. Update all
13462 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13463 (struct pending_signals): Add a siginfo_t.
13464 (linux_wait_for_process): Always set last_status.
13465 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13466 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13467 * linux-low.h (struct process_info): Add last_status.
13468
5ffff7c1
DJ
134692006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13470
13471 * remote-utils.c (try_rle): New function.
13472 (putpkt_binary): Use it.
13473
8695c747
DJ
134742006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13475
13476 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13477 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13478 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13479 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13480 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13481 point registers.
13482
290fadea
RS
134832006-08-08 Richard Sandiford <richard@codesourcery.com>
13484
13485 * server.c (terminal_fd): New variable.
13486 (old_foreground_pgrp): Likewise.
13487 (restore_old_foreground_pgrp): New function.
13488 (start_inferior): Record the terminal file descriptor in terminal_fd
13489 and its original foreground group in old_foreground_pgrp. Register
13490 restore_old_foreground_pgrp with atexit().
13491
9f2e1e63
DJ
134922006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13493
13494 * server.c (handle_query): Correct qPart to qXfer.
13495
b80864fb
DJ
134962006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13497
13498 * configure.ac: Check for more headers which are missing on
13499 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13500 * configure.srv: Add Cygwin and mingw32.
13501 * remote-utils.c: Don't include headers unconditionally which
13502 are missing on mingw32. Include <winsock.h> for mingw32.
13503 (remote_open): Adjust for mingw32 support. Flush
13504 standard error after writing to it.
13505 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13506 (unblock_async_io, enable_async_io, disable_async_io)
13507 (readchar, getpkt): Update for Winsock support.
13508 (prepare_resume_reply): Expect a protocol signal number.
13509 * server.c: Disable <sys/wait.h> on mingw32.
13510 (start_inferior): Adjust for mingw32 support. Flush
13511 standard error after writing to it.
13512 (attach_inferior): Likewise. Use protocol signal
13513 numbers.
13514 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13515 and names.
13516 * win32-i386-low.c: New file.
13517 * Makefile.in (XM_CLIBS): Set.
13518 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13519 (win32-i386-low.o): New dependency rule.
13520 * linux-low.c (linux_wait): Use target signal numbers.
13521 * target.h (struct target_ops): Doc fix.
13522 * server.h (target_signal_to_name): New prototype.
13523 * gdbreplay.c: Don't include headers unconditionally which
13524 are missing on mingw32. Include <winsock.h> for mingw32.
13525 (remote_close, remote_open): Adjust for Winsock support.
13526 * configure, config.in: Regenerated.
13527
0876f84a
DJ
135282006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13529
13530 * server.c (decode_xfer_read, write_qxfer_response): New.
13531 (handle_query): Take a packet length argument. Handle
13532 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13533 the qSupported response.
13534 (main): Update call to handle_query.
13535
01f9e8fa
DJ
135362006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13537
13538 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13539 (putpkt_binary): Renamed from putpkt and adjusted for binary
13540 data.
13541 (putpkt): New wrapper for putpkt_binary.
13542 (readchar): Don't mask off the high bit.
13543 (decode_X_packet): New function.
13544 * server.c (main): Call putpkt_binary if a handler sets the packet
13545 length. Save the length of the incoming packet. Handle 'X'.
13546 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13547
be2a5f71
DJ
135482006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13549
13550 * server.c (handle_query): Handle qSupported.
13551
ea025f5f
DJ
135522006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13553
13554 * remote-utils.c (all_symbols_looked_up): New variable.
13555 (look_up_one_symbol): Check it.
13556 * server.h (look_up_one_symbol): New declaration.
13557 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13558
9308fc88
DJ
135592006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13560
13561 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 13562 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
13563 (PTRACE_GET_THREAD_AREA): Define.
13564 (ps_get_thread_area): New function.
13565
52fb6437
NS
135662006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13567
13568 * configure.srv (m68k*-*-uclinux*): New target.
13569 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13570 (linux_resume_one_process): Remove extraneous cast.
13571 (linux_read_offsets): New.
13572 (linux_target_op): Add linux_read_offsets on mmuless systems.
13573 * server.c (handle_query): Add qOffsets logic.
13574 * target.h (struct target_ops): Add read_offsets.
13575
21b0f40c
DJ
135762006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13577
13578 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13579 (PTRACE_GET_THREAD_AREA): Define.
13580 (ps_get_thread_area): New function.
13581 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13582 (linux-x86-64-low.o): Update.
13583
0050a760
DJ
135842006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13585
13586 * configure.ac: Remove checks for prfpregset_t.
13587 * gdb_proc_service.h: New file.
13588 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13589 new "gdb_proc_service.h".
13590 * proc-service.c: Likewise.
13591 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13592 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13593 * Makefile.in (gdb_proc_service_h): Updated.
13594 * configure, config.in: Regenerated.
13595
b92a518e
DJ
135962006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13597
13598 * remote-utils.c (prepare_resume_reply): Move declaration
13599 of gdb_id_from_wait to the top of the block.
13600
545587ee
DJ
136012006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13602
13603 * linux-low.c (regsets_store_inferior_registers): Read the regset
13604 from the target before filling it.
13605
9db87ebd
DJ
136062006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13607
13608 * server.c (attach_inferior): Return SIGTRAP for a successful
13609 attach.
13610
dd24457d
DJ
136112006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13612
13613 * Makefile.in (OBS): Add version.o.
13614 (STAGESTUFF): Delete.
13615 (version.o): Add dependencies.
13616 (version.c): Replace rule.
13617 (clean): Remove version.c.
13618 * server.c (gdbserver_version): New.
13619 (gdbserver_usage): Use printf.
13620 (main): Handle --version and --help.
13621 * server.h (version, host_name): Add declarations.
13622
6f0f660e
EZ
136232005-12-23 Eli Zaretskii <eliz@gnu.org>
13624
889bf7c5
PA
13625 * linux-arm-low.c:
13626 * linux-arm-low.c:
13627 * inferiors.c:
13628 * i387-fp.h:
13629 * i387-fp.c:
13630 * gdbreplay.c:
13631 * regcache.c:
13632 * proc-service.c:
13633 * mem-break.h:
13634 * mem-break.c:
13635 * linux-x86-64-low.c:
13636 * linux-sh-low.c:
13637 * linux-s390-low.c:
13638 * linux-ppc64-low.c:
13639 * linux-ppc-low.c:
13640 * linux-mips-low.c:
13641 * linux-m68k-low.c:
13642 * linux-m32r-low.c:
13643 * linux-low.h:
13644 * linux-low.c:
13645 * linux-ia64-low.c:
13646 * linux-i386-low.c:
13647 * linux-crisv32-low.c:
13648 * thread-db.c:
13649 * terminal.h:
13650 * target.h:
13651 * target.c:
13652 * server.h:
13653 * server.c:
13654 * remote-utils.c:
13655 * regcache.h:
13656 * utils.c:
13657 * Makefile.in:
13658 * configure.ac:
6f0f660e
EZ
13659 * gdbserver.1: Add (C) after Copyright. Update the FSF
13660 address.
13661
9d1fb177
DJ
136622005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13663
13664 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13665 (arm_breakpoint_at): Recognize both breakpoints.
13666 (the_low_target): Use the correct breakpoint instruction.
13667
011a70c2
DJ
136682005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13669
13670 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13671 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13672 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13673 (the_low_target): Update.
13674
7fb85e41
AS
136752005-10-25 Andreas Schwab <schwab@suse.de>
13676
13677 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13678
13679 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13680 (ia64_num_regs): Reduce to 462.
13681
3db0444b
DJ
136822005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13683
13684 * acinclude.m4: Correct quoting.
13685 * aclocal.m4: Regenerated.
13686
13687 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13688 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13689 (thread_db_init): Call thread_db_err_str.
13690 * configure.ac: Check for TD_VERSION.
13691 * config.in, configure: Regenerated.
13692
bee0189a
DJ
136932005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13694
13695 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13696
e9d25b98
DJ
136972005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13698
13699 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13700 is not available. Define HAVE_PTRACE_GETREGS if it is.
13701 * config.in, configure: Regenerated.
13702 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13703 * linux-i386-low.c, linux-m68k-low.c: Update to use
13704 HAVE_PTRACE_GETREGS.
13705 * linux-low.c (regsets_fetch_inferior_registers)
13706 (regsets_store_inferior_registers): Only return 0 if we processed
13707 GENERAL_REGS.
13708 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13709 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13710
a06660f7
DJ
137112005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13712
13713 * inferiors.c (struct thread_info): Add gdb_id.
13714 (add_thread): Add gdb_id argument.
13715 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13716 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13717 calls to add_thread.
13718 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13719 * server.c (handle_query): Use thread_to_gdb_id.
13720 (handle_v_cont, main): Use gdb_id_to_thread_id.
13721 * server.h (add_thread): Update prototype.
13722 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13723 prototypes.
13724
5a1f5858
DJ
137252005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13726
13727 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13728 left-padded registers.
13729 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13730 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13731
e122f1f5
SE
137322005-07-01 Steve Ellcey <sje@cup.hp.com>
13733
13734 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13735 * configure: Regenerate.
13736 * config.in: Regenerate.
13737 * server.h (NEED_DECLARATION_STRERROR):
13738 Replace with !HAVE_DECL_STRERROR.
13739
d592fa2f
DJ
137402005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13741
13742 * linux-low.c (linux_wait, linux_send_signal): Don't test
13743 an unsigned long variable for > 0 if it could be MAX_ULONG.
13744 * server.c (myresume): Likewise.
13745 * target.c (set_desired_inferior): Likewise.
13746
ccbd4912
MK
137472005-06-13 Mark Kettenis <kettenis@gnu.org>
13748
13749 * configure.ac: Simplify and improve check for socklen_t.
13750 * configure, config.in: Regenerate.
13751
f450004a
DJ
137522005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13753
13754 * acconfig.h: Remove.
13755 * configure.ac: Add a test for socklen_t. Use three-argument
13756 AC_DEFINE throughout.
13757 * config.in: Regenerated using autoheader 2.59.
13758 * configure: Regenerated.
13759
13760 * gdbreplay.c (socklen_t): Provide a default.
13761 (remote_open): Use socklen_t.
13762 * remote-utils.c (socklen_t): Provide a default.
13763 (remote_open): Use socklen_t.
13764 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13765 unsigned char.
13766
13767 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13768 char for buffers.
13769 * linux-low.c (linux_read_memory, linux_write_memory)
13770 (linux_read_auxv): Likewise.
13771 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13772 (check_mem_write): Likewise.
13773 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13774 Likewise.
13775 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13776 (registers_from_string, register_data): Likewise.
13777 * server.c (handle_query, main): Likewise.
13778 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13779 (decode_M_packet): Likewise.
13780 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13781 * target.h (struct target_ops): Update read_memory, write_memory,
13782 and read_auxv.
13783 (read_inferior_memory, write_inferior_memory): Update.
13784 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13785 to unsigned char *.
13786 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13787 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13788 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13789 linux-s390-low.c, linux-sh-low.c: Update for changes in
13790 read_inferior_memory and the_low_target->breakpoint.
13791
eee84df1
DJ
137922005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13793
13794 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13795 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13796 * configure.srv: Add powerpc64-*-linux*.
13797 * linux-ppc64-low.c: New file.
13798
45b134e5
OF
137992005-05-23 Orjan Friberg <orjanf@axis.com>
13800
13801 * linux-cris-low.c: New file with support for CRIS.
13802 * linux-crisv32-low.c: Ditto for CRISv32.
13803 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13804 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 13805 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
13806 reg-crisv32.o, and reg-crisv32.c to make rules.
13807 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13808 recognized targets.
13809
48d93c75
UW
138102005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13811
13812 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13813 of sizeof (PTRACE_XFER_TYPE).
13814 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13815
e013ee27
OF
138162005-05-12 Orjan Friberg <orjanf@axis.com>
13817
889bf7c5 13818 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
13819 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13820 pointers for hardware watchpoint support.
13821 * linux-low.h (struct linux_target_ops): Ditto.
13822 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13823 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13824 to linux_target_ops.
13825 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13826 reply packet.
13827 * server.c (main): Recognize 'Z' and 'z' packets.
13828
b0ded00b
UW
138292005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13830
13831 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13832 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13833 (the_low_target): Add new members.
13834
8643e2ad
DJ
138352005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13836
13837 * proc-service.c (ps_lgetregs): Search all_processes instead of
13838 all_threads.
13839
fc620387
DJ
138402005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13841
13842 * server.c (start_inferior): Change return type to int.
13843 (attach_inferior): Change sigptr to int *.
13844 (handle_v_cont, handle_v_requests): Change signal to int *.
13845 (main): Change signal to int.
13846
138472005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
13848
13849 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13850 * configure.srv: Add m32r*-*-linux*.
13851 * linux-m32r-low.c: New file.
13852
e0e76420
DJ
138532005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13854
13855 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13856
a1928bad
DJ
138572005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13858
13859 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13860 Take unsigned long arguments for PIDs.
13861 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13862 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13863 (wait_for_sigstop, linux_resume_one_process)
13864 (regsets_fetch_inferior_registers, linux_send_signal)
13865 (linux_read_auxv): Likewise. Update the types of variables holding
13866 PIDs. Update format string specifiers.
13867 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13868 * remote-utils.c (prepare_resume_reply): Likewise.
13869 * server.c (cont_thread, general_thread, step_thread)
13870 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13871 unsigned long.
13872 (handle_query): Update format specifiers.
13873 (handle_v_cont, main): Use strtoul for thread IDs.
13874 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13875 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13876 (general_thread, step_thread, thread_from_wait)
13877 (old_thread_from_wait): Update.
13878 * target.h (struct thread_resume): Use unsigned long for THREAD.
13879 (struct target_ops): Use unsigned long for arguments to attach and
13880 thread_alive.
13881
dcdb98d2
DJ
138822005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13883
13884 * acinclude.m4: Include bfd/bfd.m4 directly.
13885 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13886 <agriffis@toolchain.org>.
13887 * aclocal.m4, configure: Regenerated.
13888
bec39cab
AC
138892005-01-07 Andrew Cagney <cagney@gnu.org>
13890
13891 * configure.ac: Rename configure.in, require autoconf 2.59.
13892 * configure: Re-generate.
13893
434c4c77
DJ
138942004-12-08 Daniel Jacobowitz <dan@debian.org>
13895
13896 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13897 LIBS when finished.
13898 * aclocal.m4: Regenerated.
13899 * configure: Regenerated.
13900
db1d3e1b
AS
139012004-11-21 Andreas Schwab <schwab@suse.de>
13902
13903 * linux-m68k-low.c (m68k_num_gregs): Define.
13904 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13905 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13906 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13907 (m68k_breakpoint_at): New. Add to the_low_target.
13908
13909 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13910 srv_linux_thread_db to yes.
13911
43360365
JB
139122004-10-20 Joel Brobecker <brobecker@gnat.com>
13913
13914 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13915 (ARCH_SET_FS): Likewise.
13916 (ARCH_GET_FS): Likewise.
13917 (ARCH_GET_GS): Likewise.
13918
fd500816
DJ
139192004-10-16 Daniel Jacobowitz <dan@debian.org>
13920
13921 * linux-i386-low.c (ps_get_thread_area): New.
13922 * linux-x86-64-low.c (ps_get_thread_area): New.
13923 * linux-low.c: Include <sys/syscall.h>.
13924 (linux_kill_one_process): Don't kill the first thread here.
13925 (linux_kill): Kill the first thread here.
13926 (kill_lwp): New function.
13927 (send_sigstop, linux_send_signal): Use it.
13928 * proc-service.c: Clean up #ifdefs.
13929 (fpregset_info): Delete.
13930 (ps_lgetregs): Update and enable implementation.
13931 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13932 implementations.
13933 * remote-utils.c (struct sym_cache, symbol_cache): New.
13934 (input_interrupt): Print a clearer message.
13935 (async_io_enabled): New variable.
13936 (enable_async_io, disable_async_io): Use it. Update comments.
13937 (look_up_one_symbol): Use the symbol cache.
13938 * thread-db.c (thread_db_look_up_symbols): New function.
13939 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13940
f6de3c42
DJ
139412004-10-16 Daniel Jacobowitz <dan@debian.org>
13942
13943 * configure.in: Test for -rdynamic.
13944 * configure: Regenerated.
13945 * Makefile (INTERNAL_LDFLAGS): New.
13946 (gdbserver, gdbreplay): Use it.
13947
2c0fc042
AC
139482004-09-02 Andrew Cagney <cagney@gnu.org>
13949
13950 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13951
075b3282
DJ
139522004-03-23 Daniel Jacobowitz <drow@mvista.com>
13953
13954 * linux-low.c (linux_wait): Clear all_processes list also.
13955
fa6a77dc
DJ
139562004-03-12 Daniel Jacobowitz <drow@mvista.com>
13957
13958 * linux-low.c: Include <errno.h>. Remove extern declaration of
13959 errno.
13960
6d782a97
DJ
139612004-03-12 Daniel Jacobowitz <drow@mvista.com>
13962
13963 * gdbreplay.c, server.h, utils.c: Update copyright years.
13964
3a7fb99b
DJ
139652004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13966
13967 * server.c (main): Print child status or termination signal from
13968 variable 'signal', not 'sig'.
13969
c3e735a6
DJ
139702004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13971
13972 * linux-low.c (linux_read_memory): Change return type to
13973 int. Check for and return error from ptrace().
13974 * target.c (read_inferior_memory): Change return type to int. Pass
13975 back return status from the_target->read_memory().
13976 * target.h (struct target_ops): Adapt *read_memory() prototype.
13977 Update comment.
13978 (read_inferior_memory): Adapt prototype.
13979 * server.c (main): Return an error packet if
13980 read_inferior_memory() returns an error.
13981
a59d1c82
DJ
139822004-03-04 Daniel Jacobowitz <drow@mvista.com>
13983
13984 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13985 Unify with other clean targets.
13986
dc3f8883
DJ
139872004-02-29 Daniel Jacobowitz <drow@mvista.com>
13988
13989 * server.c (handle_v_cont): Call set_desired_inferior.
13990
89a208da
DJ
139912004-02-29 Daniel Jacobowitz <drow@mvista.com>
13992
13993 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13994
62ea82f5
DJ
139952004-02-29 Daniel Jacobowitz <drow@mvista.com>
13996
13997 * linux-low.c (linux_wait): Unblock async I/O.
13998 (linux_resume): Block and enable async I/O.
13999 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14000 * server.h (block_async_io, unblock_async_io): Add prototypes.
14001
6910d122
DJ
140022004-02-29 Daniel Jacobowitz <drow@mvista.com>
14003
14004 * remote-utils.c (remote_open): Print a status notice after
14005 opening a TCP port.
14006 * server.c (attach_inferior): Print a status notice after
14007 attaching.
14008
140092004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14010
14011 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14012
c89dc5d4
DJ
140132004-02-26 Daniel Jacobowitz <drow@mvista.com>
14014
14015 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14016 error packet.
14017 * server.c, target.h: Update copyright years.
14018
4b8dad4a
RM
140192004-02-25 Roland McGrath <roland@redhat.com>
14020
14021 * target.h (struct target_ops): New member `read_auxv'.
14022 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14023 * linux-low.c (linux_read_auxv): New function.
14024 (linux_target_ops): Initialize `read_auxv' member to that.
14025
d7446758
JB
140262004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14027
14028 Committed by Jim Blandy <jimb@redhat.com>.
14029
14030 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14031 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14032 instead of GPR_SIZE to distiguish s390 and s390x targets.
14033
5544ad89
DJ
140342004-01-31 Daniel Jacobowitz <drow@mvista.com>
14035
14036 * linux-low.c: Update copyright year.
14037 (check_removed_breakpoint): Clear pending_is_breakpoint.
14038 (linux_set_resume_request, linux_queue_one_thread)
14039 (resume_status_pending_p): New functions.
14040 (linux_continue_one_thread): Use process->resume.
14041 (linux_resume): Only resume threads if there are no pending events.
14042 * linux-low.h (struct process_info): Add resume request
14043 pointer.
14044
2a68b70e
DJ
140452004-01-30 Daniel Jacobowitz <drow@mvista.com>
14046
14047 * regcache.c (new_register_cache): Clear the allocated register
14048 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14049
64386c31
DJ
140502003-10-13 Daniel Jacobowitz <drow@mvista.com>
14051
14052 * linux-low.c (linux_resume): Take a struct thread_resume *
14053 argument.
14054 (linux_wait): Update call.
14055 (resume_ptr): New static variable.
14056 (linux_continue_one_thread): Renamed from
14057 linux_continue_one_process. Use resume_ptr.
14058 (linux_resume): Use linux_continue_one_thread.
14059 * server.c (handle_v_cont, handle_v_requests): New functions.
14060 (myresume): New function.
14061 (main): Handle 'v' case.
14062 * target.h (struct thread_resume): New type.
14063 (struct target_ops): Change argument of "resume" to struct
14064 thread_resume *.
14065 (myresume): Delete macro.
14066
c938e9b0
L
140672003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14068
14069 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14070 (uninstall): Support DESTDIR.
14071
7f313d07
BC
14072Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14073
14074 * configure.srv: Add xscale*linux copy of arm*linux entry.
14075
3b2fc2ea
DJ
140762003-07-24 Daniel Jacobowitz <drow@mvista.com>
14077
14078 * linux-arm-low.c (arm_reinsert_addr): New function.
14079 (the_low_target): Add arm_reinsert_addr.
14080
1c0a559e
MK
140812003-07-08 Mark Kettenis <kettenis@gnu.org>
14082
14083 * mem-break.c: Remove whitespace at end of file.
14084
43d5792c
DJ
140852003-06-28 Daniel Jacobowitz <drow@mvista.com>
14086
14087 * configure.in: Check whether we need to prototype strerror.
14088 * server.h: Optionally prototype strerror.
14089 * gdbreplay.c (perror_with_name): Use strerror.
14090 * linux-low.c (linux_attach_lwp): Use strerror.
14091 * utils.c (perror_with_name): Use strerror.
14092 * config.in, configure: Regenerated.
14093
c8a86edf
DJ
140942003-06-28 Daniel Jacobowitz <drow@mvista.com>
14095
14096 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14097 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14098
73d37363
DJ
140992003-06-20 Daniel Jacobowitz <drow@mvista.com>
14100
14101 * Makefile.in (SFILES): Update.
14102 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14103 low-sun3.c: Remove files.
14104
6ad8ae5c
DJ
141052003-06-17 Daniel Jacobowitz <drow@mvista.com>
14106
14107 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14108 (linux_detach_one_process, linux_detach): New functions.
14109 (linux_target_ops): Add linux_detach.
14110 * server.c (main): Handle 'D' packet.
14111 * target.h (struct target_ops): Add "detach" member.
14112 (detach_inferior): Define.
14113
1581182a
MK
141142003-06-13 Mark Kettenis <kettenis@gnu.org>
14115
14116 From Kelley Cook <kelleycook@wideopenwest.com>:
14117 * configure.srv: Accept i[34567]86 variants.
14118
e5379b03
DJ
141192003-06-05 Daniel Jacobowitz <drow@mvista.com>
14120
14121 * linux-low.c (linux_wait_for_event): Correct comment typos.
14122 (linux_resume_one_process): Call check_removed_breakpoint.
14123 (linux_send_signal): New function.
14124 (linux_target_ops): Add linux_send_signal.
14125 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14126 of kill.
14127 * target.h (struct target_ops): Add send_signal.
14128
2ff29de4
JB
141292003-05-29 Jim Blandy <jimb@redhat.com>
14130
14131 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14132 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14133 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14134 away part of the register's value.
14135
254787d4
DJ
141362003-03-26 Daniel Jacobowitz <drow@mvista.com>
14137
14138 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14139 (linux_wait_for_event, linux_init_signals): Likewise.
14140
94e10508
DJ
141412003-03-17 Daniel Jacobowitz <drow@mvista.com>
14142
14143 * configure.in: Check for stdlib.h.
14144 * configure: Regenerated.
14145 * config.in: Regenerated.
14146
4c0711e0
DJ
141472003-01-04 Andreas Schwab <schwab@suse.de>
14148
14149 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14150
ef66e766
AC
141512003-01-02 Andrew Cagney <ac131313@redhat.com>
14152
14153 * Makefile.in: Remove obsolete code.
14154
a1358604
DJ
141552002-11-20 Daniel Jacobowitz <drow@mvista.com>
14156
14157 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14158 defined(PT_FPR0_HI).
14159
23ce3b1c
DJ
141602002-11-17 Stuart Hughes <seh@zee2.com>
14161
14162 * linux-arm-low.c (arm_num_regs): Increase.
14163 (arm_regmap): Include status register.
14164
141652002-11-17 Daniel Jacobowitz <drow@mvista.com>
14166
14167 * linux-low.c (register_addr): Remove incorrect -1 check.
14168
a9fa9f7d
DJ
141692002-08-29 Daniel Jacobowitz <drow@mvista.com>
14170
14171 * linux-low.c (linux_create_inferior): Call setpgid. Return
14172 the new PID.
14173 (unstopped_p, linux_signal_pid): Remove.
14174 (linux_target_ops): Remove linux_signal_pid.
14175 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14176 global instead of target method.
14177 * target.h (struct target_ops): Remove signal_pid. Update comment
14178 for create_inferior.
14179 * server.c (signal_pid): New variable.
14180 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 14181 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
14182 (attach_inferior): Set signal_pid.
14183
17574093
DJ
141842002-08-23 Daniel Jacobowitz <drow@mvista.com>
14185
14186 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14187
141882002-08-20 Jim Blandy <jimb@redhat.com>
14189
14190 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14191 default for this.
14192
141932002-08-01 Andrew Cagney <cagney@redhat.com>
14194
14195 * Makefile.in: Make chill references obsolete.
14196
141972002-07-24 Kevin Buettner <kevinb@redhat.com>
14198
14199 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14200 * configure: Regenerate.
14201 * config.in: Regenerate.
14202
142032002-07-09 David O'Brien <obrien@FreeBSD.org>
14204
14205 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14206 (perror_with_name, remote_close, remote_open, expect, play): Static.
14207
142082002-07-04 Michal Ludvig <mludvig@suse.cz>
14209
4b8dad4a 14210 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
14211 byte offsets instead of an array of indexes.
14212 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14213
142142002-06-13 Daniel Jacobowitz <drow@mvista.com>
14215
14216 * regcache.c: Add comment.
14217
142182002-06-11 Daniel Jacobowitz <drow@mvista.com>
14219
14220 * thread-db.c: New file.
14221 * proc-service.c: New file.
14222 * acinclude.m4: New file.
14223 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14224 proc-service.o, and thread-db.o.
14225 (linux-low.o): Add USE_THREAD_DB.
14226 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14227 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14228 * aclocal.m4: Regenerated.
14229 * config.in: Regenerated.
14230 * configure: Regenerated.
14231 * configure.in: Check for proc_service.h, sys/procfs.h,
14232 thread_db.h, and linux/elf.h headrs.
14233 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14234 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14235 Check for -lthread_db and thread support.
14236 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14237 PowerPC, and SuperH.
14238 * i387-fp.c: Constify arguments.
14239 * i387-fp.h: Likewise.
14240 * inferiors.c: (struct thread_info): Renamed from
14241 `struct inferior_info'. Remove PID member. Use generic inferior
14242 list header. All uses updated.
14243 (inferiors, signal_pid): Removed.
14244 (all_threads): New variable.
14245 (get_thread): Define.
14246 (add_inferior_to_list): New function.
14247 (for_each_inferior): New function.
14248 (change_inferior_id): New function.
14249 (add_inferior): Removed.
14250 (remove_inferior): New function.
14251 (add_thread): New function.
14252 (free_one_thread): New function.
14253 (remove_thread): New function.
14254 (clear_inferiors): Use for_each_inferior and free_one_thread.
14255 (find_inferior): New function.
14256 (find_inferior_id): New function.
14257 (inferior_target_data): Update argument type.
14258 (set_inferior_target_data): Likewise.
14259 (inferior_regcache_data): Likewise.
14260 (set_inferior_regcache_data): Likewise.
14261 * linux-low.c (linux_bp_reinsert): Remove.
14262 (all_processes, stopping_threads, using_thrads)
14263 (struct pending_signals, debug_threads, pid_of): New.
14264 (inferior_pid): Replace with macro.
14265 (struct inferior_linux_data): Remove.
14266 (get_stop_pc, add_process): New functions.
14267 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14268 Use add_process and add_thread.
14269 (linux_attach_lwp): New function, based on old linux_attach. Use
14270 add_process and add_thread. Set stop_expected for new threads.
14271 (linux_attach): New function.
14272 (linux_kill_one_process): New function.
14273 (linux_kill): Kill all LWPs.
14274 (linux_thread_alive): Use find_inferior_id.
14275 (check_removed_breakpoints, status_pending_p): New functions.
14276 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14277 Update. Use WNOHANG. Wait for cloned processes also. Update process
14278 struct for the found process.
14279 (linux_wait_for_event): New function.
14280 (linux_wait): Use it. Support LWPs.
14281 (send_sigstop, wait_for_sigstop, stop_all_processes)
14282 (linux_resume_one_process, linux_continue_one_process): New functions.
14283 (linux_resume): Support LWPs.
14284 (REGISTER_RAW_SIZE): Remove.
14285 (fetch_register): Use register_size instead. Call supply_register.
14286 (usr_store_inferior_registers): Likewise. Call collect_register.
14287 Fix recursive case.
14288 (regsets_fetch_inferior_registers): Improve error message.
14289 (regsets_store_inferior_registers): Add debugging.
14290 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14291 (unstopped_p, linux_signal_pid): New functions.
14292 (linux_target_ops): Add linux_signal_pid.
14293 (linux_init_signals): New function.
14294 (initialize_low): Call it. Initialize using_threads.
14295 * regcache.c (inferior_regcache_data): Add valid
14296 flag.
14297 (get_regcache): Fetch registers lazily. Add fetch argument
14298 and update all callers.
14299 (regcache_invalidate_one, regcache_invalidate): New
14300 functions.
14301 (new_register_cache): Renamed from create_register_cache.
14302 Return the new regcache.
14303 (free_register_cache): Change argument to a void *.
14304 (registers_to_string, registers_from_string): Call get_regcache
14305 with fetch flag set.
14306 (register_data): Make static. Pass fetch flag to get_regcache.
14307 (supply_register): Call get_regcache with fetch flag clear.
14308 (collect_register): Call get_regcache with fetch flag set.
14309 (collect_register_as_string): New function.
14310 * regcache.h: Update.
14311 * remote-utils.c (putpkt): Flush after debug output and use
14312 stderr.
14313 Handle input interrupts while waiting for an ACK.
14314 (input_interrupt): Use signal_pid method.
14315 (getpkt): Flush after debug output and use stderr.
14316 (outreg): Use collect_register_as_string.
14317 (new_thread_notify, dead_thread_notify): New functions.
14318 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14319 and general_thread.
14320 (look_up_one_symbol): Flush after debug output.
14321 * server.c (step_thread, server_waiting): New variables.
14322 (start_inferior): Don't use signal_pid. Update call to mywait.
14323 (attach_inferior): Update call to mywait.
14324 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14325 (main): Don't fetch/store registers explicitly. Use
14326 set_desired_inferior. Support proposed ``Hs'' packet. Update
14327 calls to mywait.
14328 * server.h: Update.
14329 (struct inferior_list, struct_inferior_list_entry): New.
14330 * target.c (set_desired_inferior): New.
14331 (write_inferior_memory): Constify.
14332 (mywait): New function.
14333 * target.h: Update.
14334 (struct target_ops): New signal_pid method.
14335 (mywait): Removed macro, added prototype.
14336
14337 * linux-low.h (regset_func): Removed.
14338 (regset_fill_func, regset_store_func): New.
14339 (enum regset_type): New.
14340 (struct regset_info): Add type field. Use new operation types.
14341 (struct linux_target_ops): stop_pc renamed to get_pc.
14342 Add decr_pc_after_break and breakpoint_at.
14343 (get_process, get_thread_proess, get_process_thread)
14344 (strut process_info, all_processes, linux_attach_lwp)
14345 (thread_db_init): New.
14346
14347 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14348 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14349 (the_low_target): Add new members.
14350 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14351 (i386_store_fpxregset): Constify.
14352 (target_regsets): Add new kind identifier.
14353 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14354 (i386_set_pc): Add debugging.
14355 (i386_breakpoint_at): New function.
14356 (the_low_target): Add new members.
14357 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14358 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14359 (mips_breakpoint_at): New.
14360 (the_low_target): Add new members.
14361 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14362 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14363 (the_low_target): Add new members.
14364 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14365 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14366 (the_low_target): Add new members.
14367 * linux-x86-64-low.c (target_regsets): Add new kind
14368 identifier.
14369
143702002-05-15 Daniel Jacobowitz <drow@mvista.com>
14371
14372 From Martin Pool <mbp@samba.org>:
14373 * server.c (gdbserver_usage): New function.
14374 (main): Call it.
14375
143762002-05-14 Daniel Jacobowitz <drow@mvista.com>
14377
14378 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14379 stop_at -> stop_pc.
14380
143812002-05-04 Andrew Cagney <ac131313@redhat.com>
14382
14383 * Makefile.in: Remove obsolete code.
14384
143852002-04-24 Michal Ludvig <mludvig@suse.cz>
14386
14387 * linux-low.c (regsets_fetch_inferior_registers),
14388 (regsets_store_inferior_registers): Removed cast to int from
14389 ptrace() calls.
14390 * regcache.h: Added declaration of struct inferior_info.
14391
143922002-04-20 Daniel Jacobowitz <drow@mvista.com>
14393
14394 * inferiors.c (struct inferior_info): Add regcache_data.
14395 (add_inferior): Call create_register_cache.
14396 (clear_inferiors): Call free_register_cache.
14397 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14398 * regcache.c (struct inferior_regcache_data): New.
14399 (registers): Remove.
14400 (get_regcache): New function.
14401 (create_register_cache, free_register_cache): New functions.
14402 (set_register_cache): Don't initialize the register cache here.
14403 (registers_to_string, registers_from_string, register_data): Call
14404 get_regcache.
14405 * regcache.h: Add prototypes.
14406 * server.h: Likewise.
14407
144082002-04-20 Daniel Jacobowitz <drow@mvista.com>
14409
14410 * mem-break.c: New file.
14411 * mem-break.h: New file.
14412 * Makefile.in: Add mem-break.o rule; update server.h
14413 dependencies.
14414 * inferiors.c (struct inferior_info): Add target_data
14415 member.
14416 (clear_inferiors): Free target_data member if set.
14417 (inferior_target_data, set_inferior_target_data): New functions.
14418 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14419 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14420 * linux-low.c (linux_bp_reinsert): New variable.
14421 (struct inferior_linux_data): New.
14422 (linux_create_inferior): Use set_inferior_target_data.
14423 (linux_attach): Likewise. Call add_inferior.
14424 (linux_wait_for_one_inferior): New function.
14425 (linux_wait): Call it.
14426 (linux_write_memory): Add const.
14427 (initialize_low): Call set_breakpoint_data.
14428 * linux-low.h (struct linux_target_ops): Add breakpoint
14429 handling members.
14430 * server.c (attach_inferior): Remove extra add_inferior
14431 call.
14432 * server.h: Include mem-break.h. Update inferior.c
14433 prototypes.
14434 * target.c (read_inferior_memory)
14435 (write_inferior_memory): New functions.
14436 * target.h (read_inferior_memory)
14437 (write_inferior_memory): Change macros to prototypes.
14438 (struct target_ops): Update comments. Add const to write_memory
14439 definition.
14440
144412002-04-11 Daniel Jacobowitz <drow@mvista.com>
14442
14443 * linux-low.c (usr_store_inferior_registers): Support
14444 registers which are allowed to fail to store.
14445 * linux-low.h (linux_target_ops): Likewise.
14446 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14447 (ppc_cannot_store_register): FPSCR may not be storable.
14448
144492002-04-09 Daniel Jacobowitz <drow@mvista.com>
14450
14451 * server.h: Include <string.h> if HAVE_STRING_H.
14452 * ChangeLog: Correct paths in last ChangeLog entry.
14453
144542002-04-09 Daniel Jacobowitz <drow@mvista.com>
14455
14456 * linux-low.h: Remove obsolete prototypes.
14457 (struct linux_target_ops): New.
14458 (extern the_low_target): New.
14459 * linux-low.c (num_regs, regmap): Remove declarations.
14460 (register_addr): Use the_low_target explicitly.
14461 (fetch_register): Likewise.
14462 (usr_fetch_inferior_registers): Likewise.
14463 (usr_store_inferior_registers): Likewise.
14464 * linux-arm-low.c (num_regs): Remove.
14465 (arm_num_regs): Define.
14466 (arm_regmap): Renamed from regmap, made static.
14467 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14468 made static.
14469 (arm_cannot_store_register): Renamed from cannot_store_register,
14470 made static.
14471 (the_low_target): New.
14472 * linux-i386-low.c (num_regs): Remove.
14473 (i386_num_regs): Define.
14474 (i386_regmap): Renamed from regmap, made static.
14475 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14476 made static.
14477 (i386_cannot_store_register): Renamed from cannot_store_register,
14478 made static.
14479 (the_low_target): New.
14480 * linux-ia64-low.c (num_regs): Remove.
14481 (ia64_num_regs): Define.
14482 (ia64_regmap): Renamed from regmap, made static.
14483 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14484 made static.
14485 (ia64_cannot_store_register): Renamed from cannot_store_register,
14486 made static.
14487 (the_low_target): New.
14488 * linux-m68k-low.c (num_regs): Remove.
14489 (m68k_num_regs): Define.
14490 (m68k_regmap): Renamed from regmap, made static.
14491 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14492 made static.
14493 (m68k_cannot_store_register): Renamed from cannot_store_register,
14494 made static.
14495 (the_low_target): New.
14496 * linux-mips-low.c (num_regs): Remove.
14497 (mips_num_regs): Define.
14498 (mips_regmap): Renamed from regmap, made static.
14499 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14500 made static.
14501 (mips_cannot_store_register): Renamed from cannot_store_register,
14502 made static.
14503 (the_low_target): New.
14504 * linux-ppc-low.c (num_regs): Remove.
14505 (ppc_num_regs): Define.
14506 (ppc_regmap): Renamed from regmap, made static.
14507 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14508 made static.
14509 (ppc_cannot_store_register): Renamed from cannot_store_register,
14510 made static.
14511 (the_low_target): New.
14512 * linux-s390-low.c (num_regs): Remove.
14513 (s390_num_regs): Define.
14514 (s390_regmap): Renamed from regmap, made static.
14515 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14516 made static.
14517 (s390_cannot_store_register): Renamed from cannot_store_register,
14518 made static.
14519 (the_low_target): New.
14520 * linux-sh-low.c (num_regs): Remove.
14521 (sh_num_regs): Define.
14522 (sh_regmap): Renamed from regmap, made static.
14523 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14524 made static.
14525 (sh_cannot_store_register): Renamed from cannot_store_register,
14526 made static.
14527 (the_low_target): New.
14528 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14529 (the_low_target): New.
14530
145312002-04-09 Daniel Jacobowitz <drow@mvista.com>
14532
14533 * Makefile.in: Add stamp-h target.
14534 * configure.in: Create stamp-h.
14535 * configure: Regenerated.
14536
145372002-04-09 Daniel Jacobowitz <drow@mvista.com>
14538
14539 * inferiors.c: New file.
14540 * target.c: New file.
14541 * target.h: New file.
14542 * Makefile.in: Add target.o and inferiors.o. Update
14543 dependencies.
14544 * linux-low.c (inferior_pid): New static variable,
14545 moved from server.c.
14546 (linux_create_inferior): Renamed from create_inferior.
14547 Call add_inferior. Return 0 on success instead of a PID.
14548 (linux_attach): Renamed from myattach.
14549 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14550 (linux_thread_alive): Renamed from mythread_alive.
14551 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14552 child dies.
14553 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14554 (regsets_store_inferior_registers): Correct error message.
14555 Add missing ``return 0''.
14556 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14557 (linux_store_registers): Renamed from store_inferior_registers.
14558 (linux_read_memory): Renamed from read_inferior_memory.
14559 (linux_write_memory): Renamed from write_inferior_memory.
14560 (linux_target_ops): New structure.
14561 (initialize_low): Call set_target_ops ().
14562 * remote-utils.c (unhexify): New function.
14563 (hexify): New function.
14564 (input_interrupt): Send signals to ``signal_pid''.
14565 * server.c (inferior_pid): Remove.
14566 (start_inferior): Update create_inferior call.
14567 (attach_inferior): Call add_inferior.
14568 (handle_query): New function.
14569 (main): Call handle_query for `q' packets.
14570 * server.h: Include "target.h". Remove obsolete prototypes.
14571 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14572
145732002-04-09 Daniel Jacobowitz <drow@mvista.com>
14574
14575 * Makefile.in: Add WARN_CFLAGS. Update configury
14576 dependencies.
14577 * configure.in: Check for <string.h>
14578 * configure: Regenerate.
14579 * config.in: Regenerate.
14580 * gdbreplay.c: Include needed system headers.
14581 (remote_open): Remove strchr prototype.
14582 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14583 * regcache.c (supply_register): Change buf argument to const void *.
14584 (supply_register_by_name): Likewise.
14585 (collect_register): Change buf argument to void *.
14586 (collect_register_by_name): Likewise.
14587 * regcache.h: Add missing prototypes.
14588 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14589 * server.c (handle_query): New function.
14590 (attached): New static variable, moved out of main.
14591 (main): Quiet longjmp clobber warnings.
14592 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14593 * utils.c (error): Remove NORETURN.
14594 (fatal): Likewise.
This page took 1.672978 seconds and 4 git commands to generate.