Remove code that checks for GNU/non-GNU make
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
3b165252
SM
12016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
5 make.
6 * configure.ac: Remove checks for the make program.
7 * configure: Re-generate.
8
0bcda685
PA
92016-10-28 Pedro Alves <palves@redhat.com>
10
11 * Makefile.in (CXX_DIALECT): Get from configure.
12 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
13 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
14 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
15 * config.in: Regenerate.
16 * configure: Regenerate.
17
c3805894
YQ
182016-10-27 Yao Qi <yao.qi@linaro.org>
19
20 * linux-low.c (linux_supports_range_stepping): Return true if
21 can_software_single_step return true.
22
89342618
YQ
232016-10-27 Yao Qi <yao.qi@linaro.org>
24
25 * inferiors.c (find_inferior_in_random): New function.
26 * inferiors.h (find_inferior_in_random): Declare.
27 * linux-low.c (linux_wait_for_event_filtered): Call
28 find_inferior_in_random instead of find_inferior.
29
e3652c84
YQ
302016-10-27 Yao Qi <yao.qi@linaro.org>
31
32 * linux-low.c (linux_wait_1): If single-step breakpoints are
33 inserted, remove them.
34
5a04c4cf
PA
352016-10-26 Pedro Alves <palves@redhat.com>
36
37 * linux-low.c (handle_extended_wait): Link parent/child fork
38 threads.
39 (linux_wait_1): Unlink them.
40 (linux_set_resume_request): Ignore resume requests for
41 already-resumed and unhandled fork child threads.
42 * linux-low.h (struct lwp_info) <fork_relative>: New field.
43 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
44 New functions.
45 (handle_v_requests) <vCont>: Don't call require_running.
46 * server.h (in_queued_stop_replies): New declaration.
47
cb93dc7f
YQ
482016-10-24 Yao Qi <yao.qi@linaro.org>
49
50 PR server/20733
51 * linux-aarch64-low.c (append_insns): Cast the return value to
52 'uint32_t *'.
53
a1078bea
YQ
542016-10-10 Yao Qi <yao.qi@linaro.org>
55
56 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
57
1fb77080
SDJ
582016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
59
60 * target.c (target_supports_multi_process): New function, moved
61 from...
62 * target.h (target_supports_multi_process): ... here. Remove
63 macro.
64
39b5a3b9
TT
652016-10-05 Tom Tromey <tom@tromey.com>
66
67 PR remote/20655:
68 * tracepoint.c (handle_tracepoint_bkpts): Check
69 ipa_error_tracepoint, not ipa_stopping_tracepoint.
70
c1d0b70a
YQ
712016-10-05 Yao Qi <yao.qi@linaro.org>
72
73 * configure.srv: Update the path of arm-*.xml files.
74
0a69eedb
YQ
752016-10-05 Terry Guo <terry.guo@arm.com>
76 Yao Qi <yao.qi@linaro.org>
77
78 * Makefile.in: Adjust the path of rules.
79 * configure.srv: Update the path of xml files.
80 * regformats/arm-with-iwmmxt.dat: Regenerated.
81 * regformats/arm-with-neon.dat: Likewise.
82 * regformats/arm-with-vfpv2.dat: Likewise.
83 * regformats/arm-with-vfpv3.dat Likewise.
84
17e16485
YQ
852016-09-30 Yao Qi <yao.qi@linaro.org>
86
87 PR gdbserver/20627
88 * target.c (target_stop_and_wait): Don't call
89 target_continue_no_signal, use resume_stop instead.
90
edeeb602
YQ
912016-09-26 Yao Qi <yao.qi@linaro.org>
92
93 * linux-low.c (linux_wait_1): Call debug_exit.
94
503b1c39
PA
952016-09-23 Pedro Alves <palves@redhat.com>
96
97 * Makefile.in (SFILES): Add common/new-op.c.
98 (OBS): Add common/new-op.o.
99 (new-op.o): New rule.
100
74172ecf
SM
1012016-09-21 Simon Marchi <simon.marchi@ericsson.com>
102
103 * .gitinore: Ignore more files.
104
fc6cda2e
YQ
1052016-09-21 Yao Qi <yao.qi@linaro.org>
106
107 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
108 23.
109
bc1e6c81
SDJ
1102016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
111
112 * server.c (start_inferior): Call target_mourn_inferior instead of
113 mourn_inferior; pass ptid_t argument to it.
114 (resume): Likewise.
115 (handle_target_event): Likewise.
116 * target.c (target_mourn_inferior): New function.
117 * target.h (mourn_inferior): Delete macro.
118
0e00e962
AA
1192016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
120
121 * linux-low.c (lwp_is_stepping): New function.
122
1d8cb77d
CL
1232016-09-06 Carl Love <cel@us.ibm.com>
124
125 * server.c (start_inferior): Fixed comment, requested comment change
126 didn't get updated correctly. Removed reference to ptrace () call as
127 it is only true on Linux systems.
128
7313bced
CL
1292016-09-06 Carl Love <cel@us.ibm.com>
130
131 * server.c (start_inferior): Do not call
132 function target_post_create_inferior () if the
133 inferior process has already exited.
134
cf6de44d
PA
1352016-09-05 Pedro Alves <palves@redhat.com>
136
137 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
138 (COMPILE.pre, CC_LD): Use CXX directly.
139 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
140 * acinclude.m4: Don't include build-with-cxx.m4.
141 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
142 * configure: Regenerate.
143
c1da6748
AT
1442016-09-02 Akash Trehan <akash.trehan123@gmail.com>
145
146 PR gdb/19495
147 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
148 call writing data to own_buf.
149
f2b9e3df
SDJ
1502016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
151
152 * target.c (mywait): Call target_wait instead of
153 the_target->wait.
154 (target_wait): New function.
155
049a8570
SDJ
1562016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
157
158 * server.c (start_inferior): New variable 'ptid'. Replace calls
159 to the_target->resume by target_continue{,_no_signal}, depending
160 on the case.
161 * target.c (target_stop_and_wait): Call target_continue_no_signal
162 instead of the_target->resume.
163 (target_continue): New function.
164
3aa5cfa0
AT
1652016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
166
167 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
168
754653a7
AZ
1692016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
170
171 PR server/20491
172 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
173 ps_prochandle.
174 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
175 * linux-arm-low.c (ps_get_thread_area): Likewise.
176 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
177 * linux-m68k-low.c (ps_get_thread_area): Likewise.
178 * linux-mips-low.c (ps_get_thread_area): Likewise.
179 * linux-nios2-low.c (ps_get_thread_area): Likewise.
180 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
181 * linux-x86-low.c (ps_get_thread_area): Likewise.
182 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
183
ed036b40
PA
1842016-08-19 Pedro Alves <palves@redhat.com>
185
186 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
187
c8ef42ee
PA
1882016-08-19 Pedro Alves <palves@redhat.com>
189
190 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
191 comment. Use memcpy instead of casting through unsigned long.
192
9c235a72
PA
1932016-08-19 Pedro Alves <palves@redhat.com>
194
195 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
196 allocating around 0x80000000.
197
201506da
PA
1982016-08-19 Pedro Alves <palves@redhat.com>
199
200 PR gdb/20415
201 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
202 (x32-avx512-linux-ipa.o): New rules.
203 * configure.ac (x86_64-*-linux*): New x32 check.
204 * configure.srv (ipa_x32_linux_regobj): New.
205 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
206 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
207 descriptions.
208 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
209 descriptions.
210 * configure: Regenerate.
211
f348d89a
PA
2122016-08-09 Pedro Alves <palves@redhat.com>
213
214 PR gdb/18653
215 * Makefile.in (OBS): Add signals-state-save-restore.o.
216 (signals-state-save-restore.o): New rule.
217 * config.in: Regenerate.
218 * configure: Regenerate.
219 * linux-low.c: Include "signals-state-save-restore.h".
220 (linux_create_inferior): Call
221 restore_original_signals_state.
222 * server.c: Include "dispositions-save-restore.h".
223 (captured_main): Call save_original_signals_state.
224
1baf5149
PA
2252016-08-05 Pedro Alves <palves@redhat.com>
226
227 * configure: Regenerate.
228
fcd4a73d
YQ
2292016-08-04 Yao Qi <yao.qi@linaro.org>
230
231 * linux-low.c (regsets_fetch_inferior_registers): Check
232 errno is ESRCH or not.
233
979659d0
YQ
2342016-08-02 Yao Qi <yao.qi@linaro.org>
235
236 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
237 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
238 (thread_db_load_search): Update.
239 (try_thread_db_load_1): Don't look for td_ta_event_addr,
240 td_ta_set_event and td_ta_event_getmsg.
241
6598661d
PA
2422016-07-26 Pedro Alves <palves@redhat.com>
243
244 PR server/20414
245 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
246 of unsigned long for 64-bit registers and use uint32_t instead of
247 unsigned int for 32-bit registers.
248
9cf12d57
PA
2492016-07-26 Pedro Alves <palves@redhat.com>
250
251 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
252 to 'ptrace'.
253
305450ed
TT
2542016-07-21 Tom Tromey <tom@tromey.com>
255
256 * configure: Rebuild.
257
2583da7c
YQ
2582016-07-21 Yao Qi <yao.qi@linaro.org>
259
260 * mem-break.c (find_gdb_breakpoint): Cast bp to
261 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
262
21536b36
YQ
2632016-07-21 Yao Qi <yao.qi@linaro.org>
264
265 * server.c (handle_v_requests): Support s and S actions
266 if target_supports_software_single_step return true.
267
8901d193
YQ
2682016-07-21 Yao Qi <yao.qi@linaro.org>
269
270 * linux-low.c (resume_stopped_resumed_lwps): If resume request
271 is resume_step, call maybe_hw_step.
272 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
273 and unstop them.
274 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
275 breakpoints or not.
276 (proceed_one_lwp): If resume request is resume_step, install
277 reinsert breakpoints and call maybe_hw_step.
278
0e9a339e
YQ
2792016-07-21 Yao Qi <yao.qi@linaro.org>
280
281 * linux-low.c (proceed_one_lwp): Declare.
282 (linux_resume_one_thread): Remove local variable 'step'.
283 Lift code enqueue signal. Call proceed_one_lwp instead of
284 linux_resume_one_lwp.
285
4281b351
YQ
2862016-07-21 Yao Qi <yao.qi@linaro.org>
287
288 * linux-low.c (linux_resume_one_thread): Call
289 enqueue_pending_signal.
290
984a2c04
YQ
2912016-07-21 Yao Qi <yao.qi@linaro.org>
292
293 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
294 * inferiors.c (do_restore_current_thread_cleanup): New function.
295 (make_cleanup_restore_current_thread): Likewise.
296 * linux-low.c (install_software_single_step_breakpoints): Call
297 make_cleanup_restore_current_thread. Switch current_thread to
298 thread.
299
bec903c9
YQ
3002016-07-21 Yao Qi <yao.qi@linaro.org>
301
302 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
303 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
304 (clone_one_breakpoint): Likewise.
305 (delete_reinsert_breakpoints): Change parameter to thread.
306 Callers updated.
307 (has_reinsert_breakpoints): Likewise.
308 (uninsert_reinsert_breakpoints): Likewise.
309 (reinsert_reinsert_breakpoints): Likewise.
310 * mem-break.h (set_reinsert_breakpoint): Update declaration.
311 (delete_reinsert_breakpoints): Likewise.
312 (reinsert_reinsert_breakpoints): Likewise.
313 (uninsert_reinsert_breakpoints): Likewise.
314 (has_reinsert_breakpoints): Likewise.
315
63c40ec7
YQ
3162016-07-21 Yao Qi <yao.qi@linaro.org>
317
318 * inferiors.c (get_thread_process): Make parameter const.
319 * inferiors.h (get_thread_process): Update declaration.
320 * mem-break.c (clone_all_breakpoints): Remove all parameters.
321 Add new parameters child_thread and parent_thread. Callers
322 updated.
323 * mem-break.h (clone_all_breakpoints): Update declaration.
324
9aa76cd0
YQ
3252016-07-21 Yao Qi <yao.qi@linaro.org>
326
327 * mem-break.c (struct breakpoint) <cond_list>: Remove.
328 <command_list, handler>: Remove.
329 (struct gdb_breakpoint): New.
330 (struct other_breakpoint): New.
331 (struct reinsert_breakpoint): New.
332 (is_gdb_breakpoint): New function.
333 (any_persistent_commands): Update command_list if
334 is_gdb_breakpoint returns true.
335 (set_breakpoint): Create breakpoints according to their types.
336 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
337 (set_gdb_breakpoint_1): Likewise.
338 (set_gdb_breakpoint): Likewise.
339 (clear_breakpoint_conditions): Change parameter type to
340 'struct gdb_breakpoint *'.
341 (clear_breakpoint_commands): Likewise.
342 (clear_breakpoint_conditions_and_commands): Likewise.
343 (add_condition_to_breakpoint): Likewise.
344 (add_breakpoint_condition): Likewise.
345 (add_commands_to_breakpoint): Likewise.
346 (check_breakpoints): Check other_breakpoint.
347 (clone_one_breakpoint): Clone breakpopint according to its type.
348 * mem-break.h (struct gdb_breakpoint): Declare.
349 (set_gdb_breakpoint): Update declaration.
350 (clear_breakpoint_conditions_and_commands): Likewise.
351 (add_breakpoint_condition): Likewise.
352 (add_breakpoint_commands): Likewise.
353 * server.c (process_point_options): Change parameter type to
354 'struct gdb_breakpoint *'.
355
811f8301
YQ
3562016-07-21 Yao Qi <yao.qi@linaro.org>
357
358 * mem-break.c (set_breakpoint_at): Rename it to ...
359 (set_breakpoint_type_at): ... it.
360 (set_breakpoint_at): Call set_breakpoint_type_at.
361 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
362 * mem-break.h (set_breakpoint_at): Update comments.
363
b1c51e36
CLT
3642016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
365
366 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
367 to buf parameter.
368 (nios2_store_gregset): Likewise.
369
ced2dffb
PA
3702016-07-01 Pedro Alves <palves@redhat.com>
371 Antoine Tremblay <antoine.tremblay@ericsson.com>
372
373 * linux-low.c: Change interface to take the target lwp_info
374 pointer directly and return void. Handle detaching from a zombie
375 thread.
376 (linux_detach_lwp_callback): New function.
377 (linux_detach): Detach from the leader thread after detaching from
378 the clone threads.
379
2ac09a5b
YQ
3802016-06-28 Yao Qi <yao.qi@linaro.org>
381
382 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
383 for variable new_offset.
384 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
385 (aarch64_ftrace_insn_reloc_cb): Likewise.
386 (aarch64_ftrace_insn_reloc_tb): Likewise.
387 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
388 PRIx64 instead of PRIx32.
389
79e7fd4f
YQ
3902016-06-28 Yao Qi <yao.qi@linaro.org>
391
392 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
393 (the_low_target): Install arm_get_syscall_trapinfo.
394
061fc021
YQ
3952016-06-28 Yao Qi <yao.qi@linaro.org>
396
397 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
398 function.
399 (the_low_target): Install aarch64_get_syscall_trapinfo.
400
4cc32bec
YQ
4012016-06-28 Yao Qi <yao.qi@linaro.org>
402
403 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
404 Callers updated.
405 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
406 Remove parameter sysno.
407 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
408 sysret.
409
782c1122
AA
4102016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
411
412 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
413 (s390_emit_ne_goto): Likewise.
414 (s390_emit_lt_goto): Likewise.
415 (s390_emit_le_goto): Likewise.
416 (s390_emit_gt_goto): Likewise.
417 (s390_emit_ge_goto): Likewise.
418 (s390x_emit_eq_goto): Likewise.
419 (s390x_emit_ne_goto): Likewise.
420 (s390x_emit_lt_goto): Likewise.
421 (s390x_emit_le_goto): Likewise.
422 (s390x_emit_gt_goto): Likewise.
423 (s390x_emit_ge_goto): Likewise.
424 (s390_emit_ops_impl): Mark variable static.
425 (s390x_emit_ops): Likewise.
426
2e7b624b
YQ
4272016-06-17 Yao Qi <yao.qi@linaro.org>
428
429 * linux-low.c (handle_extended_wait): Call
430 uninsert_reinsert_breakpoints for the parent process. Remove
431 reinsert breakpoints from the child process. Reinsert them to
432 the parent process when vfork is done.
433 * mem-break.c (uninsert_reinsert_breakpoints): New function.
434 (reinsert_reinsert_breakpoints): New function.
435 * mem-break.h (uninsert_reinsert_breakpoints): Declare
436 (reinsert_reinsert_breakpoints): Declare.
437
8a81c5d7
YQ
4382016-06-17 Yao Qi <yao.qi@linaro.org>
439
440 * linux-low.c (handle_extended_wait): If the parent is doing
441 step-over, remove the reinsert breakpoints from the forked child.
442
f50bf8e5
YQ
4432016-06-17 Yao Qi <yao.qi@linaro.org>
444
445 * linux-low.c (unsuspend_all_lwps): Declare.
446 (linux_low_filter_event): If thread exited, call finish_step_over.
447 If step-over is finished, unsuspend other threads.
448
8376a3cb
YQ
4492016-06-17 Yao Qi <yao.qi@linaro.org>
450
451 * linux-low.c (linux_resume_one_lwp_throw): Assert
452 has_reinsert_breakpoints returns false.
453 * mem-break.c (delete_disabled_breakpoints): Assert
454 bp type isn't reinsert_breakpoint.
455
f79b145d
YQ
4562016-06-17 Yao Qi <yao.qi@linaro.org>
457
458 * linux-low.c (maybe_hw_step): New function.
459 (linux_resume_one_lwp_throw): Call maybe_hw_step.
460 (finish_step_over): Switch current_thread to lwp temporarily,
461 and assert has_reinsert_breakpoints returns true.
462 (proceed_one_lwp): Call maybe_hw_step.
463 * mem-break.c (has_reinsert_breakpoints): New function.
464 * mem-break.h (has_reinsert_breakpoints): Declare.
465
0ae534d2
JT
4662016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
467
468 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
469
fcdad592
YQ
4702016-05-17 Yao Qi <yao.qi@linaro.org>
471
472 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
473 instead of find_inferior.
474
9e784964
YQ
4752016-05-05 Yao Qi <yao.qi@linaro.org>
476
477 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
478 Initialize res to zero.
479
cf2ebb6e
YQ
4802016-05-05 Yao Qi <yao.qi@linaro.org>
481
482 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
483 to uint32_t.
484
c1aebf87
UW
4852016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
486
487 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
488 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
489 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
490
35fd2deb 4912016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 492 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
493
494 * tracepoint.c (write_inferior_int8): New function.
495 (cmd_qtenable_disable): Write enable flag using
496 write_inferior_int8.
497
484b3c32
YQ
4982016-04-25 Yao Qi <yao.qi@linaro.org>
499
500 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
501 (need_step_over_p): Return zero if the LWP has pending signals
502 can be delivered on software single step target.
503
85ba7d86
YQ
5042016-04-25 Yao Qi <yao.qi@linaro.org>
505
506 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
507 return instead of error.
508
3539aa13
YQ
5092016-04-22 Yao Qi <yao.qi@linaro.org>
510
511 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
512 to 23.
513
5b061e98
YQ
5142016-04-22 Yao Qi <yao.qi@linaro.org>
515
516 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
517 signal when stepping over breakpoint with software single
518 step.
519
3451269c
PA
5202016-04-21 Pedro Alves <palves@redhat.com>
521
522 * linux-s390-low.c (s390_collect_ptrace_register)
523 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
524 add casts.
525 (s390_check_regset): Use void * instead of gdb_byte *.
526
a2358508
PA
5272016-04-20 Pedro Alves <palves@redhat.com>
528
529 * configure: Renegerate.
530
6885166d
YQ
5312016-04-20 Yao Qi <yao.qi@linaro.org>
532
533 * linux-aarch32-low.c: Include "arch/arm-linux.h".
534 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
535 number 16.
536 (arm_store_gregset): Likewise.
537
2b863f51
WT
5382016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
539
540 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
541 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
542 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
543 (amd64-avx-mpx-linux.c): New rules.
544 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
545 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
546 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
547 (srv_amd64_regobj): Add amd64-avx-mpx.o.
548 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
549 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
550 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
551 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
552 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
553 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
554 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
555 * linux-x86-low.c (x86_linux_read_description): Add case for
556 X86_XSTATE_AVX_MPX_MASK.
557 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
558 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
559 init_registers_i386_avx_mpx_linux.
560 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
561 (initialize_low_tracepoint): Call
562 init_registers_i386_avx_mpx_linux.
563 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
564 (initialize_low_tracepoint): Call
565 init_registers_amd64_avx_mpx_linux.
566 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
567 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
568 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
569 declarations.
570
9b30624b
PA
5712016-04-18 Pedro Alves <palves@redhat.com>
572
573 * configure: Regenerate.
574
45e3745e
AT
5752016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
576
577 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
578 (aarch64_emit_sub): Likewise.
579
2afc13ff
PA
5802016-04-12 Pedro Alves <palves@redhat.com>
581
582 * utils.c (prepare_to_throw_exception): Delete.
583
6e774b13
SM
5842016-04-05 Simon Marchi <simon.marchi@ericsson.com>
585
586 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
587
4dca19f8
MK
5882016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
589
590 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
591
d0a9981f
MK
5922016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
593
594 * linux-aarch64-ipa.c: Add <elf.h> include.
595 * linux-ppc-ipa.c: Add <elf.h> include.
596 * linux-s390-ipa.c: Add <elf.h> include.
597
252db07e
MK
5982016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
599
600 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
601 (get_raw_reg_ptr): Likewise.
602 (get_trace_state_variable_value_ptr): Likewise.
603 (set_trace_state_variable_value_ptr): Likewise.
604 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
605 char *.
606
14e2b6d9
MK
6072016-03-31 Wei-cheng Wang <cole945@gmail.com>
608 Marcin Kościelnicki <koriakin@0x04.net>
609
610 PR/17221
611 * linux-ppc-low.c (emit_insns): New function.
612 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
613 (ppc_emit_prologue): New function.
614 (ppc_emit_epilogue): New function.
615 (ppc_emit_add): New function.
616 (ppc_emit_sub): New function.
617 (ppc_emit_mul): New function.
618 (ppc_emit_lsh): New function.
619 (ppc_emit_rsh_signed): New function.
620 (ppc_emit_rsh_unsigned): New function.
621 (ppc_emit_ext): New function.
622 (ppc_emit_zero_ext): New function.
623 (ppc_emit_log_not): New function.
624 (ppc_emit_bit_and): New function.
625 (ppc_emit_bit_or): New function.
626 (ppc_emit_bit_xor): New function.
627 (ppc_emit_bit_not): New function.
628 (ppc_emit_equal): New function.
629 (ppc_emit_less_signed): New function.
630 (ppc_emit_less_unsigned): New function.
631 (ppc_emit_ref): New function.
632 (ppc_emit_const): New function.
633 (ppc_emit_reg): New function.
634 (ppc_emit_pop): New function.
635 (ppc_emit_stack_flush): New function.
636 (ppc_emit_swap): New function.
637 (ppc_emit_stack_adjust): New function.
638 (ppc_emit_call): New function.
639 (ppc_emit_int_call_1): New function.
640 (ppc_emit_void_call_2): New function.
641 (ppc_emit_if_goto): New function.
642 (ppc_emit_goto): New function.
643 (ppc_emit_eq_goto): New function.
644 (ppc_emit_ne_goto): New function.
645 (ppc_emit_lt_goto): New function.
646 (ppc_emit_le_goto): New function.
647 (ppc_emit_gt_goto): New function.
648 (ppc_emit_ge_goto): New function.
649 (ppc_write_goto_address): New function.
650 (ppc_emit_ops_impl): New static variable.
651 (ppc64v1_emit_prologue): New function.
652 (ppc64v2_emit_prologue): New function.
653 (ppc64_emit_epilogue): New function.
654 (ppc64_emit_add): New function.
655 (ppc64_emit_sub): New function.
656 (ppc64_emit_mul): New function.
657 (ppc64_emit_lsh): New function.
658 (ppc64_emit_rsh_signed): New function.
659 (ppc64_emit_rsh_unsigned): New function.
660 (ppc64_emit_ext): New function.
661 (ppc64_emit_zero_ext): New function.
662 (ppc64_emit_log_not): New function.
663 (ppc64_emit_bit_and): New function.
664 (ppc64_emit_bit_or): New function.
665 (ppc64_emit_bit_xor): New function.
666 (ppc64_emit_bit_not): New function.
667 (ppc64_emit_equal): New function.
668 (ppc64_emit_less_signed): New function.
669 (ppc64_emit_less_unsigned): New function.
670 (ppc64_emit_ref): New function.
671 (ppc64_emit_const): New function.
672 (ppc64v1_emit_reg): New function.
673 (ppc64v2_emit_reg): New function.
674 (ppc64_emit_pop): New function.
675 (ppc64_emit_stack_flush): New function.
676 (ppc64_emit_swap): New function.
677 (ppc64v1_emit_call): New function.
678 (ppc64v2_emit_call): New function.
679 (ppc64v1_emit_int_call_1): New function.
680 (ppc64v2_emit_int_call_1): New function.
681 (ppc64v1_emit_void_call_2): New function.
682 (ppc64v2_emit_void_call_2): New function.
683 (ppc64_emit_if_goto): New function.
684 (ppc64_emit_eq_goto): New function.
685 (ppc64_emit_ne_goto): New function.
686 (ppc64_emit_lt_goto): New function.
687 (ppc64_emit_le_goto): New function.
688 (ppc64_emit_gt_goto): New function.
689 (ppc64_emit_ge_goto): New function.
690 (ppc64v1_emit_ops_impl): New static variable.
691 (ppc64v2_emit_ops_impl): New static variable.
692 (ppc_emit_ops): New function.
693 (linux_low_target): Wire in ppc_emit_ops.
694
a2174ba4
MK
6952016-03-31 Wei-cheng Wang <cole945@gmail.com>
696 Marcin Kościelnicki <koriakin@0x04.net>
697
698 PR/17221
699 * Makefile.in: Add powerpc-*-ipa.o
700 * configure.srv: Add ipa_obj for powerpc*-linux.
701 * linux-ppc-ipa.c: New file.
702 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
703 includes.
704 (PPC_FIELD): New macro.
705 (PPC_SEXT): New macro.
706 (PPC_OP6): New macro.
707 (PPC_BO): New macro.
708 (PPC_LI): New macro.
709 (PPC_BD): New macro.
710 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
711 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
712 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
713 (ppc_get_thread_area): New function.
714 (is_elfv2_inferior): New function.
715 (gen_ds_form): New function.
716 (GEN_STD): New macro.
717 (GEN_STDU): New macro.
718 (GEN_LD): New macro.
719 (GEN_LDU): New macro.
720 (gen_d_form): New function.
721 (GEN_ADDI): New macro.
722 (GEN_ADDIS): New macro.
723 (GEN_LI): New macro.
724 (GEN_LIS): New macro.
725 (GEN_ORI): New macro.
726 (GEN_ORIS): New macro.
727 (GEN_LWZ): New macro.
728 (GEN_STW): New macro.
729 (GEN_STWU): New macro.
730 (gen_xfx_form): New function.
731 (GEN_MFSPR): New macro.
732 (GEN_MTSPR): New macro.
733 (GEN_MFCR): New macro.
734 (GEN_MTCR): New macro.
735 (GEN_SYNC): New macro.
736 (GEN_LWSYNC): New macro.
737 (gen_x_form): New function.
738 (GEN_OR): New macro.
739 (GEN_MR): New macro.
740 (GEN_LWARX): New macro.
741 (GEN_STWCX): New macro.
742 (GEN_CMPW): New macro.
743 (gen_md_form): New function.
744 (GEN_RLDICL): New macro.
745 (GEN_RLDICR): New macro.
746 (gen_i_form): New function.
747 (GEN_B): New macro.
748 (GEN_BL): New macro.
749 (gen_b_form): New function.
750 (GEN_BNE): New macro.
751 (GEN_LOAD): New macro.
752 (GEN_STORE): New macro.
753 (gen_limm): New function.
754 (gen_atomic_xchg): New function.
755 (gen_call): New function.
756 (ppc_relocate_instruction): New function.
757 (ppc_install_fast_tracepoint_jump_pad): New function.
758 (ppc_get_min_fast_tracepoint_insn_len): New function.
759 (ppc_get_ipa_tdesc_idx): New function.
760 (the_low_target): Wire in the new functions.
761 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
762 tdescs.
763 * linux-ppc-tdesc.h: New file.
764
a13c4696
MK
7652016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
766
767 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
768 (alloc_jump_pad_buffer): New function.
769 * linux-amd64-ipa.c: Add <sys/mman.h> include.
770 (alloc_jump_pad_buffer): New function.
771 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
772 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
773 (alloc_jump_pad_buffer): New function.
774 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
775 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
776 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
777 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
778
1cda1512
MK
7792016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
780
781 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
782 * linux-amd64-ipa.c: Likewise.
783 * linux-i386-ipa.c: Likewise.
784 * linux-s390-ipa.c: Likewise.
785 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
786 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
787 set_trace_state_variable_value_ptr.
788 (struct ipa_sym_addresses): Likewise.
789 (symbol_list): Likewise.
790 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
791 accessing gdb_collect directly.
792 (gdb_collect_ptr_type): New typedef.
793 (get_raw_reg_ptr_type): New typedef.
794 (get_trace_state_variable_value_ptr_type): New typedef.
795 (set_trace_state_variable_value_ptr_type): New typedef.
796 (gdb_collect_ptr): New global.
797 (get_raw_reg_ptr): New global.
798 (get_trace_state_variable_value_ptr): New global.
799 (set_trace_state_variable_value_ptr): New global.
800 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
801 accessing get_raw_reg directly.
802 (get_get_tsv_func_addr): Likewise for
803 get_trace_state_variable_value_ptr.
804 (get_set_tsv_func_addr): Likewise for
805 set_trace_state_variable_value_ptr.
806 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
807
72fb5488
SM
8082016-03-30 Simon Marchi <simon.marchi@ericsson.com>
809
810 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
811
28170b88
MK
8122016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
813
814 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
815 packets.
816 (relocate_instruction): Remove own_buf.
817 * server.c (own_buf): Make global.
818 (handle_v_requests): Make global.
819 * server.h (own_buf): New declaration.
820 (handle_v_requests): New prototype.
821
f39e8743
MK
8222016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
823
824 PR 18377
825 * linux-s390-low.c (add_insns): New function.
826 (s390_emit_prologue): New function.
827 (s390_emit_epilogue): New function.
828 (s390_emit_add): New function.
829 (s390_emit_sub): New function.
830 (s390_emit_mul): New function.
831 (s390_emit_lsh): New function.
832 (s390_emit_rsh_signed): New function.
833 (s390_emit_rsh_unsigned): New function.
834 (s390_emit_ext): New function.
835 (s390_emit_log_not): New function.
836 (s390_emit_bit_and): New function.
837 (s390_emit_bit_or): New function.
838 (s390_emit_bit_xor): New function.
839 (s390_emit_bit_not): New function.
840 (s390_emit_equal): New function.
841 (s390_emit_less_signed): New function.
842 (s390_emit_less_unsigned): New function.
843 (s390_emit_ref): New function.
844 (s390_emit_if_goto): New function.
845 (s390_emit_goto): New function.
846 (s390_write_goto_address): New function.
847 (s390_emit_litpool): New function.
848 (s390_emit_const): New function.
849 (s390_emit_call): New function.
850 (s390_emit_reg): New function.
851 (s390_emit_pop): New function.
852 (s390_emit_stack_flush): New function.
853 (s390_emit_zero_ext): New function.
854 (s390_emit_swap): New function.
855 (s390_emit_stack_adjust): New function.
856 (s390_emit_set_r2): New function.
857 (s390_emit_int_call_1): New function.
858 (s390_emit_void_call_2): New function.
859 (s390_emit_eq_goto): New function.
860 (s390_emit_ne_goto): New function.
861 (s390_emit_lt_goto): New function.
862 (s390_emit_le_goto): New function.
863 (s390_emit_gt_goto): New function.
864 (s390_emit_ge_goto): New function.
865 (s390x_emit_prologue): New function.
866 (s390x_emit_epilogue): New function.
867 (s390x_emit_add): New function.
868 (s390x_emit_sub): New function.
869 (s390x_emit_mul): New function.
870 (s390x_emit_lsh): New function.
871 (s390x_emit_rsh_signed): New function.
872 (s390x_emit_rsh_unsigned): New function.
873 (s390x_emit_ext): New function.
874 (s390x_emit_log_not): New function.
875 (s390x_emit_bit_and): New function.
876 (s390x_emit_bit_or): New function.
877 (s390x_emit_bit_xor): New function.
878 (s390x_emit_bit_not): New function.
879 (s390x_emit_equal): New function.
880 (s390x_emit_less_signed): New function.
881 (s390x_emit_less_unsigned): New function.
882 (s390x_emit_ref): New function.
883 (s390x_emit_if_goto): New function.
884 (s390x_emit_const): New function.
885 (s390x_emit_call): New function.
886 (s390x_emit_reg): New function.
887 (s390x_emit_pop): New function.
888 (s390x_emit_stack_flush): New function.
889 (s390x_emit_zero_ext): New function.
890 (s390x_emit_swap): New function.
891 (s390x_emit_stack_adjust): New function.
892 (s390x_emit_int_call_1): New function.
893 (s390x_emit_void_call_2): New function.
894 (s390x_emit_eq_goto): New function.
895 (s390x_emit_ne_goto): New function.
896 (s390x_emit_lt_goto): New function.
897 (s390x_emit_le_goto): New function.
898 (s390x_emit_gt_goto): New function.
899 (s390x_emit_ge_goto): New function.
900 (s390_emit_ops): New function.
901 (struct linux_target_ops): Fill in emit_ops hook.
902
abd9baf9
MK
9032016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
904
905 PR 18377
906 * Makefile.in: Add s390 IPA files.
907 * configure.srv: Build IPA for s390.
908 * linux-s390-ipa.c: New file.
909 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
910 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
911 (tdesc_s390_linux32): Likewise.
912 (init_registers_s390_linux32v1): Likewise.
913 (tdesc_s390_linux32v1): Likewise.
914 (init_registers_s390_linux32v2): Likewise.
915 (tdesc_s390_linux32v2): Likewise.
916 (init_registers_s390_linux64): Likewise.
917 (tdesc_s390_linux64): Likewise.
918 (init_registers_s390_linux64v1): Likewise.
919 (tdesc_s390_linux64v1): Likewise.
920 (init_registers_s390_linux64v2): Likewise.
921 (tdesc_s390_linux64v2): Likewise.
922 (init_registers_s390_te_linux64): Likewise.
923 (tdesc_s390_te_linux64): Likewise.
924 (init_registers_s390_vx_linux64): Likewise.
925 (tdesc_s390_vx_linux64): Likewise.
926 (init_registers_s390_tevx_linux64): Likewise.
927 (tdesc_s390_tevx_linux64): Likewise.
928 (init_registers_s390x_linux64): Likewise.
929 (tdesc_s390x_linux64): Likewise.
930 (init_registers_s390x_linux64v1): Likewise.
931 (tdesc_s390x_linux64v1): Likewise.
932 (init_registers_s390x_linux64v2): Likewise.
933 (tdesc_s390x_linux64v2): Likewise.
934 (init_registers_s390x_te_linux64): Likewise.
935 (tdesc_s390x_te_linux64): Likewise.
936 (init_registers_s390x_vx_linux64): Likewise.
937 (tdesc_s390x_vx_linux64): Likewise.
938 (init_registers_s390x_tevx_linux64): Likewise.
939 (tdesc_s390x_tevx_linux64): Likewise.
940 (have_hwcap_s390_vx): New static variable.
941 (s390_arch_setup): Fill have_hwcap_s390_vx.
942 (s390_get_thread_area): New function.
943 (s390_ft_entry_gpr_esa): New const.
944 (s390_ft_entry_gpr_zarch): New const.
945 (s390_ft_entry_misc): New const.
946 (s390_ft_entry_fr): New const.
947 (s390_ft_entry_vr): New const.
948 (s390_ft_main_31): New const.
949 (s390_ft_main_64): New const.
950 (s390_ft_exit_fr): New const.
951 (s390_ft_exit_vr): New const.
952 (s390_ft_exit_misc): New const.
953 (s390_ft_exit_gpr_esa): New const.
954 (s390_ft_exit_gpr_zarch): New const.
955 (append_insns): New function.
956 (s390_relocate_instruction): New function.
957 (s390_install_fast_tracepoint_jump_pad): New function.
958 (s390_get_min_fast_tracepoint_insn_len): New function.
959 (s390_get_ipa_tdesc_idx): New function.
960 (struct linux_target_ops): Wire in the above functions.
961 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
962 * linux-s390-tdesc.h: New file.
963
a4105d04
MK
9642016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
965
966 * linux-s390-low.c (s390_supports_tracepoints): New function.
967 (struct linux_target_ops): Fill supports_tracepoints hook.
968
35ac8b3e
YQ
9692016-03-18 Yao Qi <yao.qi@linaro.org>
970
971 * linux-low.c (lwp_signal_can_be_delivered): New function.
972 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
973
94610ec4
YQ
9742016-03-18 Yao Qi <yao.qi@linaro.org>
975
976 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
977 0 if signal is enqueued. Remove 'signal' from one debugging
978 message. Move one debugging message to some lines below.
979 Remove code setting 'signal' to 0.
980
80aea927
YQ
9812016-03-18 Yao Qi <yao.qi@linaro.org>
982
983 * linux-low.c (linux_low_filter_event): Remove redundant
984 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
985
b04fd3be
MK
9862016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
987
988 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
989 (struct linux_target_ops): Wire in the above.
990
c40c8d4b
YQ
9912016-03-03 Yao Qi <yao.qi@linaro.org>
992
993 * linux-low.c: Update comments to start_step_over.
994
0f8288ae
YQ
9952016-03-03 Yao Qi <yao.qi@linaro.org>
996
997 PR server/19736
998 * linux-low.c (handle_extended_wait): Set child suspended
999 if event_lwp->bp_reinsert isn't zero.
1000
fdbd04a8
YQ
10012016-03-02 Yao Qi <yao.qi@linaro.org>
1002
1003 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1004 enqueue_pending_signal.
1005
6896a8fa
MK
10062016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1007
1008 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1009 is actually loaded.
1010
ab503087
MK
10112016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1012
1013 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1014 (s390_regmap_3264) [!__s390x__]: New global.
1015 (s390_collect_ptrace_register): Skip map entries containing -1.
1016 (s390_supply_ptrace_register): Ditto.
1017 (s390_fill_gprs_high): New function.
1018 (s390_store_gprs_high): New function.
1019 (s390_regsets): Add NT_S390_HIGH_GPRS.
1020 (s390_get_hwcap): Enable on 31-bit.
1021 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1022 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1023 Detect NT_S390_HIGH_GPRS.
1024 (s390_usrregs_info_3264): Enable on 31-bit.
1025 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1026 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1027
ae91f625
MK
10282016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1029
1030 PR gdb/13808
1031 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1032 * configure.srv: Ditto.
1033 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1034 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1035 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1036 (init_registers_amd64_linux): Remove prototype.
1037 (tdesc_amd64_linux): Remove declaration.
1038 (get_ipa_tdesc): New function.
1039 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1040 initialize remaining tdescs.
1041 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1042 (init_registers_i386_linux): Remove prototype.
1043 (tdesc_i386_linux): Remove declaration.
1044 (get_ipa_tdesc): New function.
1045 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1046 initialize remaining tdescs.
1047 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1048 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1049 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1050 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1051 (x86_get_ipa_tdesc_idx): New function.
1052 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1053 * linux-x86-tdesc.h: New file.
1054 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1055 (target_get_ipa_tdesc_idx): New macro.
1056 * tracepoint.c (ipa_tdesc_idx): New macro.
1057 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1058 (symbol_list): Add ipa_tdesc_idx.
1059 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1060 (ipa_tdesc): Remove.
1061 (ipa_tdesc_idx): New variable.
1062 (get_context_regcache): Use get_ipa_tdesc.
1063 (gdb_collect): Ditto.
1064 (gdb_probe): Ditto.
1065 * tracepoint.h (get_ipa_tdesc): New prototype.
1066 (ipa_tdesc): Remove.
1067
e7ad2f14
PA
10682016-02-24 Pedro Alves <palves@redhat.com>
1069
1070 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1071 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1072 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1073 Factor out common code between the USE_SIGTRAP_SIGINFO and
1074 !USE_SIGTRAP_SIGINFO blocks.
1075 (linux_low_filter_event): Call save_stop_reason instead of
1076 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1077 Update comments.
1078 (linux_wait_1): Update comments.
1079
657f9cde
WW
10802016-02-24 Wei-cheng Wang <cole945@gmail.com>
1081
1082 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1083 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1084 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1085 ppc_insert_point, ppc_remove_point.
1086
b00b61e1
MK
10872016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1088
1089 * linux-s390-low.c (s390_supports_z_point_type): New function.
1090 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1091
553cb527
YQ
10922016-02-16 Yao Qi <yao.qi@linaro.org>
1093
1094 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1095 PC. Get pc from regcache_read_pc.
1096
a5652c21
YQ
10972016-02-12 Yao Qi <yao.qi@linaro.org>
1098
1099 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1100 or linux_get_pc_32bit.
1101 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1102
ed443b61
YQ
11032016-02-12 Yao Qi <yao.qi@linaro.org>
1104
1105 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1106 arm_linux_get_next_pcs_fixup.
1107
020ecd38
MK
11082016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1109
1110 * tracepoint.c (x_tracepoint_action_download): Change
1111 write_inferior_data_ptr to write_inferior_data_pointer.
1112 (cmd_qtstart): Likewise.
1113 (write_inferior_data_ptr): Remove.
1114 (download_agent_expr): Change write_inferior_data_ptr to
1115 write_inferior_data_pointer.
1116 (download_tracepoint_1): Likewise.
1117 (download_tracepoint): Likewise.
1118 (download_trace_state_variables): Likewise.
1119
7cae9051
WW
11202016-02-11 Wei-cheng Wang <cole945@gmail.com>
1121 Marcin Kościelnicki <koriakin@0x04.net>
1122
1123 * tracepoint.c (struct tracepoint_action_ops): Remove.
1124 (struct tracepoint_action): Remove ops.
1125 (m_tracepoint_action_download, r_tracepoint_action_download)
1126 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1127 size and offset accordingly.
1128 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1129 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1130 (tracepoint_action_send, tracepoint_action_download): New functions.
1131 Helpers for trace action handlers.
1132 (add_tracepoint_action): Remove setup actions ops.
1133 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1134
9f6a71b4
YQ
11352016-02-10 Yao Qi <yao.qi@linaro.org>
1136
1137 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1138
1e94266c
SM
11392016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1140
1141 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1142 to AC_OUTPUT.
1143 * configure: Regenerate.
1144
8adce034
SM
11452016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1146
1147 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1148 void * to gdb_byte *.
1149 * linux-low.c (siginfo_fixup): Likewise.
1150 (linux_xfer_siginfo): Likewise.
1151 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1152 Likewise.
1153 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1154
93813b37
WT
11552016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1156
1157 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1158 to srv_tgtobj.
1159 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1160 to srv_tgtobj.
1161 * linux-x86-low.c [__x86_64__]: Include
1162 "nat/amd64-linux-siginfo.h".
1163 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1164 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1165 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1166 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1167 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1168 (cpt_si_fd, si_timerid, si_overrun): Move from
1169 nat/amd64-linux-siginfo.c.
1170 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1171
8424cc97
SM
11722016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1173
1174 * server.c (skip_to_semicolon): Remove.
1175 (process_point_options): Use strchrnul instead of
1176 skip_to_semicolon.
1177
4d18591b
YQ
11782016-01-26 Yao Qi <yao.qi@linaro.org>
1179
1180 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1181 * linux-low.c (install_software_single_step_breakpoints): Don't
1182 call regcache_read_pc.
1183 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1184 argument pc.
1185
d8020970
YQ
11862016-01-26 Yao Qi <yao.qi@linaro.org>
1187
1188 * linux-low.c (install_software_single_step_breakpoints): Call
1189 regcache_read_pc instead of get_pc.
1190
8b207339
YQ
11912016-01-26 Yao Qi <yao.qi@linaro.org>
1192
1193 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1194 (unblock_async_io): Rename to ...
1195 (block_unblock_async_io): ... it. New function.
1196 (enable_async_io): Don't install SIGIO handler. Unblock it
1197 instead.
1198 (disable_async_io): Don't ignore SIGIO. Block it instead.
1199 (initialize_async_io): Install SIGIO handler. Don't call
1200 unblock_async_io.
1201
18879fef
YQ
12022016-01-26 Yao Qi <yao.qi@linaro.org>
1203
1204 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1205 first character is '\003', call *the_target->request_interrupt.
1206
a0f8e08a
YQ
12072016-01-25 Yao Qi <yao.qi@linaro.org>
1208
1209 * remote-utils.c (new_thread_notify): Remove.
1210 (dead_thread_notify): Likewise.
1211 * remote-utils.h (new_thread_notify): Remove declaration.
1212 (dead_thread_notify): Likewise.
1213
cc5fd9ab
MK
12142016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1215
1216 * gdb.trace/pending.exp: Fix expected message on continue.
1217
99e8eb11
MK
12182016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1219
1220 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1221 it works properly on big-endian machines where sizeof (CORE_ADDR)
1222 != sizeof (void *).
1223
a994041d
PA
12242016-01-21 Pedro Alves <palves@redhat.com>
1225
1226 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1227 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1228 * configure: Regenerate.
1229
f7a6a40d
YQ
12302016-01-21 Yao Qi <yao.qi@linaro.org>
1231
1232 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1233 is_thumb and set it according to CPSR saved on the stack.
1234 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1235 arm_sigreturn_next_pc.
1236
6f69e520
YQ
12372016-01-18 Yao Qi <yao.qi@linaro.org>
1238
1239 * linux-low.c (linux_set_pc_64bit): New function.
1240 (linux_get_pc_64bit): New function.
1241 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1242 Declare.
1243 * linux-sparc-low.c (debug_threads): Remove declaration.
1244 (sparc_get_pc): Remove.
1245 (the_low_target): Use linux_get_pc_64bit instead of
1246 sparc_get_pc.
1247 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1248 (the_low_target): Use linux_get_pc_64bit and
1249 linux_set_pc_64bit.
1250
276d4552
YQ
12512016-01-18 Yao Qi <yao.qi@linaro.org>
1252
1253 * linux-arm-low.c (debug_threads): Remove declaration.
1254 (arm_get_pc, arm_set_pc): Remove.
1255 (the_low_target): Use linux_get_pc_32bit and
1256 linux_set_pc_32bit.
1257 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1258 (the_low_target): Use linux_get_pc_32bit and
1259 linux_set_pc_32bit.
1260 * linux-cris-low.c (debug_threads): Remove declaration.
1261 (cris_get_pc, cris_set_pc,): Remove.
1262 (the_low_target): Use linux_get_pc_32bit and
1263 linux_set_pc_32bit.
1264 * linux-crisv32-low.c (debug_threads): Remove declaration.
1265 (cris_get_pc, cris_set_pc): Remove.
1266 (the_low_target): Use linux_get_pc_32bit and
1267 linux_set_pc_32bit.
1268 * linux-low.c: Include inttypes.h.
1269 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1270 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1271 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1272 (the_low_target): Use linux_get_pc_32bit and
1273 linux_set_pc_32bit.
1274 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1275 (the_low_target): Use linux_get_pc_32bit and
1276 linux_set_pc_32bit.
1277 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1278 (the_low_target): Use linux_get_pc_32bit and
1279 linux_set_pc_32bit.
1280 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1281 (the_low_target): Use linux_get_pc_32bit and
1282 linux_set_pc_32bit.
1283 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1284 (the_low_target): Use linux_get_pc_32bit and
1285 linux_set_pc_32bit.
1286
eb0edac8
GB
12872016-01-18 Gary Benson <gbenson@redhat.com>
1288
1289 * configure.ac (AC_FUNC_FORK): New check.
1290 * config.in: Regenerate.
1291 * configure: Likewise.
1292
1b451dda
YQ
12932016-01-14 Yao Qi <yao.qi@linaro.org>
1294
1295 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1296 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1297 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1298 arm_get_next_pcs_ctor.
1299
82075af2
JS
13002016-01-12 Josh Stone <jistone@redhat.com>
1301 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1302
1303 * inferiors.h: Include "gdb_vecs.h".
1304 (struct process_info): Add syscalls_to_catch.
1305 * inferiors.c (remove_process): Free syscalls_to_catch.
1306 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1307 syscall_return stops.
1308 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1309 * server.c (handle_general_set): Handle QCatchSyscalls.
1310 (handle_query): Report support for QCatchSyscalls.
1311 * target.h (struct target_ops): Add supports_catch_syscall.
1312 (target_supports_catch_syscall): New macro.
1313 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1314 (struct lwp_info): Add syscall_state.
1315 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1316 Maintain syscall_state and syscalls_to_catch across exec.
1317 (get_syscall_trapinfo): New function, proxy to the_low_target.
1318 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1319 (linux_low_filter_event): Toggle syscall_state entry/return for
1320 syscall traps, and set it ignored for all others.
1321 (gdb_catching_syscalls_p): New function.
1322 (gdb_catch_this_syscall_p): New function.
1323 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1324 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1325 (linux_supports_catch_syscall): New function.
1326 (linux_target_ops): Install it.
1327 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1328 (the_low_target): Install it.
1329
8f13a3ce
MF
13302016-01-12 Mike Frysinger <vapier@gentoo.org>
1331
1332 * acinclude.m4: Include new ../warning.m4 file.
1333 * configure: Regenerated.
1334 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1335
5b3da067
MF
13362016-01-12 Mike Frysinger <vapier@gentoo.org>
1337
1338 * ax.c (is_goto_target): Mark static.
1339 * linux-low.c (register_addr): Likewise.
1340 (linux_fetch_registers, linux_store_registers): Likewise.
1341 * mem-break.c (any_persistent_commands): Fix old prototype.
1342 (add_commands_to_breakpoint): Mark static.
1343 * regcache.c (find_register_by_name): Delete unused func.
1344 * remote-utils.c (hex_or_minus_one): Mark static.
1345 * server.c (monitor_show_help): Mark static.
1346 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1347 handle_v_requests): Likewise.
1348
bc504a31
PA
13492016-01-12 Pedro Alves <palves@redhat.com>
1350
1351 Remove use of the registered trademark symbol throughout.
1352
5a0dd67a
YQ
13532016-01-08 Yao Qi <yao.qi@linaro.org>
1354
1355 * remote-utils.c (getpkt): If c is '\003', call target hook
1356 request_interrupt.
1357
b2ca446f
YQ
13582016-01-06 Yao Qi <yao.qi@linaro.org>
1359
1360 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1361 linux-aarch32-low.c.
1362 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1363 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1364 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1365 (thumb2_breakpoint): Declare.
1366 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1367 linux-aarch32-low.h.
1368 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1369 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1370 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1371
edd88788
JB
13722016-01-01 Joel Brobecker <brobecker@adacore.com>
1373
1374 * gdbreplay.c (gdbreplay_version): Change copyright year in
1375 version message.
1376 * server.c (gdbserver_version): Likewise.
1377
65da7f14
PP
13782015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1379
1380 * server.c (crc32_table): Delete.
1381 (crc32): Use libiberty's xcrc32 function.
1382
4abd5ed2
JB
13832015-12-22 Joel Brobecker <brobecker@adacore.com>
1384
1385 * lynx-low.c (lynx_delete_thread_callback): New function.
1386 (lynx_mourn): Properly delete our process and all of its
1387 threads. Remove call to clear_inferiors.
1388
0e50fe5c
JB
13892015-12-22 Joel Brobecker <brobecker@adacore.com>
1390
1391 * target.c (thread_search_callback): Add check that
1392 the thread_stopped target callback is not NULL before
1393 calling it.
1394
35adc03f
YQ
13952015-12-21 Yao Qi <yao.qi@linaro.org>
1396
1397 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1398 arm breakpoint.
1399
bd2b2909
AT
14002015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1401
1402 * server.c (handle_query): Call target_supports_software_single_step.
1403
7fe5e27e
AT
14042015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1405
1406 * linux-low.c (single_step): New function.
1407 (linux_resume_one_lwp_throw): Call single_step.
1408 (start_step_over): Likewise.
1409
d9311bfa
AT
14102015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1411
1412 * Makefile.in (SFILES): Append arch/arm-linux.c,
1413 arch/arm-get-next-pcs.c.
1414 (arm-linux.o): New rule.
1415 (arm-get-next-pcs.o): New rule.
1416 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1417 arm-linux.o.
1418 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1419 to linux-aarch32-low.c.
1420 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1421 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1422 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1423 (thumb2_breakpoint_len): Likewise.
1424 (arm_is_thumb_mode): Make non-static.
1425 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1426 from linux-aarch32-low.c.
1427 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1428 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1429 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1430 (thumb2_breakpoint_len): Likewise.
1431 (arm_is_thumb_mode): New declaration.
1432 * linux-arm-low.c: Include arch/arm-linux.h
1433 aarch/arm-get-next-pcs.h, sys/syscall.h.
1434 (get_next_pcs_ops): New struct.
1435 (get_next_pcs_addr_bits_remove): New function.
1436 (get_next_pcs_is_thumb): New function.
1437 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1438 (arm_sigreturn_next_pc): Likewise.
1439 (get_next_pcs_syscall_next_pc): Likewise.
1440 (arm_gdbserver_get_next_pcs): Likewise.
1441 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1442 Initialize.
1443 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1444 * server.h: Include gdb_vecs.h.
1445
68ce2059
AT
14462015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1447
1448 * Makefile.in (SFILES): Append common/common-regcache.c.
1449 (OBS): Append common-regcache.o.
1450 (common-regcache.o): New rule.
1451 * regcache.c (init_register_cache): Initialize cache to
1452 REG_UNAVAILABLE.
1453 (regcache_raw_read_unsigned): New function.
1454 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1455 register_status enum.
1456
fa5308bd
AT
14572015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1458
1459 * linux-aarch64-low.c (the_low_targets): Rename
1460 breakpoint_reinsert_addr to get_next_pcs.
1461 * linux-arm-low.c (the_low_targets): Likewise.
1462 * linux-bfin-low.c (the_low_targets): Likewise.
1463 * linux-cris-low.c (the_low_targets): Likewise.
1464 * linux-crisv32-low.c (the_low_targets): Likewise.
1465 * linux-low.c (can_software_single_step): Likewise.
1466 (install_software_single_step_breakpoints): New function.
1467 (start_step_over): Use install_software_single_step_breakpoints.
1468 * linux-low.h: New CORE_ADDR vector.
1469 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1470 get_next_pcs.
1471 * linux-mips-low.c (the_low_targets): Likewise.
1472 * linux-nios2-low.c (the_low_targets): Likewise.
1473 * linux-sparc-low.c (the_low_targets): Likewise.
1474
4a6ed09b
PA
14752015-12-17 Pedro Alves <palves@redhat.com>
1476
1477 * linux-low.c (linux_kill_one_lwp): Remove references to
1478 LinuxThreads.
1479 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1480 to 'kill'.
1481 (linux_init_signals): Delete.
1482 (initialize_low): Adjust.
1483 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1484
7544db95
PA
14852015-12-16 Pedro Alves <palves@redhat.com>
1486
1487 * configure.ac (compiler warning flags): When testing a
1488 -Wno-foo option, check whether -Wfoo works instead.
1489 * configure: Regenerate.
1490
8020350c
DB
14912015-12-11 Don Breazeal <donb@codesourcery.com>
1492
1493 * server.c (process_serial_event): Don't exit from gdbserver
1494 in remote mode if there are still active inferiors.
1495
db91f502
YQ
14962015-12-11 Yao Qi <yao.qi@linaro.org>
1497
1498 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1499 arm_breakpoint_at if the process is 32-bit.
1500
b37a6290
YQ
15012015-12-11 Yao Qi <yao.qi@linaro.org>
1502
1503 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1504 arm breakpoint.
1505
17b1509a
YQ
15062015-12-07 Yao Qi <yao.qi@linaro.org>
1507
1508 * configure.srv: Append arm.o to srv_tgtobj for
1509 aarch64*-*-linux* target.
1510 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1511 from linux-arm-low.c.
1512 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1513 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1514 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1515 (thumb2_breakpoint_len): Likewise.
1516 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1517 (arm_breakpoint_kinds): Likewise.
1518 (arm_breakpoint_kind_from_pc): Likewise.
1519 (arm_sw_breakpoint_from_kind): Likewise.
1520 (arm_breakpoint_kind_from_current_state): Likewise.
1521 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1522 (arm_sw_breakpoint_from_kind): Declare.
1523 (arm_breakpoint_kind_from_current_state): Declare.
1524 (arm_breakpoint_at): Declare.
1525 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1526 arm_sw_breakpoint_from_kind if process is 32-bit.
1527 (aarch64_breakpoint_kind_from_pc): New function.
1528 (aarch64_breakpoint_kind_from_current_state): New function.
1529 (the_low_target): Initialize fields breakpoint_kind_from_pc
1530 and breakpoint_kind_from_current_state.
1531 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1532 linux-aarch32-low.c.
1533 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1534 (arm_breakpoint, arm_breakpoint_len): Likewise.
1535 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1536 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1537 (arm_is_thumb_mode): Likewise.
1538 (arm_breakpoint_at): Likewise.
1539 (arm_breakpoint_kind_from_pc): Likewise.
1540 (arm_sw_breakpoint_from_kind): Likewise.
1541 (arm_breakpoint_kind_from_current_state): Likewise.
1542
1543 Revert:
1544 2015-08-04 Yao Qi <yao.qi@linaro.org>
1545
1546 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1547 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1548 * server.c (extended_protocol): Remove "static".
1549 * server.h (extended_protocol): Declare it.
1550
ece66d65
JS
15512015-12-04 Josh Stone <jistone@redhat.com>
1552
1553 * target.h (struct target_ops) <arch_setup>: Rename to ...
1554 (struct target_ops) <post_create_inferior>: ... this.
1555 (target_arch_setup): Rename to ...
1556 (target_post_create_inferior): ... this, calling post_create_inferior.
1557 * server.c (start_inferior): Update target_arch_setup calls to
1558 target_post_create_inferior.
1559 * linux-low.c (linux_low_ptrace_options): Forward declare.
1560 (linux_arch_setup): Update its comment for general use.
1561 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1562 (struct linux_target_ops): Use linux_post_create_inferior.
1563 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1564 to post_create_inferior.
1565 * nto-low.c (struct nto_target_ops): Likewise.
1566 * spu-low.c (struct spu_target_ops): Likewise.
1567 * win32-low.c (struct win32_target_ops): Likewise.
1568
e58c48b4
AT
15692015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1570
1571 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1572
fbec8956
AT
15732015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1574
1575 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1576 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1577 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1578 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1579 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1580 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1581 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1582 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1583 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1584 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1585 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1586 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1587
9b4c5f87
AT
15882015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1589
1590 * linux-low.c (linux_look_up_symbols): Don't call
1591 linux_supports_traceclone.
1592 * linux-low.h (thread_db_init): Remove use_events argument.
1593 * thread-db.c (thread_db_use_event): Remove global variable.
1594 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1595 (struct thread_db) <td_create_bp>: Remove field.
1596 (thread_db_create_event): Remove function.
1597 (thread_db_enable_reporting): Likewise.
1598 (find_one_thread): Don't check for thread_db_use_events.
1599 (attach_thread): Likewise.
1600 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1601 (try_thread_db_load_1): Don't check for thread_db_use_events.
1602 (thread_db_init): Remove use_events argument and thread events
1603 handling.
1604 (remove_thread_event_breakpoints): Remove function.
1605 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1606
7d00775e
AT
16072015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1608
1609 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1610 New function.
1611 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1612 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1613 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1614 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1615 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1616 Initialize.
1617 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1618 New function.
1619 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1620 * linux-low.c (can_hardware_single_step): Use
1621 supports_hardware_single_step.
1622 (can_software_single_step): New function.
1623 (start_step_over): Call can_software_single_step.
1624 (linux_supports_hardware_single_step): New function.
1625 (struct target_ops) <supports_software_single_step>: Initialize.
1626 * linux-low.h (struct linux_target_ops)
1627 <supports_hardware_single_step>: Initialize.
1628 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1629 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1630 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1631 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1632 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1633 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1634 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1635 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1636 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1637 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1638 Initialize.
1639 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1640 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1641 Initialize.
1642 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1643 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1644 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1645 New function.
1646 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1647 * target.h (struct target_ops): <supports_software_single_step>:
1648 New field.
1649 (target_supports_software_single_step): New macro.
1650
2d97cd35
AT
16512015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1652
1653 * linux-low.c (linux_wait_1): Fix pc advance condition.
1654 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1655 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1656
769ef81f
AT
16572015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1658
1659 * linux-arm-low.c (arm_is_thumb_mode): New function.
1660 (arm_breakpoint_at): Use arm_is_thumb_mode.
1661 (arm_breakpoint_kind_from_current_state): New function.
1662 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1663 Initialize.
1664 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1665 (linux_breakpoint_kind_from_current_state): New function.
1666 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1667 * linux-low.h (struct linux_target_ops)
1668 <breakpoint_kind_from_current_state>: New field.
1669 * target.h (struct target_ops): Likewise.
1670 (target_breakpoint_kind_from_current_state): New macro.
1671
1bebeeca
PA
16722015-11-30 Pedro Alves <palves@redhat.com>
1673
1674 * linux-low.c (linux_resume): Wake up the event loop before
1675 returning.
1676
a67a9fae
PA
16772015-11-30 Pedro Alves <palves@redhat.com>
1678
1679 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1680 check.
1681 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1682 to -1.
1683 * target.c (struct thread_search): New structure.
1684 (thread_search_callback): New function.
1685 (prev_general_thread): New global.
1686 (prepare_to_access_memory, done_accessing_memory): New functions.
1687 * target.h (prepare_to_access_memory, done_accessing_memory):
1688 Replace macros with function declarations.
1689
f2faf941
PA
16902015-11-30 Pedro Alves <palves@redhat.com>
1691
1692 PR 14618
1693 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1694 report TARGET_WAITKIND_NO_RESUMED.
1695 * remote-utils.c (prepare_resume_reply): Handle
1696 TARGET_WAITKIND_NO_RESUMED.
1697 * server.c (report_no_resumed): New global.
1698 (handle_query) <qSupported>: Handle "no-resumed+". Report
1699 "no-resumed+" support.
1700 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1701 return error if the client doesn't support no-resumed events.
1702 (push_stop_notification): New function.
1703 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1704 events if the client supports them.
1705
a681f9c9
PA
17062015-11-30 Pedro Alves <palves@redhat.com>
1707
1708 * linux-low.c (thread_still_has_status_pending_p): Don't check
1709 vCont;t here.
1710 (lwp_resumed): New function.
1711 (status_pending_p_callback): Return early if the LWP is not
1712 supposed to be resumed.
1713
65706a29
PA
17142015-11-30 Pedro Alves <palves@redhat.com>
1715
1716 * linux-low.c (handle_extended_wait): Assert that the LWP's
1717 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1718 thread create events, leave the new child's status pending.
1719 (linux_low_filter_event): If GDB wants to hear about thread exit
1720 events, leave the LWP marked dead and don't delete it.
1721 (linux_wait_for_event_filtered): Don't check for thread exit.
1722 (filter_exit_event): New function.
1723 (linux_wait_1): Use it, when returning an exit event.
1724 (linux_resume_one_lwp_throw): Assert that the LWP's
1725 waitstatus is TARGET_WAITKIND_IGNORE.
1726 * remote-utils.c (prepare_resume_reply): Handle
1727 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1728 * server.c (report_thread_events): New global.
1729 (handle_general_set): Handle QThreadEvents.
1730 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1731 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1732 TARGET_WAITKIND_THREAD_EXITED.
1733 * server.h (report_thread_events): Declare.
1734
56cf4bed
PA
17352015-11-30 Pedro Alves <palves@redhat.com>
1736
1737 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1738 the thread's last_resume_kind was resume_stop.
1739
500c1d85
PA
17402015-11-30 Pedro Alves <palves@redhat.com>
1741
1742 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1743 before returning.
1744
de979965
PA
17452015-11-30 Pedro Alves <palves@redhat.com>
1746
1747 * server.c (handle_v_requests): Handle vCtrlC.
1748
34c65914
PA
17492015-11-30 Pedro Alves <palves@redhat.com>
1750
1751 * gdbthread.h (find_any_thread_of_pid): Declare.
1752 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1753 functions.
1754 * server.c (handle_query): If current_thread is NULL, look for
1755 another thread of the selected process.
1756
79efa585 17572015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 1758 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
1759
1760 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1761 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1762 name in reply.
1763 * target.h (struct target_ops) <thread_name>: New field.
1764 (target_thread_name): New macro.
1765
80d82c19
JB
17662015-11-23 Joel Brobecker <brobecker@adacore.com>
1767
1768 * regcache.h (regcache_invalidate_pid): Add declaration.
1769 * regcache.c (regcache_invalidate_pid): New function, extracted
1770 from regcache_invalidate.
1771 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1772 Add trivial documentation comment.
1773 * lynx-low.c: Use regcache_invalidate_pid instead of
1774 regcache_invalidate.
1775
64da5dd5
JB
17762015-11-23 Joel Brobecker <brobecker@adacore.com>
1777
1778 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1779 and Elf64_auxv_t if the target is Android.
1780
37ce4055
DE
17812015-11-22 Doug Evans <xdje42@gmail.com>
1782
1783 * target.h: #include <sys/types.h>.
1784
06e03fff
PA
17852015-11-19 Pedro Alves <palves@redhat.com>
1786
1787 * linux-low.c (linux_process_qsupported): Change prototype.
1788 Adjust.
1789 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1790 Change prototype.
1791 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1792 and adjust to loop over all features.
1793 * server.c (handle_query) <qSupported>: Adjust to call
1794 target_process_qsupported once, passing it a vector of unprocessed
1795 features.
1796 * target.h (struct target_ops) <process_qsupported>: Change
1797 prototype.
1798 (target_process_qsupported): Adjust.
1799
9a084706
PA
18002015-11-19 Pedro Alves <palves@redhat.com>
1801
1802 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1803 mode.
1804 * configure: Regenerate.
1805
dad44a1f
PA
18062015-11-19 Pedro Alves <palves@redhat.com>
1807
1808 * configure: Regenerate.
1809
231c0592
YQ
18102015-11-19 Yao Qi <yao.qi@linaro.org>
1811
1812 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1813 type to uint32_t.
1814
6c1c9a8b
YQ
18152015-11-19 Yao Qi <yao.qi@linaro.org>
1816
1817 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1818 (struct aarch64_operand): Move enum out.
1819
9caa3311
YQ
18202015-11-19 Yao Qi <yao.qi@linaro.org>
1821
1822 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1823 struct user_fpsimd_state *.
1824 (aarch64_store_fpregset): Likewise.
1825
6a69a054
YQ
18262015-11-19 Yao Qi <yao.qi@linaro.org>
1827
1828 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1829 struct user_pt_regs *.
1830 (aarch64_store_gregset): Likewise.
1831
1798301e
PA
18322015-11-18 Pedro Alves <palves@redhat.com>
1833
1834 * Makefile.in (all_object_files): Add $IPA_OBJS.
1835
ce7715e2
PA
18362015-11-17 Pedro Alves <palves@redhat.com>
1837
1838 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1839 GDB_SIGNAL_0 and gdb_signal_to_string.
1840
c0879059
PA
18412015-11-17 Pedro Alves <palves@redhat.com>
1842
1843 * win32-low.c (handle_output_debug_string): Remove parameter.
1844 (win32_kill): Remove our_status local and adjust call to
1845 handle_output_debug_string.
1846 (get_child_debug_event): Adjust call to
1847 handle_output_debug_string.
1848
1996e237
SM
18492015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1850
1851 * linux-mips-low.c (mips_fill_gregset): Add cast.
1852 (mips_store_gregset): Likewise.
1853 (mips_fill_fpregset): Likewise.
1854 (mips_store_fpregset): Likewise.
1855
cbec665b
SM
18562015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1857
1858 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1859 priv.
1860
eb3e3c67
SM
18612015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1862
1863 * linux-mips-low.c (mips_linux_new_thread): Change type of
1864 watch_type to enum target_hw_bp_type.
1865
171de4b8
SM
18662015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1867
1868 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1869 Change return type to arm_hwbp_type.
1870
04248ead
SM
18712015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1872
1873 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1874 (arm_store_gregset): Likewise.
1875 * linux-arm-low.c (arm_get_hwcap): Likewise.
1876 (arm_read_description): Likewise.
1877
04b3479c
SM
18782015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1879
1880 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1881
2bc84e8a
SM
18822015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1883
1884 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1885 (ppc_fill_vsxregset): Likewise.
1886 (ppc_store_vsxregset): Likewise.
1887 (ppc_fill_vrregset): Likewise.
1888 (ppc_store_vrregset): Likewise.
1889 (ppc_fill_evrregset): Likewise.
1890 (ppc_store_evrregset): Likewise.
1891
e6c5bb05
SM
18922015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1893
1894 * linux-ppc-low.c (ppc_usrregs_info): Remove
1895 forward-declaration.
1896 (ppc_arch_setup): Move lower in file.
1897
7ea45d72
SM
18982015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1899
1900 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1901 (ps_pdwrite): Likewise.
1902
69291610
HW
19032015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1904
1905 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1906 to after assert checks.
1907
b42945fd
SM
19082015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1909
1910 * proc-service.c (ps_pdread): Add/adjust casts.
1911 (ps_pdwrite): Add/adjust casts.
1912
d6f85c84
SM
19132015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1914
1915 * server.c (handle_search_memory_1): Cast return value of
1916 memmem.
1917
f98cd059
SM
19182015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1919
1920 * server.c (write_qxfer_response): Change type of data to
1921 gdb_byte *.
1922
d2412fa5
PA
19232015-10-29 Pedro Alves <palves@redhat.com>
1924
1925 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1926
c17414a2
PA
19272015-10-29 Pedro Alves <palves@redhat.com>
1928
1929 * tracepoint.c (clear_installed_tracepoints): Add casts.
1930
e053fbc4
PA
19312015-10-29 Pedro Alves <palves@redhat.com>
1932
1933 * server.c (handle_v_cont, process_serial_event): Add enum
1934 gdb_signal casts to signal parsing code.
1935
add67df8
PA
19362015-10-29 Pedro Alves <palves@redhat.com>
1937
1938 * linux-low.h (NULL_REGSET): Define.
1939 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1940 * linux-arm-low.c (arm_regsets): Likewise.
1941 * linux-crisv32-low.c (cris_regsets): Likewise.
1942 * linux-m68k-low.c (m68k_regsets): Likewise.
1943 * linux-mips-low.c (mips_regsets): Likewise.
1944 * linux-nios2-low.c (nios2_regsets): Likewise.
1945 * linux-ppc-low.c (ppc_regsets): Likewise.
1946 * linux-s390-low.c (s390_regsets): Likewise.
1947 * linux-sh-low.c (sh_regsets): Likewise.
1948 * linux-sparc-low.c (sparc_regsets): Likewise.
1949 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1950 * linux-tile-low.c (tile_regsets): Likewise.
1951 * linux-x86-low.c (x86_regsets): Likewise.
1952 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1953
50bc912a
PA
19542015-10-29 Pedro Alves <palves@redhat.com>
1955
1956 * linux-low.h (NULL_REGSET): Define.
1957 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1958 * linux-arm-low.c (arm_regsets): Likewise.
1959 * linux-crisv32-low.c (cris_regsets): Likewise.
1960 * linux-m68k-low.c (m68k_regsets): Likewise.
1961 * linux-mips-low.c (mips_regsets): Likewise.
1962 * linux-nios2-low.c (nios2_regsets): Likewise.
1963 * linux-ppc-low.c (ppc_regsets): Likewise.
1964 * linux-s390-low.c (s390_regsets): Likewise.
1965 * linux-sh-low.c (sh_regsets): Likewise.
1966 * linux-sparc-low.c (sparc_regsets): Likewise.
1967 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1968 * linux-tile-low.c (tile_regsets): Likewise.
1969 * linux-x86-low.c (x86_regsets): Likewise.
1970 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1971
682b2546
DE
19722015-10-26 Doug Evans <dje@google.com>
1973
1974 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1975
963843d4
DE
19762015-10-26 Doug Evans <dje@google.com>
1977
1978 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1979
d41401ac
DE
19802015-10-26 Doug Evans <dje@google.com>
1981
1982 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1983 for debug_printf.
1984 (attach_thread, find_new_threads_callback): Ditto.
1985
3db28855
AT
19862015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1987
1988 * mem-break.h (set_breakpoint_data): Remove.
1989
fb78e89c
AT
19902015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1991
1992 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1993 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1994 (initialize_low): Remove set_breakpoint_data call.
1995 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1996 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1997 (initialize_low): Remove set_breakpoint_data call.
1998 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1999 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2000 (initialize_low): Remove set_breakpoint_data call.
2001
2e6ee069
AT
20022015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2003
2004 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2005 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2006 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2007 * target.h (target_breakpoint_kind_from_pc): New macro.
2008
1652a986
AT
20092015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2010
2011 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2012 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2013 the default breakpoint kind.
2014
abeead09
AT
20152015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2016
2017 * linux-arm-low.c (arm_supports_z_point_type): Add software
2018 breakpoint support.
2019
b0b4b501
AT
20202015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2021
2022 * linux-arm-low.c: Refactor breakpoint definitions.
2023 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2024 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2025
8689682c
AT
20262015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2027
2028 * Makefile.in: Add arm.c/o.
2029 * configure.srv: Likewise.
2030 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2031 (arm_breakpoint_kind_from_pc): New function.
2032 (arm_sw_breakpoint_from_kind): Return proper kind.
2033 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2034
27165294
AT
20352015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2036
2037 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2038 removal.
2039 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2040 (struct raw_breakpoint) <size>: Remove.
2041 (struct raw_breakpoint) <kind>: Add.
2042 (bp_size): New function.
2043 (bp_opcode): Likewise.
2044 (find_raw_breakpoint_at): Adjust for kind.
2045 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2046 (remove_memory_breakpoint): Adjust for kind call bp_size.
2047 (set_raw_breakpoint_at): Adjust for kind.
2048 (set_breakpoint): Likewise.
2049 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2050 (delete_raw_breakpoint): Adjust for kind.
2051 (delete_breakpoint): Likewise.
2052 (find_gdb_breakpoint): Likewise.
2053 (set_gdb_breakpoint_1): Likewise.
2054 (set_gdb_breakpoint): Likewise.
2055 (delete_gdb_breakpoint_1): Likewise.
2056 (delete_gdb_breakpoint): Likewise.
2057 (uninsert_raw_breakpoint): Likewise.
2058 (reinsert_raw_breakpoint): Likewise.
2059 (set_breakpoint_data): Remove.
2060 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2061 (check_mem_read): Adjust for kind call bp_size.
2062 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2063 (clone_one_breakpoint): Adjust for kind.
2064 * mem-break.h (set_gdb_breakpoint): Likewise.
2065 (delete_gdb_breakpoint): Likewise.
2066 * server.c (process_serial_event): Likewise.
2067
dd373349
AT
20682015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2069
2070 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2071 (struct linux_target_ops) <breakpoint>: Remove.
2072 (struct linux_target_ops) <breakpoint_len>: Remove.
2073 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2074 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2075 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2076 (arm_sw_breakpoint_from_kind): New function.
2077 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2078 (struct linux_target_ops) <breakpoint>: Remove.
2079 (struct linux_target_ops) <breakpoint_len>: Remove.
2080 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2081 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2082 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2083 (struct linux_target_ops) <breakpoint>: Remove.
2084 (struct linux_target_ops) <breakpoint_len>: Remove.
2085 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2086 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2087 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2088 (struct linux_target_ops) <breakpoint>: Remove.
2089 (struct linux_target_ops) <breakpoint_len>: Remove.
2090 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2091 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2092 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2093 and sw_breakpoint_from_kind to increment the pc.
2094 (linux_breakpoint_kind_from_pc): New function.
2095 (linux_sw_breakpoint_from_kind): New function.
2096 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2097 (initialize_low): Call breakpoint_kind_from_pc and
2098 sw_breakpoint_from_kind to replace breakpoint_data/len.
2099 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2100 New field.
2101 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2102 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2103 (struct linux_target_ops) <breakpoint>: Remove.
2104 (struct linux_target_ops) <breakpoint_len>: Remove.
2105 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2106 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2107 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2108 (struct linux_target_ops) <breakpoint>: Remove.
2109 (struct linux_target_ops) <breakpoint_len>: Remove.
2110 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2111 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2112 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2113 (struct linux_target_ops) <breakpoint>: Remove.
2114 (struct linux_target_ops) <breakpoint_len>: Remove.
2115 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2116 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2117 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2118 (struct linux_target_ops) <breakpoint>: Remove.
2119 (struct linux_target_ops) <breakpoint_len>: Remove.
2120 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2121 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2122 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2123 (struct linux_target_ops) <breakpoint>: Remove.
2124 (struct linux_target_ops) <breakpoint_len>: Remove.
2125 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2126 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2127 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2128 (struct linux_target_ops) <breakpoint>: Remove.
2129 (struct linux_target_ops) <breakpoint_len>: Remove.
2130 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2131 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2132 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2133 (struct linux_target_ops) <breakpoint>: Remove.
2134 (struct linux_target_ops) <breakpoint_len>: Remove.
2135 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2136 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2137 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2138 (struct linux_target_ops) <breakpoint>: Remove.
2139 (struct linux_target_ops) <breakpoint_len>: Remove.
2140 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2141 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2142 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2143 (struct linux_target_ops) <breakpoint>: Remove.
2144 (struct linux_target_ops) <breakpoint_len>: Remove.
2145 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2146 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2147 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2148 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2149 (struct linux_target_ops) <breakpoint>: Remove.
2150 (struct linux_target_ops) <breakpoint_len>: Remove.
2151 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2152 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2153 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2154 (struct linux_target_ops) <breakpoint>: Remove.
2155 (struct linux_target_ops) <breakpoint_len>: Remove.
2156 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2157 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2158
4cd98a19
AT
21592015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2160
2161 * linux-cris-low.c (cris_get_pc): Remove void arg.
2162
774ee6d2
AR
21632015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2164
2165 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2166 variable name.
2167
833dcd29
AR
21682015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2169
2170 * inferiors.c (thread_pid_matches_callback): New function.
2171 (find_thread_process): New function.
2172 (remove_thread): Reset current_thread.
2173 (remove_process): Assert threads have been removed first.
2174
8d689ee5
YQ
21752015-10-15 Yao Qi <yao.qi@linaro.org>
2176
2177 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2178 if it is 3.
2179 (aarch64_remove_point): Likewise.
2180 * regcache.c (regcache_register_size): New function.
2181
1c2e1515
YQ
21822015-10-12 Yao Qi <yao.qi@linaro.org>
2183
2184 * linux-aarch64-low.c: Update all callers as emit_load_store
2185 is renamed to aarch64_emit_load_store.
2186
e1c587c3
YQ
21872015-10-12 Yao Qi <yao.qi@linaro.org>
2188
2189 * linux-aarch64-low.c: Update all callers of function renaming
2190 from emit_insn to aarch64_emit_insn.
2191
b6542f81
YQ
21922015-10-12 Yao Qi <yao.qi@linaro.org>
2193
2194 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2195 arch/aarch64-insn.h.
2196 (struct aarch64_memory_operand): Likewise.
2197 (ENCODE): Likewise.
2198 (emit_insn): Move to arch/aarch64-insn.c.
2199 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2200 (emit_load_store): Move to arch/aarch64-insn.c.
2201 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2202 (can_encode_int32): Remove.
2203
246994ce
YQ
22042015-10-12 Yao Qi <yao.qi@linaro.org>
2205
2206 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2207 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2208 (aarch64_relocate_instruction): Likewise.
2209 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2210 (struct aarch64_insn_visitor): Likewise.
2211
0badd99f
YQ
22122015-10-12 Yao Qi <yao.qi@linaro.org>
2213
2214 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2215 (struct aarch64_insn_visitor): New.
2216 (struct aarch64_insn_relocation_data): New.
2217 (aarch64_ftrace_insn_reloc_b): New function.
2218 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2219 (aarch64_ftrace_insn_reloc_cb): Likewise.
2220 (aarch64_ftrace_insn_reloc_tb): Likewise.
2221 (aarch64_ftrace_insn_reloc_adr): Likewise.
2222 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2223 (aarch64_ftrace_insn_reloc_others): Likewise.
2224 (visitor): New.
2225 (aarch64_relocate_instruction): Use visitor.
2226
dfaffe9d
YQ
22272015-10-12 Yao Qi <yao.qi@linaro.org>
2228
2229 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2230 int. Add argument buf.
2231 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2232 aarch64_relocate_instruction.
2233
70b439f0
YQ
22342015-10-12 Yao Qi <yao.qi@linaro.org>
2235
2236 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2237 argument insn. Remove local variable insn. Don't call
2238 target_read_uint32.
2239 (aarch64_install_fast_tracepoint_jump_pad): Call
2240 target_read_uint32.
2241
7781c06f
YQ
22422015-09-30 Yao Qi <yao.qi@linaro.org>
2243
2244 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2245 (emit_load_store_pair): Likewise.
2246
9a3c8263
SM
22472015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2248
2249 * dll.c (match_dll): Add cast(s).
2250 (unloaded_dll): Likewise.
2251 * linux-low.c (second_thread_of_pid_p): Likewise.
2252 (delete_lwp_callback): Likewise.
2253 (count_events_callback): Likewise.
2254 (select_event_lwp_callback): Likewise.
2255 (linux_set_resume_request): Likewise.
2256 * server.c (accumulate_file_name_length): Likewise.
2257 (emit_dll_description): Likewise.
2258 (handle_qxfer_threads_worker): Likewise.
2259 (visit_actioned_threads): Likewise.
2260 * thread-db.c (any_thread_of): Likewise.
2261 * tracepoint.c (same_process_p): Likewise.
2262 (match_blocktype): Likewise.
2263 (build_traceframe_info_xml): Likewise.
2264
224c3ddb
SM
22652015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2266
2267 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2268 assignment.
2269 (gdb_unparse_agent_expr): Likewise.
2270 * hostio.c (require_data): Likewise.
2271 (handle_pread): Likewise.
2272 * linux-low.c (disable_regset): Likewise.
2273 (fetch_register): Likewise.
2274 (store_register): Likewise.
2275 (get_dynamic): Likewise.
2276 (linux_qxfer_libraries_svr4): Likewise.
2277 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2278 (set_fast_tracepoint_jump): Likewise.
2279 (uninsert_fast_tracepoint_jumps_at): Likewise.
2280 (reinsert_fast_tracepoint_jumps_at): Likewise.
2281 (validate_inserted_breakpoint): Likewise.
2282 (clone_agent_expr): Likewise.
2283 * regcache.c (init_register_cache): Likewise.
2284 * remote-utils.c (putpkt_binary_1): Likewise.
2285 (decode_M_packet): Likewise.
2286 (decode_X_packet): Likewise.
2287 (look_up_one_symbol): Likewise.
2288 (relocate_instruction): Likewise.
2289 (monitor_output): Likewise.
2290 * server.c (handle_search_memory): Likewise.
2291 (handle_qxfer_exec_file): Likewise.
2292 (handle_qxfer_libraries): Likewise.
2293 (handle_qxfer): Likewise.
2294 (handle_query): Likewise.
2295 (handle_v_cont): Likewise.
2296 (handle_v_run): Likewise.
2297 (captured_main): Likewise.
2298 * target.c (write_inferior_memory): Likewise.
2299 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2300 * tracepoint.c (init_trace_buffer): Likewise.
2301 (add_tracepoint_action): Likewise.
2302 (add_traceframe): Likewise.
2303 (add_traceframe_block): Likewise.
2304 (cmd_qtdpsrc): Likewise.
2305 (cmd_qtdv): Likewise.
2306 (cmd_qtstatus): Likewise.
2307 (response_source): Likewise.
2308 (response_tsv): Likewise.
2309 (cmd_qtnotes): Likewise.
2310 (gdb_collect): Likewise.
2311 (initialize_tracepoint): Likewise.
2312
afbe19f8
PL
23132015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2314
2315 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2316 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2317 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2318 <NOP>: New.
2319 (enum aarch64_condition_codes): New enum.
2320 (w0): New static global.
2321 (fp): Likewise.
2322 (lr): Likewise.
2323 (struct aarch64_memory_operand) <type>: New
2324 MEMORY_OPERAND_POSTINDEX type.
2325 (postindex_memory_operand): New helper function.
2326 (emit_ret): New function.
2327 (emit_load_store_pair): New function, factored out of emit_stp
2328 with support for MEMORY_OPERAND_POSTINDEX.
2329 (emit_stp): Rewrite using emit_load_store_pair.
2330 (emit_ldp): New function.
2331 (emit_load_store): Likewise.
2332 (emit_ldr): Mention post-index instruction in comment.
2333 (emit_ldrh): New function.
2334 (emit_ldrb): New function.
2335 (emit_ldrsw): Mention post-index instruction in comment.
2336 (emit_str): Likewise.
2337 (emit_subs): New function.
2338 (emit_cmp): Likewise.
2339 (emit_and): Likewise.
2340 (emit_orr): Likewise.
2341 (emit_orn): Likewise.
2342 (emit_eor): Likewise.
2343 (emit_mvn): Likewise.
2344 (emit_lslv): Likewise.
2345 (emit_lsrv): Likewise.
2346 (emit_asrv): Likewise.
2347 (emit_mul): Likewise.
2348 (emit_sbfm): Likewise.
2349 (emit_sbfx): Likewise.
2350 (emit_ubfm): Likewise.
2351 (emit_ubfx): Likewise.
2352 (emit_csinc): Likewise.
2353 (emit_cset): Likewise.
2354 (emit_nop): Likewise.
2355 (emit_ops_insns): New helper function.
2356 (emit_pop): Likewise.
2357 (emit_push): Likewise.
2358 (aarch64_emit_prologue): New function.
2359 (aarch64_emit_epilogue): Likewise.
2360 (aarch64_emit_add): Likewise.
2361 (aarch64_emit_sub): Likewise.
2362 (aarch64_emit_mul): Likewise.
2363 (aarch64_emit_lsh): Likewise.
2364 (aarch64_emit_rsh_signed): Likewise.
2365 (aarch64_emit_rsh_unsigned): Likewise.
2366 (aarch64_emit_ext): Likewise.
2367 (aarch64_emit_log_not): Likewise.
2368 (aarch64_emit_bit_and): Likewise.
2369 (aarch64_emit_bit_or): Likewise.
2370 (aarch64_emit_bit_xor): Likewise.
2371 (aarch64_emit_bit_not): Likewise.
2372 (aarch64_emit_equal): Likewise.
2373 (aarch64_emit_less_signed): Likewise.
2374 (aarch64_emit_less_unsigned): Likewise.
2375 (aarch64_emit_ref): Likewise.
2376 (aarch64_emit_if_goto): Likewise.
2377 (aarch64_emit_goto): Likewise.
2378 (aarch64_write_goto_address): Likewise.
2379 (aarch64_emit_const): Likewise.
2380 (aarch64_emit_call): Likewise.
2381 (aarch64_emit_reg): Likewise.
2382 (aarch64_emit_pop): Likewise.
2383 (aarch64_emit_stack_flush): Likewise.
2384 (aarch64_emit_zero_ext): Likewise.
2385 (aarch64_emit_swap): Likewise.
2386 (aarch64_emit_stack_adjust): Likewise.
2387 (aarch64_emit_int_call_1): Likewise.
2388 (aarch64_emit_void_call_2): Likewise.
2389 (aarch64_emit_eq_goto): Likewise.
2390 (aarch64_emit_ne_goto): Likewise.
2391 (aarch64_emit_lt_goto): Likewise.
2392 (aarch64_emit_le_goto): Likewise.
2393 (aarch64_emit_gt_goto): Likewise.
2394 (aarch64_emit_ge_got): Likewise.
2395 (aarch64_emit_ops_impl): New static global variable.
2396 (aarch64_emit_ops): New target function, return
2397 &aarch64_emit_ops_impl.
2398 (struct linux_target_ops): Install it.
2399
bb903df0
PL
24002015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2401
2402 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2403 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2404 aarch64-ipa.o.
2405 * linux-aarch64-ipa.c: New file.
2406 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2407 and endian.h.
2408 (aarch64_get_thread_area): New target method.
2409 (extract_signed_bitfield): New helper function.
2410 (aarch64_decode_ldr_literal): New function.
2411 (enum aarch64_opcodes): New enum.
2412 (struct aarch64_register): New struct.
2413 (struct aarch64_operand): New struct.
2414 (x0): New static global.
2415 (x1): Likewise.
2416 (x2): Likewise.
2417 (x3): Likewise.
2418 (x4): Likewise.
2419 (w2): Likewise.
2420 (ip0): Likewise.
2421 (sp): Likewise.
2422 (xzr): Likewise.
2423 (aarch64_register): New helper function.
2424 (register_operand): Likewise.
2425 (immediate_operand): Likewise.
2426 (struct aarch64_memory_operand): New struct.
2427 (offset_memory_operand): New helper function.
2428 (preindex_memory_operand): Likewise.
2429 (enum aarch64_system_control_registers): New enum.
2430 (ENCODE): New macro.
2431 (emit_insn): New helper function.
2432 (emit_b): New function.
2433 (emit_bcond): Likewise.
2434 (emit_cb): Likewise.
2435 (emit_tb): Likewise.
2436 (emit_blr): Likewise.
2437 (emit_stp): Likewise.
2438 (emit_ldp_q_offset): Likewise.
2439 (emit_stp_q_offset): Likewise.
2440 (emit_load_store): Likewise.
2441 (emit_ldr): Likewise.
2442 (emit_ldrsw): Likewise.
2443 (emit_str): Likewise.
2444 (emit_ldaxr): Likewise.
2445 (emit_stxr): Likewise.
2446 (emit_stlr): Likewise.
2447 (emit_data_processing_reg): Likewise.
2448 (emit_data_processing): Likewise.
2449 (emit_add): Likewise.
2450 (emit_sub): Likewise.
2451 (emit_mov): Likewise.
2452 (emit_movk): Likewise.
2453 (emit_mov_addr): Likewise.
2454 (emit_mrs): Likewise.
2455 (emit_msr): Likewise.
2456 (emit_sevl): Likewise.
2457 (emit_wfe): Likewise.
2458 (append_insns): Likewise.
2459 (can_encode_int32_in): New helper function.
2460 (aarch64_relocate_instruction): New function.
2461 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2462 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2463 (struct linux_target_ops): Install aarch64_get_thread_area,
2464 aarch64_install_fast_tracepoint_jump_pad and
2465 aarch64_get_min_fast_tracepoint_insn_len.
2466
787749ea
PL
24672015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2468
2469 * Makefile.in (aarch64-insn.o): New rule.
2470 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2471
9812b2e6
YQ
24722015-09-21 Yao Qi <yao.qi@linaro.org>
2473
2474 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2475
18fe412b
YQ
24762015-09-21 Yao Qi <yao.qi@linaro.org>
2477
2478 * tracepoint.c (max_jump_pad_size): Remove.
2479
a0cc84cd
YQ
24802015-09-18 Yao Qi <yao.qi@linaro.org>
2481
2482 * linux-aarch64-low.c: Don't include sys/uio.h.
2483 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2484
d78908cf
WW
24852015-09-16 Wei-cheng Wang <cole945@gmail.com>
2486
2487 * tracepoint.c (eval_result_type): Change prototype.
2488 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2489
d57e0d50
PA
24902015-09-15 Pedro Alves <palves@redhat.com>
2491
2492 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2493 Check whether to report exec events instead of checking whether
2494 multiprocess is enabled.
2495
5a676acc
PA
24962015-09-15 Pedro Alves <palves@redhat.com>
2497
2498 PR remote/18965
2499 * remote-utils.c (prepare_resume_reply): Merge
2500 TARGET_WAITKIND_VFORK_DONE switch case with the
2501 TARGET_WAITKIND_FORKED case.
2502
7c5d0fad
YQ
25032015-09-15 Yao Qi <yao.qi@linaro.org>
2504
2505 * server.c (handle_query): Check string comparison using
2506 "else if" instead of "if".
2507
750ce8d1
YQ
25082015-09-15 Yao Qi <yao.qi@linaro.org>
2509
2510 * server.c (vCont_supported): New global variable.
2511 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2512 matches. Append ";vContSupported+" to own_buf.
2513 (handle_v_requests): Append ";s;S" to own_buf if target supports
2514 hardware single step or vCont_supported is false.
2515 (capture_main): Set vCont_supported to zero.
2516
70b90b91
YQ
25172015-09-15 Yao Qi <yao.qi@linaro.org>
2518
2519 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2520 it to ...
2521 (linux_supports_hardware_single_step): ... New function.
2522 (linux_target_ops): Update.
2523 * lynx-low.c (lynx_target_ops): Set field
2524 supports_hardware_single_step to target_can_do_hardware_single_step.
2525 * nto-low.c (nto_target_ops): Likewise.
2526 * spu-low.c (spu_target_ops): Likewise.
2527 * win32-low.c (win32_target_ops): Likewise.
2528 * target.c (target_can_do_hardware_single_step): New function.
2529 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2530 Remove. <supports_hardware_single_step>: New field.
2531 (target_supports_conditional_breakpoints): Remove.
2532 (target_supports_hardware_single_step): New macro.
2533 (target_can_do_hardware_single_step): Declare.
2534 * server.c (handle_query): Use target_supports_hardware_single_step
2535 instead of target_supports_conditional_breakpoints.
2536
ade90bde
YQ
25372015-09-15 Yao Qi <yao.qi@linaro.org>
2538
2539 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2540 function.
2541 (struct linux_target_ops the_low_target): Install
2542 aarch64_linux_siginfo_fixup.
2543
94585166
DB
25442015-09-11 Don Breazeal <donb@codesourcery.com>
2545 Luis Machado <lgustavo@codesourcery.com>
2546
2547 * linux-low.c (linux_mourn): Static declaration.
2548 (linux_arch_setup): Move in front of
2549 handle_extended_wait.
2550 (linux_arch_setup_thread): New function.
2551 (handle_extended_wait): Handle exec events. Call
2552 linux_arch_setup_thread. Make event_lwp argument a
2553 pointer-to-a-pointer.
2554 (check_zombie_leaders): Do not check stopped threads.
2555 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2556 (linux_low_filter_event): Add lwp and thread for exec'ing
2557 non-leader thread if leader thread has been deleted.
2558 Refactor code into linux_arch_setup_thread and call it.
2559 Pass child lwp pointer by reference to handle_extended_wait.
2560 (linux_wait_for_event_filtered): Update comment.
2561 (linux_wait_1): Prevent clobbering exec event status.
2562 (linux_supports_exec_events): New function.
2563 (linux_target_ops) <supports_exec_events>: Initialize new member.
2564 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2565 new member.
2566 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2567 * server.c (report_exec_events): New global variable.
2568 (handle_query): Handle qSupported query for exec-events feature.
2569 (captured_main): Initialize report_exec_events.
2570 * server.h (report_exec_events): Declare new global variable.
2571 * target.h (struct target_ops) <supports_exec_events>: New
2572 member.
2573 (target_supports_exec_events): New macro.
2574 * win32-low.c (win32_target_ops) <supports_exec_events>:
2575 Initialize new member.
2576
0568462b
MM
25772015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2578
2579 * linux-low.c (linux_low_enable_btrace): Remove.
2580 (linux_target_ops): Replace linux_low_enable_btrace with
2581 linux_enable_btrace.
2582
39edd165
YQ
25832015-09-03 Yao Qi <yao.qi@linaro.org>
2584
2585 * linux-aarch64-low.c (aarch64_insert_point): Call
2586 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2587 returns true.
2588
1db33b5a
UW
25892015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2590
2591 * linux-low.c (check_stopped_by_breakpoint): Use
2592 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2593
ab290430
PA
25942015-08-27 Pedro Alves <palves@redhat.com>
2595
2596 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2597
8d749320
SM
25982015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2599
6711b7f8
SM
2600 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2601 the XNEW-family equivalent.
8d749320
SM
2602 (compile_bytecodes): Likewise.
2603 * dll.c (loaded_dll): Likewise.
2604 * event-loop.c (append_callback_event): Likewise.
2605 (create_file_handler): Likewise.
2606 (create_file_event): Likewise.
2607 * hostio.c (handle_open): Likewise.
2608 * inferiors.c (add_thread): Likewise.
2609 (add_process): Likewise.
2610 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2611 * linux-arm-low.c (arm_new_process): Likewise.
2612 (arm_new_thread): Likewise.
2613 * linux-low.c (add_to_pid_list): Likewise.
2614 (linux_add_process): Likewise.
2615 (handle_extended_wait): Likewise.
2616 (add_lwp): Likewise.
2617 (enqueue_one_deferred_signal): Likewise.
2618 (enqueue_pending_signal): Likewise.
2619 (linux_resume_one_lwp_throw): Likewise.
2620 (linux_resume_one_thread): Likewise.
2621 (linux_read_memory): Likewise.
2622 (linux_write_memory): Likewise.
2623 * linux-mips-low.c (mips_linux_new_process): Likewise.
2624 (mips_linux_new_thread): Likewise.
2625 (mips_add_watchpoint): Likewise.
2626 * linux-x86-low.c (initialize_low_arch): Likewise.
2627 * lynx-low.c (lynx_add_process): Likewise.
2628 * mem-break.c (set_raw_breakpoint_at): Likewise.
2629 (set_breakpoint): Likewise.
2630 (add_condition_to_breakpoint): Likewise.
2631 (add_commands_to_breakpoint): Likewise.
2632 (clone_agent_expr): Likewise.
2633 (clone_one_breakpoint): Likewise.
2634 * regcache.c (new_register_cache): Likewise.
2635 * remote-utils.c (look_up_one_symbol): Likewise.
2636 * server.c (queue_stop_reply): Likewise.
2637 (start_inferior): Likewise.
2638 (queue_stop_reply_callback): Likewise.
2639 (handle_target_event): Likewise.
2640 * spu-low.c (fetch_ppc_memory): Likewise.
2641 (store_ppc_memory): Likewise.
2642 * target.c (set_target_ops): Likewise.
2643 * thread-db.c (thread_db_load_search): Likewise.
2644 (try_thread_db_load_1): Likewise.
2645 * tracepoint.c (add_tracepoint): Likewise.
2646 (add_tracepoint_action): Likewise.
2647 (create_trace_state_variable): Likewise.
2648 (cmd_qtdpsrc): Likewise.
2649 (cmd_qtro): Likewise.
2650 (add_while_stepping_state): Likewise.
2651 * win32-low.c (child_add_thread): Likewise.
2652 (get_image_name): Likewise.
2653
ed8b7b42
YQ
26542015-08-25 Yao Qi <yao.qi@linaro.org>
2655
2656 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2657
db3cb7cb
YQ
26582015-08-25 Yao Qi <yao.qi@linaro.org>
2659
2660 * Makefile.in (aarch64-linux.o): New rule.
2661 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2662 srv_tgtobj.
2663 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2664 (aarch64_init_debug_reg_state): Make it extern.
2665 (aarch64_linux_prepare_to_resume): Remove.
2666
f6011a1c
YQ
26672015-08-25 Yao Qi <yao.qi@linaro.org>
2668
2669 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2670 lwp_arch_private_info and ptid_of_lwp.
2671
88e2cf7e
YQ
26722015-08-25 Yao Qi <yao.qi@linaro.org>
2673
2674 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2675 Find proc_info by find_process_pid. All callers updated.
2676
5e35436e
YQ
26772015-08-25 Yao Qi <yao.qi@linaro.org>
2678
2679 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2680 Remove.
2681 (debug_reg_change_callback): Remove.
2682 (aarch64_notify_debug_reg_change): Remove.
2683
4a8a7965
YQ
26842015-08-25 Yao Qi <yao.qi@linaro.org>
2685
2686 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2687 Call current_lwp_ptid.
2688
32a271ee
YQ
26892015-08-25 Yao Qi <yao.qi@linaro.org>
2690
2691 * linux-aarch64-low.c (debug_reg_change_callback): Use
2692 debug_printf.
2693
0d51c8d7
YQ
26942015-08-25 Yao Qi <yao.qi@linaro.org>
2695
2696 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2697
31a43dd5
YQ
26982015-08-25 Yao Qi <yao.qi@linaro.org>
2699
2700 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2701
8ee52567
YQ
27022015-08-25 Yao Qi <yao.qi@linaro.org>
2703
2704 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2705 the code.
2706
ff3f0f45
YQ
27072015-08-25 Yao Qi <yao.qi@linaro.org>
2708
2709 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2710 Remove.
2711 (debug_reg_change_callback): Remove argument entry and add argument
2712 lwp. Remove local variable thread. Don't print thread id in the
2713 debugging output. Don't check whether pid of thread equals to pid.
2714 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2715 iterate_over_lwps instead find_inferior.
2716
3d40fbb5
PA
27172015-08-24 Pedro Alves <palves@redhat.com>
2718
2719 * inferiors.c (get_first_process): New function.
2720 * inferiors.h (get_first_process): New declaration.
2721 * remote-utils.c (read_ptid): Default to the first process in the
2722 list, instead of to the current thread's process.
2723
438e1e42
PA
27242015-08-24 Pedro Alves <palves@redhat.com>
2725
2726 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2727 * event-loop.c: Likewise.
2728 * remote-utils.c: Likewise.
2729 * tracepoint.c: Likewise.
2730
a8c6d4fc
PA
27312015-08-24 Pedro Alves <palves@redhat.com>
2732
2733 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2734 ptid_get_lwp.
2735
99b0bb12
PA
27362015-08-21 Pedro Alves <palves@redhat.com>
2737
2738 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2739 instead of literal 1.
2740
f8904751
PA
27412015-08-21 Pedro Alves <palves@redhat.com>
2742
2743 * tdesc.c (default_description): Explicitly zero-initialize.
2744
465a859e
PA
27452015-08-21 Pedro Alves <palves@redhat.com>
2746
2747 PR gdb/18749
2748 * inferiors.c (remove_thread): Discard any pending stop reply for
2749 this thread.
2750 * server.c (remove_all_on_match_pid): Rename to ...
2751 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2752 instead of a pid.
2753 (discard_queued_stop_replies): Change parameter to a ptid. Now
2754 extern.
2755 (handle_v_kill, kill_inferior_callback, captured_main)
2756 (process_serial_event): Adjust.
2757 * server.h (discard_queued_stop_replies): Declare.
2758
f0db101d
PA
27592015-08-21 Pedro Alves <palves@redhat.com>
2760
2761 * linux-low.c (wait_for_sigstop): Always switch to no thread
2762 selected if the previously current thread dies.
2763 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2764 process instead of the current thread's.
2765 * remote-utils.c (input_interrupt): Don't check if there's no
2766 current thread.
2767 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2768 current thread to the general thread fails, error out.
2769 (handle_qxfer_auxv, handle_qxfer_libraries)
2770 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2771 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2772 (handle_query): Check if there's a thread selected instead of
2773 checking whether there's any thread in the thread list.
2774 (handle_qxfer_threads, handle_qxfer_btrace)
2775 (handle_qxfer_btrace_conf): Don't error out early if there's no
2776 thread in the thread list.
2777 (handle_v_cont, myresume): Don't set the current thread to the
2778 continue thread.
2779 (process_serial_event) <Hg handling>: Also set thread_id if the
2780 previous general thread is still alive.
2781 (process_serial_event) <g/G handling>: If setting the current
2782 thread to the general thread fails, error out.
2783 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2784 thread's lwp instead of the current thread's.
2785 * target.c (set_desired_thread): If the desired thread was not
2786 found, leave the current thread pointing to NULL. Return an int
2787 (boolean) indicating success.
2788 * target.h (set_desired_thread): Change return type to int.
2789
40045d91
MF
27902015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2791
2792 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2793 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2794 #includes.
2795 (ps_get_thread_area): New function.
2796
45face3b
GB
27972015-08-19 Gary Benson <gbenson@redhat.com>
2798
2799 * hostio.c (handle_pread): Do not attempt to read more data
2800 than hostio_reply_with_data can fit in a packet.
2801
16d5f642
JB
28022015-08-18 Joel Brobecker <brobecker@adacore.com>
2803
2804 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2805
a738da3a
MF
28062015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2807
2808 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2809
33ebda9d
PA
28102015-08-06 Pedro Alves <palves@redhat.com>
2811
2812 * tracepoint.c (expr_eval_result): Now an int.
2813
a44892be
PA
28142015-08-06 Pedro Alves <palves@redhat.com>
2815
2816 * gdbthread.h (struct regcache): Forward declare.
2817 (struct thread_info) <regcache_data>: Now a struct regcache
2818 pointer.
2819 * inferiors.c (inferior_regcache_data)
2820 (set_inferior_regcache_data): Now work with struct regcache
2821 pointers.
2822 * inferiors.h (struct regcache): Forward declare.
2823 (inferior_regcache_data, set_inferior_regcache_data): Now work
2824 with struct regcache pointers.
2825 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2826 (free_register_cache_thread): Remove struct regcache pointer
2827 casts.
2828
608a1e46
PA
28292015-08-06 Pedro Alves <palves@redhat.com>
2830
2831 * server.c (captured_main): On error, print the exception message
2832 to stderr, and if run_once is set, throw a quit.
2833
f0ce0d3a
PA
28342015-08-06 Pedro Alves <palves@redhat.com>
2835
2836 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2837 the current thread.
2838
bf47e248
PA
28392015-08-06 Pedro Alves <palves@redhat.com>
2840
2841 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2842 reading beyond the passed in buffer length.
2843
b6b9ffcc
PL
28442015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2845
2846 * tracepoint.c (symbol_list) <required>: Remove.
2847
863d01bd
PA
28482015-08-06 Pedro Alves <palves@redhat.com>
2849
2850 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2851 count if stopping and suspending threads.
2852 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2853 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2854 (linux_detach): Complete an ongoing step-over.
2855 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2856 throughout.
2857 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2858 (linux_wait_1): If passing a signal to the inferior after
2859 finishing a step-over, unsuspend and re-resume all lwps. If we
2860 see a single-step event but the thread should be continuing, don't
2861 pass the trap to gdb.
2862 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2863 internal_error instead of gdb_assert.
2864 (enqueue_pending_signal): New function.
2865 (check_ptrace_stopped_lwp_gone): Add debug output.
2866 (start_step_over): Use internal_error instead of gdb_assert.
2867 (complete_ongoing_step_over): New function.
2868 (linux_resume_one_thread): Don't resume a suspended thread.
2869 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2870 it stepping.
2871
00db26fa
PA
28722015-08-06 Pedro Alves <palves@redhat.com>
2873
2874 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2875 (linux_thread_alive): Use lwp_is_marked_dead.
2876 (extended_event_reported): Delete.
2877 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2878 instead of extended_event_reported.
2879 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2880 as well.
2881 (lwp_is_marked_dead): New function.
2882 (lwp_running): Use lwp_is_marked_dead.
2883 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2884 comment.
2885
ad071a30
PA
28862015-08-06 Pedro Alves <palves@redhat.com>
2887
2888 * linux-low.c (linux_wait_1): Move fork event output out of the
2889 !report_to_gdb check. Pass event_child->waitstatus to
2890 target_waitstatus_to_string instead of ourstatus.
2891
524b57e6
YQ
28922015-08-04 Yao Qi <yao.qi@linaro.org>
2893
2894 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2895 if current_thread is 32 bit.
2896
6085d6f6
YQ
28972015-08-04 Yao Qi <yao.qi@linaro.org>
2898
2899 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2900 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2901 * server.c (extended_protocol): Remove "static".
2902 * server.h (extended_protocol): Declare it.
2903
8a7e4587
YQ
29042015-08-04 Yao Qi <yao.qi@linaro.org>
2905
2906 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2907 both aarch64 and aarch32.
2908 (aarch64_set_pc): Likewise.
2909
3b53ae99
YQ
29102015-08-04 Yao Qi <yao.qi@linaro.org>
2911
2912 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2913 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2914 arm-with-neon.xml to srv_xmlfiles.
2915 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2916 (is_64bit_tdesc): New function.
2917 (aarch64_linux_read_description): New function.
2918 (aarch64_arch_setup): Call aarch64_linux_read_description.
2919 (regs_info): Rename to regs_info_aarch64.
2920 (aarch64_regs_info): Return right regs_info.
2921 (initialize_low_arch): Call initialize_low_arch_aarch32.
2922
bd9e6534
YQ
29232015-08-04 Yao Qi <yao.qi@linaro.org>
2924
2925 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2926 * linux-aarch32-low.c: New file.
2927 * linux-aarch32-low.h: New file.
2928 * linux-arm-low.c (arm_fill_gregset): Move it to
2929 linux-aarch32-low.c.
2930 (arm_store_gregset): Likewise.
2931 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2932 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2933 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2934 (regs_info): Rename to regs_info_arm.
2935 (arm_regs_info): Return regs_info_aarch32 if
2936 have_ptrace_getregset is 1 and target description is
2937 arm_with_neon or arm_with_vfpv3.
2938 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2939 Call initialize_low_arch_aarch32 instead.
2940
ded48a5e
YQ
29412015-08-04 Yao Qi <yao.qi@linaro.org>
2942
2943 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2944 * linux-low.c: ... here.
2945 * linux-low.h (have_ptrace_getregset): Declare it.
2946
96e9210f
PA
29472015-08-04 Pedro Alves <palves@redhat.com>
2948
2949 * thread-db.c (struct thread_db): Use new typedefs.
2950 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2951 CHK calls.
2952 (disable_thread_event_reporting): Cast result of dlsym to
2953 destination function pointer type.
2954 (thread_db_mourn): Use td_ta_delete_ftype.
2955
af60a1ef
SL
29562015-08-03 Sandra Loosemore <sandra@codesourcery.com>
2957
2958 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2959 arch variant.
2960 (CDX_BREAKPOINT): Define for R2.
2961 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2962 (the_low_target): Add comments.
2963
e8b41681
YQ
29642015-07-30 Yao Qi <yao.qi@linaro.org>
2965
2966 * linux-arm-low.c (arm_hwcap): Remove it.
2967 (arm_read_description): New local variable arm_hwcap. Don't
2968 set arm_hwcap to zero.
2969
89abb039
YQ
29702015-07-30 Yao Qi <yao.qi@linaro.org>
2971
2972 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2973 Use regcache->tdesc instead.
2974 (arm_store_wmmxregset): Likewise.
2975 (arm_fill_vfpregset): Likewise.
2976 (arm_store_vfpregset): Likewise.
2977
deca266c
YQ
29782015-07-30 Yao Qi <yao.qi@linaro.org>
2979
2980 * linux-arm-low.c: Include arch/arm.h.
2981 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2982 (arm_store_gregset): Likewise.
2983
aa58a496
SM
29842015-07-29 Simon Marchi <simon.marchi@ericsson.com>
2985
2986 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2987 ptrace's 4th parameter.
2988
50904b25
YQ
29892015-07-27 Yao Qi <yao.qi@linaro.org>
2990
2991 * configure.srv (case aarch64*-*-linux*): Don't set
2992 srv_linux_usrregs.
2993
5826e159
PA
29942015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
2995
2996 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2997 sys/ptrace.h.
2998 * linux-arm-low.c: Likewise.
2999 * linux-cris-low.c: Likewise.
3000 * linux-crisv32-low.c: Likewise.
3001 * linux-low.c: Likewise.
3002 * linux-m68k-low.c: Likewise.
3003 * linux-mips-low.c: Likewise.
3004 * linux-nios2-low.c: Likewise.
3005 * linux-s390-low.c: Likewise.
3006 * linux-sparc-low.c: Likewise.
3007 * linux-tic6x-low.c: Likewise.
3008 * linux-tile-low.c: Likewise.
3009 * linux-x86-low.c: Likewise.
3010
54019719
PA
30112015-07-24 Pedro Alves <palves@redhat.com>
3012
3013 * config.in: Regenerate.
3014 * configure: Regenerate.
3015
eb7aa561
PA
30162015-07-24 Pedro Alves <palves@redhat.com>
3017
3018 * acinclude.m4: Include ../ptrace.m4.
3019 * configure.ac: Call GDB_AC_PTRACE.
3020 * config.in, configure: Regenerate.
3021
55d7b841
YQ
30222015-07-24 Yao Qi <yao.qi@linaro.org>
3023
3024 * linux-low.c (linux_create_inferior): Remove setting to
3025 proc->priv->new_inferior.
3026 (linux_attach): Likewise.
3027 (linux_low_filter_event): Likewise.
3028 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3029
c06cbd92
YQ
30302015-07-24 Yao Qi <yao.qi@linaro.org>
3031
3032 * linux-low.c (linux_arch_setup): New function.
3033 (linux_low_filter_event): If proc->tdesc is NULL and
3034 proc->attached is true, call the_low_target.arch_setup.
3035 Otherwise, keep status pending, and return.
3036 (linux_resume_one_lwp_throw): Don't call get_pc if
3037 thread->while_stepping isn't NULL. Don't call
3038 get_thread_regcache if proc->tdesc is NULL.
3039 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3040 (linux_target_ops): Install arch_setup.
3041 * server.c (start_inferior): Call the_target->arch_setup.
3042 * target.h (struct target_ops) <arch_setup>: New field.
3043 (target_arch_setup): New marco.
3044 * lynx-low.c (lynx_target_ops): Update.
3045 * nto-low.c (nto_target_ops): Update.
3046 * spu-low.c (spu_target_ops): Update.
3047 * win32-low.c (win32_target_ops): Update.
3048
5ae3ebba
YQ
30492015-07-24 Yao Qi <yao.qi@linaro.org>
3050
3051 * linux-low.c (linux_add_process): Don't set
3052 proc->priv->new_inferior.
3053 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3054 (linux_attach): Likewise.
3055
eb97750b
YQ
30562015-07-24 Yao Qi <yao.qi@linaro.org>
3057
3058 * server.c (start_inferior): Code refactor.
3059
51aee833
YQ
30602015-07-24 Yao Qi <yao.qi@linaro.org>
3061
3062 * server.c (process_serial_event): Set general_thread.
3063
af1b22f3
YQ
30642015-07-21 Yao Qi <yao.qi@linaro.org>
3065
3066 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3067 aarch64_linux_get_debug_reg_capacity.
3068
554717a3
YQ
30692015-07-17 Yao Qi <yao.qi@linaro.org>
3070
3071 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3072 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3073 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3074 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3075 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3076 (AARCH64_HWP_ALIGNMENT): Likewise.
3077 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3078 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3079 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3080 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3081 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3082 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3083 (struct aarch64_debug_reg_state): Likewise.
3084 (struct arch_lwp_info): Likewise.
3085 (aarch64_align_watchpoint): Likewise.
3086 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3087 (aarch64_watchpoint_length): Likewise.
3088 (aarch64_point_encode_ctrl_reg): Likewise
3089 (aarch64_point_is_aligned): Likewise.
3090 (aarch64_align_watchpoint): Likewise.
3091 (aarch64_linux_set_debug_regs):
3092 (aarch64_dr_state_insert_one_point): Likewise.
3093 (aarch64_dr_state_remove_one_point): Likewise.
3094 (aarch64_handle_breakpoint): Likewise.
3095 (aarch64_handle_aligned_watchpoint): Likewise.
3096 (aarch64_handle_unaligned_watchpoint): Likewise.
3097 (aarch64_handle_watchpoint): Likewise.
3098
c67ca4de
YQ
30992015-07-17 Yao Qi <yao.qi@linaro.org>
3100
3101 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3102 and don't aarch64_get_debug_reg_state. All callers update.
3103 (aarch64_handle_aligned_watchpoint): Likewise.
3104 (aarch64_handle_unaligned_watchpoint): Likewise.
3105 (aarch64_handle_watchpoint): Likewise.
3106 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3107 (aarch64_remove_point): Likewise.
3108
25abf979
YQ
31092015-07-17 Yao Qi <yao.qi@linaro.org>
3110
3111 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3112 debug_printf.
3113 (aarch64_handle_unaligned_watchpoint): Likewise.
3114
db1ff28b
JK
31152015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3116
3117 Revert the previous 3 commits:
3118 Move gdb_regex* to common/
3119 Move linux_find_memory_regions_full & co.
3120 gdbserver build-id attribute generator
3121
700ca40f
JK
31222015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3123 Jan Kratochvil <jan.kratochvil@redhat.com>
3124
3125 gdbserver build-id attribute generator.
3126 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3127 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3128 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3129 (find_phdr): New.
3130 (get_dynamic): Use find_pdhr to traverse program headers.
3131 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3132 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3133 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3134 (get_hex_build_id): New.
3135 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3136 to reply XML document.
3137
9904185c
JK
31382015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3139 Jan Kratochvil <jan.kratochvil@redhat.com>
3140
3141 * target.c: Include target/target-utils.h and fcntl.h.
3142 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3143 (target_fileio_read_stralloc): New functions.
3144
6e5b4429
JK
31452015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3146
3147 * Makefile.in (OBS): Add gdb_regex.o.
3148 (gdb_regex.o): New.
3149 * config.in: Rebuilt.
3150 * configure: Rebuilt.
3151
ddc98fbf
JK
31522015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3153 Jan Kratochvil <jan.kratochvil@redhat.com>
3154
3155 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3156 * Makefile.in (OBS): Add target-utils.o.
3157 (linux-maps.o, target-utils.o): New.
3158 * configure.srv (srv_linux_obj): Add linux-maps.o.
3159
e57bb7a0
PL
31602015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3161
3162 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3163 function, return 1.
3164 (the_low_target): Install it.
3165
586b02a9
PA
31662015-07-14 Pedro Alves <palves@redhat.com>
3167
3168 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3169 Instead, ignore ECHILD, and throw an error for other errnos.
3170
58c1b36c
PA
31712015-07-10 Pedro Alves <palves@redhat.com>
3172
3173 * event-loop.c (struct callback_event) <data>: Change type to
3174 gdb_client_data instance instead of gdb_client_data pointer.
3175 (append_callback_event): Adjust.
3176
421530db
PL
31772015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3178
3179 * linux-aarch64-low.c: Add comments for each linux_target_ops
3180 method. Remove comments already covered in target_ops and
3181 linux_target_ops definitions.
3182 (the_low_target): Add comments for each unimplemented method.
3183
c2d65f38
YQ
31842015-07-09 Yao Qi <yao.qi@linaro.org>
3185
3186 * linux-aarch64-low.c (aarch64_regmap): Remove.
3187 (aarch64_usrregs_info): Remove.
3188 (regs_info): Set field usrregs to NULL.
3189
b20a6524
MM
31902015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3191
3192 * linux-low.c: Include "rsp-low.h"
3193 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3194 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3195 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3196 (handle_btrace_enable_pt): New.
3197 (handle_btrace_general_set): Support "pt".
3198 (handle_btrace_conf_general_set): Support "pt:size".
3199
96c97461
PL
32002015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3201
3202 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3203 Z_PACKET_SW_BP.
3204
37d66942
PL
32052015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3206
3207 * linux-aarch64-low.c: Remove comment about endianness.
3208 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3209 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3210 memcmp.
3211
dc06243f
GB
32122015-06-24 Gary Benson <gbenson@redhat.com>
3213
3214 * linux-i386-ipa.c (stdint.h): Do not include.
3215 * lynx-i386-low.c (stdint.h): Likewise.
3216 * lynx-ppc-low.c (stdint.h): Likewise.
3217 * mem-break.c (stdint.h): Likewise.
3218 * thread-db.c (stdint.h): Likewise.
3219 * tracepoint.c (stdint.h): Likewise.
3220 * win32-low.c (stdint.h): Likewise.
3221
124e13d9
SM
32222015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3223
3224 * server.c (write_qxfer_response): Update call to
3225 remote_escape_output.
3226
909c2cda
JK
32272015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3228 Jan Kratochvil <jan.kratochvil@redhat.com>
3229
3230 Merge multiple hex conversions.
3231 * gdbreplay.c (tohex): Rename to 'fromhex'.
3232 (logchar): Use fromhex.
3233
24c05f46
JK
32342015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3235
3236 * server.c (handle_qxfer_libraries): Set `version' attribute for
3237 <library-list>.
3238
14d2069a
GB
32392015-06-10 Gary Benson <gbenson@redhat.com>
3240
3241 * target.h (struct target_ops) <multifs_open>: New field.
3242 <multifs_unlink>: Likewise.
3243 <multifs_readlink>: Likewise.
3244 * linux-low.c (nat/linux-namespaces.h): New include.
3245 (linux_target_ops): Initialize the_target->multifs_open,
3246 the_target->multifs_unlink and the_target->multifs_readlink.
3247 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3248 * hostio.c (hostio_fs_pid): New static variable.
3249 (hostio_handle_new_gdb_connection): New function.
3250 (handle_setfs): Likewise.
3251 (handle_open): Use the_target->multifs_open as appropriate.
3252 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3253 (handle_readlink): Use the_target->multifs_readlink as
3254 appropriate.
3255 (handle_vFile): Handle vFile:setfs packets.
3256 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3257 after target_handle_new_gdb_connection.
3258
4b8b5e72
GB
32592015-06-10 Gary Benson <gbenson@redhat.com>
3260
3261 * configure.ac (AC_CHECK_FUNCS): Add setns.
3262 * config.in: Regenerate.
3263 * configure: Likewise.
3264 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3265 (linux-namespaces.o): New rule.
3266 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3267
3ac2e371
GB
32682015-06-09 Gary Benson <gbenson@redhat.com>
3269
3270 * hostio.c (handle_open): Process mode argument with
3271 fileio_to_host_mode.
3272
ca9b78ce
YQ
32732015-06-01 Yao Qi <yao.qi@linaro.org>
3274
3275 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3276 * linux-x86-low.c: Likewise.
3277
bfacd19d
DB
32782015-05-28 Don Breazeal <donb@codesourcery.com>
3279
3280 * linux-low.c (handle_extended_wait): Initialize
3281 thread_info.last_resume_kind for new fork children.
3282
452003ef
PA
32832015-05-15 Pedro Alves <palves@redhat.com>
3284
3285 * target.h (target_handle_new_gdb_connection): Rewrite using if
3286 wrapped in do/while.
3287
1041a03c
JB
32882015-05-14 Joel Brobecker <brobecker@adacore.com>
3289
3290 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3291 * configure, config.in: Regenerate.
3292 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3293 Declare typedef.
3294
c269dbdb
DB
32952015-05-12 Don Breazeal <donb@codesourcery.com>
3296
3297 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3298 PTRACE_EVENT_VFORK_DONE.
3299 (linux_low_ptrace_options, extended_event_reported): Add vfork
3300 events.
3301 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3302 and "vforkdone" for RSP 'T' Stop Reply Packet.
3303 * server.h (report_vfork_events): Declare
3304 global variable.
3305
3a8a0396
DB
33062015-05-12 Don Breazeal <donb@codesourcery.com>
3307
3308 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3309 (the_low_target) <new_fork>: Initialize new member.
3310 * linux-arm-low.c (arm_new_fork): New function.
3311 (the_low_target) <new_fork>: Initialize new member.
3312 * linux-low.c (handle_extended_wait): Call new target function
3313 new_fork.
3314 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3315 * linux-mips-low.c (mips_add_watchpoint): New function
3316 extracted from mips_insert_point.
3317 (the_low_target) <new_fork>: Initialize new member.
3318 (mips_linux_new_fork): New function.
3319 (mips_insert_point): Call mips_add_watchpoint.
3320 * linux-x86-low.c (x86_linux_new_fork): New function.
3321 (the_low_target) <new_fork>: Initialize new member.
3322
de0d863e
DB
33232015-05-12 Don Breazeal <donb@codesourcery.com>
3324
3325 * linux-low.c (handle_extended_wait): Implement return value,
3326 rename argument 'event_child' to 'event_lwp', handle
3327 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3328 (linux_low_ptrace_options): New function.
3329 (linux_low_filter_event): Call linux_low_ptrace_options,
3330 use different argument fo linux_enable_event_reporting,
3331 use return value from handle_extended_wait.
3332 (extended_event_reported): New function.
3333 (linux_wait_1): Call extended_event_reported and set
3334 status to report fork events.
3335 (linux_write_memory): Add pid to debug message.
3336 (reset_lwp_ptrace_options_callback): New function.
3337 (linux_handle_new_gdb_connection): New function.
3338 (linux_target_ops): Initialize new structure member.
3339 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3340 * lynx-low.c: Initialize new structure member.
3341 * remote-utils.c (prepare_resume_reply): Implement stop reason
3342 "fork" for "T" stop message.
3343 * server.c (handle_query): Call handle_new_gdb_connection.
3344 * server.h (report_fork_events): Declare global flag.
3345 * target.h (struct target_ops) <handle_new_gdb_connection>:
3346 New member.
3347 (target_handle_new_gdb_connection): New macro.
3348 * win32-low.c: Initialize new structure member.
3349
ddcbc397
DB
33502015-05-12 Don Breazeal <donb@codesourcery.com>
3351
3352 * mem-break.c (APPEND_TO_LIST): Define macro.
3353 (clone_agent_expr): New function.
3354 (clone_one_breakpoint): New function.
3355 (clone_all_breakpoints): New function.
3356 * mem-break.h: Declare new functions.
3357
89245bc0
DB
33582015-05-12 Don Breazeal <donb@codesourcery.com>
3359
3360 * linux-low.c (linux_supports_fork_events): New function.
3361 (linux_supports_vfork_events): New function.
3362 (linux_target_ops): Initialize new structure members.
3363 (initialize_low): Call linux_check_ptrace_features.
3364 * lynx-low.c (lynx_target_ops): Initialize new structure
3365 members.
3366 * server.c (report_fork_events, report_vfork_events):
3367 New global flags.
3368 (handle_query): Add new features to qSupported packet and
3369 response.
3370 (captured_main): Initialize new global variables.
3371 * target.h (struct target_ops) <supports_fork_events>:
3372 New member.
3373 <supports_vfork_events>: New member.
3374 (target_supports_fork_events): New macro.
3375 (target_supports_vfork_events): New macro.
3376 * win32-low.c (win32_target_ops): Initialize new structure
3377 members.
3378
835205d0
GB
33792015-05-12 Gary Benson <gbenson@redhat.com>
3380
3381 * server.c (handle_qxfer_exec_file): Use current process
3382 if annex is empty.
3383
21e94bd9
SL
33842015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3385
3386 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3387 Remove HAVE_PTRACE_GETREGS conditionals.
3388 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3389 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3390
45614f15
YQ
33912015-05-08 Yao Qi <yao.qi@linaro.org>
3392
3393 * linux-low.c (linux_supports_conditional_breakpoints): New
3394 function.
3395 (linux_target_ops): Install new target method.
3396 * lynx-low.c (lynx_target_ops): Install NULL hook for
3397 supports_conditional_breakpoints.
3398 * nto-low.c (nto_target_ops): Likewise.
3399 * spu-low.c (spu_target_ops): Likewise.
3400 * win32-low.c (win32_target_ops): Likewise.
3401 * server.c (handle_query): Check
3402 target_supports_conditional_breakpoints.
3403 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3404 New field.
3405 (target_supports_conditional_breakpoints): New macro.
3406
80ad801e
PA
34072015-05-06 Pedro Alves <palves@redhat.com>
3408
3409 PR server/18081
3410 * server.c (start_inferior): If the process exits, mourn it.
3411
819843c7
GB
34122015-04-21 Gary Benson <gbenson@redhat.com>
3413
3414 * hostio.c (fileio_open_flags_to_host): Factored out to
3415 fileio_to_host_openflags in common/fileio.c. Single use
3416 updated.
3417
a2d5a9d7
MF
34182015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3419
3420 * linux-xtensa-low.c (xtensa_fill_gregset)
3421 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3422 XCHAL_HAVE_LOOP.
3423
deb44829
MF
34242015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3425
3426 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3427 (regs_info): Replace usrregs pointer with NULL.
3428
e57f1de3
GB
34292015-04-17 Gary Benson <gbenson@redhat.com>
3430
3431 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3432 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3433 * server.c (handle_qxfer_exec_file): New function.
3434 (qxfer_packets): Add exec-file entry.
3435 (handle_query): Report qXfer:exec-file:read as supported packet.
3436
62828379
RN
34372015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3438
3439 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3440
b88bb450
GB
34412015-04-09 Gary Benson <gbenson@redhat.com>
3442
3443 * hostio-errno.c (errno_to_fileio_error): Remove function.
3444 Update caller to use remote_fileio_to_fio_error.
3445
c8f4bfdd
YQ
34462015-04-09 Yao Qi <yao.qi@linaro.org>
3447
3448 * linux-low.c (linux_insert_point): Call
3449 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3450 (linux_remove_point): Call remove_memory_breakpoint if type is
3451 raw_bkpt_type_sw.
3452 * linux-x86-low.c (x86_insert_point): Don't call
3453 insert_memory_breakpoint.
3454 (x86_remove_point): Don't call remove_memory_breakpoint.
3455
41f98f02
PA
34562015-04-01 Pedro Alves <palves@redhat.com>
3457 Cleber Rosa <crosa@redhat.com>
3458
3459 * server.c (gdbserver_usage): Reorganize and extend the usage
3460 message.
3461
2bf6fb9d
PA
34622015-03-24 Pedro Alves <palves@redhat.com>
3463
3464 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3465 output. Also dump TRAP_TRACE.
3466 (linux_low_filter_event): In debug output, distinguish a
3467 resume_stop SIGSTOP from a delayed SIGSTOP.
3468
369f6daa
GB
34692015-03-24 Gary Benson <gbenson@redhat.com>
3470
3471 * linux-x86-low.c (x86_linux_new_thread): Moved to
3472 nat/x86-linux.c.
3473 (x86_linux_prepare_to_resume): Likewise.
3474
8e5d4070
GB
34752015-03-24 Gary Benson <gbenson@redhat.com>
3476
3477 * Makefile.in (x86-linux-dregs.o): New rule.
3478 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3479 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3480 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3481 (x86_linux_dr_get): Likewise.
3482 (x86_linux_dr_set): Likewise.
3483 (update_debug_registers_callback): Likewise.
3484 (x86_linux_dr_set_addr): Likewise.
3485 (x86_linux_dr_get_addr): Likewise.
3486 (x86_linux_dr_set_control): Likewise.
3487 (x86_linux_dr_get_control): Likewise.
3488 (x86_linux_dr_get_status): Likewise.
3489 (x86_linux_update_debug_registers): Likewise.
3490
2b95d440
GB
34912015-03-24 Gary Benson <gbenson@redhat.com>
3492
3493 * linux-x86-low.c (x86_linux_update_debug_registers):
3494 New function, factored out from...
3495 (x86_linux_prepare_to_resume): ...this.
3496
14b0bc68
GB
34972015-03-24 Gary Benson <gbenson@redhat.com>
3498
3499 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3500 (x86_linux_dr_set): Likewise.
3501 (update_debug_registers_callback): Likewise.
3502 (x86_linux_dr_set_addr): Likewise.
3503 (x86_linux_dr_get_addr): Likewise.
3504 (x86_linux_dr_set_control): Likewise.
3505 (x86_linux_dr_get_control): Likewise.
3506 (x86_linux_dr_get_status): Likewise.
3507 (x86_linux_prepare_to_resume): Likewise.
3508
5dfe6ca8
GB
35092015-03-24 Gary Benson <gbenson@redhat.com>
3510
3511 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3512 Use perror_with_name. Pass string through gettext.
3513 (x86_linux_dr_set): Likewise.
3514
d33472ad
GB
35152015-03-24 Gary Benson <gbenson@redhat.com>
3516
3517 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3518 (x86_linux_dr_set_addr): ...this.
3519 (x86_dr_low_get_addr): Rename to...
3520 (x86_linux_dr_get_addr): ...this.
3521 (x86_dr_low_set_control): Rename to...
3522 (x86_linux_dr_set_control): ...this.
3523 (x86_dr_low_get_control): Rename to...
3524 (x86_linux_dr_get_control): ...this.
3525 (x86_dr_low_get_status): Rename to...
3526 (x86_linux_dr_get_status): ...this.
3527 (x86_dr_low): Update with new function names.
3528
4b134ca1
GB
35292015-03-24 Gary Benson <gbenson@redhat.com>
3530
3531 * Makefile.in (x86-linux.o): New rule.
3532 * configure.srv: Add x86-linux.o to relevant targets.
3533 * linux-low.c (lwp_set_arch_private_info): New function.
3534 (lwp_arch_private_info): Likewise.
3535 * linux-x86-low.c: Include nat/x86-linux.h.
3536 (arch_lwp_info): Removed structure.
3537 (update_debug_registers_callback):
3538 Use lwp_set_debug_registers_changed.
3539 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3540 and lwp_set_debug_registers_changed.
3541 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3542
34c703da
GB
35432015-03-24 Gary Benson <gbenson@redhat.com>
3544
3545 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3546 * linux-arm-low.c (arm_new_thread): Likewise.
3547 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3548 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3549 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3550 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3551
cff068da
GB
35522015-03-24 Gary Benson <gbenson@redhat.com>
3553
3554 * linux-low.c (ptid_of_lwp): New function.
3555 (lwp_is_stopped): Likewise.
3556 (lwp_stop_reason): Likewise.
3557 * linux-x86-low.c (update_debug_registers_callback):
3558 Use lwp_is_stopped.
3559 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3560 lwp_stop_reason.
3561
b2f7c7e8
GB
35622015-03-24 Gary Benson <gbenson@redhat.com>
3563
3564 * linux-low.h (linux_stop_lwp): Remove declaration.
3565
6d4ee8c6
GB
35662015-03-24 Gary Benson <gbenson@redhat.com>
3567
3568 * linux-low.h: Include nat/linux-nat.h.
3569 * linux-low.c (iterate_over_lwps_args): New structure.
3570 (iterate_over_lwps_filter): New function.
3571 (iterate_over_lwps): Likewise.
3572 * linux-x86-low.c (update_debug_registers_callback):
3573 Update signature to what iterate_over_lwps expects.
3574 Remove PID check that iterate_over_lwps now performs.
3575 (x86_dr_low_set_addr): Use iterate_over_lwps.
3576 (x86_dr_low_set_control): Likewise.
3577
70a0bb6b
GB
35782015-03-24 Gary Benson <gbenson@redhat.com>
3579
3580 * linux-x86-low.c (x86_debug_reg_state): New function.
3581 (x86_linux_prepare_to_resume): Use the above.
3582
7b669087
GB
35832015-03-24 Gary Benson <gbenson@redhat.com>
3584
3585 * linux-low.c (current_lwp_ptid): New function.
3586 * linux-x86-low.c: Include nat/linux-nat.h.
3587 (x86_dr_low_get_addr): Use current_lwp_ptid.
3588 (x86_dr_low_get_control): Likewise.
3589 (x86_dr_low_get_status): Likewise.
3590
eef49a3d
PA
35912015-03-20 Pedro Alves <palves@redhat.com>
3592
3593 * tracepoint.c (cmd_qtstatus): Make "str" const.
3594
b2333d22
PA
35952015-03-20 Pedro Alves <palves@redhat.com>
3596
3597 * server.c (handle_general_set): Make "req_str" const.
3598
23f238d3
PA
35992015-03-19 Pedro Alves <palves@redhat.com>
3600
3601 * linux-low.c (linux_resume_one_lwp): Rename to ...
3602 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3603 instead call perror_with_name.
3604 (check_ptrace_stopped_lwp_gone): New function.
3605 (linux_resume_one_lwp): Reimplement as wrapper around
3606 linux_resume_one_lwp_throw that swallows errors if the LWP is
3607 gone.
3608
91baf43f
PA
36092015-03-19 Pedro Alves <palves@redhat.com>
3610
3611 * linux-low.c (count_events_callback, select_event_lwp_callback):
3612 No longer check whether the thread has resume_stop as last resume
3613 kind.
3614
8bf3b159
PA
36152015-03-19 Pedro Alves <palves@redhat.com>
3616
3617 * linux-low.c (count_events_callback, select_event_lwp_callback):
3618 Use the lwp's status_pending_p field, not the thread's.
3619
b90fc188
PA
36202015-03-19 Pedro Alves <palves@redhat.com>
3621
3622 * linux-low.c (select_event_lwp_callback): Update comments to
3623 no longer mention SIGTRAP.
3624
464b0089
GB
36252015-03-18 Gary Benson <gbenson@redhat.com>
3626
3627 * server.c (handle_query): Do not report vFile:fstat as supported.
3628
aa9e327f
GB
36292015-03-11 Gary Benson <gbenson@redhat.com>
3630
3631 * hostio.c (sys/types.h): New include.
3632 (sys/stat.h): Likewise.
3633 (common-remote-fileio.h): Likewise.
3634 (handle_fstat): New function.
3635 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 3636
791c0056
GB
36372015-03-11 Gary Benson <gbenson@redhat.com>
3638
3639 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3640 struct stat.st_blocks and struct stat.st_blksize.
3641 * configure: Regenerate.
3642 * config.in: Likewise.
3643 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3644 (OBS): Add common-remote-fileio.o.
3645 (common-remote-fileio.o): New rule.
3646
9a9df970
PA
36472015-03-09 Pedro Alves <palves@redhat.com>
3648
3649 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3650 'struct sockaddr' pointer in 'accept' call.
3651
9eb1356e
PA
36522015-03-09 Pedro Alves <palves@redhat.com>
3653
3654 Revert:
3655 2015-03-07 Pedro Alves <palves@redhat.com>
3656 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3657 or <winsock2.h> here. Instead include "gdb_socket.h".
3658 (remote_open): Use union gdb_sockaddr_u.
3659 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3660 or <winsock2.h> here. Instead include "gdb_socket.h".
3661 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3662 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3663 or <sys/un.h>.
3664 (init_named_socket, gdb_agent_helper_thread): Use union
3665 gdb_sockaddr_u.
3666
aac331e4
PA
36672015-03-07 Pedro Alves <palves@redhat.com>
3668
3669 * configure.ac (build_warnings): Move
3670 -Wdeclaration-after-statement to the C-specific set.
3671 * configure: Regenerate.
3672
366c75fc
PA
36732015-03-07 Pedro Alves <palves@redhat.com>
3674
3675 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3676 or <winsock2.h> here. Instead include "gdb_socket.h".
3677 (remote_open): Use union gdb_sockaddr_u.
3678 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3679 or <winsock2.h> here. Instead include "gdb_socket.h".
3680 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3681 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3682 or <sys/un.h>.
3683 (init_named_socket, gdb_agent_helper_thread): Use union
3684 gdb_sockaddr_u.
3685
492d29ea
PA
36862015-03-07 Pedro Alves <palves@redhat.com>
3687
3688 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3689 instead.
3690
60a191ed
YQ
36912015-03-06 Yao Qi <yao.qi@linaro.org>
3692
3693 * linux-aarch64-low.c (aarch64_insert_point): Use
3694 show_debug_regs as a boolean.
3695 (aarch64_remove_point): Likewise.
3696
f5771b1d
PA
36972015-03-05 Pedro Alves <palves@redhat.com>
3698
3699 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3700 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3701 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3702 * nto-low.c (nto_target_ops): Likewise.
3703 * spu-low.c (spu_target_ops): Likewise.
3704 * win32-low.c (win32_target_ops): Likewise.
3705
3e572f71
PA
37062015-03-04 Pedro Alves <palves@redhat.com>
3707
72f4393d 3708 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
3709 Decide whether a breakpoint triggered based on the SIGTRAP's
3710 siginfo.si_code.
72f4393d
L
3711 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3712 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
3713 (linux_low_filter_event): Check for breakpoints before checking
3714 watchpoints.
3715 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3716 siginfo.si_code.
72f4393d
L
3717 (linux_stopped_by_sw_breakpoint)
3718 (linux_supports_stopped_by_sw_breakpoint)
3719 (linux_stopped_by_hw_breakpoint)
3720 (linux_supports_stopped_by_hw_breakpoint): New functions.
3721 (linux_target_ops): Install new target methods.
3e572f71 3722
1ec68e26
PA
37232015-03-04 Pedro Alves <palves@redhat.com>
3724
3725 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3726 * server.c (swbreak_feature, hwbreak_feature): New globals.
3727 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3728 (captured_main): Clear swbreak_feature and hwbreak_feature.
3729 * server.h (swbreak_feature, hwbreak_feature): Declare.
3730 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3731 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3732 supports_stopped_by_hw_breakpoint>: New fields.
3733 (target_supports_stopped_by_sw_breakpoint)
3734 (target_stopped_by_sw_breakpoint)
3735 (target_supports_stopped_by_hw_breakpoint)
3736 (target_stopped_by_hw_breakpoint): Declare.
3737
15c66dd6
PA
37382015-03-04 Pedro Alves <palves@redhat.com>
3739
3740 enum lwp_stop_reason -> enum target_stop_reason
3741 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3742 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3743 (linux_wait_1, stuck_in_jump_pad_callback)
3744 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3745 (linux_stopped_by_watchpoint):
3746 * linux-low.h (enum lwp_stop_reason): Delete.
3747 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3748 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3749
98fc70d6
YQ
37502015-03-04 Yao Qi <yao.qi@linaro.org>
3751
3752 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3753
dd2ac174
GB
37542015-03-03 Gary Benson <gbenson@redhat.com>
3755
3756 * hostio.c (handle_vFile): Fix prefix lengths.
3757
d68e53f4
MM
37582015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3759
3760 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3761 ptr_bits.
3762
bf2d68ab
AA
37632015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3764
3765 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3766 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3767 (clean): Add "rm -f" for above C files.
3768 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3769 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3770 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3771 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3772 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3773 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3774 (init_registers_s390x_vx_linux64)
3775 (init_registers_s390x_tevx_linux64)
3776 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3777 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3778 declarations.
3779 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3780 (s390_store_vxrs_high): New functions.
3781 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3782 NT_S390_VXRS_HIGH.
3783 (s390_arch_setup): Add logic for selecting one of the new target
3784 descriptions. Activate the new vector regsets if applicable.
3785 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3786 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3787 and init_registers_s390x_tevx_linux64.
3788
c966a859
PA
37892015-03-01 Pedro Alves <palves@redhat.com>
3790
3791 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3792 parameter.
3793
4180215b
PA
37942015-02-27 Pedro Alves <palves@redhat.com>
3795
3796 * linux-x86-low.c (u_debugreg_offset): New function.
3797 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3798
749bab01
PA
37992015-02-27 Pedro Alves <palves@redhat.com>
3800
3801 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3802 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3803 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3804 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3805 (ps_lsetfpregs, ps_getpid)
3806 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3807 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3808 (ps_lsetxregs, ps_plog): Declare.
3809
3c14e5a3
PA
38102015-02-27 Pedro Alves <palves@redhat.com>
3811
3812 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3813 IP_AGENT_EXPORT_FUNC.
3814 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3815 IP_AGENT_EXPORT_FUNC.
3816 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3817 (IP_AGENT_EXPORT): Delete.
3818 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3819 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3820 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3821 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3822 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3823 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3824 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3825 (traceframe_read_count, traceframe_write_count)
3826 (traceframes_created, trace_state_variables, get_raw_reg)
3827 (get_trace_state_variable_value, set_trace_state_variable_value)
3828 (ust_loaded, helper_thread_id, cmd_buf): Use
3829 IPA_SYM_EXPORTED_NAME.
3830 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3831 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3832 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3833 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3834 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3835 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3836 EXTERN_C_PUSH/EXTERN_C_POP.
3837 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3838 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3839 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3840 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3841 (traceframe_write_count, traceframe_read_count)
3842 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3843 (about_to_request_buffer_space, get_trace_state_variable_value)
3844 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3845 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3846 EXTERN_C_PUSH/EXTERN_C_POP.
3847 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3848 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3849 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3850 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3851 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3852 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3853 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3854 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3855 Define.
3856 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3857 (IP_AGENT_EXPORT_VAR_DECL): Define.
3858 (tracing): Declare.
3859 (gdb_agent_get_raw_reg): Declare.
3860
fe978cb0
PA
38612015-02-27 Tom Tromey <tromey@redhat.com>
3862 Pedro Alves <palves@redhat.com>
3863
3864 Rename symbols whose names are reserved C++ keywords throughout.
3865
3bc3d82a
PA
38662015-02-27 Pedro Alves <palves@redhat.com>
3867
3868 * Makefile.in (COMPILER): New, get it from autoconf.
3869 (CXX): Get from autoconf instead.
3870 (COMPILE.pre): Use COMPILER.
3871 (CC-LD): Rename to ...
3872 (CC_LD): ... this. Use COMPILER.
3873 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3874 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3875 * acinclude.m4: Include build-with-cxx.m4.
3876 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3877 Disable -Werror by default if building in C++ mode.
3878 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3879 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3880 the C++ compiler. Save/restore CXXFLAGS too.
3881 * configure: Regenerate.
3882
07697489
PA
38832015-02-27 Pedro Alves <palves@redhat.com>
3884
3885 * acinclude.m4: Include libiberty.m4.
3886 * configure.ac: Call libiberty_INIT.
3887 * config.in, configure: Regenerate.
3888
9beb7c4e
PA
38892015-02-26 Pedro Alves <palves@redhat.com>
3890
3891 * linux-low.c (linux_wait_1): When incrementing the PC past a
3892 program breakpoint always use the_low_target.breakpoint_len as
3893 increment, rather than the maximum between that and
3894 the_low_target.decr_pc_after_break.
3895
8090aef2
PA
38962015-02-23 Pedro Alves <palves@redhat.com>
3897
3898 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3899 thread was doing a step-over; always adjust the PC if
3900 we stepped over a permanent breakpoint.
3901 (linux_wait_1): If we stepped over breakpoint that was on top of a
3902 permanent breakpoint, manually advance the PC past it.
3903
bc9540e8
PA
39042015-02-23 Pedro Alves <palves@redhat.com>
3905
3906 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3907 modes.
3908 (x86_fill_gregset, x86_store_gregset): Use it when handling
3909 $orig_eax.
3910
2db9a427
PA
39112015-02-20 Pedro Alves <palves@redhat.com>
3912
3913 * thread-db.c: Include "nat/linux-procfs.h".
3914 (thread_db_init): Skip listing new threads if the kernel supports
3915 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3916
afa8d396
PA
39172015-02-20 Pedro Alves <palves@redhat.com>
3918
3919 * linux-low.c (status_pending_p_callback): Use ptid_match.
3920
c9587f88
AT
39212015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3922
3923 PR breakpoints/16812
3924 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3925 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3926 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3927
b05ec7a5
AT
39282015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3929
3930 PR breakpoints/15956
3931 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3932
d33501a5
MM
39332015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3934
3935 * linux-low.c (linux_low_btrace_conf): Print size.
3936 * server.c (handle_btrace_conf_general_set): New.
3937 (hanle_general_set): Call handle_btrace_conf_general_set.
3938 (handle_query): Report Qbtrace-conf:bts:size as supported.
3939
f4abbc16
MM
39402015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3941
3942 * linux-low.c (linux_low_enable_btrace): Update parameters.
3943 (linux_low_btrace_conf): New.
3944 (linux_target_ops)<to_btrace_conf>: Initialize.
3945 * server.c (current_btrace_conf): New.
3946 (handle_btrace_enable): Rename to ...
3947 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
3948 to target_enable_btrace. Update comment. Update users.
3949 (handle_qxfer_btrace_conf): New.
3950 (qxfer_packets): Add btrace-conf entry.
3951 (handle_query): Report qXfer:btrace-conf:read as supported packet.
3952 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3953 (target_ops)<read_btrace_conf>: New.
3954 (target_enable_btrace): Update parameters.
3955 (target_read_btrace_conf): New.
3956
043c3577
MM
39572015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3958
3959 * server.c (handle_btrace_general_set): Remove call to
3960 target_supports_btrace.
3961 (supported_btrace_packets): New.
3962 (handle_query): Call supported_btrace_packets.
3963 * target.h: include btrace-common.h.
3964 (btrace_target_info): Removed.
3965 (supports_btrace, target_supports_btrace): Update parameters.
3966
734b0e4b
MM
39672015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3968
3969 * Makefile.in (SFILES): Add common/btrace-common.c.
3970 (OBS): Add common/btrace-common.o.
3971 (btrace-common.o): Add build rules.
3972 * linux-low: Include btrace-common.h.
3973 (linux_low_read_btrace): Use struct btrace_data. Call
3974 btrace_data_init and btrace_data_fini.
3975
d6c146e9
PA
39762015-02-06 Pedro Alves <palves@redhat.com>
3977
3978 * thread-db.c (find_new_threads_callback): Add debug output.
3979
20ba1ce6
PA
39802015-02-04 Pedro Alves <palves@redhat.com>
3981
3982 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3983 (resume_stopped_resumed_lwps): New function.
3984 (linux_wait_for_event_filtered): Use it.
3985
8cc73a39
SDJ
39862015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3987
3988 * Makefile.in (SFILES): Add linux-personality.c.
3989 (linux-personality.o): New rule.
3990 * configure.srv (srv_linux_obj): Add linux-personality.o to the
3991 list of objects to be built.
3992 * linux-low.c: Include nat/linux-personality.h.
3993 (linux_create_inferior): Remove code to disable address space
3994 randomization (moved to ../nat/linux-personality.c). Create
3995 cleanup to disable address space randomization.
3996
fb23d554
SDJ
39972015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3998
3999 * Makefile.in (posix-strerror.o): New rule.
4000 (mingw-strerror.o): Likewise.
4001 * configure: Regenerated.
4002 * configure.ac: Source file ../common/common.host. Initialize new
4003 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4004
cdf43629
YQ
40052015-01-14 Yao Qi <yao@codesourcery.com>
4006
4007 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4008 (ppc-linux.o): New rule.
4009 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4010 * configure.ac: AC_CHECK_FUNCS(getauxval).
4011 * config.in: Re-generated.
4012 * configure: Re-generated.
4013 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4014 ppc64_64bit_inferior_p
4015
514c5338
YQ
40162015-01-14 Yao Qi <yao@codesourcery.com>
4017
4018 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4019 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4020 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4021 (PT_ORIG_R3, PT_TRAP): Likewise.
4022 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4023 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4024 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4025
3368c1e5
JB
40262015-01-10 Joel Brobecker <brobecker@adacore.com>
4027
4028 * i387-fp.c (i387_cache_to_xsave): In look over
4029 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4030 zmmh_low_space field by use of zmmh_high_space.
4031
582511be
PA
40322015-01-09 Pedro Alves <palves@redhat.com>
4033
4034 * linux-low.c (step_over_bkpt): Move higher up in the file.
4035 (handle_extended_wait): Don't store the stop_pc here.
4036 (get_stop_pc): Adjust comments and rename to ...
4037 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4038 stopped for a software breakpoint or hardware breakpoint.
4039 (thread_still_has_status_pending_p): New function.
4040 (status_pending_p_callback): Use
4041 thread_still_has_status_pending_p. If the event is no longer
4042 interesting, resume the LWP.
4043 (handle_tracepoints): Add assert.
4044 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4045 (wstatus_maybe_breakpoint): New function.
4046 (cancel_breakpoint): Delete function.
4047 (check_stopped_by_watchpoint): New function, factored out from
4048 linux_low_filter_event.
4049 (lp_status_maybe_breakpoint): Delete function.
4050 (linux_low_filter_event): Remove filter_ptid argument.
4051 Leave thread group exits pending here. Store the LWP's stop PC.
4052 Always leave events pending.
4053 (linux_wait_for_event_filtered): Pull all events out of the
4054 kernel, and leave them all pending.
4055 (count_events_callback, select_event_lwp_callback): Consider all
4056 events.
4057 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4058 (select_event_lwp): Only give preference to the stepping LWP in
4059 all-stop mode. Adjust comments.
4060 (ignore_event): New function.
4061 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4062 references to cancel_breakpoints. Adjust to renames. Also give
4063 equal priority to all LWPs that have had events in non-stop mode.
4064 If reporting a software breakpoint event, unadjust the LWP's PC.
4065 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4066 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4067 Adjust.
4068 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4069 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4070 (linux_stopped_by_watchpoint): Adjust.
4071 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4072 * linux-low.h (enum lwp_stop_reason): New.
4073 (struct lwp_info) <stop_pc>: Adjust comment.
4074 <stopped_by_watchpoint>: Delete field.
4075 <stop_reason>: New field.
4076 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4077 * mem-break.c (software_breakpoint_inserted_here)
4078 (hardware_breakpoint_inserted_here): New function.
4079 * mem-break.h (software_breakpoint_inserted_here)
4080 (hardware_breakpoint_inserted_here): Declare.
4081 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4082 (cancel_breakpoints): Delete.
4083 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4084 (upload_fast_traceframes): Remove references to
4085 cancel_breakpoints.
4086
a33e3959
PA
40872015-01-09 Pedro Alves <palves@redhat.com>
4088
4089 * thread-db.c (find_new_threads_callback): Ignore thread if the
4090 kernel thread ID is -1.
4091
8784d563
PA
40922015-01-09 Pedro Alves <palves@redhat.com>
4093
4094 * linux-low.c (linux_attach_fail_reason_string): Move to
4095 nat/linux-ptrace.c, and rename.
4096 (linux_attach_lwp): Update comment.
4097 (attach_proc_task_lwp_callback): New function.
4098 (linux_attach): Adjust to rename and use
4099 linux_proc_attach_tgid_threads.
4100 (linux_attach_fail_reason_string): Delete declaration.
4101
76f2b779
JB
41022015-01-01 Joel Brobecker <brobecker@adacore.com>
4103
4104 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4105 * server.c (gdbserver_version): Likewise.
4106
fafcc06a
SDJ
41072014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4108
4109 * remote-utils.c: Include ctype.h.
4110 (input_interrupt): Explicitly handle the case when the char
4111 received is the NUL byte. Improve the printing of non-ASCII
4112 characters.
4113
beed38b8
JB
41142014-12-16 Joel Brobecker <brobecker@adacore.com>
4115
4116 * linux-low.c (linux_low_filter_event): Update call to
4117 linux_enable_event_reporting following the addition of
4118 a new parameter to that function.
4119
bf330350
CU
41202014-12-16 Catalin Udma <catalin.udma@freescale.com>
4121
4122 PR server/17457
4123 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4124 (AARCH64_FPCR_REGNO): Likewise.
4125 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4126 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4127 (aarch64_store_fpregset): Likewise.
4128
5227d625
JB
41292014-12-15 Joel Brobecker <brobecker@adacore.com>
4130
4131 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4132 Remove FIXME comment about assumption about N.
4133
f93b65a0
JB
41342014-12-13 Joel Brobecker <brobecker@adacore.com>
4135
4136 * configure.ac: If large-file support is disabled in GDBserver,
4137 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4138 * configure: Regenerate.
4139
e5a9158d
AA
41402014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4141
4142 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4143 warning upon ENODATA from ptrace.
4144 * linux-s390-low.c (s390_store_tdb): New.
4145 (s390_regsets): Add regset for NT_S390_TDB.
4146
feea5f36
AA
41472014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4148
4149 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4150 without a fill_function.
4151 * linux-s390-low.c (s390_fill_last_break): Remove.
4152 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4153 (s390_arch_setup): Use regset's size instead of fill_function for
4154 loop end condition.
4155
098dbe61
AA
41562014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4157
4158 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4159 the regset's store function when ptrace returned an error.
4160 * regcache.c (get_thread_regcache): Invalidate register cache
4161 before fetching inferior's registers.
4162
28eef672
AA
41632014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4164
4165 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4166 while-loop as for-loop.
4167 (regsets_store_inferior_registers): Likewise.
4168
bdca27a2
YQ
41692014-11-28 Yao Qi <yao@codesourcery.com>
4170
4171 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4172 * config.in, configure: Re-generate.
4173 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4174 is defined.
4175
9c232dda
YQ
41762014-11-21 Yao Qi <yao@codesourcery.com>
4177
4178 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4179 (AC_CHECK_HEADERS): Remove malloc.h.
4180 * configure: Re-generated.
4181 * config.in: Re-generated.
4182 * server.h: Don't include alloca.h and malloc.h.
4183 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4184 Don't include malloc.h.
4185
43968415
JB
41862014-11-17 Joel Brobecker <brobecker@adacore.com>
4187
4188 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4189 corresponding ERRNO check in same block.
4190
40e91bc7
PA
41912014-11-12 Pedro Alves <palves@redhat.com>
4192
4193 * server.c (cont_thread): Update comment.
4194 (start_inferior, attach_inferior): No longer clear cont_thread.
4195 (handle_v_cont): No longer set cont_thread.
4196 (captured_main): Clear cont_thread each time a GDB connects.
4197
c2c118cf
PA
41982014-11-12 Pedro Alves <palves@redhat.com>
4199
4200 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4201 thread, and don't resume all threads if the Hc thread has exited.
4202
78708b7c
PA
42032014-11-12 Pedro Alves <palves@redhat.com>
4204
4205 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4206 the process group instead of to a specific LWP.
4207
a2abc7de
PA
42082014-10-15 Pedro Alves <palves@redhat.com>
4209
4210 PR server/17487
4211 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4212 parameter.
4213 (arm_set_thread_context): Delete.
4214 (the_low_target): Adjust.
4215 * win32-i386-low.c (debug_registers_changed)
4216 (debug_registers_used): Delete.
4217 (update_debug_registers_callback): New function.
4218 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4219 needing to update their debug registers.
4220 (win32_get_current_dr): New function.
4221 (x86_dr_low_get_addr, x86_dr_low_get_control)
4222 (x86_dr_low_get_status): Fetch the debug register from the thread
4223 record's context.
4224 (i386_initial_stuff): Adjust.
4225 (i386_get_thread_context): Remove current_event parameter. Don't
4226 clear debug_registers_changed nor copy DR values to
4227 debug_reg_state.
4228 (i386_set_thread_context): Delete.
4229 (i386_prepare_to_resume): New function.
4230 (i386_thread_added): Mark the thread as needing to update irs
4231 debug registers.
4232 (the_low_target): Remove i386_set_thread_context and install
4233 i386_prepare_to_resume.
4234 * win32-low.c (win32_get_thread_context): Adjust.
4235 (win32_set_thread_context): Use SetThreadContext
4236 directly.
4237 (win32_prepare_to_resume): New function.
4238 (win32_require_context): New function, factored out from ...
4239 (thread_rec): ... this.
4240 (continue_one_thread): Call win32_prepare_to_resume on each thread
4241 we're about to continue.
4242 (win32_resume): Call win32_prepare_to_resume on the event thread.
4243 * win32-low.h (struct win32_thread_info)
4244 <debug_registers_changed>: New field.
4245 (struct win32_target_ops): Change prototype of set_thread_context,
4246 delete set_thread_context and add prepare_to_resume.
4247 (win32_require_context): New declaration.
4248
a442d071
GB
42492014-10-08 Gary Benson <gbenson@redhat.com>
4250
4251 * server.h: Do not include common-exceptions.h.
4252
6f1947e8
GB
42532014-10-08 Gary Benson <gbenson@redhat.com>
4254
4255 * server.h: Do not include cleanups.h.
4256
63b434a4
JH
42572014-09-30 James Hogan <james.hogan@imgtec.com>
4258
4259 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4260 mips64-dsp-linux.c.
4261
c4d9ceb6
YQ
42622014-09-23 Yao Qi <yao@codesourcery.com>
4263
4264 * linux-low.c (lp_status_maybe_breakpoint): New function.
4265 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4266 (count_events_callback): Likewise.
4267 (select_event_lwp_callback): Likewise.
4268 (cancel_breakpoints_callback): Likewise.
4269
89a5711c
DB
42702014-09-19 Don Breazeal <donb@codesourcery.com>
4271
4272 * linux-low.c (handle_extended_wait): Call
4273 linux_ptrace_get_extended_event.
4274 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4275 linux_is_extended_waitstatus.
4276
bffc0964
JB
42772014-09-16 Joel Brobecker <brobecker@adacore.com>
4278
4279 * Makefile.in (CPPFLAGS): Define.
4280 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4281 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4282
0bfdf32f
GB
42832014-09-16 Gary Benson <gbenson@redhat.com>
4284
4285 * inferiors.h (current_inferior): Renamed as...
4286 (current_thread): New variable. All uses updated.
4287 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4288 (maybe_move_out_of_jump_pad): Likewise.
4289 (cancel_breakpoint): Likewise.
4290 (linux_low_filter_event): Likewise.
4291 (wait_for_sigstop): Likewise.
4292 (linux_resume_one_lwp): Likewise.
4293 (need_step_over_p): Likewise.
4294 (start_step_over): Likewise.
4295 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4296 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4297 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4298 and save_inferior as saved_thread.
4299 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4300 saved_thread.
4301 (regcache_invalidate_thread): Likewise.
4302 * remote-utils.c (prepare_resume_reply): Likewise.
4303 * thread-db.c (thread_db_get_tls_address): Likewise.
4304 (disable_thread_event_reporting): Likewise.
4305 (remove_thread_event_breakpoints): Likewise.
4306 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4307 as saved_thread.
4308 * target.h (set_desired_inferior): Renamed as...
4309 (set_desired_thread): New declaration. All uses updated.
4310 * server.c (myresume): Updated comment to reference thread instead
4311 of inferior.
4312 (handle_serial_event): Likewise.
4313 (handle_target_event): Likewise.
4314
361c8ade
GB
43152014-09-12 Tom Tromey <tromey@redhat.com>
4316 Gary Benson <gbenson@redhat.com>
4317
4318 * regcache.h: Include common-regcache.h.
4319 (regcache_read_pc): Don't declare.
4320 * regcache.c (get_thread_regcache_for_ptid): New function.
4321
bd9269f7
GB
43222014-09-11 Tom Tromey <tromey@redhat.com>
4323 Gary Benson <gbenson@redhat.com>
4324
4325 * symbol.c: New file.
4326 * Makefile.in (SFILES): Add symbol.c.
4327 (OBS): Add symbol.o.
4328
f8c1d06b
GB
43292014-09-11 Gary Benson <gbenson@redhat.com>
4330
4331 * target.c (target_stop_ptid, target_continue_ptid): New
4332 functions.
4333
721ec300
GB
43342014-09-11 Tom Tromey <tromey@redhat.com>
4335 Gary Benson <gbenson@redhat.com>
4336
4337 * target.h: Include target/target.h.
4338 * target.c (target_read_memory, target_read_uint32)
4339 (target_write_memory): New functions.
4340
c5e92cca
GB
43412014-09-11 Gary Benson <gbenson@redhat.com>
4342
4343 * server.h (debug_hw_points): Don't declare.
4344 * server.c (debug_hw_points): Don't define. Replace all uses
4345 with show_debug_regs.
4346 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4347 all uses with show_debug_regs.
4348
2e4bb98a
EBM
43492014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4350
4351 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4352 endianness into account.
4353 (ppc_supply_ptrace_register): Likewise.
4354
ac740bc7
JH
43552014-09-03 James Hogan <james.hogan@imgtec.com>
4356
4357 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4358 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4359
97ea6506
GB
43602014-09-03 Gary Benson <gbenson@redhat.com>
4361
4362 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4363 ALL_DEBUG_ADDRESS_REGISTERS.
4364
df7e5265
GB
43652014-09-02 Gary Benson <gbenson@redhat.com>
4366
4367 * i386-low.h: Renamed as...
4368 * x86-low.h: New file. All type, function and variable name
4369 prefixes changed from "i386_" to "x86_". All references updated.
4370 * i386-low.c: Renamed as...
4371 * x86-low.c: New file. All type, function and variable name
4372 prefixes changed from "i386_" to "x86_". All references updated.
4373
ed859da7
GB
43742014-09-02 Gary Benson <gbenson@redhat.com>
4375
4376 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4377 (x86_linux_new_thread): Likewise.
4378
860789c7
GB
43792014-08-29 Gary Benson <gbenson@redhat.com>
4380
4381 * server.h (setjmp.h): Do not include.
4382 (toplevel): Do not declare.
4383 (common-exceptions.h): Include.
4384 (cleanups.h): Likewise.
4385 * server.c (toplevel): Do not define.
4386 (exit_code): New static global.
4387 (detach_or_kill_for_exit_cleanup): New function.
4388 (main): New function. Original main renamed to...
4389 (captured_main): New function.
4390 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4391
ff55e1b5
GB
43922014-08-29 Gary Benson <gbenson@redhat.com>
4393
4394 * Makefile.in (SFILES): Add common/common-exceptions.c.
4395 (OBS): Add common-exceptions.o.
4396 (common-exceptions.o): New rule.
4397 * utils.c (prepare_to_throw_exception): New function.
4398
e9bcb658
GB
43992014-08-29 Gary Benson <gbenson@redhat.com>
4400
4401 * config.in: Regenerate.
4402 * configure: Likewise.
4403
e3180625
GB
44042014-08-29 Gary Benson <gbenson@redhat.com>
4405
4406 * Makefile.in (SFILES): Add common/cleanups.c.
4407 (OBS): cleanups.o.
4408 (cleanups.o): New rule.
4409
e3d6ba5d
GB
44102014-08-29 Gary Benson <gbenson@redhat.com>
4411
4412 * utils.c (internal_vwarning): New function.
4413
7096e886
GB
44142014-08-28 Gary Benson <gbenson@redhat.com>
4415
4416 * utils.h (fatal): Remove declaration.
4417 * utils.c (fatal): Remove function.
4418
14ce3192
GB
44192014-08-28 Gary Benson <gbenson@redhat.com>
4420
4421 * tracepoint.c (gdb_agent_init): Replace fatal with
4422 perror_with_name.
4423 (initialize_tracepoint): Likewise.
4424
50278d59
GB
44252014-08-28 Gary Benson <gbenson@redhat.com>
4426
4427 * remote-utils.c (remote_prepare): Replace fatal with error.
4428
aa96c426
GB
44292014-08-28 Gary Benson <gbenson@redhat.com>
4430
4431 * linux-low.c (linux_async): Replace fatal with warning.
4432 Tidy up and return.
4433 (linux_start_non_stop): Return -1 if linux_async failed.
4434
f7160e97
GB
44352014-08-28 Gary Benson <gbenson@redhat.com>
4436
4437 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4438 gdb_assert.
4439 (i386_dr_low_get_addr): Remove vague comment.
4440 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4441 gdb_assert.
4442
38e08fca
GB
44432014-08-28 Gary Benson <gbenson@redhat.com>
4444
4445 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4446 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4447 internal_error.
4448 (linux_resume_one_lwp): Likewise.
4449 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4450 gdb_assert.
4451 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4452 with internal_error.
4453 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4454 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4455 (find_register_by_name): Replace fatal with internal_error.
4456 (find_regno): Likewise.
4457 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4458 * thread-db.c (thread_db_create_event): Likewise.
4459 (thread_db_load_search): Likewise.
4460 (try_thread_db_load_1): Likewise.
4461 * tracepoint.c (get_jump_space_head): Replace fatal with
4462 internal_error.
4463 (claim_trampoline_space): Likewise.
4464 (have_fast_tracepoint_trampoline_buffer): Likewise.
4465 (cmd_qtstart): Likewise.
4466 (stop_tracing): Likewise.
4467 (fast_tracepoint_collecting): Likewise.
4468 (target_malloc): Likewise.
4469 (download_tracepoint): Likewise.
4470 (download_trace_state_variables): Replace check with gdb_assert.
4471 (upload_fast_traceframes): Replace fatal with internal_error.
4472
34abf635
GB
44732014-08-19 Tom Tromey <tromey@redhat.com>
4474 Gary Benson <gbenson@redhat.com>
4475
4476 * Makefile.in (SFILES): Add common/common-debug.c.
4477 (OBS): Add common-debug.o.
4478 (common-debug.o): New rule.
4479 * debug.h (debug_printf): Don't declare.
4480 * debug.c (debug_printf): Renamed and rewritten as...
4481 (debug_vprintf): New function.
4482
f6e94d78
GB
44832014-08-19 Gary Benson <gbenson@redhat.com>
4484
4485 * utils.h: Do not include print-utils.h.
4486
9239eeab
GB
44872014-08-19 Tom Tromey <tromey@redhat.com>
4488 Gary Benson <gbenson@redhat.com>
4489
4490 * server.h: Add static assertion.
4491 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4492
ef87c8bb
GB
44932014-08-19 Tom Tromey <tromey@redhat.com>
4494 Gary Benson <gbenson@redhat.com>
4495
4496 * Makefile.in (SFILES): Add common/errors.c.
4497 (OBS): Add errors.o.
4498 (IPA_OBS): Add errors-ipa.o.
4499 (errors.o): New rule.
4500 (errors-ipa.o): Likewise.
4501 * utils.h (perror_with_name, error, warning): Don't declare.
4502 * utils.c (warning): Renamed and rewritten as...
4503 (vwarning): New function.
4504 (error): Renamed and rewritten as...
4505 (verror): New function.
4506 (internal_error): Renamed and rewritten as...
4507 (internal_verror): New function.
4508
bb974a24
GB
45092014-08-07 Gary Benson <gbenson@redhat.com>
4510
4511 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4512 * configure: Regenerate.
4513 * config.in: Likewise.
4514 * server.h: Do not include errno.h.
4515 * event-loop.c: Likewise.
4516 * hostio-errno.c: Likewise.
4517 * linux-low.c: Likewise.
4518 * remote-utils.c: Likewise.
4519 * spu-low.c: Likewise.
4520 * utils.c: Likewise.
4521 * gdbreplay.c: Unconditionally include errno.h.
4522
6d3d12eb
GB
45232014-08-07 Gary Benson <gbenson@redhat.com>
4524
4525 * server.h: Do not include string.h.
4526 * event-loop.c: Likewise.
4527 * linux-low.c: Likewise.
4528 * regcache.c: Likewise.
4529 * remote-utils.c: Likewise.
4530 * spu-low.c: Likewise.
4531 * utils.c: Likewise.
4532
dccbb609
GB
45332014-08-07 Gary Benson <gbenson@redhat.com>
4534
4535 * server.h: Do not include gdb_assert.h.
4536
e76df0d0
GB
45372014-08-07 Gary Benson <gbenson@redhat.com>
4538
4539 * server.h: Do not include common-utils.h.
4540
4cb9c816
GB
45412014-08-07 Gary Benson <gbenson@redhat.com>
4542
4543 * server.h: Do not include ptid.h.
4544 * notif.h: Likewise.
4545
3995eeee
GB
45462014-08-07 Gary Benson <gbenson@redhat.com>
4547
4548 * server.h: Do not include gdb_locale.h.
4549
cb9f1a9b
GB
45502014-08-07 Gary Benson <gbenson@redhat.com>
4551
4552 * server.h: Do not include gdb/signals.h.
4553 * win32-low.c: Likewise.
4554
a5fceff8
GB
45552014-08-07 Gary Benson <gbenson@redhat.com>
4556
4557 * server.h: Do not include pathmax.h.
4558
b9391142
GB
45592014-08-07 Gary Benson <gbenson@redhat.com>
4560
4561 * server.h: Do not include libiberty.h.
4562 * linux-bfin-low.c: Likewise.
4563
0e443c87
GB
45642014-08-07 Gary Benson <gbenson@redhat.com>
4565
4566 * server.h: Do not include ansidecl.h.
4567
8ebb3f56
GB
45682014-08-07 Gary Benson <gbenson@redhat.com>
4569
4570 * linux-x86-low.c: Do not include stddef.h.
4571 * lynx-ppc-low.c: Likewise.
4572 * tracepoint.c: Likewise.
4573
8980bdf6
GB
45742014-08-07 Gary Benson <gbenson@redhat.com>
4575
4576 * server.h: Do not include stdarg.h.
4577 * nto-low.c: Likewise.
4578
d7096f71
GB
45792014-08-07 Gary Benson <gbenson@redhat.com>
4580
4581 * server.h: Do not include stdlib.h.
4582 * inferiors.c: Likewise.
4583 * linux-low.c: Likewise.
4584 * regcache.c: Likewise.
4585 * spu-low.c: Likewise.
4586 * tracepoint.c: Likewise.
4587 * utils.c: Likewise.
4588
d02f550d
GB
45892014-08-07 Gary Benson <gbenson@redhat.com>
4590
4591 * server.h: Do not include stdio.h.
4592 * linux-low.c: Likewise.
4593 * remote-utils.c: Likewise.
4594 * spu-low.c: Likewise.
4595 * utils.c: Likewise.
4596 * wincecompat.c: Likewise.
4597
87f6c4e3
GB
45982014-08-06 Gary Benson <gbenson@redhat.com>
4599
4600 * regcache.c (init_register_cache): Move conditionals inside if.
4601
7089dca4
GB
46022014-08-06 Gary Benson <gbenson@redhat.com>
4603
4604 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4605
462f517e
GB
46062014-07-31 Gary Benson <gbenson@redhat.com>
4607
4608 * ax.h: Do not include server.h.
4609 * gdbthread.h: Likewise.
4610 * lynx-low.h: Likewise.
4611 * notif.h: Likewise.
4612
976411d6
GB
46132014-07-30 Gary Benson <gbenson@redhat.com>
4614
4615 * server.h: Include common-defs.h.
4616 Do not include config.h or build-gnulib-gdbserver/config.h.
4617
d41f6d8e
GB
46182014-07-30 Gary Benson <gbenson@redhat.com>
4619
4620 * hostio-errno.c: Move server.h to top of includes list.
4621 * inferiors.c: Likewise.
4622 * linux-x86-low.c: Likewise.
4623 * notif.c: Include server.h.
4624
314c6a35
TT
46252014-07-24 Tom Tromey <tromey@redhat.com>
4626 Gary Benson <gbenson@redhat.com>
4627
4628 * server.h (CORE_ADDR): Now unsigned.
4629
69ff6be5
PA
46302014-07-16 Pedro Alves <palves@redhat.com>
4631
4632 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4633
ce9e3fe7
PA
46342014-07-15 Pedro Alves <palves@redhat.com>
4635
4636 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4637 copy.
4638
e76126e8
PA
46392014-07-11 Pedro Alves <palves@redhat.com>
4640
4641 * linux-low.c (kill_wait_lwp): New function, based on
4642 kill_one_lwp_callback, but use my_waitpid directly.
4643 (kill_one_lwp_callback, linux_kill): Use it.
4644
8e9db26e
PA
46452014-06-23 Pedro Alves <palves@redhat.com>
4646
4647 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4648 before setting DR0..DR3.
4649
698b3e08
GB
46502014-06-20 Gary Benson <gbenson@redhat.com>
4651
4652 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4653 * configure: Regenerated.
4654 * config.in: Likewise.
4655
125f8a3d
GB
46562014-06-20 Gary Benson <gbenson@redhat.com>
4657
4658 * Makefile.in (SFILES): Update locations for files moved
4659 from common to nat.
4660 (object file files): Reordered.
4661
42995dbd
GB
46622014-06-20 Gary Benson <gbenson@redhat.com>
4663
4664 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4665 (i386_dr_low_set_addr): Likewise.
4666 (i386_dr_low_get_addr): Likewise.
4667 (i386_dr_low_can_set_control): Likewise.
4668 (i386_dr_low_set_control): Likewise.
4669 (i386_dr_low_get_control): Likewise.
4670 (i386_dr_low_get_status): Likewise.
4671 (i386_get_debug_register_length): Likewise.
4672 * linux-x86-low.c (i386_dr_low_set_addr):
4673 Changed signature. Made static.
4674 (i386_dr_low_get_addr): Likewise.
4675 (i386_dr_low_set_control): Likewise.
4676 (i386_dr_low_get_control): Likewise.
4677 (i386_dr_low_get_status): Likewise.
4678 (i386_dr_low): New global variable.
4679 * win32-i386-low.c (i386_dr_low_set_addr):
4680 Changed signature. Made static.
4681 (i386_dr_low_get_addr): Likewise.
4682 (i386_dr_low_set_control): Likewise.
4683 (i386_dr_low_get_control): Likewise.
4684 (i386_dr_low_get_status): Likewise.
4685 (i386_dr_low): New global variable.
4686
e1d2394b
MS
46872014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4688
4689 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4690 * Makefile.in (AR, AR_FLAGS): Define.
4691 * configure: Regenerate.
4692
3a8ee006
GB
46932014-06-19 Gary Benson <gbenson@redhat.com>
4694
4695 * Makefile.in (i386-dregs.o): New rule.
4696 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4697 * i386-low.c (target.h): Remove include.
4698 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4699 (DR_CONTROL_SHIFT): Likewise.
4700 (DR_CONTROL_SIZE): Likewise.
4701 (DR_RW_EXECUTE): Likewise.
4702 (DR_RW_WRITE): Likewise.
4703 (DR_RW_READ): Likewise.
4704 (DR_RW_IORW): Likewise.
4705 (DR_LEN_1): Likewise.
4706 (DR_LEN_2): Likewise.
4707 (DR_LEN_4): Likewise.
4708 (DR_LEN_8): Likewise.
4709 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4710 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4711 (DR_ENABLE_SIZE): Likewise.
4712 (DR_LOCAL_SLOWDOWN): Likewise.
4713 (DR_GLOBAL_SLOWDOWN): Likewise.
4714 (DR_CONTROL_RESERVED): Likewise.
4715 (I386_DR_CONTROL_MASK): Likewise.
4716 (I386_DR_VACANT): Likewise.
4717 (I386_DR_LOCAL_ENABLE): Likewise.
4718 (I386_DR_GLOBAL_ENABLE): Likewise.
4719 (I386_DR_DISABLE): Likewise.
4720 (I386_DR_SET_RW_LEN): Likewise.
4721 (I386_DR_GET_RW_LEN): Likewise.
4722 (I386_DR_WATCH_HIT): Likewise.
4723 (i386_wp_op_t): Likewise.
4724 (i386_show_dr): Likewise.
4725 (i386_length_and_rw_bits): Likewise.
4726 (i386_insert_aligned_watchpoint): Likewise.
4727 (i386_remove_aligned_watchpoint): Likewise.
4728 (i386_handle_nonaligned_watchpoint): Likewise.
4729 i386_update_inferior_debug_regs(): Likewise.
4730 (i386_dr_insert_watchpoint): Likewise.
4731 (i386_dr_remove_watchpoint): Likewise.
4732 (i386_dr_region_ok_for_watchpoint): Likewise.
4733 (i386_dr_stopped_data_address): Likewise.
4734 (i386_dr_stopped_by_watchpoint): Likewise.
4735
8f26655c
GB
47362014-06-19 Gary Benson <gbenson@redhat.com>
4737
4738 * i386-low.c (i386_dr_show): Renamed to
4739 i386_show_dr and made static. All uses updated.
4740 (i386_dr_length_and_rw_bits): Renamed to
4741 i386_length_and_rw_bits and made static.
4742 All uses updated.
4743 (i386_dr_insert_aligned_watchpoint): Renamed to
4744 i386_insert_aligned_watchpoint and made static.
4745 All uses updated.
4746 (i386_dr_remove_aligned_watchpoint): Renamed to
4747 i386_remove_aligned_watchpoint and made static.
4748 All uses updated.
4749 (i386_dr_update_inferior_debug_regs): Renamed to
4750 i386_update_inferior_debug_regs and made static.
4751 All uses updated.
4752
b9228891
GB
47532014-06-18 Gary Benson <gbenson@redhat.com>
4754
5171def3
GB
4755 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4756 (i386_dr_low_can_set_control): Likewise.
4757 (i386_get_debug_register_length): Likewise.
4758 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4759 (i386_dr_low_can_set_control): Likewise.
4760 (i386_get_debug_register_length): Likewise.
4761
47622014-06-17 Gary Benson <gbenson@redhat.com>
4763
b9228891
GB
4764 * i386-low.h (i386-dregs.h): New include.
4765 (DR_FIRSTADDR): Now in i386-dregs.h.
4766 (DR_LASTADDR): Likewise.
4767 (DR_NADDR): Likewise.
4768 (DR_STATUS): Likewise.
4769 (DR_CONTROL): Likewise.
4770 (i386_debug_reg_state): Likewise.
4771 (i386_dr_insert_watchpoint): Likewise.
4772 (i386_dr_remove_watchpoint): Likewise.
4773 (i386_dr_region_ok_for_watchpoint): Likewise.
4774 (i386_dr_stopped_data_address): Likewise.
4775 (i386_dr_stopped_by_watchpoint): Likewise.
4776 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4777
4be83cc2
GB
47782014-06-18 Gary Benson <gbenson@redhat.com>
4779
4780 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4781 i386_dr_insert_watchpoint.
4782 (i386_low_remove_watchpoint): Renamed to
4783 i386_dr_remove_watchpoint.
4784 (i386_low_region_ok_for_watchpoint): Renamed to
4785 i386_dr_region_ok_for_watchpoint.
4786 (i386_low_stopped_data_address): Renamed to
4787 i386_dr_stopped_data_address.
4788 (i386_low_stopped_by_watchpoint): Renamed to
4789 i386_dr_stopped_by_watchpoint.
4790 * i386-low.c (i386_show_dr): Renamed to
4791 i386_dr_show and made nonstatic. All uses updated.
4792 (i386_length_and_rw_bits): Renamed to
4793 i386_dr_length_and_rw_bits and made nonstatic.
4794 All uses updated.
4795 (i386_insert_aligned_watchpoint): Renamed to
4796 i386_dr_insert_aligned_watchpoint and made nonstatic.
4797 All uses updated.
4798 (i386_remove_aligned_watchpoint): Renamed to
4799 i386_dr_remove_aligned_watchpoint and made nonstatic.
4800 All uses updated.
4801 (i386_update_inferior_debug_regs): Renamed to
4802 i386_dr_update_inferior_debug_regs and made nonstatic.
4803 All uses updated.
4804 (i386_low_insert_watchpoint): Renamed to
4805 i386_dr_insert_watchpoint. All uses updated.
4806 (i386_low_remove_watchpoint): Renamed to
4807 i386_dr_remove_watchpoint. All uses updated.
4808 (i386_low_region_ok_for_watchpoint): Renamed to
4809 i386_dr_region_ok_for_watchpoint. All uses updated.
4810 (i386_low_stopped_data_address): Renamed to
4811 i386_dr_stopped_data_address. All uses updated.
4812 (i386_low_stopped_by_watchpoint): Renamed to
4813 i386_dr_stopped_by_watchpoint. All uses updated.
4814
131aa0d4
GB
48152014-06-18 Gary Benson <gbenson@redhat.com>
4816
4817 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4818 (i386_dr_low_can_set_control): Likewise.
4819 (i386_insert_aligned_watchpoint): New check.
4820
d9305f7f
GB
48212014-06-18 Gary Benson <gbenson@redhat.com>
4822
4823 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4824 Renamed to state.
4825
e927c9fc
GB
48262014-06-18 Gary Benson <gbenson@redhat.com>
4827
4828 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4829 instead of fatal and error.
4830 (i386_handle_nonaligned_watchpoint): Likewise.
4831
1b6d4134
GB
48322014-06-18 Gary Benson <gbenson@redhat.com>
4833
4834 * i386-low.c (i386_get_debug_register_length): New macro.
4835 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4836 (i386_show_dr): Use debug_printf instead of fprintf. Use
4837 phex to format values.
4838
6e62758f
GB
48392014-06-18 Gary Benson <gbenson@redhat.com>
4840
4841 * i386-low.h: Comment changes.
4842 * i386-low.c: Likewise.
4843
fc6e2f03
GB
48442014-06-18 Gary Benson <gbenson@redhat.com>
4845
4846 * i386-low.c: Whitespace changes.
4847
f9d1eeed
TT
48482014-06-12 Tom Tromey <tromey@redhat.com>
4849
4850 * utils.c (freeargv): Remove.
4851
0b04e523
TT
48522014-06-12 Tom Tromey <tromey@redhat.com>
4853
4854 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4855 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4856 (parse_debug_format_options): Likewise.
4857 (gdbserver_usage): Likewise.
4858 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4859 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4860 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4861 against libiberty.
4862 ($(LIBGNU)): Depend on libiberty.
4863 (all-lib): Recurse into all subdirs.
4864 (install-only): Invoke "install" target in subdirs.
4865 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4866 targets.
4867 * configure: Rebuild.
4868 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4869 for vasprintf, vsnprintf, or gettimeofday.
4870 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4871 srv_tgtobj.
4872
270c9937
JB
48732014-06-05 Joel Brobecker <brobecker@adacore.com>
4874
4875 * development.sh: Delete.
4876 * Makefile.in (config.status): Adjust dependency on development.sh.
4877 * configure.ac: Adjust development.sh source call.
4878 * configure: Regenerate.
4879
0a261ed8
PA
48802014-06-02 Pedro Alves <palves@redhat.com>
4881
4882 * ax.c (gdb_free_agent_expr): New function.
4883 * ax.h (gdb_free_agent_expr): New declaration.
4884 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4885 list.
4886 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4887 static.
4888 (clear_breakpoint_conditions_and_commands): New function.
4889 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4890 (clear_breakpoint_conditions_and_commands): New declaration.
4891
e9dae05e
RR
48922014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4893
4894 * linux-aarch64-low.c (asm/ptrace.h): Include.
4895
5876f503
JK
48962014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4897
4898 Fix TLS access for -static -pthread.
4899 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4900 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4901 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4902
802e8e6d
PA
49032014-05-20 Pedro Alves <palves@redhat.com>
4904
4905 * linux-aarch64-low.c (aarch64_insert_point)
4906 (aarch64_remove_point): No longer check whether the type is
4907 supported here. Adjust to new interface.
4908 (the_low_target): Install aarch64_supports_z_point_type as
4909 supports_z_point_type method.
4910 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4911 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4912 instead of a Z packet char. Adjust.
4913 (arm_supports_z_point_type): New function.
4914 (arm_insert_point, arm_remove_point): Adjust to new interface.
4915 (the_low_target): Install arm_supports_z_point_type.
4916 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4917 (cris_insert_point, cris_remove_point): Adjust to new interface.
4918 Don't check whether the type is supported here.
4919 (the_low_target): Install cris_supports_z_point_type.
4920 * linux-low.c (linux_supports_z_point_type): New function.
4921 (linux_insert_point, linux_remove_point): Adjust to new interface.
4922 * linux-low.h (struct linux_target_ops) <insert_point,
4923 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4924 raw_breakpoint pointer parameter.
4925 <supports_z_point_type>: New method.
4926 * linux-mips-low.c (mips_supports_z_point_type): New function.
4927 (mips_insert_point, mips_remove_point): Adjust to new interface.
4928 Use mips_supports_z_point_type.
4929 (the_low_target): Install mips_supports_z_point_type.
4930 * linux-ppc-low.c (the_low_target): Install NULL as
4931 supports_z_point_type method.
4932 * linux-s390-low.c (the_low_target): Install NULL as
4933 supports_z_point_type method.
4934 * linux-sparc-low.c (the_low_target): Install NULL as
4935 supports_z_point_type method.
4936 * linux-x86-low.c (x86_supports_z_point_type): New function.
4937 (x86_insert_point): Adjust to new insert_point interface. Use
4938 insert_memory_breakpoint. Adjust to new
4939 i386_low_insert_watchpoint interface.
4940 (x86_remove_point): Adjust to remove_point interface. Use
4941 remove_memory_breakpoint. Adjust to new
4942 i386_low_remove_watchpoint interface.
4943 (the_low_target): Install x86_supports_z_point_type.
4944 * lynx-low.c (lynx_target_ops): Install NULL as
4945 supports_z_point_type callback.
4946 * nto-low.c (nto_supports_z_point_type): New.
4947 (nto_insert_point, nto_remove_point): Adjust to new interface.
4948 (nto_target_ops): Install nto_supports_z_point_type.
4949 * mem-break.c: Adjust intro comment.
4950 (struct raw_breakpoint) <raw_type, size>: New fields.
4951 <inserted>: Update comment.
4952 <shlib_disabled>: Delete field.
4953 (enum bkpt_type) <gdb_breakpoint>: Delete value.
4954 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4955 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4956 (raw_bkpt_type_to_target_hw_bp_type): New function.
4957 (find_enabled_raw_code_breakpoint_at): New function.
4958 (find_raw_breakpoint_at): New type and size parameters. Use them.
4959 (insert_memory_breakpoint): New function, based off
4960 set_raw_breakpoint_at.
4961 (remove_memory_breakpoint): New function.
4962 (set_raw_breakpoint_at): Reimplement.
4963 (set_breakpoint): New, based on set_breakpoint_at.
4964 (set_breakpoint_at): Reimplement.
4965 (delete_raw_breakpoint): Go through the_target->remove_point
4966 instead of assuming memory breakpoints.
4967 (find_gdb_breakpoint_at): Delete.
4968 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4969 (find_gdb_breakpoint): New function.
4970 (set_gdb_breakpoint_at): Delete.
4971 (z_type_supported): New function.
4972 (set_gdb_breakpoint_1): New function, loosely based off
4973 set_gdb_breakpoint_at.
4974 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4975 (delete_gdb_breakpoint_at): Delete.
4976 (delete_gdb_breakpoint_1): New function, loosely based off
4977 delete_gdb_breakpoint_at.
4978 (delete_gdb_breakpoint): New function.
4979 (clear_gdb_breakpoint_conditions): Rename to ...
4980 (clear_breakpoint_conditions): ... this. Don't handle a NULL
4981 breakpoint.
4982 (add_condition_to_breakpoint): Make static.
4983 (add_breakpoint_condition): Take a struct breakpoint pointer
4984 instead of an address. Adjust.
4985 (gdb_condition_true_at_breakpoint): Rename to ...
4986 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4987 z_type parameter.
4988 (gdb_condition_true_at_breakpoint): Reimplement.
4989 (add_breakpoint_commands): Take a struct breakpoint pointer
4990 instead of an address. Adjust.
4991 (gdb_no_commands_at_breakpoint): Rename to ...
4992 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
4993 parameter. Return true if no breakpoint was found. Change debug
4994 output.
4995 (gdb_no_commands_at_breakpoint): Reimplement.
4996 (run_breakpoint_commands): Rename to ...
4997 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
4998 and change return type to boolean.
4999 (run_breakpoint_commands): New function.
5000 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5001 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5002 breakpoint. Go through the_target->remove_point instead of
5003 assuming memory breakpoint.
5004 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5005 software and hardware breakpoints.
5006 (reinsert_raw_breakpoint): Go through the_target->insert_point
5007 instead of assuming memory breakpoint.
5008 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5009 software and hardware breakpoints.
5010 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5011 Check both software and hardware breakpoints.
5012 (validate_inserted_breakpoint): Assert the breakpoint is a
5013 software breakpoint. Set the inserted flag to -1 instead of
5014 setting shlib_disabled.
5015 (delete_disabled_breakpoints): Adjust.
5016 (validate_breakpoints): Only validate software breakpoints.
5017 Adjust to inserted flag change.
5018 (check_mem_read, check_mem_write): Skip breakpoint types other
5019 than software breakpoints. Adjust to inserted flag change.
5020 * mem-break.h (enum raw_bkpt_type): New enum.
5021 (raw_breakpoint, struct process_info): Forward declare.
5022 (Z_packet_to_target_hw_bp_type): Delete declaration.
5023 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5024 (set_gdb_breakpoint, delete_gdb_breakpoint)
5025 (clear_breakpoint_conditions): New declarations.
5026 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5027 (breakpoint_inserted_here): Update comment.
5028 (add_breakpoint_condition, add_breakpoint_commands): Replace
5029 address parameter with a breakpoint pointer parameter.
5030 (gdb_breakpoint_here): Update comment.
5031 (delete_gdb_breakpoint_at): Delete.
5032 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5033 * server.c (process_point_options): Take a struct breakpoint
5034 pointer instead of an address. Adjust.
5035 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5036 delete_gdb_breakpoint.
5037 * spu-low.c (spu_target_ops): Install NULL as
5038 supports_z_point_type method.
5039 * target.h: Include mem-break.h.
5040 (struct target_ops) <prepare_to_access_memory>: Update comment.
5041 <supports_z_point_type>: New field.
5042 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5043 instead of a char. Also take a raw breakpoint pointer.
5044 * win32-arm-low.c (the_low_target): Install NULL as
5045 supports_z_point_type.
5046 * win32-i386-low.c (i386_supports_z_point_type): New function.
5047 (i386_insert_point, i386_remove_point): Adjust to new interface.
5048 (the_low_target): Install i386_supports_z_point_type.
5049 * win32-low.c (win32_supports_z_point_type): New function.
5050 (win32_insert_point, win32_remove_point): Adjust to new interface.
5051 (win32_target_ops): Install win32_supports_z_point_type.
5052 * win32-low.h (struct win32_target_ops):
5053 <supports_z_point_type>: New method.
5054 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5055 instead of a char. Also take a raw breakpoint pointer.
5056
932539e3
PA
50572014-05-20 Pedro Alves <palves@redhat.com>
5058
5059 * mem-break.h: Include break-common.h.
5060 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5061 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5062 (Z_packet_to_target_hw_bp_type): New declaration.
5063 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5064 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5065 (Z_PACKET_ACCESS_WP): Delete macros.
5066 (Z_packet_to_hw_type): Delete function.
5067 * i386-low.h: Don't include break-common.h here.
5068 (Z_packet_to_hw_type): Delete declaration.
5069 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5070 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5071 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5072 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5073 * linux-aarch64-low.c: Don't include break-common.h here.
5074 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5075 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5076 (Z_packet_to_target_hw_bp_type): Delete function.
5077 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5078 function.
5079 (mips_insert_point, mips_remove_point): Use
5080 Z_packet_to_target_hw_bp_type.
5081
4ff0d3d8
PA
50822014-05-20 Pedro Alves <palves@redhat.com>
5083
5084 * linux-aarch64-low.c: Include break-common.h.
5085 (enum target_point_type): Delete.
5086 (Z_packet_to_point_type): Rename to ...
5087 (Z_packet_to_target_hw_bp_type): ... this, and return a
5088 target_hw_bp_type instead.
5089 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5090 instead of an enum target_point_type.
5091 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5092 breakpoint type.
5093 (aarch64_dr_state_insert_one_point)
5094 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5095 (aarch64_handle_aligned_watchpoint)
5096 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5097 Take an enum target_hw_bp_type instead of an enum
5098 target_point_type.
5099 (aarch64_supports_z_point_type): New function.
5100 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5101 use Z_packet_to_target_hw_bp_type.
5102
786dc519
JB
51032014-05-20 Joel Brobecker <brobecker@adacore.com>
5104
5105 * configure.ac: Only use -Werror by default when DEVELOPMENT
5106 is true.
5107 * configure: Regenerate.
5108
9e0aa64f
JK
51092014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5110
5111 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5112 * linux-x86-low.c (X86_64_USER_REGS): New.
5113 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5114
2b577b92
YQ
51152014-04-28 Yao Qi <yao@codesourcery.com>
5116
5117 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5118 name.
5119
94611da2
PA
51202014-04-25 Pedro Alves <palves@redhat.com>
5121
5122 PR server/16255
5123 * linux-low.c (linux_attach_fail_reason_string): New function.
5124 (linux_attach_lwp): Delete.
5125 (linux_attach_lwp_1): Rename to ...
5126 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5127 argument. Remove "initial" parameter. Return int instead of
5128 void. Don't error or warn here.
5129 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5130 failure to attach to the tgid. Call warning when failing to
5131 attach to an lwp.
5132 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5133 argument. Remove "initial" parameter. Return int instead of
5134 void. Don't error or warn here.
5135 (linux_attach_fail_reason_string): New declaration.
5136 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5137 interface change. Use linux_attach_fail_reason_string.
5138
01f9f808
MS
51392014-04-24 Michael Sturm <michael.sturm@mintel.com>
5140 Walfred Tedeschi <walfred.tedeschi@intel.com>
5141
5142 * Makefile.in: Added rules to handle new files
5143 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5144 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5145 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5146 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5147 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5148 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5149 x32-avx512-linux.o.
5150 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5151 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5152 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5153 i386/x32-avx512.xml.
5154 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5155 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5156 i386/x32-avx512-linux.xml.
5157 * i387-fp.c (num_avx512_k_registers): New constant for number
5158 of K registers.
5159 (num_avx512_zmmh_low_registers): New constant for number of
5160 lower ZMM registers (0-15).
5161 (num_avx512_zmmh_high_registers): New constant for number of
5162 higher ZMM registers (16-31).
5163 (num_avx512_ymmh_registers): New contant for number of higher
5164 YMM registers (ymm16-31 added by avx521 on x86_64).
5165 (num_avx512_xmm_registers): New constant for number of higher
5166 XMM registers (xmm16-31 added by AVX512 on x86_64).
5167 (struct i387_xsave): Add space for AVX512 registers.
5168 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5169 Add code to handle AVX512 registers.
5170 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5171 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5172 prototypei from generated file.
5173 (tdesc_amd64_avx512_linux): Likewise.
5174 (init_registers_x32_avx512_linux): Likewise.
5175 (tdesc_x32_avx512_linux): Likewise.
5176 (init_registers_i386_avx512_linux): Likewise.
5177 (tdesc_i386_avx512_linux): Likewise.
5178 (x86_64_regmap): Add AVX512 registers.
5179 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5180 mask.
5181 (initialize_low_arch): Add code to initialize AVX512 registers.
5182
51aa91f9
PA
51832014-04-23 Pedro Alves <palves@redhat.com>
5184
5185 * mem-break.c (find_gdb_breakpoint_at): Make static.
5186 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5187
a4165e94
PA
51882014-04-23 Pedro Alves <palves@redhat.com>
5189
5190 * i386-low.c: Don't include break-common.h here.
5191 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5192 prototype to take target_hw_bp_type as argument instead of a Z
5193 packet char.
5194 * i386-low.h: Include break-common.h here.
5195 (Z_packet_to_hw_type): Declare.
5196 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5197 prototypes.
5198 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5199 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5200 (x86_remove_point): Convert the packet number to a
5201 target_hw_bp_type before calling i386_low_remove_watchpoint.
5202 * win32-i386-low.c (i386_insert_point): Convert the packet number
5203 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5204 (i386_remove_point): Convert the packet number to a
5205 target_hw_bp_type before calling i386_low_remove_watchpoint.
5206
b8acf843
PA
52072014-04-23 Pedro Alves <palves@redhat.com>
5208
5209 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5210
d708bcd1
PA
52112014-04-10 Pedro Alves <palves@redhat.com>
5212
5213 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5214 Check if the condition or command is NULL before checking if the
5215 breakpoint is known. On success, return true.
5216 * mem-break.h (add_breakpoint_condition): Document return.
5217 (add_breakpoint_commands): Add describing comment.
5218 * server.c (skip_to_semicolon): New function.
5219 (process_point_options): Use it.
5220
2eec7d5b
PA
52212014-04-09 Pedro Alves <palves@redhat.com>
5222
5223 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5224 to lwpid_of.
5225
fa96cb38
PA
52262014-02-27 Pedro Alves <palves@redhat.com>
5227
5228 PR 12702
5229 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5230 macros.
5231 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5232 output.
5233 (last_thread_of_process_p): Take a PID argument instead of a
5234 thread pointer.
5235 (linux_wait_for_lwp): Delete.
5236 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5237 functions.
5238 (linux_low_filter_event): New function, party factored out from
5239 linux_wait_for_event.
5240 (linux_wait_for_event): Rename to ...
5241 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5242 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5243 sigsuspend. Check for zombie leaders.
5244 (linux_wait_for_event): Reimplement as wrapper around
5245 linux_wait_for_event_filtered.
5246 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5247 a normal or signal exit is seen, it's the whole process exiting.
5248 (wait_for_sigstop): No longer a for_each_inferior callback.
5249 Rewrite on top of linux_wait_for_event_filtered.
5250 (stop_all_lwps): Call wait_for_sigstop directly.
5251 * server.c (resume, handle_target_event): Handle
5252 TARGET_WAITKIND_NO_RESUMED.
5253
d763de10
JB
52542014-02-26 Joel Brobecker <brobecker@adacore.com>
5255
5256 * win32-low.c (psapi_get_dll_name,
5257 * win32_CreateToolhelp32Snapshot): Delete.
5258 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5259 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5260 Delete.
5261 (handle_load_dll): Add function description.
5262 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5263
850a0f76
JB
52642014-02-26 Joel Brobecker <brobecker@adacore.com>
5265
5266 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5267 Add comment.
5268 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5269 base address when calling win32_add_one_solib.
5270 (handle_load_dll): Delete local variable load_addr.
5271 Remove 0x1000 offset applied to DLL base address when calling
5272 win32_add_one_solib.
5273 (handle_unload_dll): Add comment.
5274
f25b3fc3
JB
52752014-02-26 Joel Brobecker <brobecker@adacore.com>
5276
5277 * win32-low.c (win32_add_all_dlls): Renames
5278 win32_ensure_ntdll_loaded. Rewrite function documentation.
5279 Adjust implementation to always load all DLLs.
5280 Add 0x1000 offset to DLL base address when calling
5281 win32_add_one_solib.
5282 (child_initialization_done): New static global.
5283 (do_initial_child_stuff): Set child_initialization_done to
5284 zero during child initialization, and 1 after. Replace call
5285 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5286 Add comment.
5287 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5288 (handle_unload_dll): Add function documentation.
5289 (get_child_debug_event): Ignore load and unload DLL events
5290 during child initialization.
5291
d86d4aaf
DE
52922014-02-20 Doug Evans <dje@google.com>
5293
3bc32da3 5294 Remove global all_lwps.
d86d4aaf
DE
5295 * inferiors.h (ptid_of): Move here from linux-low.h.
5296 (pid_of, lwpid_of): Ditto.
5297 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5298 parameter is a struct thread_info * now.
5299 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5300 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5301 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5302 directly.
5303 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5304 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5305 * linux-arm-low.c (update_registers_callback): Update, "entry"
5306 parameter is a struct thread_info * now.
5307 Fetch lwpid from current_inferior directly.
5308 (arm_insert_point): Pass &all_threads to find_inferior instead of
5309 &all_lwps.
5310 (arm_remove_point): Ditto.
5311 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5312 (arm_prepare_to_resume): Fetch pid from thread.
5313 (arm_read_description): Fetch lwpid from current_inferior directly.
5314 * linux-low.c (all_lwps): Delete.
5315 (delete_lwp): Delete call to remove_inferior.
5316 (handle_extended_wait): Fetch lwpid from thread.
5317 (add_lwp): Don't set lwp->entry.id. Remove call to
5318 add_inferior_to_list.
5319 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5320 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5321 (kill_one_lwp_callback): Ditto.
5322 (linux_kill): Don't dereference NULL pointer.
5323 Fetch ptid,lwpid from thread.
5324 (get_detach_signal): Fetch ptid from thread.
5325 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5326 Simplify call to regcache_invalidate_thread.
5327 (delete_lwp_callback): Update, "entry" parameter is a
5328 struct thread_info * now. Fetch pid from thread.
5329 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5330 (status_pending_p_callback): Update, "entry" parameter is a
5331 struct thread_info * now. Fetch ptid from thread.
5332 (find_lwp_pid): Update, "entry" parameter is a
5333 struct thread_info * now.
5334 (linux_wait_for_lwp): Fetch pid from thread.
5335 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5336 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5337 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5338 (dequeue_one_deferred_signal): Ditto.
5339 (cancel_breakpoint): Fetch ptid from current_inferior.
5340 (linux_wait_for_event): Pass &all_threads to find_inferior,
5341 not &all_lwps. Fetch ptid, lwpid from thread.
5342 (count_events_callback): Update, "entry" parameter is a
5343 struct thread_info * now.
5344 (select_singlestep_lwp_callback): Ditto.
5345 (select_event_lwp_callback): Ditto.
5346 (cancel_breakpoints_callback): Ditto.
5347 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5348 not &all_lwps.
5349 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5350 (unsuspend_one_lwp): Update, "entry" parameter is a
5351 struct thread_info * now.
5352 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5353 not &all_lwps.
5354 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5355 Fetch lwpid from thread, not lwp.
5356 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5357 Pass &all_threads to find_inferior, not &all_lwps.
5358 (send_sigstop): Fetch lwpid from thread, not lwp.
5359 (send_sigstop_callback): Update, "entry" parameter is a
5360 struct thread_info * now.
5361 (suspend_and_send_sigstop_callback): Ditto.
5362 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5363 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5364 struct thread_info * now.
5365 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5366 from thread, lwp.
5367 (lwp_running): Update, "entry" parameter is a
5368 struct thread_info * now.
5369 (stop_all_lwps): Fetch ptid from thread.
5370 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5371 (linux_resume_one_lwp): Fetch lwpid from thread.
5372 (linux_set_resume_request): Update, "entry" parameter is a
5373 struct thread_info * now. Fetch pid, lwpid from thread.
5374 (resume_status_pending_p): Update, "entry" parameter is a
5375 struct thread_info * now.
5376 (need_step_over_p): Ditto. Fetch lwpid from thread.
5377 (start_step_over): Fetch lwpid from thread.
5378 (linux_resume_one_thread): Update, "entry" parameter is a
5379 struct thread_info * now. Fetch lwpid from thread.
5380 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5381 (proceed_one_lwp): Update, "entry" parameter is a
5382 struct thread_info * now. Fetch lwpid from thread.
5383 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5384 struct thread_info * now.
5385 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5386 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5387 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5388 directly.
5389 (regsets_store_inferior_registers): Ditto.
5390 (fetch_register, store_register): Ditto.
5391 (linux_read_memory, linux_write_memory): Ditto.
5392 (linux_request_interrupt): Ditto.
5393 (linux_read_auxv): Ditto.
5394 (linux_xfer_siginfo): Ditto.
5395 (linux_qxfer_spu): Ditto.
5396 (linux_qxfer_libraries_svr4): Ditto.
5397 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5398 moved to inferiors.h.
5399 (get_lwp): Delete.
5400 (get_thread_lwp): Update.
5401 (struct lwp_info): Delete member "entry". Simplify comment for
5402 member "thread".
5403 (all_lwps): Delete.
5404 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5405 current_inferior directly.
5406 (update_watch_registers_callback): Update, "entry" parameter is a
5407 struct thread_info * now. Fetch pid from thread.
5408 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5409 (mips_insert_point): Fetch lwpid from current_inferior.
5410 Pass &all_threads to find_inferior, not &all_lwps.
5411 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5412 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5413 directly.
5414 (mips_stopped_data_address): Ditto.
5415 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5416 directly.
5417 * linux-tile-low.c (tile_arch_setup): Ditto.
5418 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5419 (update_debug_registers_callback): Update, "entry" parameter is a
5420 struct thread_info * now. Fetch pid from thread.
5421 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5422 Pass &all_threads to find_inferior, not &all_lwps.
5423 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5424 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5425 Pass &all_threads to find_inferior, not &all_lwps.
5426 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5427 (i386_dr_low_get_status): Ditto.
5428 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5429 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5430 (x86_linux_read_description): Ditto.
5431 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5432
3b8361aa
DE
54332014-02-20 Doug Evans <dje@google.com>
5434
5435 * inferiors.c (get_first_inferior): Fix buglet.
5436
f7667f0d
DE
54372014-02-19 Doug Evans <dje@google.com>
5438
5439 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5440 * inferiors.c (add_thread): Change result type to struct thread_info *.
5441 All callers updated.
5442 (add_lwp): Call add_thread here instead of in callers.
5443 All callers updated.
5444 * linux-low.h (get_lwp_thread): Rewrite.
5445 (struct lwp_info): New member "thread".
5446
b3312d80
DE
54472014-02-19 Doug Evans <dje@google.com>
5448
5449 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5450 All callers updated.
5451
ecc6f45c
DE
54522014-02-19 Doug Evans <dje@google.com>
5453
5454 * inferiors.c (add_thread): Fix whitespace.
5455
649ebbca
DE
54562014-02-19 Doug Evans <dje@google.com>
5457
5458 * dll.c (clear_dlls): Replace accessing list implemention details
5459 with API function.
5460 * gdbthread.h (get_first_thread): Declare.
5461 * inferiors.c (for_each_inferior_with_data): New function.
5462 (get_first_thread): New function.
5463 (find_thread_ptid): Simplify.
5464 (get_first_inferior): New function.
5465 (clear_list): Delete.
5466 (one_inferior_p): New function.
5467 (clear_inferior_list): New function.
5468 (clear_inferiors): Update.
5469 * inferiors.h (for_each_inferior_with_data): Declare.
5470 (clear_inferior_list): Declare.
5471 (one_inferior_p): Declare.
5472 (get_first_inferior): Declare.
5473 * linux-low.c (linux_wait_for_event): Replace accessing list
5474 implemention details with API function.
5475 * server.c (target_running): Ditto.
5476 (accumulate_file_name_length): New function.
5477 (emit_dll_description): New function.
5478 (handle_qxfer_libraries): Replace accessing list implemention
5479 details with API function.
5480 (handle_qxfer_threads_worker): New function.
5481 (handle_qxfer_threads_proper): Replace accessing list implemention
5482 details with API function.
5483 (handle_query): Ditto.
5484 (visit_actioned_threads_callback_ftype): New typedef.
5485 (visit_actioned_threads_data): New struct.
5486 (visit_actioned_threads): Rewrite to be find_inferior callback.
5487 (resume): Call find_inferior.
5488 (handle_status): Replace accessing list implemention
5489 details with API function.
5490 (process_serial_event): Replace accessing list implemention details
5491 with API function.
5492 * target.c (set_desired_inferior): Replace accessing list implemention
5493 details with API function.
5494 * tracepoint.c (same_process_p): New function.
5495 (gdb_agent_about_to_close): Replace accessing list implemention
5496 details with API function.
5497 * win32-low.c (child_delete_thread): Replace accessing list
5498 implemention details with API function.
5499 (match_dll_by_basename): New function.
5500 (dll_is_loaded_by_basename): New function.
5501 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5502 details call to dll_is_loaded_by_basename.
5503
80894984
DE
55042014-02-19 Doug Evans <dje@google.com>
5505
5506 * dll.h (struct dll_info): Add comment.
5507 * gdbthread.h (struct thread_info): Add comment.
5508 (current_ptid): Simplify.
5509 * inferiors.c (add_process): Update.
5510 (remove_process): Update.
5511 * inferiors.h (struct process_info): Rename member "head" to "entry".
5512 * linux-low.c (delete_lwp): Update.
5513 (add_lwp): Update.
5514 (last_thread_of_process_p): Update.
5515 (kill_one_lwp_callback, linux_kill): Update.
5516 (status_pending_p_callback): Update.
5517 (wait_for_sigstop): Update. Simplify read of ptid.
5518 (start_step_over): Update.
5519 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5520 (get_lwp_thread): Update.
5521 (struct lwp_info): Rename member "head" to "entry".
5522 * regcache.h (inferior_list_entry): Delete.
5523 * server.c (kill_inferior_callback): Update.
5524 (detach_or_kill_inferior_callback): Update.
5525 (print_started_pid): Update.
5526 (print_attached_pid): Update.
5527 (process_serial_event): Simplify read of ptid.
5528 * thread-db.c (thread_db_create_event): Update.
5529 (thread_db_get_tls_address): Update.
5530 * win32-low.c (current_inferior_ptid): Simplify.
5531
46917d26
TT
55322014-02-19 Tom Tromey <tromey@redhat.com>
5533
5534 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5535 argument.
5536 (target_supports_btrace): Update.
5537
0759a81e
YQ
55382014-02-14 Yao Qi <yao@codesourcery.com>
5539
5540 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5541 (rsp-low-ipa.o): New target.
5542
a7191e8b
TT
55432014-02-12 Tom Tromey <tromey@redhat.com>
5544
5545 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5546 convert_ascii_to_int.
5547 * regcache.c (registers_to_string): Likewise.
5548 * remote-utils.c (decode_M_packet): Likewise.
5549 * server.c (process_serial_event): Likewise.
5550
ff0e980e
TT
55512014-02-12 Tom Tromey <tromey@redhat.com>
5552
5553 * server.c (handle_query, handle_v_run): Use hex2bin, not
5554 unhexify.
5555 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5556
e9371aff
TT
55572014-02-12 Tom Tromey <tromey@redhat.com>
5558
5559 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5560 convert_int_to_ascii.
5561 * regcache.c (registers_to_string, collect_register_as_string):
5562 Likewise.
5563 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5564 Likewise.
5565 * server.c (process_serial_event): Likewise.
5566 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5567 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5568
971dc0b8
TT
55692014-02-12 Tom Tromey <tromey@redhat.com>
5570
5571 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5572 bin2hex, not hexify.
5573 * tracepoint.c (cmd_qtstatus): Likewise.
5574
0a822afb
TT
55752014-02-12 Tom Tromey <tromey@redhat.com>
5576
5577 * remote-utils.c (monitor_output): Pass explicit length to
5578 hexify.
5579
9c3d6531
TT
55802014-02-12 Tom Tromey <tromey@redhat.com>
5581
5582 * tracepoint.c: Include rsp-low.h.
5583 * server.c: Include rsp-low.h.
5584 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5585 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5586 declare.
5587 * remote-utils.c: Include rsp-low.h.
5588 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5589 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5590 (convert_int_to_ascii, convert_ascii_to_int): Move to
5591 common/rsp-low.c.
5592 * regcache.c: Include rsp-low.h.
5593 * ax.c: Include rsp-low.h.
5594 * Makefile.in (SFILES): Add common/rsp-low.c.
5595 (OBS): Add rsp-low.o.
5596 (rsp-low.o): New target.
5597
01fd3ea5
TT
55982014-02-12 Tom Tromey <tromey@redhat.com>
5599
5600 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5601 Include print-utils.h.
5602 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5603 (plongest, thirty_two, phex_nz): Remove.
5604 * Makefile.in (SFILES): Add common/print-utils.c.
5605 (OBS): Add print-utils.o.
5606 (print-utils-ipa.o): New target.
5607 (print-utils.o): New target.
5608 (IPA_OBJS): Add print-utils-ipa.o.
5609
e99dc820
TT
56102014-02-06 Tom Tromey <tromey@redhat.com>
5611
5612 * Makefile.in (SFILES): Fix indentation.
5613
ee1e2d4f
DE
56142014-02-05 Doug Evans <dje@google.com>
5615
5616 * linux-low.c (linux_wait_for_event): Improve comment.
5617 (linux_wait_1): Keep current_inferior in sync with event_child.
5618
f5a02773
DE
56192014-01-22 Doug Evans <dje@google.com>
5620
5621 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5622
87ce2a04
DE
56232014-01-22 Doug Evans <dje@google.com>
5624
5625 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5626 * configure: Regenerate.
5627 * config.in: Regenerate.
5628 * Makefile.in (SFILES): Add debug.c.
5629 (OBS): Add debug.o.
5630 * debug.c: New file.
5631 * debug.h: New file.
5632 * linux-aarch64-low.c (*): Update all debugging printfs to use
5633 debug_printf instead of fprintf.
5634 * linux-arm-low.c (*): Ditto.
5635 * linux-cris-low.c (*): Ditto.
5636 * linux-crisv32-low.c (*): Ditto.
5637 * linux-m32r-low.c (*): Ditto.
5638 * linux-sparc-low.c (*): Ditto.
5639 * linux-x86.c (*): Ditto.
5640 * linux-low.c (*): Ditto.
5641 (linux_wait_1): Add calls to debug_enter, debug_exit.
5642 (linux_wait): Remove redundant debugging printf.
5643 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5644 (linux_resume, unstop_all_lwps): Ditto.
5645 * mem-break.c (*): Update all debugging printfs to use
5646 debug_printf instead of fprintf.
5647 * remote-utils.c (*): Ditto.
5648 * thread-db.c (*): Ditto.
5649 * server.c #include <ctype.h>, "gdb_vecs.h".
5650 (debug_threads): Moved to debug.c.
5651 (*): Update all debugging printfs to use debug_printf instead of
5652 fprintf.
5653 (start_inferior): Replace call to fflush with call to debug_flush.
5654 (monitor_show_help): Mention set debug-format.
5655 (parse_debug_format_options): New function.
5656 (handle_monitor_command): Handle "monitor set debug-format".
5657 (gdbserver_usage): Mention --debug-format.
5658 (main): Parse --debug-format.
5659 * server.h (debug_threads): Declaration moved to debug.h.
5660 #include "debug.h".
5661 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5662 trace_debug_1 that uses debug_printf.
5663 (tracepoint_look_up_symbols): Update all debugging printfs to use
5664 debug_printf instead of fprintf.
5665
e671835b
BS
56662014-01-20 Baruch Siach <baruch@tkos.co.il>
5667
5668 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5669 sys/ptrace.h.
5670
b5737fa9
PA
56712014-01-17 Pedro Alves <palves@redhat.com>
5672
ea38d2a9 5673 PR build/16445
c7faa97a
PA
5674 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5675 defined after including gdb_proc_service.h.
b5737fa9 5676
40ed484e
DE
56772014-01-16 Doug Evans <dje@google.com>
5678
5679 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5680 (match_dll): Use it.
5681
969c39fb
MM
56822014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5683
5684 * target.h (target_ops) <read_btrace>: Change parameters and
5685 return type to allow error reporting.
5686 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5687 trace reading errors on.
5688 * linux-low.c (linux_low_read_btrace): Pass trace reading
5689 errors on.
5690 (linux_low_disable_btrace): New.
5691
ab7f45ba
DE
56922014-01-15 Doug Evans <dje@google.com>
5693
5694 * inferiors.c (thread_id_to_gdb_id): Delete.
5695 * inferiors.h (thread_id_to_gdb_id): Delete.
5696
66af0f44
EZ
56972014-01-13 Eli Zaretskii <eliz@gnu.org>
5698
5699 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5700 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5701 versions.
5702
9939e131
PA
57032014-01-08 Pedro Alves <palves@redhat.com>
5704
5705 * server.c (handle_status): Don't discard previous queued stop
5706 replies or thread's pending status here.
5707 (main) <disconnection>: Do it here instead.
5708
b7ea362b
PA
57092014-01-08 Pedro Alves <palves@redhat.com>
5710
5711 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5712 * server.c (visit_actioned_threads, handle_pending_status): New
5713 function.
5714 (handle_v_cont): Factor out parts to ...
5715 (resume): ... this new function. If in all-stop, and a thread
5716 being resumed has a pending status, report it without actually
5717 resuming.
5718 (myresume): Adjust to use the new 'resume' function.
5719 (clear_pending_status_callback, set_pending_status_callback)
5720 (find_status_pending_thread_callback): New functions.
5721 (handle_status): Handle the case of multiple threads having
5722 interesting statuses to report. Report threads' real last signal
5723 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5724 with an interesting thread to report the status for, instead of
5725 always reporting the status of the first thread.
5726
28498c42
JB
57272014-01-01 Joel Brobecker <brobecker@adacore.com>
5728
5729 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5730 * gdbreplay.c (gdbreplay_version): Likewise.
5731
f45c82da
YZ
57322013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5733
5734 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5735 iov.iov_len with the real length in use.
5736
379a5e2d
JB
57372013-12-13 Joel Brobecker <brobecker@adacore.com>
5738
5739 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5740 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5741 for all targets that use win32-low.c.
5742 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5743 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5744
4210d83e
PA
57452013-12-13 Pedro Alves <palves@redhat.com>
5746
5747 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5748 if equal to TARGET_WAITKIND_LOADED.
5749 * win32-low.c (cached_status): New static global.
5750 (win32_wait): Add declaration.
5751 (do_initial_child_stuff): Flush all initial pending debug events
5752 up to the initial breakpoint.
5753 (win32_wait): If CACHED_STATUS was set, return that instead
5754 of doing a real wait. Remove the code resuming the execution
5755 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5756 during the initial phase. Also remove the code changing
5757 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5758 TARGET_WAITKIND_STOPPED.
5759
e7f0d979
YQ
57602013-12-11 Yao Qi <yao@codesourcery.com>
5761
5762 * notif.c (handle_notif_ack): Return 0 if no notification
5763 matches.
5764
ebcf782c
DE
57652013-11-20 Doug Evans <dje@google.com>
5766
5767 * linux-low.c (linux_set_resume_request): Fix comment.
5768
20ad9378
DE
57692013-11-20 Doug Evans <dje@google.com>
5770
5771 * linux-low.c (resume_status_pending_p): Tweak comment.
5772
a196ebeb
WT
57732013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5774
5775 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5776 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5777 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5778 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5779 (srv_amd64_regobj): Add amd64-mpx.o.
5780 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5781 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5782 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5783 * i387-fp.c (num_pl_bnd_register) Added constant.
5784 (num_pl_bnd_cfg_registers) Added constant.
5785 (struct i387_xsave) Added reserved area and MPX fields.
5786 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5787 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5788 function.
5789 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5790 (init_registers_amd64_mpx_linux): Declare new function.
5791 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5792 (x86_64_regmap): Add MPX registers.
5793 (x86_linux_read_description): Add MPX case.
5794 (initialize_low_arch): Initialize MPX targets.
5795
0080a2f6
TT
57962013-11-18 Tom Tromey <tromey@redhat.com>
5797
5798 * configure: Rebuild.
5799 * configure.ac: Don't check for stdlib.h.
5800 * gdbreplay.c: Unconditionally include stdlib.h.
5801
2978b111
TT
58022013-11-18 Tom Tromey <tromey@redhat.com>
5803
5804 * config.in: Rebuild.
5805 * configure: Rebuild.
5806 * configure.ac: Don't use AC_HEADER_DIRENT.
5807
a3d08894
TT
58082013-11-18 Tom Tromey <tromey@redhat.com>
5809
5810 * server.h: Don't check HAVE_STRING_H.
5811 * gdbreplay.c: Don't check HAVE_STRING_H.
5812 * configure: Rebuild.
5813
0a5dd17d
TT
58142013-11-18 Tom Tromey <tromey@redhat.com>
5815
5816 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5817 LIBGNU.
5818
1bd2f0ba
TT
58192013-11-08 Tom Tromey <tromey@redhat.com>
5820
5821 * configure, config.in: Rebuild.
5822 * configure.ac: Remove unused configury.
5823
3266f10b
TT
58242013-11-08 Tom Tromey <tromey@redhat.com>
5825
5826 * acinclude.m4: Include common.m4, codeset.m4.
5827 * configure, config.in: Rebuild.
5828 * configure.ac: Use GDB_AC_COMMON.
5829
6682d959
AA
58302013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5831
5832 * linux-s390-low.c (HWCAP_S390_TE): New define.
5833 (s390_arch_setup): Consider the TE field in the HWCAP for
5834 determining 'have_regset_tdb'.
5835
fd0a4d76
SDJ
58362013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5837
5838 PR gdb/16014
5839 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5840 call to sizeof.
5841
1a3d890b
PA
58422013-10-02 Pedro Alves <palves@redhat.com>
5843
5844 * server.c (process_serial_event): Don't output "GDBserver
5845 exiting" if GDB is connected through stdio.
5846 * target.c (mywait): Likewise, be silent if GDB is connected
5847 through stdio.
5848
97ad4581
JB
58492013-10-01 Joel Brobecker <brobecker@adacore.com>
5850
5851 * lynx-low.c (lynx_add_threads_after_attach): New function.
5852 (lynx_attach): Remove call to add_thread. Add call to
5853 lynx_add_threads_after_attach instead.
5854
5b4e221c
MF
58552013-09-28 Mike Frysinger <vapier@gentoo.org>
5856
5857 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5858 * config.in, configure: Regenerated.
5859
ee47b2f8
YQ
58602013-09-18 Yao Qi <yao@codesourcery.com>
5861
5862 PR server/15959
5863 * server.c (start_inferior): Clear 'resume_info'.
5864
d6707650 58652013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5866
d6707650
JW
5867 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5868 for each register.
5869
9243dd0e 58702013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5871
9243dd0e
JW
5872 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5873 linux-tile-low.o to srv_tgtobj.
5874
c623a6ef
WN
58752013-09-16 Will Newton <will.newton@linaro.org>
5876
5877 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5878 out regs.
5879
fb71d39e
PA
58802013-09-06 Pedro Alves <palves@redhat.com>
5881
5882 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5883 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5884 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5885 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5886 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5887 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5888
8e7e9910
PA
58892013-09-06 Pedro Alves <palves@redhat.com>
5890
5891 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5892 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5893
7c3a12ca
PA
58942013-09-06 Pedro Alves <palves@redhat.com>
5895
5896 * linux-amd64-ipa.c: Include tracepoint.h.
5897 * linux-i386-ipa.c: Include tracepoint.h.
5898
8eb3d7b6
RW
58992013-09-06 Ricard Wanderlof <ricardw@axis.com>
5900
5901 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5902 (ps_get_thread_area): New function.
5903
eddddb9d
RW
59042013-09-06 Ricard Wanderlof <ricardw@axis.com>
5905
5906 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5907 (initialize_low_arch): Call init_registers_crisv32 rather than
5908 init_register_crisv32.
5909
533b0600
PA
59102013-09-05 Pedro Alves <palves@redhat.com>
5911
5912 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5913 to ...
5914 * hostio.h: ... this new file.
5915 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5916 win32-low.c: Include hostio.h.
5917
0ce3d3b5
PA
59182013-09-05 Pedro Alves <palves@redhat.com>
5919
5920 * server.h (gdb_client_data, handler_func, callback_handler_func)
5921 (delete_file_handler, add_file_handler, append_callback_event)
5922 (delete_callback_event, start_event_loop, initialize_event_loop):
5923 Move to event-loop.h and include it.
5924 * event-loop.h: New file.
5925
799cdc37
PA
59262013-09-05 Pedro Alves <palves@redhat.com>
5927
5928 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5929 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5930 (loaded_dll, unloaded_dll): Move to ...
5931 * dll.h: ... this new file.
5932 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5933
6a6bbd9d
PA
59342013-09-05 Pedro Alves <palves@redhat.com>
5935
5936 * server.h (current_process, get_thread_process, all_processes)
5937 (add_inferior_to_list, for_each_inferior, current_inferior)
5938 (remove_inferior, add_process, remove_process, find_process_pid)
5939 (have_started_inferiors_p, have_attached_inferiors_p)
5940 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5941 (clear_inferiors, find_inferior, find_inferior_id)
5942 (inferior_target_data, set_inferior_target_data)
5943 (inferior_regcache_data, set_inferior_regcache_data): Move to
5944 inferiors.h, and include it.
5945 * inferiors.h: New file.
5946
f699aaba
PA
59472013-09-05 Pedro Alves <palves@redhat.com>
5948
5949 * server.h (struct emit_ops, current_insn_ptr, emit_error):
5950 Move ...
72f4393d 5951 * ax.h: ... here.
f699aaba 5952
c144c7a0
PA
59532013-09-05 Pedro Alves <palves@redhat.com>
5954
5955 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5956 tracepoint.h.
5957 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5958 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5959 (handle_tracepoint_general_set, handle_tracepoint_query)
5960 (tracepoint_finished_step, tracepoint_was_hit)
5961 (release_while_stepping_state_list, current_traceframe)
5962 (in_readonly_region, traceframe_read_mem)
5963 (fetch_traceframe_registers, traceframe_read_sdata)
5964 (traceframe_read_info, struct fast_tpoint_collect_status)
5965 (fast_tracepoint_collecting, force_unlock_trace_buffer)
5966 (handle_tracepoit_bkpts, initialize_low_tracepoint)
5967 (supply_fast_tracepoint_registers)
5968 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5969 (ipa_tdesc, claim_trampoline_space)
5970 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5971 (agent_mem_read, agent_get_trace_state_variable_value)
5972 (agent_set_trace_state_variable_value, agent_tsv_read)
5973 (agent_mem_read_string, get_raw_reg_func_addr)
5974 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5975 * tracepoint.h: ... this new file.
5976
ff42e6ab
PA
59772013-09-05 Pedro Alves <palves@redhat.com>
5978
5979 * server.h (perror_with_name, error, fatal, warning, paddress)
5980 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5981 include it.
5982 * utils.h: New file.
5983
541af0f4
PA
59842013-09-05 Pedro Alves <palves@redhat.com>
5985
5986 * server.h (remote_debug, noack_mode, transport_is_reliable)
5987 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5988 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5989 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5990 (write_enn, initialize_async_io, enable_async_io)
5991 (disable_async_io, check_remote_input_interrupt_request)
5992 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5993 (dead_thread_notify, prepare_resume_reply)
5994 (decode_address_to_semicolon, decode_address, decode_m_packet)
5995 (decode_M_packet, decode_X_packet, decode_xfer_write)
5996 (decode_search_memory_packet, unhexify, hexify)
5997 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5998 (look_up_one_symbol, relocate_instruction)
5999 (monitor_output): Move to remote-utils.h, and include it.
6000 * remote-utils.h: New file.
6001
eebdf26b
PA
60022013-09-05 Pedro Alves <palves@redhat.com>
6003
6004 * server.h (_): Delete.
6005
3aafd2ff
PA
60062013-09-02 Pedro Alves <palves@redhat.com>
6007
6008 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6009 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6010 allocated.
6011 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6012
cee83bcb
PM
60132013-09-02 Pierre Muller <muller@sourceware.org>
6014
6015 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6016 or WriteProcessMemory complete successfully and handle
6017 ERROR_PARTIAL_COPY error.
6018
9a13b2fa
PA
60192013-09-02 Pedro Alves <palves@redhat.com>
6020
6021 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6022 error instead of EIO.
6023
602e3198
JK
60242013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6025
6026 PR server/15604
6027 * linux-low.c: Include filestuff.h.
6028 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6029 * lynx-low.c: Include filestuff.h.
6030 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6031 * server.c: Include filestuff.h.
6032 (main): Call notice_open_fds.
6033 * spu-low.c: Include filestuff.h.
6034 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6035
96d7229d
LM
60362013-08-22 Luis Machado <lgustavo@codesourcery.com>
6037
6038 * Makefile.in: Explain why ../target and ../nat are not
6039 listed as include file search paths.
6040 (linux-waitpid.o): New object file rule.
6041 * configure.srv (srv_native_linux_obj): New variable.
6042 Replace all occurrences of linux native object files with
6043 $srv_native_linux_obj.
6044 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6045 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6046 (linux_enable_event_reporting): Remove declaration.
6047 (my_waitpid): Moved to common/linux-waitpid.c.
6048 (linux_wait_for_event): Pass ptid when calling
6049 linux_enable_event_reporting.
6050 (linux_supports_tracefork_flag): Remove.
6051 (linux_enable_event_reporting): Likewise.
6052 (linux_tracefork_grandchild): Remove.
6053 (STACK_SIZE): Moved to common/linux-ptrace.c.
6054 (linux_tracefork_child): Remove.
6055 (linux_test_for_tracefork): Remove.
6056 (linux_look_up_symbols): Call linux_supports_traceclone.
6057 (initialize_low): Remove call to linux_test_for_tracefork.
6058 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6059 common/linux-ptrace.h.
6060 (PTRACE_TYPE_ARG4): Likewise.
6061 Include linux-ptrace.h.
6062
32940073
PA
60632013-08-21 Pedro Alves <palves@redhat.com>
6064
6065 * config.in: Renegerate.
6066
33b60d58 60672013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6068
33b60d58
LM
6069 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6070 (SFILES): Remove $(srcdir)/common/target-common.c and
6071 add $(srcdir)/target/waitstatus.c.
6072 (OBS): Remove target-common.o and add waitstatus.o.
6073 (server_h): Remove $(srcdir)/../common/target-common.h and
6074 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6075 and $(srcdir)/../target/waitstatus.h.
6076 (target-common.o): Remove.
6077 (waitstatus.o): New target object file.
6078 * target.h: Do not include target-common.h and
6079 include target/resume.h, target/wait.h and
6080 target/waitstatus.h.
6081
b8e1b30e
LM
60822013-08-13 Luis Machado <lgustavo@codesourcery.com>
6083
6084 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6085 to PTRACE_TYPE_ARG3.
6086 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6087 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6088 PTRACE_TYPE_ARG4.
6089 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6090 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6091
7a60ad40
YQ
60922013-07-27 Jie Zhang <jie@codesourcery.com>
6093 Daniel Jacobowitz <dan@codesourcery.com>
6094 Yao Qi <yao@codesourcery.com>
6095
6096 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6097 (mips-linux-watch.o): New rule.
6098 (mips_linux_watch_h): New variable.
6099 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6100 srv_tgtobj.
6101 * linux-mips-low.c: Include mips-linux-watch.h.
6102 (struct arch_process_info, struct arch_lwp_info): New.
6103 (update_watch_registers_callback): New function.
6104 (mips_linux_new_process, mips_linux_new_thread) New functions.
6105 (mips_linux_prepare_to_resume, mips_insert_point): New
6106 functions.
6107 (mips_remove_point, mips_stopped_by_watchpoint): New
6108 functions.
6109 (rsp_bp_type_to_target_hw_bp_type): New function.
6110 (mips_stopped_data_address): New function.
6111 (the_low_target): Add watchpoint support functions.
6112
de6f69ad
YQ
61132013-07-27 Yao Qi <yao@codesourcery.com>
6114
6115 * i386-low.c: Include break-common.h.
6116 (enum target_hw_bp_type): Remove.
6117
3360c0bf
LM
61182013-07-24 Luis Machado <lgustavo@codesourcery.com>
6119
6120 * Makefile.in (SFILES): /common/target-common.c.
6121 (OBS): Add target-common.o.
6122 (server_h): Add $(srcdir)/../common/target-common.h.
6123 (target-common.o): New target.
6124 * server.c (queue_stop_reply_callback): Free
6125 status string after use.
6126 * target.c (target_waitstatus_to_string): Remove.
6127 * target.h: Include target-common.h.
6128 (resume_kind): Likewise.
6129 (target_waitkind): Likewise.
6130 (target_waitstatus): Likewise.
6131 (TARGET_WNOHANG): Likewise.
6132
bd885420
YQ
61332013-07-04 Yao Qi <yao@codesourcery.com>
6134
6135 * Makefile.in (host_alias): Use @host_noncanonical@.
6136 (target_alias): Use @target_noncanonical@.
6137 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6138 ACX_NONCANONICAL_HOST.
6139 * configure: Regenerated.
6140
6141 Revert:
6142 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6143
6144 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6145 * configure: Rebuild.
6146 * Makefile.in (version_host, version_target): Get from configure.
6147 (version.c): Use $(version_host) and $(version_target).
6148
17ef446e
PA
61492013-07-03 Pedro Alves <palves@redhat.com>
6150
6151 * Makefile.in (config.status): Depend on development.sh.
6152 * acinclude.m4: Include libmcheck.m4.
6153 * configure: Regenerate.
6154
7a9a7487
MG
61552013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6156
6157 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6158 attribute inside the parentheses.
6159 (winapi_DebugSetProcessKillOnExit): Ditto.
6160 (winapi_DebugBreakProcess): Ditto.
6161 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 6162
49b64de6
MG
61632013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6164
6165 * notif.h (notif_event): Add a dummy member to avoid compiler
6166 errors.
6167
d5749ee7
PA
61682013-07-01 Pedro Alves <palves@redhat.com>
6169
6170 * hostio.c (HOSTIO_PATH_MAX): Define.
6171 (require_filename, handle_open, handle_unlink, handle_readlink):
6172 Use it.
6173
d8d2a3ee
PA
61742013-07-01 Pedro Alves <palves@redhat.com>
6175
6176 * server.h: Include "pathmax.h".
6177 * linux-low.c: Don't include sys/param.h.
6178 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6179 MAXPATHLEN.
6180 * win32-low.c: Don't include sys/param.h.
6181 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6182
bc7dea8d
PA
61832013-07-01 Pedro Alves <palves@redhat.com>
6184
6185 * event-loop.c: Don't check HAVE_UNISTD_H before including
6186 <unistd.h>.
6187 * gdbreplay.c: Likewise.
6188 * remote-utils.c: Likewise.
6189 * server.c: Likewise.
6190 * configure.ac: Don't check for unistd.h.
6191 * configure: Regenerate.
6192
d6c2da54
TT
61932013-06-28 Tom Tromey <tromey@redhat.com>
6194
6195 * Makefile.in (version.c): Use version.in, not
6196 common/version.in.
6197
257b6bec
MG
61982013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6199
6200 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6201 * configure: Rebuild.
6202 * Makefile.in (version_host, version_target): Get from configure.
6203 (version.c): Use $(version_host) and $(version_target).
6204
86ebe149
DK
62052013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6206
6207 Fix trace-status to output user name without trailing colon.
6208 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6209
f30aa5af
DK
62102013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6211
6212 Fix trace-status to output proper start-time and stop-time.
6213 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6214 output start time and stop time in hex as gdb expects.
6215
28a93511
YQ
62162013-06-26 Pedro Alves <pedro@codesourcery.com>
6217
6218 * tracepoint.c (build_traceframe_info_xml): Output trace state
6219 variables present in the trace buffer.
6220
01208463
TT
62212013-06-24 Tom Tromey <tromey@redhat.com>
6222
6223 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6224 create-version.sh.
6225 (version.o): Remove.
6226 * gdbreplay.c: Include version.h.
6227 (version, host_name): Don't declare.
6228 * server.h: Include version.h.
6229 (version, host_name): Don't declare.
6230
760256f9
PA
62312013-06-12 Pedro Alves <palves@redhat.com>
6232
6233 * linux-x86-low.c (linux_is_elf64): Delete global.
6234 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6235 with local linux_pid_exe_is_elf_64_file use.
6236
030031ee
PA
62372013-06-11 Pedro Alves <palves@redhat.com>
6238
6239 * linux-low.c (regset_disabled, disable_regset): New functions.
6240 (regsets_fetch_inferior_registers)
6241 (regsets_store_inferior_registers): Use them.
6242 (initialize_regsets_info); Don't allocate the disabled_regsets
6243 array here.
6244 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6245 comment.
6246
5da6eb0a
PA
62472013-06-11 Pedro Alves <palves@redhat.com>
6248
6249 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6250 xmalloc.
6251
7e5aaa09
PA
62522013-06-11 Pedro Alves <palves@redhat.com>
6253
6254 * linux-x86-low.c (initialize_low_arch): Call
6255 init_registers_x32_avx_linux.
6256
d878444c
JK
62572013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6258
6259 Fix compatibility with Android Bionic.
6260 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6261 it is not empty.
6262
3aee8918
PA
62632013-06-07 Pedro Alves <palves@redhat.com>
6264
5f2b57b5 6265 PR server/14823
3aee8918
PA
6266 * Makefile.in (OBS): Add tdesc.o.
6267 (IPA_OBJS): Add tdesc-ipa.o.
6268 (tdesc-ipa.o): New rule.
6269 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6270 interface.
6271 * linux-low.c (new_inferior): Delete.
6272 (disabled_regsets, num_regsets): Delete.
6273 (linux_add_process): Adjust to set the new per-process
6274 new_inferior flag.
6275 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6276 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6277 was a stop. When calling arch_setup, switch the current inferior
6278 to the thread that got an event.
6279 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6280 (regsets_fetch_inferior_registers)
6281 (regsets_store_inferior_registers): New regsets_info parameter.
6282 Adjust to use it.
6283 (linux_register_in_regsets): New regs_info parameter. Adjust to
6284 use it.
6285 (register_addr, fetch_register, store_register): New usrregs_info
6286 parameter. Adjust to use it.
6287 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6288 parameter regs_info. Adjust to use it.
6289 (linux_fetch_registers): Get the current inferior's regs_info, and
6290 adjust to use it.
6291 (linux_store_registers): Ditto.
6292 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6293 (initialize_low): Don't initialize the target_regsets here. Call
6294 initialize_low_arch.
6295 * linux-low.h (target_regsets): Delete declaration.
6296 (struct regsets_info): New.
6297 (struct usrregs_info): New.
6298 (struct regs_info): New.
6299 (struct process_info_private) <new_inferior>: New field.
6300 (struct linux_target_ops): Delete the num_regs, regmap, and
6301 regset_bitmap fields. New field regs_info.
6302 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6303 * i387-fp.c (num_xmm_registers): Delete.
6304 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6305 calls to new interface.
6306 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6307 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6308 Infer the number of xmm registers from the regcache's target
6309 description.
6310 * i387-fp.h (num_xmm_registers): Delete.
6311 * inferiors.c (add_thread): Don't install the thread's regcache
6312 here.
6313 * proc-service.c (gregset_info): Fetch the current inferior's
6314 regs_info. Adjust to use it.
6315 * regcache.c: Include tdesc.h.
6316 (register_bytes, reg_defs, num_registers)
6317 (gdbserver_expedite_regs): Delete.
6318 (get_thread_regcache): If the thread doesn't have a regcache yet,
6319 create one, instead of aborting gdbserver.
6320 (regcache_invalidate_one): Rename to ...
6321 (regcache_invalidate_thread): ... this.
6322 (regcache_invalidate_one): New.
6323 (regcache_invalidate): Only invalidate registers of the current
6324 process.
6325 (init_register_cache): Add target_desc parameter, and use it.
6326 (new_register_cache): Ditto. Assert the target description has a
6327 non zero registers_size.
6328 (regcache_cpy): Add assertions. Adjust.
6329 (realloc_register_cache, set_register_cache): Delete.
6330 (registers_to_string, registers_from_string): Adjust.
6331 (find_register_by_name, find_regno, find_register_by_number)
6332 (register_cache_size): Add target_desc parameter, and use it.
6333 (free_register_cache_thread, free_register_cache_thread_one)
6334 (regcache_release, register_cache_size): New.
6335 (register_size): Add target_desc parameter, and use it.
6336 (register_data, supply_register, supply_register_zeroed)
6337 (supply_regblock, supply_register_by_name, collect_register)
6338 (collect_register_as_string, collect_register_by_name): Adjust.
6339 * regcache.h (struct target_desc): Forward declare.
6340 (struct regcache) <tdesc>: New field.
6341 (init_register_cache, new_register_cache): Add target_desc
6342 parameter.
6343 (regcache_invalidate_thread): Declare.
6344 (regcache_invalidate_one): Delete declaration.
6345 (regcache_release): Declare.
6346 (find_register_by_number, register_cache_size, register_size)
6347 (find_regno): Add target_desc parameter.
6348 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6349 declarations.
6350 * remote-utils.c: Include tdesc.h.
6351 (outreg, prepare_resume_reply): Adjust.
6352 * server.c: Include tdesc.h.
6353 (gdbserver_xmltarget): Delete declaration.
6354 (get_features_xml, process_serial_event): Adjust.
6355 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6356 declare.
6357 (struct process_info) <tdesc>: New field.
6358 (ipa_tdesc): Declare.
6359 * tdesc.c: New file.
6360 * tdesc.h: New file.
6361 * tracepoint.c: Include tdesc.h.
6362 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6363 (get_context_regcache): Adjust to pass ipa_tdesc down.
6364 (do_action_at_tracepoint): Adjust to get the register cache size
6365 from the context regcache's description.
6366 (traceframe_walk_blocks): Adjust to get the register cache size
6367 from the current trace frame's description.
6368 (traceframe_get_pc): Adjust to get current trace frame's
6369 description and pass it down.
6370 (gdb_collect): Adjust to get the register cache size from the
6371 IPA's description.
6372 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6373 (gdbserver_xmltarget): Delete.
6374 (initialize_low_tracepoint): Set the ipa's target description.
6375 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6376 (initialize_low_tracepoint): Set the ipa's target description.
6377 * linux-x86-low.c: Include tdesc.h.
6378 [__x86_64__] (is_64bit_tdesc): New.
6379 (ps_get_thread_area, x86_get_thread_area): Use it.
6380 (i386_cannot_store_register): Rename to ...
6381 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6382 (i386_cannot_fetch_register): Rename to ...
6383 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6384 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6385 to new interface.
6386 (target_regsets): Rename to ...
6387 (x86_regsets): ... this.
6388 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6389 interface.
6390 (x86_siginfo_fixup): Use is_64bit_tdesc.
6391 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6392 (tdesc_x32_avx_linux, tdesc_x32_linux)
6393 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6394 Declare.
6395 (x86_linux_update_xmltarget): Delete.
6396 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6397 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6398 (AMD64_LINUX_USER64_CS): New.
6399 (x86_linux_read_description): New, based on
6400 x86_linux_update_xmltarget.
6401 (same_process_callback): New.
6402 (x86_arch_setup_process_callback): New.
6403 (x86_linux_update_xmltarget): New.
6404 (x86_regsets_info): New.
6405 (amd64_linux_regs_info): New.
6406 (i386_linux_usrregs_info): New.
6407 (i386_linux_regs_info): New.
6408 (x86_linux_regs_info): New.
6409 (x86_arch_setup): Reimplement.
6410 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6411 (x86_emit_ops): Ditto.
6412 (the_low_target): Adjust. Install x86_linux_regs_info,
6413 x86_cannot_fetch_register, and x86_cannot_store_register.
6414 (initialize_low_arch): New.
6415 * linux-ia64-low.c (tdesc_ia64): Declare.
6416 (ia64_fetch_register): Adjust.
6417 (ia64_usrregs_info, regs_info): New globals.
6418 (ia64_regs_info): New function.
6419 (the_low_target): Adjust.
6420 (initialize_low_arch): New function.
6421 * linux-sparc-low.c (tdesc_sparc64): Declare.
6422 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6423 Adjust.
6424 (sparc_arch_setup): New function.
6425 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6426 (the_low_target): Adjust.
6427 (initialize_low_arch): New function.
6428 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6429 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6430 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6431 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6432 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6433 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6434 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6435 (tdesc_powerpc_isa205_vsx64l): Declare.
6436 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6437 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6438 (ppc_set_pc, ppc_get_hwcap): Adjust.
6439 (ppc_usrregs_info): Forward declare.
6440 (!__powerpc64__) ppc_regmap_adjusted: New global.
6441 (ppc_arch_setup): Adjust to the current process'es target
6442 description.
6443 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6444 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6445 (ppc_store_evrregset): Adjust.
6446 (target_regsets): Rename to ...
6447 (ppc_regsets): ... this, and make static.
6448 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6449 (ppc_regs_info): New function.
6450 (the_low_target): Adjust.
6451 (initialize_low_arch): New function.
6452 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6453 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6454 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6455 (tdesc_s390x_linux64v2): Declare.
6456 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6457 (s390_fill_gregset, s390_store_last_break): Adjust.
6458 (target_regsets): Rename to ...
6459 (s390_regsets): ... this, and make static.
6460 (s390_get_pc, s390_set_pc): Adjust.
6461 (s390_get_hwcap): New target_desc parameter, and use it.
6462 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6463 (s390_arch_setup): Adjust to set the current process'es target
6464 description. Don't adjust the regmap.
6465 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6466 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6467 (regs_info_3264): New globals.
6468 (s390_regs_info): New function.
6469 (the_low_target): Adjust.
6470 (initialize_low_arch): New function.
6471 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6472 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6473 [__mips64] (init_registers_mips_linux)
6474 (init_registers_mips_dsp_linux): Delete defines.
6475 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6476 (have_dsp): New global.
6477 (mips_read_description): New, based on mips_arch_setup.
6478 (mips_arch_setup): Reimplement.
6479 (get_usrregs_info): New function.
6480 (mips_cannot_fetch_register, mips_cannot_store_register)
6481 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6482 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6483 (target_regsets): Rename to ...
6484 (mips_regsets): ... this, and make static.
6485 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6486 (dsp_regs_info, regs_info): New globals.
6487 (mips_regs_info): New function.
6488 (the_low_target): Adjust.
6489 (initialize_low_arch): New function.
6490 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6491 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6492 Declare.
6493 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6494 (arm_read_description): New, with bits factored from
6495 arm_arch_setup.
6496 (arm_arch_setup): Reimplement.
6497 (target_regsets): Rename to ...
6498 (arm_regsets): ... this, and make static.
6499 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6500 (arm_regs_info): New function.
6501 (the_low_target): Adjust.
6502 (initialize_low_arch): New function.
6503 * linux-m68k-low.c (tdesc_m68k): Declare.
6504 (target_regsets): Rename to ...
6505 (m68k_regsets): ... this, and make static.
6506 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6507 (m68k_regs_info): New function.
6508 (m68k_arch_setup): New function.
6509 (the_low_target): Adjust.
6510 (initialize_low_arch): New function.
6511 * linux-sh-low.c (tdesc_sharch): Declare.
6512 (target_regsets): Rename to ...
6513 (sh_regsets): ... this, and make static.
6514 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6515 (sh_regs_info, sh_arch_setup): New functions.
6516 (the_low_target): Adjust.
6517 (initialize_low_arch): New function.
6518 * linux-bfin-low.c (tdesc_bfin): Declare.
6519 (bfin_arch_setup): New function.
6520 (bfin_usrregs_info, regs_info): New globals.
6521 (bfin_regs_info): New function.
6522 (the_low_target): Adjust.
6523 (initialize_low_arch): New function.
6524 * linux-cris-low.c (tdesc_cris): Declare.
6525 (cris_arch_setup): New function.
6526 (cris_usrregs_info, regs_info): New globals.
6527 (cris_regs_info): New function.
6528 (the_low_target): Adjust.
6529 (initialize_low_arch): New function.
6530 * linux-cris-low.c (tdesc_crisv32): Declare.
6531 (cris_arch_setup): New function.
6532 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6533 (cris_regs_info): New function.
6534 (the_low_target): Adjust.
6535 (initialize_low_arch): New function.
6536 * linux-m32r-low.c (tdesc_m32r): Declare.
6537 (m32r_arch_setup): New function.
6538 (m32r_usrregs_info, regs_info): New globals.
6539 (m32r_regs_info): Adjust.
6540 (initialize_low_arch): New function.
6541 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6542 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6543 (tic6x_usrregs_info): Forward declare.
6544 (tic6x_read_description): New function, based on ...
6545 (tic6x_arch_setup): ... this. Reimplement.
6546 (target_regsets): Rename to ...
6547 (tic6x_regsets): ... this, and make static.
6548 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6549 (tic6x_regs_info): New function.
6550 (the_low_target): Adjust.
6551 (initialize_low_arch): New function.
6552 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6553 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6554 (target_regsets): Rename to ...
6555 (xtensa_regsets): ... this, and make static.
6556 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6557 globals.
6558 (xtensa_arch_setup, xtensa_regs_info): New functions.
6559 (the_low_target): Adjust.
6560 (initialize_low_arch): New function.
6561 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6562 (nios2_arch_setup): Set the current process'es tdesc.
6563 (target_regsets): Rename to ...
6564 (nios2_regsets): ... this.
6565 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6566 (nios2_regs_info): New function.
6567 (the_low_target): Adjust.
6568 (initialize_low_arch): New function.
a261b8f5
PA
6569 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6570 (aarch64_arch_setup): Set the current process'es tdesc.
6571 (target_regsets): Rename to ...
6572 (aarch64_regsets): ... this.
6573 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6574 (aarch64_regs_info): New function.
6575 (the_low_target): Adjust.
6576 (initialize_low_arch): New function.
3aee8918
PA
6577 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6578 globals.
6579 (target_regsets): Rename to ...
6580 (tile_regsets): ... this.
6581 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6582 (tile_regs_info): New function.
6583 (tile_arch_setup): Set the current process'es tdesc.
6584 (the_low_target): Adjust.
6585 (initialize_low_arch): New function.
6586 * spu-low.c (tdesc_spu): Declare.
6587 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6588 * win32-arm-low.c (tdesc_arm): Declare.
6589 (arm_arch_setup): New function.
6590 (the_low_target): Install arm_arch_setup instead of
6591 init_registers_arm.
6592 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6593 (init_windows_x86): Rename to ...
6594 (i386_arch_setup): ... this. Set `win32_tdesc'.
6595 (the_low_target): Adjust.
6596 * win32-low.c (win32_tdesc): New global.
6597 (child_add_thread): Don't create the thread cache here.
6598 (do_initial_child_stuff): Set the new process'es tdesc.
6599 * win32-low.h (struct target_desc): Forward declare.
6600 (win32_tdesc): Declare.
6601 * lynx-i386-low.c (tdesc_i386): Declare global.
6602 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6603 * lynx-low.c (lynx_tdesc): New global.
6604 (lynx_add_process): Set the new process'es tdesc.
6605 * lynx-low.h (struct target_desc): Forward declare.
6606 (lynx_tdesc): Declare global.
6607 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6608 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6609 * nto-low.c (nto_tdesc): New global.
6610 (do_attach): Set the new process'es tdesc.
6611 * nto-low.h (struct target_desc): Forward declare.
6612 (nto_tdesc): Declare.
6613 * nto-x86-low.c (tdesc_i386): Declare.
6614 (nto_x86_arch_setup): Set `nto_tdesc'.
6615
b1fbec62
GB
66162013-06-04 Gary Benson <gbenson@redhat.com>
6617
6618 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6619 to qSupported response when appropriate.
6620 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6621 with nonzero-length annex.
6622 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6623 arguments supplied in annex.
6624
d1ec4ce7
DE
66252013-05-31 Doug Evans <dje@google.com>
6626
ac44adcb 6627 PR server/15594
d1ec4ce7
DE
6628 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6629 64 bits in 64-cross-32 environment.
6630
9b25f2d3
PA
66312013-05-28 Pedro Alves <palves@redhat.com>
6632
6633 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6634 (aarch64-without-fpu.c): Delete rule.
6635 * configure.srv (aarch64*-*-linux*): Remove references to
6636 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6637 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6638 declaration.
6639
6740dc9c
PA
66402013-05-24 Pedro Alves <palves@redhat.com>
6641
6642 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6643 instead of strchr/decode_address. Error if the range isn't split
6644 with a ','. Don't assume there's be a ':' in the action.
6645
c2d6af84
PA
66462013-05-23 Yao Qi <yao@codesourcery.com>
6647 Pedro Alves <palves@redhat.com>
6648
6649 * linux-low.c (lwp_in_step_range): New function.
6650 (linux_wait_1): If the thread was range stepping and stopped
6651 outside the stepping range, report the stop to GDB. Otherwise,
6652 continue stepping. Add range stepping debug output.
6653 (linux_set_resume_request): Copy the step range from the resume
6654 request to the lwp.
6655 (linux_supports_range_stepping): New.
6656 (linux_target_ops) <supports_range_stepping>: Set to
6657 linux_supports_range_stepping.
6658 * linux-low.h (struct linux_target_ops)
6659 <supports_range_stepping>: New field.
6660 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6661 * linux-x86-low.c (x86_supports_range_stepping): New.
6662 (the_low_target) <supports_range_stepping>: Set to
6663 x86_supports_range_stepping.
6664 * server.c (handle_v_cont): Handle 'r' action.
6665 (handle_v_requests): Append ";r" if the target supports range
6666 stepping.
6667 * target.h (struct thread_resume) <step_range_start,
6668 step_range_end>: New fields.
6669 (struct target_ops) <supports_range_stepping>:
6670 New field.
6671 (target_supports_range_stepping): New macro.
6672
58794e1a
JB
66732013-05-17 Joel Brobecker <brobecker@adacore.com>
6674
6675 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6676 confusion in comment.
6677
d631c5a7
JB
66782013-05-17 Joel Brobecker <brobecker@adacore.com>
6679
6680 * lynx-low.c (struct process_info_private): New type.
6681 (lynx_add_process): New function.
6682 (lynx_create_inferior, lynx_attach): Replace calls to
6683 add_process by calls to lynx_add_process.
6684 (lynx_resume): If PTID is null, then try using
6685 current_process()->private->last_wait_event_ptid.
6686 Add comments.
6687 (lynx_clear_inferiors): Delete. The contents of that function
6688 has been inlined in lynx_mourn;
6689 (lynx_wait_1): Save the ptid in the process's private data.
6690 (lynx_mourn): Free the process' private data. Replace call
6691 to lynx_clear_inferiors by call to clear_inferiors.
6692
96f7a20f
YQ
66932013-05-17 Yao Qi <yao@codesourcery.com>
6694
6695 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6696 the right place.
6697
db0dfaa0
LM
66982013-05-16 Luis Machado <lgustavo@codesourcery.com>
6699
6700 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6701 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6702 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6703 PT_TEXT_END_ADDR guards. Update comments.
6704 (linux_target_op) <read_offsets>: Conditionally define to
6705 linux_read_offsets if the target is UCLIBC and if it defines
6706 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6707
68f5f838
SL
67082013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6709 Andrew Jenner <andrew@codesourcery.com>
6710
6711 * Makefile.in (SFILES): Add linux-nios2-low.c.
6712 (clean): Add action to delete nios2-linux.c.
6713 (nios2-linux.c): New rule.
6714 * configure.srv: Add nios2*-*-linux*.
6715 * linux-nios2-low.c: New.
6716
1ebff1fd
HAQ
67172013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6718
6719 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6720
f6150862
HZ
67212013-04-25 Hui Zhu <hui@codesourcery.com>
6722
6723 PR gdb/15186
f6150862
HZ
6724 * ax.c (ax_printf): Add fflush.
6725
614c279d
TT
67262013-04-22 Tom Tromey <tromey@redhat.com>
6727
6728 * Makefile.in (SFILES): Add filestuff.c.
6729 (OBS): Add filestuff.o.
6730 (filestuff.o): New target.
6731 * config.in, configure: Rebuild.
6732 * configure.ac: Check for fdwalk, pipe2.
6733
7d4e5717
PA
67342013-04-17 Pedro Alves <palves@redhat.com>
6735
6736 * configure.ac (USE_THREAD_DB): Delete variable.
6737 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6738 Don't AC_SUBST USE_THREAD_DB.
6739 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6740 * config.in, configure: Regenerate.
6741
d5c93e41
PA
67422013-04-16 Pedro Alves <palves@redhat.com>
6743
6744 * linux-low.h (struct lwp_info) <thread_known>: Move under
6745 the USE_THREAD_DB #ifdef.
6746
04f5fe89
PA
67472013-04-16 Pedro Alves <palves@redhat.com>
6748
6749 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6750 (linux-low.o): Delete rule.
6751 * linux-low.h: Always include "gdb_thread_db.h" instead of
6752 conditionally including thread_db.h.
6753 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6754 HAVE_THREAD_DB_H.
6755
480b27bf
JK
67562013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6757
6758 * Makefile.in (install-only): Fix make install regression.
6759
43662968
JK
67602013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6761
6762 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6763 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6764 installation.
6765 * gdbserver.1: Remove.
6766
3e74e146
PA
67672013-03-22 Pedro Alves <palves@redhat.com>
6768
6769 * linux-low.c (handle_extended_wait): Don't call
6770 linux_enable_event_reporting.
6771
a8347a2a
TT
67722013-03-15 Tony Theodore <tonyt@logyst.com>
6773
6774 PR build/9098:
6775 * Makefile.in (SHELL): Use @SHELL@.
6776
eeb56fa7
SDJ
67772013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6778
6779 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6780 compiler warning.
6781
4fa7e2ff
JB
67822013-03-13 Joel Brobecker <brobecker@adacore.com>
6783
6784 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6785 Remove extraneous NULL element.
6786
8ddb1965
YQ
67872013-03-13 Yao Qi <yao@codesourcery.com>
6788
6789 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6790 'V' block in trace frame.
6791
9accd112
MM
67922013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6793
6794 * target.h (struct target_ops): Add btrace ops.
6795 (target_supports_btrace): New macro.
6796 (target_enable_btrace): New macro.
6797 (target_disable_btrace): New macro.
6798 (target_read_btrace): New macro.
6799 * gdbthread.h (struct thread_info): Add btrace field.
6800 * server.c: Include btrace-common.h.
6801 (handle_btrace_general_set): New function.
6802 (handle_btrace_enable): New function.
6803 (handle_btrace_disable): New function.
6804 (handle_general_set): Call handle_btrace_general_set.
6805 (handle_qxfer_btrace): New function.
6806 (struct qxfer qxfer_packets[]): Add btrace entry.
6807 * inferiors.c (remove_thread): Disable btrace.
6808 * linux-low: Include linux-btrace.h.
6809 (linux_low_enable_btrace): New function.
6810 (linux_low_read_btrace): New function.
6811 (linux_target_ops): Add btrace ops.
6812 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6813 Add srv_linux_btrace=yes.
6814 (x86_64-*-linux*): Add linux-btrace.o.
6815 Add srv_linux_btrace=yes.
6816 * configure.ac: Define HAVE_LINUX_BTRACE.
6817 * config.in: Regenerated.
6818 * configure: Regenerated.
6819
5cc22e4c
MM
68202013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6821
6822 * server.c (handle_qxfer): Preserve error message if -3 is
6823 returned.
6824 (qxfer): Document the -3 return value.
6825
7c97f91e
MM
68262013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6827
6828 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6829 (linux_btrace_h): New variable.
6830 (linux-btrace.o): New rule.
6831
be9a119c 68322013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
6833 Hafiz Abid Qadeer <abidh@codesourcery.com>
6834
6835 * tracepoint.c (trace_buffer_size): New global.
6836 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6837 (init_trace_buffer): Change to one-argument function. Allocate
6838 trace buffer memory.
6839 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6840 handle QTBuffer:size packet.
6841 (cmd_bigqtbuffer_size): New function.
6842 (initialize_tracepoint): Call init_trace_buffer with
6843 DEFAULT_TRACE_BUFFER_SIZE.
6844 * server.c (handle_query): Add QTBuffer:size in the
6845 supported packets.
6846
e64f7499
YQ
68472013-03-07 Yao Qi <yao@codesourcery.com>
6848
6849 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6850 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6851 of -1.
6852 (cmd_qtsp): Adjust condition. Do post increment.
6853 Set cur_action and cur_step_action back to 0.
6854
f0ae6fc3
PA
68552013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6856
6857 PR server/15236
6858 * linux-low.c (linux_write_memory): Return early success if LEN is
6859 zero.
6860
b5b0b0af
CV
68612013-03-05 Corinna Vinschen <vinschen@redhat.de>
6862
334ad4a8 6863 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 6864
589bc927
TT
68652013-02-28 Tom Tromey <tromey@redhat.com>
6866
6867 * configure.ac: Invoke AC_SYS_LARGEFILE.
6868 * configure, config.in: Rebuild.
6869
dfe07582
CV
68702013-02-28 Corinna Vinschen <vinschen@redhat.com>
6871
6872 * win32-low.c: Throughout, fix format strings and casts of
6873 printf-like functions to avoid type related warnings on all
6874 platforms.
6875 (get_child_debug_event): Print dwDebugEventCode as hex since
6876 that's how it's usually documented.
6877
736cd585
YQ
68782013-02-28 Yao Qi <yao@codesourcery.com>
6879
6880 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6881 pulongest.
6882
e1f58301
JW
68832013-02-27 Jiong Wang <jiwang@tilera.com>
6884
6885 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6886 (reg-tilegx32.c): New rule.
6887 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6888 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6889 different register info initializer according to elf class.
6890 (init_registers_tilgx32): New function. The tilegx32 register info
6891 initializer.
6892 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6893 (tile_store_gregset): Likewise.
6894
d171ca78
YQ
68952013-02-27 Yao Qi <yao@codesourcery.com>
6896
6897 * server.c (process_point_options): Print debug message when
6898 debug_threads is true.
6899
282bbdf3
YQ
69002013-02-26 Yao Qi <yao@codesourcery.com>
6901
6902 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6903
aca22551
PA
69042013-02-19 Pedro Alves <palves@redhat.com>
6905 Kai Tietz <ktietz@redhat.com>
6906
6907 PR gdb/15161
6908
6909 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6910 instead of strtoul to extract address from packet.
6911 (process_serial_event) <'z'>: Likewise.
6912
4f3cee1c
YQ
69132013-02-18 Yao Qi <yao@codesourcery.com>
6914
6915 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6916
8e1d55a3
PA
69172013-02-14 Pedro Alves <palves@redhat.com>
6918
6919 Plug memory leak.
6920
6921 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6922 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6923
458820da
PA
69242013-02-14 Pedro Alves <palves@redhat.com>
6925
6926 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6927
baea0dae
PA
69282013-02-14 Pedro Alves <palves@redhat.com>
6929
6930 * tracepoint.c (save_string): Delete.
6931 (add_tracepoint_action): Use savestring instead of save_string.
6932
0b1afbb3
PA
69332013-02-12 Pedro Alves <palves@redhat.com>
6934
6935 * linux-xtensa-low.c: Ditto.
6936 * xtensa-xtregs.c: Ditto.
6937
8a4ac37e
PA
69382013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6939
6940 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6941 thread_db.
6942
148de6bb
MS
69432013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6944
6945 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6946 aarch64_num_wp_regs and aarch64_num_bp_regs to
6947 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6948
55fac6e0
MS
69492013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6950
6951 * linux-aarch64-low.c (ps_get_thread_area): Replace
6952 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6953
176eb98c
MS
69542013-02-04 Jim MacArthur <jim.macarthur@arm.com>
6955 Marcus Shawcroft <marcus.shawcroft@arm.com>
6956 Nigel Stephens <nigel.stephens@arm.com>
6957 Yufeng Zhang <yufeng.zhang@arm.com>
6958
6959 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6960 (aarch64.c, aarch64-without-fpu.c): New targets.
6961 * configure.srv (aarch64*-*-linux*): New.
6962 * linux-aarch64-low.c: New file.
6963
56f7af9c
MS
69642013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
6965
43aaf8b6 6966 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
6967 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6968 (dequeue_one_deferred_signal, linux_resume_one_thread)
6969 (fetch_register, linux_write_memory, linux_enable_event_reporting)
6970 (linux_tracefork_grandchild, linux_test_for_tracefork)
6971 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6972 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6973 where the argument is 0.
6974
60f662b0
YQ
69752013-01-25 Yao Qi <yao@codesourcery.com>
6976
6977 * event-loop.c: Include "queue.h".
6978 (gdb_event_p): New typedef.
6979 (struct gdb_event) <next_event>: Remove.
6980 (event_queue): Change to QUEUE(gdb_event_p).
6981 (async_queue_event): Remove.
6982 (gdb_event_xfree): New.
6983 (initialize_event_loop): New.
6984 (process_event): Use API from QUEUE.
6985 (wait_for_event): Likewise.
6986 * server.c (main): Call initialize_event_loop.
6987 * server.h (initialize_event_loop): Declare.
6988
5ae4861a
YQ
69892013-01-18 Yao Qi <yao@codesourcery.com>
6990
6991 * ax.h (struct eval_agent_expr_context): New.
6992 (gdb_eval_agent_expr): Update declaration.
6993 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6994 TFRAME. Add new argument CTX.
6995 * server.h (struct eval_agent_expr_context): Declare.
6996 (agent_mem_read, agent_tsv_read): Update declaration.
6997 (agent_mem_read_string): Likewise.
6998 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6999 (add_traceframe_block): Add new argument TPOINT.
7000 Increase TPOINT->traceframe_usage.
7001 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7002 eval_tracepoint_agent_expr.
7003 (condition_true_at_tracepoint): Likewise.
7004 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7005 (agent_mem_read_string, agent_tsv_read): Likewise.
7006
85e00e85
YQ
70072013-01-16 Yao Qi <yao@codesourcery.com>
7008
7009 * linux-low.c (linux_resume_one_lwp): Don't check
7010 'lwp->bp_reinsert != 0'.
7011
4039cf45
JB
70122013-01-07 Joel Brobecker <brobecker@adacore.com>
7013 Pedro Alves <palves@redhat.com>
7014
7015 * lynx-low.c (ptrace_request_to_str): Define a temporary
7016 macro and use it to simplify this function's implementation.
7017
9044dee2
JB
70182013-01-07 Joel Brobecker <brobecker@adacore.com>
7019
7020 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7021 sets errno.
7022
e6352c8f
JB
70232013-01-07 Joel Brobecker <brobecker@adacore.com>
7024
7025 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7026
50681a27
JB
70272013-01-07 Joel Brobecker <brobecker@adacore.com>
7028
7029 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7030
3f6e77ef
JB
70312013-01-07 Joel Brobecker <brobecker@adacore.com>
7032
7033 * lynx-low.c (lynx_resume): Use the resume_info parameter
7034 to determine the ptid for the lynx_ptrace call, unless
7035 it is equal to minus_one_ptid, in which case we use the
7036 ptid of the current_inferior.
7037 (lynx_wait_1): After having received a thread create/exit
7038 event, resume the inferior's execution using the signaling
7039 thread's ptid, rather than the old ptid.
7040
7fda33ae
JB
70412013-01-07 Joel Brobecker <brobecker@adacore.com>
7042
7043 * lynx-low.c (lynx_resume): Delete variable ret.
7044
b9786c74
JB
70452013-01-01 Joel Brobecker <brobecker@adacore.com>
7046
7047 * gdbreplay.c (gdbreplay_version): Update copyright year.
7048 * server.c (gdbserver_version): Likewise.
7049
8b93d60f
JB
70502012-12-17 Joel Brobecker <brobecker@adacore.com>
7051
7052 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7053 new thread.
7054
037335a7
JB
70552012-12-17 Joel Brobecker <brobecker@adacore.com>
7056
7057 * lynx-low.c (ptrace_request_to_str): Add handling for
7058 PTRACE_GETTRACESIG.
7059
52d4cbd8
JB
70602012-12-17 Joel Brobecker <brobecker@adacore.com>
7061
7062 * lynx-low.c (lynx_attach): Delete variable new_process.
7063
ab8f6ca9
JB
70642012-12-17 Joel Brobecker <brobecker@adacore.com>
7065
7066 * lynx-low.c (lynx_create_inferior): Delete variable
7067 new_process.
7068
78cbc024
JB
70692012-12-17 Joel Brobecker <brobecker@adacore.com>
7070
7071 * lynx-low.c (ptrace_request_to_str): Do not handle
7072 PTRACE_GETTHREADLIST if this macro does not exist.
7073
14a00470
YQ
70742012-12-15 Yao Qi <yao@codesourcery.com>
7075
7076 * Makefile.in (OBS): Add notif.o.
7077 * notif.c, notif.h: New.
7078 * server.c: Include "notif.h".
7079 (struct vstop_notif) <next>: Remove.
7080 <base>: New field.
7081 (queue_stop_reply): Update.
7082 (push_event, send_next_stop_reply): Remove.
7083 (discard_queued_stop_replies): Update.
7084 (notif_stop): New variable.
7085 (handle_v_stopped): Remove.
7086 (handle_v_requests): Don't call handle_v_stopped. Call
7087 handle_ack_notif instead.
7088 (queue_stop_reply_callback): Call notif_event_enque instead
7089 of queue_stop_reply.
7090 (handle_status): Don't call send_next_stop_reply, call
7091 notif_write_event instead.
7092 (kill_inferior_callback): Likewise.
7093 (detach_or_kill_inferior_callback): Likewise.
7094 (main): Call initialize_notif.
7095 (process_serial_event): Call QUEUE_is_empty.
7096 (handle_target_event): Call notif_push instead of push event.
7097 * server.h (push_event): Remove declaration.
7098
61c125b9
TT
70992012-12-10 Tom Tromey <tromey@redhat.com>
7100
7101 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7102 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7103 macros.
7104 (.c.o): Rewrite.
7105 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7106 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7107 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7108 (amd64-linux-ipa.o, ax.o): Rewrite.
7109 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7110 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7111 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7112 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7113 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7114 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7115 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7116 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7117 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7118 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7119 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7120 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7121 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7122 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7123 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7124 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7125 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7126 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7127 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7128 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7129 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7130 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7131 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7132 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7133 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7134 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7135 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7136 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7137 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7138 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7139 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7140 (reg-tilegx.o): Remove.
7141 (all_object_files): New macro.
7142 Include .deps files.
7143 * aclocal.m4, configure: Rebuild.
7144 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7145 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7146 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7147
e90e9ad9
TT
71482012-12-05 Tom Tromey <tromey@redhat.com>
7149
7150 PR gdb/14917:
7151 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7152
02d403bf 71532012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
7154
7155 * configure.ac: Check for linux/perf_event.h.
7156 * config.in: Regenerated.
7157 * configure: Regenerated.
7158
0270a750
PA
71592012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7160
7161 * hostio.c (handle_readlink): Decrease buffer size
7162 parameter passed to readlink by one byte.
7163
8c29b58e
YQ
71642012-11-26 Yao Qi <yao@codesourcery.com>
7165
7166 * configure.ac (build_warnings): Append '-Wempty-body'.
7167 * configure: Regenerated.
7168 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7169 body.
7170
8bdce1ff
PM
71712012-11-15 Pierre Muller <muller@sourceware.org>
7172
7173 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7174 * config.in: Regenerate.
7175 * configure: Regenerate.
7176 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7177 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7178 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7179 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7180 header.
7181 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7182 instead of <sys/wait.h> header.
7183 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7184
02d403bf 71852012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
7186
7187 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7188 (various make rules): Remove -DGDBSERVER
7189
fbd5db48
YQ
71902012-11-09 Yao Qi <yao@codesourcery.com>
7191
7192 * spu-low.c (current_ptid): Move it to ..
7193 * gdbthread.h: ... here. New.
7194 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7195 * server.c (myresume, process_serial_event): Likewise.
7196 * thread-db.c (thread_db_find_new_threads): Likewise.
7197 * tracepoint.c (run_inferior_command): Likewise.
7198
b3dc46ff
AB
71992012-10-01 Andrew Burgess <aburgess@broadcom.com>
7200
7201 * server.c (handle_search_memory_1): Include access length in
7202 warning message.
7203
07c04788
HPN
72042012-09-05 Michael Brandt <michael.brandt@axis.com>
7205
7206 * linux-crisv32-low.c: Fix compile errors.
7207
918d227b
YQ
72082012-09-04 Yao Qi <yao@codesourcery.com>
7209
7210 * tracepoint.c (cmd_qtsv): Adjust debug message.
7211 Don't check CUR_TPOINT.
7212
18c1b81a
YQ
72132012-08-28 Yao Qi <yao@codesourcery.com>
7214
7215 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7216 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7217 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7218 Remove declarations of xmalloc, xreallloc, xstrdup and
7219 freeargv.
7220 * Makefile.in (libiberty_h): New.
7221 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7222 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7223
dc82f37b
YQ
72242012-08-23 Yao Qi <yao@codesourcery.com>
7225
7226 * server.h: Remove declaration of 'xsnprintf'.
7227
406b1477
KS
72282012-08-22 Keith Seitz <keiths@redhat.com>
7229
7230 * server.h: Include build-gnulib-gbserver/config.h.
7231 * gdbreplay.c: Likewise.
7232
e6712ff1
DE
72332012-08-08 Doug Evans <dje@google.com>
7234
7235 * Makefile.in (SFILES): Add gdb_vecs.c.
7236 (OBS): Add gdb_vecs.o.
7237 (gdb_vecs_h, host_defs_h): New variables.
7238 (thread-db.o): Add $(gdb_vecs_h) dependency.
7239 (gdb_vecs.o): New rule.
7240 * thread-db.c: #include "gdb_vecs.h".
7241 (thread_db_load_search): Use a vector to iterate over path elements.
7242 Handle text appearing after "$pdir".
7243
7244 * configure.ac: Add check for strstr.
7245 * config.in: Regenerate.
7246 * configure: Regenerate.
7247
7c3270ae
UW
72482012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7249
7250 * hostio.c (handle_pread): If pread fails, fall back to attempting
7251 lseek/read.
7252 (handle_pwrite): Likewise for pwrite.
7253
b62e2b27
UW
72542012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7255
7256 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7257 between unsupported TYPE and unimplementable ADDR/LEN combination.
7258 (arm_insert_point): Act on new return value.
7259
78a99e91
PA
72602012-07-31 Pedro Alves <palves@redhat.com>
7261
7262 * server.c (process_point_options): Only skip tokens if we find
7263 one that is unrecognized. Don't treat 'X' specially while
7264 skipping unrecognized tokens.
7265
fcf303ab
UW
72662012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7267
7268 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7269 to 4-byte-align HW breakpoint addresses for Thumb.
7270
7255706c
YQ
72712012-07-27 Yao Qi <yao@codesourcery.com>
7272
7273 PR remote/14161.
7274
7275 * server.h: Declare gdb_agent_about_to_close.
7276 * target.c (kill_inferior): Include "agent.h".
7277 New. Send command 'kill'.
7278 * target.h (kill_inferior): Removed macro.
7279 * tracepoint.c (gdb_agent_about_to_close): New.
7280 (gdb_agent_helper_thread): Handle command 'close'.
7281 Wait endlessly until the inferior stops.
7282 Install gdb_agent_remove_socket to atexit hook.
7283 (agent_socket_name): New static variable.
7284 (gdb_agent_socket_init): Replace local variable 'name' with
7285 'agent_socket_name'.
7286 (gdb_agent_remove_socket): New.
7287
5a3f286f
YQ
72882012-07-27 Yao Qi <yao@codesourcery.com>
7289
7290 * server.c (process_point_options): Stop at 'X' when parsing.
7291
961bd387
ME
72922012-07-19 Michael Eager <eager@eagercon.com>
7293
a261b8f5 7294 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
7295 to hw_execute.
7296 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7297 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7298 hardware breakpoint.
7299
aa7c7447
JK
73002012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7301
7302 * gdbserver/linux-low.c (initialize_low): Call
7303 linux_ptrace_init_warnings.
7304
7f216e7c
DE
73052012-07-02 Doug Evans <dje@google.com>
7306
7307 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7308 pointer to int.
7309
d3ce09f5
SS
73102012-07-02 Stan Shebs <stan@codesourcery.com>
7311
7312 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7313 (ax.o): Add it to build rule.
7314 (ax-ipa.o): Ditto.
7315 (OBS): Add format.o.
7316 (IPA_OBS): Add format.o.
7317 * server.c (handle_query): Claim support for breakpoint commands.
7318 (process_point_options): Add command case.
7319 (process_serial_event): Leave running if there are printfs in
7320 effect.
7321 * mem-break.h (any_persistent_commands): Declare.
7322 (add_breakpoint_commands): Declare.
7323 (gdb_no_commands_at_breakpoint): Declare.
7324 (run_breakpoint_commands): Declare.
7325 * mem-break.c (struct point_command_list): New struct.
7326 (struct breakpoint): New field command_list.
7327 (any_persistent_commands): New function.
7328 (add_commands_to_breakpoint): New function.
7329 (add_breakpoint_commands): New function.
7330 (gdb_no_commands_at_breakpoint): New function.
7331 (run_breakpoint_commands): New function.
7332 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7333 locally.
7334 * ax.c: Include format.h.
7335 (ax_printf): New function.
7336 (gdb_eval_agent_expr): Add printf opcode.
7337
2f8f6aed
YQ
73382012-06-13 Yao Qi <yao@codesourcery.com>
7339
7340 * server.c (start_inferior): Remove duplicated writes to fields
7341 'last_resume_kind' and 'last_status' of 'current_inferior'.
7342
0c9070b3
YQ
73432012-06-12 Yao Qi <yao@codesourcery.com>
7344 Pedro Alves <palves@redhat.com>
7345
7346 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7347 comment.
7348 * server.c (handle_v_cont): Extend comment.
7349
c52daf70
YQ
73502012-06-11 Yao Qi <yao@codesourcery.com>
7351
7352 * linux-low.c (linux_attach): Add 'static'.
7353
d38bbb0a
YQ
73542012-06-06 Yao Qi <yao@codesourcery.com>
7355
7356 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7357
89dc0afd
JK
73582012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7359
7360 Fix gcc -flto compilation warning.
7361 * server.c (main): Make variable multi_mode and attach volatile.
7362
75f62ce7
TJB
73632012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7364
7365 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7366 if the platform doesn't know about it.
7367
65f479b6
PA
73682012-05-30 Jeff Kenton <jkenton@tilera.com>
7369
7370 * Makefile.in (SFILES): Add linux-tile-low.c.
7371 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7372 * configure.srv: Handle tilegx-*-linux*.
7373 * linux-tile-low.c: New file.
7374
0c5bf5a9
JK
73752012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7376
7377 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7378
a493e3e2
PA
73792012-05-24 Pedro Alves <palves@redhat.com>
7380
7381 PR gdb/7205
7382
43aaf8b6 7383 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 7384
2ea28649
PA
73852012-05-24 Pedro Alves <palves@redhat.com>
7386
7387 PR gdb/7205
7388
7389 Replace target_signal with gdb_signal throughout.
7390
8d409d16
MR
73912012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7392
7393 * linux-low.c (linux_store_registers): Avoid the copying sequence
7394 when no data has been retrieved by ptrace.
7395
23512c01
MGD
73962012-05-22 Will Deacon <will.deacon@arm.com>
7397
7398 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7399 Include asm/ptrace.h.
7400 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7401 already defined.
7402
4934b29e
MR
74032012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7404
7405 * linux-low.c (linux_store_registers): Don't re-retrieve data
7406 with ptrace that has already been obtained from /proc. Always
7407 copy any data retrieved with ptrace to the buffer supplied.
7408
bde24c0a
PA
74092012-05-11 Yao Qi <yao@codesourcery.com>
7410 Pedro Alves <palves@redhat.com>
7411
7412 * linux-low.c (enum stopping_threads_kind): New.
7413 (stopping_threads): Change type to `enum stopping_threads_kind'.
7414 (handle_extended_wait): If stopping and suspending threads, leave
7415 the new_lwp suspended too.
7416 (linux_wait_for_event): Adjust.
7417 (stop_all_lwps): Set `stopping_threads' to
7418 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7419 whether we're suspending threads or just stopping them. Assert no
7420 recursion happens.
7421
623b6bdf
YQ
74222012-04-29 Yao Qi <yao@codesourcery.com>
7423
7424 * server.h: Move some code to ...
7425 * gdbthread.h: ... here. New.
7426 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7427 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7428 (nto-low.o, win32-low.o): Likewise.
7429 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7430 * regcache.c, remote-utils.c, server.c: Likewise.
7431 * target.c, tracepoint.c, win32-low.c: Likewise.
7432
f15f9948
TJB
74332012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7434
7435 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7436 (PTRACE_ARG4_TYPE): Likewise.
7437 (PTRACE_XFER_TYPE): Likewise.
7438 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7439 ptrace to PTRACE_ARG3_TYPE.
7440 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7441 (PTRACE_ARG4_TYPE): Likewise.
7442 (PTRACE_XFER_TYPE): Likewise.
7443 (linux_detach_one_lwp): Cast fourth argument of
7444 ptrace to long then PTRACE_ARG4_TYPE.
7445 (regsets_fetch_inferior_registers): Cast third argument of
7446 ptrace to long then PTRACE_ARG3_TYPE.
7447 (regsets_store_inferior_registers): Likewise.
7448
38ea300a
PA
74492012-04-20 Pedro Alves <palves@redhat.com>
7450
7451 * configure: Regenerate.
7452
c971b7fa
PA
74532012-04-19 Pedro Alves <palves@redhat.com>
7454
43aaf8b6 7455 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 7456 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
7457 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7458 (all, install-only, uninstall, clean-info, all-lib, clean): No
7459 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7460 (maintainer-clean realclean distclean): Use subdir_do.
7461 (subdir_do): New.
7462 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 7463 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
7464 * acinclude.m4: Include acx_configure_dir.m4.
7465 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7466 calls. Call AC_PROG_RANLIB. Configure gnulib using
7467 ACX_CONFIGURE_DIR.
7468 (GNULIB): New.
7469 (GNULIB_STDINT_H): Adjust.
7470 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7471 * gdbreplay.c: Include build-gnulib/config.h.
7472 * server.h: Likewise.
7473 * aclocal.m4: Regenerate.
7474 * config.in: Regenerate.
7475 * configure: Regenerate.
c971b7fa 7476
809277f8
PA
74772012-04-19 Pedro Alves <palves@redhat.com>
7478
7479 * Makefile.in (LIBGNU, INCGNU): Adjust.
7480 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7481 (all, install-only, uninstall, clean-info, all-lib, clean)
7482 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7483 * configure.ac: Adjust AC_OUTPUT output.
7484 * aclocal.m4: Regenerate.
7485 * configure: Regenerate.
7486
fd9bb8b8
PA
74872012-04-19 Pedro Alves <palves@redhat.com>
7488
7489 * Makefile.in (generated_files): New.
7490 (server_h): Remove the explicit dependency on config.h, and depend
7491 on $generated_files.
7492
1c298c66
PA
74932012-04-19 Pedro Alves <palves@redhat.com>
7494
7495 * Makefile.in (INCGNU): Add -Ignulib.
7496
57c4b50b
PA
74972012-04-19 Pedro Alves <palves@redhat.com>
7498
7499 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7500 (INCGNU): ... this, and spell out -I here.
7501 (GNULIB_LIB): Rename to ...
7502 (LIBGNU): ... this.
7503 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7504
1030e047
PA
75052012-04-19 Pedro Alves <palves@redhat.com>
7506
7507 * config.in: Regenerate.
7508
447d4319
PA
75092012-04-19 Pedro Alves <palves@redhat.com>
7510
7511 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7512 * server.h (memmem): Remove declaration.
7513 * config.in: Regenerate.
7514 * configure: Regenerate.
7515
aad9eab9
YQ
75162012-04-19 Yao Qi <yao@codesourcery.com>
7517
7518 * Makefile.in (SFILES): Add common/vec.c.
7519 (OBS): Add vec.o.
7520 (vec.o): New rule.
7521
3e10640f
YQ
75222012-04-19 Yao Qi <yao@codesourcery.com>
7523
7524 * remote-utils.c (prepare_resume_reply): Replace with macro
7525 target_core_of_thread.
7526 * server.c (handle_qxfer_threads_proper): Likewise.
7527 * target.h (traget_core_of_thread): New macro.
7528
71622373
PA
75292012-04-18 Pedro Alves <palves@redhat.com>
7530
7531 * aclocal.m4: Regenerate.
7532 * configure: Regenerate.
7533
80d26939
YQ
75342012-04-16 Yao Qi <yao@codesourcery.com>
7535
7536 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7537 duplicated on address.
7538
42476b70
YQ
75392012-04-16 Yao Qi <yao@codesourcery.com>
7540
7541 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7542 (struct tracepoint_action_ops) <send>: New field.
7543 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7544 (agent_expr_send, x_tracepoint_action_send): New.
7545 (l_tracepoint_action_send): New.
7546 (cmd_qtdp): Download and install tracepoint
7547 according to `use_agent'.
7548 (run_inferior_command): Add one more parameter `len'.
7549 Update callers.
7550 (tracepoint_send_agent): New.
7551 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7552
7bc83639
YQ
75532012-04-16 Yao Qi <yao@codesourcery.com>
7554
7555 * tracepoint.c (download_tracepoints): Moved to ...
7556 (cmd_qtstart): ... here.
7557
5f18041e
YQ
75582012-04-14 Yao Qi <yao@codesourcery.com>
7559
7560 * tracepoint.c: Include inttypes.h.
7561 (struct collect_memory_action): Use sized types.
7562 (struct tracepoint): Likewise.
7563 (cmd_qtdp, stop_tracing): Update print specifiers.
7564 (cmd_qtp, response_tracepoint): Likewise.
7565 (collect_data_at_tracepoint): Likewise.
7566 (collect_data_at_step): Likewise.
7567
55a8c076
YQ
75682012-04-14 Yao Qi <yao@codesourcery.com>
7569
7570 Import gnulib module inttypes.
7571 * aclocal.m4, config.in, configure: Regenerated.
7572
dc750257
YQ
75732012-04-14 Yao Qi <yao@codesourcery.com>
7574
7575 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7576 Makefile and config.status at last.
7577
0ab5faf9
YQ
75782012-04-13 Yao Qi <yao@codesourcery.com>
7579
7580 * tracepoint.c: Include stdint.h unconditionally.
7581
18f5fd81
TJB
75822012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7583
7584 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7585 on BFD_HAVE_SYS_PROCFS_TYPE.
7586 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7587 * configure: Regenerate.
7588 * config.in: Likewise.
7589
4d47af5c
L
75902012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7591
7592 * Makefile.in (clean): Also remove x32.c x32-linux.c
7593 x32-avx.c x32-avx-linux.c.
7594 (x32.o): New target.
7595 (x32.c): Likewise.
7596 (x32-linux.o): Likewise.
7597 (x32-linux.c): Likewise.
7598 (x32-avx.o): Likewise.
7599 (x32-avx.c): Likewise.
7600 (x32-avx-linux.o): Likewise.
7601 (x32-avx-linux.c): Likewise.
7602
7603 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7604 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7605 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7606 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7607 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7608 i386/x32-avx-linux.xml.
7609
7610 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7611 (init_registers_x32_avx_linux): Likwise.
7612 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7613 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7614
ecedbe58
PA
76152012-04-13 Pedro Alves <palves@redhat.com>
7616
7617 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7618 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7619 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7620 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7621 the sub-make.
7622
c92b5177
L
76232012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7624
7625 * linux-x86-low.c (compat_x32_clock_t): New.
7626 (compat_x32_siginfo_t): Likewise.
7627 (compat_x32_siginfo_from_siginfo): Likewise.
7628 (siginfo_from_compat_x32_siginfo): Likewise.
7629 (linux_is_elf64): Likewise.
7630 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7631 and siginfo_from_compat_x32_siginfo for x32.
7632 (x86_arch_setup): Set linux_is_elf64.
7633
214d508e
L
76342012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7635
7636 PR gdb/13969
7637 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7638 e_machine field.
7639 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7640 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7641 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7642 compatible with process.
7643
c9a1864a
YQ
76442012-04-12 Yao Qi <yao@codesourcery.com>
7645
7646 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7647 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7648 (install-only, install-info, clean): Handle sub dir gnulib.
7649 (all-lib, am--refresh): New targets.
7650 (memmem.o): Remove target.
7651 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7652 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7653 (AC_REPLACE_FUNCS): Remove memmem.
7654 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7655 (AC_OUTPUT): Generate Makefile in gnulib/.
7656 * aclocal.m4, config.in, configure: Regenerated.
7657
367ba2c2
MR
76582012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7659
7660 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7661
9d236627
PA
76622012-04-05 Pedro Alves <palves@redhat.com>
7663
7664 -Werror=strict-aliasing
7665
7666 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7667 pointer.
7668
111217b3
PA
76692012-04-04 Pedro Alves <palves@redhat.com>
7670
7671 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7672 (sparc_store_gregset_from_stack, sparc_store_gregset)
7673 (sparc_breakpoint_at): Fix formatting.
7674
8365dcf5
TJB
76752012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7676
7677 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7678 are available.
7679 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7680 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7681 * config.in: Regenerate.
7682 * configure: Likewise.
7683
689cc2ae
PA
76842012-03-29 Pedro Alves <palves@redhat.com>
7685
7686 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7687 Correct ptrace arguments.
7688
c14dfd32
PA
76892012-03-28 Pedro Alves <palves@redhat.com>
7690
7691 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7692 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7693 (IA64_FR1_REGNUM): New defines.
7694 (ia64_fetch_register): New.
7695 (the_low_target): Install it.
7696 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7697 field.
7698 * linux-low.c (linux_fetch_registers): Try the
7699 the_low_target.fetch_register hook first.
7700
7701 * linux-arm-low.c (the_low_target): Adjust.
7702 * linux-bfin-low.c (the_low_target): Adjust.
7703 * linux-cris-low.c (the_low_target): Adjust.
7704 * linux-crisv32-low.c (the_low_target): Adjust.
7705 * linux-m32r-low.c (the_low_target): Adjust.
7706 * linux-m68k-low.c (the_low_target): Adjust.
7707 * linux-mips-low.c (the_low_target): Adjust.
7708 * linux-ppc-low.c (the_low_target): Adjust.
7709 * linux-s390-low.c (the_low_target): Adjust.
7710 * linux-sh-low.c (the_low_target): Adjust.
7711 * linux-sparc-low.c (the_low_target): Adjust.
7712 * linux-tic6x-low.c (the_low_target): Adjust.
7713 * linux-x86-low.c (the_low_target): Adjust.
7714 * linux-xtensa-low.c (the_low_target): Adjust.
7715
63c88e13
PA
77162012-03-26 Pedro Alves <palves@redhat.com>
7717
7718 * server.c (handle_qxfer_libraries): Don't bail early if
7719 the_target->qxfer_libraries_svr4 is not NULL.
7720
fb723180
PA
77212012-03-26 Pedro Alves <palves@redhat.com>
7722
7723 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7724
0afae3cf
PA
77252012-03-23 Pedro Alves <palves@redhat.com>
7726
7727 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7728 "library-list-svr4" element's start tag when the the DSO list is
7729 empty.
7730
485f1ee4
PA
77312012-03-23 Pedro Alves <palves@redhat.com>
7732
7733 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7734 a variable whose type size is the same as the inferior's pointer
7735 size.
7736
a5362b9a
TS
77372012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7738
7739 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7740 struct siginfo.
7741 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7742 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7743 * linux-low.h: Include <signal.h>.
7744 (struct siginfo): Remove forward declaration.
7745 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7746 struct siginfo.
7747
d226c142
MF
77482012-03-21 Mike Frysinger <vapier@gentoo.org>
7749
7750 * .gitignore: Ignore more files.
7751
122f36ef
PA
77522012-03-19 Pedro Alves <palves@redhat.com>
7753 Jan Kratochvil <jan.kratochvil@redhat.com>
7754
7755 * server.c (cont_thread, general_thread): Add describing comments.
7756 (start_inferior): Clear `cont_thread'.
7757 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7758 of a process.
7759
fc3e5175
YQ
77602012-03-15 Yao Qi <yao@codesourcery.com>
7761
7762 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7763 handling to ...
7764 (cmd_qtdp): ... here.
7765
8d0d92cd
YQ
77662012-03-15 Yao Qi <yao@codesourcery.com>
7767
7768 * tracepoint.c (struct tracepoint_action_ops): New.
7769 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7770 (m_tracepoint_action_download): New.
7771 (r_tracepoint_action_download): New.
7772 (x_tracepoint_action_download): New.
7773 (l_tracepoint_action_download): New.
7774 (add_tracepoint_action): Install `action->ops' according type.
7775 (download_tracepoint_1): Move code `download' function pointer
7776 of various tracepoint_action_ops.
7777
87b0bb13
JK
77782012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7779
7780 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7781 linux_ptrace_attach_warnings.
7782
5f572dec
JK
77832012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7784
7785 * Makefile.in (linux-ptrace.o): New.
7786 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7787 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7788 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7789 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7790 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7791 of these targets.
7792 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7793
f4647387
YQ
77942012-03-08 Yao Qi <yao@codesourcery.com>
7795 Pedro Alves <palves@redhat.com>
7796
7797 Fix PR server/13392.
7798 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7799 offset of JMP insn.
7800 * tracepoint.c (remove_tracepoint): New.
7801 (cmd_qtdp): Call remove_tracepoint when failed to install.
7802
9b224c5e
PA
78032012-03-07 Pedro Alves <palves@redhat.com>
7804
7805 * linux-low.c (get_detach_signal): New.
7806 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7807 Pass on pending signals to PTRACE_DETACH. Check the result of the
7808 ptrace call.
7809 * server.c (program_signals, program_signals_p): New.
7810 (handle_general_set): Handle QProgramSignals.
7811 * server.h (program_signals, program_signals_p): Declare.
7812
e237a7e2
JK
78132012-03-05 Pedro Alves <palves@redhat.com>
7814 Jan Kratochvil <jan.kratochvil@redhat.com>
7815
7816 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7817 New comment why.
7818
5808517f
YQ
78192012-03-03 Yao Qi <yao@codesourcery.com>
7820
7821 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7822 agent_look_up_symbols.
7823
58b4daa5
YQ
78242012-03-03 Yao Qi <yao@codesourcery.com>
7825
7826 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7827 (linux-x86-low.o): Likewise.
7828 * server.h: Remove in_process_agent_loaded.
7829 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7830 common/agent.c.
7831 Update callers.
7832
8ffcbaaf
YQ
78332012-03-03 Yao Qi <yao@codesourcery.com>
7834
7835 * tracepoint.c (gdb_agent_capability): New global.
7836 (in_process_agent_loaded_ust): Renamed to
7837 `in_process_agent_supports_ust'.
7838 Update callers.
7839 (in_process_agent_supports_ust): Call agent_capability_check.
7840 (clear_installed_tracepoints): Assert that agent supports
7841 agent.
7842
d1feda86
YQ
78432012-03-03 Yao Qi <yao@codesourcery.com>
7844
7845 * linux-low.c (linux_supports_agent): New.
7846 (linux_target_ops): Initialize field `supports_agent' with
7847 linux_supports_agent.
7848 * target.h (struct target_ops) <supports_agent>: New.
7849 (target_supports_agent): New macro.
7850 * server.c (handle_general_set): Handle packet 'QAgent'.
7851 (handle_query): Send `QAgent+'.
7852 * Makefile.in (server.o): Depends on agent.h.
7853
2fa291ac
YQ
78542012-03-03 Yao Qi <yao@codesourcery.com>
7855
7856 * Makefile.in (OBS): Add agent.o.
7857 Add new rule for agent.o.
7858 Track dependence of tracepoint.c on agent.h.
7859 * tracepoint.c (run_inferior_command_1):
7860 (run_inferior_command): Call agent_run_command.
7861 (gdb_ust_connect_sync_socket): Deleted. Move it to
7862 common/agent.c.
7863 (resume_thread, stop_thread): Likewise.
7864 (gdb_ust_socket_init): Renamed to ...
7865 (gdb_agent_socket_init): ... New.
7866 (gdb_ust_thread): Renamed to ...
7867 (gdb_agent_helper_thread): ... New.
7868 (gdb_ust_init): Move some code to ...
7869 (gdb_agent_init): ... here. New.
7870 [HAVE_UST]: Call gdb_ust_init.
7871 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7872 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7873 * config.in, configure: Regenerated.
7874
05044653
PA
78752012-03-02 Pedro Alves <palves@redhat.com>
7876
7877 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7878 * linux-low.c (struct simple_pid_list): New.
7879 (stopped_pids): New a struct simple_pid_list pointer.
7880 (add_to_pid_list, pull_pid_from_list): New.
7881 (handle_extended_wait): Don't assume the first signal new children
7882 report is SIGSTOP. Adjust call to pull_pid_from_list.
7883 (linux_wait_for_lwp): Adjust.
7884
8d00225b
YQ
78852012-03-02 Yao Qi <yao@codesourcery.com>
7886
7887 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7888 debug log.
7889
19560ba5
YQ
78902012-03-02 Yao Qi <yao@codesourcery.com>
7891
7892 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7893 `stop_pc' and `tpoint'. Update caller.
7894
1faeff08
MR
78952012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7896
7897 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7898 * linux-low.c (use_linux_regsets): New macro.
7899 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7900 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7901 (linux_register_in_regsets): New function.
7902 (usr_fetch_inferior_registers): Skip registers covered by
7903 regsets.
7904 (usr_store_inferior_registers): Likewise.
7905 (usr_fetch_inferior_registers): New macro.
7906 (usr_store_inferior_registers): Likewise.
7907 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7908 (linux_store_registers): Likewise.
7909 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7910 prototype.
7911 (init_registers_mips64_dsp_linux): Likewise.
7912 (init_registers_mips_linux): New macro.
7913 (init_registers_mips_dsp_linux): Likewise.
7914 (mips_dsp_num_regs): Likewise.
7915 (DSP_BASE, DSP_CONTROL): New fallback macros.
7916 (mips_base_regs): New macro.
7917 (mips_regmap): Use it. Fix the size.
7918 (mips_dsp_regmap): New variable.
7919 (mips_dsp_regset_bitmap): Likewise.
7920 (mips_arch_setup): New function.
7921 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7922 than mips_regmap.
7923 (mips_cannot_store_register): Likewise.
7924 (the_low_target): Update .arch_setup, .num_regs and .regmap
7925 initializers. Add .regset_bitmap initializer.
7926 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7927 initializer.
7928 * linux-bfin-low.c (the_low_target): Likewise.
7929 * linux-cris-low.c (the_low_target): Likewise.
7930 * linux-crisv32-low.c (the_low_target): Likewise.
7931 * linux-ia64-low.c (the_low_target): Likewise.
7932 * linux-m32r-low.c (the_low_target): Likewise.
7933 * linux-m68k-low.c (the_low_target): Likewise.
7934 * linux-ppc-low.c (the_low_target): Likewise.
7935 * linux-s390-low.c (the_low_target): Likewise.
7936 * linux-sh-low.c (the_low_target): Likewise.
7937 * linux-sparc-low.c (the_low_target): Likewise.
7938 * linux-tic6x-low.c (the_low_target): Likewise.
7939 * linux-x86-low.c (the_low_target): Likewise.
7940 * linux-xtensa-low.c (the_low_target): Likewise.
7941 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7942 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7943 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7944 srv_xmlfiles.
7945 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7946 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7947
c03e6ccc
YQ
79482012-02-29 Yao Qi <yao@codesourcery.com>
7949 Pedro Alves <palves@redhat.com>
7950
7951 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7952 `step_over_finished' is true.
7953
644cebc9
PA
79542012-02-27 Pedro Alves <palves@redhat.com>
7955
7956 * linux-low.c (pid_is_stopped): Delete, moved to common/.
7957 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7958
c14d7ab2
PA
79592012-02-27 Pedro Alves <palves@redhat.com>
7960
7961 PR server/9684
7962 * linux-low.c (pid_is_stopped): New.
7963 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7964
412c89dd
LM
79652012-02-25 Luis Machado <lgustavo@codesourcery.com>
7966
7967 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7968 of conditions.
7969
b745defe
MR
79702012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
7971
7972 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7973
9f3a5c85
LM
79742012-02-24 Luis Machado <lgustavo@codesourcery>
7975
7976 * server.c (handle_query): Advertise support for target-side
7977 breakpoint condition evaluation.
7978 (process_point_options): New function.
7979 (process_serial_event): When inserting a breakpoint, check for
7980 a target-side condition that should be evaluated.
7981
7982 * mem-break.c: Include regcache.h and ax.h.
7983 (point_cond_list_t): New data structure.
7984 (breakpoint) <cond_list>: New field.
7985 (find_gdb_breakpoint_at): Make non-static.
7986 (delete_gdb_breakpoint_at): Clear any target-side
7987 conditions.
7988 (clear_gdb_breakpoint_conditions): New function.
7989 (add_condition_to_breakpoint): Likewise.
7990 (add_breakpoint_condition): Likewise.
7991 (gdb_condition_true_at_breakpoint): Likewise.
7992 (gdb_breakpoint_here): Return result directly instead
7993 of going through a local variable.
7994
7995 * mem-break.h (find_gdb_breakpoint_at): New prototype.
7996 (clear_gdb_breakpoint_conditions): Likewise.
7997 (add_breakpoint_condition): Likewise.
7998 (gdb_condition_true_at_breakpoint): Likewise.
7999
8000 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8001 (need_step_over_p): Take target-side breakpoint condition into
8002 consideration.
8003
5e1dc496
LM
80042012-02-24 Luis Machado <lgustavo@codesourcery>
8005
8006 * server.h: Include tracepoint.h.
8007 (agent_mem_read, agent_get_trace_state_variable_value,
8008 agent_set_trace_state_variable_value,
8009 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8010 get_set_tsv_func_addr): New prototypes.
8011
8012 * ax.h: New include file.
8013 * ax.c: New source file.
8014
8015 * tracepoint.c: Include ax.h.
8016 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8017 agent_expr, eval_result_type): Move to ax.h.
8018 (parse_agent_expr): Rename to ...
8019 (gdb_parse_agent_expr): ... this, make it non-static and move
8020 to ax.h.
8021 (unparse_agent_expr) Rename to ...
8022 (gdb_unparse_agent_expr): ... this, make it non-static and move
8023 to ax.h.
8024 (eval_agent_expr): Rename to ...
8025 (eval_tracepoint_agent_expr): ... this.
8026 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8027 forward declarations.
8028 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8029 (agent_get_trace_state_variable_value): New function.
8030 (agent_set_trace_state_variable_value): New function.
8031 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8032 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8033 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8034 (condition_true_at_tracepoint): Likewise.
8035 (parse_agent_expr): Rename to ...
8036 (gdb_parse_agent_expr): ... this and move to ax.c.
8037 (unparse_agent_expr): Rename to ...
8038 (gdb_unparse_agent_expr): ... this and move to ax.c.
8039 (gdb_agent_op_name): Move to ax.c.
8040 (eval_agent_expr): Rename to ...
8041 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8042 and move to ax.c.
8043 (eval_tracepoint_agent_expr): New function.
8044 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8045 non-static.
5e1dc496
LM
8046 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8047 ax.c.
8048 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8049 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8050 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8051 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8052 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8053 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8054 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8055 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8056 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8057 (compile_bytecodes): Remove forward declaration.
8058 (is_goto_target): Move to ax.c.
8059 (compile_bytecodes): Move to ax.c and call
8060 agent_get_trace_state_variable_value (...) and
8061 agent_set_trace_state_variable_value (...).
8062
8063 * Makefile.in: Update ax.c and IPA dependencies.
8064
277e4e52
PA
80652012-02-24 Pedro Alves <palves@redhat.com>
8066
8067 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8068 (cmd_bigqtbuffer_circular): ... this. Only handle
8069 'QTBuffer:circular:'.
8070 (handle_tracepoint_general_set): Adjust.
8071
bf4c19f7
YQ
80722012-02-16 Yao Qi <yao@codesourcery.com>
8073
8074 * inferiors.c: Move code to ...
8075 * dll.c: .... here. New.
8076 * server.h: Declare clear_dlls.
8077 * Makefile.in (SFILES): Add dll.c.
8078 (OBS): Add dll.o
8079 (dll.o): New rule.
8080
d73f2619
YQ
80812012-02-11 Yao Qi <yao@codesourcery.com>
8082
8083 * server.c: (handle_monitor_command): Add a new parameter
8084 `own_buf'.
8085 (handle_query): Update caller.
8086
f8255c2a
JB
80872012-02-09 Joel Brobecker <brobecker@adacore.com>
8088
8089 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8090 * configure, config.in: Regenerate.
8091 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8092 is not defined.
8093
da84f473
PA
80942012-02-02 Pedro Alves <palves@redhat.com>
8095
8096 Try SIGKILL first, then PTRACE_KILL.
8097 * linux-low.c (linux_kill_one_lwp): New.
8098 (linux_kill_one_lwp): Rename to ...
8099 (kill_one_lwp_callback): ... this. Use the new
8100 linux_kill_one_lwp.
8101
e886a173
PA
81022012-02-02 Pedro Alves <palves@redhat.com>
8103
8104 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8105 inferior.
8106
be07f1a2
PA
81072012-01-27 Pedro Alves <palves@redhat.com>
8108
8109 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8110 (elf_64_file_p): Make static.
8111 (linux_pid_exe_is_elf_64_file): New.
8112 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8113 Delete declarations.
8114 (linux_pid_exe_is_elf_64_file): Declare.
8115 * linux-x86-low.c (x86_arch_setup): Use
8116 linux_pid_exe_is_elf_64_file.
8117
d8301ad1
JK
81182012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8119
8120 * linux-low.c (linux_wait_for_event_1): Rename to ...
8121 (linux_wait_for_event): ... here and merge it with former
8122 linux_wait_for_event - new variable wait_ptid, use it.
8123 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8124
01b17894
PA
81252012-01-23 Pedro Alves <palves@redhat.com>
8126
8127 * server.c (main): Avoid yet another case of infinite loop while
8128 detaching/killing after a longjmp.
8129
e825046f
JK
81302012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8131
8132 Code cleanup.
8133 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8134
b9e7b9c3
UW
81352012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8136
8137 * hostio.c (handle_readlink): New function.
8138 (handle_vFile): Call it to handle "vFile:readlink" packets.
8139
901f9912
UW
81402012-01-20 Pedro Alves <palves@redhat.com>
8141 Ulrich Weigand <ulrich.weigand@linaro.org>
8142
8143 * server.c (handle_v_requests): Only support vAttach and vRun to
8144 start multiple processes when in extended protocol mode.
8145
fc1ab1a0
PA
81462012-01-17 Pedro Alves <palves@redhat.com>
8147
8148 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8149 memalign plus mprotect to allocate the scratch buffer.
8150
7d5d4e98
PA
81512012-01-13 Pedro Alves <palves@redhat.com>
8152
8153 * server.c (attach_inferior): Clear `cont_thread'.
8154
f128d5e9
PA
81552012-01-13 Pedro Alves <palves@redhat.com>
8156
8157 * server.c (main): Avoid infinite loop while detaching/killing
8158 after a longjmp.
8159
06db92f0
DE
81602012-01-09 Doug Evans <dje@google.com>
8161
8162 * server.c (start_inferior): Set last_ptid in --wrapper case.
8163
32d92999
YQ
81642012-01-06 Yao Qi <yao@codesourcery.com>
8165
8166 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8167 defined.
8168 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8169
5e0a92a9
YQ
81702012-01-04 Yao Qi <yao@codesourcery.com>
8171
8172 * tracepoint.c (cmd_qtdp): Print debug message
8173 for static tracepoint.
8174
ae639e8c
YQ
81752012-01-04 Yao Qi <yao@codesourcery.com>
8176
8177 * tracepoint.c (trace_vdebug): Differentiate debug message
8178 between gdbserver and IPA.
8179
f72429c5
YQ
81802012-01-03 Yao Qi <yao@codesourcery.com>
8181
8182 * tracepoint.c (tracepoint_was_hit): Don't collect for
8183 static tracepoint.
8184
12c3e59c
JB
81852012-01-02 Joel Brobecker <brobecker@adacore.com>
8186
8187 * terminal.h: Reformat copyright header.
8188
67827812
JB
81892012-01-02 Joel Brobecker <brobecker@adacore.com>
8190
8191 * server.c (gdbserver_version): Update copyright year.
8192 * gdbreplay.c (gdbreplay_version): Likewise.
8193
3e52c33d
JK
81942011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8195
8196 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8197
8198 Revert:
8199 2011-12-18 Hui Zhu <teawater@gmail.com>
8200 * linux-low.c (linux_create_inferior): Save return value to ret.
8201
66f1260e
HZ
82022011-12-18 Hui Zhu <teawater@gmail.com>
8203
8204 * linux-low.c (linux_create_inferior): Save return value to ret.
8205
e77616d7
DE
82062011-12-16 Doug Evans <dje@google.com>
8207
e7b06c57
DE
8208 * linux-low.c (linux_create_inferior): If stdio connection,
8209 redirect stdin from /dev/null, stdout to stderr.
8210 * remote-utils.c (remote_is_stdio): New static global.
8211 (remote_connection_is_stdio): New function.
8212 (remote_prepare): Handle stdio connection.
8213 (remote_open): Ditto.
8214 (remote_close): Don't close stdin for stdio connections.
8215 (read_prim,write_prim): New functions. Replace all calls to
8216 read/write to these.
8217 * server.c (main): Watch for "-" argument. Move call to
8218 remote_prepare before start_inferior.
8219 * server.h (STDIO_CONNECTION_NAME): New macro.
8220 (remote_connection_is_stdio): Declare.
8221
e77616d7
DE
8222 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8223 in debugging output.
8224
82067193
YQ
82252011-12-15 Yao Qi <yao@codesourcery.com>
8226
8227 * tracepoint.c: Include sys/syscall.h.
8228 (gdb_ust_thread): Remove preprocessor conditional.
8229
82bfbe7e
PA
82302011-12-14 Pedro Alves <pedro@codesourcery.com>
8231
8232 * linux-low.c (linux_detach_one_lwp): Call
8233 the_low_target.prepare_to_resume before detaching.
8234
712c6575
YQ
82352011-12-14 Yao Qi <yao@codesourcery.com>
8236
8237 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8238 of write.
8239
d54d1edf
YQ
82402011-12-14 Yao Qi <yao@codesourcery.com>
8241
8242 * i386-low.c (i386_low_stopped_data_address): Initialize local
8243 variable `control'.
8244
6210a125
PA
82452011-12-13 Pedro Alves <pedro@codesourcery.com>
8246
8247 PR remote/13492
8248
8249 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8250 DR_CONTROL unless necessary. Extend comments.
8251 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8252 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8253
2ece8244
YQ
82542011-12-13 Yao Qi <yao@codesourcery.com>
8255
8256 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8257 macros.
8258 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8259
784867a5
JK
82602011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8261
8262 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8263 Print new debug message for such case.
8264
6bf36717
JK
82652011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8266
8267 Fix overlapping memcpy.
8268 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8269 the read_inferior_memory transfer.
8270 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8271 write_inferior_memory transfer.
8272 (set_fast_tracepoint_jump): New variable buf. Use it for the
8273 read_inferior_memory and write_inferior_memory transfers.
8274 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8275 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8276 Use it for the write_inferior_memory transfer.
8277 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8278 buffers.
8279
50275556
MR
82802011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8281
8282 * linux-low.c (fetch_register, store_register): Make code
8283 consistent, fix formatting.
8284
7325beb4
MR
82852011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8286
8287 * linux-low.c (usr_store_inferior_registers): Factor out code
8288 to handle individual registers into...
8289 (store_register): ... this new function.
8290
c642a434
UW
82912011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8292
8293 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8294 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8295 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8296 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8297 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8298 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8299 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8300 (srv_xmlfiles): Add new XML files.
8301
8302 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8303 and <sys/uio.h>.
8304 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8305 (init_registers_s390_linux32v1): Add prototype.
8306 (init_registers_s390_linux32v2): Likewise.
8307 (init_registers_s390_linux64v1): Likewise.
8308 (init_registers_s390_linux64v2): Likewise.
8309 (init_registers_s390x_linux64v1): Likewise.
8310 (init_registers_s390x_linux64v2): Likewise.
8311 (s390_num_regs): Increment to 52.
8312 (s390_regmap): Add orig_r2 register.
8313 (s390_num_regs_3264): Increment to 68.
8314 (s390_regmap_3264): Add orig_r2 register.
8315 (s390_collect_ptrace_register): Handle orig_r2 register.
8316 (s390_supply_ptrace_register): Likewise.
8317 (s390_fill_last_break): New function.
8318 (s390_store_last_break): Likewise.
8319 (s390_fill_system_call): New function.
8320 (s390_store_system_call): Likewise.
8321 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8322 register sets.
8323 (s390_check_regset): New function.
8324 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8325 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8326 Update target_regsets for available register sets.
8327
2268b414
JK
83282011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8329 Jan Kratochvil <jan.kratochvil@redhat.com>
8330
8331 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8332 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8333 New.
8334 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8335 * linux-low.h (struct process_info_private): New member r_debug.
8336 * server.c (handle_qxfer_libraries): Call
8337 the_target->qxfer_libraries_svr4.
8338 (handle_qxfer_libraries_svr4): New function.
8339 (qxfer_packets): New entry "libraries-svr4".
8340 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8341 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8342 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8343 PACKET_qXfer_libraries_svr4.
8344
d6db1fab
UW
83452011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8346
8347 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8348 PSW address/mask between 8-byte and 16-byte formats.
8349 (s390_supply_ptrace_register): Likewise.
8350 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8351 basic addressing mode bit.
8352
242f5f1c
SS
83532011-11-24 Stan Shebs <stan@codesourcery.com>
8354
8355 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8356
f196051f
SS
83572011-11-17 Stan Shebs <stan@codesourcery.com>
8358
8359 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8360 (tracing_start_time): New global.
8361 (tracing_stop_time): New global.
8362 (tracing_user_name): New global.
8363 (tracing_notes): New global.
8364 (tracing_stop_note): New global.
8365 (cmd_qtstart): Set traceframe_usage, start_time.
8366 (stop_tracing): Set stop_time.
8367 (cmd_qtstatus): Report additional status.
8368 (cmd_qtp): New function.
8369 (handle_tracepoint_query): Call it.
8370 (cmd_qtnotes): New function.
8371 (handle_tracepoint_general_set): Call it.
8372 (get_timestamp): Rename from tsv_get_timestamp.
8373
405f8e94
SS
83742011-11-14 Stan Shebs <stan@codesourcery.com>
8375 Kwok Cheung Yeung <kcy@codesourcery.com>
8376
8377 * linux-x86-low.c (small_jump_insn): New.
8378 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8379 trampoline and error message, build a trampoline and issue a small
8380 jump instruction to it.
8381 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8382 trampoline and error message.
8383 (x86_get_min_fast_tracepoint_insn_len): New.
8384 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8385 * linux-low.h (struct linux_target_ops): Add arguments to
8386 install_fast_tracepoint_jump_pad operation, add new operation.
8387 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8388 arguments.
8389 (linux_get_min_fast_tracepoint_insn_len): New function.
8390 (linux_target_op): Add new operation.
8391 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8392 (gdb_trampoline_buffer_end): Ditto.
8393 (gdb_trampoline_buffer_error): Ditto.
8394 (struct ipa_sym_addresses): Add fields for new IPA variables.
8395 (symbol_list): Add entries for new IPA variables.
8396 (struct tracepoint): Add fields to hold the address range of the
8397 trampoline used by the tracepoint.
8398 (trampoline_buffer_head): New static variable.
8399 (trampoline_buffer_tail): Ditto.
8400 (claim_trampoline_space): New function.
8401 (have_fast_tracepoint_trampoline_buffer): New function.
8402 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8403 structure.
8404 (install_fast_tracepoint): Ditto, also add error buffer argument.
8405 (cmd_qtminftpilen): New function.
8406 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8407 (fast_tracepoint_from_trampoline_address): New function.
8408 (fast_tracepoint_collecting): Handle trampoline as part of jump
8409 pad space.
8410 (set_trampoline_buffer_space): New function.
8411 (initialize_tracepoint): Initialize new IPA variables.
8412 * target.h (struct target_ops): Add arguments to
8413 install_fast_tracepoint_jump_pad operation, add new
8414 get_min_fast_tracepoint_insn_len operation.
8415 (target_get_min_fast_tracepoint_insn_len): New.
8416 (install_fast_tracepoint_jump_pad): Add arguments.
8417 * server.h (IPA_BUFSIZ): Define.
8418 * linux-i386-ipa.c: Include extra header files.
8419 (initialize_fast_tracepoint_trampoline_buffer): New function.
8420 (initialize_low_tracepoint): Call it.
8421 * server.h (set_trampoline_buffer_space): Declare.
8422 (claim_trampoline_space): Ditto.
8423 (have_fast_tracepoint_trampoline_buffer): Ditto.
8424
1e4d1764
YQ
84252011-11-14 Yao Qi <yao@codesourcery.com>
8426
8427 * server.c (handle_query): Handle InstallInTrace for qSupported.
8428 * tracepoint.c (add_tracepoint): Sort list.
8429 (install_tracepoint, download_tracepoint): New.
8430 (cmd_qtdp): Call them to install and download tracepoints.
8431 (sort_tracepoints): Removed.
8432 (cmd_qtstart): Update.
8433
5c73ff4e
YQ
84342011-11-14 Yao Qi <yao@codesourcery.com>
8435
8436 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8437 * mem-break.h: Declare.
8438 * tracepoint.c (cmd_qtstart): Move some code to ...
8439 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8440 New.
8441 (download_tracepoints): Move some code to ...
8442 (download_tracepoint_1): ... here. New.
8443
86a30030
YQ
84442011-11-08 Yao Qi <yao@codesourcery.com>
8445
8446 * remote-utils.c (relocate_instruction): A comment fix.
8447
8d26e50c
JB
84482011-11-07 Joel Brobecker <brobecker@adacore.com>
8449
8450 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8451 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8452 dr_status_mirror and dr_control_mirror from debug_reg_state.
8453 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8454 (i386_initial_stuff): Remove use of deleted globals.
8455 (i386_get_thread_context, i386_set_thread_context,
8456 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8457 from debug_reg_state.
8458
a59306a3
YQ
84592011-11-05 Yao Qi <yao@codesourcery.com>
8460
8461 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8462 address as TPOINT's.
8463
3065dfb6
SS
84642011-11-02 Stan Shebs <stan@codesourcery.com>
8465
8466 * tracepoint.c (agent_mem_read_string): New function.
8467 (eval_agent_expr): Call it for tracenz.
8468 * server.c (handle_query): Report support for tracenz.
8469
fd0d8c7c
YQ
84702011-11-02 Yao Qi <yao@codesourcery.com>
8471
8472 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8473
609086b1
YQ
84742011-11-02 Yao Qi <yao@codesourcery.com>
8475
8476 * target.h: Fix a typo in comment.
8477
b9fd1791
PA
84782011-10-31 Pedro Alves <pedro@codesourcery.com>
8479
8480 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8481 clobber the breakpoints' shadows with fast tracepoint jumps.
8482 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8483 * target.c (write_inferior_memory): Also pass MYADDR down to
8484 check_mem_write.
8485
03583c20
UW
84862011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8487
8488 * configure.ac: Check support for personality routine.
8489 * configure: Regenerate.
8490 * config.in: Likewise.
8491 * linux-low.c: Include <sys/personality.h>.
8492 Define ADDR_NO_RANDOMIZE if necessary.
8493 (linux_create_inferior): Disable address space randomization when
8494 forking inferior, if requested.
8495 (linux_supports_disable_randomization): New function.
8496 (linux_target_ops): Install it.
8497 * server.h (disable_randomization): Declare.
8498 * server.c (disable_randomization): New global variable.
8499 (handle_general_set): Handle QDisableRandomization.
8500 (handle_query): Likewise for qSupported.
8501 (main): Support --disable-randomization and --no-disable-randomization
8502 command line arguments.
8503 * target.h (struct target_ops): Add supports_disable_randomization.
8504 (target_supports_disable_randomization): New macro.
8505
723b724b
MF
85062011-09-29 Mike Frysinger <vapier@gentoo.org>
8507
8508 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8509 ifdef check.
8510 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8511 [!PT_GETDSBT] (target_loadmap): New definition.
8512 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8513 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8514 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8515 and PT_GETDSBT to LINUX_LOADMAP.
8516 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8517 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8518
55329a5c 85192011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
8520
8521 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8522 (arm_linux_hwbp_cap): New static variable.
8523 (arm_linux_get_hwbp_cap): Replace by ...
8524 (arm_linux_init_hwbp_cap): ... this new function.
8525 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8526 (arm_linux_get_hw_watchpoint_count): Likewise.
8527 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8528 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8529 (arm_prepare_to_resume): Use perror_with_name instead of error.
8530
55329a5c 85312011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
8532
8533 * linux-arm-low.c: Include <signal.h>.
8534 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8535 (struct arm_linux_hwbp_cap): New data type.
8536 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8537 (struct arm_linux_hw_breakpoint): New data type.
8538 (MAX_BPTS, MAX_WPTS): Define.
8539 (struct arch_process_info, struct arch_lwp_info): New data types.
8540 (arm_linux_get_hwbp_cap): New function.
8541 (arm_linux_get_hw_breakpoint_count): Likewise.
8542 (arm_linux_get_hw_watchpoint_count): Likewise.
8543 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8544 (arm_hwbp_control_initialize): Likewise.
8545 (arm_hwbp_control_is_enabled): Likewise.
8546 (arm_hwbp_control_is_initialized): Likewise.
8547 (arm_hwbp_control_disable): Likewise.
8548 (arm_linux_hw_breakpoint_equal): Likewise.
8549 (arm_linux_hw_point_initialize): Likewise.
8550 (struct update_registers_data): New data structure.
8551 (update_registers_callback: New function.
8552 (arm_insert_point): Likewise.
8553 (arm_remove_point): Likewise.
8554 (arm_stopped_by_watchpoint): Likewise.
8555 (arm_stopped_data_address): Likewise.
8556 (arm_new_process): Likewise.
8557 (arm_new_thread): Likewise.
8558 (arm_prepare_to_resume): Likewise.
8559 (the_low_target): Register arm_insert_point, arm_remove_point,
8560 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8561 arm_new_thread, and arm_prepare_to_resume.
8562
6b9801d4
SS
85632011-09-15 Stan Shebs <stan@codesourcery.com>
8564
8565 * server.h (struct emit_ops): Add compare-goto fields.
8566 * tracepoint.c (gdb_agent_op_sizes): New table.
8567 (emit_eq_goto): New function.
8568 (emit_ne_goto): New function.
8569 (emit_lt_goto): New function.
8570 (emit_le_goto): New function.
8571 (emit_gt_goto): New function.
8572 (emit_ge_goto): New function.
8573 (is_goto_target): New function.
8574 (compile_bytecodes): Recognize special cases of compare-goto
8575 combinations and call specialized emitters for them.
8576 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8577 (amd64_emit_ne_goto): New function.
8578 (amd64_emit_lt_goto): New function.
8579 (amd64_emit_le_goto): New function.
8580 (amd64_emit_gt_goto): New function.
8581 (amd64_emit_ge_goto): New function.
8582 (amd64_emit_ops): Add the new functions.
8583 (i386_emit_eq_goto): New function.
8584 (i386_emit_ne_goto): New function.
8585 (i386_emit_lt_goto): New function.
8586 (i386_emit_le_goto): New function.
8587 (i386_emit_gt_goto): New function.
8588 (i386_emit_ge_goto): New function.
8589 (i386_emit_ops): Add the new functions.
8590
bf15cbda
SS
85912011-09-08 Stan Shebs <stan@codesourcery.com>
8592
8593 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8594 (i386_emit_epilogue): Restore %ebx.
8595
943ca1dd
JZ
85962011-08-31 Jie Zhang <jzhang918@gmail.com>
8597
8598 * server.c (step_thread): Remove definition.
8599 (process_serial_event): Don't handle Hs.
8600 * server.h (step_thread): Remove declaration.
8601 * target.c (set_desired_inferior): Remove use of step_thread.
8602
e3deef73
LM
86032011-08-24 Luis Machado <lgustavo@codesourcery.com>
8604
8605 * linux-low.c: Include linux-procfs.h.
8606 (linux_attach_lwp_1): Update comments.
8607 (linux_attach): Scan for existing threads when attaching to a
8608 process that is the tgid.
8609 * Makefile.in: Update dependencies.
8610
13da1c97
LM
86112011-08-24 Luis Machado <lgustavo@codesourcery.com>
8612
8613 * configure.srv: Add linux-procfs.o dependencies.
8614
881127c9
YQ
86152011-08-14 Yao Qi <yao@codesourcery.com>
8616
8617 * target.h (struct target_ops): Fix indent.
8618 * win32-low.c (win32_target_ops): Fix comment.
8619
58dbd541
YQ
86202011-08-14 Andrew Jenner <andrew@codesourcery.com>
8621 Yao Qi <yao@codesourcery.com>
8622
8623 * Makefile.in (clean): Remove tic6x-*.c files.
8624 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8625 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8626 (tic6x-c64xp-linux.c): Likewise.
8627 * configure.srv: Add support for tic6x-*-uclinux.
8628 * linux-tic6x-low.c: New.
8629 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8630
78d85199
YQ
86312011-08-14 Andrew Stubbs <ams@codesourcery.com>
8632 Yao Qi <yao@codesourcery.com>
8633
8634 * target.h (struct target_ops): Add read_loadmap.
8635 * linux-low.c (struct target_loadseg): New type.
8636 (struct target_loadmap): New type.
8637 (linux_read_loadmap): New function.
8638 (linux_target_ops): Add linux_read_loadmap.
8639 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
8640 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8641 to NULL.
78d85199 8642
a959a88d
EZ
86432011-08-05 Eli Zaretskii <eliz@gnu.org>
8644
8645 * win32-low.c: Include <stdint.h>.
8646
1ced966e
PA
86472011-07-22 Pedro Alves <pedro@codesourcery.com>
8648
8649 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8650 to the inferior here.
8651 (i386_remove_aligned_watchpoint): Ditto.
8652 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8653 fit part of the watchpoint in the debug registers.
8654 (i386_update_inferior_debug_regs): New.
8655 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8656 registers, and only update the inferior on success.
8657 (i386_low_remove_watchpoint): Ditto.
8658
d26e3629
KY
86592011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8660
8661 * linux-low.c (compare_ints, unique, list_threads, show_process,
8662 linux_core_of_thread): Delete.
8663 (linux_target_ops): Change linux_core_of_thread to
8664 linux_common_core_of_thread.
8665 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8666 * utils.c (malloc_failure): Change type of argument.
8667 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8668 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8669 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8670 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8671 (IPA_OBJS): Add common-utils-ipa.o.
8672 (ptid_h, linux_osdata_h): New macros.
8673 (server_h): Add common/common-utils.h, common/xml-utils.h,
8674 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8675 common/ptid.h.
8676 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8677 ptid.o, buffer.o): New rules.
8678 (linux-low.o): Add common/linux-osdata.h as a dependency.
8679 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8680 * configure.ac: Add AC_HEADER_DIRENT check.
8681 * config.in: Regenerate.
8682 * configure: Regenerate.
8683 * remote-utils.c (xml_escape_text): Delete.
8684 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8685 buffer_xml_printf): Move to common/buffer.c.
8686 * server.c (main): Remove call to initialize_inferiors.
8687 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8688 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8689 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8690 internal_error, gdb_assert, gdb_assert_fail): Delete.
8691 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8692 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8693 common/buffer.h.
8694 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8695 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8696 initialize_inferiors): Delete.
8697
2275a1a7
PA
86982011-07-20 Pedro Alves <pedro@codesourcery.com>
8699
8700 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8701 symbol error.
8702
0a5b1e09
PA
87032011-05-31 Pedro Alves <pedro@codesourcery.com>
8704
8705 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8706 assertion.
8707 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8708
6938fd34
YQ
87092011-05-26 Yao Qi <yao@codesourcery.com>
8710
8711 * Makefile.in (thread-db.o): Track dependence to
8712 common/gdb_thread_db.h.
8713 * thread-db.c: include gdb_thread_db.h from right place.
8714
b481f9e0
TT
87152011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8716
8717 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8718 __FILE__ and __LINE__ to internal_error.
8719
98a5dd13
DE
87202011-05-13 Doug Evans <dje@google.com>
8721
8722 * thread-db.c (try_thread_db_load_from_sdir): New function.
8723 (try_thread_db_load_from_dir): New function.
8724 (thread_db_load_search): Handle $sdir, ignore $pdir.
8725 Remove trying of system directories if search of
8726 libthread-db-search-path fails, that is now done via $sdir.
8727
d248b706
KY
87282011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8729
8730 * server.c (handle_query): Add EnableDisableTracepoints to the list
8731 of supported features.
43aaf8b6 8732 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 8733 tracepoints.
43aaf8b6
PA
8734 (cmd_qtenable_disable): New.
8735 (cmd_qtstart): Install tracepoints even if disabled.
8736 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8737 receiving a QTEnable or QTDisable packet.
8738 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8739 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8740 tracepoints.
8741 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 8742
84e578fb
DE
87432011-05-10 Doug Evans <dje@google.com>
8744
8745 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8746
71f55dd8
DE
87472011-05-04 Doug Evans <dje@google.com>
8748
8749 * linux-low.c (linux_join): Skip process lookup.
8750 * spu-low.c (spu_join): Ditto.
8751 * server.c (join_inferiors_callback): Delete.
8752 (process_serial_event): For 'D' packet (detach) call join_inferior
8753 directly.
8754
4d393d60
JM
87552011-05-04 Joseph Myers <joseph@codesourcery.com>
8756
8757 * README: Don't mention xscale*-*-linux*.
8758 * configure.srv (xscale*-*-linux*): Don't handle target.
8759
b00ad6ff
NF
87602011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8761
8762 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8763 casting pointers.
8764 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8765 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8766 (i386_emit_void_call_2): Likewise.
8767
af96c192
YQ
87682011-04-26 Yao Qi <yao@codesourcery.com>
8769
43aaf8b6
PA
8770 * linux-low.c: Move common macros to linux-ptrace.h.
8771 Include linux-ptrace.h.
af96c192
YQ
8772 * Makefile.in (linux_ptrace_h): New.
8773 (linux-low.o): Depends on linux-ptrace.h.
8774
03f2bd59
JK
87752011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8776
8777 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8778 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8779 (remote_prepare): New function with most of the TCP code from ...
8780 (remote_open): ... here. Detect PORT here unconditionally. Move also
8781 setting transport_is_reliable.
8782 * server.c (run_once): New variable.
8783 (gdbserver_usage): Document it.
8784 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8785 the first run if RUN_ONCE.
8786 * server.h (run_once, remote_prepare): New declarations.
8787
7a9dd1b2
TT
87882011-04-19 Tom Tromey <tromey@redhat.com>
8789
8790 * win32-low.c (handle_load_dll): Remove duplicate "the".
8791
81239425
PM
87922011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8793
8794 Remove support for old Cygwin 1.5 versions.
8795 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8796 function to avoid warning.
8797 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8798 warning.
8799
9e0627f1
PM
88002011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8801
8802 * gdbserver/server.h (Macro _): Define it if not available.
8803
588eebee
MS
88042011-03-14 Michael Snyder <msnyder@vmware.com>
8805
348af9f7 8806 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 8807
43f70d4c
JB
88082011-03-10 Joel Brobecker <brobecker@adacore.com>
8809
8810 * Makefile.in (maintainer-clean realclean distclean): Remove
8811 "make ... subdir_do" command.
8812
348af9f7
MS
88132011-03-10 Michael Snyder <msnyder@vmware.com>
8814
8815 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8816
8817 * server.c (handle_v_run): Free alloced buffer on early return.
8818
e637a4f5
YQ
88192011-03-09 Yao Qi <yao@codesourcery.com>
8820
8821 Revert:
8822 2011-03-04 Yao Qi <yao@codesourcery.com>
8823
8824 * Makefile.in: Remove GNU make feature --directory.
8825
8826 2011-03-05 Yao Qi <yao@codesourcery.com>
8827
8828 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8829 (subdir_do): New make target. Copied from gdb/Makefile.
8830 (maintainer-clean, realclean, distclean, clean): Call corresponding
8831 make targets in common/Makefile.
8832
8833 2011-02-11 Yao Qi <yao@codesourcery.com>
8834
8835 * configure.ac: Call AC_PROG_RANLIB.
8836 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8837 * configure: Regenerate.
8838
e6edda56
JK
88392011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8840
8841 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8842
e5141119
JB
88432011-03-06 Yao Qi <yao@codesourcery.com>
8844
8845 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8846
64794aa4
JB
88472011-03-05 Yao Qi <yao@codesourcery.com>
8848
8849 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8850 (subdir_do): New make target. Copied from gdb/Makefile.
8851 (maintainer-clean, realclean, distclean, clean): Call corresponding
8852 make targets in common/Makefile.
8853
7a762829
YQ
88542011-03-04 Yao Qi <yao@codesourcery.com>
8855
8856 * Makefile.in: Remove GNU make feature --directory.
8857
348af9f7
MS
88582011-03-04 Michael Snyder <msnyder@vmware.com>
8859
8860 * server.c (queue_stop_reply): Call xmalloc not malloc.
8861
88622011-03-02 Michael Snyder <msnyder@vmware.com>
8863
8864 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8865
9f72fee2
MS
88662011-02-28 Michael Snyder <msnyder@vmware.com>
8867
588eebee
MS
8868 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8869 (cmd_qtframe): Ditto.
8870 (cmd_qtbuffer): Ditto.
8871 (cmd_bigqtbuffer): Ditto.
8872
9f72fee2
MS
8873 * utils.c (decimal2str): Initialize 'width' to nine, then
8874 don't mess with it.
8875
8040bd49
UW
88762011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8877
8878 * hostio.c (require_data): Free *data, not data.
8879
7e52cbd0
JK
88802011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8881
8882 * hostio.c (require_data): Use free, not xfree.
8883
9130f83e
MS
88842011-02-27 Michael Snyder <msnyder@vmware.com>
8885
4b812f4e
MS
8886 * server.c (handle_query): Discard unused value.
8887
9130f83e
MS
8888 * hostio.c (require_data): Free malloc memory before returning
8889 error.
8890
69d37113
MS
88912011-02-26 Michael Snyder <msnyder@vmware.com>
8892
8893 * linux-low.c (list_threads): Call closedir for dirent.
8894
35f5825a
MS
88952011-02-27 Michael Snyder <msnyder@vmware.com>
8896
2a589cef
MS
8897 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8898 a case statement falls through.
8899
0adea5f7
MS
8900 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8901
35f5825a
MS
8902 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8903 in comparison.
8904
238f1c74
MS
89052011-02-26 Michael Snyder <msnyder@vmware.com>
8906
8907 * utils.c (decimal2str): Eliminate dead code and dead param.
8908 (pulongest): Drop dead param from call to decimal2str.
8909 (plongest): Ditto.
8910
633ff500
JB
89112011-02-24 Joel Brobecker <brobecker@adacore.com>
8912
8913 Revert the following patch (not approved yet):
8914 2011-02-21 Hui Zhu <teawater@gmail.com>
8915 * tracepoint.c (tp_printf): New function.
8916 (eval_agent_expr): Handle gdb_agent_op_printf.
8917
f9c6ff72
HZ
89182011-02-21 Hui Zhu <teawater@gmail.com>
8919
8920 * tracepoint.c (tp_printf): New function.
8921 (eval_agent_expr): Handle gdb_agent_op_printf.
8922
94d5e490
TT
89232011-02-18 Tom Tromey <tromey@redhat.com>
8924
8925 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8926 (tracepoint.o): Likewise.
8927 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8928 (gdb_agent_op_names): Likewise.
8929
c7f96d2b
TT
89302011-02-18 Tom Tromey <tromey@redhat.com>
8931
8932 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8933 gdb_agent_op_rot>: New constants.
8934 (gdb_agent_op_names): Add pick and roll.
8935 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8936 cases.
8937
0feedb2c
JK
89382011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8939
8940 * aclocal.m4: Regenerated with aclocal-1.11.1.
8941
b3b9301e
PA
89422011-02-14 Pedro Alves <pedro@codesourcery.com>
8943
8944 * server.c (handle_qxfer_traceframe_info): New.
8945 (qxfer_packets): Register "traceframe-info".
8946 (handle_query): Report support for qXfer:traceframe-info:read+.
8947 * tracepoint.c (match_blocktype): New.
8948 (traceframe_find_block_type): Rename to ...
8949 (traceframe_walk_blocks): ... this. Add callback filter argument,
8950 and use it.
8951 (traceframe_find_block_type): New, reimplemented on top of
8952 traceframe_walk_blocks.
8953 (build_traceframe_info_xml): New.
8954 (traceframe_read_info): New.
8955 * server.h (traceframe_read_info): Declare.
8956
4f3e6fb7
YQ
89572011-02-11 Yao Qi <yao@codesourcery.com>
8958
8959 * configure.ac: Call AC_PROG_RANLIB.
8960 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8961 * configure: Regenerate.
8962
764880b7
PA
89632011-02-07 Pedro Alves <pedro@codesourcery.com>
8964
8965 * server.c (gdb_read_memory): Change return semantics to allow
8966 partial transfers.
8967 (handle_search_memory_1): Adjust.
8968 (process_serial_event) <'m' packet>: Handle partial transfers.
8969 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8970
1c79eb8a
PA
89712011-01-28 Pedro Alves <pedro@codesourcery.com>
8972
8973 * regcache.c (init_register_cache): Initialize
8974 regcache->register_status.
8975 (free_register_cache): Release regcache->register_status.
8976 (regcache_cpy): Copy register_status.
8977 (registers_to_string): Print 'x's for unavailable registers.
8978 (supply_register): Mark the register's status valid or
8979 unavailable, depending on whether a buffer was passed in or not.
8980 (supply_register_zeroed): New.
8981 (supply_regblock): Mark the registers' status valid or
8982 unavailable, depending on whether a buffer was passed in or not.
8983 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8984 (struct regcache): New `register_status' field.
8985 (supply_register_zeroed): Declare.
8986 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8987 supply_register_zeroed, rather than passing a NULL buffer to
8988 supply_register.
8989 * tracepoint.c (fetch_traceframe_registers): Update comment.
8990
85724a0e
PA
89912011-01-28 Pedro Alves <pedro@codesourcery.com>
8992
8993 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8994 buffer explicit.
8995
d08aafef
PA
89962011-01-25 Pedro Alves <pedro@codesourcery.com>
8997
8998 * server.h (decode_xfer_write): Change prototype.
8999 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9000 and don't extract the annex here.
9001 * server.c (decode_xfer_read): Remove `annex' parameter,
9002 and don't extract the annex here.
9003 (decode_xfer): New.
9004 (struct qxfer): New.
9005 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9006 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9007 (handle_qxfer_statictrace): New functions, abstracted out from
9008 handle_query, and made to use the struct qxfer interface.
9009 (handle_threads_qxfer_proper): Rename to ...
9010 (handle_qxfer_threads_proper): ... this.
9011 (handle_threads_qxfer): Rename to ...
9012 (handle_qxfer_threads): ... this. Adjust.
9013 (qxfer_packets): New array.
9014 (handle_qxfer): New function.
9015 (handle_query): Use handle_qxfer.
9016
493e2a69
MS
90172011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9018
9019 * gdbreplay.c: Shorten lines of >= 80 columns.
9020 * linux-low.c: Ditto.
9021 * linux-ppc-low.c: Ditto.
9022 * linux-s390-low.c: Ditto.
9023 * linux-sparc-low.c: Ditto.
9024 * linux-x86-low.c: Ditto.
9025 * linux-xtensa-low.c: Ditto.
9026 * mem-break.c: Ditto.
9027 * nto-low.c: Ditto.
9028 * regcache.h: Ditto.
9029 * remote-utils.c: Ditto.
9030 * server.c: Ditto.
9031 * server.h: Ditto.
9032 * thread-db.c: Ditto.
9033 * tracepoint.c: Ditto.
9034 * utils.c: Ditto.
9035 * win32-low.h: Ditto.
9036
44944448
JB
90372011-01-05 Joel Brobecker <brobecker@adacore.com>
9038
9039 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9040 update.
9041
71ce852c
JB
90422011-01-01 Joel Brobecker <brobecker@adacore.com>
9043
9044 * server.c (gdbserver_version): Update copyright year in version
9045 output.
9046 * gdbreplay.c (gdbreplay_version): Ditto.
9047
eb826dc6
MF
90482010-12-29 Jie Zhang <jie.zhang@analog.com>
9049
9050 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9051 * linux-bfin-low.c: New file.
9052 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9053 PT_DATA_ADDR for BFIN targets.
9054 * Makefile.in (SFILES): Add linux-bfin-low.c.
9055 (clean): Remove reg-bfin.c.
9056 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9057 * README: Mention supported Blackfin targets.
9058
39ab222a
MF
90592010-12-23 Mike Frysinger <vapier@gentoo.org>
9060
9061 * .gitignore: New file.
9062
a1f2ce7d
MF
90632010-11-16 Mike Frysinger <vapier@gentoo.org>
9064
9065 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9066
f474844c
JZ
90672010-10-22 Jie Zhang <jie@codesourcery.com>
9068
9069 * Makefile.in: Add FLAGS_TO_PASS variable.
9070 (install): Remove dependency of install-only and recursively
9071 invoke make for install-only.
9072
f1048712
DE
90732010-10-04 Doug Evans <dje@google.com>
9074
9075 * Makefile.in (uninstall): Use $(DESTDIR).
9076
b53a1623
PA
90772010-09-24 Pedro Alves <pedro@codesourcery.com>
9078
e6ee044d
PA
9079 PR gdb/11842
9080
b53a1623
PA
9081 * linux-x86-low.c (compat_siginfo_from_siginfo)
9082 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9083 si_code is < 0. Check for si_code == SI_TIMER before checking for
9084 si_code < 0.
9085
fa1bd1e4
JB
90862010-09-13 Joel Brobecker <brobecker@adacore.com>
9087
9088 * lynx-i386-low.c: New file.
9089 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9090
47fac8f8
JB
90912010-09-13 Joel Brobecker <brobecker@adacore.com>
9092
9093 * lynx-low.c (ptrace_request_to_str): Remove handling for
9094 request values that have been removed in LynxOS 5.x.
9095
1adfc54d
JB
90962010-09-13 Joel Brobecker <brobecker@adacore.com>
9097
9098 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9099 <ptrace.h>
9100
c2a66c29
NS
91012010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9102
9103 * configure.ac: Add --enable-inprocess-agent option.
9104 * configure: Rebuilt.
9105
32fcada3
YQ
91062010-09-06 Yao Qi <yao@codesourcery.com>
9107
9108 * linux-low.c (linux_kill): Remove unused variable.
9109 (linux_stabilize_threads): Likewise.
9110 * server.c (start_inferior): Likewise.
9111 (queue_stop_reply_callback): Likewise.
9112 * tracepoint.c (do_action_at_tracepoint): Likewise.
9113
0cccb683
YQ
91142010-09-06 Yao Qi <yao@codesourcery.com>
9115
9116 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9117 on return.
9118
423ec54c
JK
91192010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9120
9121 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9122
12ac6819
PA
91232010-09-06 Pedro Alves <pedro@codesourcery.com>
9124
9125 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9126 "$(IPA_DEPFILES)".
9127
8ed54b31
JB
91282010-09-01 Joel Brobecker <brobecker@adacore.com>
9129
9130 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9131 gdbserver/lynx-ppc-low.c: New files.
9132 * Makefile.in (lynx_low_h): New variable.
9133 (lynx-low.o, lynx-ppc-low.o): New rules.
9134 * configure.ac: On LynxOS, link with -lnetinet.
9135 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9136 * configure: regenerate.
9137
bb0116a4
JB
91382010-09-01 Joel Brobecker <brobecker@adacore.com>
9139
9140 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9141 * configure.ac: Add check for vasprintf and vsnprintf.
9142 * configure, config.in: Regenerate.
9143 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9144
a778ab81 91452010-09-01 Joel Brobecker <brobecker@adacore.com>
9146
9147 * gdbreplay.c: Move include of alloca.h up, next to include of
9148 malloc.h.
9149 * server.h: Add include of malloc.h.
9150 * mem-break.c: Remove include of malloc.h.
9151 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9152
8b034a19 91532010-09-01 Joel Brobecker <brobecker@adacore.com>
9154
9155 * Makefile.in (memmem.o): Build with -Wno-error.
9156
91572010-09-01 Joel Brobecker <brobecker@adacore.com>
9158
9159 * utils.c (xsnprintf): Make non-static.
9160 * server.h: Add xsnprintf declaration.
9161 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9162 replace calls to snprintf by calls to xsnprintf throughout.
9163
91642010-09-01 Joel Brobecker <brobecker@adacore.com>
9165
9166 * configure.ac: Add configure check for alloca.
9167 * configure, config.in: Regenerate.
9168 * server.h: Include alloca.h if it exists.
9169 * gdbreplay.c: Include alloca.h if it exists.
9170
1a981360
PA
91712010-08-28 Pedro Alves <pedro@codesourcery.com>
9172
9173 * linux-low.c (__SIGRTMIN): Define if not already defined.
9174 (linux_create_inferior): Check for __ANDROID__ rather than
9175 __SIGRTMIN.
9176 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9177 are already deferred.
9178 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9179 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9180 stopped and already has a pending signal to report.
9181 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9182 a pending signal to report or is moving out of a jump pad.
9183 (linux_init_signals): Check for __ANDROID__ rather than
9184 __SIGRTMIN.
9185
b4d51a55
PA
91862010-08-28 Pedro Alves <pedro@codesourcery.com>
9187
9188 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9189 debug_threads check. Avoid a linear search when not doing debug
9190 output.
9191
ec48365d
PA
91922010-08-27 Pedro Alves <pedro@codesourcery.com>
9193
9194 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9195 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9196 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9197 (process_event): Change local fd's type to gdb_fildes_t.
9198 (create_file_handler): Adjust prototype.
9199 (delete_file_handler): Adjust prototype.
9200 (handle_file_event): Adjust prototype. Use pfildes.
9201 (create_file_event): Adjsut prototype.
9202 * remote-utils.c (remote_desc, listen_desc): Change type to
9203 gdb_fildes_t.
9204 * server.h: New gdb_fildes_t typedef.
9205 [USE_WIN32API]: Include winsock2.h.
9206 (delete_file_handler, add_file_handler): Adjust prototypes.
9207 (pfildes): Declare.
9208 * utils.c (pfildes): New.
9209
854d88f0
PA
92102010-08-27 Pedro Alves <pedro@codesourcery.com>
9211
9212 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9213 * configure: Regenerate.
9214
0146f85b
PA
92152010-08-27 Pedro Alves <pedro@codesourcery.com>
9216
9217 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9218 (linux_done_accessing_memory): ... this.
9219 (linux_target_ops): Adjust.
9220 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9221 * nto-low.c (nto_target_ops): Adjust comment.
9222 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9223 * spu-low.c (spu_target_ops): Adjust comment.
9224 * target.h (target_ops): Rename unprepare_to_access_memory field
9225 to done_accessing_memory.
9226 (unprepare_to_access_memory): Rename to ...
9227 (done_accessing_memory): ... this.
9228
90d74c30
PA
92292010-08-26 Pedro Alves <pedro@codesourcery.com>
9230
9231 * linux-low.c (linux_prepare_to_access_memory): New.
9232 (linux_unprepare_to_access_memory): New.
9233 (linux_target_ops): Install them.
9234 * server.c (read_memory): Rename to ...
9235 (gdb_read_memory): ... this. Use
9236 prepare_to_access_memory/prepare_to_access_memory.
9237 (write_memory): Rename to ...
9238 (gdb_write_memory): ... this. Use
9239 prepare_to_access_memory/prepare_to_access_memory.
9240 (handle_search_memory_1): Adjust.
9241 (process_serial_event): Adjust.
9242 * target.h (struct target_ops): New fields
9243 prepare_to_access_memory and unprepare_to_access_memory.
9244 (prepare_to_access_memory, unprepare_to_access_memory): New.
9245 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9246 prepare_to_access_memory/prepare_to_access_memory.
9247 * nto-low.c (nto_target_ops): Adjust.
9248 * spu-low.c (spu_target_ops): Adjust.
9249 * win32-low.c (win32_target_ops): Adjust.
9250
fd467969
PA
92512010-08-26 Pedro Alves <pedro@codesourcery.com>
9252
9253 * Makefile.in (WARN_CFLAGS): Get it from configure.
9254 (WERROR_CFLAGS): New.
9255 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9256 * configure.ac: Introduce --enable-werror, which adds -Werror to
9257 the compiler command line. Enabled by default. Disable with
9258 --disable-werror. Add -Wdeclaration-after-statement
9259 Wpointer-arith and -Wformat-nonliteral to warning flags.
9260 * configure: Regenerate.
9261
331e2f5f
PA
92622010-08-26 Pedro Alves <pedro@codesourcery.com>
9263
9264 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9265
e581f2b4
PA
92662010-08-26 Pedro Alves <pedro@codesourcery.com>
9267
9268 * gdbreplay.c (remote_error): New.
9269 (gdbchar): New.
9270 (expect): Use gdbchar. Check for error reading from GDB.
9271 Clarify sync error output.
9272 (play): Check for errors writing to GDB.
9273 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9274 * remote-utils.c (getpkt): Check for errors writing to the remote
9275 descriptor.
9276
3c11dd79
PA
92772010-08-25 Pedro Alves <pedro@codesourcery.com>
9278
9279 * linux-low.c (linux_wait_1): Move non-debugging code out of
9280 `debug_threads' control.
9281
d20a8ad9
PA
92822010-08-25 Pedro Alves <pedro@codesourcery.com>
9283
9284 * linux-low.c (linux_wait_1): Don't set last_status here.
9285 * server.c (push_event, queue_stop_reply_callback): Assert we're
9286 not pushing a TARGET_WAITKIND_IGNORE event.
9287 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9288 (myresume, handle_target_event): Set the thread's last_resume_kind
9289 and last_status from the target returned status.
9290
964e4306
PA
92912010-08-25 Pedro Alves <pedro@codesourcery.com>
9292
9293 PR threads/10729
9294
9295 * linux-x86-low.c (update_debug_registers_callback): New.
9296 (i386_dr_low_set_addr): Use it.
9297 (i386_dr_low_get_addr): New.
9298 (i386_dr_low_set_control): Use update_debug_registers_callback.
9299 (i386_dr_low_get_control): New.
9300 (i386_dr_low_get_status): Adjust.
9301 * linux-low.c (linux_stop_lwp): New.
9302 * linux-low.h (linux_stop_lwp): Declare.
9303
9304 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9305 argument instead of a i386_debug_reg_state.
9306 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9307 a i386_debug_reg_state.
9308 (i386_insert_aligned_watchpoint): Adjust.
9309 (i386_remove_aligned_watchpoint): Adjust.
9310 (i386_low_stopped_data_address): Read the debug registers from the
9311 inferior instead of from the mirrors.
9312 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9313 (i386_dr_low_get_addr): Declare.
9314 (i386_dr_low_get_control): Declare.
9315 (i386_dr_low_get_status): Change prototype.
9316
9317 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9318 (i386_dr_low_get_addr): New.
9319 (i386_dr_low_get_control): New.
9320 (i386_dr_low_get_status): Adjust prototype. Return
9321 dr_status_mirror.
9322 (i386_initial_stuff): Clear dr_status_mirror and
9323 dr_control_mirror.
9324 (i386_get_thread_context): Adjust.
9325 (i386_set_thread_context): Adjust.
9326 (i386_thread_added): Adjust.
9327
5f21a75b
PA
93282010-08-24 Pedro Alves <pedro@codesourcery.com>
9329
9330 * linux-low.h (linux_thread_area): Delete declaration.
9331
3e4c1235
TS
93322010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9333
9334 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9335 after its termination.
9336
1971b033
PA
93372010-08-09 Pedro Alves <pedro@codesourcery.com>
9338
9339 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9340 (gdb_wants_all_stopped): Delete.
9341 (linux_wait_1): Don't call them.
9342 * server.c (handle_v_cont): Tag all threads as want-stopped.
9343 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9344 stopped as "client-wants-stopped".
9345
310444ac
PA
93462010-07-31 Pedro Alves <pedro@codesourcery.com>
9347
9348 * Makefile.in (signals_h): New.
9349 (server_h): Depend on it.
9350 (server.o): Don't depend on $(signals_def).
9351 (signals.o): Depend on $(signals_def).
9352
a19cae16
JK
93532010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9354
9355 * Makefile.in (signals_def): New.
9356 (server_h): Append include/gdb/signals.h and signals_def.
9357 (server.o): Append signals_def.
9358
30d50328
JK
93592010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9360
9361 * server.c (handle_target_event): Use target_signal_to_host for
9362 resume_info.sig initialization.
9363 * target.h (struct thread_resume) <sig>: New comment.
9364
5c3216e2
OS
93652010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9366
c6f46ca0
OS
9367 * server.c (handle_query): strcpy() the returned string from paddress()
9368 instead of sprintf().
5c3216e2
OS
9369 * utils.c (paddress): Return phex_nz().
9370
6bd31874
JB
93712010-07-07 Joel Brobecker <brobecker@adacore.com>
9372
9373 * server.c (handle_v_cont): Call mourn_inferior if process
9374 just exited.
9375 (myresume): Likewise.
9376
0fb4aa4b
PA
93772010-07-01 Pedro Alves <pedro@codesourcery.com>
9378
9379 Static tracepoints, and integration with UST.
9380
9381 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9382 * mem-break.c (uninsert_all_breakpoints)
9383 (reinsert_all_breakpoints): New.
9384 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9385 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9386 (gdb_agent_ust_loaded, helper_thread_id)
9387 (gdb_agent_helper_thread_id): New macros.
9388 (struct ipa_sym_addresses): Add addr_ust_loaded,
9389 addr_helper_thread_id, addr_cmd_buf.
9390 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9391 (in_process_agent_loaded_ust): New.
9392 (write_e_ust_not_loaded): New.
9393 (maybe_write_ipa_ust_not_loaded): New.
9394 (struct collect_static_trace_data_action): New.
9395 (enum tracepoint_type) <static_tracepoint>: New.
9396 (struct tracepoint) <handle>: Mention static tracepoints.
9397 (struct static_tracepoint_ctx): New.
9398 (CMD_BUF_SIZE): New.
9399 (add_tracepoint_action): Handle static tracepoint actions.
9400 (unprobe_marker_at): New.
9401 (clear_installed_tracepoints): Handle static tracepoints.
9402 (cmd_qtdp): Handle static tracepoints.
9403 (probe_marker_at): New.
9404 (cmd_qtstart): Handle static tracepoints.
9405 (response_tracepoint): Handle static tracepoints.
9406 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9407 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9408 (get_context_regcache): Handle static tracepoints.
9409 (do_action_at_tracepoint): Handle static tracepoint actions.
9410 (traceframe_find_block_type): Handle static trace data blocks.
9411 (traceframe_read_sdata): New.
9412 (download_tracepoints): Download static tracepoint actions.
9413 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9414 (GDB_PROBE_NAME): New.
9415 (ust_ops): New.
9416 (GET_UST_SYM): New.
9417 (USTF): New.
9418 (dlsym_ust): New.
9419 (ust_marker_to_static_tracepoint): New.
9420 (gdb_probe): New.
9421 (collect_ust_data_at_tracepoint): New.
9422 (gdb_ust_probe): New.
9423 (UNIX_PATH_MAX, SOCK_DIR): New.
9424 (gdb_ust_connect_sync_socket): New.
9425 (resume_thread, stop_thread): New.
9426 (run_inferior_command): New.
9427 (init_named_socket): New.
9428 (gdb_ust_socket_init): New.
9429 (cstr_to_hexstr): New.
9430 (next_st): New.
9431 (first_marker, next_marker): New.
9432 (response_ust_marker): New.
9433 (cmd_qtfstm, cmd_qtsstm): New.
9434 (unprobe_marker_at, probe_marker_at): New.
9435 (cmd_qtstmat, gdb_ust_thread): New.
9436 (gdb_ust_init): New.
9437 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9438 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9439 (ST_REGENTRY): New.
9440 (x86_64_st_collect_regmap): New.
9441 (X86_64_NUM_ST_COLLECT_GREGS): New.
9442 (AMD64_RIP_REGNUM): New.
9443 (supply_static_tracepoint_registers): New.
9444 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9445 (ST_REGENTRY): New.
9446 (i386_st_collect_regmap): New.
9447 (i386_NUM_ST_COLLECT_GREGS): New.
9448 (supply_static_tracepoint_registers): New.
9449 * server.c (handle_query): Handle qXfer:statictrace:read.
9450 <qSupported>: Report support for StaticTracepoints, and
9451 qXfer:statictrace:read features.
9452 * server.h (traceframe_read_sdata)
9453 (supply_static_tracepoint_registers): Declare.
9454 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9455 (unpack_varlen_hex): Include in IPA build.
9456 * Makefile.in (ustlibs, ustinc): New.
9457 (IPA_OBJS): Add remote-utils-ipa.o.
9458 ($(IPA_LIB)): Link -ldl and -lpthread.
9459 (UST_CFLAGS): New.
9460 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9461 * config.in, configure: Regenerate.
9462
9e4344e5
PA
94632010-06-20 Ian Lance Taylor <iant@google.com>
9464 Pedro Alves <pedro@codesourcery.com>
9465
9466 * linux-x86-low.c (always_true): Delete.
9467 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9468 trying to fool the compiler with always_true.
9469
c6beb2cb
PA
94702010-06-20 Pedro Alves <pedro@codesourcery.com>
9471
9472 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9473 conditions in gdbserver.
9474
d2ed6730
UW
94752010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9476
9477 * spu-low.c (spu_read_memory): Wrap around local store limit.
9478 (spu_write_memory): Likewise.
9479
4e29fb54
PA
94802010-06-15 Pedro Alves <pedro@codesourcery.com>
9481
9482 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9483 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9484 LONGEST uses.
9485 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9486 uses.
9487 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9488 uses with LONGEST uses.
9489
6a271cae
PA
94902010-06-14 Stan Shebs <stan@codesourcery.com>
9491 Pedro Alves <pedro@codesourcery.com>
9492
9493 Bytecode compiler.
9494
9495 * linux-x86-low.c: Include limits.h.
9496 (add_insns): New.
9497 (always_true): New.
9498 (EMIT_ASM): New.
9499 (EMIT_ASM32): New.
9500 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9501 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9502 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9503 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9504 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9505 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9506 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9507 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9508 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9509 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9510 (amd64_emit_void_call_2): New.
9511 (amd64_emit_ops): New.
9512 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9513 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9514 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9515 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9516 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9517 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9518 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9519 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9520 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9521 (i386_emit_stack_adjust, i386_emit_int_call_1)
9522 (i386_emit_void_call_2): New.
9523 (i386_emit_ops): New.
9524 (x86_emit_ops): New.
9525 (the_low_target): Install x86_emit_ops.
9526 * server.h (struct emit_ops): New.
9527 (get_raw_reg_func_addr): Declare.
9528 (current_insn_ptr, emit_error): Declare.
9529 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9530 (set_trace_state_variable_value): New defines.
9531 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9532 addr_get_trace_state_variable_value and
9533 addr_set_trace_state_variable_value.
9534 (symbol_list): New fields for get_raw_reg,
9535 get_trace_state_variable_value and set_trace_state_variable_value.
9536 (condfn): New typedef.
9537 (struct tracepoint): New field `compiled_cond'.
9538 (do_action_at_tracepoint): Clear compiled_cond.
9539 (get_trace_state_variable_value, set_trace_state_variable_value):
9540 Export in the IPA.
9541 (condition_true_at_tracepoint): If there's a compiled condition,
9542 run that.
9543 (current_insn_ptr, emit_error): New globals.
9544 (struct bytecode_address): New.
9545 (get_raw_reg_func_addr): New.
9546 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9547 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9548 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9549 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9550 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9551 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9552 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9553 (compile_tracepoint_condition, compile_bytecodes): New.
9554 * target.h (emit_ops): Forward declare.
9555 (struct target_ops): New field emit_ops.
9556 (target_emit_ops): New.
9557 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9558 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9559 * linux-low.c (linux_emit_ops): New.
9560 (linux_target_ops): Install it.
9561 * linux-low.h (struct linux_target_ops): New field emit_ops.
9562
92b72907
UW
95632010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9564
9565 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9566 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9567
fa593d66
PA
95682010-06-01 Pedro Alves <pedro@codesourcery.com>
9569 Stan Shebs <stan@codesourcery.com>
9570
9571 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9572 (all): Depend on $(extra_libraries).
9573 (install-only): Install the IPA.
9574 (IPA_OBJS, IPA_LIB): New.
9575 (clean): Remove the IPA lib.
9576 (IPAGENT_CFLAGS): New.
9577 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9578 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9579 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9580 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9581 * configure.ac: Check for atomic builtins support in the compiler.
9582 (IPA_DEPFILES, extra_libraries): Define.
9583 * configure.srv (ipa_obj): Add description.
9584 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9585 (i[34567]86-*-linux*): Set ipa_obj.
9586 (x86_64-*-linux*): Set ipa_obj.
9587 * linux-low.c (stabilizing_threads): New.
9588 (supports_fast_tracepoints): New.
9589 (linux_detach): Stabilize threads before detaching.
9590 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9591 the lwp is either not stabilizing, or is moving out of a jump pad.
9592 (linux_fast_tracepoint_collecting): New.
9593 (maybe_move_out_of_jump_pad): New.
9594 (enqueue_one_deferred_signal): New.
9595 (dequeue_one_deferred_signal): New.
9596 (linux_wait_for_event_1): If moving out of a jump pad, defer
9597 pending signals to later.
9598 (linux_stabilize_threads): New.
9599 (linux_wait_1): Check if threads need moving out of jump pads, and
9600 do it if so.
9601 (stuck_in_jump_pad_callback): New.
9602 (move_out_of_jump_pad_callback): New.
9603 (lwp_running): New.
9604 (linux_resume_one_lwp): Handle moving out of jump pads.
9605 (linux_set_resume_request): Dequeue deferred signals.
9606 (need_step_over_p): Also step over fast tracepoint jumps.
9607 (start_step_over): Also uninsert fast tracepoint jumps.
9608 (finish_step_over): Also reinsert fast tracepoint jumps.
9609 (linux_install_fast_tracepoint_jump): New.
9610 (linux_target_ops): Install linux_stabilize_threads and
9611 linux_install_fast_tracepoint_jump_pad.
9612 * linux-low.h (linux_target_ops) <get_thread_area,
9613 install_fast_tracepoint_jump_pad>: New fields.
9614 (struct lwp_info) <collecting_fast_tracepoint,
9615 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9616 (linux_get_thread_area): Declare.
9617 * linux-x86-low.c (jump_insn): New.
9618 (x86_get_thread_area): New.
9619 (append_insns): New.
9620 (push_opcode): New.
9621 (amd64_install_fast_tracepoint_jump_pad): New.
9622 (i386_install_fast_tracepoint_jump_pad): New.
9623 (x86_install_fast_tracepoint_jump_pad): New.
9624 (the_low_target): Install x86_get_thread_area and
9625 x86_install_fast_tracepoint_jump_pad.
9626 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9627 (struct fast_tracepoint_jump): New.
9628 (fast_tracepoint_jump_insn): New.
9629 (fast_tracepoint_jump_shadow): New.
9630 (find_fast_tracepoint_jump_at): New.
9631 (fast_tracepoint_jump_here): New.
9632 (delete_fast_tracepoint_jump): New.
9633 (set_fast_tracepoint_jump): New.
9634 (uninsert_fast_tracepoint_jumps_at): New.
9635 (reinsert_fast_tracepoint_jumps_at): New.
9636 (set_breakpoint_at): Use write_inferior_memory.
9637 (uninsert_raw_breakpoint): Use write_inferior_memory.
9638 (check_mem_read): Mask out fast tracepoint jumps.
9639 (check_mem_write): Mask out fast tracepoint jumps.
9640 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9641 (set_fast_tracepoint_jump): Declare.
9642 (delete_fast_tracepoint_jump)
9643 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9644 (reinsert_fast_tracepoint_jumps_at): Declare.
9645 * regcache.c: Don't compile many functions when building the
9646 in-process agent library.
9647 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9648 the register buffer in the heap.
9649 (free_register_cache): If the register buffer isn't owned by the
9650 regcache, don't free it.
9651 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9652 pre-existing register caches.
9653 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9654 type.
9655 (convert_ascii_to_int): : Constify `from' parameter type.
9656 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9657 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9658 the needed buffer in-place.
9659 (relocate_instruction): New.
9660 * server.c (handle_query) <qSymbols>: If the target supports
9661 tracepoints, give it a chance of looking up symbols. Report
9662 support for fast tracepoints.
9663 (handle_status): Stabilize threads.
9664 (process_serial_event): Adjust.
9665 * server.h (struct fast_tracepoint_jump): Forward declare.
9666 (struct process_info) <fast_tracepoint_jumps>: New field.
9667 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9668 (decode_X_packet, decode_M_packet): Adjust.
9669 (relocate_instruction): Declare.
9670 (in_process_agent_loaded): Declare.
9671 (tracepoint_look_up_symbols): Declare.
9672 (struct fast_tpoint_collect_status): Declare.
9673 (fast_tracepoint_collecting): Declare.
9674 (force_unlock_trace_buffer): Declare.
9675 (handle_tracepoint_bkpts): Declare.
9676 (initialize_low_tracepoint)
9677 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9678 * target.h (struct target_ops) <stabilize_threads,
9679 install_fast_tracepoint_jump_pad>: New fields.
9680 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9681 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9682 [HAVE_STDINT_H]: Include stdint.h.
9683 (trace_debug_1): Rename to ...
9684 (trace_vdebug): ... this.
9685 (trace_debug): Rename to ...
9686 (trace_debug_1): ... this. Add `level' parameter.
9687 (trace_debug): New.
9688 (ATTR_USED, ATTR_NOINLINE): New.
9689 (IP_AGENT_EXPORT): New.
9690 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9691 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9692 (about_to_request_buffer_space, trace_buffer_is_full)
9693 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9694 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9695 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9696 (traceframe_write_count, traceframes_created)
9697 (trace_state_variables)
9698 New renaming defines.
9699 (struct ipa_sym_addresses): New.
9700 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9701 (symbol_list): New.
9702 (ipa_sym_addrs): New.
9703 (all_tracepoint_symbols_looked_up): New.
9704 (in_process_agent_loaded): New.
9705 (write_e_ipa_not_loaded): New.
9706 (maybe_write_ipa_not_loaded): New.
9707 (tracepoint_look_up_symbols): New.
9708 (debug_threads) [IN_PROCESS_AGENT]: New.
9709 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9710 (UNKNOWN_SIDE_EFFECTS): New.
9711 (stop_tracing): New.
9712 (flush_trace_buffer): New.
9713 (stop_tracing_bkpt): New.
9714 (flush_trace_buffer_bkpt): New.
9715 (read_inferior_integer): New.
9716 (read_inferior_uinteger): New.
9717 (read_inferior_data_pointer): New.
9718 (write_inferior_data_pointer): New.
9719 (write_inferior_integer): New.
9720 (write_inferior_uinteger): New.
9721 (struct collect_static_trace_data_action): Delete.
9722 (enum tracepoint_type): New.
9723 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
9724 <actions_str, step_actions, step_actions_str>: Only include in
9725 GDBserver.
fa593d66
PA
9726 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9727 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9728 (tracepoints): Use IP_AGENT_EXPORT.
9729 (last_tracepoint): Don't include in the IPA.
9730 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9731 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9732 (alloced_trace_state_variables): New.
9733 (trace_state_variables): Use IP_AGENT_EXPORT.
9734 (traceframe_t): Delete unused variable.
9735 (circular_trace_buffer): Don't include in the IPA.
9736 (trace_buffer_start): Delete.
9737 (struct trace_buffer_control): New.
9738 (trace_buffer_free): Delete.
9739 (struct ipa_trace_buffer_control): New.
9740 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9741 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9742 New.
9743 (trace_buffer_ctrl): New.
9744 (TRACE_BUFFER_CTRL_CURR): New.
9745 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9746 Reimplement as macros.
9747 (trace_buffer_wrap): Delete.
9748 (traceframe_write_count, traceframe_read_count)
9749 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9750 (struct tracepoint_hit_ctx) <type>: New field.
9751 (struct fast_tracepoint_ctx): New.
9752 (memory_barrier): New.
9753 (cmpxchg): New.
9754 (record_tracepoint_error): Update atomically in the IPA.
9755 (clear_inferior_trace_buffer): New.
9756 (about_to_request_buffer_space): New.
9757 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9758 updating the same buffer.
9759 (add_tracepoint): Default the tracepoint's type to trap
9760 tracepoint, and orig_size to -1.
9761 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9762 internal variables.
9763 (create_trace_state_variable): New parameter `gdb'. Handle it.
9764 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9765 (cmd_qtdp): Handle fast tracepoints.
9766 (cmd_qtdv): Adjust.
9767 (max_jump_pad_size): New.
9768 (gdb_jump_pad_head): New.
9769 (get_jump_space_head): New.
9770 (claim_jump_space): New.
9771 (sort_tracepoints): New.
9772 (MAX_JUMP_SIZE): New.
9773 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9774 IPA.
9775 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9776 support. Upload fast traceframes, and delete internal IPA
9777 breakpoints.
9778 (stop_tracing_handler): New.
9779 (flush_trace_buffer_handler): New.
9780 (cmd_qtstop): Upload fast tracepoints.
9781 (response_tracepoint): Handle fast tracepoints.
9782 (tracepoint_finished_step): Upload fast traceframes. Set the
9783 tracepoint hit context's tracepoint type.
9784 (handle_tracepoint_bkpts): New.
9785 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9786 type. Add comment about fast tracepoints.
9787 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9788 non-existing action_str field.
9789 (get_context_regcache): Handle fast tracepoints.
9790 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9791 to the regcache.
9792 (fast_tracepoint_from_jump_pad_address): New.
9793 (fast_tracepoint_from_ipa_tpoint_address): New.
9794 (collecting_t): New.
9795 (force_unlock_trace_buffer): New.
9796 (fast_tracepoint_collecting): New.
9797 (collecting): New.
9798 (gdb_collect): New.
9799 (write_inferior_data_ptr): New.
9800 (target_tp_heap): New.
9801 (target_malloc): New.
9802 (download_agent_expr): New.
9803 (UALIGN): New.
9804 (download_tracepoints): New.
9805 (download_trace_state_variables): New.
9806 (upload_fast_traceframes): New.
9807 (IPA_FIRST_TRACEFRAME): New.
9808 (IPA_NEXT_TRACEFRAME_1): New.
9809 (IPA_NEXT_TRACEFRAME): New.
9810 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9811 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9812 (gdb_jump_pad_buffer_end): New.
9813 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9814 (initialize_tracepoint): Adjust.
9815 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9816 buffer. Initialize the low module.
9817 * utils.c (PREFIX, TOOLNAME): New.
9818 (malloc_failure): Use PREFIX.
9819 (error): In the IPA, an error causes an exit.
9820 (fatal, warning): Use PREFIX.
9821 (internal_error): Use TOOLNAME.
9822 (NUMCELLS): Increase to 10.
9823 * configure, config.in: Regenerate.
9824
d149dd1d
PA
98252010-06-01 Pedro Alves <pedro@codesourcery.com>
9826
9827 * server.c (handle_query) <qSupported>: Do two passes over the
9828 qSupported string to avoid nesting strtok.
9829
f6528abd
JK
98302010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9831
9832 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9833 (CDEPS): New.
9834 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9835 -Wl,--dynamic-list.
9836 * configure: Regenerate.
9837 * proc-service.list: New.
9838
ca2a87a0
JK
98392010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9840
9841 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9842 New comment.
9843
363a6e9f
OS
98442010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9845
9846 * gdbreplay.c (remote_open): Check error return from socket() call by
9847 its equality to -1 not by it being negative.
9848 * remote-utils.c (remote_open): Likewise.
9849
d23b6cb1
PA
98502010-05-23 Pedro Alves <pedro@codesourcery.com>
9851
9852 * config.h: Regenerate.
9853
28d3cf85
MK
98542010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9855
9856 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9857 doesn't provide PTRACE_GET_THREAD_AREA.
9858
fea36a59
MK
98592010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9860
9861 * linux-m68k-low.c: Include <asm/ptrace.h>
9862 (ps_get_thread_area): Implement.
9863
24b066ba
DE
98642010-05-03 Doug Evans <dje@google.com>
9865
9866 * event-loop.c (struct callback_event): New struct.
9867 (callback_list): New global.
9868 (append_callback_event, delete_callback_event): New functions.
9869 (process_callback): New function.
9870 (start_event_loop): Call it.
9871 * remote-utils.c (NOT_SCHEDULED): Define.
9872 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9873 moved out of readchar.
9874 (readchar): Rewrite. Call reschedule before returning.
9875 (reset_readchar): New function.
9876 (remote_close): Call it.
9877 (process_remaining, reschedule): New functions.
9878 * server.h (callback_handler_func): New typedef.
9879 (append_callback_event, delete_callback_event): Declare.
9880
9836d6ea
PA
98812010-05-03 Pedro Alves <pedro@codesourcery.com>
9882
9883 * proc-service.c (ps_pglobal_lookup): Use
9884 thread_db_look_up_one_symbol.
9885 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9886 parameter. Use it instead of all_symbols_looked_up.
9887 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9888 field.
9889 (all_symbols_looked_up): Don't declare.
9890 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9891 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9892 field.
9893 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9894 Set all_symbols_looked_up here.
9895 (thread_db_look_up_one_symbol): New.
9896 (thread_db_get_tls_address): Adjust.
9897 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9898 thread_db object on the heap, and tentatively set it in the
9899 process structure.
9900 (thread_db_init): Don't set all_symbols_looked_up here.
9901 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9902
7984d532
PA
99032010-05-03 Pedro Alves <pedro@codesourcery.com>
9904
9905 * linux-low.c (linux_kill, linux_detach): Adjust.
9906 (status_pending_p_callback): Remove redundant statement. Check
9907 for !TARGET_WAITIKIND_IGNORE, instead of
9908 TARGET_WAITKIND_STOPPED.
9909 (handle_tracepoints): Make sure LWP is locked. Adjust.
9910 (linux_wait_for_event_1): Adjust.
9911 (linux_cancel_breakpoints): New.
9912 (unsuspend_one_lwp): New.
9913 (unsuspend_all_lwps): New.
9914 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9915 (send_sigstop_callback): Change return type to int, add new
9916 `except' parameter and handle it.
9917 (suspend_and_send_sigstop_callback): New.
9918 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9919 pass them down. If SUSPEND, also increment the lwp's suspend
9920 count.
9921 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9922 (need_step_over_p): Don't consider suspended LWPs.
9923 (start_step_over): Adjust.
9924 (proceed_one_lwp): Change return type to int, add new `except'
9925 parameter and handle it.
9926 (unsuspend_and_proceed_one_lwp): New.
9927 (proceed_all_lwps): Use find_inferior instead of
9928 for_each_inferior.
9929 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9930 also decrement the suspend count of LWPs. Pass `except' down,
9931 instead of hacking its suspend count.
9932 (linux_pause_all): Add `freeze' parameter. Adjust.
9933 (linux_unpause_all): New.
9934 (linux_target_ops): Install linux_unpause_all.
9935 * server.c (handle_status): Adjust.
9936 * target.h (struct target_ops): New fields `unpause_all' and
9937 `cancel_breakpoints'. Add new parameter to `pause_all'.
9938 (pause_all): Add new `freeze' parameter.
9939 (unpause_all): New.
9940 (cancel_breakpoints): New.
9941 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9942 cancel breakpoints.
9943 (cmd_qtstart): Pause threads.
9944 (stop_tracing): Pause threads, and cancel breakpoints.
9945 * win32-low.c (win32_target_ops): Adjust.
9946
e471f25b
PA
99472010-05-03 Pedro Alves <pedro@codesourcery.com>
9948
9949 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9950 the inferior right away from here...
9951 (linux_wait_1): ... to here, and adjust to check the thread's
9952 last_resume_kind instead of the lwp's step or stop_expected flags.
9953
1915ef4f
PA
99542010-05-02 Pedro Alves <pedro@codesourcery.com>
9955
9956 * README: Use consistent `GDB' and `GDBserver' spellings.
9957
f9e39928
PA
99582010-05-02 Pedro Alves <pedro@codesourcery.com>
9959
9960 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9961 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
9962 (linux_detach_one_lwp): Assume the lwp is stopped.
9963 (any_thread_of): Delete.
9964 (linux_detach): Stop all lwps here. Don't blindly delete all
9965 breakpoints.
9966 (delete_lwp_callback): New.
9967 (linux_mourn): Delete all lwps of the process that is gone.
9968 (linux_wait_1): Don't delete the last lwp of the process here.
9969 * mem-break.h (mark_breakpoints_out): Declare.
9970 * mem-break.c (mark_breakpoints_out): New.
9971 (free_all_breakpoints): Use it.
9972 * server.c (handle_target_event): If the process is gone, mark
9973 breakpoints out.
9974 * thread-db.c (struct thread_db) <create_bp>: New field.
9975 (thread_db_enable_reporting): Fix prototype. Store a thread event
9976 breakpoint reference in the thread_db struct.
9977 (thread_db_load_search): Clear the thread_db object.
9978 (try_thread_db_load_1): Ditto.
9979 (switch_to_process): New.
9980 (disable_thread_event_reporting): Use it.
9981 (remove_thread_event_breakpoints): New.
9982 (thread_db_detach, thread_db_mourn): Use it.
9983
1e7fc18c
PA
99842010-05-01 Pedro Alves <pedro@codesourcery.com>
9985
9986 * linux-low.c (linux_enable_event_reporting): New.
9987 (linux_wait_for_event_1, handle_extended_wait): Use it.
9988
02fc4de7
PA
99892010-04-30 Pedro Alves <pedro@codesourcery.com>
9990
9991 * linux-low.c (linux_kill_one_lwp, linux_kill)
9992 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9993 (send_sigstop): Take an lwp_info as parameter instead. Queue a
9994 SIGSTOP even if the LWP is stopped.
9995 (send_sigstop_callback): New.
9996 (stop_all_lwps): Use send_sigstop_callback instead.
9997 (linux_resume_one_thread): Adjust.
9998 (proceed_one_lwp): Still proceed an LWP that the client has
9999 requested to stop, if we haven't reported it as stopped yet. Make
10000 sure that LWPs the client want stopped, have a pending SIGSTOP.
10001
bc3b5632
DE
100022010-04-26 Doug Evans <dje@google.com>
10003
ae1ada35
DE
10004 * server.c (handle_general_set): Make static.
10005
bc3b5632
DE
10006 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10007 Print received char after testing for error/eof instead of before.
10008 (input_interrupt): Tweak comment.
10009
65730243
DE
100102010-04-23 Doug Evans <dje@google.com>
10011
10012 * server.c (start_inferior): Print inferior argv if --debug.
10013
a8ae7dc0
AR
100142010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10015
10016 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10017 * nto-x86-low.c: Include server.h
10018
1c07cc19
PM
100192010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10020
10021 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10022 be consistent with other sources of this directory.
10023 (init_registers_amd64): Correct name of source file of this function
10024 in the comment.
10025
e0a61e09
PM
100262010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10027
10028 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10029 64-bit executables.
10030
54709339
PM
100312010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10032
10033 * win32-i386-low.c: Add 64-bit support.
10034 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10035 (init_registers_amd64): Declare.
10036 (mappings): Add 64-bit version of array.
10037 (init_windows_x86): New function.
10038 (the_low_target): Change init_arch field to init_windows_x86.
10039
e8f0053d
PM
100402010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10041
10042 * win32-low.c: Adapt to support also 64-bit architecture.
10043 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10044 (get_image_name): Use SIZE_T type for local variable `done'.
10045 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10046 (toolhelp_get_dll_name): Idem.
10047 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10048 Use uintptr_t typecast to avoid warning.
10049 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10050 (handle_exception): Use phex_nz to avoid warning.
10051 (win32_wait): Remove unused local variable `process'.
10052
c481e77e
PM
100532010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10054
10055 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10056 `amd64-avx.o'.
10057
12ea4b69
PM
100582010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10059
10060 * configure.ac: Use `ws2_32' library for srv_mingw.
10061 * configure: Regenerate.
10062 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10063 * remote-utils.c: Likewise.
10064
f6d1620c
L
100652010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10066
10067 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10068 if __x86_64__ is defined.
10069
8e642873
PM
100702010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10071
10072 * configure: Regenerate.
10073
711e434b
PM
100742010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10075
10076 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10077 * target.h (target_ops): New get_tib_address field.
10078 * win32-low.h (win32_thread_info): Add thread_local_base field.
10079 * win32-low.c (child_add_thread): Add tlb argument.
10080 Set thread_local_base field to TLB.
10081 (get_child_debug_event): Adapt to child_add_thread change.
10082 (win32_get_tib_address): New function.
10083 (win32_target_ops): Set get_tib_address field to
10084 win32_get_tib_address.
10085 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10086
505106cd
PA
100872010-04-12 Pedro Alves <pedro@codesourcery.com>
10088
505106cd
PA
10089 * linux-low.c (linux_mourn): Also remove the process.
10090 * server.c (handle_target_event): Don't remove the process here.
10091 * nto-low.c (nto_mourn): New.
10092 (nto_target_ops): Install it.
10093 * spu-low.c (spu_mourn): New.
10094 (spu_target_ops): Install it.
10095 * win32-low.c (win32_mourn): New.
10096 (win32_target_ops): Install it.
10097
e8470a06
PA
100982010-04-12 Pedro Alves <pedro@codesourcery.com>
10099
10100 * server.h (buffer_xml_printf): Remove redundant `;'.
10101
45ba0d02
PA
101022010-04-12 Pedro Alves <pedro@codesourcery.com>
10103
10104 * regcache.c (set_register_cache): Invalidate regcaches before
10105 changing the register cache layout.
10106 (regcache_invalidate_one): Allow a NULL regcache.
10107 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10108 regcaches before changing the register cache layout or the target
10109 regsets.
10110
59e04013
L
101112010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10112
10113 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10114 variable warning on Linux/x86-64.
10115
8336d594
PA
101162010-04-11 Pedro Alves <pedro@codesourcery.com>
10117
10118 GDBserver disconnected tracing support.
10119
10120 * linux-low.c (linux_remove_process): Delete.
10121 (add_lwp): Don't set last_resume_kind here.
10122 (linux_kill): Use `mourn'.
10123 (linux_detach): Use `thread_db_detach', and `mourn'.
10124 (linux_mourn): New.
10125 (linux_attach_lwp_1): Adjust comment.
10126 (linux_attach): last_resume_kind moved the thread_info; adjust.
10127 (status_pending_p_callback): Adjust.
10128 (linux_wait_for_event_1): Adjust.
10129 (count_events_callback, select_singlestep_lwp_callback)
10130 (select_event_lwp_callback, cancel_breakpoints_callback)
10131 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10132 (proceed_one_lwp): Adjust.
10133 (linux_async): Add debug output.
10134 (linux_thread_stopped): New.
10135 (linux_pause_all): New.
10136 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10137 linux_pause_all.
10138 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10139 (thread_db_free): Delete declaration.
10140 (thread_db_detach, thread_db_mourn): Declare.
10141 * thread-db.c (thread_db_init): Use thread_db_mourn.
10142 (thread_db_free): Delete, split in two.
10143 (disable_thread_event_reporting): New.
10144 (thread_db_detach): New.
10145 (thread_db_mourn): New.
10146
10147 * server.h (struct thread_info) <last_resume_kind>: New field.
10148 <attached>: Add comment.
10149 <gdb_detached>: New field.
10150 (handler_func): Change return type to int.
10151 (handle_serial_event, handle_target_event): Ditto.
10152 (gdb_connected): Declare.
10153 (tracing): Delete.
10154 (disconnected_tracing): Declare.
10155 (stop_tracing): Declare.
10156
10157 * server.c (handle_query) <qSupported>: Report support for
10158 disconnected tracing.
10159 (queue_stop_reply_callback): Account for running threads.
10160 (gdb_wants_thread_stopped): New.
10161 (gdb_wants_all_threads_stopped): New.
10162 (gdb_reattached_process): New.
10163 (handle_status): Clear the `gdb_detached' flag of all processes.
10164 In all-stop, stop all threads.
10165 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10166 (process_serial_event): If the remote connection breaks, or if an
10167 exit was forced with "monitor exit", force an event loop exit.
10168 Handle disconnected tracing on detach.
10169 (handle_serial_event): Adjust.
10170 (handle_target_event): If GDB isn't connected, forward events back
10171 to the inferior, unless the last process exited, in which case,
10172 exit gdbserver. Adjust interface.
10173
10174 * remote-utils.c (remote_open): Don't block in accept. Instead
10175 register an event loop source on the listen socket file
10176 descriptor. Refactor bits into ...
10177 (listen_desc): ... this new global.
10178 (gdb_connected): ... this new function.
10179 (enable_async_notification): ... this new function.
10180 (handle_accept_event): ... this new function.
10181 (remote_close): Clear remote_desc.
10182
10183 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10184
10185 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10186 New fields.
10187 (mourn_inferior): Define.
10188 (target_process_qsupported): Avoid the dangling else problem.
10189 (thread_stopped): Define.
10190 (pause_all): Define.
10191 (target_waitstatus_to_string): Declare.
10192 * target.c (target_waitstatus_to_string): New.
10193
10194 * tracepoint.c (tracing): Make extern.
10195 (disconnected_tracing): New.
10196 (stop_tracing): Make extern. Handle tracing stops due to GDB
10197 disconnecting.
10198 (cmd_qtdisconnected): New.
10199 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10200 (handle_tracepoint_general_set): Handle QTDisconnected.
10201
10202 * event-loop.c (event_handler_func): Change return type to int.
10203 (process_event): Bail out if the event handler wants the event
10204 loop to stop.
10205 (handle_file_event): Ditto.
10206 (start_event_loop): Bail out if the event handler wants the event
10207 loop to stop.
10208
10209 * nto-low.c (nto_target_ops): Adjust.
10210 * spu-low.c (spu_wait): Don't remove the process here.
10211 (spu_target_ops): Adjust.
10212 * win32-low.c (win32_wait): Don't remove the process here.
10213 (win32_target_ops): Adjust.
10214
5d267c4c
PA
102152010-04-11 Pedro Alves <pedro@codesourcery.com>
10216
10217 * regcache.c (realloc_register_cache): Invalidate inferior's
10218 regcache before recreating it.
10219
623ccd72
PA
102202010-04-09 Pedro Alves <pedro@codesourcery.com>
10221
10222 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10223
219f2f23
PA
102242010-04-09 Stan Shebs <stan@codesourcery.com>
10225 Pedro Alves <pedro@codesourcery.com>
10226
10227 * server.h (LONGEST): New.
10228 (struct thread_info) <while_stepping>: New field.
10229 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10230 Declare.
10231 (initialize_tracepoint, handle_tracepoint_general_set)
10232 (handle_tracepoint_query, tracepoint_finished_step)
10233 (tracepoint_was_hit, release_while_stepping_state_list):
10234 (current_traceframe): Declare.
10235 * server.c (handle_general_set): Handle tracepoint packets.
10236 (read_memory): New.
10237 (write_memory): New.
10238 (handle_search_memory_1): Use read_memory.
10239 (handle_query): Report support for conditional tracepoints, trace
10240 state variables, and tracepoint sources. Handle tracepoint
10241 queries.
10242 (main): Initialize the tracepoints module.
10243 (process_serial_event): Handle traceframe reads/writes.
10244
10245 * linux-low.c (handle_tracepoints): New.
10246 (linux_wait_1): Call it.
10247 (linux_resume_one_lwp): Handle while-stepping.
10248 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10249 (linux_target_ops): Install them.
10250 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10251 New field.
10252 * linux-x86-low.c (x86_supports_tracepoints): New.
10253 (the_low_target). Install it.
10254
10255 * mem-break.h (delete_breakpoint): Declare.
10256 * mem-break.c (delete_breakpoint): Make external.
10257
10258 * target.h (struct target_ops): Add `supports_tracepoints',
10259 `read_pc', and `write_pc' fields.
10260 (target_supports_tracepoints): Define.
10261 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10262 (phex_nz): New.
10263
10264 * regcache.h (struct regcache) <registers_owned>: New field.
10265 (init_register_cache, regcache_cpy): Declare.
10266 (regcache_read_pc, regcache_write_pc): Declare.
10267 (register_cache_size): Declare.
10268 (supply_regblock): Declare.
10269 * regcache.c (init_register_cache): New.
10270 (new_register_cache): Use it.
10271 (regcache_cpy): New.
10272 (register_cache_size): New.
10273 (supply_regblock): New.
10274 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 10275
219f2f23
PA
10276 * tracepoint.c: New.
10277
10278 * Makefile.in (OBS): Add tracepoint.o.
10279 (tracepoint.o): New rule.
10280
3a13a53b
L
102812010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10282
10283 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10284 (i386-mmx.o): New.
10285 (i386-mmx.c): Likewise.
10286 (i386-mmx-linux.o): Likewise.
10287 (i386-mmx-linux.c): Likewise.
10288
10289 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10290 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10291 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10292 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10293
10294 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10295 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10296 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10297
1570b33e
L
102982010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10299
10300 * Makefile.in (clean): Updated.
10301 (i386-avx.o): New.
10302 (i386-avx.c): Likewise.
10303 (i386-avx-linux.o): Likewise.
10304 (i386-avx-linux.c): Likewise.
10305 (amd64-avx.o): Likewise.
10306 (amd64-avx.c): Likewise.
10307 (amd64-avx-linux.o): Likewise.
10308 (amd64-avx-linux.c): Likewise.
10309
10310 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10311 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10312 (srv_amd64_regobj): Add amd64-avx.o.
10313 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10314 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10315 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10316 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10317 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10318 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10319 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10320
10321 * i387-fp.c: Include "i386-xstate.h".
10322 (i387_xsave): New.
10323 (i387_cache_to_xsave): Likewise.
10324 (i387_xsave_to_cache): Likewise.
10325 (x86_xcr0): Likewise.
10326
10327 * i387-fp.h (i387_cache_to_xsave): Likewise.
10328 (i387_xsave_to_cache): Likewise.
10329 (x86_xcr0): Likewise.
10330
10331 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10332 * linux-crisv32-low.c (target_regsets): Likewise.
10333 * linux-m68k-low.c (target_regsets): Likewise.
10334 * linux-mips-low.c (target_regsets): Likewise.
10335 * linux-ppc-low.c (target_regsets): Likewise.
10336 * linux-s390-low.c (target_regsets): Likewise.
10337 * linux-sh-low.c (target_regsets): Likewise.
10338 * linux-sparc-low.c (target_regsets): Likewise.
10339 * linux-xtensa-low.c (target_regsets): Likewise.
10340
10341 * linux-low.c: Include <sys/uio.h>.
10342 (regsets_fetch_inferior_registers): Support nt_type.
10343 (regsets_store_inferior_registers): Likewise.
10344 (linux_process_qsupported): New.
10345 (linux_target_ops): Add linux_process_qsupported.
10346
10347 * linux-low.h (regset_info): Add nt_type.
10348 (linux_target_ops): Add process_qsupported.
10349
10350 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10351 and <sys/uio.h>.
10352 (init_registers_i386_avx_linux): New.
10353 (init_registers_amd64_avx_linux): Likewise.
10354 (xmltarget_i386_linux_no_xml): Likewise.
10355 (xmltarget_amd64_linux_no_xml): Likewise.
10356 (PTRACE_GETREGSET): Likewise.
10357 (PTRACE_SETREGSET): Likewise.
10358 (x86_fill_xstateregset): Likewise.
10359 (x86_store_xstateregset): Likewise.
10360 (use_xml): Likewise.
10361 (x86_linux_update_xmltarget): Likewise.
10362 (x86_linux_process_qsupported): Likewise.
10363 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10364 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10365 init_registers_i386_linux here. Call
10366 x86_linux_update_xmltarget.
10367 (the_low_target): Add x86_linux_process_qsupported.
10368
10369 * server.c (handle_query): Call target_process_qsupported.
10370
10371 * target.h (target_ops): Add process_qsupported.
10372 (target_process_qsupported): New.
10373
fc7238bb
PA
103742010-04-03 Pedro Alves <pedro@codesourcery.com>
10375
10376 * inferiors.c (add_thread): Set last_status kind to
10377 TARGET_WAITKIND_IGNORE.
10378 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10379 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10380 (linux_wait_1): Move `thread' local definition to block that uses
10381 it. Don't NULL initialize `event_child'.
10382 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10383 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10384 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10385
bdabb078
PA
103862010-04-01 Pedro Alves <pedro@codesourcery.com>
10387
10388 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10389 an extended waitstatus, or by a watchpoint.
10390 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10391 thread was stepping or has been stopped by a watchpoint.
10392
d3bbe7a0
PA
103932010-04-01 Pedro Alves <pedro@codesourcery.com>
10394
10395 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10396 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10397 of another, then delete the previous, and validate all
10398 breakpoints.
10399 (validate_inserted_breakpoint): New.
10400 (delete_disabled_breakpoints): New.
10401 (validate_breakpoints): New.
10402 (check_mem_read): Validate breakpoints before trusting their
10403 shadow. Delete disabled breakpoints.
10404 (check_mem_write): Validate breakpoints before trusting they
10405 should be inserted. Delete disabled breakpoints.
10406 * mem-break.h (validate_breakpoints):
10407 * server.c (handle_query): Validate breakpoints when we see a
10408 qSymbol query.
10409
8b07ae33
PA
104102010-04-01 Pedro Alves <pedro@codesourcery.com>
10411
10412 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10413 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10414 if we could tell there's a GDB breakpoint at stop_pc.
10415 (need_step_over_p): Don't do a step over if we find a GDB
10416 breakpoint at the resume PC.
10417
10418 * mem-break.c (struct raw_breakpoint): New.
10419 (enum bkpt_type): New type `gdb_breakpoint'.
10420 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10421 fields. New field `raw'.
10422 (find_raw_breakpoint_at): New.
10423 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10424 breakpoint instead.
10425 (set_breakpoint_at): Adjust.
10426 (delete_raw_breakpoint): New.
10427 (release_breakpoint): New.
10428 (delete_breakpoint): Rename to...
10429 (delete_breakpoint_1): ... this. Add proc parameter. Use
10430 release_breakpoint. Return ENOENT.
10431 (delete_breakpoint): Reimplement.
10432 (find_breakpoint_at): Delete.
10433 (find_gdb_breakpoint_at): New.
10434 (delete_breakpoint_at): Delete.
10435 (set_gdb_breakpoint_at): New.
10436 (delete_gdb_breakpoint_at): New.
10437 (gdb_breakpoint_here): New.
10438 (set_reinsert_breakpoint): Use release_breakpoint.
10439 (uninsert_breakpoint): Rename to ...
10440 (uninsert_raw_breakpoint): ... this.
10441 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10442 (reinsert_raw_breakpoint): Change parameter type to
10443 raw_breakpoint.
10444 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10445 instead.
10446 (check_breakpoints): Adjust. Use release_breakpoint.
10447 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10448 (breakpoint_inserted_here): Ditto.
10449 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10450 Don't trust the breakpoint's shadow if it is not inserted.
10451 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10452 (delete_all_breakpoints): Adjust.
10453 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10454 use delete_breakpoint_1.
10455
10456 * mem-break.h (breakpoints_supported): Delete declaration.
10457 (set_gdb_breakpoint_at): Declare.
10458 (gdb_breakpoint_here): Declare.
10459 (delete_breakpoint_at): Delete.
10460 (delete_gdb_breakpoint_at): Declare.
10461
10462 * server.h (struct raw_breakpoint): Forward declare.
10463 (struct process_info): New field `raw_breakpoints'.
10464
10465 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10466 breakpoints.
10467
6bf5e0ba
PA
104682010-03-24 Pedro Alves <pedro@codesourcery.com>
10469
10470 * linux-low.c (status_pending_p_callback): Fix comment.
10471 (linux_wait_for_event_1): Move most of the internal breakpoint
10472 handling from here...
10473 (linux_wait_1): ... to here.
10474 (count_events_callback): New.
10475 (select_singlestep_lwp_callback): New.
10476 (select_event_lwp_callback): New.
10477 (cancel_breakpoints_callback): New.
10478 (select_event_lwp): New.
10479 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10480 priority to all LWPs that have had events that should be reported
10481 to the client. Cancel breakpoints when about to reporting the
10482 event to the client, not while stopping lwps. No longer cancel
10483 finished single-steps here.
10484 (cancel_finished_single_step): Delete.
10485 (cancel_finished_single_steps): Delete.
10486
414a389f
PA
104872010-03-24 Pedro Alves <pedro@codesourcery.com>
10488
10489 * mem-break.c (enum bkpt_type): New.
10490 (struct breakpoint): New field `type'.
10491 (set_breakpoint_at): Change return type to struct breakpoint
10492 pointer. Set type to `other_breakpoint' by default.
10493 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10494 in the breakpoint list.
10495 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10496 (reinsert_breakpoint): Rename to ...
10497 (reinsert_raw_breakpoint): ... this.
10498 (reinsert_breakpoints_at): Adjust.
10499 * mem-break.h (struct breakpoint): Declare.
10500 (set_breakpoint_at): Change return type to struct breakpoint
10501 pointer.
10502
2280c721
PA
105032010-03-24 Pedro Alves <pedro@codesourcery.com>
10504
10505 * server.c (handle_query): Assign, not compare.
10506
d50171e4
PA
105072010-03-24 Pedro Alves <pedro@codesourcery.com>
10508
10509 Teach linux gdbserver to step-over-breakpoints.
10510
10511 * linux-low.c (can_hardware_single_step): New.
10512 (supports_breakpoints): New.
10513 (handle_extended_wait): If stopping threads, read the stop pc of
10514 the new cloned LWP.
10515 (get_pc): New.
10516 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10517 low target doesn't support retrieving the PC.
10518 (add_lwp): Set last_resume_kind to resume_continue.
10519 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10520 (linux_attach): Don't clear stop_expected. Set the lwp's
10521 last_resume_kind to resume_stop.
10522 (linux_detach_one_lwp): Don't check for removed breakpoints.
10523 (check_removed_breakpoint): Delete.
10524 (status_pending_p): Rename to ...
10525 (status_pending_p_callback): ... this. Don't check for removed
10526 breakpoints. Don't consider threads that are stopped from GDB's
10527 perspective.
10528 (linux_wait_for_lwp): Always read the stop_pc here.
10529 (cancel_breakpoint): New.
10530 (step_over_bkpt): New global.
10531 (linux_wait_for_event_1): Implement stepping over breakpoints.
10532 (gdb_wants_lwp_stopped): New.
10533 (gdb_wants_all_stopped): New.
10534 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10535 single-step traps here. Store the thread's last reported target
10536 wait status.
10537 (send_sigstop): Don't clear stop_expected. Always set it,
10538 instead.
10539 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10540 (cancel_finished_single_step): New.
10541 (cancel_finished_single_steps): New.
10542 (wait_for_sigstop): Don't cancel finished single-step traps here.
10543 (linux_resume_one_lwp): Don't check for removed breakpoints.
10544 Don't set `step' on non-hardware step archs.
10545 (linux_set_resume_request): Ignore resume_stop requests if already
10546 stopping or stopped. Set the lwp's last_resume_kind.
10547 (resume_status_pending_p): Don't check for removed breakpoints.
10548 (need_step_over_p): New.
10549 (start_step_over): New.
10550 (finish_step_over): New.
10551 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10552 requests. Clear the thread's last reported target waitstatus.
10553 Don't use the `suspended' flag. Don't consider pending breakpoints.
10554 (linux_resume): Start a step-over if necessary.
10555 (proceed_one_lwp): New.
10556 (proceed_all_lwps): New.
10557 (unstop_all_lwps): New.
10558 * linux-low.h (struct lwp_info): Rewrite comment for the
10559 `suspended' flag. Add the `stop_pc' field. Delete the
10560 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10561 Add `'last_resume_kind' and `need_step_over' fields.
10562 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10563 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10564 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10565 (set_raw_breakpoint_at): New.
10566 (set_breakpoint_at): Rewrite to use it.
10567 (reinsert_breakpoint_handler): Delete.
10568 (set_reinsert_breakpoint): New.
10569 (reinsert_breakpoint_by_bp): Delete.
10570 (delete_reinsert_breakpoints): New.
10571 (uninsert_breakpoint): Rewrite.
10572 (uninsert_breakpoints_at): New.
10573 (reinsert_breakpoint): Rewrite.
10574 (reinsert_breakpoints_at): New.
10575 (check_breakpoints): Rewrite.
10576 (breakpoint_here): New.
10577 (breakpoint_inserted_here): New.
10578 (check_mem_read): Adjust.
10579 * mem-break.h (breakpoints_supported, breakpoint_here)
10580 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10581 (reinsert_breakpoint_by_bp): Delete declaration.
10582 (delete_reinsert_breakpoints): Declare.
10583 (reinsert_breakpoint): Delete declaration.
10584 (reinsert_breakpoints_at): Declare.
10585 (uninsert_breakpoint): Delete declaration.
10586 (uninsert_breakpoints_at): Declare.
10587 (check_breakpoints): Adjust prototype.
10588 * server.h: Adjust include order.
10589 (struct thread_info): Declare here. Add a `last_status' field.
10590
30ba68cb
MS
105912010-03-23 Michael Snyder <msnyder@vmware.com>
10592
10593 * server.c (crc32): New function.
10594 (handle_query): Add handling for 'qCRC:' request.
10595
b9a881c2
PA
105962010-03-23 Pedro Alves <pedro@codesourcery.com>
10597
10598 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10599 lwp had been stopped by a watchpoint.
10600
e92d13d5
PA
106012010-03-16 Pedro Alves <pedro@codesourcery.com>
10602
10603 * server.h (internal_error): Declare.
10604 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10605 * utils.c (internal_error): New function.
10606
64daa791
AS
106072010-03-15 Andreas Schwab <schwab@redhat.com>
10608
10609 * configure.srv: Fix typo setting srv_regobj.
10610
f52cd8cd
PA
106112010-03-15 Pedro Alves <pedro@codesourcery.com>
10612
10613 * linux-low.c (fetch_register): Avoid passing a non string literal
10614 format to `error'.
10615 (usr_store_inferior_registers): Ditto.
10616
93ae6fdc
PA
106172010-03-14 Pedro Alves <pedro@codesourcery.com>
10618
10619 * linux-low.c (linux_write_memory): Bail out early if peeking
10620 memory failed.
10621
c3adc08c
PA
106222010-03-14 Pedro Alves <pedro@codesourcery.com>
10623
10624 * linux-low.h (struct lwp_info): New fields
10625 `stopped_by_watchpoint' and `stopped_data_address'.
10626 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10627 here, and cache them in the lwp object.
10628 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10629 directly.
10630 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10631 field.
10632 (linux_stopped_by_watchpoint): Rewrite.
10633 (linux_stopped_data_address): Rewrite.
10634
bce522a2
PA
106352010-03-06 Simo Melenius <simo.melenius@iki.fi>
10636
10637 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10638 switching the current inferior, not before.
10639
90884b2b
L
106402010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10641
10642 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10643 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10644 i386-linux.c and amd64-linux.c.
10645 (reg-i386.o): Removed.
10646 (reg-i386.c): Likewise.
10647 (reg-i386-linux.o): Likewise.
10648 (reg-i386-linux.c): Likewise.
10649 (reg-x86-64.o): Likewise.
10650 (reg-x86-64.c): Likewise.
10651 (reg-x86-64-linux.o): Likewise.
10652 (reg-x86-64-linux.c): Likewise.
10653 (i386.o): New.
10654 (i386.c): Likewise.
10655 (i386-linux.o): Likewise.
10656 (i386-linux.c): Likewise.
10657 (amd64.o): Likewise.
10658 (amd64.c): Likewise.
10659 (amd64-linux.o): Likewise.
10660 (amd64-linux.c): Likewise.
10661
10662 * configure.srv (srv_i386_regobj): New.
10663 (srv_i386_linux_regobj): Likewise.
10664 (srv_amd64_regobj): Likewise.
10665 (srv_amd64_linux_regobj): Likewise.
10666 (srv_i386_32bit_xmlfiles): Likewise.
10667 (srv_i386_64bit_xmlfiles): Likewise.
10668 (srv_i386_xmlfiles): Likewise.
10669 (srv_amd64_xmlfiles): Likewise.
10670 (srv_i386_linux_xmlfiles): Likewise.
10671 (srv_amd64_linux_xmlfiles): Likewise.
10672 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10673 srv_xmlfiles to $srv_i386_xmlfiles.
10674 (i[34567]86-*-mingw32ce*): Likewise.
10675 (i[34567]86-*-mingw*): Likewise.
10676 (i[34567]86-*-nto*): Likewise.
10677 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10678 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10679 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10680 (x86_64-*-linux*): Likewise.
10681
10682 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10683 (init_registers_amd64_linux): New.
10684 (x86_arch_setup): Replace init_registers_x86_64_linux with
10685 init_registers_amd64_linux.
10686
193f13e6
MK
106872010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10688
10689 * configure.ac: Check for libdl. If it is not available link against
10690 static libthread_db.
10691 * configure: Regenerate.
10692
85d721b8
PA
106932010-02-22 Pedro Alves <pedro@codesourcery.com>
10694
10695 PR9605
10696
10697 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10698 handing a read watchpoint.
10699 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10700
6076632b
DE
107012010-02-12 Doug Evans <dje@google.com>
10702
10703 * linux-low.c (linux_supports_tracefork_flag): Document.
10704 (linux_look_up_symbols): Add comment.
10705
3327ccf7
L
107062010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10707
10708 * regcache.c (supply_register): Clear regcache if buf is NULL.
10709
0718675c 107102010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 10711 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
10712
10713 * inferiors.c (find_inferior): Add function documentation.
10714 (unloaded_dll): Handle the case where the unloaded dll has not
10715 been previously registered in the dll list.
10716
177321bd
DJ
107172010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10718
10719 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10720 (thumb2_breakpoint): New.
10721 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10722
2b009048
DJ
107232010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10724
10725 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10726 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10727 breakpoints.
10728
3be029c7
PA
107292010-01-21 Pedro Alves <pedro@codesourcery.com>
10730
10731 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10732
18f5de3b
JK
107332010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10734
10735 * linux-s390-low.c (s390_collect_ptrace_register)
10736 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10737
3743bb4f
DE
107382010-01-21 Doug Evans <dje@google.com>
10739
14ce3065
DE
10740 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10741 (PTRACE_ARG4_TYPE): New macro.
10742 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10743 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10744 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10745 (usr_store_inferior_registers): Ditto.
10746 (linux_read_memory, linux_write_memory): Ditto.
10747 (linux_test_for_tracefork): Ditto.
10748
3743bb4f
DE
10749 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10750 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10751
8b315be5
PA
107522010-01-21 Pedro Alves <pedro@codesourcery.com>
10753
10754 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10755 target.
10756
85492558
PA
107572010-01-21 Pedro Alves <pedro@codesourcery.com>
10758
10759 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10760 prototype to take a regcache. Adjust.
10761
442ea881
PA
107622010-01-20 Pedro Alves <pedro@codesourcery.com>
10763
10764 * regcache.h (struct thread_info): Forward declare.
10765 (struct regcache): New.
10766 (new_register_cache): Adjust prototype.
10767 (get_thread_regcache): Declare.
10768 (free_register_cache): Adjust prototype.
10769 (registers_to_string, registers_from_string): Ditto.
10770 (supply_register, supply_register_by_name, collect_register)
10771 (collect_register_as_string, collect_register_by_name): Ditto.
10772 * regcache.c (struct inferior_regcache_data): Delete.
10773 (get_regcache): Rename to ...
10774 (get_thread_regcache): ... this. Adjust. Switch inferior before
10775 fetching registers.
10776 (regcache_invalidate_one): Adjust.
10777 (regcache_invalidate): Fix prototype.
10778 (new_register_cache): Return the new register cache.
10779 (free_register_cache): Change prototype.
10780 (realloc_register_cache): Adjust.
10781 (registers_to_string): Change prototype to take a regcache. Adjust.
10782 (registers_from_string): Ditto.
10783 (register_data): Ditto.
10784 (supply_register): Ditto.
10785 (supply_register_by_name): Ditto.
10786 (collect_register): Ditto.
10787 (collect_register_as_string): Ditto.
10788 (collect_register_by_name): Ditto.
10789 * server.c (process_serial_event): Adjust.
10790 * linux-low.h (regset_fill_func, regset_store_func): Change
10791 prototype.
10792 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10793 Change prototype.
10794 * linux-low.c (get_stop_pc): Adjust.
10795 (check_removed_breakpoint): Adjust.
10796 (linux_wait_for_event): Adjust.
10797 (linux_resume_one_lwp): Adjust.
10798 (fetch_register): Add regcache parameter. Adjust.
10799 (usr_store_inferior_registers): Ditto.
10800 (regsets_fetch_inferior_registers): Ditto.
10801 (regsets_store_inferior_registers): Ditto.
10802 (linux_fetch_registers, linux_store_registers): Ditto.
10803 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10804 regcache. Adjust.
43aaf8b6
PA
10805 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10806 Ditto.
442ea881
PA
10807 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10808 prototype to take a regcache.
10809 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10810 * remote-utils.c (convert_ascii_to_int, outreg)
10811 (prepare_resume_reply): Change prototype to take a regcache.
10812 Adjust.
10813 * target.h (struct target_ops) <fetch_registers, store_registers>:
10814 Change prototype to take a regcache.
10815 (fetch_inferior_registers, store_inferior_registers): Change
10816 prototype to take a regcache. Adjust.
10817 * proc-service.c (ps_lgetregs): Adjust.
10818 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10819 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10820 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10821 take a regcache. Adjust.
10822 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10823 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10824 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10825 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10826 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10827 (cris_cannot_fetch_register):
10828 (cris_breakpoint_at): Change prototype to take a regcache.
10829 Adjust.
10830 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10831 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10832 to take a regcache. Adjust.
10833 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10834 Adjust.
10835 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10836 take a regcache. Adjust.
10837 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10838 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10839 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10840 * linux-mips-low.c (mips_get_pc):
10841 (mips_set_pc): Change prototype to take a regcache. Adjust.
10842 (mips_reinsert_addr): Adjust.
10843 (mips_collect_register): Change prototype to take a regcache.
10844 Adjust.
10845 (mips_supply_register):
10846 (mips_collect_register_32bit, mips_supply_register_32bit)
10847 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10848 (mips_store_fpregset): Ditto.
43aaf8b6
PA
10849 * linux-ppc-low.c (ppc_supply_ptrace_register)
10850 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
10851 (parse_spufs_run): Adjust.
10852 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10853 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10854 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10855 take a regcache. Adjust.
10856 * linux-s390-low.c (s390_collect_ptrace_register)
10857 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10858 (s390_set_pc): Change prototype to take a regcache. Adjust.
10859 (s390_arch_setup): Adjust.
10860 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10861 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10862 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10863 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10864 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10865 regcache. Adjust.
10866 (sparc_breakpoint_at): Adjust.
10867 * linux-xtensa-low.c (xtensa_fill_gregset):
10868 (xtensa_store_gregset):
10869 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10870 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10871 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10872 prototype to take a regcache. Adjust.
10873 * win32-arm-low.c (arm_fetch_inferior_register)
10874 (arm_store_inferior_register): Change prototype to take a
10875 regcache. Adjust.
10876 * win32-i386-low.c (i386_fetch_inferior_register)
10877 (i386_store_inferior_register): Change prototype to take a
10878 regcache. Adjust.
10879 * win32-low.c (child_fetch_inferior_registers)
10880 (child_store_inferior_registers): Change prototype to take a
10881 regcache. Adjust.
10882 (win32_wait): Adjust.
10883 (win32_fetch_inferior_registers): Change prototype to take a
10884 regcache. Adjust.
10885 (win32_store_inferior_registers): Adjust.
10886 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10887 store_inferior_register>: Change prototype to take a regcache.
10888
60c3d7b0
DE
108892010-01-20 Doug Evans <dje@google.com>
10890
10891 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10892 #ifdef.
10893 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 10894 (W_STOPCODE): Provide definition if missing.
60c3d7b0 10895
dc146f7c
VP
108962010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10897
10898 * linux-low.c (linux_core_of_thread): New.
10899 (compare_ints, show_process, list_threads): New.
10900 (linux_qxfer_osdata): Report threads and cores.
10901 (linux_target_op): Register linux_core_of_thread.
10902 * remote-utils.c (prepare_resume_reply): Report the core.
10903 (buffer_xml_printf): Support %d specifier.
10904 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10905 New.
10906 (handle_query): Handle qXfer:threads. Announce availability
10907 thereof.
10908 * target.h (struct target_ops): New field core_of_thread.
10909
7803799a
UW
109102010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10911
10912 * Makefile.in (clean): Remove new generated files.
10913 (reg-s390.o, reg-s390.c): Remove rules.
10914 (reg-s390x.o, reg-s390x.c): Likewise.
10915 (s390-linux32.o, s390-linux32.c): Add rules.
10916 (s390-linux64.o, s390-linux64.c): Likewise.
10917 (s390x-linux64.o, s390x-linux64.c): Likewise.
10918 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10919 * linux-s390-low.c: Include <elf.h>.
10920 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10921 (init_registers_s390): Remove prototype.
10922 (init_registers_s390x): Likewise.
10923 (init_registers_s390_linux32): Add prototype.
10924 (init_registers_s390_linux64): Likewise.
10925 (init_registers_s390x_linux64): Likewise.
10926 (s390_num_regs_3264): New define.
10927 (s390_regmap_3264): New global variable.
10928 (s390_cannot_fetch_register): Remove obsolete check.
10929 (s390_cannot_store_register): Likewise.
10930 (s390_collect_ptrace_register): Handle upper/lower register halves.
10931 (s390_supply_ptrace_register): Likewise.
10932 (s390_fill_gregset): Update to register number changes.
10933 (s390_get_hwcap): New routine.
10934 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10935 Install appropriate regmap and register set.
10936
6e7ffa39
JB
109372010-01-01 Joel Brobecker <brobecker@adacore.com>
10938
10939 * server.c (gdbserver_version): Update copyright year to 2010.
10940 * gdbreplay.c (gdbreplay_version): Likewise.
10941
957f3f49
DE
109422009-12-28 Doug Evans <dje@google.com>
10943
10944 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10945 elf/external.h. Include <elf.h> instead but only if necessary.
10946
ca5c370d
PA
109472009-12-28 Pedro Alves <pedro@codesourcery.com>
10948
10949 * linux-low.c (linux_remove_process): Remove `detaching'
10950 parameter. Don't release/detach from thread_db here.
10951 (linux_kill): Release/detach from thread_db here, ...
10952 (linux_detach): ... and here, before actually detaching.
10953 (linux_wait_1): ... and here, when a process exits.
10954 * thread-db.c (any_thread_of): New.
10955 (thread_db_free): Switch the current inferior to a thread of the
10956 passed in process.
10957
4ee62156
DE
109582009-12-21 Doug Evans <dje@google.com>
10959
d90e6a88
DE
10960 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10961
c5f62d5f
DE
10962 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10963 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10964 warning ifndef __NR_tkill. Move setting of errno there too.
10965 Delete unnecessary resetting of errno after syscall.
10966 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10967
10e86dd7
DE
10968 * configure.ac: Check for dladdr.
10969 * config.in: Regenerate.
10970 * configure: Regenerate.
10971 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10972 (try_thread_db_load): Update.
10973
4ee62156
DE
10974 * linux-low.c (my_waitpid): Delete unnecessary prototype.
10975
00f515da
DE
109762009-12-18 Doug Evans <dje@google.com>
10977
e9464885
DE
10978 * event-loop.c: Include unistd.h if it exists.
10979
07d4f67e
DE
10980 * linux-low.c (my_waitpid): Move definition away from being in
10981 between linux_tracefork_child/linux_test_for_tracefork.
10982
00f515da
DE
10983 * gdb_proc_service.h (psaddr_t): Fix type.
10984 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10985 signature to match glibc.
10986
1de1badb
DE
109872009-12-16 Doug Evans <dje@google.com>
10988
10989 * linux-low.c (linux_read_memory): Fix argument to read.
10990
aeeb81d1
PA
109912009-11-26 Pedro Alves <pedro@codesourcery.com>
10992
10993 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10994 events, don't leave current_inferior pointing at null.
10995
10357975
PA
109962009-11-26 Pedro Alves <pedro@codesourcery.com>
10997
10998 * win32-low.c (LOG): Delete.
10999 (OUTMSG): Output to stderr.
11000 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11001 on compile time LOG macro.
11002 (win32_wait): Fix debug output.
11003
cf6e3471
PA
110042009-11-26 Pedro Alves <pedro@codesourcery.com>
11005
11006 * win32-low.c (win32_add_one_solib): If the dll name is
11007 "ntdll.dll", prepend the system directory to the dll path.
11008
0c85e18e
MK
110092009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11010
11011 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11012
9ac544ce 110132009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11014 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11015
11016 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11017 * configure.ac: Check for __mcoldfire__ and set
11018 gdb_cv_m68k_is_coldfire.
11019 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11020 reg-cf.o and reg-m68k.o.
11021 * configure: Regenerated.
11022
fd7dd3e6
PA
110232009-11-16 Pedro Alves <pedro@codesourcery.com>
11024
11025 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11026 Pass it to thread_db_free.
11027 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11028 proper `detaching' argument to linux_remove_process.
11029 * linux-low.h (thread_db_free): Add `detaching' parameter.
11030 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11031 to thread_db_free.
11032 (thread_db_free): Add `detaching' parameter. Only
11033 call td_ta_clear_event if detaching from process.
11034
75aa492e
MK
110352009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11036
11037 * thread-db.c (thread_db_free): Fix typo.
11038
21e1bee4
PP
110392009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11040
11041 PR gdb/10838
11042 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11043
8838b45e
NS
110442009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11045
11046 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11047 with an i686 compiler.
11048 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11049 needed.
11050 * configure: Rebuilt.
11051
8a35fb51
SL
110522009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11053
11054 PR gdb/10783
11055
11056 * server.c (handle_search_memory_1): Correct read_addr initialization
11057 in loop for searching subsequent chunks.
11058
96f15937
PP
110592009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11060
11061 * configure.ac: New --with-libthread-db option.
11062 * thread-db.c: Allow direct dependence on libthread_db.
11063 (thread_db_free): Adjust.
11064 * config.in: Regenerate.
11065 * configure: Likewise.
889bf7c5 11066
5f7d1694
PP
110672009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11068
11069 PR gdb/10757
11070 * thread-db.c (attach_thread): New function.
11071 (maybe_attach_thread): Return success/failure.
11072 (find_new_threads_callback): Adjust.
889bf7c5
PA
11073 (thread_db_find_new_threads): Loop until no new threads.
11074
88e3b899
PA
110752009-10-13 Pedro Alves <pedro@codesourcery.com>
11076
11077 * proc-service.c (ps_lgetregs): Formatting.
11078
cdbfd419
PP
110792009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11080
11081 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11082 * configure.ac: Adjust.
11083 * linux-low.h (struct process_info_private): Move members to struct
11084 thread_db.
11085 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11086 * linux-low.c (linux_remove_process): Adjust.
11087 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11088 * server.c (handle_query): Move code ...
11089 (handle_monitor_command): ... here. New function.
11090 * target.h (struct target_ops): New member.
11091 * thread-db.c (struct thread_db): New.
11092 (libthread_db_search_path): New variable.
11093 (thread_db_create_event, thread_db_enable_reporting)
11094 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11095 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11096 (try_thread_db_load_1, dladdr_to_soname): New functions.
11097 (try_thread_db_load, thread_db_load_search): New functions.
11098 (thread_db_init): Search for libthread_db.
11099 (thread_db_free): New function.
11100 (thread_db_handle_monitor_command): Likewise.
11101 * config.in: Regenerate.
11102 * configure: Regenerate.
889bf7c5 11103
4168d2d6
UW
111042009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11105
11106 * spu-low.c (spu_kill): Wait for inferior to terminate.
11107 Call clear_inferiors.
11108 (spu_detach): Call clear_inferiors.
11109
81ecdfbb
RW
111102009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11111
11112 * aclocal.m4: Regenerate.
11113 * config.in: Likewise.
11114 * configure: Likewise.
11115
0b9ff2c0
UW
111162009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11117
11118 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11119 (parse_spufs_run): New function.
11120 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11121 (ppc_breakpoint_at): Handle SPU breakpoints.
11122
efcbbd14
UW
111232009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11124
11125 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11126 (SPUFS_MAGIC): Define.
11127 (spu_enumerate_spu_ids): New function.
11128 (linux_qxfer_spu): New function.
11129 (linux_target_ops): Install linux_qxfer_spu.
11130
f4d9bade
UW
111312009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11132
11133 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11134 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11135 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11136 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11137 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11138 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11139 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11140 (init_registers_powerpc_cell32l): Add prototype.
11141 (init_registers_powerpc_cell64l): Likewise.
11142 (ppc_arch_setup): Detect Cell/B.E. architecture.
11143
96e946ca
RW
111442009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11145
11146 * Makefile.in (datarootdir): New variable.
11147
58d6951d
DJ
111482009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11149
11150 * linux-low.c (linux_write_memory): Update debugging output.
11151 * Makefile.in (clean): Add new descriptions.
11152 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11153 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11154 * configure.srv: Add new files for arm*-*-linux*.
11155 * linux-arm-low.c: Add new declarations.
11156 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11157 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11158 (HWCAP_VFPv3D16): New.
11159 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11160 instead of __IWMMXT__.
11161 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11162 (arm_arch_setup): New.
11163 (target_regsets): Remove #ifdef. Add VFP regset.
11164 (the_low_target): Use arm_arch_setup.
11165
12b42a12
DJ
111662009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11167
11168 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11169 the main thread again.
11170
ac8c974e
AR
111712009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11172
11173 Adding Neutrino gdbserver.
11174 * configure: Regenerated.
11175 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11176 * configure.srv (i[34567]86-*-nto*): New target.
11177 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11178 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11179 (nto_comctrl) [__QNX__]: New function.
11180 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11181
4424e0c3 111822009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
11183
11184 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11185 srv_tgtobj.
11186
912cf4ba
PA
111872009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11188 Pedro Alves <pedro@codesourcery.com>
11189
11190 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11191 don't support CONTEXT_EXTENDED_REGISTERS.
11192 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11193 (the_low_target): Install them.
11194 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11195 failing with ERROR_PIPE_NOT_CONNECTED.
11196
aa5ca48f
DE
111972009-06-30 Doug Evans <dje@google.com>
11198 Pierre Muller <muller@ics.u-strasbg.fr>
11199
11200 Add h/w watchpoint support to x86-linux, win32-i386.
11201 * Makefile.in (SFILES): Add i386-low.c
11202 (i386_low_h): Define.
11203 (i386-low.o): Add dependencies.
11204 (linux-x86-low.o): Add i386-low.h dependency.
11205 (win32-i386-low.o): Ditto.
11206 * i386-low.c: New file.
11207 * i386-low.h: New file.
11208 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11209 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11210 * linux-low.c (linux_add_process): Initialize arch_private.
11211 (linux_remove_process): Free arch_private.
11212 (add_lwp): Initialize arch_private.
11213 (delete_lwp): Free arch_private.
11214 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11215 provided.
11216 * linux-low.h (process_info_private): New member arch_private.
11217 (lwp_info): New member arch_private.
11218 (linux_target_ops): New members new_process, new_thread,
11219 prepare_to_resume.
11220 (ptid_of): New macro.
11221 * linux-x86-low.c: Include stddef.h, i386-low.h.
11222 (arch_process_info): New struct.
11223 (arch_lwp_info): New struct.
11224 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11225 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11226 (i386_dr_low_get_status): New function.
11227 (x86_insert_point, x86_remove_point): New functions.
11228 (x86_stopped_by_watchpoint): New function.
11229 (x86_stopped_data_address): New function.
11230 (x86_linux_new_process, x86_linux_new_thread): New functions.
11231 (x86_linux_prepare_to_resume): New function.
11232 (the_low_target): Add entries for insert_point, remove_point,
11233 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11234 prepare_to_resume.
11235 * server.c (debug_hw_points): New global.
11236 (monitor_show_help): Document set debug-hw-points.
11237 (handle_query): Process "set debug-hw-points".
11238 * server.h (debug_hw_points): Declare.
11239 (paddress): Declare.
11240 * utils.c (NUMCELLS, CELLSIZE): New macros.
11241 (get_sell, xsnprintf, paddress): New functions.
11242 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11243 remove_point, stopped_by_watchpoint, stopped_data_address.
11244 * win32-i386-low.c: Include i386-low.h.
11245 (debug_reg_state): Replaces dr.
11246 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11247 (i386_dr_low_get_status): New function.
11248 (i386_insert_point, i386_remove_point): New functions.
11249 (i386_stopped_by_watchpoint): New function.
11250 (i386_stopped_data_address): New function.
11251 (i386_initial_stuff): Update.
11252 (get_thread_context,set_thread_context,i386_thread_added): Update.
11253 (the_low_target): Add entries for insert_point,
11254 remove_point, stopped_by_watchpoint, stopped_data_address.
11255 * win32-low.c (win32_insert_watchpoint): New function.
11256 (win32_remove_watchpoint): New function.
11257 (win32_stopped_by_watchpoint): New function.
11258 (win32_stopped_data_address): New function.
11259 (win32_target_ops): Add entries for insert_watchpoint,
11260 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11261 * win32-low.h (win32_target_ops): New members insert_point,
11262 remove_point, stopped_by_watchpoint, stopped_data_address.
11263
d993e290
PA
112642009-06-25 Pedro Alves <pedro@codesourcery.com>
11265
11266 * server.c (process_serial_event): Re-return unsupported, not
11267 error, if the type isn't recognized. Re-allow supporting only
11268 insert or remove packets. Also call require_running for
11269 breakpoints. Add missing break statement to default case. Tidy.
11270 * target.h (struct target_ops): Rename insert_watchpoint to
11271 insert_point, and remove_watchpoint to remove_point.
11272
11273 * linux-low.h (struct linux_target_ops): Likewise.
11274 * linux-low.c (linux_insert_watchpoint): Rename to ...
11275 (linux_insert_point): ... this. Adjust.
11276 (linux_remove_watchpoint): Rename to ...
11277 (linux_remove_point): ... this. Adjust.
11278 (linux_target_ops): Adjust.
11279 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11280 (cris_insert_point): ... this.
11281 (cris_remove_watchpoint): Rename to ...
11282 (cris_remove_point): ... this.
11283 (the_low_target): Adjust.
11284
0f54c268
PM
112852009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11286
11287 * server.c (handle_v_kill): Pass signal_pid to
11288 kill_inferior if multi_process is zero.
11289
c6314022
AR
112902009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11291
11292 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11293 * target.h (target_ops): Comment for *_watchpoint to make it clear
11294 the functions can get types '0' and '1'.
11295
4463ce24
AR
112962009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11297
11298 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11299 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11300 * regcache.c (get_regcache): Likewise.
11301 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11302 * win32-low.c (child_fetch_inferior_registers): Remove check for
11303 regno 0.
11304
cf8fd78b
PA
113052009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11306 Pedro Alves <pedro@codesourcery.com>
11307
11308 * target.h (struct target_ops) <supports_multi_process>: New
11309 callback.
11310 (target_supports_multi_process): New.
11311 * server.c (handle_query): Even if GDB reports support, only
11312 enable multi-process if the target also supports it. Report
11313 multi-process support only if the target backend supports it.
11314 * linux-low.c (linux_supports_multi_process): New function.
11315 (linux_target_ops): Install it as target_supports_multi_process
11316 callback.
11317
47c0c975
DE
113182009-05-24 Doug Evans <dje@google.com>
11319
e09875d4
DE
11320 Global renaming of find_thread_pid to find_thread_ptid.
11321 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11322 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11323 All callers updated.
11324
e27d73f6
DE
11325 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11326 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11327 directly.
11328
47c0c975
DE
11329 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11330 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11331 (linux_resume_one_lwp): Ditto.
11332
2acc282a
DE
113332009-05-23 Doug Evans <dje@google.com>
11334
11335 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11336 from struct inferior_list_entry * to struct lwp_info *.
11337 All callers updated.
11338
9f1036c1
DE
113392009-05-13 Doug Evans <dje@google.com>
11340
11341 * linux-x86-low.c: Don't include assert.h.
11342 (x86_siginfo_fixup): Use fatal, not assert.
11343 (x86_arch_setup): Fix comment.
11344
d0722149
DE
113452009-05-12 Doug Evans <dje@google.com>
11346
11347 Biarch support for i386/amd64 gdbserver.
11348 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11349 Add linux-x86-low.c.
11350 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11351 (linux-x86-low.o): Add.
11352 * linux-x86-64-low.c: Delete.
11353 * linux-i386-low.c: Delete.
11354 * linux-x86-low.c: New file.
11355 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11356 linux-x86-low.o.
11357 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11358 linux-x86-low.o.
11359 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11360 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11361 (linux_child_pid_to_exec_file): New function.
11362 (elf_64_header_p, elf_64_file_p): New functions.
11363 (siginfo_fixup): New function.
11364 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11365 give target a chance to convert layout.
11366 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11367 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11368
fdeb2a12
DE
113692009-05-07 Doug Evans <dje@google.com>
11370
11371 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11372 (regsets_store_inferior_registers): Ditto.
11373
a6dbe5df
PA
113742009-05-06 Pedro Alves <pedro@codesourcery.com>
11375
11376 PR server/10048
11377
11378 * linux-low.c (must_set_ptrace_flags): Delete.
11379 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11380 of the global.
11381 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11382 `lwp->must_set_ptrace_flags' instead.
ba42693b 11383 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
11384 (linux_wait_1): ... not here.
11385
5091eb23
DE
113862009-04-30 Doug Evans <dje@google.com>
11387
9f767825
DE
11388 * inferiors.c (started_inferior_callback): New function.
11389 (attached_inferior_callback): New function.
11390 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11391 * server.c (print_started_pid, print_attached_pid): New functions.
11392 (detach_or_kill_for_exit): New function.
11393 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11394 * server.h (have_started_inferiors_p): Declare.
11395 (have_attached_inferiors_p): Declare.
11396
5091eb23
DE
11397 * inferiors.c (remove_process): Fix memory leak, free process.
11398 * linux-low.c (linux_remove_process): New function.
11399 (linux_kill): Call it instead of remove_process.
11400 (linux_detach, linux_wait_1): Ditto.
11401
155c8968
PA
114022009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11403
11404 * configure.srv: Add x86 Windows CE target.
11405
7fe519cb
UW
114062009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11407
11408 * inferiors.c (get_thread_process): Make global.
11409 * server.h (get_thread_process): Add prototype.
11410 * thread-db.c (find_one_thread): Use get_thread_process
11411 instead of current_process.
11412 (thread_db_get_tls_address): Do not crash if called when
11413 thread layer is not yet initialized.
11414
5472f405
UW
114152009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11416
11417 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11418 * spu-low.c (current_tid): Rename to ...
11419 (current_ptid): ... this.
11420 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11421 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11422 ptid_get_lwp (current_ptid) instead of current_tid.
11423 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11424 instead of current_tid. Use find_process_pid to verify pid
11425 argument is valid. Pass proper argument to remove_process.
11426 (spu_thread_alive): Compare current_ptid instead of current_tid.
11427 (spu_resume): Likewise.
11428
55ac2b99
PA
114292009-04-02 Pedro Alves <pedro@codesourcery.com>
11430
11431 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11432 variable.
11433
95954743
PA
114342009-04-01 Pedro Alves <pedro@codesourcery.com>
11435
11436 Implement the multiprocess extensions, and add linux multiprocess
11437 support.
11438
11439 * server.h (ULONGEST): Declare.
11440 (struct ptid, ptid_t): New.
11441 (minus_one_ptid, null_ptid): Declare.
11442 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11443 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11444 (struct inferior_list_entry): Change `id' type from unsigned from
11445 to ptid_t.
11446 (struct sym_cache, struct breakpoint, struct
11447 process_info_private): Forward declare.
11448 (struct process_info): Declare.
11449 (current_process): Declare.
11450 (all_processes): Declare.
11451 (initialize_inferiors): Declare.
11452 (add_thread): Adjust to use ptid_t.
11453 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11454 (add_process, remove_process, find_thread_pid): Declare.
11455 (find_inferior_id): Adjust to use ptid_t.
11456 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11457 (multi_process): Declare.
11458 (push_event): Adjust to use ptid_t.
11459 (read_ptid, write_ptid): Declare.
11460 (prepare_resume_reply): Adjust to use ptid_t.
11461 (clear_symbol_cache): Declare.
11462 * inferiors.c (all_processes): New.
11463 (null_ptid, minus_one_ptid): New.
11464 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11465 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11466 (add_thread): Change unsigned long to ptid. Remove gdb_id
11467 parameter. Adjust.
11468 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11469 (gdb_id_to_thread): Rename to ...
11470 (find_thread_pid): ... this. Change unsigned long to ptid.
11471 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11472 (loaded_dll, pull_pid_from_list): Adjust.
11473 (add_process, remove_process, find_process_pid)
11474 (get_thread_process, current_process, initialize_inferiors): New.
11475 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11476 (struct target_waitstatus) <related_pid>: Ditto.
11477 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11478 return type to int.
11479 (struct target_ops) <join>: Add `pid' argument.
11480 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11481 (struct target_ops) <wait>: Add `ptid' field. Change return type
11482 to ptid.
11483 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11484 (mywait): Add `ptid' argument. Change return type to ptid_t.
11485 (target_pid_to_str): Declare.
11486 * target.c (set_desired_inferior): Adjust to use ptids.
11487 (mywait): Add new `ptid' argument. Adjust.
11488 (target_pid_to_str): New.
11489 * mem-break.h (free_all_breakpoints): Declare.
11490 * mem-break.c (breakpoints): Delelete.
11491 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11492 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11493 to use per-process breakpoint list.
11494 (free_all_breakpoints): New.
11495 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11496 (symbol_cache, all_symbols_looked_up): Delete.
11497 (hexchars): New.
11498 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11499 read_ptid): New.
11500 (prepare_resume_reply): Change ptid argument's type from unsigned
11501 long to ptid_t. Adjust. Implement W;process and X;process.
11502 (free_sym_cache, clear_symbol_cache): New.
11503 (look_up_one_symbol): Adjust to per-process symbol cache. *
11504 * server.c (cont_thread, general_thread, step_thread): Change type
11505 to ptid_t.
11506 (attached): Delete.
11507 (multi_process): New.
11508 (last_ptid): Change type to ptid_t.
11509 (struct vstop_notif) <ptid>: Change type to ptid_t.
11510 (queue_stop_reply, push_event): Change `ptid' argument's type to
11511 ptid_t.
11512 (discard_queued_stop_replies): Add `pid' argument.
11513 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11514 changes. Don't reference the `attached' global.
11515 (attach_inferior): Adjust to mywait interface changes.
11516 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11517 features. Handle and report "multiprocess+". Handle
11518 "qAttached:PID".
11519 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11520 changes.
11521 (handle_v_kill): New.
11522 (handle_v_stopped): Adjust to use target_pid_to_str.
11523 (handle_v_requests): Allow multiple attaches and runs when
11524 multiprocess extensions are in effect. Handle "vKill".
11525 (myresume): Adjust to use ptids.
11526 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11527 (handle_status): Adjust to discard_queued_stop_replies interface
11528 change.
11529 (first_thread_of, kill_inferior_callback)
11530 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11531 (main): Call initialize_inferiors. Adjust to use ptids, killing
11532 and detaching from all inferiors. Handle multiprocess packet
11533 variants.
11534 * linux-low.h: Include gdb_proc_service.h.
11535 (struct process_info_private): New.
11536 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11537 <lwpid_of>: Use ptid_get_lwp.
11538 (get_lwp_thread): Adjust.
11539 (struct lwp_info): Add `dead' member.
11540 (find_lwp_pid): Declare.
11541 * linux-low.c (thread_db_active): Delete.
11542 (new_inferior): Adjust comment.
11543 (inferior_pid): Delete.
11544 (linux_add_process): New.
11545 (handle_extended_wait): Adjust.
11546 (add_lwp): Change unsigned long to ptid.
11547 (linux_create_inferior): Add process to processes table. Adjust
11548 to use ptids. Don't set new_inferior here.
11549 (linux_attach_lwp): Rename to ...
11550 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11551 it. Adjust to use ptids.
11552 (linux_attach_lwp): New.
11553 (linux_attach): Add process to processes table. Don't set
11554 new_inferior here.
11555 (struct counter): New.
11556 (second_thread_of_pid_p, last_thread_of_process_p): New.
11557 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11558 multiple processes.
11559 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11560 processes. Remove process from process table.
11561 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11562 to multiple processes.
11563 (any_thread_of): New.
11564 (linux_detach): Add `pid' argument, and handle it. Remove process
11565 from processes table.
11566 (linux_join): Add `pid' argument. Handle it.
11567 (linux_thread_alive): Change unsighed long argument to ptid_t.
11568 Consider dead lwps as not being alive.
11569 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11570 threads we're not interested in.
11571 (same_lwp, find_lwp_pid): New.
11572 (linux_wait_for_lwp): Change `pid' argument's type from int to
11573 ptid_t. Adjust.
11574 (linux_wait_for_event): Rename to ...
11575 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11576 from int to ptid_t. Adjust.
11577 (linux_wait_for_event): New.
11578 (linux_wait_1): Add `ptid' argument. Change return type to
11579 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11580 that exit from the process table.
11581 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11582 Adjust.
11583 (mark_lwp_dead): New.
11584 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11585 stopping all threads, mark its main lwp as dead.
11586 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11587 ptids.
11588 (fetch_register, usr_store_inferior_registers)
11589 (regsets_fetch_inferior_registers)
11590 (regsets_store_inferior_registers, linux_read_memory)
11591 (linux_write_memory): Inline `inferior_pid'.
11592 (linux_look_up_symbols): Adjust to use per-process
11593 `thread_db_active'.
11594 (linux_request_interrupt): Adjust to use ptids.
11595 (linux_read_auxv): Inline `inferior_pid'.
11596 (initialize_low): Don't reference thread_db_active.
11597 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11598 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11599 (ps_getpid): Return the pid of the current inferior.
11600 * thread-db.c (proc_handle, thread_agent): Delete.
11601 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11602 per-process data.
11603 (find_one_thread): Change argument type to ptid_t. Adjust to
11604 per-process data.
11605 (maybe_attach_thread): Adjust to per-process data and ptids.
11606 (thread_db_find_new_threads): Ditto.
11607 (thread_db_init): Ditto.
11608 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11609 processes table. Adjust to use ptids.
11610 (spu_kill, spu_detach): Adjust interface. Remove process from
11611 processes table.
11612 (spu_join, spu_thread_alive): Adjust interface.
11613 (spu_wait): Adjust interface. Remove process from processes
11614 table. Adjust to use ptids.
11615 * win32-low.c (current_inferior_tid): Delete.
11616 (current_inferior_ptid): New.
11617 (debug_event_ptid): New.
11618 (thread_rec): Take a ptid. Adjust.
11619 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11620 (child_delete_thread): Ditto.
11621 (do_initial_child_stuff): Add `attached' argument. Add process to
11622 processes table.
11623 (child_fetch_inferior_registers, child_store_inferior_registers):
11624 Adjust.
11625 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11626 (win32_attach): Pass 1 to do_initial_child_stuff.
11627 (win32_kill): Adjust interface. Remove process from processes
11628 table.
11629 (win32_detach): Ditto.
11630 (win32_join): Adjust interface.
11631 (win32_thread_alive): Take a ptid.
11632 (win32_resume): Adjust to use ptids.
11633 (get_child_debug_event): Ditto.
11634 (win32_wait): Adjust interface. Remove exiting process from
11635 processes table.
11636
bd99dc85
PA
116372009-04-01 Pedro Alves <pedro@codesourcery.com>
11638
11639 Non-stop mode support.
11640
11641 * server.h (non_stop): Declare.
11642 (gdb_client_data, handler_func): Declare.
11643 (delete_file_handler, add_file_handler, start_event_loop):
11644 Declare.
11645 (handle_serial_event, handle_target_event, push_event)
11646 (putpkt_notif): Declare.
11647 * target.h (enum resume_kind): New.
11648 (struct thread_resume): Replace `step' field by `kind' field.
11649 (TARGET_WNOHANG): Define.
11650 (struct target_ops) <wait>: Add `options' argument.
11651 <supports_non_stop, async, start_non_stop>: New fields.
11652 (target_supports_non_stop, target_async): New.
11653 (start_non_stop): Declare.
11654 (mywait): Add `options' argument.
11655 * target.c (mywait): Add `options' argument. Print child exit
11656 notifications here.
11657 (start_non_stop): New.
11658 * server.c (non_stop, own_buf, mem_buf): New globals.
11659 (struct vstop_notif): New.
11660 (notif_queue): New global.
11661 (queue_stop_reply, push_event, discard_queued_stop_replies)
11662 (send_next_stop_reply): New.
11663 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11664 interface changes.
11665 (attach_inferior): In non-stop mode, don't wait for the target
11666 here.
11667 (handle_general_set): Handle QNonStop.
11668 (handle_query): When handling qC, return the current general
11669 thread, instead of the first thread of the list.
11670 (handle_query): If the backend supports non-stop mode, include
11671 QNonStop+ in the qSupported query response.
11672 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11673 and non-stop mode.
11674 (handle_v_attach, handle_v_run): Handle non-stop mode.
11675 (handle_v_stopped): New.
11676 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11677 (myresume): Adjust to use resume_kind. Handle non-stop.
11678 (queue_stop_reply_callback): New.
11679 (handle_status): Handle non-stop mode.
11680 (main): Clear non_stop flag on reconnection. Use the event-loop.
11681 Refactor serial protocol handling from here ...
11682 (process_serial_event): ... to this new function. When GDB
11683 selects any thread, select one here. In non-stop mode, wait until
11684 GDB acks all pending events before exiting.
11685 (handle_serial_event, handle_target_event): New.
11686 * remote-utils.c (remote_open): Install remote_desc in the event
11687 loop.
11688 (remote_close): Remove remote_desc from the event loop.
11689 (putpkt_binary): Rename to...
11690 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11691 (putpkt_binary): New as wrapper around putpkt_binary_1.
11692 (putpkt_notif): New.
11693 (prepare_resume_reply): In non-stop mode, don't change the
11694 general_thread.
11695 * event-loop.c: New.
11696 * Makefile.in (OBJ): Add event-loop.o.
11697 (event-loop.o): New rule.
11698
11699 * linux-low.h (pid_of): Moved here.
11700 (lwpid_of): New.
11701 (get_lwp_thread): Use lwpid_of.
11702 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11703 * linux-low.c (pid_of): Delete.
11704 (inferior_pid): Use lwpid_of.
11705 (linux_event_pipe): New.
11706 (target_is_async_p): New.
11707 (delete_lwp): New.
11708 (handle_extended_wait): Use lwpid_of.
11709 (add_lwp): Don't set lwpid field.
11710 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11711 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11712 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11713 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11714 first. Adjust to linux_wait_for_event interface changes. Use
11715 lwpid_of.
11716 (linux_detach): Don't delete the main lwp here.
11717 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11718 (status_pending_p): Don't consider explicitly suspended lwps.
11719 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11720 pointer. Add OPTIONS argument. Change return type to int. Use
11721 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11722 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11723 pointer. Add status pointer argument. Return a pid instead of a
11724 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11725 changes. In non-stop mode, don't switch to a random thread.
11726 (linux_wait): Rename to...
11727 (linux_wait_1): ... this. Add target_options argument, and handle
11728 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11729 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11730 clean exit and signal exit code. Don't stop all threads in
11731 non-stop mode. In all-stop mode, only stop all threads when
11732 reporting a stop to GDB. Handle explicit thread stop requests.
11733 (async_file_flush, async_file_mark): New.
11734 (linux_wait): New.
11735 (send_sigstop): Use lwpid_of.
11736 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11737 interface changes. In non-stop mode, don't switch to a random
11738 thread.
11739 (linux_resume_one_lwp): Use lwpid_of.
11740 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11741 (linux_resume_one_thread): ... this. Handle resume_stop. In
11742 non-stop mode, don't look for pending flag in all threads.
11743 (resume_status_pending_p): Don't consider explicitly suspended
11744 threads.
11745 (my_waitpid): Reimplement. Emulate __WALL.
11746 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11747 Use lwpid_of.
11748 (sigchld_handler, linux_supports_non_stop, linux_async)
11749 (linux_start_non_stop): New.
11750 (linux_target_ops): Register linux_supports_non_stop, linux_async
11751 and linux_start_non_stop.
11752 (initialize_low): Install SIGCHLD handler.
11753 * thread-db.c (thread_db_create_event, find_one_thread)
11754 (thread_db_get_tls_address): Use lwpid_of.
11755 * win32-low.c (win32_detach): Adjust to use resume_kind.
11756 (win32_wait): Add `options' argument.
11757 * spu-low.c (spu_resume): Adjust to use resume_kind.
11758 (spu_wait): Add `options' argument.
11759
5b1c542e
PA
117602009-04-01 Pedro Alves <pedro@codesourcery.com>
11761
11762 Decouple target code from remote protocol.
11763
11764 * target.h (enum target_waitkind): New.
11765 (struct target_waitstatus): New.
11766 (struct target_ops) <wait>: Return an unsigned long. Take a
11767 target_waitstatus pointer instead of a char pointer.
11768 (mywait): Likewise.
11769 * target.c (mywait): Change prototype to return an unsigned long.
11770 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11771 * server.h (thread_from_wait, old_thread_from_wait): Delete
11772 declarations.
11773 (prepare_resume_reply): Change prototype to take a
11774 target_waitstatus.
11775 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11776 (last_status, last_ptid): New.
11777 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11778 pid instead of a signal.
11779 (attach_inferior): Remove "status" and "signal" parameters.
11780 Adjust.
11781 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11782 not as an address.
11783 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11784 (handle_v_requests, myresume): Remove "status" and "signal"
11785 parameters. Adjust.
11786 (handle_status): New.
11787 (main): Delete local `status'. Adjust.
11788 * remote-utils.c: Include target.h.
11789 (prepare_resume_reply): Change prototype to take a
11790 target_waitstatus. Adjust.
11791
11792 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11793 interface.
11794 * spu-low.c (spu_wait): Adjust.
11795 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11796 Delete.
11797 (win32_wait): Adjust.
11798
2bd7c093
PA
117992009-04-01 Pedro Alves <pedro@codesourcery.com>
11800
11801 * target.h (struct thread_resume): Delete leave_stopped member.
11802 (struct target_ops): Add a `n' argument to the `resume' callback.
11803 * server.c (start_inferior): Adjust.
11804 (handle_v_cont, myresume): Adjust.
11805 * linux-low.c (check_removed_breakpoint): Adjust to resume
11806 interface change, and to removed leave_stopped field.
11807 (resume_ptr): Delete.
11808 (struct thread_resume_array): New.
11809 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11810 resume interface change.
11811 (linux_continue_one_thread, linux_queue_one_thread)
11812 (resume_status_pending_p): Check if the resume field is NULL
11813 instead of checking the leave_stopped member.
11814 (linux_resume): Adjust to the target resume interface change.
11815 * spu-low.c (spu_resume): Adjust to the target resume interface
11816 change.
11817 * win32-low.c (win32_detach, win32_resume): Ditto.
11818
c35fafde
PA
118192009-04-01 Pedro Alves <pedro@codesourcery.com>
11820
11821 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11822 flag.
11823 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11824 pending.
11825 (linux_continue_one_thread): Only preserve the stepping flag if
11826 there's a pending breakpoint.
11827
0a59d50b
PA
118282009-03-31 Pedro Alves <pedro@codesourcery.com>
11829
11830 * server.c (main): After the inferior having exited, call
11831 remote_close before exiting gdbserver.
11832
f04c6d38
TJB
118332009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11834
11835 Fix size of FPSCR in Power 7 processors.
11836 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11837 (PPC_FEATURE_HAS_DFP): New #define.
11838 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11839 size of the FPSCR.
11840
78e5cee6
PA
118412009-03-23 Pedro Alves <pedro@codesourcery.com>
11842
11843 * server.c (handle_query) Whitespace and formatting.
11844
1b3f6016
PA
118452009-03-22 Pedro Alves <pedro@codesourcery.com>
11846
11847 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11848 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11849 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11850 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11851 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11852 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11853 Makefile.in, configure.ac: Fix whitespace throughout.
11854 * configure: Regenerate.
11855
a07b2135
PA
118562009-03-22 Pedro Alves <pedro@codesourcery.com>
11857
11858 * inferiors.c (find_inferior): Make it safe for the callback
11859 function to delete the currently iterated inferior.
11860
67cc2626
PA
118612009-03-22 Pedro Alves <pedro@codesourcery.com>
11862
11863 * Makefile.in (linuw_low_h): Move higher.
11864 (thread-db.o): Depend on $(linux_low_h).
11865
54a0b537
PA
118662009-03-17 Pedro Alves <pedro@codesourcery.com>
11867
11868 Rename "process" to "lwp" throughout.
11869
11870 * linux-low.c (all_processes): Rename to...
11871 (all_lwps): ... this.
11872 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11873 (add_process): Rename to ...
11874 (add_lwp): ... this. Adjust.
11875 (linux_create_inferior): Adjust.
11876 (linux_attach_lwp): Adjust.
11877 (linux_attach): Adjust.
11878 (linux_kill_one_process): Rename to ...
11879 (linux_kill_one_lwp): ... this. Adjust.
11880 (linux_kill): Adjust.
11881 (linux_detach_one_process): Rename to ...
11882 (linux_detach_one_lwp): ... this. Adjust.
11883 (linux_detach): Adjust.
11884 (check_removed_breakpoint): Adjust.
11885 (status_pending_p): Adjust.
11886 (linux_wait_for_process): Rename to ...
11887 (linux_wait_for_lwp): ... this. Adjust.
11888 (linux_wait_for_event): Adjust.
11889 (send_sigstop): Adjust.
11890 (wait_for_sigstop): Adjust.
11891 (stop_all_processes): Rename to ...
11892 (stop_all_lwps): ... this.
11893 (linux_resume_one_process): Rename to ...
11894 (linux_resume_one_lwp): ... this. Adjust.
11895 (linux_set_resume_request, linux_continue_one_thread)
11896 (linux_queue_one_thread, resume_status_pending_p)
11897 (usr_store_inferior_registers, regsets_store_inferior_registers)
11898 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11899 Adjust.
11900 * linux-low.h (get_process): Rename to ...
11901 (get_lwp): ... this. Adjust.
11902 (get_thread_process): Rename to ...
11903 (get_thread_lwp): ... this. Adjust.
11904 (get_process_thread): Rename to ...
11905 (get_lwp_thread): ... this. Adjust.
11906 (struct process_info): Rename to ...
11907 (struct lwp_info): ... this.
11908 (all_processes): Rename to ...
11909 (all_lwps): ... this.
11910 * proc-service.c (ps_lgetregs): Adjust.
11911 * thread-db.c (thread_db_create_event, find_one_thread)
11912 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11913
0b16c5cf
PA
119142009-03-14 Pedro Alves <pedro@codesourcery.com>
11915
11916 * server.c (handle_query): Handle "qAttached".
11917
32de4b9d
NS
119182009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11919
11920 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11921 GPLv3, update license URL.
11922
2aecd87f
DE
119232009-03-01 Doug Evans <dje@google.com>
11924
93efd302 11925 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
11926 (server_h): Add gdb_signals.h.
11927 (signals.o): Update.
11928 * server.h (target_signal_from_host,target_signal_to_host_p)
11929 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11930
86b1f9c5
PM
119312009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11932
11933 * remote-utils.c (getpkt): Also generate remote-debug
11934 information if noack_mode is set.
11935
4aa995e1
PA
119362009-02-06 Pedro Alves <pedro@codesourcery.com>
11937
11938 * server.c (handle_query): Report qXfer:siginfo:read and
11939 qXfer:siginfo:write as supported and handle them.
11940 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11941 * linux-low.c (linux_xfer_siginfo): New.
11942 (linux_target_ops): Set it.
11943
62709adf
PA
119442009-01-26 Pedro Alves <pedro@codesourcery.com>
11945
11946 * server.c (gdbserver_usage): Mention --remote-debug.
11947 (main): Accept '--remote-debug' switch.
11948
aef93bd7
DE
119492009-01-18 Doug Evans <dje@google.com>
11950
11951 * regcache.c (new_register_cache): No need to check result of xcalloc.
11952 * server.c (handle_search_memory): Back out calls to xmalloc,
11953 result is checked and error is returned to user upon failure.
11954 (handle_query): Ditto. Add more checks for result of malloc.
11955 (handle_v_cont): Check result of malloc, report error back to
11956 user upon failure.
11957 (handle_v_run): Ditto. Call freeargv.
11958 * server.h (freeargv): Declare.
11959 * utils.c (freeargv): New fn.
11960
54363045
DE
119612009-01-15 Doug Evans <dje@google.com>
11962
f626972c
DE
11963 * gdbreplay.c (perror_with_name): Make arg const char *.
11964 * server.h (target_signal_to_name): Make return type const char *.
0842e787 11965 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 11966 * utils.c (perror_with_name): Make arg const char *.
54363045 11967
18aae699
PA
119682009-01-14 Pedro Alves <pedro@codesourcery.com>
11969
11970 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11971 when handling a EXIT_PROCESS_DEBUG_EVENT.
11972
ff703abe
JB
119732009-01-06 Joel Brobecker <brobecker@adacore.com>
11974
11975 * gdbreplay.c (gdbreplay_version): Update copyright year.
11976 * server.c (gdbserver_version): Likewise.
11977
f21cc1a2 119782009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
11979
11980 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 11981 (handle_extended_wait): Improve comment.
0e21c1ec 11982
bca929d3
DE
119832008-12-13 Doug Evans <dje@google.com>
11984
11985 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11986 * server.h (ATTR_MALLOC): New macro.
11987 (xmalloc,xcalloc,xstrdup): Declare.
11988 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11989 * inferiors.c: Ditto.
11990 * linux-low.c: Ditto.
11991 * mem-break.c: Ditto.
11992 * regcache.c: Ditto.
11993 * remote-utils.c: Ditto.
11994 * server.c: Ditto.
11995 * target.c: Ditto.
11996 * win32-low.c: Ditto.
11997
97438e3f
DE
119982008-12-12 Doug Evans <dje@google.com>
11999
896c7fbb
DE
12000 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12001 in debugging printf.
12002
97438e3f
DE
12003 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12004
e3b886f8
DE
120052008-12-09 Doug Evans <dje@google.com>
12006
12007 * linux-low.h (struct process_info): Delete member tid, unused.
12008 * thread-db.c (find_one_thread): Update.
12009 (maybe_attach_thread): Update.
12010
07e059b5
VP
120112008-12-02 Pedro Alves <pedro@codesourcery.com>
12012
889bf7c5
PA
12013 * target.h (struct target_ops): Add qxfer_osdata member.
12014 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12015 and dirent.h.
12016 (linux_qxfer_osdata): New functions.
12017 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12018 callback.
12019 * server.c (handle_query): Handle "qXfer:osdata:read:".
12020 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12021 (buffer_xml_printf): New functions.
12022 * server.h (struct buffer): New.
12023 (buffer_grow_str, buffer_grow_str0): New macros.
12024 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12025 (buffer_xml_printf): Declare.
07e059b5 12026
4cab47ab
DE
120272008-11-24 Doug Evans <dje@google.com>
12028
12029 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12030
f142445f
DJ
120312008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12032
12033 * server.c (handle_v_run): Always use the supplied argument list.
12034
d0107bb6 120352008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12036
d0107bb6
BW
12037 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12038 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12039
2c4ad781
TJB
120402008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12041
12042 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12043 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12044 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12045 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12046 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12047 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12048 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12049 XML target descriptions.
12050 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12051 when inferior is running on an ISA 2.05 or later processor. Add
12052 special case to return offset for full 64-bit slot of FPSCR when
12053 in 32-bits.
12054
dfb64f85
DJ
120552008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12056
12057 * Makefile.in (SFILES, clean): Added sparc64 files.
12058 (reg-sparc64.o, reg-sparc64.c): New.
12059 * configure.srv (sparc*-*-linux*): New configuration.
12060 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12061 syscall arguments for SPARC.
12062 (regsets_store_inferior_registers): Likewise.
12063 * linux-sparc-low.c: New file.
12064
66b6e1dd
DE
120652008-10-21 Doug Evans <dje@google.com>
12066
12067 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12068 (READLINE_DIR,READLINE_DEP): Delete.
12069 (INTERNAL_CFLAGS): Update.
12070 (LINTFLAGS): Update.
12071
9b710a42
PA
120722008-10-10 Pedro Alves <pedro@codesourcery.com>
12073
12074 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12075 whole argv from the last run, not just argv[0].
12076
5822d809
PA
120772008-09-08 Pedro Alves <pedro@codesourcery.com>
12078
12079 * regcache.c (new_register_cache): Return NULL if the register
12080 cache size isn't known yet.
12081 (free_register_cache): Avoid dereferencing a NULL regcache.
12082
74aac56f
DJ
120832008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12084
12085 * configure.srv: Merge MIPS and MIPS64.
12086
400b20f5
MR
120872008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12088
12089 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12090
677c5bb1
LM
120912008-08-18 Luis Machado <luisgpm@br.ibm.com>
12092
12093 * Makefile.in: Add required vsx dependencies.
12094
12095 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12096 Declare init_registers_powerpc_vsx32l.
12097 Declare init_registers_powerpc_vsx64l.
12098 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12099 (ppc_arch_setup): Check for VSX in hwcap.
12100 (ppc_fill_vsxregset): New function.
12101 (ppc_store_vsxregset): New function.
12102 Add new VSX entry in regset_info target_regsets.
12103
12104 * configure.srv: Add new VSX dependencies.
12105
a6f3e723
SL
121062008-08-12 Pedro Alves <pedro@codesourcery.com>
12107
12108 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12109 (remote_open): Set or clear transport_is_reliable.
12110 (putpkt_binary): Don't expect acks in noack mode.
12111 (getpkt): Don't send ack/nac in noack mode.
12112 * server.c (handle_general_set): Handle QStartNoAckMode.
12113 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12114 qSupported.
12115 (main): Reset noack_mode on every connection.
12116 * server.h (noack_mode): Declare.
12117
a417dc56
RW
121182008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12119
12120 * Makefile.in (GDBREPLAY_OBS): New variable.
12121 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12122
3221518c
UW
121232008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12124 Daniel Jacobowitz <dan@codesourcery.com>
12125
12126 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12127 (usr_store_inferior_registers): Likewise.
12128 (regsets_store_inferior_registers): Likewise.
12129
ec56be1b
PA
121302008-07-31 Rolf Jansen <rj@surtec.com>
12131 Pedro Alves <pedro@codesourcery.com>
12132
12133 * configure.ac: Check for memmem declaration.
12134 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12135 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12136 (disable_packet_qfThreadInfo): Unconditionally compile.
12137 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12138 * configure, config.in: Regenerate.
12139
2fe5e3ff
DE
121402008-07-28 Doug Kwan <dougkwan@google.com>
12141
12142 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12143 (linux_write_memory): Remove declaration of errno.
12144
836acd6d
UW
121452008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12146
12147 * linux-low.c (handle_extended_wait): Do not use "status"
12148 variable uninitialized.
12149
aeba519e
PA
121502008-07-07 Pedro Alves <pedro@codesourcery.com>
12151
12152 * server.c (handle_v_attach): Inhibit reporting dll changes.
12153
db42f210
PA
121542008-06-27 Pedro Alves <pedro@codesourcery.com>
12155
12156 * remote-utils.c (prepare_resume_reply): If requested, don't
12157 output "thread:TID" in the T stop reply.
12158
12159 * server.c (disable_packet_vCont, disable_packet_Tthread)
12160 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12161 (handle_query): If requested, disable support for qC, qfThreadInfo
12162 and qsThreadInfo.
12163 (handle_v_requests): If requested, disable support for vCont.
12164 (gdbserver_show_disableable): New.
12165 (main): Handle --disable-packet and --disable-packet=LIST.
12166
12167 * server.h (disable_packet_vCont, disable_packet_Tthread)
12168 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12169
8e4c5421
CD
121702008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12171
12172 * server.c (gdbserver_usage): Mention --version.
12173
6e23a804
DJ
121742008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12175
12176 * Makefile.in (gdbreplay.o): New rule.
12177
90aa6a40
JM
121782008-06-06 Joseph Myers <joseph@codesourcery.com>
12179
12180 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12181 message, not gdbserver.
12182
c16158bc 121832008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
12184 Nathan Sidwell <nathan@codesourcery.com>
12185 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
12186
12187 * acinclude.m4: Include ../../config/acx.m4.
12188 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12189 * configure, config.in: Regenerate.
12190 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12191 * server.c (gdbserver_version): Print PKGVERSION.
12192 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12193 (main): Adjust gdbserver_usage calls.
12194 * gdbreplay.c (version, host_name): Add declarations.
12195 (gdbreplay_version, gdbreplay_usage): New.
12196 (main): Accept --version and --help options.
12197
aeb75bf5
DJ
121982008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12199
12200 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12201 (arm_breakpoint_at): Handle Thumb.
12202 (the_low_target): Add comment.
12203
76b233dd
UW
122042008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12205
12206 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12207
08388c79
DE
122082008-05-09 Doug Evans <dje@google.com>
12209
a3c83fae
DE
12210 * server.h (decode_search_memory_packet): Declare.
12211 * remote-utils.c (decode_search_memory_packet): New fn.
12212 * server.c (handle_search_memory_1): New fn.
08388c79
DE
12213 (handle_search_memory): New fn.
12214 (handle_query): Process qSearch:memory packets.
12215
bb9c3d36
UW
122162008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12217
12218 * regcache.c (registers_length): Remove.
12219 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12220 full register packet.
12221 * regcache.h (registers_length): Remove prototype.
12222 * server.h (PBUFSIZ): Define to 16384.
12223
7284e1be
UW
122242008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12225
12226 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12227 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12228 powerpc-64l.o, and powerpc-altivec64l.o.
12229 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12230 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12231 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12232 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12233 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12234 to srv_xmlfiles.
12235
12236 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12237 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12238 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12239 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12240 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12241 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12242 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12243 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12244 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12245 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12246 (clean): Update.
12247
12248 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12249 (init_registers_powerpc_32l): ... this new prototype.
12250 (init_registers_powerpc_32): Remove, replace by ...
12251 (init_registers_powerpc_altivec32l): ... this new prototype.
12252 (init_registers_powerpc_e500): Remove, replace by ...
12253 (init_registers_powerpc_e500l): ... this new prototype.
12254 (init_registers_ppc64): Remove, replace by ...
12255 (init_registers_powerpc_64l): ... this new prototype.
12256 (init_registers_powerpc_64): Remove, replace by ...
12257 (init_registers_powerpc_altivec64l): ... this new prototype.
12258 (ppc_num_regs): Set to 73.
12259 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12260 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12261 (ppc_cannot_store_register): Handle orig_r3 and trap.
12262 (ppc_arch_setup): Update init_registers_... calls.
12263 (ppc_fill_gregset): Handle orig_r3 and trap.
12264
12265 * inferiors.c (clear_inferiors): Reset current_inferior.
12266
fdc59709
PB
122672008-04-23 Paolo Bonzini <bonzini@gnu.org>
12268
889bf7c5
PA
12269 * acinclude.m4: Add override.m4.
12270 * configure: Regenerate.
fdc59709 12271
c9b2f845
UW
122722008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12273
12274 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12275 initial call to init_register_ppc64.
12276
550512b8
UW
122772008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12278
43aaf8b6
PA
12279 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12280 single powerpc*-*-linux* case.
550512b8
UW
12281 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12282
b6430ec3
UW
122832008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12284
12285 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 12286 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
12287 from reg_xmlfiles.
12288 * linux-ppc-low.c: Include <elf.h>.
12289 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12290 (ppc_hwcap): New global variable.
12291 (ppc_regmap): Remove __SPE__ #ifdef sections.
12292 (ppc_regmap_e500): New global variable.
12293 (ppc_cannot_store_register): Update __SPE__ special case.
12294 (ppc_get_hwcap): New function.
12295 (ppc_arch_setup): Use it to determine whether inferior supports
12296 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12297 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12298 Do not access registers if target does not support AltiVec.
12299 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12300 Do not access registers if target does not support SPE.
12301 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12302
52fa2412
UW
123032008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12304
12305 * linux-low.c (disabled_regsets, num_regsets): New.
12306 (use_regsets_p): Delete.
12307 (linux_wait_for_process): Clear disabled_regsets.
12308 (regsets_fetch_inferior_registers): Check and set it.
12309 (regsets_store_inferior_registers): Likewise.
12310 (linux_fetch_registers, linux_store_registers): Do not use
12311 use_regsets_p.
12312 (initialize_low): Allocate disabled_regsets.
12313
e28b3332
DJ
123142008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12315
12316 * Makefile.in (LIBOBJS): New.
12317 (OBS): Use LIBOBJS.
12318 (memmem.o): New rule.
12319 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12320 * configure: Regenerated.
12321
4536995d
UW
123222008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12323
12324 * server.c (handle_query): Never return "unsupported" for
12325 qXfer:features:read queries.
12326
221c031f
UW
123272008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12328
12329 * server.c (get_features_xml): Fix inverted condition.
12330 (handle_query): Always support qXfer:feature:read.
12331
ccd213ac
DJ
123322008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12333
12334 * server.c (wrapper_argv): New.
12335 (start_inferior): Handle wrapper_argv. If set, expect an extra
12336 trap.
12337 (gdbserver_usage): Document --wrapper.
12338 (main): Parse --wrapper.
12339
6fe305f7
UW
123402008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12341
12342 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12343 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12344 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12345 (ppc_set_pc): Likewise.
12346 (ppc_arch_setup): New function.
12347 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12348 of collect_register.
889bf7c5 12349 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 12350
5b0a002e
UW
123512008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12352
12353 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12354 instead of linux-ppc64-low.o.
12355 * linux-ppc64-low.c: Remove file.
12356 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12357 (linux-ppc64-low.o): Remove rule.
12358
12359 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12360 (init_registers_powerpc_64): Likewise.
12361 (ppc_regmap): Conditionally define depending on __powerpc64__.
12362 (ppc_cannot_store_register): Do not special-case "fpscr" when
12363 compiled on __powerpc64__.
12364 (ppc_collect_ptrace_register): New function.
12365 (ppc_supply_ptrace_register): New function.
12366 (ppc_breakpoint): Change type to "unsigned int".
12367 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12368 (the_low_target): Conditionally provide initializers for the
889bf7c5 12369 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
12370 collect_ptrace_register and supply_ptrace_register members.
12371
9b4b61c8
UW
123722008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12373
12374 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12375 * server.c (gdbserver_xmltarget): Define.
12376 (get_features_xml): Use it to replace "target.xml" and arch_string.
12377
12378 * configure.srv: Remove srv_xmltarget. Add XML files that were
12379 mentioned there to srv_xmlfiles instead. Remove conditional tests
12380 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12381 srv_xmlfiles and srv_regobj to include all possible choices.
12382 * configure.ac (srv_xmltarget): Remove.
12383 (srv_xmlfiles): Do not add "target.xml".
12384 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12385 checks for supplementary target information.
12386 * configure: Regenerate.
12387 * Makefile.in (XML_TARGET): Remove.
12388 (target.xml): Remove rule.
12389 (clean): Do not clean up target.xml.
12390 (.PRECIOUS): Do not mention target.xml.
12391
12392 * target.h (struct target_ops): Remove arch_string member.
12393 * linux-low.c (linux_arch_string): Remove.
12394 (linux_target_ops): Remove arch_string initializer.
12395 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12396 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12397 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12398 * spu-low.c (spu_arch_string): Remove.
12399 (spu_target_ops): Remove arch_string initializer.
12400 * win32-low.c (win32_arch_string): Remove.
12401 (win32_target_ops): Remove arch_string initializer.
12402 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12403 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12404 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12405
ee1a7ae4
UW
124062008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12407
12408 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12409 by collect_ptrace_register and supply_ptrace_register hooks.
12410 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12411 instead of checking for the_low_target.left_pad_xfer.
12412 (usr_store_inferior_registers): Use collect_ptrace_register callback
12413 instead of checking for the_low_target.left_pad_xfer.
12414
12415 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12416 (s390_supply_ptrace_register): Likewise.
12417 (s390_fill_gregset): Call s390_collect_ptrace_register.
12418 (the_low_target): Update.
12419
12420 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12421 (ppc_supply_ptrace_register): Likewise.
12422 (the_low_target): Update.
12423
12424 * linux-i386-low.c (the_low_target): Update.
12425 * linux-x86-64-low.c (the_low_target): Update.
12426
d61ddec4
UW
124272008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12428
12429 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12430 reg-s390.o and reg-s390x.o.
12431
12432 * linux-low.c (new_inferior): New global variable.
12433 (linux_create_inferior, linux_attach): Set it.
12434 (linux_wait_for_process): Call the_low_target.arch_setup after the
12435 target has stopped for the first time.
12436 (initialize_low): Do not call the_low_target.arch_setup.
12437
12438 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12439 (s390_set_pc): Likewise.
12440 (s390_arch_setup): New function.
12441 (the_low_target): Use s390_arch_setup as arch_setup routine.
12442
12443 * regcache.c (realloc_register_cache): New function.
12444 (set_register_cache): Call it for each existing regcache.
12445
d05b4ac3
UW
124462008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12447
12448 * server.h (init_registers): Remove prototype.
12449
12450 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12451 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12452 instead of init_registers ().
12453 * linux-arm-low.c (init_registers_arm): Add prototype.
12454 (init_registers_arm_with_iwmmxt): Likewise.
12455 (the_low_target): Add initializer for arch_setup field.
12456 * linux-cris-low.c (init_registers_cris): Add prototype.
12457 (the_low_target): Add initializer for arch_setup field.
12458 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12459 (the_low_target): Add initializer for arch_setup field.
12460 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12461 (the_low_target): Add initializer for arch_setup field.
12462 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12463 (the_low_target): Add initializer for arch_setup field.
12464 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12465 (the_low_target): Add initializer for arch_setup field.
12466 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12467 (the_low_target): Add initializer for arch_setup field.
12468 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12469 (init_registers_mips64_linux): Likewise.
12470 (the_low_target): Add initializer for arch_setup field.
12471 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12472 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12473 (the_low_target): Add initializer for arch_setup field.
12474 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12475 (init_registers_powerpc_64): Likewise.
12476 (the_low_target): Add initializer for arch_setup field.
12477 * linux-s390-low.c (init_registers_s390): Add prototype.
12478 (init_registers_s390x): Likewise.
12479 (the_low_target): Add initializer for arch_setup field.
12480 * linux-sh-low.c (init_registers_sh): Add prototype.
12481 (the_low_target): Add initializer for arch_setup field.
12482 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12483 (the_low_target): Add initializer for arch_setup field.
12484 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12485 (the_low_target): Add initializer for arch_setup field.
12486
12487 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12488 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12489 instead of init_registers ().
12490 * win32-arm-low.c (init_registers_arm): Add prototype.
12491 (the_low_target): Add initializer for arch_setup field.
12492 * win32-i386-low.c (init_registers_i386): Add prototype.
12493 (the_low_target): Add initializer for arch_setup field.
12494
12495 * spu-low.c (init_registers_spu): Add prototype.
12496 (initialize_low): Call initialie_registers_spu () instead of
12497 initialize_registers ().
12498
fd96d250
PA
124992008-02-19 Pedro Alves <pedro@codesourcery.com>
12500
12501 * server.c (handle_v_requests): When handling the vRun and vAttach
12502 packets, if already debugging a process, don't kill it. Return an
12503 error instead.
12504
d41b6bb4
DJ
125052008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12506
12507 * server.c (handle_query): Correct length check.
12508
5ac588cf
PA
125092008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12510
12511 * win32-low.c (do_initial_child_stuff): Add process handle
12512 parameter. Set current_process_handle and current_process_id from the
12513 parameters. Clear globals.
12514 (win32_create_inferior): Don't set current_process_handle and
12515 current_process_id here. Instead pass them on the call to
12516 do_initial_child_stuff.
12517 (win32_attach): Likewise.
12518 (win32_clear_inferiors): New.
12519 (win32_kill): Don't close the current process handle or the
12520 current thread handle here. Instead call win32_clear_inferiors.
12521 (win32_detach): Don't open a new handle to the process. Call
12522 win32_clear_inferiors.
12523 (win32_join): Don't rely on current_process_handle; open a new
12524 handle using the process id.
12525 (win32_wait): Call win32_clear_inferiors when the inferior process
12526 has exited.
12527
ecd7ecbc
DJ
125282008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12529
12530 * server.c (monitor_show_help): Add "exit".
12531
1525d545
MG
125322008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12533
ecd7ecbc 12534 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
12535 (clean): Add reg-xtensa.c.
12536 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
12537 * configure.srv (xtensa*-*-linux*) New target.
12538 * linux-xtensa-low.c: New.
12539 * xtensa-xtregs.c: New.
1525d545 12540
59a016f0
PA
125412008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12542
12543 * hostio.c: Don't include errno.h.
12544 (errno_to_fileio_errno): Move to hostio-errno.
12545 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12546 error number outputting to the target->hostio_last_error callback.
12547 (hostio_packet_error): Use FILEIO_EINVAL directly.
12548 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12549 calls to hostio_error.
12550 * hostio-errno.c: New.
12551 * server.h (hostio_last_error_from_errno): Declare.
12552 * target.h (target_ops): Add hostio_last_error member.
12553 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12554 as hostio_last_error handler.
889bf7c5 12555 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
12556 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12557 (wince_hostio_last_error): New functions.
12558 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12559 as hostio_last_error handler.
12560 (win32_target_ops) [!_WIN32_WCE]: Register
12561 hostio_last_error_from_errno as hostio_last_error handler.
12562 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12563 (hostio-errno.o): New rule.
12564 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12565 * configure.srv (srv_hostio_err_objs): New variable. Default to
12566 hostio-errno.o.
12567 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12568 * configure: Regenerate.
12569
2d717e4f
DJ
125702008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12571
12572 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12573 (linux_kill, linux_detach): Clean up the process list.
12574 * remote-utils.c (remote_open): Improve port number parsing.
12575 (putpkt_binary, input_interrupt): Only send interrupts if the target
12576 is running.
12577 * server.c (extended_protocol): Make static.
12578 (attached): Define earlier.
12579 (exit_requested, response_needed, program_argv): New variables.
12580 (target_running): New.
12581 (start_inferior): Clear attached here.
12582 (attach_inferior): Set attached here.
12583 (require_running): Define.
12584 (handle_query): Use require_running and target_running. Implement
12585 "monitor exit".
12586 (handle_v_attach, handle_v_run): New.
12587 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12588 (gdbserver_usage): Update.
12589 (main): Redo argument parsing. Handle --debug and --multi. Handle
12590 --attach along with other options or after the port. Save
12591 program_argv. Support no initial program. Resynchronize
12592 communication with GDB after an error. Handle "monitor exit".
12593 Use require_running and target_running. Always allow the extended
12594 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12595 restart in extended mode.
12596 * README: Refer to the GDB manual. Update --attach usage.
12597
7407e2de
AS
125982007-12-20 Andreas Schwab <schwab@suse.de>
12599
12600 * linux-low.c (STACK_SIZE): Define.
12601 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12602 (linux_test_for_tracefork): Likewise.
12603
b65d95c5
DJ
126042007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12605
12606 * linux-low.c (linux_wait_for_event): Update messages. Do not
12607 reinsert auto-delete breakpoints.
12608 * mem-break.c (struct breakpoint): Change return type of handler to
12609 int.
12610 (set_breakpoint_at): Update handler type.
12611 (reinsert_breakpoint_handler): Return 1 instead of calling
12612 delete_breakpoint.
12613 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12614 setting a new one.
12615 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12616 * mem-break.h (set_breakpoint_at): Update handler type.
12617 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12618 * win32-low.c (auto_delete_breakpoint): New.
12619 (get_child_debug_event): Use it.
12620
4e799345
DJ
126212007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12622
12623 * configure.ac: Check for pread and pwrite.
12624 * hostio.c (handle_pread): Fall back to lseek and read.
12625 (handle_pwrite): Fall back to lseek and write.
12626 * config.in, configure: Regenerated.
12627
27524b67
DJ
126282007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12629
12630 * server.c (myresume): Add own_buf argument.
12631 (main): Update calls.
12632
a20d5e98
DJ
126332007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12634
12635 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12636 * remote-utils.c (remote_open): Do not call disable_async_io.
12637 (block_async_io): Delete.
12638 (unblock_async_io): Make static.
12639 (initialize_async_io): New.
12640 * server.c (handle_v_cont): Handle async I/O here.
12641 (myresume): Likewise. Move other common resume tasks here...
12642 (main): ... from here. Call initialize_async_io. Disable async
12643 I/O before the main loop.
12644 * server.h (initialize_async_io): Declare.
12645 (block_async_io, unblock_async_io): Delete prototypes.
12646 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12647
b79d787e
DJ
126482007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12649
12650 * remote-utils.c (readchar): Allow binary data in received messages.
12651
d97903b2
PA
126522007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12653
12654 * win32-low.c (attaching): New global.
12655 (win32_create_inferior): Clear the `attaching' global.
12656 (win32_attach): Set the `attaching' global.
12657 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12658 attaching. Only set a breakpoint at the entry point if not
12659 attaching.
12660
311de423
PA
126612007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12662
12663 * server.c (main): Don't report dll events on the initial
12664 connection on attaches.
12665
6c2d16d2
PA
126662007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12667
12668 * server.c (main): Relax numerical bases supported for the pid of
12669 the --attach command line argument.
12670
5ca906e6
PA
126712007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12672
12673 * win32-low.c (win32_attach): Call OpenProcess before
12674 DebugActiveProcess, not after. Add last error output to error
12675 call.
12676
9c6c8194
PA
126772007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12678
12679 * win32-low.c (win32_get_thread_context)
12680 (win32_set_thread_context): New functions.
12681 (thread_rec): Use win32_get_thread_context.
12682 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12683 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12684 field.
12685
4d5d1aaa
PA
126862007-12-03 Leo Zayas
12687 Pedro Alves <pedro_alves@portugalmail.pt>
12688
12689 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12690 global variables.
12691 (child_add_thread): Minor cleanup.
12692 (child_continue): Resume artificially suspended threads before
12693 calling ContinueDebugEvent.
12694 (suspend_one_thread): New.
12695 (fake_breakpoint_event): New.
12696 (get_child_debug_event): Change return type to int. Check here if
12697 gdb sent an interrupt request. If a soft interrupt was requested,
12698 fake a breakpoint event. Return 0 if there is no event to handle,
12699 and 1 otherwise.
12700 (win32_wait): Don't check here if gdb sent an interrupt request.
12701 Ensure there is a valid event to handle.
12702 (win32_request_interrupt): Add soft interruption method as last
12703 resort.
12704
c436e841
PA
127052007-12-03 Leo Zayas
12706 Pedro Alves <pedro_alves@portugalmail.pt>
12707
12708 * win32-low.h (win32_thread_info): Add descriptions to the
12709 structure members. Replace `suspend_count' counter by a
12710 `suspended' flag.
12711 * win32-low.c (thread_rec): Update condition of when to get the
12712 context from the inferior. Rely on ContextFlags being set if it
12713 has already been retrieved. Only suspend the inferior thread if
12714 we haven't already. Warn if that fails.
12715 (continue_one_thread): s/suspend_count/suspended/. Only call
12716 ResumeThread once. Warn if that fails.
12717
e7b5fa67
PA
127182007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12719
12720 * win32-low.c (win32_wait): Don't read from the inferior when it
12721 has already exited.
12722
a385171d
PA
127232007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12724
12725 * Makefile.in (win32_low_h): New variable.
12726 (win32-low.o): Add dependency on $(win32_low_h).
12727 (win32-arm-low.o, win32-i386-low.o): New rules.
12728
f80c84b3
DJ
127292007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12730
12731 * hostio.c: Correct copyright year.
12732
a6b151f1
DJ
127332007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12734
12735 * Makefile.in (OBS): Add hostio.o.
12736 (hostio.o): New rule.
12737 * server.h (handle_vFile): Declare.
12738 * hostio.c: New file.
12739 * server.c (handle_v_requests): Take packet_len and new_packet_len
12740 for binary packets. Call handle_vFile.
12741 (main): Update call to handle_v_requests.
12742
f9387fc3
DJ
127432007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12744
12745 * linux-low.c: Include <sched.h>.
12746
51c2684e
DJ
127472007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12748
12749 * linux-low.c (linux_tracefork_grandchild): New.
12750 (linux_tracefork_child): Use clone.
12751 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12752
75f83163
JB
127532007-10-31 Joel Brobecker <brobecker@adacore.com>
12754
12755 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12756
da5898ce
DJ
127572007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12758
12759 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12760
24a09b5f
DJ
127612007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12762
12763 * inferiors.c (change_inferior_id): Delete.
12764 (add_pid_to_list, pull_pid_from_list): New.
12765 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12766 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12767 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12768 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12769 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12770 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12771 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12772 (using_threads): Always set to 1.
12773 (handle_extended_wait): New.
12774 (add_process): Do not set TID.
12775 (linux_create_inferior): Set must_set_ptrace_flags.
12776 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12777 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12778 (linux_thread_alive): Rename TID argument to LWPID.
12779 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12780 (linux_wait_for_event): Do not use TID or check using_threads. Update
12781 call to dead_thread_notify. Call handle_extended_wait.
12782 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12783 (send_sigstop): Delete sigstop_sent.
12784 (wait_for_sigstop): Avoid TID.
12785 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12786 (linux_test_for_tracefork): New.
12787 (linux_lookup_signals): Use thread_db_active and
12788 linux_supports_tracefork_flag.
12789 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12790 * linux-low.h (get_process_thread): Avoid TID.
12791 (struct process_ifo): Move thread_known and tid to the end. Remove
12792 sigstop_sent.
12793 (linux_attach_lwp, thread_db_init): Update prototypes.
12794 * server.h (change_inferior_id): Delete prototype.
12795 (add_pid_to_list, pull_pid_from_list): New prototypes.
12796 * thread-db.c (thread_db_use_events): New.
12797 (find_first_thread): Rename to...
12798 (find_one_thread): ...this. Update callers and messages. Do not
12799 call fatal. Check thread_db_use_events. Do not call
12800 change_inferior_id or new_thread_notify.
12801 (maybe_attach_thread): Update. Do not call new_thread_notify.
12802 (thread_db_init): Set thread_db_use_events. Check use_events.
12803 * utils.c (fatal, warning): Correct message prefix.
12804
30ed0a8f
DJ
128052007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12806
12807 * Makefile.in (clean): Remove new files.
12808 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12809 (powerpc-64.o, powerpc-64.c): New rules.
12810 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12811 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12812 with SPE.
12813 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12814 SPE targets.
12815 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12816 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12817 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12818 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12819 (target_regsets): Add AltiVec and SPE register sets.
12820 * configure.ac: Check for AltiVec and SPE.
12821 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12822 (ppc_fill_vrregset, ppc_store_vrregset): New.
12823 (target_regsets): Add AltiVec register set.
12824 * configure: Regenerated.
12825
fd462a61
DJ
128262007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12827
12828 * linux-low.c (O_LARGEFILE): Define.
12829 (linux_read_memory): Use /proc/PID/mem.
12830 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12831 * configure, config.in: Regenerated.
12832
69f223ed
DJ
128332007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12834
12835 * linux-low.c (linux_wait_for_event): Do not pass signals while
12836 single-stepping.
12837
aec18585
PA
128382007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12839
12840 * win32-low.c (create_process): New.
12841 (win32_create_inferior): Use create_process instead of
12842 CreateProcess. If create_process failed retry appending an ".exe"
12843 suffix. Store the GetLastError result immediatelly after
12844 create_process calls and use it on the call to error.
12845
34d86ddd
PA
128462007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12847
12848 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12849
5a0e3bd0
JB
128502007-08-23 Joel Brobecker <brobecker@adacore.com>
12851
12852 * configure.ac: Switch license to GPLv3.
12853
f88c79e6
MS
128542007-08-01 Michael Snyder <msnyder@access-company.com>
12855
12856 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12857
6b3d9b83
PA
128582007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12859
12860 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12861 typedef.
12862 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12863 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12864 CloseToolhelp32Snapshot.
12865 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12866 CloseToolhelp32Snapshot.
12867
c588c53c
MS
128682007-07-27 Michael Snyder <michael.snyder@access-company.com>
12869
12870 * server.c (main): Check for inferior exit before main loop.
12871
aa0403d9
PA
128722007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12873
12874 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12875 instead of on tmp_desc.
12876
255e7678
DJ
128772007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12878 Daniel Jacobowitz <dan@codesourcery.com>
12879
12880 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12881 (add_thread): Minor cleanups.
12882 (clear_inferiors): Move lower in the file. Clear the DLL
12883 list.
12884 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12885 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12886 (xml_escape_text): New.
12887 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12888 for qSupported.
12889 (handle_v_cont): Report errors.
12890 (gdbserver_version): Update.
12891 (main): Correct size of own_buf. Do not report initial DLL events.
12892 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12893 (unloaded_dll, xml_escape_text): New.
12894 * win32-low.c (enum target_waitkind): Update comments.
12895 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12896 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12897 (win32_EnumProcessModules, win32_GetModuleInformation)
12898 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12899 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12900 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12901 (win32_Module32First, win32_Module32Next, load_toolhelp)
12902 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12903 (get_child_debug_event): Handle DLL events.
12904 (win32_wait): Likewise.
12905
0d37add9
DJ
129062007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12907
12908 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12909 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12910
45e2715e
PA
129112007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12912
12913 * win32-low.c (handle_output_debug_string): Ignore event if not
12914 waiting.
12915
c5674cf1
PA
129162007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12917
12918 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12919
2bbe3cc1
DJ
129202007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12921
12922 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12923
ae13219e
DJ
129242007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12925
12926 * inferiors.c (change_inferior_id): Add comment.
12927 * linux-low.c (check_removed_breakpoint): Add an early
12928 prototype. Improve debug output.
12929 (linux_attach): Doc update.
12930 (linux_detach_one_process, linux_detach): Clean up before releasing
12931 each process.
12932 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12933 * linux-low.h (struct process_info): Doc improvement.
12934 * mem-break.c (delete_all_breakpoints): New.
12935 * mem-break.h (delete_all_breakpoints): New prototype.
12936 * thread-db.c (find_first_thread): New.
12937 (thread_db_create_event): Call it instead of
12938 thread_db_find_new_threads. Clean up unused variables.
12939 (maybe_attach_thread): Remove first thread handling.
12940 (thread_db_find_new_threads): Use find_first_thread.
12941 (thread_db_get_tls_address): Likewise.
12942
4105de34
DJ
129432007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12944
12945 * thread-db.c (thread_db_find_new_threads): Add prototype.
12946 (thread_db_create_event): Check for the main thread before adding
12947 a new thread.
12948 (maybe_attach_thread): Only enable event reporting if TID == 0.
12949 (thread_db_get_tls_address): Check for new threads.
12950
2b876972
DJ
129512007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
12952
12953 * linux-low.c (linux_create_inferior): Try execv before execvp.
12954 * spu-low.c (spu_create_inferior): Likewise.
12955
7a245884
DJ
129562007-06-13 Mike Frysinger <vapier@gentoo.org>
12957
12958 * linux-low.c (linux_create_inferior): Change execv to execvp.
12959 * spu-low.c (spu_create_inferior): Likewies.
12960
117ce543
DJ
129612007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
12962
12963 * Makefile.in (clean): Clean new files instead of deleted ones.
12964 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12965 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12966 rules.
12967 * configure.srv: Specify XML files and new regformats for MIPS and
12968 MIPS64 GNU/Linux.
12969 * linux-mips-low.c (mips_num_regs): Set to only used registers.
12970 (mips_regmap): Do not fetch $0. Remove unused registers. Add
12971 an entry for the restart register.
12972 (mips_cannot_fetch_register, mips_cannot_store_register)
12973 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12974 register names to match the XML descriptions.
12975 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
12976 restart register instead of $0.
12977
0e7f50da
UW
129782007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12979 Markus Deuling <deuling@de.ibm.com>
12980
12981 * remote-utils.c (decode_xfer_write): New function.
12982 * server.h (decode_xfer_write): Add prototype.
12983 * server.c (handle_query): Add PACKET_LEN argument. Support
12984 qXfer:spu:read and qXfer:spu:write packets.
12985 (main): Pass packet_len to handle_query.
12986 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12987 * target.h (target_ops): Add qxfer_spu.
12988
374c1d38
UW
129892007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12990
12991 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12992 accessing non-seekable spufs files.
12993
bb63802a
UW
129942007-05-16 Markus Deuling <deuling@de.ibm.com>
12995
889bf7c5 12996 * server.c (handle_query): Add reply for qC packet.
bb63802a 12997
7390519e
PA
129982007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12999 Leo Zayas <lerele@champenstudios@com>
13000
13001 * server.h (check_remote_input_interrupt_request): New function.
13002 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13003 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13004 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13005 (check_remote_input_interrupt_request): New function.
13006 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13007 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13008 winapi_GenerateConsoleCtrlEvent): New typedefs.
13009 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13010 to 250 ms.
13011 (win32_wait): Check for remote interrupt request
13012 with check_remote_input_interrupt_request.
13013 (win32_request_interrupt): New function.
13014 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13015
34b34921
PA
130162007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13017
13018 * win32-low.c (debug_registers_changed,
13019 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13020 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13021 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13022 (thread_rec): Get context using the low target.
13023 (child_add_thread): Call thread_added on the low target,
13024 which does the same thing.
13025 (regptr): Delete.
13026 (do_initial_child_stuff): Remove debug registers references.
13027 Set context using the low target. Resume threads after
13028 setting the contexts.
13029 (child_continue): Remove dead variable. Remove debug
13030 registers references.
13031 (child_fetch_inferior_registers): Go through the low target.
13032 (do_child_store_inferior_registers): Remove.
13033 (child_store_inferior_registers): Go through the low target.
13034 (win32_resume): Remove debug registers references.
13035 Set context using the low target.
13036 (handle_exception): Change return type to void. Don't record
13037 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13038 first chance exception.
889bf7c5 13039 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13040 goto loop. Always return after waiting for debug event.
13041 (win32_wait): Convert to switch statement. Handle spurious
13042 events.
13043
13044 * win32-i386-low.c (debug_registers_changed,
13045 debug_registers_used): New.
13046 (initial_stuff): Rename to ...
13047 (i386_initial_stuff): ... this. Clear debug registers
13048 state variables.
13049 (store_debug_registers): Delete.
13050 (i386_get_thread_context): New.
13051 (load_debug_registers): Delete.
13052 (i386_set_thread_context): New.
13053 (i386_thread_added): New.
13054 (single_step): Rename to ...
13055 (i386_single_step): ... this.
13056 (do_fetch_inferior_registers): Rename to ...
13057 (i386_fetch_inferior_register): ... this.
13058 (i386_store_inferior_register): New.
13059 (the_low_target): Adapt to new interface.
13060
13061 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13062 (arm_get_thread_context): New.
13063 (arm_set_thread_context): New.
13064 (regptr): New.
13065 (do_fetch_inferior_registers): Rename to ...
13066 (arm_fetch_inferior_register): ... this.
13067 (arm_store_inferior_register): New.
13068 (arm_wince_breakpoint): Reimplement as unsigned long.
13069 (arm_wince_breakpoint_len): Define.
13070 (the_low_target): Adapt to new interface.
13071
13072 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13073 load_debug_registers. Add get_thread_context, set_thread_context,
13074 thread_added and store_inferior_register. Rename
13075 fetch_inferior_registers to fetch_inferior_register.
13076 (regptr): Remove declaration.
13077
dd6953e1
PA
130782007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13079
13080 * linux-low.c (linux_detach): Change return type to int. Return 0.
13081 * spu-low.c (spu_detach): Likewise.
13082
444d6139
PA
130832007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13084
13085 * target.h (target_ops): Change return type of detach to int.
13086 Add join.
13087 (join_inferior): New.
13088 * server.c (main): Don't skip detach support on mingw32.
13089 If the inferior doesn't support detaching return error.
13090 Call join_inferior instead of using waitpid.
13091 * linux-low.c (linux_join): New.
13092 (linux_target_op): Add linux_join.
13093 * spu-low.c (spu_join): New.
13094 (spu_target_ops): Add spu_join.
13095 * win32-low.c (win32_detach): Adapt to new interface.
13096 Reopen current_process_handle before detaching. Issue a child
13097 resume before detaching.
13098 (win32_join): New.
13099 (win32_target_op): Add win32_join.
13100
1d5315fe
PA
131012007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13102
13103 * win32-low.c (win32-attach): Fix return value.
13104 * target.h (target_ops): Describe ATTACH return values.
13105
bf914831
PA
131062007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13107
13108 * win32-low.c (GETPROCADDRESS): Define.
13109 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13110 (winapi_DebugSetProcessKillOnExit): Likewise.
13111 (win32_create_inferior): Force usage of ansi CreateProcessA.
13112 (win32_attach): Use GETPROCADDRESS.
13113 (win32_detach): Likewise.
13114
f72f3e60
PA
131152007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13116
13117 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13118
ed50f18f
PA
131192007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13120
13121 * win32-low.c: Commit leftover changes from 2007-03-29.
13122
0c2ead7e
DJ
131232007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13124
13125 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13126 fields short instead of int. Add explicit padding.
13127 (i387_cache_to_fsave): Remove unnecessary casts.
13128 (i387_fsave_to_cache): Doc fix.
13129 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13130
73725ff3
DJ
131312007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13132
13133 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13134 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13135
d99f33d8
PA
131362007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13137
13138 * configure.srv (arm*-*-mingw32ce*): Move near the other
13139 arm targets.
13140
68070c10
PA
131412007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13142
2482afc6 13143 * configure.ac: Add errno checking.
68070c10
PA
13144 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13145 sys/file.h and malloc.h.
13146 (AC_CHECK_DECLS): Add perror.
13147 (srv_mingwce): Handle.
2482afc6 13148 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
13149 win32-i386-low.o to srv_tgtobj.
13150 (i[34567]86-*-mingw*): Likewise.
13151 (arm*-*-mingw32ce*): Add case.
13152 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13153 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13154 [__MINGW32CE__] (strerror): New function.
13155 [__MINGW32CE__] (errno): Define to GetLastError.
13156 [__MINGW32CE__] (COUNTOF): New macro.
13157 (remote_open): Remove extra close call.
13158 * mem-break.c (delete_breakpoint_at): New function.
13159 * mem-break.h (delete_breakpoint_at): Declare.
13160 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13161 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13162 [USE_WIN32API] (read, write): Add char* casts.
13163 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13164 * server.h: Include wincecompat.h on Windows CE.
13165 [HAVE_ERRNO_H]: Check.
13166 (perror): Declare if not declared.
13167 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13168 (perror_with_name): Remove errno declaration.
13169 * wincecompat.h: New.
13170 * wincecompat.c: New.
13171 * win32-low.h: New.
13172 * win32-arm-low.c: New.
13173 * win32-i386-low.c: New.
13174 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13175 (OUTMSG2): Make it safe.
13176 (_T): New macro.
13177 (COUNTOF): New macro.
13178 (NUM_REGS): Get it from the low target.
13179 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13180 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13181 (thread_rec): Let low target handle debug registers.
13182 (child_add_thread): Likewise.
13183 (child_init_thread_list): Likewise.
13184 (continue_one_thread): Likewise.
13185 (regptr): New.
13186 (do_child_fetch_inferior_registers): Move to ...
13187 * win32-i386-low.c: ... here, and rename to ...
13188 (do_fetch_inferior_registers): ... this.
889bf7c5 13189 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
13190 Go through the low target.
13191 (do_child_store_inferior_registers): Use regptr.
13192 (strwinerror): New function.
13193 (win32_create_inferior): Handle Windows CE.
13194 Use strwinerror instead of strerror on Windows error
13195 codes. Add program to the error output.
13196 Don't close the main thread handle on Windows CE.
13197 (win32_attach): Use coredll.dll on Windows CE.
13198 (win32_kill): Close current process and current
13199 thread handles.
13200 (win32_detach): Use coredll.dll on Windows CE.
13201 (win32_resume): Let low target handle debug registers, and
13202 step request.
13203 (handle_exception): Add/Remove initial breakpoint. Avoid
13204 non-existant WSTOPSIG on Windows CE.
13205 (win32_read_inferior_memory): Cast to remove warning.
13206 (win32_arch_string): Go through the low target.
13207 (initialize_low): Call set_breakpoint_data with the low
13208 target's breakpoint.
13209 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13210 FOP_REGNUM, mappings): Move to ...
13211 * win32-i386-low.c: ... here.
13212 * win32-low.c (win32_thread_info): Move to ...
13213 * win32-low.h: ... here.
13214 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13215 win32-arm-low.c and wincecompat.c.
13216 (all:): Add $EXEEXT.
13217 (install-only:): Likewise.
13218 (gdbserver:): Likewise.
13219 (gdbreplay:): Likewise.
13220 * config.in: Regenerate.
13221 * configure: Regenerate.
13222
41093d81
PA
132232007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13224
13225 * win32-low.c: Rename typedef thread_info to
13226 win32_thread_info throughout.
13227
544afa54
PA
132282007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13229
13230 * win32-i386-low.c: Rename to ...
13231 * win32-low.c: ... this.
13232 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13233 * Makefile.in: Likewise.
13234
bce7165d
PA
132352007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13236
13237 * remote-utils.c (monitor_output): Constify msg parameter.
13238 * server.h (monitor_output): Likewise.
13239 * win32-i386-low.c (handle_output_debug_string): New.
13240 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13241 handle_output_debug_string.
13242 (get_child_debug_event): Likewise.
13243
506c7aa0
DJ
132442007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13245
13246 * server.c (main): Correct strtoul check.
13247
42c81e2a
DJ
132482007-03-27 Jon Ringle <jon@ringle.org>
13249
13250 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13251
9453113a
DJ
132522007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13253
13254 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13255
64a69107
DJ
132562007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13257
13258 * terminal.h: Check HAVE_SGTTY_H.
13259
132602007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
13261
13262 * remote-utils.c (remote_open): Print out the assigned port number.
13263
c74d0ad8
DJ
132642007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13265
13266 * remote-utils.c (monitor_output): New function.
13267 * server.c (debug_threads): Define here.
13268 (monitor_show_help): New function.
13269 (handle_query): Handle qRcmd.
13270 (main): Do not handle 'd' packet.
13271 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13272 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13273 of debug_threads.
13274
de7c3b4a
PA
132752007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13276
13277 * Makefile.in (EXEEXT): New.
13278 (clean): Use $(EXEEXT).
13279
ef57601b
PA
132802007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13281
13282 * target.h (target_ops): Rename send_signal to request_interrupt,
13283 and remove enum target_signal parameter.
13284 * linux-low.c (linux_request_interrupt): Rename from
13285 linux_send_signal, and always send SIGINT.
13286 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13287 and always send SIGINT.
13288 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13289 of send_signal.
13290 (input_interrupt): Likewise.
13291
820f2bda
PA
132922007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13293
13294 * server.c (get_features_xml): Check if target implemented
13295 arch_string.
13296 * win32-i386-low.c (win32_arch_string): New.
13297 (win32_target_ops): Add win32_arch_string as arch_string member.
13298
ab39bf24
UW
132992007-02-22 Markus Deuling <deuling@de.ibm.com>
13300
13301 * spu-low.c (spu_arch_string): New.
13302 (spu_target_ops): Add spu_arch_string.
13303
61ff6e04
DJ
133042007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13305
13306 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13307 * configure.ac: Do not check for terminal.h.
13308 * configure, config.in: Regenerated.
13309
fb1e4ffc
DJ
133102007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13311
13312 * Makefile.in (OBS): Add $(XML_BUILTIN).
13313 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13314 (clean): Update.
13315 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13316 (arm-with-iwmmxt.c): New.
13317 * config.in, configure: Regenerate.
13318 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13319 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13320 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13321 (arm*-*-linux*): Add iWMMXt and regset support.
13322 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13323 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13324 (arm_store_wmmxregset, target_regsets): New.
13325 * server.c (get_features_xml): Take annex argument. Check builtin
13326 XML documents.
13327 (handle_query): Handle multiple annexes.
13328
0f48aa01
DJ
133292007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13330
13331 * remote-utils.c [USE_WIN32API] (read, write): Define.
13332 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13333 write.
13334
23181151
DJ
133352007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13336
13337 * linux-i386-low.c (the_low_target): Set arch_string.
13338 * linux-x86-64-low.c (the_low_target): Likewise.
13339 * linux-low.c (linux_arch_string): New.
13340 (linux_target_ops): Add it.
13341 * linux-low.h (struct linux_target_ops): Add arch_string.
13342 * server.c (write_qxfer_response): Use const void * for DATA.
13343 (get_features_xml): New.
13344 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13345 * target.h (struct target_ops): Add arch_string method.
13346
9d606399
DJ
133472007-01-03 Denis Pilat <denis.pilat@st.com>
13348 Daniel Jacobowitz <dan@codesourcery.com>
13349
13350 * linux-low.c (linux_kill): Handle being called with no threads.
13351 * win32-i386-low.c (win32_kill): Likewise.
13352 (get_child_debug_event): Clear current_process_handle.
13353
133542006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
13355 Daniel Jacobowitz <dan@codesourcery.com>
13356
13357 * remote-utils.c (remote_open): Check the type of specified
13358 serial port devices before opening them.
13359 * server.c (main): Kill the inferior if an error occurs during
13360 the first remote_open.
13361
a5e13d24
DJ
133622006-12-05 Markus Deuling <deuling@de.ibm.com>
13363
13364 * README: Update supported targets.
13365
186947f7
DJ
133662006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13367
13368 * Makefile.in (clean): Remove reg-mips64.c.
13369 (reg-mips64.c, reg-mips64.o): New rules.
13370 * configure.srv: Handle mips64. Include regset support for mips.
13371 * linux-mips-low.c (union mips_register): New.
13372 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13373 (mips_breakpoint, mips_breakpoint_at): Use int.
13374 (mips_collect_register, mips_supply_register)
13375 (mips_collect_register_32bit, mips_supply_register_32bit)
13376 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13377 (mips_store_fpregset, target_regsets): New.
13378 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13379
a13e2c95
UW
133802006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13381
13382 * configure.srv: Add target "spu*-*-*".
13383 * Makefile.in (clean): Remove reg-spu.c.
13384 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13385 * spu-low.c: New file.
13386
cb7283db
DJ
133872006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13388
13389 * configure.ac: Correct td_thr_tls_get_addr test.
13390 * configure: Regenerated.
13391
89be2091
DJ
133922006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13393
13394 * linux-low.c (linux_wait_for_event): Reformat. Use the
13395 pass_signals array.
13396 * remote-utils.c (decode_address_to_semicolon): New.
13397 * server.c (pass_signals, handle_general_set): New.
13398 (handle_query): Mention QPassSignals for qSupported.
13399 (main): Call handle_general_set.
13400 * server.h (pass_signals, decode_address_to_semicolon): New.
13401
000ef4f0
DJ
134022006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13403
13404 * server.c (handle_query): Correct error handling for read_auxv.
13405
b7149293
UW
134062005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13407
13408 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13409 and srv_linux_thread_db to yes.
13410 * linux-s390-low.c (s390_fill_gregset): New function.
13411 (target_regsets): Define data structure.
13412
dae5f5cf
DJ
134132006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13414
13415 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13416 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13417 * config.in, configure: Regenerated.
13418 * inferiors.c (gdb_id_to_thread): New function.
13419 (gdb_id_to_thread_id): Use it.
13420 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13421 * linux-low.h (struct process_info): Add th member.
13422 (thread_db_get_tls_address): New prototype.
13423 * remote-utils.c (decode_address): Make non-static.
13424 * server.c (handle_query): Handle qGetTLSAddr.
13425 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13426 * target.h (struct target_ops): Add get_tls_address.
13427 * thread-db.c (maybe_attach_thread): Save the thread handle.
13428 (thread_db_get_tls_address): New.
13429
32ca6d61
DJ
134302006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13431
13432 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13433 (linux_resume_one_process): Take a siginfo_t *. Update all
13434 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13435 (struct pending_signals): Add a siginfo_t.
13436 (linux_wait_for_process): Always set last_status.
13437 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13438 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13439 * linux-low.h (struct process_info): Add last_status.
13440
5ffff7c1
DJ
134412006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13442
13443 * remote-utils.c (try_rle): New function.
13444 (putpkt_binary): Use it.
13445
8695c747
DJ
134462006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13447
13448 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13449 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13450 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13451 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13452 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13453 point registers.
13454
290fadea
RS
134552006-08-08 Richard Sandiford <richard@codesourcery.com>
13456
13457 * server.c (terminal_fd): New variable.
13458 (old_foreground_pgrp): Likewise.
13459 (restore_old_foreground_pgrp): New function.
13460 (start_inferior): Record the terminal file descriptor in terminal_fd
13461 and its original foreground group in old_foreground_pgrp. Register
13462 restore_old_foreground_pgrp with atexit().
13463
9f2e1e63
DJ
134642006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13465
13466 * server.c (handle_query): Correct qPart to qXfer.
13467
b80864fb
DJ
134682006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13469
13470 * configure.ac: Check for more headers which are missing on
13471 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13472 * configure.srv: Add Cygwin and mingw32.
13473 * remote-utils.c: Don't include headers unconditionally which
13474 are missing on mingw32. Include <winsock.h> for mingw32.
13475 (remote_open): Adjust for mingw32 support. Flush
13476 standard error after writing to it.
13477 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13478 (unblock_async_io, enable_async_io, disable_async_io)
13479 (readchar, getpkt): Update for Winsock support.
13480 (prepare_resume_reply): Expect a protocol signal number.
13481 * server.c: Disable <sys/wait.h> on mingw32.
13482 (start_inferior): Adjust for mingw32 support. Flush
13483 standard error after writing to it.
13484 (attach_inferior): Likewise. Use protocol signal
13485 numbers.
13486 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13487 and names.
13488 * win32-i386-low.c: New file.
13489 * Makefile.in (XM_CLIBS): Set.
13490 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13491 (win32-i386-low.o): New dependency rule.
13492 * linux-low.c (linux_wait): Use target signal numbers.
13493 * target.h (struct target_ops): Doc fix.
13494 * server.h (target_signal_to_name): New prototype.
13495 * gdbreplay.c: Don't include headers unconditionally which
13496 are missing on mingw32. Include <winsock.h> for mingw32.
13497 (remote_close, remote_open): Adjust for Winsock support.
13498 * configure, config.in: Regenerated.
13499
0876f84a
DJ
135002006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13501
13502 * server.c (decode_xfer_read, write_qxfer_response): New.
13503 (handle_query): Take a packet length argument. Handle
13504 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13505 the qSupported response.
13506 (main): Update call to handle_query.
13507
01f9e8fa
DJ
135082006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13509
13510 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13511 (putpkt_binary): Renamed from putpkt and adjusted for binary
13512 data.
13513 (putpkt): New wrapper for putpkt_binary.
13514 (readchar): Don't mask off the high bit.
13515 (decode_X_packet): New function.
13516 * server.c (main): Call putpkt_binary if a handler sets the packet
13517 length. Save the length of the incoming packet. Handle 'X'.
13518 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13519
be2a5f71
DJ
135202006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13521
13522 * server.c (handle_query): Handle qSupported.
13523
ea025f5f
DJ
135242006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13525
13526 * remote-utils.c (all_symbols_looked_up): New variable.
13527 (look_up_one_symbol): Check it.
13528 * server.h (look_up_one_symbol): New declaration.
13529 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13530
9308fc88
DJ
135312006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13532
13533 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 13534 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
13535 (PTRACE_GET_THREAD_AREA): Define.
13536 (ps_get_thread_area): New function.
13537
52fb6437
NS
135382006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13539
13540 * configure.srv (m68k*-*-uclinux*): New target.
13541 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13542 (linux_resume_one_process): Remove extraneous cast.
13543 (linux_read_offsets): New.
13544 (linux_target_op): Add linux_read_offsets on mmuless systems.
13545 * server.c (handle_query): Add qOffsets logic.
13546 * target.h (struct target_ops): Add read_offsets.
13547
21b0f40c
DJ
135482006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13549
13550 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13551 (PTRACE_GET_THREAD_AREA): Define.
13552 (ps_get_thread_area): New function.
13553 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13554 (linux-x86-64-low.o): Update.
13555
0050a760
DJ
135562006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13557
13558 * configure.ac: Remove checks for prfpregset_t.
13559 * gdb_proc_service.h: New file.
13560 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13561 new "gdb_proc_service.h".
13562 * proc-service.c: Likewise.
13563 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13564 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13565 * Makefile.in (gdb_proc_service_h): Updated.
13566 * configure, config.in: Regenerated.
13567
b92a518e
DJ
135682006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13569
13570 * remote-utils.c (prepare_resume_reply): Move declaration
13571 of gdb_id_from_wait to the top of the block.
13572
545587ee
DJ
135732006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13574
13575 * linux-low.c (regsets_store_inferior_registers): Read the regset
13576 from the target before filling it.
13577
9db87ebd
DJ
135782006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13579
13580 * server.c (attach_inferior): Return SIGTRAP for a successful
13581 attach.
13582
dd24457d
DJ
135832006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13584
13585 * Makefile.in (OBS): Add version.o.
13586 (STAGESTUFF): Delete.
13587 (version.o): Add dependencies.
13588 (version.c): Replace rule.
13589 (clean): Remove version.c.
13590 * server.c (gdbserver_version): New.
13591 (gdbserver_usage): Use printf.
13592 (main): Handle --version and --help.
13593 * server.h (version, host_name): Add declarations.
13594
6f0f660e
EZ
135952005-12-23 Eli Zaretskii <eliz@gnu.org>
13596
889bf7c5
PA
13597 * linux-arm-low.c:
13598 * linux-arm-low.c:
13599 * inferiors.c:
13600 * i387-fp.h:
13601 * i387-fp.c:
13602 * gdbreplay.c:
13603 * regcache.c:
13604 * proc-service.c:
13605 * mem-break.h:
13606 * mem-break.c:
13607 * linux-x86-64-low.c:
13608 * linux-sh-low.c:
13609 * linux-s390-low.c:
13610 * linux-ppc64-low.c:
13611 * linux-ppc-low.c:
13612 * linux-mips-low.c:
13613 * linux-m68k-low.c:
13614 * linux-m32r-low.c:
13615 * linux-low.h:
13616 * linux-low.c:
13617 * linux-ia64-low.c:
13618 * linux-i386-low.c:
13619 * linux-crisv32-low.c:
13620 * thread-db.c:
13621 * terminal.h:
13622 * target.h:
13623 * target.c:
13624 * server.h:
13625 * server.c:
13626 * remote-utils.c:
13627 * regcache.h:
13628 * utils.c:
13629 * Makefile.in:
13630 * configure.ac:
6f0f660e
EZ
13631 * gdbserver.1: Add (C) after Copyright. Update the FSF
13632 address.
13633
9d1fb177
DJ
136342005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13635
13636 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13637 (arm_breakpoint_at): Recognize both breakpoints.
13638 (the_low_target): Use the correct breakpoint instruction.
13639
011a70c2
DJ
136402005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13641
13642 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13643 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13644 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13645 (the_low_target): Update.
13646
7fb85e41
AS
136472005-10-25 Andreas Schwab <schwab@suse.de>
13648
13649 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13650
13651 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13652 (ia64_num_regs): Reduce to 462.
13653
3db0444b
DJ
136542005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13655
13656 * acinclude.m4: Correct quoting.
13657 * aclocal.m4: Regenerated.
13658
13659 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13660 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13661 (thread_db_init): Call thread_db_err_str.
13662 * configure.ac: Check for TD_VERSION.
13663 * config.in, configure: Regenerated.
13664
bee0189a
DJ
136652005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13666
13667 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13668
e9d25b98
DJ
136692005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13670
13671 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13672 is not available. Define HAVE_PTRACE_GETREGS if it is.
13673 * config.in, configure: Regenerated.
13674 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13675 * linux-i386-low.c, linux-m68k-low.c: Update to use
13676 HAVE_PTRACE_GETREGS.
13677 * linux-low.c (regsets_fetch_inferior_registers)
13678 (regsets_store_inferior_registers): Only return 0 if we processed
13679 GENERAL_REGS.
13680 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13681 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13682
a06660f7
DJ
136832005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13684
13685 * inferiors.c (struct thread_info): Add gdb_id.
13686 (add_thread): Add gdb_id argument.
13687 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13688 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13689 calls to add_thread.
13690 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13691 * server.c (handle_query): Use thread_to_gdb_id.
13692 (handle_v_cont, main): Use gdb_id_to_thread_id.
13693 * server.h (add_thread): Update prototype.
13694 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13695 prototypes.
13696
5a1f5858
DJ
136972005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13698
13699 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13700 left-padded registers.
13701 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13702 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13703
e122f1f5
SE
137042005-07-01 Steve Ellcey <sje@cup.hp.com>
13705
13706 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13707 * configure: Regenerate.
13708 * config.in: Regenerate.
13709 * server.h (NEED_DECLARATION_STRERROR):
13710 Replace with !HAVE_DECL_STRERROR.
13711
d592fa2f
DJ
137122005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13713
13714 * linux-low.c (linux_wait, linux_send_signal): Don't test
13715 an unsigned long variable for > 0 if it could be MAX_ULONG.
13716 * server.c (myresume): Likewise.
13717 * target.c (set_desired_inferior): Likewise.
13718
ccbd4912
MK
137192005-06-13 Mark Kettenis <kettenis@gnu.org>
13720
13721 * configure.ac: Simplify and improve check for socklen_t.
13722 * configure, config.in: Regenerate.
13723
f450004a
DJ
137242005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13725
13726 * acconfig.h: Remove.
13727 * configure.ac: Add a test for socklen_t. Use three-argument
13728 AC_DEFINE throughout.
13729 * config.in: Regenerated using autoheader 2.59.
13730 * configure: Regenerated.
13731
13732 * gdbreplay.c (socklen_t): Provide a default.
13733 (remote_open): Use socklen_t.
13734 * remote-utils.c (socklen_t): Provide a default.
13735 (remote_open): Use socklen_t.
13736 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13737 unsigned char.
13738
13739 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13740 char for buffers.
13741 * linux-low.c (linux_read_memory, linux_write_memory)
13742 (linux_read_auxv): Likewise.
13743 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13744 (check_mem_write): Likewise.
13745 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13746 Likewise.
13747 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13748 (registers_from_string, register_data): Likewise.
13749 * server.c (handle_query, main): Likewise.
13750 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13751 (decode_M_packet): Likewise.
13752 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13753 * target.h (struct target_ops): Update read_memory, write_memory,
13754 and read_auxv.
13755 (read_inferior_memory, write_inferior_memory): Update.
13756 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13757 to unsigned char *.
13758 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13759 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13760 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13761 linux-s390-low.c, linux-sh-low.c: Update for changes in
13762 read_inferior_memory and the_low_target->breakpoint.
13763
eee84df1
DJ
137642005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13765
13766 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13767 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13768 * configure.srv: Add powerpc64-*-linux*.
13769 * linux-ppc64-low.c: New file.
13770
45b134e5
OF
137712005-05-23 Orjan Friberg <orjanf@axis.com>
13772
13773 * linux-cris-low.c: New file with support for CRIS.
13774 * linux-crisv32-low.c: Ditto for CRISv32.
13775 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13776 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 13777 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
13778 reg-crisv32.o, and reg-crisv32.c to make rules.
13779 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13780 recognized targets.
13781
48d93c75
UW
137822005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13783
13784 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13785 of sizeof (PTRACE_XFER_TYPE).
13786 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13787
e013ee27
OF
137882005-05-12 Orjan Friberg <orjanf@axis.com>
13789
889bf7c5 13790 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
13791 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13792 pointers for hardware watchpoint support.
13793 * linux-low.h (struct linux_target_ops): Ditto.
13794 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13795 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13796 to linux_target_ops.
13797 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13798 reply packet.
13799 * server.c (main): Recognize 'Z' and 'z' packets.
13800
b0ded00b
UW
138012005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13802
13803 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13804 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13805 (the_low_target): Add new members.
13806
8643e2ad
DJ
138072005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13808
13809 * proc-service.c (ps_lgetregs): Search all_processes instead of
13810 all_threads.
13811
fc620387
DJ
138122005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13813
13814 * server.c (start_inferior): Change return type to int.
13815 (attach_inferior): Change sigptr to int *.
13816 (handle_v_cont, handle_v_requests): Change signal to int *.
13817 (main): Change signal to int.
13818
138192005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
13820
13821 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13822 * configure.srv: Add m32r*-*-linux*.
13823 * linux-m32r-low.c: New file.
13824
e0e76420
DJ
138252005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13826
13827 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13828
a1928bad
DJ
138292005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13830
13831 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13832 Take unsigned long arguments for PIDs.
13833 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13834 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13835 (wait_for_sigstop, linux_resume_one_process)
13836 (regsets_fetch_inferior_registers, linux_send_signal)
13837 (linux_read_auxv): Likewise. Update the types of variables holding
13838 PIDs. Update format string specifiers.
13839 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13840 * remote-utils.c (prepare_resume_reply): Likewise.
13841 * server.c (cont_thread, general_thread, step_thread)
13842 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13843 unsigned long.
13844 (handle_query): Update format specifiers.
13845 (handle_v_cont, main): Use strtoul for thread IDs.
13846 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13847 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13848 (general_thread, step_thread, thread_from_wait)
13849 (old_thread_from_wait): Update.
13850 * target.h (struct thread_resume): Use unsigned long for THREAD.
13851 (struct target_ops): Use unsigned long for arguments to attach and
13852 thread_alive.
13853
dcdb98d2
DJ
138542005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13855
13856 * acinclude.m4: Include bfd/bfd.m4 directly.
13857 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13858 <agriffis@toolchain.org>.
13859 * aclocal.m4, configure: Regenerated.
13860
bec39cab
AC
138612005-01-07 Andrew Cagney <cagney@gnu.org>
13862
13863 * configure.ac: Rename configure.in, require autoconf 2.59.
13864 * configure: Re-generate.
13865
434c4c77
DJ
138662004-12-08 Daniel Jacobowitz <dan@debian.org>
13867
13868 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13869 LIBS when finished.
13870 * aclocal.m4: Regenerated.
13871 * configure: Regenerated.
13872
db1d3e1b
AS
138732004-11-21 Andreas Schwab <schwab@suse.de>
13874
13875 * linux-m68k-low.c (m68k_num_gregs): Define.
13876 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13877 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13878 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13879 (m68k_breakpoint_at): New. Add to the_low_target.
13880
13881 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13882 srv_linux_thread_db to yes.
13883
43360365
JB
138842004-10-20 Joel Brobecker <brobecker@gnat.com>
13885
13886 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13887 (ARCH_SET_FS): Likewise.
13888 (ARCH_GET_FS): Likewise.
13889 (ARCH_GET_GS): Likewise.
13890
fd500816
DJ
138912004-10-16 Daniel Jacobowitz <dan@debian.org>
13892
13893 * linux-i386-low.c (ps_get_thread_area): New.
13894 * linux-x86-64-low.c (ps_get_thread_area): New.
13895 * linux-low.c: Include <sys/syscall.h>.
13896 (linux_kill_one_process): Don't kill the first thread here.
13897 (linux_kill): Kill the first thread here.
13898 (kill_lwp): New function.
13899 (send_sigstop, linux_send_signal): Use it.
13900 * proc-service.c: Clean up #ifdefs.
13901 (fpregset_info): Delete.
13902 (ps_lgetregs): Update and enable implementation.
13903 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13904 implementations.
13905 * remote-utils.c (struct sym_cache, symbol_cache): New.
13906 (input_interrupt): Print a clearer message.
13907 (async_io_enabled): New variable.
13908 (enable_async_io, disable_async_io): Use it. Update comments.
13909 (look_up_one_symbol): Use the symbol cache.
13910 * thread-db.c (thread_db_look_up_symbols): New function.
13911 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13912
f6de3c42
DJ
139132004-10-16 Daniel Jacobowitz <dan@debian.org>
13914
13915 * configure.in: Test for -rdynamic.
13916 * configure: Regenerated.
13917 * Makefile (INTERNAL_LDFLAGS): New.
13918 (gdbserver, gdbreplay): Use it.
13919
2c0fc042
AC
139202004-09-02 Andrew Cagney <cagney@gnu.org>
13921
13922 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13923
075b3282
DJ
139242004-03-23 Daniel Jacobowitz <drow@mvista.com>
13925
13926 * linux-low.c (linux_wait): Clear all_processes list also.
13927
fa6a77dc
DJ
139282004-03-12 Daniel Jacobowitz <drow@mvista.com>
13929
13930 * linux-low.c: Include <errno.h>. Remove extern declaration of
13931 errno.
13932
6d782a97
DJ
139332004-03-12 Daniel Jacobowitz <drow@mvista.com>
13934
13935 * gdbreplay.c, server.h, utils.c: Update copyright years.
13936
3a7fb99b
DJ
139372004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13938
13939 * server.c (main): Print child status or termination signal from
13940 variable 'signal', not 'sig'.
13941
c3e735a6
DJ
139422004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13943
13944 * linux-low.c (linux_read_memory): Change return type to
13945 int. Check for and return error from ptrace().
13946 * target.c (read_inferior_memory): Change return type to int. Pass
13947 back return status from the_target->read_memory().
13948 * target.h (struct target_ops): Adapt *read_memory() prototype.
13949 Update comment.
13950 (read_inferior_memory): Adapt prototype.
13951 * server.c (main): Return an error packet if
13952 read_inferior_memory() returns an error.
13953
a59d1c82
DJ
139542004-03-04 Daniel Jacobowitz <drow@mvista.com>
13955
13956 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13957 Unify with other clean targets.
13958
dc3f8883
DJ
139592004-02-29 Daniel Jacobowitz <drow@mvista.com>
13960
13961 * server.c (handle_v_cont): Call set_desired_inferior.
13962
89a208da
DJ
139632004-02-29 Daniel Jacobowitz <drow@mvista.com>
13964
13965 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13966
62ea82f5
DJ
139672004-02-29 Daniel Jacobowitz <drow@mvista.com>
13968
13969 * linux-low.c (linux_wait): Unblock async I/O.
13970 (linux_resume): Block and enable async I/O.
13971 * remote-utils.c (block_async_io, unblock_async_io): New functions.
13972 * server.h (block_async_io, unblock_async_io): Add prototypes.
13973
6910d122
DJ
139742004-02-29 Daniel Jacobowitz <drow@mvista.com>
13975
13976 * remote-utils.c (remote_open): Print a status notice after
13977 opening a TCP port.
13978 * server.c (attach_inferior): Print a status notice after
13979 attaching.
13980
139812004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
13982
13983 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13984
c89dc5d4
DJ
139852004-02-26 Daniel Jacobowitz <drow@mvista.com>
13986
13987 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13988 error packet.
13989 * server.c, target.h: Update copyright years.
13990
4b8dad4a
RM
139912004-02-25 Roland McGrath <roland@redhat.com>
13992
13993 * target.h (struct target_ops): New member `read_auxv'.
13994 * server.c (handle_query): Handle qPart:auxv:read: query using that.
13995 * linux-low.c (linux_read_auxv): New function.
13996 (linux_target_ops): Initialize `read_auxv' member to that.
13997
d7446758
JB
139982004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13999
14000 Committed by Jim Blandy <jimb@redhat.com>.
14001
14002 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14003 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14004 instead of GPR_SIZE to distiguish s390 and s390x targets.
14005
5544ad89
DJ
140062004-01-31 Daniel Jacobowitz <drow@mvista.com>
14007
14008 * linux-low.c: Update copyright year.
14009 (check_removed_breakpoint): Clear pending_is_breakpoint.
14010 (linux_set_resume_request, linux_queue_one_thread)
14011 (resume_status_pending_p): New functions.
14012 (linux_continue_one_thread): Use process->resume.
14013 (linux_resume): Only resume threads if there are no pending events.
14014 * linux-low.h (struct process_info): Add resume request
14015 pointer.
14016
2a68b70e
DJ
140172004-01-30 Daniel Jacobowitz <drow@mvista.com>
14018
14019 * regcache.c (new_register_cache): Clear the allocated register
14020 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14021
64386c31
DJ
140222003-10-13 Daniel Jacobowitz <drow@mvista.com>
14023
14024 * linux-low.c (linux_resume): Take a struct thread_resume *
14025 argument.
14026 (linux_wait): Update call.
14027 (resume_ptr): New static variable.
14028 (linux_continue_one_thread): Renamed from
14029 linux_continue_one_process. Use resume_ptr.
14030 (linux_resume): Use linux_continue_one_thread.
14031 * server.c (handle_v_cont, handle_v_requests): New functions.
14032 (myresume): New function.
14033 (main): Handle 'v' case.
14034 * target.h (struct thread_resume): New type.
14035 (struct target_ops): Change argument of "resume" to struct
14036 thread_resume *.
14037 (myresume): Delete macro.
14038
c938e9b0
L
140392003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14040
14041 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14042 (uninstall): Support DESTDIR.
14043
7f313d07
BC
14044Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14045
14046 * configure.srv: Add xscale*linux copy of arm*linux entry.
14047
3b2fc2ea
DJ
140482003-07-24 Daniel Jacobowitz <drow@mvista.com>
14049
14050 * linux-arm-low.c (arm_reinsert_addr): New function.
14051 (the_low_target): Add arm_reinsert_addr.
14052
1c0a559e
MK
140532003-07-08 Mark Kettenis <kettenis@gnu.org>
14054
14055 * mem-break.c: Remove whitespace at end of file.
14056
43d5792c
DJ
140572003-06-28 Daniel Jacobowitz <drow@mvista.com>
14058
14059 * configure.in: Check whether we need to prototype strerror.
14060 * server.h: Optionally prototype strerror.
14061 * gdbreplay.c (perror_with_name): Use strerror.
14062 * linux-low.c (linux_attach_lwp): Use strerror.
14063 * utils.c (perror_with_name): Use strerror.
14064 * config.in, configure: Regenerated.
14065
c8a86edf
DJ
140662003-06-28 Daniel Jacobowitz <drow@mvista.com>
14067
14068 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14069 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14070
73d37363
DJ
140712003-06-20 Daniel Jacobowitz <drow@mvista.com>
14072
14073 * Makefile.in (SFILES): Update.
14074 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14075 low-sun3.c: Remove files.
14076
6ad8ae5c
DJ
140772003-06-17 Daniel Jacobowitz <drow@mvista.com>
14078
14079 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14080 (linux_detach_one_process, linux_detach): New functions.
14081 (linux_target_ops): Add linux_detach.
14082 * server.c (main): Handle 'D' packet.
14083 * target.h (struct target_ops): Add "detach" member.
14084 (detach_inferior): Define.
14085
1581182a
MK
140862003-06-13 Mark Kettenis <kettenis@gnu.org>
14087
14088 From Kelley Cook <kelleycook@wideopenwest.com>:
14089 * configure.srv: Accept i[34567]86 variants.
14090
e5379b03
DJ
140912003-06-05 Daniel Jacobowitz <drow@mvista.com>
14092
14093 * linux-low.c (linux_wait_for_event): Correct comment typos.
14094 (linux_resume_one_process): Call check_removed_breakpoint.
14095 (linux_send_signal): New function.
14096 (linux_target_ops): Add linux_send_signal.
14097 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14098 of kill.
14099 * target.h (struct target_ops): Add send_signal.
14100
2ff29de4
JB
141012003-05-29 Jim Blandy <jimb@redhat.com>
14102
14103 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14104 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14105 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14106 away part of the register's value.
14107
254787d4
DJ
141082003-03-26 Daniel Jacobowitz <drow@mvista.com>
14109
14110 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14111 (linux_wait_for_event, linux_init_signals): Likewise.
14112
94e10508
DJ
141132003-03-17 Daniel Jacobowitz <drow@mvista.com>
14114
14115 * configure.in: Check for stdlib.h.
14116 * configure: Regenerated.
14117 * config.in: Regenerated.
14118
4c0711e0
DJ
141192003-01-04 Andreas Schwab <schwab@suse.de>
14120
14121 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14122
ef66e766
AC
141232003-01-02 Andrew Cagney <ac131313@redhat.com>
14124
14125 * Makefile.in: Remove obsolete code.
14126
a1358604
DJ
141272002-11-20 Daniel Jacobowitz <drow@mvista.com>
14128
14129 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14130 defined(PT_FPR0_HI).
14131
23ce3b1c
DJ
141322002-11-17 Stuart Hughes <seh@zee2.com>
14133
14134 * linux-arm-low.c (arm_num_regs): Increase.
14135 (arm_regmap): Include status register.
14136
141372002-11-17 Daniel Jacobowitz <drow@mvista.com>
14138
14139 * linux-low.c (register_addr): Remove incorrect -1 check.
14140
a9fa9f7d
DJ
141412002-08-29 Daniel Jacobowitz <drow@mvista.com>
14142
14143 * linux-low.c (linux_create_inferior): Call setpgid. Return
14144 the new PID.
14145 (unstopped_p, linux_signal_pid): Remove.
14146 (linux_target_ops): Remove linux_signal_pid.
14147 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14148 global instead of target method.
14149 * target.h (struct target_ops): Remove signal_pid. Update comment
14150 for create_inferior.
14151 * server.c (signal_pid): New variable.
14152 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 14153 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
14154 (attach_inferior): Set signal_pid.
14155
17574093
DJ
141562002-08-23 Daniel Jacobowitz <drow@mvista.com>
14157
14158 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14159
141602002-08-20 Jim Blandy <jimb@redhat.com>
14161
14162 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14163 default for this.
14164
141652002-08-01 Andrew Cagney <cagney@redhat.com>
14166
14167 * Makefile.in: Make chill references obsolete.
14168
141692002-07-24 Kevin Buettner <kevinb@redhat.com>
14170
14171 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14172 * configure: Regenerate.
14173 * config.in: Regenerate.
14174
141752002-07-09 David O'Brien <obrien@FreeBSD.org>
14176
14177 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14178 (perror_with_name, remote_close, remote_open, expect, play): Static.
14179
141802002-07-04 Michal Ludvig <mludvig@suse.cz>
14181
4b8dad4a 14182 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
14183 byte offsets instead of an array of indexes.
14184 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14185
141862002-06-13 Daniel Jacobowitz <drow@mvista.com>
14187
14188 * regcache.c: Add comment.
14189
141902002-06-11 Daniel Jacobowitz <drow@mvista.com>
14191
14192 * thread-db.c: New file.
14193 * proc-service.c: New file.
14194 * acinclude.m4: New file.
14195 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14196 proc-service.o, and thread-db.o.
14197 (linux-low.o): Add USE_THREAD_DB.
14198 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14199 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14200 * aclocal.m4: Regenerated.
14201 * config.in: Regenerated.
14202 * configure: Regenerated.
14203 * configure.in: Check for proc_service.h, sys/procfs.h,
14204 thread_db.h, and linux/elf.h headrs.
14205 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14206 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14207 Check for -lthread_db and thread support.
14208 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14209 PowerPC, and SuperH.
14210 * i387-fp.c: Constify arguments.
14211 * i387-fp.h: Likewise.
14212 * inferiors.c: (struct thread_info): Renamed from
14213 `struct inferior_info'. Remove PID member. Use generic inferior
14214 list header. All uses updated.
14215 (inferiors, signal_pid): Removed.
14216 (all_threads): New variable.
14217 (get_thread): Define.
14218 (add_inferior_to_list): New function.
14219 (for_each_inferior): New function.
14220 (change_inferior_id): New function.
14221 (add_inferior): Removed.
14222 (remove_inferior): New function.
14223 (add_thread): New function.
14224 (free_one_thread): New function.
14225 (remove_thread): New function.
14226 (clear_inferiors): Use for_each_inferior and free_one_thread.
14227 (find_inferior): New function.
14228 (find_inferior_id): New function.
14229 (inferior_target_data): Update argument type.
14230 (set_inferior_target_data): Likewise.
14231 (inferior_regcache_data): Likewise.
14232 (set_inferior_regcache_data): Likewise.
14233 * linux-low.c (linux_bp_reinsert): Remove.
14234 (all_processes, stopping_threads, using_thrads)
14235 (struct pending_signals, debug_threads, pid_of): New.
14236 (inferior_pid): Replace with macro.
14237 (struct inferior_linux_data): Remove.
14238 (get_stop_pc, add_process): New functions.
14239 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14240 Use add_process and add_thread.
14241 (linux_attach_lwp): New function, based on old linux_attach. Use
14242 add_process and add_thread. Set stop_expected for new threads.
14243 (linux_attach): New function.
14244 (linux_kill_one_process): New function.
14245 (linux_kill): Kill all LWPs.
14246 (linux_thread_alive): Use find_inferior_id.
14247 (check_removed_breakpoints, status_pending_p): New functions.
14248 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14249 Update. Use WNOHANG. Wait for cloned processes also. Update process
14250 struct for the found process.
14251 (linux_wait_for_event): New function.
14252 (linux_wait): Use it. Support LWPs.
14253 (send_sigstop, wait_for_sigstop, stop_all_processes)
14254 (linux_resume_one_process, linux_continue_one_process): New functions.
14255 (linux_resume): Support LWPs.
14256 (REGISTER_RAW_SIZE): Remove.
14257 (fetch_register): Use register_size instead. Call supply_register.
14258 (usr_store_inferior_registers): Likewise. Call collect_register.
14259 Fix recursive case.
14260 (regsets_fetch_inferior_registers): Improve error message.
14261 (regsets_store_inferior_registers): Add debugging.
14262 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14263 (unstopped_p, linux_signal_pid): New functions.
14264 (linux_target_ops): Add linux_signal_pid.
14265 (linux_init_signals): New function.
14266 (initialize_low): Call it. Initialize using_threads.
14267 * regcache.c (inferior_regcache_data): Add valid
14268 flag.
14269 (get_regcache): Fetch registers lazily. Add fetch argument
14270 and update all callers.
14271 (regcache_invalidate_one, regcache_invalidate): New
14272 functions.
14273 (new_register_cache): Renamed from create_register_cache.
14274 Return the new regcache.
14275 (free_register_cache): Change argument to a void *.
14276 (registers_to_string, registers_from_string): Call get_regcache
14277 with fetch flag set.
14278 (register_data): Make static. Pass fetch flag to get_regcache.
14279 (supply_register): Call get_regcache with fetch flag clear.
14280 (collect_register): Call get_regcache with fetch flag set.
14281 (collect_register_as_string): New function.
14282 * regcache.h: Update.
14283 * remote-utils.c (putpkt): Flush after debug output and use
14284 stderr.
14285 Handle input interrupts while waiting for an ACK.
14286 (input_interrupt): Use signal_pid method.
14287 (getpkt): Flush after debug output and use stderr.
14288 (outreg): Use collect_register_as_string.
14289 (new_thread_notify, dead_thread_notify): New functions.
14290 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14291 and general_thread.
14292 (look_up_one_symbol): Flush after debug output.
14293 * server.c (step_thread, server_waiting): New variables.
14294 (start_inferior): Don't use signal_pid. Update call to mywait.
14295 (attach_inferior): Update call to mywait.
14296 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14297 (main): Don't fetch/store registers explicitly. Use
14298 set_desired_inferior. Support proposed ``Hs'' packet. Update
14299 calls to mywait.
14300 * server.h: Update.
14301 (struct inferior_list, struct_inferior_list_entry): New.
14302 * target.c (set_desired_inferior): New.
14303 (write_inferior_memory): Constify.
14304 (mywait): New function.
14305 * target.h: Update.
14306 (struct target_ops): New signal_pid method.
14307 (mywait): Removed macro, added prototype.
14308
14309 * linux-low.h (regset_func): Removed.
14310 (regset_fill_func, regset_store_func): New.
14311 (enum regset_type): New.
14312 (struct regset_info): Add type field. Use new operation types.
14313 (struct linux_target_ops): stop_pc renamed to get_pc.
14314 Add decr_pc_after_break and breakpoint_at.
14315 (get_process, get_thread_proess, get_process_thread)
14316 (strut process_info, all_processes, linux_attach_lwp)
14317 (thread_db_init): New.
14318
14319 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14320 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14321 (the_low_target): Add new members.
14322 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14323 (i386_store_fpxregset): Constify.
14324 (target_regsets): Add new kind identifier.
14325 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14326 (i386_set_pc): Add debugging.
14327 (i386_breakpoint_at): New function.
14328 (the_low_target): Add new members.
14329 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14330 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14331 (mips_breakpoint_at): New.
14332 (the_low_target): Add new members.
14333 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14334 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14335 (the_low_target): Add new members.
14336 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14337 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14338 (the_low_target): Add new members.
14339 * linux-x86-64-low.c (target_regsets): Add new kind
14340 identifier.
14341
143422002-05-15 Daniel Jacobowitz <drow@mvista.com>
14343
14344 From Martin Pool <mbp@samba.org>:
14345 * server.c (gdbserver_usage): New function.
14346 (main): Call it.
14347
143482002-05-14 Daniel Jacobowitz <drow@mvista.com>
14349
14350 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14351 stop_at -> stop_pc.
14352
143532002-05-04 Andrew Cagney <ac131313@redhat.com>
14354
14355 * Makefile.in: Remove obsolete code.
14356
143572002-04-24 Michal Ludvig <mludvig@suse.cz>
14358
14359 * linux-low.c (regsets_fetch_inferior_registers),
14360 (regsets_store_inferior_registers): Removed cast to int from
14361 ptrace() calls.
14362 * regcache.h: Added declaration of struct inferior_info.
14363
143642002-04-20 Daniel Jacobowitz <drow@mvista.com>
14365
14366 * inferiors.c (struct inferior_info): Add regcache_data.
14367 (add_inferior): Call create_register_cache.
14368 (clear_inferiors): Call free_register_cache.
14369 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14370 * regcache.c (struct inferior_regcache_data): New.
14371 (registers): Remove.
14372 (get_regcache): New function.
14373 (create_register_cache, free_register_cache): New functions.
14374 (set_register_cache): Don't initialize the register cache here.
14375 (registers_to_string, registers_from_string, register_data): Call
14376 get_regcache.
14377 * regcache.h: Add prototypes.
14378 * server.h: Likewise.
14379
143802002-04-20 Daniel Jacobowitz <drow@mvista.com>
14381
14382 * mem-break.c: New file.
14383 * mem-break.h: New file.
14384 * Makefile.in: Add mem-break.o rule; update server.h
14385 dependencies.
14386 * inferiors.c (struct inferior_info): Add target_data
14387 member.
14388 (clear_inferiors): Free target_data member if set.
14389 (inferior_target_data, set_inferior_target_data): New functions.
14390 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14391 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14392 * linux-low.c (linux_bp_reinsert): New variable.
14393 (struct inferior_linux_data): New.
14394 (linux_create_inferior): Use set_inferior_target_data.
14395 (linux_attach): Likewise. Call add_inferior.
14396 (linux_wait_for_one_inferior): New function.
14397 (linux_wait): Call it.
14398 (linux_write_memory): Add const.
14399 (initialize_low): Call set_breakpoint_data.
14400 * linux-low.h (struct linux_target_ops): Add breakpoint
14401 handling members.
14402 * server.c (attach_inferior): Remove extra add_inferior
14403 call.
14404 * server.h: Include mem-break.h. Update inferior.c
14405 prototypes.
14406 * target.c (read_inferior_memory)
14407 (write_inferior_memory): New functions.
14408 * target.h (read_inferior_memory)
14409 (write_inferior_memory): Change macros to prototypes.
14410 (struct target_ops): Update comments. Add const to write_memory
14411 definition.
14412
144132002-04-11 Daniel Jacobowitz <drow@mvista.com>
14414
14415 * linux-low.c (usr_store_inferior_registers): Support
14416 registers which are allowed to fail to store.
14417 * linux-low.h (linux_target_ops): Likewise.
14418 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14419 (ppc_cannot_store_register): FPSCR may not be storable.
14420
144212002-04-09 Daniel Jacobowitz <drow@mvista.com>
14422
14423 * server.h: Include <string.h> if HAVE_STRING_H.
14424 * ChangeLog: Correct paths in last ChangeLog entry.
14425
144262002-04-09 Daniel Jacobowitz <drow@mvista.com>
14427
14428 * linux-low.h: Remove obsolete prototypes.
14429 (struct linux_target_ops): New.
14430 (extern the_low_target): New.
14431 * linux-low.c (num_regs, regmap): Remove declarations.
14432 (register_addr): Use the_low_target explicitly.
14433 (fetch_register): Likewise.
14434 (usr_fetch_inferior_registers): Likewise.
14435 (usr_store_inferior_registers): Likewise.
14436 * linux-arm-low.c (num_regs): Remove.
14437 (arm_num_regs): Define.
14438 (arm_regmap): Renamed from regmap, made static.
14439 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14440 made static.
14441 (arm_cannot_store_register): Renamed from cannot_store_register,
14442 made static.
14443 (the_low_target): New.
14444 * linux-i386-low.c (num_regs): Remove.
14445 (i386_num_regs): Define.
14446 (i386_regmap): Renamed from regmap, made static.
14447 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14448 made static.
14449 (i386_cannot_store_register): Renamed from cannot_store_register,
14450 made static.
14451 (the_low_target): New.
14452 * linux-ia64-low.c (num_regs): Remove.
14453 (ia64_num_regs): Define.
14454 (ia64_regmap): Renamed from regmap, made static.
14455 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14456 made static.
14457 (ia64_cannot_store_register): Renamed from cannot_store_register,
14458 made static.
14459 (the_low_target): New.
14460 * linux-m68k-low.c (num_regs): Remove.
14461 (m68k_num_regs): Define.
14462 (m68k_regmap): Renamed from regmap, made static.
14463 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14464 made static.
14465 (m68k_cannot_store_register): Renamed from cannot_store_register,
14466 made static.
14467 (the_low_target): New.
14468 * linux-mips-low.c (num_regs): Remove.
14469 (mips_num_regs): Define.
14470 (mips_regmap): Renamed from regmap, made static.
14471 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14472 made static.
14473 (mips_cannot_store_register): Renamed from cannot_store_register,
14474 made static.
14475 (the_low_target): New.
14476 * linux-ppc-low.c (num_regs): Remove.
14477 (ppc_num_regs): Define.
14478 (ppc_regmap): Renamed from regmap, made static.
14479 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14480 made static.
14481 (ppc_cannot_store_register): Renamed from cannot_store_register,
14482 made static.
14483 (the_low_target): New.
14484 * linux-s390-low.c (num_regs): Remove.
14485 (s390_num_regs): Define.
14486 (s390_regmap): Renamed from regmap, made static.
14487 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14488 made static.
14489 (s390_cannot_store_register): Renamed from cannot_store_register,
14490 made static.
14491 (the_low_target): New.
14492 * linux-sh-low.c (num_regs): Remove.
14493 (sh_num_regs): Define.
14494 (sh_regmap): Renamed from regmap, made static.
14495 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14496 made static.
14497 (sh_cannot_store_register): Renamed from cannot_store_register,
14498 made static.
14499 (the_low_target): New.
14500 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14501 (the_low_target): New.
14502
145032002-04-09 Daniel Jacobowitz <drow@mvista.com>
14504
14505 * Makefile.in: Add stamp-h target.
14506 * configure.in: Create stamp-h.
14507 * configure: Regenerated.
14508
145092002-04-09 Daniel Jacobowitz <drow@mvista.com>
14510
14511 * inferiors.c: New file.
14512 * target.c: New file.
14513 * target.h: New file.
14514 * Makefile.in: Add target.o and inferiors.o. Update
14515 dependencies.
14516 * linux-low.c (inferior_pid): New static variable,
14517 moved from server.c.
14518 (linux_create_inferior): Renamed from create_inferior.
14519 Call add_inferior. Return 0 on success instead of a PID.
14520 (linux_attach): Renamed from myattach.
14521 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14522 (linux_thread_alive): Renamed from mythread_alive.
14523 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14524 child dies.
14525 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14526 (regsets_store_inferior_registers): Correct error message.
14527 Add missing ``return 0''.
14528 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14529 (linux_store_registers): Renamed from store_inferior_registers.
14530 (linux_read_memory): Renamed from read_inferior_memory.
14531 (linux_write_memory): Renamed from write_inferior_memory.
14532 (linux_target_ops): New structure.
14533 (initialize_low): Call set_target_ops ().
14534 * remote-utils.c (unhexify): New function.
14535 (hexify): New function.
14536 (input_interrupt): Send signals to ``signal_pid''.
14537 * server.c (inferior_pid): Remove.
14538 (start_inferior): Update create_inferior call.
14539 (attach_inferior): Call add_inferior.
14540 (handle_query): New function.
14541 (main): Call handle_query for `q' packets.
14542 * server.h: Include "target.h". Remove obsolete prototypes.
14543 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14544
145452002-04-09 Daniel Jacobowitz <drow@mvista.com>
14546
14547 * Makefile.in: Add WARN_CFLAGS. Update configury
14548 dependencies.
14549 * configure.in: Check for <string.h>
14550 * configure: Regenerate.
14551 * config.in: Regenerate.
14552 * gdbreplay.c: Include needed system headers.
14553 (remote_open): Remove strchr prototype.
14554 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14555 * regcache.c (supply_register): Change buf argument to const void *.
14556 (supply_register_by_name): Likewise.
14557 (collect_register): Change buf argument to void *.
14558 (collect_register_by_name): Likewise.
14559 * regcache.h: Add missing prototypes.
14560 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14561 * server.c (handle_query): New function.
14562 (attached): New static variable, moved out of main.
14563 (main): Quiet longjmp clobber warnings.
14564 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14565 * utils.c (error): Remove NORETURN.
14566 (fatal): Likewise.
This page took 2.281212 seconds and 4 git commands to generate.